/* Write your custom CSS here */

.horizontal-bar {
    top: 65px;
}

.horizontal-bar-menu>ul>li>ul {
    min-width: 200px;
}

.slim-pagetitle .material-icons {
    padding: 5px;
    background: #444;
    color: #ffff;
    border-radius: 50%;
    margin-right: 8px;
    font-size: 20px;
}

.slim-pageheader {
    padding: 15px 0;
}

@media (min-width: 576px) {
    .slim-pageheader {
        margin: 0 0 5px 0;

        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-direction: row-reverse;
    }
}

.slim-pagetitle,
.modern-stat-hero {
    margin-top: 15px;
    margin-bottom: 5px !important;
    color: #1e1e2d !important;
    text-transform: none !important;
    font-weight: 800 !important;
    font-size: 2.2rem !important;
    letter-spacing: -1px !important;
    line-height: 1.1 !important;
    padding: 0 !important;
}

.slim-pagetitle {
    font-size: 1.5rem !important;

}

.slim-pagetitle,
.modern-stat-hero .value {
    background: linear-gradient(135deg, #1e1e2d 0%, #3e3e5d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.modern-stat-hero small {
    font-size: 1rem !important;
    font-weight: 400 !important;
    color: #999 !important;
    display: block;
    margin-top: -5px;
    letter-spacing: 0;
    -webkit-text-fill-color: #999 !important;
}

@media (min-width: 576px) {
    .slim-pagetitle {
        margin-top: 0;
        margin-bottom: 0;
    }
}

.slim-breadcrumb {
    margin-bottom: 0;
    padding: 0;
    background-color: transparent;
    font-size: 12px;
}

@media (min-width: 576px) {
    .slim-breadcrumb {
        font-size: 14px;
    }
}

.slim-breadcrumb .breadcrumb-item+.breadcrumb-item::before {
    color: #ced4da;
}

body {
    background-color: #F0F2F7;
}

.horizontal-bar-menu>ul>li>a,
.horizontal-bar-menu>ul>li ul li a {
    color: rgb(43, 85, 118)
}

.loader {
    background: #1b022b;
    /* fallback for old browsers */

}

.loader .spinner-grow {
    top: 50%;
    left: 50%;
    margin: -13px 0 0 -13px;
    position: absolute;
    color: #e86219 !important;
}

.page-sidebar {
    background: #2980b9;
    /* fallback for old browsers */
    background: -webkit-linear-gradient(to right, #2c3e50, #2980b9);
    /* Chrome 10-25, Safari 5.1-6 */
    background: linear-gradient(to right, #2c3e50, #2980b9);
    /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
}

.page-header .navbar ul.navbar-nav>li>a {
    border: 1px solid #d3d3d3;
    box-shadow: 0 0 0.5em rgba(0, 0, 0, 0.1);
}

.slimScrollDiv {
    width: 105% !important;
}



legend {
    margin-bottom: 20px;
    font-size: 21px;
}

output {
    padding-top: 8px;
    font-size: 14px;
    line-height: 1.42857;
}

.form-control {
    height: 36px;
    padding: 7px 0;
    font-size: 14px;
    line-height: 1.42857;
}

@media screen and (-webkit-min-device-pixel-ratio: 0) {

    input[type="date"].form-control,
    input[type="time"].form-control,
    input[type="datetime-local"].form-control,
    input[type="month"].form-control {
        line-height: 36px;
    }

    input[type="date"].input-sm,
    .input-group-sm input[type="date"],
    input[type="time"].input-sm,
    .input-group-sm input[type="time"],
    input[type="datetime-local"].input-sm,
    .input-group-sm input[type="datetime-local"],
    input[type="month"].input-sm,
    .input-group-sm input[type="month"] {
        line-height: 24px;
    }

    input[type="date"].input-lg,
    .input-group-lg input[type="date"],
    input[type="time"].input-lg,
    .input-group-lg input[type="time"],
    input[type="datetime-local"].input-lg,
    .input-group-lg input[type="datetime-local"],
    input[type="month"].input-lg,
    .input-group-lg input[type="month"] {
        line-height: 44px;
    }
}

.radio label,
.checkbox label {
    min-height: 20px;
}

.form-control-static {
    padding-top: 8px;
    padding-bottom: 8px;
    min-height: 34px;
}

.input-sm .input-sm {
    height: 24px;
    padding: 3px 0;
    font-size: 11px;
    line-height: 1.5;
    border-radius: 0;
}

.input-sm select.input-sm {
    height: 24px;
    line-height: 24px;
}

.input-sm textarea.input-sm,
.input-sm select[multiple].input-sm {
    height: auto;
}

.form-group-sm .form-control {
    height: 24px;
    padding: 3px 0;
    font-size: 11px;
    line-height: 1.5;
}

.form-group-sm select.form-control {
    height: 24px;
    line-height: 24px;
}

.form-group-sm textarea.form-control,
.form-group-sm select[multiple].form-control {
    height: auto;
}

.form-group-sm .form-control-static {
    height: 24px;
    min-height: 31px;
    padding: 4px 0;
    font-size: 11px;
    line-height: 1.5;
}

.input-lg .input-lg {
    height: 44px;
    padding: 9px 0;
    font-size: 18px;
    line-height: 1.33333;
    border-radius: 0;
}

.input-lg select.input-lg {
    height: 44px;
    line-height: 44px;
}

.input-lg textarea.input-lg,
.input-lg select[multiple].input-lg {
    height: auto;
}

.form-group-lg .form-control {
    height: 44px;
    padding: 9px 0;
    font-size: 18px;
    line-height: 1.33333;
}

.form-group-lg select.form-control {
    height: 44px;
    line-height: 44px;
}

.form-group-lg textarea.form-control,
.form-group-lg select[multiple].form-control {
    height: auto;
}

.form-group-lg .form-control-static {
    height: 44px;
    min-height: 38px;
    padding: 10px 0;
    font-size: 18px;
    line-height: 1.33333;
}

.form-horizontal .radio,
.form-horizontal .checkbox,
.form-horizontal .radio-inline,
.form-horizontal .checkbox-inline {
    padding-top: 8px;
}

.form-horizontal .radio,
.form-horizontal .checkbox {
    min-height: 28px;
}

@media (min-width: 768px) {
    .form-horizontal .control-label {
        padding-top: 8px;
    }
}

@media (min-width: 768px) {
    .form-horizontal .form-group-lg .control-label {
        padding-top: 13px;
        font-size: 18px;
    }
}

@media (min-width: 768px) {
    .form-horizontal .form-group-sm .control-label {
        padding-top: 4px;
        font-size: 11px;
    }
}

.label {
    border-radius: 2px;
}

.label,
.label.label-default {
    background-color: #FFFFFF;
}

.label.label-inverse {
    background-color: #212121;
}

.label.label-primary {
    background-color: #9c27b0;
}

.label.label-success {
    background-color: #4caf50;
}

.label.label-info {
    background-color: #00bcd4;
}

.label.label-warning {
    background-color: #ff9800;
}

.label.label-danger {
    background-color: #f44336;
}

.label.label-rose {
    background-color: #e91e63;
}

.form-control,
.form-group .form-control {
    border: 0;
    background-image: linear-gradient(#9c27b0, #9c27b0), linear-gradient(#D2D2D2, #D2D2D2);
    background-size: 0 2px, 100% 1px;
    background-repeat: no-repeat;
    background-position: center bottom, center calc(100% - 1px);
    background-color: transparent;
    transition: background 0s ease-out;
    float: none;
    box-shadow: none;
    border-radius: 0;
    font-weight: 400;
}

.form-control::-moz-placeholder,
.form-group .form-control::-moz-placeholder {
    color: #AAAAAA;
    font-weight: 400;
}

.form-control:-ms-input-placeholder,
.form-group .form-control:-ms-input-placeholder {
    color: #AAAAAA;
    font-weight: 400;
}

.form-control::-webkit-input-placeholder,
.form-group .form-control::-webkit-input-placeholder {
    color: #AAAAAA;
    font-weight: 400;
}

.form-control[readonly],
.form-control[disabled],
fieldset[disabled] .form-control,
.form-group .form-control[readonly],
.form-group .form-control[disabled],
fieldset[disabled] .form-group .form-control {
    background-color: transparent;
}

.form-control[disabled],
fieldset[disabled] .form-control,
.form-group .form-control[disabled],
fieldset[disabled] .form-group .form-control {
    background-image: none;
    border-bottom: 1px dotted #D2D2D2;
}

.form-group {
    position: relative;
}

.form-group.label-static label.control-label,
.form-group.label-placeholder label.control-label,
.form-group.label-floating label.control-label {
    position: absolute;
    pointer-events: none;
    transition: 0.3s ease all;
}

.form-group.label-floating label.control-label {
    will-change: left, top, contents;
}

.form-group.label-placeholder:not(.is-empty) label.control-label {
    display: none;
}

.form-group .help-block {
    position: absolute;
    display: none;
}

.form-group.is-focused .form-control {
    outline: none;
    background-image: linear-gradient(#9c27b0, #9c27b0), linear-gradient(#D2D2D2, #D2D2D2);
    background-size: 100% 2px, 100% 1px;
    box-shadow: none;
    transition-duration: 0.3s;
}

.form-group.is-focused .form-control .material-input:after {
    background-color: #9c27b0;
}

.form-group.is-focused.form-info .form-control {
    background-image: linear-gradient(#00bcd4, #00bcd4), linear-gradient(#D2D2D2, #D2D2D2);
}

.form-group.is-focused.form-success .form-control {
    background-image: linear-gradient(#4caf50, #4caf50), linear-gradient(#D2D2D2, #D2D2D2);
}

.form-group.is-focused.form-warning .form-control {
    background-image: linear-gradient(#ff9800, #ff9800), linear-gradient(#D2D2D2, #D2D2D2);
}

.form-group.is-focused.form-danger .form-control {
    background-image: linear-gradient(#f44336, #f44336), linear-gradient(#D2D2D2, #D2D2D2);
}

.form-group.is-focused.form-white .form-control {
    background-image: linear-gradient(#FFFFFF, #FFFFFF), linear-gradient(#D2D2D2, #D2D2D2);
}

.form-group.is-focused.label-placeholder label,
.form-group.is-focused.label-placeholder label.control-label {
    color: #AAAAAA;
}

.form-group.is-focused .help-block {
    display: block;
}

.form-group.has-warning .form-control {
    box-shadow: none;
}

.form-group.has-warning.is-focused .form-control {
    background-image: linear-gradient(#ff9800, #ff9800), linear-gradient(#D2D2D2, #D2D2D2);
}

.form-group.has-warning label.control-label,
.form-group.has-warning .help-block {
    color: #ff9800;
}

.form-group.has-error .form-control {
    box-shadow: none;
}

.form-group.has-error.is-focused .form-control {
    background-image: linear-gradient(#f44336, #f44336), linear-gradient(#D2D2D2, #D2D2D2);
}

.form-group.has-error label.control-label,
.form-group.has-error .help-block {
    color: #f44336;
}

.form-group.has-success .form-control {
    box-shadow: none;
}

.form-group.has-success.is-focused .form-control {
    background-image: linear-gradient(#4caf50, #4caf50), linear-gradient(#D2D2D2, #D2D2D2);
}

.form-group.has-success label.control-label,
.form-group.has-success .help-block {
    color: #4caf50;
}

.form-group.has-info .form-control {
    box-shadow: none;
}

.form-group.has-info.is-focused .form-control {
    background-image: linear-gradient(#00bcd4, #00bcd4), linear-gradient(#D2D2D2, #D2D2D2);
}

.form-group.has-info label.control-label,
.form-group.has-info .help-block {
    color: #00bcd4;
}

.form-group textarea {
    resize: none;
}

.form-group textarea~.form-control-highlight {
    margin-top: -11px;
}

.form-group select {
    appearance: none;
}

.form-group select~.material-input:after {
    display: none;
}

.form-control::-moz-placeholder {
    font-size: 14px;
    line-height: 1.42857;
    color: #AAAAAA;
    font-weight: 400;
}

.form-control:-ms-input-placeholder {
    font-size: 14px;
    line-height: 1.42857;
    color: #AAAAAA;
    font-weight: 400;
}

.form-control::-webkit-input-placeholder {
    font-size: 14px;
    line-height: 1.42857;
    color: #AAAAAA;
    font-weight: 400;
}

.checkbox label,
.radio label,
label {
    font-size: 14px;
    line-height: 1.42857;
    color: #AAAAAA;
    font-weight: 400;
}

label.control-label {
    font-size: 11px;
    line-height: 1.07143;
    color: #AAAAAA;
    font-weight: 400;
    margin: 16px 0 0 0;
}

.help-block {
    margin-top: 0;
    font-size: 11px;
}

.form-group {
    margin: 20px 0 0 0;
}

.form-group .form-control::-moz-placeholder {
    font-size: 14px;
    line-height: 1.42857;
    color: #AAAAAA;
    font-weight: 400;
}

.form-group .form-control:-ms-input-placeholder {
    font-size: 14px;
    line-height: 1.42857;
    color: #AAAAAA;
    font-weight: 400;
}

.form-group .form-control::-webkit-input-placeholder {
    font-size: 14px;
    line-height: 1.42857;
    color: #AAAAAA;
    font-weight: 400;
}

.form-group .checkbox label,
.form-group .radio label,
.form-group label {
    font-size: 14px;
    line-height: 1.42857;
    color: #AAAAAA;
    font-weight: 400;
}

.form-group label.control-label {
    font-size: 11px;
    line-height: 1.07143;
    color: #AAAAAA;
    font-weight: 400;
    margin: 16px 0 0 0;
}

.form-group .help-block {
    margin-top: 0;
    font-size: 11px;
}

.form-group.label-floating label.control-label,
.form-group.label-placeholder label.control-label {
    top: -7px;
    font-size: 14px;
    line-height: 1.42857;
}

.form-group.label-static label.control-label,
.form-group.label-floating.is-focused label.control-label,
.form-group.label-floating:not(.is-empty) label.control-label {
    top: -28px;
    left: 0;
    font-size: 11px;
    line-height: 1.07143;
}

.form-group.label-floating input.form-control:-webkit-autofill~label.control-label label.control-label {
    top: -28px;
    left: 0;
    font-size: 11px;
    line-height: 1.07143;
}

.form-group.form-group-sm {
    padding-bottom: 10px;
    margin: 21px 0 0 0;
}

.form-group.form-group-sm .form-control::-moz-placeholder {
    font-size: 11px;
    line-height: 1.5;
    color: #AAAAAA;
    font-weight: 400;
}

.form-group.form-group-sm .form-control:-ms-input-placeholder {
    font-size: 11px;
    line-height: 1.5;
    color: #AAAAAA;
    font-weight: 400;
}

.form-group.form-group-sm .form-control::-webkit-input-placeholder {
    font-size: 11px;
    line-height: 1.5;
    color: #AAAAAA;
    font-weight: 400;
}

.form-group.form-group-sm .checkbox label,
.form-group.form-group-sm .radio label,
.form-group.form-group-sm label {
    font-size: 11px;
    line-height: 1.5;
    color: #AAAAAA;
    font-weight: 400;
}

.form-group.form-group-sm label.control-label {
    font-size: 9px;
    line-height: 1.125;
    color: #AAAAAA;
    font-weight: 400;
    margin: 16px 0 0 0;
}

.form-group.form-group-sm .help-block {
    margin-top: 0;
    font-size: 9px;
}

.form-group.form-group-sm.label-floating label.control-label,
.form-group.form-group-sm.label-placeholder label.control-label {
    top: -11px;
    font-size: 11px;
    line-height: 1.5;
}

.form-group.form-group-sm.label-static label.control-label,
.form-group.form-group-sm.label-floating.is-focused label.control-label,
.form-group.form-group-sm.label-floating:not(.is-empty) label.control-label {
    top: -25px;
    left: 0;
    font-size: 9px;
    line-height: 1.125;
}

.form-group.form-group-sm.label-floating input.form-control:-webkit-autofill~label.control-label label.control-label {
    top: -25px;
    left: 0;
    font-size: 9px;
    line-height: 1.125;
}

.form-group.form-group-lg {
    padding-bottom: 10px;
    margin: 30px 0 0 0;
}

.form-group.form-group-lg .form-control::-moz-placeholder {
    font-size: 18px;
    line-height: 1.33333;
    color: #AAAAAA;
    font-weight: 400;
}

.form-group.form-group-lg .form-control:-ms-input-placeholder {
    font-size: 18px;
    line-height: 1.33333;
    color: #AAAAAA;
    font-weight: 400;
}

.form-group.form-group-lg .form-control::-webkit-input-placeholder {
    font-size: 18px;
    line-height: 1.33333;
    color: #AAAAAA;
    font-weight: 400;
}

.form-group.form-group-lg .checkbox label,
.form-group.form-group-lg .radio label,
.form-group.form-group-lg label {
    font-size: 18px;
    line-height: 1.33333;
    color: #AAAAAA;
    font-weight: 400;
}

.form-group.form-group-lg label.control-label {
    font-size: 14px;
    line-height: 1;
    color: #AAAAAA;
    font-weight: 400;
    margin: 16px 0 0 0;
}

.form-group.form-group-lg .help-block {
    margin-top: 0;
    font-size: 14px;
}

.form-group.form-group-lg.label-floating label.control-label,
.form-group.form-group-lg.label-placeholder label.control-label {
    top: -5px;
    font-size: 18px;
    line-height: 1.33333;
}

.form-group.form-group-lg.label-static label.control-label,
.form-group.form-group-lg.label-floating.is-focused label.control-label,
.form-group.form-group-lg.label-floating:not(.is-empty) label.control-label {
    top: -32px;
    left: 0;
    font-size: 14px;
    line-height: 1;
}

.form-group.form-group-lg.label-floating input.form-control:-webkit-autofill~label.control-label label.control-label {
    top: -32px;
    left: 0;
    font-size: 14px;
    line-height: 1;
}

select.form-control {
    border: 0;
    box-shadow: none;
    border-radius: 0;
}

.form-group.is-focused select.form-control {
    box-shadow: none;
    border-color: #D2D2D2;
}

select.form-control[multiple],
.form-group.is-focused select.form-control[multiple] {
    height: 85px;
}

.input-group-btn .btn {
    margin: 0 0 7px 0;
}

.form-group.form-group-sm .input-group-btn .btn {
    margin: 0 0 3px 0;
}

.form-group.form-group-lg .input-group-btn .btn {
    margin: 0 0 9px 0;
}

.input-group .input-group-btn {
    padding: 0 12px;
}

.input-group .input-group-addon {
    border: 0;
    background: transparent;
    padding: 6px 15px 0px;
}

.form-group input[type=file] {
    opacity: 0;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
}

.form-control-feedback {
    opacity: 0;
}

.has-success .form-control-feedback {
    color: #4caf50;
    opacity: 1;
}

.has-error .form-control-feedback {
    color: #f44336;
    opacity: 1;
}

.form-horizontal .radio,
.form-horizontal .checkbox,
.form-horizontal .radio-inline,
.form-horizontal .checkbox-inline {
    padding-top: 0;
}

.form-horizontal .radio {
    margin-bottom: 10px;
}

.form-horizontal label {
    text-align: right;
}

.form-horizontal label.control-label {
    margin: 0;
}

.form-newsletter .input-group,
.form-newsletter .form-group {
    float: left;
    width: 78%;
    margin-right: 2%;
    margin-top: 9px;
}

.form-newsletter .btn {
    float: left;
    width: 20%;
    margin: 9px 0 0;
}

.form-group label {
    color: #000;
}

.select2-dropdown {
    padding: 5px 5px !important;
}

.select2-selection.select2-selection--multiple {
    padding: 9px 20px !important;
}

.k-filter-row th,
.k-grid-header th.k-header {
    border-style: none;
}

.select2-selection__choice {
    font-size: 13px !important;
}

.card .card-header {
    font-size: 14px;
}

.card-header.plaincolor {
    background: linear-gradient(60deg, #ab47bc, #8e24aa) !important;
    color: #fff !important;
}

table.dataTable.minipadding td,
table.dataTable.minipadding th {
    padding: 4px 2px !important;

}

.vimeo-full-width {
    padding: 56.25% 0 0 0;
    position: relative;
}

.vimeo-full-width iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.page-content {
    padding: 0 15px;
}

.card-outline {
    background: transparent;
    border: 1px solid #cec8c8 !important;
    box-shadow: 0 0 1.25rem rgba(31, 45, 61, .08) !important;
    height: 100%;
    border-radius: 0px;
}

.card-outline .card-header {
    background: white;
    border-radius: 0px;
}

.card.jumbotron {
    width: calc(100% - 20px);
    min-height: 250px;
    content: '';
    background: linear-gradient(135deg, #011D4A 0%, #448ECB 100%);
    z-index: -3;
    margin-top: -50px;
    border-radius: 0px;
}

.card.jumbotron h2,
.card.jumbotron p {
    color: #fff;
    text-shadow: 0 0 10px #000;
}

.course-widget .fa:before {
    line-height: 1.6;
    padding-right: 1em;
}

.course-widget li {
    list-style: none !important;
}

.course-widget li i {
    width: 20px;
    font-style: normal;
}

.card-light {
    display: block;
    margin-bottom: 10px;
    background: #fafafa;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 20px;
    overflow: hidden;
}

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

.dtable-container {
    max-width: 100% !important;

}

.dtable-container table {
    white-space: nowrap !important;
    width: 100% !important;
    border-collapse: collapse !important;
}


.red-bg {
    background: red;
    color: #fff;
}

.orange-bg {
    background: #f9af28;
    color: #000;
}

.green-bg {
    background: green;
    color: #fff;
}

.yellow-bg {
    background: yellow
}


@media screen and (max-width: 600px) {

    #portfolio .btn-primary.badge {
        margin-left: 2em
    }
}

.dataTables_filter label {
    background: #ffff000f;
    padding: 0.7em 0.5em;
    border: 1px solid #bababa;
    border-radius: 15px;
    margin-top: 10px;
}

.card .card-body {
    padding: 5px 20px !important;
}

.page-content .main-wrapper {
    padding-top: 5px;
}

select.form-control[multiple],
textarea.form-control {
    padding: 10px;
}

.bg-gradient {
    background: #2980b9 !important;
    /* fallback for old browsers */
    background: -webkit-linear-gradient(to right, #2c3e50, #2980b9) !important;
    /* Chrome 10-25, Safari 5.1-6 */
    background: linear-gradient(to right, #2c3e50, #2980b9) !important;
    /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
}

.group-editable-input {
    display: block;
    margin: 5px 0;
}

.editable-input-prepend {
    padding: 10px;
    border: 1px solid #ededed;
    display: inline-block;
    background: #ededed;
    border-top-left-radius: 15px;
    border-bottom-left-radius: 15px;
    padding-left: 15px;
    min-width: 80px;
}

.editable-input-prepend i {
    margin-right: 3px;
}

.editable-input-main {
    padding: 10px;
    border: 1px solid #ededed;
    display: inline-block;
    margin-left: -4px;
    border-top-right-radius: 15px;
    border-bottom-right-radius: 15px;
    border-left: none;
}

.editable-input-with-pencil {
    text-decoration: none;
    color: inherit;
}

.editable-popup .editable-input {
    display: block;
}

#datetimepicker .datepicker>div {
    display: inherit;
}

.editable-textarea-element .editable-input-prepend {
    display: inline-block;
    border-bottom-left-radius: 0;
    border-top-right-radius: 15px;
}

.editable-textarea-element .editable-input-main {
    display: block;
    border-left: 1px solid #ededed;
    border-bottom-left-radius: 15px;
    margin-left: 0px;
}

.editableform .control-group {
    margin: -10px 0;
    padding: 5px 0 0;
}

.editable-textarea-element textarea.input-large,
.editable-textarea-element .control-group,
.editable-textarea-element .editable-input,
.editable-textarea-element .editable-container {
    width: 100%;
    display: block !important;
}

.editable-input-main.isSelect2element {
    padding: 0 10px 0 10px;
}

.editable-input-main.isSelect2element .select2-container--default .select2-selection--single {
    border: none !important;
}

.editable-input[data-type=text],
.editable-input[data-type=number] {
    margin-left: 25px;
}

.editable-clear-x {
    margin-top: 0px !important
}

.profile-header .profile-name span {
    margin-top: 0px !important
}

.bg-wa {
    color: #fff;
    background: #128C7E;
}

.bg-green {
    color: #fff;
    background: #25ab00;
}

.bg-red {
    color: #fff;
    background: #db2c00;
}

.bg-orange {
    color: #fff;
    background: #db6a00;
}


.bg-blue {
    color: #fff;
    background: #0066db;
}



.deleted {
    text-decoration: line-through;
}

.badge {
    font-size: 100% !important;
}

button[data-mce-name=wavariables] {
    background: #a1f886 !important;
    border-radius: 10px !important;
}

button[data-mce-name=mybsmarttags] {
    background: #a1f886 !important;
    border-radius: 10px !important;
}


.activity-status-4 td {
    background: #d5efcd !important;

}

.activity-status-2 td {
    color: #1d7a00 !important;
    font-weight: bold;
    text-decoration: line-through;
    background: #d5efcd !important;

}

.activity-status-6 td {
    opacity: 0.65;

}

.activity-status-4 td.activityDateCell,
.activity-status-4 td.activityStatusCell {
    color: green !important;
    font-weight: bold;
}

.activity-status-3 td.activityDateCell,
.activity-status-3 td.activityStatusCell {
    color: red !important;
    font-weight: bold;
}

.activity-status-3 td {
    background: #f9e3e3 !important;
}

.activity-status-1 td {
    background: #e3feff !important;
}

table.dataTable tbody tr>.dtfc-fixed-left,
table.dataTable tbody tr>.dtfc-fixed-right {
    background-color: #f4f4f4 !important;
    border-right: 2px solid #ededed;
}





table.dataTable tbody tr>.dtfc-fixed-left,
table.dataTable tbody tr>.dtfc-fixed-right {
    background-color: #f4f4f4 !important;
    border-right: 2px solid #ededed;
}





.connect-container {
    display: flex;
}

.page-sidebar:not(.compact-sidebar .page-sidebar) {
    flex: 0 0 250px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: fixed;
    padding-bottom: 15px;
}

.page-container {
    flex: 1;
    margin-left: 310px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}


::-webkit-scrollbar {
    -webkit-appearance: none;
    width: 10px;
    background-color: #ededed;
    height: 10px;

}

::-webkit-scrollbar-thumb {
    border-radius: 15px;
    background-color: rgb(156 156 156);
    box-shadow: 0 0 1px rgba(255, 255, 255, .5);
}

.accordion-menu {
    margin-top: -20px;
}

.dropzone {
    border: 2px dashed #4CAF50;
    padding: 20px;
    border-radius: 10px;
    background: linear-gradient(to right, #f0f0f0, #e0e0e0);
}

.dropzone .dz-message {
    font-size: 18px;
    text-align: center;
    color: #333;
}

.dropzone .dz-message i {
    color: #4CAF50;
}

.checkmark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 5em;
    color: #4CAF50;
    display: none;
}

.dropzone .dz-message i {
    color: #4CAF50;
}

.nav-tabs {
    margin-bottom: 0em;
}

.nav-tabs .nav-link {
    background: #ebebeb;
    border: none;
    border-radius: 15px !important;
    margin: 0.5em;
    text-transform: capitalize;
}

.nav-tabs .nav-item.show .nav-link,
.nav-tabs .nav-link.active {
    background-color: var(--primary);
    color: white !important;
    border: 1px solid var(--primary);
}


.plaincolor .nav-tabs .nav-link {
    background: transparent;
    border: 1px solid var(--white);
    color: var(--white) !important;
}

.plaincolor .nav-tabs .nav-link:hover {
    background: #ebebeb;
    color: var(--primary) !important;
}

.plaincolor .nav-tabs .nav-item.show .nav-link,
.nav-tabs .nav-link.active {
    background-color: var(--white);
    color: var(--primary) !important;
}

.dropdown-menu.show {
    left: 15px !important;
}


.modal-header .close {
    z-index: 1000;
    padding: 0.8rem 1rem 0.8rem;
}

.modal .modal-content .modal-body .card .card-header.plaincolor {
    border-radius: 15px;
    margin-top: 0;
}

label.error {
    color: red;
    font-weight: bold;
}

.table td .btn-primary i {
    color: white;
}

#mobile.into-input-loading {
    background-color: #ffffff;
    background-image: url("../img/loading-image.gif");
    background-size: 50px 35px;
    background-position: right center;
    background-repeat: no-repeat;
}

#mobile.into-input-greencheck {
    background-color: #ffffff;
    background-image: url("../img/check.png");
    background-size: 25px 25px;
    background-position: right center;
    background-repeat: no-repeat;
}


.drag-drawflow {
    line-height: 50px;
    padding-left: 20px;
    background: #f1f1f1;
    border-radius: 10px;
    margin: 0.2em 0;
    cursor: move;
    user-select: none;
}

.btn-export {
    float: right;
    position: absolute;
    top: 10px;
    right: 10px;
    color: white;
    font-weight: bold;
    border: 1px solid #0e5ba3;
    background: #4ea9ff;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    z-index: 5;
}

.btn-clear {
    float: right;
    position: absolute;
    top: 10px;
    right: 85px;
    color: white;
    font-weight: bold;
    border: 1px solid #96015b;
    background: #e3195a;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    z-index: 5;
}

.swal-wide {
    width: 80% !important;
}

.btn-lock {
    float: right;
    position: absolute;
    bottom: 10px;
    right: 140px;
    display: flex;
    font-size: 24px;
    color: white;
    padding: 5px 10px;
    background: #555555;
    border-radius: 4px;
    border-right: 1px solid var(--border-color);
    z-index: 5;
    cursor: pointer;
}

.bar-zoom {
    float: right;
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    font-size: 24px;
    color: white;
    padding: 5px 10px;
    background: #555555;
    border-radius: 4px;
    border-right: 1px solid var(--border-color);
    z-index: 5;
}

.bar-zoom svg {
    cursor: pointer;
    padding-left: 10px;
}

.bar-zoom svg:nth-child(1) {
    padding-left: 0px;
}

#drawflow {
    position: relative;
    width: calc(100vw - 301px);
    height: calc(100% - 50px);
    top: 40px;
    background: var(--background-color);
    background-size: 25px 25px;
    background-image:
        linear-gradient(to right, #f1f1f1 1px, transparent 1px),
        linear-gradient(to bottom, #f1f1f1 1px, transparent 1px);
}

@media only screen and (max-width: 768px) {
    .col {
        width: 50px;
    }

    .col .drag-drawflow span {
        display: none;
    }

    #drawflow {
        width: calc(100vw - 51px);
    }
}



/* Editing Drawflow */

.drawflow .drawflow-node {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    -webkit-box-shadow: 0 2px 15px 2px var(--border-color);
    box-shadow: 0 2px 15px 2px var(--border-color);
    padding: 0px;
    width: 200px;
}

.drawflow .drawflow-node.selected {
    background: white;
    border: 1px solid #4ea9ff;
    -webkit-box-shadow: 0 2px 20px 2px #4ea9ff;
    box-shadow: 0 2px 20px 2px #4ea9ff;
}

.drawflow .drawflow-node.selected .title-box {
    color: #22598c;
    /*border-bottom: 1px solid #4ea9ff;*/
}

.drawflow .connection .main-path {
    stroke: #4ea9ff;
    stroke-width: 3px;
}

.drawflow .drawflow-node .input,
.drawflow .drawflow-node .output {
    height: 15px;
    width: 15px;
    border: 2px solid var(--border-color);
}

.drawflow .drawflow-node .input:hover,
.drawflow .drawflow-node .output:hover {
    background: #4ea9ff;
}

.drawflow .drawflow-node .output {
    right: 10px;
}

.drawflow .drawflow-node .input {
    left: -10px;
    background: white;
}

.drawflow>.drawflow-delete {
    border: 2px solid #43b993;
    background: white;
    color: #43b993;
    -webkit-box-shadow: 0 2px 20px 2px #43b993;
    box-shadow: 0 2px 20px 2px #43b993;
}

.drawflow-delete {
    border: 2px solid #4ea9ff;
    background: white;
    color: #4ea9ff;
    -webkit-box-shadow: 0 2px 20px 2px #4ea9ff;
    box-shadow: 0 2px 20px 2px #4ea9ff;
}

.drawflow-node .title-box {
    height: 50px;
    line-height: 50px;
    background: var(--background-box-title);
    border-bottom: 1px solid #e9e9e9;
    border-radius: 4px 4px 0px 0px;
    padding-left: 10px;
}

.drawflow .title-box svg {
    position: initial;
}

.drawflow-node .box {
    padding: 10px 20px 20px 20px;
    font-size: 14px;
    color: #555555;

}

.drawflow-node .box p {
    margin-top: 5px;
    margin-bottom: 5px;
}

.drawflow-node.welcome {
    width: 250px;
}

.drawflow-node.slack .title-box {
    border-radius: 4px;
}

.drawflow-node input,
.drawflow-node select,
.drawflow-node textarea {
    border-radius: 4px;
    border: 1px solid var(--border-color);
    height: 30px;
    line-height: 30px;
    font-size: 16px;
    width: 158px;
    color: #555555;
}

.drawflow-node textarea {
    height: 100px;
}


.drawflow-node.personalized {
    background: red;
    height: 200px;
    text-align: center;
    color: white;
}

.drawflow-node.personalized .input {
    background: yellow;
}

.drawflow-node.personalized .output {
    background: green;
}

.drawflow-node.personalized.selected {
    background: blue;
}

.drawflow .connection .point {
    stroke: var(--border-color);
    stroke-width: 2;
    fill: white;

}

.drawflow .connection .point.selected,
.drawflow .connection .point:hover {
    fill: #4ea9ff;
}

.card-glass {
    box-shadow: 0 0 1.25rem rgba(0, 0, 0, .1) !important;
    border-radius: 15px !important;
    background: transparent !important;
    border: 0 !important;
}

.card-glass .card-body {
    padding: 1em 1.2em !important;
}

/* Modal that slides from the right */
.modal-dialog-slide {
    transition: transform 0.4s ease-out;
    /* Smooth transition */
}

.modal-dialog-slide .modal-content {
    overflow-y: auto;
    /* Enable vertical scrolling */
    min-height: 100%;

}

.modal-dialog-slide {
    box-shadow: 0 0 35px #555 !important;

}

.modal-dialog-right {
    position: fixed;
    right: 0;
    top: 50%;
    /* Centered vertically */
    transform: translateX(100%) translateY(-50%);
    /* Start off-screen to the right and centered vertically */
    margin: 0;
    height: 95%;
    /* Set height to 95% */
    width: 33%;
    /* Width to 33% of the screen */
}

.modal.fade.show .modal-dialog-right {
    transform: translateX(0) translateY(-50%);
    /* When opened, it slides in and stays centered */
    right: -10px;
    background: white;
    border-radius: 15px;
    overflow-y: auto;
}


/* Media query for small devices */
@media (max-width: 767.98px) {
    .modal-dialog-right {
        width: 100%;
        /* Occupy full screen on small devices */
        height: 95%;
        /* Maintain height at 95% on small devices */
    }
}

#remoteSideModal .modal-content .modal-body .card .card-header.plaincolor {
    margin-top: 2em !important;
}

#remoteSideModal .modal-header {
    display: none;
}

.activityDescription {

    padding: 1em;
    background: #ededed;
    margin: 1em 0;
    border-radius: 15px;

}

#duediligenceTable .duediligence-status-0 .badge-status,
#duediligenceTable .badge-status {
    border-left: 20px solid Gainsboro !important;
    border-bottom: 2px solid Gainsboro !important;
    border-bottom-right-radius: 0;
    font-size: 1.1em !important;
}

#duediligenceTable .duediligence-status-1 .badge-status,
#duediligenceTable .duediligence-status-3 .badge-status {
    border-left: 20px solid LawnGreen !important;
    border-bottom: 2px solid LawnGreen !important;
}

#duediligenceTable .duediligence-status-2 .badge-status,
#duediligenceTable .duediligence-status-6 .badge-status {
    border-left: 20px solid yellow !important;
    border-bottom: 2px solid yellow !important;
}

#duediligenceTable .duediligence-status-2 .badge-status {
    border-left: 20px solid orange !important;
    border-bottom: 2px solid orange !important;
}

#duediligenceTable .duediligence-status-4 .badge-status {
    border-left: 20px solid red !important;
    border-bottom: 2px solid red !important;
}





#marketingactionsTable .marketingaction-status-0 .badge-status,
#marketingactionsTable .badge-status {
    border-left: 20px solid Gainsboro !important;
    border-bottom: 2px solid Gainsboro !important;
    border-bottom-right-radius: 0;
    font-size: 1.1em !important;
}

#marketingactionsTable .marketingaction-status-1 .badge-status,
#marketingactionsTable .marketingaction-status-3 .badge-status {
    border-left: 20px solid LawnGreen !important;
    border-bottom: 2px solid LawnGreen !important;
}

#marketingactionsTable .marketingaction-status-2 .badge-status,
#marketingactionsTable .marketingaction-status-6 .badge-status {
    border-left: 20px solid yellow !important;
    border-bottom: 2px solid yellow !important;
}

#marketingactionsTable .marketingaction-status-2 .badge-status {
    border-left: 20px solid orange !important;
    border-bottom: 2px solid orange !important;
}

#marketingactionsTable .marketingaction-status-4 .badge-status {
    border-left: 20px solid red !important;
    border-bottom: 2px solid red !important;
}




.editable-input textarea.form-control {
    padding: 0.2em;
}

.popover.editable-container.editable-popup {
    box-shadow: 0 0 35px #4a4a4a;
}

.docu-paragraph {
    margin-bottom: 1rem;
    color: #000;
}

.docu-heading-1 {
    font-size: 1.7rem;
    font-weight: bold;
    border-bottom: 1px solid var(--primary);
    padding-bottom: 5px;
    margin-bottom: 1.5rem;
}

.docu-heading-2 {
    font-size: 1.5rem;
    display: inline-block;
    border-bottom: 1px solid var(--primary);
    font-weight: 300;
    color: var(--primary);
    padding-bottom: 5px;
    margin-bottom: 1.25rem;
}

.docu-heading-3 {
    font-size: 1.3rem;
    font-weight: bold;
    border-bottom: 1px solid var(--primary);
    color: var(--primary);
    font-weight: 300;
    padding-bottom: 5px;
    margin-bottom: 1rem;
}

.docu-bulleted-list,
.docu-numbered-list {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
    color: #000;
}

.docu-to-do {
    margin-bottom: 1rem;
}

.docu-toggle {
    margin-bottom: 1rem;
}

.docu-image {
    max-width: 100%;
    height: auto;
    margin-bottom: 1rem;
}

.docu-video {
    width: 100%;
    max-width: 600px;
    margin-bottom: 1rem;
}

.docu-embed {
    width: 100%;
    min-height: 450px;
    margin-bottom: 1rem;
}

.docu-quote {
    font-style: italic;
    border-left: 3px solid #ccc;
    padding-left: 1rem;
    margin-bottom: 1rem;
}

.docu-code {
    background-color: #f5f5f5;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.docu-callout {
    background-color: #f0f8ff;
    padding: 1rem;
    border-left: 4px solid #007bff;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.docu-callout-icon {
    margin-right: 1em;
}

.docu-unsupported {
    color: #ff0000;
    margin-bottom: 1rem;
}

.docu-file {
    display: inline-block;
    padding: 10px 15px 10px 35px;
    background-color: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    position: relative;
}

.docu-file::before {
    content: "\f019";
    /* FontAwesome download icon */
    font-family: FontAwesome;
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.docu-file:hover {
    background-color: #0056b3;
    transform: scale(1.05);
    color: #fff;
}

.docu-file-caption {
    margin-top: 5px;
    font-size: 0.9rem;
    color: #555;
}

nav[data-toggle="toc"] {
    top: 42px;
}

/* small screens */
@media (max-width: 768px) {

    /* override stickyness so that the navigation does not follow scrolling */
    nav[data-toggle="toc"] {
        margin-bottom: 42px;
        position: static;
    }

    /* PICK ONE */
    /* don't expand nested items, which pushes down the rest of the page when navigating */
    nav[data-toggle="toc"] .nav .active .nav {
        display: none;
    }

    /* alternatively, if you *do* want the second-level navigation to be shown (as seen on this page on mobile), use this */
    /*
    nav[data-toggle='toc'] .nav .nav {
      display: block;
    }
    */
}





/* Contenitore generale di Swiper */
.swiper-container {
    max-height: 400px;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-bottom: 40px;
    /* Spazio per i pallini sotto la galleria */
    background-color: #f3f3f3;
}

/* Imposta gli slide centrati */
.swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 15px;
}

/* Stile per le immagini */
.swiper-slide img {
    max-width: 100%;
    object-fit: contain;
    border-radius: 15px;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

/* Effetto al passaggio del mouse (hover) */
.swiper-slide img:hover {
    transform: scale(1.07);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Personalizzazione dei pulsanti di navigazione */
.swiper-button-next,
.swiper-button-prev {
    color: #ffffff;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: #007bff;
    /* Colore di sfondo al passaggio del mouse */
}

/* Ridimensiona le frecce all'interno dei pulsanti */
.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 14px;
}

/* Stile per la paginazione (puntini) */
.swiper-pagination {
    position: relative;
    bottom: -10px;
    text-align: center;
    width: 100%;
    margin-top: 10px;
}

/* Personalizzazione dei pallini */
.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: #007bff;
    opacity: 0.7;
    border-radius: 50%;
    transition: opacity 0.3s ease, transform 0.3s ease;
    margin: 0 6px;
}

/* Pallini attivi più visibili e con effetto di ingrandimento */
.swiper-pagination-bullet-active {
    opacity: 1;
    transform: scale(1.25);
    background: #ff6600;
}

.opacity-25 {
    opacity: 0.35;

}

.opacity-25:hover {
    cursor: not-allowed;
}


















/* ── Bottom bar mobile / PWA (v3, visibile in modalità app; DESIGN.md §31) ──
   Pillola di vetro sopra il contenuto con quattro destinazioni a icona (Home, Richieste, Agenda, Menu),
   indicatore a goccia sulla voce della pagina corrente (le pagine del Menu accendono Menu), al centro il fulmine
   delle azioni rapide (di base, o quelle della scheda in cui si è). Le notifiche stanno nella barra in alto. */
.myb-tabbar {
    --tabbar-h: 64px;
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    padding: 0 14px calc(12px + env(safe-area-inset-bottom));
    pointer-events: none;
}

.myb-tabbar__bar {
    position: relative;
    flex: 1;
    display: flex;
    align-items: stretch;
    max-width: 440px;
    height: var(--tabbar-h);
    margin: 0 auto;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 999px;
    /* il gradiente del marchio pieno sta nello strato ::after */
    background: transparent;
    box-shadow:
        0 14px 30px -8px color-mix(in srgb, var(--primary, #582679) 50%, transparent),
        0 2px 6px rgba(15, 23, 42, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    /* Il nome va qui e non sul contenitore .myb-tabbar: un antenato con view-transition-name
       diventa "backdrop root" e il backdrop-filter non vedrebbe piu' la pagina sotto */
    view-transition-name: myb-tabbar;
}

/* Il gradiente del marchio, pieno, come il binario: quello del menu dell'agenzia lo passa lo script della
   barra in --tabbar-grad (Page::GetFooter); qui la riserva con primary e secondary */
.myb-tabbar__bar::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    background: var(--tabbar-grad, linear-gradient(135deg, var(--secondary, #e86219) 0%, var(--primary, #582679) 100%));
    pointer-events: none;
}

/* Riflesso speculare sulla metà alta del vetro */
.myb-tabbar__bar::before {
    content: '';
    position: absolute;
    inset: 1px;
    z-index: 1;
    border-radius: inherit;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 55%);
    pointer-events: none;
}

.myb-tabbar__indicator {
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 0;
    width: 60px;
    margin-left: -30px;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.24); /* la voce attiva: una goccia di vetro chiaro sul vetro colorato */
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.55);
    opacity: 0;
    translate: var(--x, 0) 0;
    transition: translate 0.38s cubic-bezier(0.34, 1.3, 0.5, 1), opacity 0.2s ease;
    pointer-events: none;
}

.myb-tabbar__indicator.no-anim {
    transition: none;
}

.myb-tabbar__indicator.is-moving {
    animation: myb-liquid 0.38s ease;
}

/* La goccia si allunga mentre si sposta e poi si ricompatta */
@keyframes myb-liquid {
    0% { scale: 1 1; }
    35% { scale: 1.35 0.86; }
    70% { scale: 0.94 1.05; }
    100% { scale: 1 1; }
}

.myb-tabbar__item {
    position: relative;
    z-index: 2;
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.86);
    text-decoration: none !important;
    transition: color 0.25s ease, transform 0.15s ease;
}

.myb-tabbar__item i {
    font-size: 26px;
    line-height: 1;
}

@media (hover: hover) {
    .myb-tabbar__item:hover { color: #ffffff; }
}

/* Voce della pagina corrente: sulla goccia di vetro, icona bianca piena */
.myb-tabbar__item.is-active {
    color: #ffffff;
}

.myb-tabbar__item.is-active i {
    font-family: 'Material Icons';
}
html.myb-ph .myb-tabbar__item.is-active i.ph::before,
html.myb-ph .myb-tabbar__action i.ph-bold::before {
    font-family: "Phosphor-Fill" !important;
}

.myb-tabbar__item:active {
    transform: scale(0.88);
}

.myb-tabbar__item:focus,
.myb-tabbar__action:focus,
.myb-app .myb-appbar-back:focus,
.myb-app .page-header .navbar-nav .nav-link:focus {
    outline: none;
}

.myb-tabbar__item:focus-visible,
.myb-tabbar__action:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
    border-radius: 999px;
}

.myb-app .myb-appbar-back:focus-visible,
.myb-app .page-header .navbar-nav .nav-link:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
    border-radius: 999px;
}


/* Fulmine al centro: cerchio bianco in rilievo sul gradiente, lampo nel colore primary */
.myb-tabbar__center {
    position: relative;
    z-index: 2;
    flex: 0 0 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.myb-tabbar__action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #ffffff;
    color: var(--primary, #582679);
    box-shadow:
        0 0 0 3px rgba(255, 255, 255, 0.28),
        0 8px 18px -4px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s cubic-bezier(0.34, 1.36, 0.5, 1);
}

.myb-tabbar__action i {
    font-size: 28px;
    transition: transform 0.3s cubic-bezier(0.34, 1.36, 0.5, 1);
}

.myb-tabbar__action:active {
    transform: scale(0.9);
}

@media (prefers-reduced-motion: reduce) {
    .myb-tabbar__indicator { transition: opacity 0.2s ease; }
    .myb-tabbar__indicator.is-moving { animation: none; }
    .myb-sheet, .myb-sheet-backdrop, .myb-popover { animation: none !important; }
    .myb-tabbar__action, .myb-tabbar__action i, .myb-tabbar__item { transition: none; }
}

/* Più contrasto o meno trasparenza: senza riflesso, la voce attiva piena */
@media (prefers-contrast: more), (prefers-reduced-transparency: reduce) {
    .myb-tabbar__bar::before { display: none; }
    .myb-tabbar__indicator { background: rgba(255, 255, 255, 0.38); backdrop-filter: none; -webkit-backdrop-filter: none; }
    .myb-tabbar__item { color: #ffffff; }
}

.dark-theme .myb-tabbar__bar { box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.16); }

.myb-app .myb-appbar-search {
    display: block !important;
}

/* Menu: sezioni principali a griglia (concept ClickUp) */
.myb-sheet__group {
    margin: 10px 4px 4px;
    padding: 10px 0 2px;
    border: 1px solid color-mix(in srgb, var(--secondary) 22%, transparent);
    border-radius: 20px;
    background: color-mix(in srgb, var(--secondary) 4%, #fff);
}

.myb-sheet__group-title {
    padding: 0 14px 2px;
    color: color-mix(in srgb, var(--secondary) 80%, black);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.myb-sheet__group .myb-sheet__grid {
    padding-top: 6px;
}

/* "Altro" (sidebar completa): neutro, per distinguerlo dalle sezioni */
.myb-sheet__tile--more .myb-sheet__tile-icon {
    background: #f1f5f9;
    color: #475569;
}

button.myb-sheet__tile {
    padding: 0;
    border: 0;
    background: none;
    font-family: inherit;
}

/* Popover animato che nasce dal riquadro (Statistiche) */
.myb-popover {
    position: absolute;
    z-index: 2;
    width: 250px;
    max-width: calc(100% - 16px);
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.2), inset 0 1px 1px #fff;
    animation: myb-pop-in 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.myb-popover__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 12px;
    color: #1e293b;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none !important;
}

.myb-popover__item i {
    color: var(--secondary);
    font-size: 20px;
}

.myb-popover__item:active,
.myb-popover__item.is-active {
    background: color-mix(in srgb, var(--secondary) 10%, #fff);
}

@keyframes myb-pop-in {
    from { opacity: 0; transform: scale(0.6); }
    to { opacity: 1; transform: none; }
}

.myb-sheet__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px 6px;
    padding: 8px 4px 12px;
}

.myb-sheet__tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 0;
    color: #1e293b;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;
    -webkit-tap-highlight-color: transparent;
}

.myb-sheet__tile > span:last-child {
    max-width: 100%;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.myb-sheet__tile-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 18px;
    background: color-mix(in srgb, var(--secondary) 10%, #fff);
    color: var(--secondary);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06), inset 0 1px 1px #fff;
    transition: transform 0.15s ease;
}

.myb-sheet__tile-icon i {
    font-size: 26px;
}

.myb-sheet__tile:active .myb-sheet__tile-icon {
    transform: scale(0.9);
}

.myb-sheet__tile:focus-visible {
    outline: none;
}

.myb-sheet__tile:focus-visible .myb-sheet__tile-icon {
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
}

.myb-sheet__tile.is-active .myb-sheet__tile-icon {
    background: var(--secondary);
    color: #fff;
}

.dark-theme .myb-sheet__tile { color: #e2e8f0; }
.dark-theme .myb-sheet__tile-icon { border-color: rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.08); }

.myb-sheet__title {
    padding: 10px 14px 4px;
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ── Modalità app (html.myb-app) ──
   Attiva solo con la bottom bar abilitata, su mobile / app installata / ?bottom_bar=true.
   Classe impostata nel <head> da Page::GetMeta(), prima del primo render. */
.myb-app .myb-tabbar {
    display: flex;
}

.myb-app body {
    -webkit-tap-highlight-color: transparent;
}

/* Spazio per la bottom bar in fondo alla pagina (html/body hanno height: 100% nel tema,
   quindi il padding del body non allungherebbe lo scroll) */
.myb-app .page-footer {
    padding-bottom: calc(100px + env(safe-area-inset-bottom));
}

/* Voce: già raggiungibile dal cerchio Klaila (microfono nella ricerca) */
.myb-app #myb-voice-fab {
    display: none !important;
}

/* Header → app bar: in cima e' trasparente e i pulsanti galleggiano come cerchi di vetro
   (stile della bottom bar); scorrendo diventa una barra di vetro con il titolo a sinistra */
.myb-appbar-title {
    display: none;
}

.myb-app .page-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1030;
    padding-top: env(safe-area-inset-top);
    background: transparent;
    border-bottom: 1px solid transparent;
    box-shadow: none;
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.myb-app.myb-appbar-scrolled .page-header {
    background: rgba(248, 250, 252, 0.72);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    border-bottom-color: rgba(15, 23, 42, 0.06);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
}

.myb-app .page-header .navbar {
    position: relative;
    height: 56px;
    padding: 0 14px !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.myb-app .page-header .navbar-toggler,
.myb-app .page-header .navbar-collapse,
.myb-app .myb-app-hide {
    display: none !important;
}

.myb-app .page-header .navbar-nav {
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin: 0 !important;
}

.myb-app .page-header .navbar-nav > li,
.myb-app .page-header .navbar-nav form > div[style] > li {
    list-style: none;
}

/* Cerchi di vetro: indietro, ricerca, avatar, uscita dall'impersonificazione */
.myb-app.myb-has-back .myb-appbar-back,
.myb-app .page-header .navbar ul.navbar-nav > li > a.nav-link,
.myb-app .page-header .navbar ul.navbar-nav form button.nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    margin: 0;
    padding: 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.72) !important;
    color: #334155;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08), inset 0 1px 1px #fff !important;
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.15s ease;
}

.myb-app .page-header .navbar ul.navbar-nav > li > a.nav-link i,
.myb-app .page-header .navbar ul.navbar-nav form button.nav-link i {
    font-size: 21px;
    line-height: 1;
    color: #334155;
}

.myb-app.myb-has-back .myb-appbar-back:active,
.myb-app .page-header .navbar ul.navbar-nav > li > a.nav-link:active,
.myb-app .page-header .navbar ul.navbar-nav form button.nav-link:active {
    transform: scale(0.9);
}

/* Profilo: foto tonda (non un cerchio di vetro) e nome di battesimo accanto; scorrendo il nome
   lascia spazio al titolo della pagina */
.myb-appbar-name {
    display: none;
}

.myb-app .page-header .navbar ul.navbar-nav > li.nav-profile > a.nav-link {
    width: auto;
    gap: 0;
    border: 0 !important;
    border-radius: 999px;
    background: none !important;
    box-shadow: none !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.myb-app .page-header .nav-profile .myb-appbar-name {
    display: block;
    max-width: 96px;
    margin-left: 8px;
    overflow: hidden;
    color: #0f172a;
    font-size: 0.92rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: max-width 0.25s ease, margin 0.25s ease, opacity 0.2s ease;
}

.myb-app.myb-appbar-scrolled .page-header .nav-profile .myb-appbar-name {
    max-width: 0;
    margin-left: 0;
    opacity: 0;
}

.myb-app .page-header .nav-profile .dropdown-toggle > span,
.myb-app .page-header .nav-profile .dropdown-icon,
.myb-app .page-header .nav-profile .dropdown-toggle::after {
    display: none;
}

.myb-app .page-header .nav-profile img {
    flex: 0 0 auto;
    width: 36px !important;
    height: 36px !important;
    margin: 0 !important;
    border: 2px solid #fff !important;
    border-radius: 50% !important;
    object-fit: cover;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.15);
}

.myb-app .page-header .navbar-nav form > div[style] {
    padding: 0 !important;
    border: 0 !important;
}

/* Titolo tra i pulsanti (non sopra): compare quando quello grande esce dallo schermo */
.myb-app .myb-appbar-title {
    display: block;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    color: #0f172a;
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.myb-app.myb-appbar-scrolled .myb-appbar-title {
    opacity: 1;
    transform: none;
}

.myb-app .page-content {
    margin-top: calc(56px + env(safe-area-inset-top)) !important;
}

/* Menu → drawer laterale con sfondo oscurato (apertura/chiusura restano in connect.js) */
.myb-app .page-sidebar {
    width: min(86vw, 340px) !important;
    margin: 0 !important;
    padding: calc(16px + env(safe-area-inset-top)) 12px calc(16px + env(safe-area-inset-bottom)) !important;
    border-radius: 0 24px 24px 0 !important;
    visibility: visible;
    opacity: 1;
    z-index: 1050;
    transform: translateX(-105%) !important;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
    box-shadow: 0 0 40px rgba(15, 23, 42, 0.3);
}

.myb-app .small-screen-sidebar-active .page-sidebar {
    transform: none !important;
}

.myb-app body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 1045;
    background: rgba(15, 23, 42, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.myb-app body.small-screen-sidebar-active::after {
    opacity: 1;
    pointer-events: auto;
}

.myb-app body.small-screen-sidebar-active .myb-tabbar {
    visibility: hidden;
}

.myb-app .page-sidebar .slimScrollBar,
.myb-app .page-sidebar .slimScrollRail {
    display: none !important;
}

/* Logo → Home a sinistra nell'app bar */
.myb-appbar-home {
    display: none;
}

.myb-app .myb-appbar-home {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
}

.myb-app .myb-appbar-home img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Indietro: fuori dalla Home prende il posto del logo */
.myb-appbar-back {
    display: none;
}

.myb-app.myb-has-back .myb-appbar-back {
    color: var(--secondary);
}

.myb-app.myb-has-back .myb-appbar-back i {
    font-size: 18px;
    margin-left: -2px;
}

.myb-app.myb-has-back .myb-appbar-home {
    display: none;
}

/* Tastiera aperta: la bottom bar esce dallo schermo */
.myb-tabbar__bar {
    transition: transform 0.25s ease, opacity 0.2s ease;
}

.myb-typing .myb-tabbar__bar {
    transform: translateY(140%);
    opacity: 0;
    pointer-events: none;
}

/* Altezza compatta (telefono in orizzontale; iPhone Duo in orizzontale: esterno 594×368, interno 951×585): la barra
   passa sul lato sinistro, come le barre di sistema su iPhone Duo (HIG "Vertical controls"), e lascia l'altezza al
   contenuto. Stesse voci, stesso ordine dall'alto; header e pagina partono dopo la barra. DESIGN.md §31 */
@media (orientation: landscape) and (max-height: 640px) {
    html.myb-app {
        --side-w: calc(86px + env(safe-area-inset-left));
        /* le cose che stanno sopra la barra (barra della scheda, foglio di lancio) scendono a 12px dal fondo: 22 - 10 */
        --tabbar-h: -10px;
    }
    .myb-app .myb-tabbar { top: 0; right: auto; width: var(--side-w); padding: calc(10px + env(safe-area-inset-top)) 0 calc(10px + env(safe-area-inset-bottom)) calc(12px + env(safe-area-inset-left)); align-items: center; }
    .myb-app .myb-tabbar__bar { --tabbar-h: auto; flex: 0 1 auto; flex-direction: column; width: 64px; max-width: none; max-height: 100%; margin: 0; }
    .myb-app .myb-tabbar__item { flex: 0 1 52px; min-height: 44px; }
    .myb-app .myb-tabbar__center { flex: 0 1 64px; min-height: 58px; }
    .myb-app .myb-tabbar__indicator { top: 0; bottom: auto; left: 6px; width: auto; right: 6px; height: 52px; margin: -26px 0 0; translate: 0 var(--x, 0); }
    .myb-app .myb-tabbar__indicator.is-moving { animation-name: myb-liquid-v; }
    .myb-typing .myb-tabbar__bar { transform: translateX(-140%); }
    .myb-app .page-header { left: var(--side-w); right: env(safe-area-inset-right); width: auto; }
    .myb-app .page-container { padding-left: var(--side-w) !important; padding-right: env(safe-area-inset-right) !important; }
    .myb-app .page-footer { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
    .myb-app .c3-bar { left: calc(var(--side-w) + 12px); }
    .myb-app .bk-bar { bottom: calc(12px + env(safe-area-inset-bottom, 0px)); left: calc(var(--side-w) + 12px); }
    html.myb-app .db3-editbar { bottom: calc(16px + env(safe-area-inset-bottom)); }
}

/* Elenchi v3 in orizzontale con poca altezza: titolo piccolo, filtri rapidi su una riga che scorre di lato con "Nuovo…"
   accanto, ricerca più bassa; in Richieste "Nuova Richiesta" sale nella riga del titolo. La prima riga passa da ~390px a
   ~210px dall'alto. Solo qui: il telefono in verticale resta com'è. DESIGN.md §31 */
@media (orientation: landscape) and (max-height: 640px) {
    .myb-app .slim-pageheader { margin-bottom: 0; padding: 4px 0; }
    .myb-app .slim-pagetitle { margin-top: 0; font-size: 1.15rem !important; letter-spacing: -0.3px !important; }
    .myb-app .quick-views-bar-v3 { flex-wrap: nowrap !important; margin-bottom: 8px !important; }
    .myb-app .quick-views-pills-v3 { flex: 1 1 auto; flex-wrap: nowrap !important; min-width: 0; margin: -4px 0; padding: 4px 24px 4px 0; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
    .myb-app .quick-views-pills-v3::-webkit-scrollbar { display: none; }
    .myb-app .quick-views-pills-v3 > * { flex: 0 0 auto; }
    .myb-app .quick-views-create-v3 { flex: 0 0 auto; }
    .myb-app .spotlight-search-container { padding: 2px 6px 2px 16px; }
    .myb-app .spotlight-input { padding-top: 7px; padding-bottom: 7px; }
    .myb-app .acc-results-bar-v3 { margin-bottom: 8px !important; }
    .myb-app .main-wrapper { position: relative; }
    .myb-app .main-wrapper .col-md-12:has(> .btn-nuova-richiesta-v3) { position: absolute; z-index: 2; top: -42px; right: 0; width: auto; margin: 0 !important; }
    .myb-app .btn-nuova-richiesta-v3, .myb-app .btn-create-v3 { padding: 8px 16px; font-size: 0.86rem; }
    .myb-app .btn-import-v3 { width: 36px; height: 36px; }
}
@keyframes myb-liquid-v {
    0% { scale: 1 1; }
    35% { scale: 0.86 1.35; }
    70% { scale: 1.05 0.94; }
    100% { scale: 1 1; }
}

/* ── Elenco e scheda affiancati (MYB.SplitView.js, DESIGN.md §31c) ──
   Con almeno 820px liberi il record si apre a destra: ogni colonna ha la sua barra (l'header resta sull'elenco, il
   riquadro ha Chiudi · titolo · pagina intera), la riga aperta resta evidenziata. Più stretto (girando o piegando) il
   riquadro copre l'elenco con Indietro, senza ricaricarsi. A libro (Viewport Segments API, sperimentale) la
   divisione cade sulla piega: l'elenco finisce dove finisce il primo segmento, il riquadro parte dal secondo. */
.myb-split { display: none; }
html.myb-split-on { --split-w: clamp(440px, 56vw, 780px); --split-list-end: var(--split-w); }
@media (horizontal-viewport-segments: 2) {
    html.myb-split-on { --split-w: calc(100vw - env(viewport-segment-left 1 0)); --split-list-end: calc(100vw - env(viewport-segment-right 0 0)); }
}
html.myb-split-on .myb-split { position: fixed; z-index: 1036; top: 0; right: 0; bottom: 0; display: flex; flex-direction: column; width: var(--split-w); padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 0; border-left: 1px solid rgba(15, 23, 42, 0.08); background: #f4f6fb; box-shadow: -14px 0 34px -22px rgba(15, 23, 42, 0.3); }
html.myb-split-on:not(.myb-split-narrow) .page-container { padding-right: var(--split-list-end) !important; }
html.myb-split-on:not(.myb-split-narrow) .page-header { right: var(--split-list-end); width: auto; }
html.myb-split-on:not(.myb-split-narrow) .myb-tabbar { right: var(--split-list-end); }
html.myb-split-on.myb-split-narrow .myb-split { left: 0; z-index: 1042; width: auto; padding-left: env(safe-area-inset-left); border-left: 0; box-shadow: none; }
/* A laptop (piega orizzontale: iPhone Duo interno in verticale) la scheda sta sopra la piega, l'elenco sotto con il suo
   header: sulla metà appoggiata restano elenco e barra, e la tastiera apre sotto la scheda. scroll-padding: la riga
   aperta torna visibile sotto la piega (open() in MYB.SplitView.js) */
@media (vertical-viewport-segments: 2) {
    html.myb-split-on { --split-list-end: 0px; scroll-padding-top: calc(56px + env(viewport-segment-top 0 1)); }
    html.myb-split-on .myb-split { left: 0; bottom: auto; width: auto; height: env(viewport-segment-height 0 0); padding-left: env(safe-area-inset-left); border-left: 0; box-shadow: none; }
    html.myb-split-on .page-header { top: env(viewport-segment-top 0 1); padding-top: 0; }
    html.myb-split-on .page-content { margin-top: calc(56px + env(viewport-segment-top 0 1)) !important; }
}
.myb-split__bar { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 10px; }
.myb-split__btn { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; height: 44px; padding: 0 12px; border: 0; border-radius: 999px; background: #ffffff; color: #334155; font-size: 0.86rem; font-weight: 700; box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08); }
.myb-split__btn:focus-visible { outline: 2px solid var(--secondary); outline-offset: 2px; }
.myb-split__btn .fa-chevron-left, .myb-split__btn span, .myb-split-narrow .myb-split__btn .fa-xmark { display: none; }
.myb-split-narrow .myb-split__btn .fa-chevron-left, .myb-split-narrow .myb-split__btn span { display: inline; }
.myb-split__title { flex: 1 1 auto; min-width: 0; overflow: hidden; font-size: 0.92rem; text-align: center; white-space: nowrap; text-overflow: ellipsis; color: #1e293b; opacity: 0; transition: opacity 0.2s ease; }
.myb-split__bar.is-scrolled .myb-split__title { opacity: 1; }
.myb-split__frame { flex: 1 1 auto; width: 100%; border: 0; background: transparent; }
.acc-item-v3.is-split-current { outline: 2px solid var(--primary, #582679); outline-offset: -2px; }
/* La pagina dentro il riquadro: niente guscio (header, barra, menu), le barre della scheda scendono in fondo */
html.myb-pane .page-header, html.myb-pane .myb-tabbar, html.myb-pane .page-sidebar, html.myb-pane .myb-rail, html.myb-pane .myb-ctx, html.myb-pane #myb-voice-fab { display: none !important; }
html.myb-app.myb-pane { --side-w: 0px; --tabbar-h: -10px; }
html.myb-app.myb-pane .page-content { margin-top: 0 !important; }
html.myb-pane .page-container { margin-left: 0 !important; padding-left: 0 !important; }
html.myb-pane .c3-kind-back { display: none; } /* "Torna alle richieste": nel riquadro si chiude con Chiudi / Indietro */
html.myb-app.myb-pane .page-footer { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }

/* Banner offline sotto l'app bar */
.myb-offline {
    display: none;
}

.myb-app.myb-is-offline .myb-offline {
    display: block;
    position: fixed;
    top: calc(56px + env(safe-area-inset-top));
    left: 12px;
    right: 12px;
    z-index: 1035;
    padding: 8px 14px;
    border-radius: 12px;
    background: #1e293b;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
}

/* Trascina per aggiornare */
.myb-ptr {
    position: fixed;
    top: calc(20px + env(safe-area-inset-top));
    left: 50%;
    z-index: 1036;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-left: -20px;
    border-radius: 50%;
    background: #fff;
    color: #94a3b8;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
    opacity: 0;
    pointer-events: none;
}

.myb-ptr.is-ready {
    color: var(--secondary);
}

.myb-ptr.is-loading i {
    animation: myb-spin 0.8s linear infinite;
}

@keyframes myb-spin {
    to { transform: rotate(360deg); }
}

/* Swipe indietro dal bordo (iPhone, app installata) */
.myb-edge-back {
    position: fixed;
    top: 50%;
    left: -44px;
    z-index: 1036;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-top: -22px;
    border-radius: 50%;
    background: #fff;
    color: #94a3b8;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
    pointer-events: none;
}

.myb-edge-back.is-ready {
    background: var(--secondary);
    color: #fff;
}

/* Header e barra restano fermi durante il cambio pagina; niente selezione/menu al tocco prolungato */
.myb-app .page-header {
    view-transition-name: myb-appbar;
}

.myb-app .page-header,
.myb-app .myb-tabbar {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* Feedback al tap su un link: barra di avanzamento sotto l'header */
.myb-app .page-header::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 100%;
    height: 2px;
    background: var(--secondary);
    transform: scaleX(0);
    transform-origin: left;
    opacity: 0;
    pointer-events: none;
}

.myb-app.myb-navigating .page-header::after {
    opacity: 1;
    animation: myb-progress 3s cubic-bezier(0.1, 0.7, 0.3, 1) forwards;
}

@keyframes myb-progress {
    from { transform: scaleX(0); }
    to { transform: scaleX(0.9); }
}

/* Cambio pagina "push" come su iOS; indietro = animazione inversa */
.myb-app::view-transition-old(root) {
    animation: myb-push-out 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.myb-app::view-transition-new(root) {
    animation: myb-push-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

html.myb-app:active-view-transition-type(back)::view-transition-old(root) {
    animation-name: myb-pop-out;
}

html.myb-app:active-view-transition-type(back)::view-transition-new(root) {
    animation-name: myb-pop-in;
}

@keyframes myb-push-in { from { transform: translateX(35%); opacity: 0; } }
@keyframes myb-push-out { to { transform: translateX(-12%); opacity: 0; } }
@keyframes myb-pop-in { from { transform: translateX(-12%); opacity: 0; } }
@keyframes myb-pop-out { to { transform: translateX(35%); opacity: 0; } }

/* Tutte le modali diventano bottom sheet */
.myb-app .modal-dialog {
    position: fixed !important;
    top: auto !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    display: flex;
    flex-direction: column;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: calc(100% - 24px - env(safe-area-inset-top));
    margin: 0 !important;
    box-shadow: none !important;
    transform: translateY(100%) !important;
    transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}

.myb-app .modal.show .modal-dialog {
    transform: none !important;
}

/* Bootstrap centra .modal-dialog-centered con uno pseudo-elemento alto quanto lo schermo:
   nel sheet (colonna flex) ruberebbe spazio al contenuto */
.myb-app .modal-dialog::before {
    display: none !important;
}

.myb-app .modal-content {
    min-height: 0 !important;
    max-height: 100%;
    overflow-y: auto;
    padding-bottom: env(safe-area-inset-bottom);
    border: 0;
    border-radius: 20px 20px 0 0 !important;
    box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.18);
}

html.myb-app .modal.fade > .modal-dialog > .modal-content,
html.myb-app #remoteModal.modal > .modal-dialog > .modal-content,
html.myb-app #remoteSideModal.modal > .modal-dialog > .modal-content {
    max-height: 100%;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    border-radius: 20px 20px 0 0 !important;
}

.myb-app .modal-content::before {
    content: '';
    flex-shrink: 0;
    width: 36px;
    height: 5px;
    margin: 8px auto 0;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.15);
}

.myb-app .modal-backdrop.show {
    opacity: 0.4;
}

/* Toast in alto al centro, sotto l'app bar */
.myb-app #toast-container {
    top: calc(60px + env(safe-area-inset-top)) !important;
    right: 12px !important;
    left: 12px !important;
}

.myb-app #toast-container > div {
    width: 100% !important;
    border-radius: 14px;
    opacity: 1;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
}

.myb-app .dark-theme .page-header {
    background: rgba(39, 43, 51, 0.85);
}
.myb-app .dark-theme .myb-appbar-title { color: #e2e8f0; }

/* Action sheet delle scorciatoie */
.myb-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1060;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(15, 23, 42, 0.35);
    animation: myb-fade-in 0.2s ease;
}

.myb-sheet {
    width: 100%;
    max-width: 480px;
    padding: 8px 12px calc(16px + env(safe-area-inset-bottom));
    border-radius: 20px 20px 0 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.18);
    animation: myb-sheet-up 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    /* Menu lunghi: il foglio scorre; position per il popover delle statistiche */
    position: relative;
    max-height: calc(100% - 24px - env(safe-area-inset-top));
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* A laptop (piega orizzontale) fogli e modali restano sulla metà appoggiata, senza passare sopra la piega. DESIGN.md §31c */
@media (vertical-viewport-segments: 2) {
    .myb-app .modal-dialog, .myb-sheet { max-height: env(viewport-segment-height 0 1); }
}

.myb-sheet__handle {
    width: 36px;
    height: 5px;
    margin: 0 auto 32px; /* riga della X di chiusura */
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.15);
}

.myb-sheet__action {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 52px;
    padding: 0 14px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #1e293b;
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    transition: background 0.15s ease;
}

.myb-sheet__action i {
    width: 22px;
    color: var(--secondary);
    font-size: 18px;
    text-align: center;
}

.myb-sheet__action:hover,
.myb-sheet__action:focus-visible {
    background: rgba(0, 0, 0, 0.04);
    outline: none;
}

/* Chiusura: X in alto a destra (o trascinando giu' il foglio) */
.myb-sheet__close {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.06);
    color: #475569;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease, transform 0.15s ease;
}

.myb-sheet__close i {
    font-size: 20px;
}

.myb-sheet__close:active {
    transform: scale(0.9);
    background: rgba(15, 23, 42, 0.1);
}

.myb-sheet__close:focus {
    outline: none;
}

.myb-sheet__close:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
}

.myb-sheet-backdrop.is-closing {
    opacity: 0;
    transition: opacity 0.25s ease;
}

.myb-sheet-backdrop.is-closing .myb-sheet {
    pointer-events: none;
}

@keyframes myb-sheet-up {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes myb-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.dark-theme .myb-sheet {
    background: rgba(39, 43, 51, 0.9);
    border-color: rgba(255, 255, 255, 0.06);
}
.dark-theme .myb-sheet__action { color: #e2e8f0; }

/* ── Scheletri di caricamento delle tabelle DataTables (pacchetto app in beta) ──
   Primo caricamento (tabella vuota): blocchi grigi animati; ricarica (filtri, pagina): dati
   vecchi attenuati finche' arrivano i nuovi */
.myb-shell .myb-dt-loading {
    position: relative;
}

.myb-shell .myb-dt-loading tbody {
    opacity: 0.45;
    transition: opacity 0.2s ease;
}

.myb-shell .myb-dt-loading:has(td.dataTables_empty) {
    min-height: 300px;
}

.myb-shell .myb-dt-loading:has(td.dataTables_empty) tbody {
    visibility: hidden;
}

.myb-shell .myb-dt-loading:has(td.dataTables_empty)::after {
    content: '';
    display: block; /* il ::after del wrapper e' anche il clearfix (display: table) */
    position: absolute;
    inset: 12px 0 0;
    z-index: 5;
    border-radius: 16px;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.75) 50%, rgba(255, 255, 255, 0) 100%) no-repeat,
        repeating-linear-gradient(to bottom, #e9edf3 0 72px, transparent 72px 86px);
    background-size: 40% 100%, 100% 100%;
    animation: myb-shimmer 1.2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes myb-shimmer {
    from { background-position: -60% 0, 0 0; }
    to { background-position: 160% 0, 0 0; }
}

/* Pulsante di un form in invio: rotellina e niente secondo tocco */
.myb-shell .myb-busy {
    opacity: 0.75;
    pointer-events: none;
}

.myb-shell button.myb-busy::before {
    content: '';
    display: inline-block;
    width: 1em;
    height: 1em;
    margin-right: 0.5em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    vertical-align: -0.15em;
    animation: myb-spin 0.7s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
    .myb-shell .myb-dt-loading::after { animation: none; }
}

/* ── Transizioni tra pagine (View Transitions cross-document) ──
   Chrome/Edge 126+, Safari 18.2+; gli altri browser navigano come prima.
   L'attivazione (@view-transition) e' inline nel <head> solo per chi ha il pacchetto "app"
   in beta (Page::GetMeta): qui solo l'aspetto. */
::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0.2s;
}

/* Navigazione con transizione: la vecchia pagina resta a schermo finché la
   nuova è pronta, quindi il loader a tutto schermo non serve */
html.myb-vt .loader {
    display: none;
}

@media (max-width: 768px) {
    .modal-dialog.modal-bottom {
        position: fixed;
        bottom: 0;
        margin: 0;
        width: 100%;
        height: 90%;
        max-width: 100%;
    }
}

#notifContent .notif-item {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    transition: background 0.3s;
    max-height: 9em;
    overflow-y: hidden;
}

#notifContent .notif-item:hover {
    background-color: #f9f9f9;
}

#notifContent .notif-unread {
    background-color: #f1f3f5;
    font-weight: 600;
}



.notif-android-style {
    margin: 0;
    padding: 0;
    transform: translateY(-100%);
    transition: transform 0.3s ease-out;
}

.modal.show .notif-android-style {
    transform: translateY(0);
}


#notifBadge {
    position: relative;
    top: -5px;
    left: 25px;
    background-color: #DF3A3A;
    color: white;
    font-size: 11px;
    font-weight: 600;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    display: block;
    box-shadow: 0 0 0 2px white;
    /* bordo chiaro come su Android/iOS */
}





.navbar-search {
    min-width: 15em;
    background: white;
    /* box-shadow: 0 8px 32px rgba(124,58,237,0.25), 0 18px 40px -10px var(--claila-border-gradient); */
    position: relative;
}

/* Il campo di ricerca ospita anche l'assistente: il testo apre la ricerca, il
   microfono apre la stessa superficie in modo conversazione. Sono due azioni
   nello stesso contenitore, non due controlli separati in giro per la barra. */
.myb-search-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 6px !important;
}

.myb-search-pill-text {
    flex: 1;
    min-width: 0;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.myb-search-pill-text:hover {
    color: inherit;
    text-decoration: none;
}

.myb-search-pill-mic {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, var(--myb-cyan, #037ef3), var(--myb-purple, #c52a92));
    box-shadow: 0 2px 8px rgba(197, 42, 146, .28);
    transition: transform .15s ease, box-shadow .15s ease;
}

.myb-search-pill-mic:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 14px rgba(197, 42, 146, .4);
}

.myb-search-pill-mic .material-icons-outlined {
    font-size: 17px;
}

.navbar-search::after {
    content: "";
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100%;
    border-radius: 12px;
    z-index: -1;
    background: var(--claila-border-gradient);
    opacity: 0.45;
    filter: blur(18px);
    pointer-events: none;
}


span.fc-weekday {
    font-size: 0.6em;
}



.profile-name h3 {
    color: #000;
}

.section-card-title {
    color: #5a638a !important;
    font-size: 14px;
    text-transform: uppercase;
    font-weight: bold
}

/* ═══════════════════════════════════════════════════════════════════════
   RICERCA UNIVERSALE + ASSISTENTE
   Una superficie sola per due gesti: trovare un record e chiedere qualcosa.

   Direzione: strumento professionale, non applicazione di consumo. Chi la
   apre ha il telefono che squilla e dodici schede aperte, quindi la gerarchia
   deve leggersi in mezzo secondo e niente deve gridare.

   - profondita': ombre a strati, MAI bordi marcati. I bordi restano ai
     divisori e ai campi, dove servono a delimitare e non a decorare.
   - colore: il gradiente Klaila e' l'AI, e basta. Su tutto il resto sarebbe
     decorazione, e il colore qui deve voler dire qualcosa.
   - tipografia: tre leve insieme (corpo, peso, opacita'), scala 1.25 da 13px.
   - raggi concentrici: riga 10 + 8 di padding = contenitore 18.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
    /* Colori di stato delle richieste (e di ogni lavorazione): uno per significato, riusati ovunque.
       nuova/da gestire = arancione (urgenza, cosa da fare) · in sospeso/esito mancante = ambra ·
       follow up/in attesa = azzurro · andata bene = verde · persa/scartata = rosso */
    --st-new: #f97316;     --st-new-dark: #c2410c;     --st-new-soft: #ffedd5;     --st-new-ink: #9a3412;
    --st-pending: #f59e0b; --st-pending-dark: #d97706; --st-pending-soft: #fef3c7; --st-pending-ink: #92400e;
    --st-follow: #0ea5e9;  --st-follow-dark: #0369a1;  --st-follow-soft: #e0f2fe;  --st-follow-ink: #075985;
    --st-ok: #16a34a;      --st-ok-dark: #15803d;      --st-ok-soft: #dcfce7;      --st-ok-ink: #14532d;
    --st-lost: #dc2626;    --st-lost-dark: #b91c1c;    --st-lost-soft: #fee2e2;    --st-lost-ink: #7f1d1d;
    --myb-cyan: #037ef3;
    --myb-purple: #c52a92;
    --myb-orange: #e4803c;
    --claila-border-gradient: linear-gradient(90deg, var(--myb-cyan) 0%, var(--myb-purple) 50%, var(--myb-orange) 100%);
}


.klaila-ai-box {
    margin: 16px 0;
    background: #ffffff;
    border-radius: 12px;
    padding: 12px 16px;
    color: #424761;
    text-align: center;
    font-weight: 500;
    border: 2px solid transparent;
    background-image: linear-gradient(#fff, #fff),
        linear-gradient(90deg, #037ef3 0%, #c52a92 50%, #e4803c 100%);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow: 0 0 8px rgba(3, 126, 243, 0.25),
        0 0 12px rgba(197, 42, 146, 0.2),
        0 0 16px rgba(228, 128, 60, 0.15);
}


.klaila-ai-box-border {

    border: 1px solid transparent !important;
    background-image: linear-gradient(#fff, #fff),
        linear-gradient(90deg, #037ef3 0%, #c52a92 50%, #e4803c 100%);
    background-origin: border-box;
    background-clip: padding-box, border-box;

}


.stat-pill {
    background: linear-gradient(135deg, #f7f9fc, #f1f5f9);
    border: 1px solid #e8edf3;
    border-radius: 12px;
    padding: 12px 16px;
    height: 100%;
}

.stat-pill .h3 {
    font-weight: 700;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 12px;
    font-weight: 600;
}

.tag-chip i {
    font-size: 12px;
    margin-right: 6px;
}

.automation-row:hover {
    background: #f8fafc;
    transition: background .2s ease;
}

.sequence-card {
    border: 1px solid #e8edf3;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8fbff, #eef5ff);
    padding: 16px;
    height: 100%;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
}

.pill-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.timeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #22c55e;
    margin-right: 8px;
    display: inline-block;
}

.small-label {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 11px;
    color: #6b7280;
    font-weight: 700;
}


textarea.textarea-rounded {
    border-radius: 8px !important;
    border: 2px solid rgb(224, 224, 224) !important;
    padding: 12px 15px !important;
    font-size: 14px !important;
    resize: vertical !important;
    transition: 0.3s !important;
    box-shadow: rgba(0, 0, 0, 0.05) 0px 2px 4px !important;
    background-image: none !important;
}

textarea.textarea-rounded:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3) !important;
    outline: none !important;
}

/* Custom File Upload Styles */
.custom-file-upload {
    position: relative;
}

.file-input-hidden {
    display: none;
}

.file-upload-label {
    display: block;
    cursor: pointer;
    margin: 0;
}

.file-upload-design {
    border: 2px dashed var(--primary);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    background: linear-gradient(135deg, #edf0ff 0%, #ffffff 100%);
    transition: all 0.3s ease;
    color: var(--primary);
}

.file-upload-label:hover .file-upload-design {
    border-color: #0056b3;
    background: linear-gradient(135deg, #e8f0ff 0%, #d8e8ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);

}

.file-upload-label.drag-over .file-upload-design {
    border-color: #28a745;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    transform: scale(1.02);
}

.file-item {
    background: #f8f9fa;
    transition: background 0.2s ease;
}

.file-item:hover {
    background: #e9ecef;
}



/* ========================================
   FILE CARD PREMIUM - Modern & Elegant
   Inspired by Dropbox
   ======================================== */

.file-card-premium {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    gap: 1rem;
}

.file-card-premium:hover {
    background: #f8f9fa;
    border-color: #dadce0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.file-card-icon-premium {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.file-card-premium:hover .file-card-icon-premium {
    transform: scale(1.05);
}

.file-card-content-premium {
    flex: 1;
    min-width: 0;
}

.file-card-header-premium {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.375rem;
}

.file-card-name-premium {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #202124;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.file-card-header-premium .badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    flex-shrink: 0;
}

.file-card-meta-premium {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #5f6368;
}

.file-card-meta-premium i {
    font-size: 0.75rem;
    margin-right: 0.25rem;
    opacity: 0.7;
}

.file-card-meta-premium .meta-separator {
    color: #dadce0;
    font-weight: 300;
}

.file-card-actions-premium {
    display: flex;
    gap: 0.375rem;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.file-card-premium:hover .file-card-actions-premium {
    opacity: 1;
}

.file-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #5f6368;
    transition: all 0.15s ease;
    text-decoration: none;
}

.file-action-btn:hover {
    background: #e8eaed;
    color: #202124;
    text-decoration: none;
}

.file-action-btn i {
    font-size: 0.875rem;
}

.file-card-actions-premium .btn-danger {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-card-actions-premium .btn-danger:hover {
    background: #fce8e6;
    border-color: #fce8e6;
    color: #d93025;
}

/* Responsive */
@media (max-width: 768px) {
    .file-card-premium {
        padding: 0.875rem 1rem;
        gap: 0.75rem;
    }

    .file-card-icon-premium {
        width: 48px;
        height: 48px;
    }

    .file-card-icon-premium i {
        font-size: 1.5rem !important;
    }

    .file-card-name-premium {
        font-size: 0.875rem;
    }

    .file-card-meta-premium {
        font-size: 0.75rem;
        flex-wrap: wrap;
    }

    .file-card-actions-premium {
        opacity: 1;
    }
}

/* Animation on load */
@keyframes slideInFile {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.file-card-premium {
    animation: slideInFile 0.3s ease-out backwards;
}

.file-card-premium:nth-child(1) {
    animation-delay: 0.05s;
}

.file-card-premium:nth-child(2) {
    animation-delay: 0.1s;
}

.file-card-premium:nth-child(3) {
    animation-delay: 0.15s;
}

.file-card-premium:nth-child(4) {
    animation-delay: 0.2s;
}

.file-card-premium:nth-child(5) {
    animation-delay: 0.25s;
}

/* ========================================
   NEW TICKET BUTTON - Prominent & Modern
   ======================================== */

.new-ticket-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    font-weight: 600;
    padding: 0.75rem 2rem;
    transition: all 0.3s ease;
}

.new-ticket-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    transform: translateY(-2px);
}

.new-ticket-btn:active {
    transform: translateY(0);
}

/* ========================================
   TICKET MODAL - Modern & Clean Design
   ======================================== */

.ticket-modal-modern {
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.ticket-modal-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #e0e0e0;
    border-radius: 16px 16px 0 0;
    padding: 1.5rem 2rem;
}

.ticket-modal-header .modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #202124;
}

.ticket-modal-header small {
    color: #5f6368;
    font-size: 0.875rem;
}

.ticket-modal-body {
    padding: 2rem;
    background: #ffffff;
}

.ticket-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.ticket-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.ticket-section-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #202124;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
}

.ticket-section-title i {
    color: #667eea;
    font-size: 1rem;
}

.form-label-modern {
    font-size: 0.875rem;
    font-weight: 600;
    color: #3c4043;
    margin-bottom: 0.5rem;
}

.form-control-modern {
    border: 2px solid #e8eaed;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

.form-control-modern:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control-modern::placeholder {
    color: #9aa0a6;
}

.ticket-modal-footer {
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    border-radius: 0 0 16px 16px;
    padding: 1.25rem 2rem;
}

.btn-create-ticket {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 0.625rem 1.75rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-create-ticket:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
    .ticket-modal-body {
        padding: 1.5rem;
    }

    .ticket-section {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }

    .new-ticket-btn {
        padding: 0.625rem 1.5rem;
        font-size: 0.9375rem;
    }
}


/* ========================================
   GLOBAL BOOTSTRAP 4 THEME OVERRIDE
   Modern & Consistent Design System
   ======================================== */

/* === MODALS === */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #e0e0e0;
    border-radius: 12px 12px 0 0;
    padding: 1.25rem 1.5rem;
}

.modal-title {
    font-weight: 600;
    color: #202124;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    border-radius: 0 0 12px 12px;
    padding: 1rem 1.5rem;
}

/* === CARDS === */
.card {
    border: 1px solid #e8eaed;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.card-header {
    background: #ffffff;
    border-bottom: 1px solid #e8eaed;
    border-radius: 10px 10px 0 0;
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: #202124;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    background: #f8f9fa;
    border-top: 1px solid #e8eaed;
    border-radius: 0 0 10px 10px;
    padding: 1rem 1.25rem;
}

/* === BUTTONS === */
.btn {

    transition: all 0.2s ease;

}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}


/* === FORM CONTROLS === */
.form-control {

    border-radius: 6px;
    padding: 0.625rem 0.875rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control::placeholder {
    color: #9aa0a6;
}

label {
    font-weight: 500;
    color: #3c4043;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

/* === BADGES === */
.badge {
    border-radius: 4px;
    padding: 0.35em 0.65em;
    font-weight: 600;
    font-size: 0.8125rem;
}

.badge-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* === TABLES === */
.table {
    border-radius: 8px;
    width: 100%;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

.table thead th {
    background: #f8f9fa;
    border-bottom: 2px solid #e8eaed;
    font-weight: 600;
    color: #3c4043;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.875rem;
    white-space: nowrap;
}

.table tbody tr {
    transition: background-color 0.15s ease;
}

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

.table td {
    padding: 0.875rem;
    vertical-align: middle;
}



/* === ALERTS === */
.alert {
    border: none;
    border-radius: 8px;
    padding: 1rem 1.25rem;

}

.alert-primary {
    background: #e8eeff;
    border-left-color: #667eea;
    color: #3c4043;
}

.alert-success {
    background: #e6f7ed;
    border-left-color: #28a745;
    color: #3c4043;
}

.alert-danger {
    background: #ffe6e6;
    border-left-color: #dc3545;
    color: #3c4043;
}

.alert-warning {
    background: #fff8e6;
    border-left-color: #ffc107;
    color: #3c4043;
}

/* === DROPDOWNS === */
.dropdown-menu {
    border: 1px solid #e8eaed;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: 4px;
    padding: 0.5rem 0.875rem;
    transition: all 0.15s ease;
    font-weight: 500;
}

.dropdown-item:hover {
    background: #f8f9fa;
    color: #667eea;
}

/* === PAGINATION === */
.pagination .page-link {
    border-radius: 6px;
    margin: 0 0.25rem;
    border: 1px solid #e8eaed;
    padding: 0.5rem 0.875rem;
    color: #5f6368;
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background: #667eea;
    border-color: #667eea;
    color: #fff;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

/* === BREADCRUMB === */
.breadcrumb {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 0.75rem 1rem;
}

.breadcrumb-item.active {
    color: #667eea;
    font-weight: 600;
}

/* === LIST GROUP === */
.list-group-item {
    border: 1px solid #e8eaed;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    padding: 0.875rem 1.125rem;
    transition: all 0.2s ease;
}

.list-group-item:hover {
    background: #f8f9fa;
    transform: translateX(4px);
}

.list-group-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

/* === PROGRESS === */
.progress {
    border-radius: 8px;
    height: 1rem;
    background: #e8eaed;
}

.progress-bar {
    border-radius: 8px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

/* Reduce spacing for consistency */
.modal-body .form-group {
    margin-bottom: 1rem;
}

.ticket-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
}


#pbxtable .btn {
    padding: 0.5em 1em;
}

/* --- Corporate Wiki System --- */

.wiki-page-body {
    background: radial-gradient(circle at 0% 0%, #f1f4ff 0%, #fdfdfe 100%) !important;
    min-height: 100vh;
}

.wiki-breadcrumbs {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: clamp(24px, 5vw, 40px);
    padding: 12px 28px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px) saturate(180%);
    border-radius: 100px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
}

.wiki-breadcrumbs a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wiki-breadcrumbs a:hover {
    color: var(--primary);
    transform: translateY(-1px);
}

.wiki-breadcrumbs i {
    font-size: 1.3rem;
}

.wiki-breadcrumbs span.separator {
    color: #e2e8f0 !important;
    font-weight: 200 !important;
    font-size: 1.4rem !important;
}

.wiki-breadcrumbs span.current-page {
    color: #6c757d;
    font-weight: 600;
}

.wiki-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: clamp(40px, 6vw, 75px) 24px;
    border-radius: 40px;
    margin-bottom: clamp(30px, 5vw, 60px);
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.1);
    animation: wikiHeroAppear 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes wikiHeroAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wiki-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: wikiRotate 40s linear infinite;
}

.wiki-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 30%, rgba(100, 116, 139, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(54, 70, 201, 0.3) 0%, transparent 50%);
    filter: blur(40px);
    animation: wikiPulseGradient 15s ease-in-out infinite alternate;
    z-index: 0;
}

@keyframes wikiPulseGradient {
    0% {
        transform: scale(1) translate(0, 0);
    }

    100% {
        transform: scale(1.2) translate(5%, 5%);
    }
}

@keyframes wikiRotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.wiki-hero-content {
    position: relative;
    z-index: 1;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.wiki-hero h1 {
    font-weight: 900;
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    margin-bottom: 20px;
    letter-spacing: -3px;
    line-height: 1.1;
    color: white !important;
}

.wiki-hero p {
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    opacity: 0.85;
    margin-bottom: 40px;
    max-width: 700px;
    margin-inline: auto;
    font-weight: 500;
    color: white !important;
}

.wiki-search-outer {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
}

.wiki-search-inner input {
    width: 100%;
    padding: 20px 32px 20px 72px !important;
    border-radius: 20px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) saturate(180%);
    color: #0f172a !important;
    font-size: clamp(1rem, 1.2vw, 1.2rem) !important;
    box-shadow: 0 15px 35px -12px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.wiki-search-inner input:focus {
    outline: none;
    transform: scale(1.01);
    box-shadow: 0 25px 50px -15px rgba(0, 0, 0, 0.25);
}

.wiki-search-inner i {
    position: absolute;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 28px;
}

.wiki-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px) saturate(180%);
    border-radius: 32px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    overflow: hidden;
}

.wiki-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.wiki-card-header {
    padding: 32px 32px 0 32px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.wiki-card-header i {
    padding: 12px;
    background: rgba(54, 70, 201, 0.08);
    color: var(--primary);
    border-radius: 16px;
    font-size: 1.8rem;
}

.wiki-card-header h3 {
    font-weight: 850;
    font-size: clamp(1.2rem, 1.8vw, 1.5rem);
    margin: 0;
    letter-spacing: -0.5px;
    color: #1e293b;
}

.wiki-card-body {
    padding: 24px 32px 32px 32px;
}

.wiki-premium-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.wiki-premium-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 0.7rem;
    font-weight: 800;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.wiki-premium-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.wiki-premium-table tr:last-child td {
    border-bottom: none;
}

.wiki-premium-table tr:hover td {
    background: rgba(54, 70, 201, 0.08);
}

.wiki-doc-link {
    text-decoration: none;
    color: #1e293b;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.05rem;
}

.wiki-doc-link:hover {
    color: var(--primary);
    transform: translateX(8px);
}

.wiki-doc-header {
    margin-bottom: 40px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
    padding-bottom: 32px !important;
}

.wiki-doc-header h1 {
    font-weight: 900;
    letter-spacing: -2px;
    font-size: clamp(2.2rem, 5vw, 3.2rem) !important;
    line-height: 1.1;
    margin-bottom: 16px;
    color: #0f172a;
}

.wiki-content-wrapper {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px) saturate(180%);
    border-radius: 32px;
    padding: clamp(24px, 4vw, 48px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.wiki-content-mdown {
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.7;
    color: #334155;
}

.wiki-content-mdown h1,
.wiki-content-mdown h2,
.wiki-content-mdown h3 {
    font-weight: 900 !important;
    color: #0f172a !important;
    margin-top: 1.5em !important;
    margin-bottom: 0.6em !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
    padding-bottom: 0.4em !important;
    letter-spacing: -0.5px !important;
}

.wiki-content-mdown mark {
    background: #fef08a !important;
    padding: 0.1em 0.2em !important;
    border-radius: 4px !important;
}

#wiki-toc {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px) saturate(180%);
    border-radius: 24px;
    padding: 24px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
}

#wiki-toc h4 {
    font-weight: 800;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #6c757d;
    margin-bottom: 24px;
}

#wiki-toc .nav-link {
    padding: 12px 16px;
    color: #6c757d;
    font-weight: 600;
    font-size: 0.95rem;
    border-left: 3px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#wiki-toc .nav-link:hover,
#wiki-toc .nav-link.active {
    color: var(--primary) !important;
    border-left-color: var(--primary) !important;
    background: rgba(54, 70, 201, 0.08) !important;
    transform: translateX(5px);
}

.wiki-search-excerpt {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 8px;
    font-style: italic;
}

.wiki-badge-category {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 800;
}

.wiki-pdf-viewer-wrapper {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px) saturate(180%);
    border-radius: 32px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    height: 85vh;
    min-height: 600px;
    display: flex;
    flex-direction: column;
}

.wiki-pdf-viewer-header {
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.5);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

#wiki-pdf-render-area {
    flex-grow: 1;
    width: 100%;
    height: 100%;
    border: none;
}

.wiki-pdf-controls {
    display: flex;
    gap: 12px;
}

.wiki-btn-pdf {
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: white;
    color: #1e293b;
    cursor: pointer;
}

.wiki-btn-pdf:hover {
    background: rgba(54, 70, 201, 0.08);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.wiki-pdf-viewer-wrapper:fullscreen {
    border-radius: 0;
    height: 100vh;
    width: 100vw;
}

.wiki-pdfobject-container {
    height: 100%;
    width: 100%;
}

.wiki-doc-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    align-items: center;
}

.wiki-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: #fff;
    color: #1e293b;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.wiki-meta-item i {
    font-size: 1.1rem;
    color: var(--primary);
}

.wiki-meta-item:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    background: rgba(54, 70, 201, 0.08);
}

/* Media Queries for Mobile PDF Viewer */
@media (max-width: 768px) {
    .wiki-pdf-viewer-header {
        padding: 10px 12px !important;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center !important;
    }

    .wiki-pdf-controls {
        width: 100%;
        justify-content: center;
        gap: 6px !important;
    }

    .wiki-pdf-controls>div {
        margin-right: 0 !important;
    }

    .wiki-pdf-scroll-container {
        padding: 10px 5px !important;
    }
}

/* Security: Prevent text selection on protected content */
.wiki-no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* PDF Canvas Viewer Styles */
.wiki-pdf-scroll-container {
    flex-grow: 1;
    overflow-y: auto;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    gap: 20px;
}

.wiki-pdf-page-canvas {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    background: white;
    max-width: 100%;
    border-radius: 4px;
}

/* Security: Prevent printing */
@media print {
    body * {
        visibility: hidden !important;
    }

    .wiki-pdf-viewer-wrapper,
    .wiki-pdf-viewer-wrapper * {
        display: none !important;
    }
}

/* ============================================================================
   PREMIUM ACTION BUTTONS SYSTEM
   Reusable button styles for consistent UI across the application
   ============================================================================ */

.btn-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    cursor: pointer;
    gap: 8px;
    height: 42px;
    white-space: nowrap;
    text-decoration: none;
}

.btn-action-icon i,
.btn-action-icon .material-icons {
    font-size: 1.1rem;
}

/* Primary Meta Button (WhatsApp/Facebook) */
.btn-action-icon.btn-meta {
    background: linear-gradient(135deg, #0866FF 0%, #0052D4 100%);
    color: white !important;
    box-shadow: 0 4px 12px rgba(8, 102, 255, 0.25);
    border: none;
}

.btn-action-icon.btn-meta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(8, 102, 255, 0.35);
    filter: brightness(1.1);
}

.btn-action-icon.btn-meta-synced {
    background: #f0f7ff;
    border: 1px solid #0866FF;
    color: #0866FF !important;
    cursor: default;
    pointer-events: none;
    box-shadow: none;
}

/* Primary Wiki Button (Purple gradient) */
.btn-action-icon.btn-primary-wiki {
    background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
    color: white !important;
    box-shadow: 0 4px 12px rgba(156, 39, 176, 0.25);
    border: none;
}

.btn-action-icon.btn-primary-wiki:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(156, 39, 176, 0.35);
    filter: brightness(1.1);
}

/* Edit Button */
.btn-action-icon.btn-edit {
    background: #f8f9fa;
    color: #495057;
    border-color: #dee2e6;
}

.btn-action-icon.btn-edit:hover {
    background: #e9ecef;
    border-color: #ced4da;
    transform: translateY(-2px);
}

/* Delete Button */
.btn-action-icon.btn-delete {
    background: #fff5f5;
    color: #f8285a;
    border-color: #ffe1e7;
}

.btn-action-icon.btn-delete:hover {
    background: #f8285a;
    color: white;
    border-color: #f8285a;
    transform: translateY(-2px);
}

/* Duplicate Button */
.btn-action-icon.btn-duplicate {
    background: #f0f7ff;
    color: #2196f3;
    border-color: #bbdefb;
}

.btn-action-icon.btn-duplicate:hover {
    background: #2196f3;
    color: white;
    border-color: #2196f3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);
}

/* Locked Button */
.btn-action-icon.btn-locked {
    background: #f1f3f5;
    color: #868e96;
    border-color: #e9ecef;
    cursor: not-allowed;
    pointer-events: auto;
}

/* =============================================
   Legal Documents Modal & Bottom Bar
   ============================================= */
#legalDocModal .modal-dialog {
    margin: 30px auto;
    max-width: 780px;
}

#legalDocModal .modal-content {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.04);
    max-height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
}

#legalDocModal .modal-backdrop {
    background: rgba(30, 30, 60, 0.4);
}

#legalDocModal .legal-modal-topbar {
    background: #1274E7;
    color: #fff;
    padding: 7px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

#legalDocModal .legal-modal-topbar i {
    font-size: 14px;
}

#legalDocModal .legal-modal-header {
    padding: 18px 24px 14px;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

#legalDocModal .legal-modal-header .legal-doc-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e3f2fd 0%, #e8f0fe 100%);
    flex-shrink: 0;
}

#legalDocModal .legal-modal-header .legal-doc-icon i {
    font-size: 20px;
    color: #1274E7;
}

#legalDocModal .legal-modal-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.3;
}

#legalDocModal .legal-modal-header .legal-version-pill {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    color: #1274E7;
    background: #e3f2fd;
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 3px;
}

#legalDocModal .legal-modal-header #legalDocContext {
    background: #e3f2fd;
    color: #1274E7;
}

#legalDocModal .legal-modal-header #legalDocContext.ctx-update {
    background: #fff3e0;
    color: #e65100;
}

#legalDocModal .legal-modal-header #legalDocContext.ctx-new {
    background: #e8f5e9;
    color: #2e7d32;
}

#legalDocModal .legal-progress-wrap {
    padding: 0;
    background: #fff;
    flex-shrink: 0;
}

#legalDocModal .legal-progress-wrap .progress {
    height: 3px;
    border-radius: 0;
    background: #f0f0f0;
    margin: 0;
}

#legalDocModal .legal-progress-wrap .progress-bar {
    background: linear-gradient(90deg, #1274E7, #42a5f5);
}

#legalDocModal .legal-progress-text {
    font-size: 11px;
    color: #aaa;
    padding: 6px 24px 4px;
    margin: 0;
}

#legalDocModal .modal-body {
    padding: 0;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

#legalDocModal #legalDocContent {
    padding: 20px 24px;
    font-size: 13.5px;
    line-height: 1.75;
    color: #333;
    background: #fff;
}

#legalDocModal #legalDocContent h1,
#legalDocModal #legalDocContent h2,
#legalDocModal #legalDocContent h3,
#legalDocModal #legalDocContent h4,
#legalDocModal #legalDocContent h5 {
    color: #1a1a2e;
}

#legalDocModal .legal-pdf-scroll {
    height: 100%;
    min-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    background: #f4f5f7;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    gap: 12px;
}

#legalDocModal .wiki-pdf-page-canvas {
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
    background: #fff;
    max-width: 100%;
    height: auto !important;
    border-radius: 3px;
}

#legalDocModal .wiki-pdf-viewer-header {
    padding: 6px 12px;
    background: #f9fafb;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

#legalDocModal .legal-modal-footer {
    padding: 14px 24px 18px;
    background: #fafbfc;
    border-top: 1px solid #eee;
    flex-shrink: 0;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.04);
}

#legalDocModal #legalSignatureSection {
    margin-bottom: 14px;
    padding: 0;
    background: #fffdf5;
    border: 2px dotted #e2c44d;
    border-radius: 12px;
    overflow: hidden;
}

#legalDocModal #legalSignatureSection .sig-header {
    padding: 10px 20px;
    background: #fef9e7;
    border-bottom: 1px dotted #e2c44d;
    display: flex;
    align-items: center;
    gap: 10px;
}

#legalDocModal #legalSignatureSection .sig-header .sig-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f5c518;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#legalDocModal #legalSignatureSection .sig-header .sig-icon i {
    font-size: 16px;
    color: #fff;
}

#legalDocModal #legalSignatureSection .sig-header span {
    font-size: 12.5px;
    color: #7a6c30;
    line-height: 1.4;
}

#legalDocModal #legalSignatureSection .sig-header strong {
    font-size: 13px;
    color: #5a4e1a;
    display: block;
}

#legalDocModal #legalSignatureSection .sig-body {
    padding: 16px 20px 20px;
    background: #fffef8;
}

#legalDocModal #legalSignatureSection input {
    font-size: 28px;
    padding: 12px 14px;
}

#legalDocModal #legalSignatureSection input:focus {
    border-color: #f5c518;
    outline: none;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.04), 0 0 0 3px rgba(245, 197, 24, 0.15);
}

#legalDocModal #legalSignatureSection input::placeholder {
    color: #bbb;
    font-size: 15px;
    letter-spacing: 0.02em;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-style: italic;
}

#legalDocModal .legal-accept-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

#legalDocModal .legal-checkbox-label {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: #555;
}

#legalDocModal .legal-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #1274E7;
    flex-shrink: 0;
}

#legalDocModal #legalDocAcceptBtn {
    background: linear-gradient(135deg, #1274E7 0%, #0d5bc4 100%);
    border: none;
    color: #fff;
    font-weight: 600;
    font-size: 12.5px;
    padding: 9px 20px;
    border-radius: 8px;
    white-space: nowrap;
    transition: all 0.2s;
}

#legalDocModal #legalDocAcceptBtn:hover:not(:disabled) {
    box-shadow: 0 4px 14px rgba(18, 116, 231, 0.35);
    transform: translateY(-1px);
}

#legalDocModal #legalDocAcceptBtn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

@media (max-width:768px) {
    #legalDocModal .modal-dialog {
        margin: 12px auto;
        width: calc(100% - 24px);
        max-width: calc(100% - 24px);
        height: calc(100% - 24px);
    }

    #legalDocModal .modal-content {
        border-radius: 14px;
        max-height: calc(100vh - 24px);
        min-height: 0;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    }

    #legalDocModal .legal-modal-header {
        padding: 14px 16px 10px;
    }

    #legalDocModal .legal-modal-header h4 {
        font-size: 14px;
    }

    #legalDocModal .legal-progress-text {
        padding: 6px 16px 4px;
    }

    #legalDocModal #legalDocContent {
        padding: 14px 16px !important;
        font-size: 13px !important;
    }

    #legalDocModal .legal-pdf-scroll {
        padding: 8px;
        gap: 8px;
    }

    #legalDocModal .wiki-pdf-page-canvas {
        max-width: calc(100vw - 16px);
    }

    #legalDocModal .legal-modal-footer {
        padding: 10px 14px 14px !important;
    }

    #legalDocModal .legal-accept-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    #legalDocModal .legal-checkbox-label {
        font-size: 12px;
    }

    #legalDocModal #legalDocAcceptBtn {
        width: 100%;
        text-align: center;
        padding: 11px;
        font-size: 13px;
    }

    #legalDocModal .wiki-pdf-viewer-header {
        padding: 5px 8px !important;
    }

    #legalDocModal .wiki-pdf-controls {
        gap: 4px !important;
    }

    #legalDocModal #legalSignatureSection {
        margin-bottom: 10px;
        padding: 16px 14px;
    }

    #legalDocModal #legalSignatureSection input {
        font-size: 22px;
        padding: 10px 12px;
    }
}

/* Legal Bottom Bar (non-blocking docs) */
#legalBottomBar {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    width: 80%;
    max-width: 1000px;
    background: linear-gradient(135deg, #1a237e 0%, #1565c0 100%);
    color: #fff;
    padding: 0;
    display: none;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
    border-radius: 16px;
    animation: legalBarSlideUp 0.4s ease-out;
}

@keyframes legalBarSlideUp {
    from {
        transform: translateX(-50%) translateY(120%);
        opacity: 0;
    }

    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

#legalBottomBar .legal-bar-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-bottom: 2px;
}

#legalBottomBar .legal-bar-badge.new-doc {
    background: #43a047;
}

#legalBottomBar .legal-bar-badge.update-doc {
    background: #ef6c00;
}

#legalBottomBar .legal-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    gap: 12px;
}

#legalBottomBar .legal-bar-text {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

#legalBottomBar .legal-bar-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#legalBottomBar .legal-bar-icon i {
    font-size: 20px;
}

#legalBottomBar .legal-bar-title {
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#legalBottomBar .legal-bar-subtitle {
    font-size: 12px;
    opacity: 0.85;
}

#legalBottomBar .legal-bar-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    align-items: center;
}

#legalBottomBar .legal-bar-actions .btn {
    font-size: 13px;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 20px;
    white-space: nowrap;
}

@media (max-width:768px) {
    #legalBottomBar {
        width: calc(100% - 16px);
        bottom: 8px;
        border-radius: 12px;
    }

    #legalBottomBar .legal-bar-inner {
        flex-direction: column;
        padding: 12px 16px;
        gap: 8px;
        text-align: center;
    }

    #legalBottomBar .legal-bar-text {
        flex-direction: column;
        gap: 4px;
    }

    #legalBottomBar .legal-bar-icon {
        width: 32px;
        height: 32px;
    }

    #legalBottomBar .legal-bar-icon i {
        font-size: 18px;
    }

    #legalBottomBar .legal-bar-title {
        font-size: 13px;
        white-space: normal;
    }

    #legalBottomBar .legal-bar-subtitle {
        font-size: 11px;
    }

    #legalBottomBar .legal-bar-actions {
        width: 100%;
        justify-content: center;
    }

    #legalBottomBar .legal-bar-actions .btn {
        padding: 8px 14px;
        font-size: 12px;
        flex: 1;
    }
}

/* V3 DASHBOARD MODERN STYLES */
.gci-details-link .fa-magnifying-glass {
    opacity: 0.3;
    transition: opacity 0.2s ease-in-out;
}

.gci-details-link:hover .fa-magnifying-glass {
    opacity: 0.8;
}

.badge-gci-details {
    font-weight: bold !important;
}

.popover.finance-popover {
    border: none;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    min-width: 260px;
}

.finance-popover .popover-header {
    background: #1e293b;
    color: #fff;
    border: none;
    font-weight: 700;
    padding: 12px 16px;
    font-size: 0.9rem;
}

.finance-popover .popover-body {
    padding: 16px;
    color: #334155;
}

.finance-stat-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.025em;
}

.finance-stat-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
}

.finance-trend-badge {
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}

.finance-trend-up {
    background: #dcfce7;
    color: #166534;
}

.finance-trend-down {
    background: #fee2e2;
    color: #991b1b;
}

.chart-container {
    position: relative;
    margin: auto;
    height: 300px;
    width: 100%;
}

.chart-card {
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.08);
}

.chart-card-body {
    padding: 2.5rem;
}

.chart-card-header {
    padding: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chart-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.modern-stat-card {
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
    margin-bottom: 20px;
}

.modern-stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.2);
}

.modern-stat-header {
    padding: 20px;
    color: var(--primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modern-stat-header.plaincolor {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%) !important;
    color: #ffffff !important;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f5f9;
    display: flex;
    align-items: center;
}

.section-title i {
    color: var(--secondary);
    font-size: 1.2rem;
}

.modern-stat-header h6 {
    margin: 0;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
}

.clickable-hero {
    cursor: pointer;
    transition: opacity 0.2s;
}

.clickable-hero:hover {
    opacity: 0.8;
}

.modern-stat-body {
    padding: 20px;
}

.modern-stat-hero {
    margin-bottom: 20px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.modern-stat-hero .value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
}

.modern-stat-hero .label {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}

.modern-stat-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modern-stat-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.85rem;
    color: #334155;
}

.modern-stat-item:last-child {
    border-bottom: none;
}

.modern-stat-item .item-label {
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.modern-stat-item .item-value {
    font-weight: 600;
    color: #0f172a;
}

.modern-stat-badge {
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 20px;
    font-weight: 700;
    background: #f1f5f9;
    color: #475569;
}

.hero-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
}

.dashboard-tabs-container {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 8px;
    border-radius: 16px;
    display: inline-flex;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.1);
}

.dashboard-tabs .nav-link {
    border: none !important;
    color: #475569 !important;
    font-weight: 700 !important;
    padding: 12px 28px !important;
    border-radius: 12px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    font-size: 0.9rem !important;
    background: transparent !important;
    display: flex !important;
    align-items: center !important;
}

.dashboard-tabs .nav-link i {
    font-size: 1.1rem;
}

.dashboard-tabs .nav-link.active {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2) !important;
    transform: translateY(-1px);
}

.dashboard-tabs .nav-link:hover:not(.active) {
    background: rgba(226, 232, 240, 0.5) !important;
    color: #1e293b !important;
}

.tab-content-container {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-color: color-mix(in srgb, var(--secondary), transparent 80%);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.2), 0 0 20px color-mix(in srgb, var(--secondary), transparent 95%);
}

.filter-glass-bar {
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

.filter-glass-bar:hover {
    background: rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.1) !important;
}

.custom-select-glass select {
    background: rgba(255, 255, 255, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 12px !important;
    padding: 5px 15px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05) !important;
}

.chart-container-250 {
    height: 250px !important;
}

.chart-container-300 {
    height: 300px !important;
}

.modern-stat-divider {
    border-top: 1px dashed #eee !important;
    margin-top: 8px !important;
    padding-top: 8px !important;
    font-weight: 700 !important;
}

.modern-stat-value-lg {
    font-size: 1.4rem !important;
}

.icon-muted-small {
    font-size: 0.7rem !important;
    opacity: 0.5 !important;
}

/* ── Users Admin V3 ───────────────────────────────────────────────────────── */
.users-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: 1.25rem;
}
.users-page-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary, #1a1a2e);
    margin: 0;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.users-page-title i {
    color: var(--secondary, #c0392b);
}
.users-table {
    width: 100%;
}
.users-table thead th {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #64748b;
    border-bottom: 2px solid #f1f5f9;
}
.users-table td {
    vertical-align: middle;
}
.user-cell-name {
    display: flex;
    align-items: center;
    gap: .65rem;
}
.user-avatar {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary, #c0392b), var(--primary, #1a1a2e));
    color: #fff;
    font-size: .85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}
.user-name-primary {
    font-weight: 700;
    color: #0f172a;
    line-height: 1.1;
}
.user-name-secondary {
    font-size: .78rem;
    color: #94a3b8;
}
.user-meta-icons {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}
.user-meta-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    background: #f1f5f9;
    color: #94a3b8;
}
.user-meta-icon.active-email { background: #e0f2fe; color: #0284c7; }
.user-meta-icon.active-telegram { background: #e0f2fe; color: #229ed9; }
.user-meta-icon.active-whatsapp { background: #dcfce7; color: #25d366; }
.user-meta-icon.active-app { background: #fef3c7; color: #d97706; }
.user-meta-icon.active-gcal { background: #dcfce7; color: #16a34a; }
.role-badge-v3 {
    font-size: .7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.badge-info-soft { background: #e0f2fe; color: #0369a1; }
.status-badge-v3 {
    font-size: .72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}
.status-badge-v3.status-active { background: #dcfce7; color: #15803d; }
.status-badge-v3.status-disabled { background: #f1f5f9; color: #94a3b8; }
.status-badge-v3 .status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

/* ── UI V3 Premium Refresh ────────────────────────────────────────────────── */

.glass-v3 {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
}

.stats-card.glass-v3 {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
    border-radius: 20px !important;
}

/* Users stat strip */
.users-stat-strip {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 14px 20px;
    flex-wrap: wrap;
    overflow: visible !important;
    position: relative;
    z-index: 110;
}
.stat-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 20px;
    flex: 1;
    min-width: 140px;
}
.stat-chip-divider {
    width: 1px;
    height: 36px;
    background: rgba(100, 116, 139, 0.18);
    flex-shrink: 0;
}
.stat-chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.stat-chip-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}
.stat-chip-label {
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 500;
    line-height: 1.5;
}
.stat-chip-sub {
    display: block;
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 400;
    line-height: 1.2;
}
.stat-chip-clickable {
    position: relative;
    cursor: pointer;
    border-radius: 12px;
    transition: background 0.15s;
    user-select: none;
}
.stat-chip-clickable:hover {
    background: rgba(99, 102, 241, 0.05);
}
.stat-chip-chevron {
    font-size: 0.65rem;
    color: #94a3b8;
    margin-left: auto;
    transition: transform 0.2s;
    flex-shrink: 0;
}
.stat-chip-clickable.is-open .stat-chip-chevron {
    transform: rotate(180deg);
}
/* Notif breakdown panel */
.notif-breakdown-panel {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(200,210,230,0.5);
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.1);
    padding: 14px 18px;
    min-width: 260px;
    z-index: 300;
}
.notif-breakdown-panel.is-open {
    display: block;
}
.notif-breakdown-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    margin: 1px 0;
}
.notif-breakdown-row:hover {
    background: rgba(99,102,241,0.05);
}
.notif-breakdown-row.is-active {
    background: rgba(99,102,241,0.08);
    outline: 1px solid rgba(99,102,241,0.2);
}
.notif-breakdown-icon {
    width: 16px;
    text-align: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.notif-breakdown-label {
    font-size: 0.78rem;
    color: #475569;
    font-weight: 500;
    width: 88px;
    flex-shrink: 0;
}
.notif-breakdown-bar-wrap {
    flex: 1;
    height: 5px;
    background: rgba(226,232,240,0.8);
    border-radius: 99px;
    overflow: hidden;
}
.notif-breakdown-bar {
    display: block;
    height: 100%;
    border-radius: 99px;
    transition: width 0.4s ease;
}
.notif-breakdown-count {
    font-size: 0.82rem;
    font-weight: 700;
    color: #1e293b;
    min-width: 22px;
    text-align: right;
}

.glass-v3-panel {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 24px;
}

.table-responsive-v3 {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.shadow-v3 {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08) !important;
}

.bg-primary-soft { background: rgba(26, 26, 46, 0.08); color: #1a1a2e; }
.bg-success-soft { background: rgba(34, 197, 94, 0.08); color: #15803d; }
.bg-warning-soft { background: rgba(245, 158, 11, 0.08); color: #b45309; }
.bg-info-soft { background: rgba(14, 165, 233, 0.08); color: #0369a1; }

.stat-label {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #94a3b8;
}

.stat-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.trend-indicator {
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.progress-xs {
    height: 4px !important;
    border-radius: 10px !important;
}

.filter-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 6px;
    display: block;
    letter-spacing: 0.02em;
}

.form-control-v3 {
    display: block !important;
    width: 100% !important;
    background: #fff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 10px 16px !important;
    font-size: 0.88rem !important;
    font-weight: 500 !important;
    color: #1e293b !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
    height: auto !important;
}

.form-control-v3:focus {
    background: #fff !important;
    border-color: var(--secondary) !important;
    box-shadow: 0 0 0 4px rgba(192, 57, 43, 0.1) !important;
}

/* Filtri avanzati: i select2 riempiono l'intera colonna e si allineano
   visivamente agli input di testo (.form-control-v3), invece di restare
   "pillole" strette. Il select nativo ha w-100 ma select2 non lo eredita. */
.filters-form-v3 .select2-container { width: 100% !important; }
.filters-form-v3 .select2-container--default .select2-selection--single,
.filters-form-v3 .select2-container--default .select2-selection--multiple {
    min-height: 44px;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 12px !important;
    background: #fff;
    padding: 4px 12px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}
.filters-form-v3 .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 1.4;
    padding-left: 0;
    padding-right: 18px;
    color: #1e293b;
}
.filters-form-v3 .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
    top: 0;
    right: 10px;
}
.filters-form-v3 .select2-container--default.select2-container--open .select2-selection--single,
.filters-form-v3 .select2-container--default.select2-container--focus .select2-selection--single,
.filters-form-v3 .select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: var(--secondary) !important;
    box-shadow: 0 0 0 4px rgba(192, 57, 43, 0.1) !important;
}

.table-search-v3 {
    position: relative;
    width: 240px;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}
.table-search-v3:focus-within {
    width: 380px;
}

.table-search-v3 .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.85rem;
    pointer-events: none;
    transition: color 0.2s, transform 0.2s;
}

.table-search-v3:focus-within .search-icon {
    color: var(--primary, #c0392b);
    transform: translateY(-50%) scale(1.15);
}

.table-search-v3 input {
    padding-left: 36px !important;
    width: 100%;
    background: #fff !important;
    border: 1.5px solid #cbd5e1 !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
}

.table-search-v3 input:focus {
    border-color: var(--primary, #c0392b) !important;
    box-shadow: 0 0 0 3px rgba(192,57,43,0.12), 0 2px 8px rgba(192,57,43,0.08) !important;
    animation: search-pulse 1.8s ease-in-out infinite !important;
}

@keyframes search-pulse {
    0%   { box-shadow: 0 0 0 3px rgba(192,57,43,0.12), 0 2px 8px rgba(192,57,43,0.08); }
    50%  { box-shadow: 0 0 0 5px rgba(192,57,43,0.07), 0 2px 12px rgba(192,57,43,0.12); }
    100% { box-shadow: 0 0 0 3px rgba(192,57,43,0.12), 0 2px 8px rgba(192,57,43,0.08); }
}

.users-table-v3 {
    border-collapse: separate;
    border-spacing: 0;
}

.users-table-v3 thead th {
    background: rgba(0, 0, 0, 0.02);
    padding: 18px 12px !important;
    font-size: 0.68rem !important;
    font-weight: 800 !important;
    color: #94a3b8 !important;
    border: none !important;
    text-transform: uppercase;
}

.user-row-v3 {
    transition: background 0.2s ease;
}

.user-row-v3:hover {
    background: rgba(255, 255, 255, 0.8);
}

.user-row-v3 td {
    padding: 16px 12px !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
    vertical-align: middle !important;
}

.entity-id-v3 {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.75rem;
    color: #94a3b8;
    background: #f8fafc;
    padding: 2px 6px;
    border-radius: 6px;
}

.user-cell-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar-v3 {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #e2e8f0;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    box-shadow: none;
    transition: background 0.3s, color 0.3s;
    position: relative;
}

.avatar-v3.is-loading {
    background: #e2e8f0;
    color: transparent;
}

.avatar-v3.is-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: avatar-shimmer 1.4s infinite;
}

@keyframes avatar-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.avatar-v3.loaded-initials {
    background: #dde3f0;
    color: #64748b;
    box-shadow: none;
}

.avatar-v3.has-wa-photo {
    background: none;
    overflow: hidden;
    padding: 0;
}

.user-avatar-wa-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
    display: block;
}

.entity-name-v3 {
    font-weight: 700;
    color: #1e293b;
    font-size: 0.92rem;
    line-height: 1.2;
}

.entity-sub-v3 {
    font-size: 0.78rem;
    color: #64748b;
}

.user-contact-v3 .contact-item {
    font-size: 0.82rem;
    color: #475569;
    font-weight: 500;
}

.user-contact-v3 .contact-item i {
    width: 16px;
    color: #94a3b8;
}

.service-slots-v3 {
    display: flex;
    align-items: center;
    gap: 0;
}
.service-slot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}
.service-icon-v3 {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    font-size: 0.85rem;
    color: #cbd5e1;
    transition: all 0.2s;
}
.service-icon-v3.active-email    { color: #3b82f6; }
.service-icon-v3.active-telegram { color: #0088cc; }
.service-icon-v3.active-whatsapp { color: #25d366; }
.service-icon-v3.active-app      { color: #f59e0b; }
.service-icon-v3.active-gcal     { color: #4285f4; }
.service-icon-v3.active-subs     { color: #22c55e; }
.service-icon-v3.service-danger { color: #ef4444 !important; }
.service-icon-v3.service-success { color: #22c55e !important; }
.service-icon-v3.service-warning { color: #f59e0b !important; }

.gcal-icon-img {
    width: 20px;
    height: 20px;
    display: block;
    transition: opacity 0.2s, filter 0.2s;
}
.gcal-icon-off {
    opacity: 0.2;
    filter: grayscale(1);
}
.gcal-icon-checking {
    opacity: 0.4;
    filter: grayscale(1);
    animation: gcal-pulse 1.2s ease-in-out infinite;
}
@keyframes gcal-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.75; }
}
.gcal-icon-error {
    filter: grayscale(1) sepia(1) hue-rotate(320deg) saturate(3);
    opacity: 0.85;
}

.user-actions-v3 {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.action-btn-v3 {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    color: #64748b;
    transition: all 0.2s;
    cursor: pointer;
}

.action-btn-v3:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.action-btn-v3.edit:hover { background: #3b82f6; border-color: #3b82f6; }

/* ── Users Accordion V3 ──────────────────────────────────────────────────── */

.tab-pill-group-v3 {
    display: flex;
    gap: 6px;
}

.tab-pill-v3 {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 12px;
    border: 1.5px solid rgba(0,0,0,0.07);
    background: rgba(255,255,255,0.5);
    font-size: 0.82rem;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    transition: all 0.18s ease;
}

.tab-pill-v3:hover {
    background: rgba(255,255,255,0.85);
    color: #1e293b;
}

.tab-pill-v3.active {
    background: var(--primary, #c0392b);
    color: #fff;
    border-color: var(--primary, #c0392b);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.tab-pill-count-v3 {
    background: rgba(255,255,255,0.25);
    border-radius: 20px;
    padding: 1px 7px;
    font-size: 0.72rem;
    font-weight: 800;
}

.tab-pill-v3.active .tab-pill-count-v3 {
    background: rgba(255,255,255,0.3);
}

.tab-pill-v3:not(.active) .tab-pill-count-v3 {
    background: #f1f5f9;
    color: #475569;
}

/* ── Filter dropdown custom ───────────────────────────────────────────────── */
.filter-dropdown-v3 {
    position: relative;
}

.filter-btn-v3 {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 12px;
    border: 1.5px solid rgba(0,0,0,0.07);
    background: rgba(255,255,255,0.5);
    font-size: 0.82rem;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
}

.filter-btn-v3:hover {
    background: rgba(255,255,255,0.85);
    color: #1e293b;
}

.filter-btn-v3:focus {
    outline: none;
}

.filter-btn-v3.has-filter {
    border-color: var(--primary, #c0392b);
    color: var(--primary, #c0392b);
    background: rgba(192,57,43,0.06);
}

.filter-chevron {
    font-size: 0.65rem;
    transition: transform 0.18s ease;
    color: #94a3b8;
}

.filter-dropdown-v3.is-open .filter-chevron {
    transform: rotate(180deg);
}

.glass-v3-toolbar {
    position: relative;
    z-index: 100;
    overflow: visible !important;
}

.filter-menu-v3 {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 180px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    z-index: 300;
    padding: 6px;
}

.filter-dropdown-v3.is-open .filter-menu-v3 {
    display: block;
}

.filter-menu-item {
    padding: 8px 12px;
    font-size: 0.83rem;
    font-weight: 600;
    color: #475569;
    border-radius: 9px;
    cursor: pointer;
    transition: background 0.12s;
}

.filter-menu-item:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.filter-menu-item.active {
    background: rgba(192,57,43,0.07);
    color: var(--primary, #c0392b);
}

.acc-expand-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    transition: color 0.15s;
}

.acc-expand-link:hover {
    color: var(--primary, #c0392b);
    text-decoration: none;
}

/* Accordion item */
.acc-item-v3 {
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: background 0.15s;
    position: relative;
}

.acc-item-v3:last-child {
    border-bottom: none;
}

.acc-item-v3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary, #c0392b);
    opacity: 0;
    transition: opacity 0.15s;
}
.acc-item-v3:first-child::before {
    border-top-left-radius: 24px;
}
.acc-item-v3:last-child::before {
    border-bottom-left-radius: 24px;
}

.acc-item-v3.is-open {
    background: rgba(255,255,255,0.85);
}
.acc-item-v3.is-open::before {
    opacity: 1;
}

.acc-header-v3 {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 22px;
    cursor: pointer;
    transition: background 0.15s;
    user-select: none;
}

.acc-header-v3:hover {
    background: rgba(255,255,255,0.55);
}

.acc-item-v3.is-open .acc-header-v3 {
    background: transparent;
}

.acc-name-v3 {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.acc-name-v3 .entity-name-v3 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.acc-meta-v3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.acc-chevron-v3 {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: rgba(192,57,43,0.08);
    border: 1.5px solid rgba(192,57,43,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary, #c0392b);
    flex-shrink: 0;
    margin-left: 4px;
    transition: background 0.18s, border-color 0.18s;
}

.acc-header-v3:hover .acc-chevron-v3 {
    background: rgba(192,57,43,0.14);
    border-color: rgba(192,57,43,0.3);
}

.acc-item-v3.is-open .acc-chevron-v3 {
    background: var(--primary, #c0392b);
    border-color: var(--primary, #c0392b);
    color: #fff;
}

.acc-chevron-v3 i {
    transition: transform 0.2s ease;
    font-size: 0.75rem;
}

/* Richieste su mobile (modalita' app): la card si tocca per aprire la richiesta,
   la freccia (piu' grande, da dito) espande l'anteprima; "Apri richiesta" e' l'azione principale */
.myb-app .acc-header-v3 {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease;
}

.myb-app .acc-header-v3:active {
    background: rgba(15, 23, 42, 0.04) !important;
}

.myb-app .acc-chevron-v3 {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    background: color-mix(in srgb, var(--primary, #6366f1) 8%, #fff);
    color: color-mix(in srgb, var(--primary, #6366f1) 82%, black);
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.08), inset 0 1px 1px #fff;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.myb-app .acc-header-v3:active .acc-chevron-v3 {
    transform: none;
}

.myb-app .acc-chevron-v3:active {
    transform: scale(0.9);
}

.myb-app .acc-item-v3.is-open .acc-chevron-v3 {
    border-color: transparent;
    background: color-mix(in srgb, var(--primary, #6366f1) 82%, black);
    color: #fff;
    box-shadow: 0 6px 14px color-mix(in srgb, var(--primary, #6366f1) 35%, transparent);
}

.myb-app .acc-chevron-v3 i {
    font-size: 0.95rem;
    /* Rotazione con leggero rimbalzo (la rotazione la imposta toggleRichiestaAcc) */
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.myb-app .btn-acc-sessions {
    flex: 1 0 100%;
    justify-content: center;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
}

/* Swipe e pressione lunga sulle card delle richieste (modalita' app): nella card aperta restano solo
   "Apri Richiesta" e "Invia WhatsApp", affiancati; Sollecita ed Elimina stanno nello swipe e nella
   pressione lunga (restano nel DOM: lo swipe li preme, cosi' permessi e logica restano quelli di sempre) */
.myb-app #buyerleads_dt .acc-actions-v3 {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
}
.myb-app #buyerleads_dt .acc-actions-v3 > :not(.btn-acc-sessions):not(.btn-acc-success) {
    display: none !important;
}
.myb-app #buyerleads_dt .acc-actions-v3 > .btn-acc-sessions,
.myb-app #buyerleads_dt .acc-actions-v3 > .btn-acc-success {
    flex: 1 1 0 !important;
    justify-content: center;
    padding: 12px 10px;
    border-radius: 12px;
    font-size: 0.9rem;
    white-space: nowrap;
}

.myb-app #buyerleads_dt .acc-item-v3 {
    z-index: 1;
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.myb-app .acc-item-v3.is-pressing {
    transform: scale(0.98);
    transition: transform 0.2s ease !important;
}

.myb-swipe {
    position: absolute;
    z-index: 0;
    display: flex;
    justify-content: space-between;
    overflow: hidden;
    visibility: hidden;
    background: #e2e8f0;
}

.myb-swipe__side {
    display: flex;
}

.myb-swipe__btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 76px;
    padding: 0;
    border: 0;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    -webkit-tap-highlight-color: transparent;
}

.myb-swipe__btn i {
    font-size: 20px;
}

.myb-swipe__btn:active {
    filter: brightness(0.9);
}

/* Bianco esplicito su testo e icona: admin4.css colora ogni elemento dentro una tabella
   (.table * { color: #717BA2 }) e il bianco solo ereditato non basterebbe */
.myb-swipe__btn,
.myb-swipe__btn * {
    color: #fff !important;
}

/* Tinte scure: contrasto con il bianco almeno 4.5:1 */
.myb-swipe__btn.is-call { background: #1d4ed8; }
.myb-swipe__btn.is-wa { background: #15803d; }
.myb-swipe__btn.is-recall { background: #b45309; }
.myb-swipe__btn.is-del { background: #b91c1c; }

/* Accordion body */
.acc-body-v3 {
    border-top: 1px solid rgba(0,0,0,0.04);
    background: rgba(248,250,252,0.6);
    padding: 18px 22px 18px 74px;
}

.acc-details-v3 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px 24px;
    margin-bottom: 16px;
}

.acc-detail-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.acc-detail-label {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
}

.acc-detail-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
}

.acc-actions-v3 {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-acc-action {
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1.5px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.18s ease;
    background: #fff;
}

/* Sull'hover il pulsante si riempie e il testo passa a bianco: l'icona deve
   seguirlo. Esplicito e non per eredita', perche' il tema colora le icone dei
   pulsanti per conto suo e vincerebbe sull'ereditato. */
.btn-acc-action:hover i,
.btn-acc-action:hover .fa,
.btn-acc-action:hover [class*="fa-"] { color: #fff !important; }

.btn-acc-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    text-decoration: none;
}

.btn-acc-edit {
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.btn-acc-edit:hover {
    background: #1d4ed8;
    color: #fff;
}

.btn-acc-warning {
    border-color: #fed7aa;
    color: #c2410c;
}

.btn-acc-warning:hover {
    background: #c2410c;
    color: #fff;
}

.btn-acc-success {
    border-color: #bbf7d0;
    color: #15803d;
}

.btn-acc-success:hover {
    background: #15803d;
    color: #fff;
}

.btn-acc-sessions {
    border-color: color-mix(in srgb, var(--primary, #6366f1) 30%, white);
    color: color-mix(in srgb, var(--primary, #6366f1) 82%, black);
}
.btn-acc-sessions:hover {
    background: color-mix(in srgb, var(--primary, #6366f1) 82%, black);
    color: #fff;
}

/* Pacchetto "app" in beta: "Apri Richiesta" e' l'azione principale, pieno e primo della fila */
.myb-shell .btn-acc-sessions {
    order: -1;
    border-color: transparent;
    background: color-mix(in srgb, var(--primary, #6366f1) 82%, black);
    color: #fff !important;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--primary, #6366f1) 30%, transparent);
}
.myb-shell .btn-acc-sessions i {
    color: #fff !important;
}
.myb-shell .btn-acc-sessions:hover {
    background: color-mix(in srgb, var(--primary, #6366f1) 70%, black);
    color: #fff;
}

.btn-acc-danger {
    border-color: #fecaca;
    color: #dc2626;
}

.btn-acc-danger:hover {
    background: #dc2626;
    color: #fff;
}

/* ── Requests Accordion V3 Grid Recalibration */
.richieste-header-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    padding: 12px 16px !important;
    font-size: 0.85rem !important;
    align-items: flex-start !important;
}

.richieste-header-grid .grid-col-buyid { order: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.richieste-header-grid .grid-col-id { order: 1; display: flex; align-items: center; gap: 8px; }
.richieste-header-grid .grid-col-connector { order: 2; display: flex; align-items: center; justify-content: center; }
.richieste-header-grid .grid-col-property { order: 3; color: #334155; }
.richieste-header-grid .grid-col-agent { order: 4; color: #475569; }
.richieste-header-grid .grid-col-status { order: 5; text-align: left !important; }
.richieste-header-grid .grid-col-notif { order: 6; display: flex; align-items: center; }
.richieste-header-grid .grid-col-chevron { order: 7; width: 24px; height: 24px; border-radius: 6px; display: flex; align-items: center; justify-content: center; }

/* Connettore "contatto » immobile" — doppio chevron grande grigio nella sua
   colonna dedicata, centrato nel gap tra le due card. Visibile da desktop in su. */
.link-connector-v3 {
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: transparent;
    color: #cdd3df;
    font-size: 3rem;
    line-height: 1;
    -webkit-text-stroke: 1.4px #cdd3df;
    transition: color 0.18s ease, -webkit-text-stroke-color 0.18s ease;
    pointer-events: none;
}
.acc-item-v3:hover .link-connector-v3 {
    color: #aab2c5;
    -webkit-text-stroke-color: #aab2c5;
}
@media (min-width: 992px) {
    .link-connector-v3 { display: flex; }
}

@media (min-width: 992px) {
    .richieste-header-grid {
        grid-template-columns: 130px minmax(0,2.6fr) 64px minmax(0,2fr) 1.5fr 1fr 70px auto !important;
        align-items: center !important;
        gap: 12px !important;
    }
    .richieste-header-grid .grid-col-buyid { align-items: flex-start !important; justify-content: center !important; }
    .richieste-header-grid .grid-col-status { text-align: left !important; justify-content: flex-start !important; }
    .richieste-header-grid .grid-col-notif { justify-content: center !important; align-items: center !important; }
    
    .richieste-header-grid > div:not(:last-child):not(.grid-col-chevron):not(.grid-col-connector):not(.grid-col-id) {
        border-right: 1px solid rgba(0, 0, 0, 0.05);
        padding-right: 8px;
        min-height: 24px;
        display: flex;
        align-items: center;
    }
}

/* ── Monday.com Style Board Recalibration */
.acc-item-v3.monday-style {
    border-left: 6px solid #cbd5e1 !important;
    border-bottom: 1px solid rgba(0,0,0,0.06) !important;
    background: #fff !important;
    margin-bottom: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transition: all 0.15s ease-in-out !important;
}

.acc-item-v3.monday-style::before {
    display: none !important; /* disable default left bar */
}

.acc-item-v3.monday-style.status-border-active {
    border-left-color: #00c875 !important;
}
.acc-item-v3.monday-style.status-border-success-light {
    border-left-color: #2ecc71 !important;
}
.acc-item-v3.monday-style.status-border-success {
    border-left-color: #16a34a !important;
}
.acc-item-v3.monday-style.status-border-success-dark {
    border-left-color: #15803d !important;
}
.acc-item-v3.monday-style.status-border-warning {
    border-left-color: #fdab3d !important;
}
.acc-item-v3.monday-style.status-border-orange {
    border-left-color: #ff9800 !important;
}
.acc-item-v3.monday-style.status-border-urgent {
    border-left-color: var(--st-new) !important;
}
.acc-item-v3.monday-style.status-border-danger {
    border-left-color: #d10501 !important;
}
.acc-item-v3.monday-style.status-border-danger-dark {
    border-left-color: #a04e4e !important;
}
.acc-item-v3.monday-style.status-border-sky {
    border-left-color: #09b1e2 !important;
}
.acc-item-v3.monday-style.status-border-default {
    border-left-color: #78909c !important;
}

/* La riga prende appena un accenno del colore del suo stato (DESIGN.md §27): 3.5% sul bianco,
   6% al passaggio del mouse; le righe grigie (senza colore) restano bianche */
.acc-item-v3.monday-style.status-border-active { --row-tone: #00c875; }
.acc-item-v3.monday-style.status-border-success-light { --row-tone: #2ecc71; }
.acc-item-v3.monday-style.status-border-success { --row-tone: #16a34a; }
.acc-item-v3.monday-style.status-border-success-dark { --row-tone: #15803d; }
.acc-item-v3.monday-style.status-border-warning { --row-tone: #fdab3d; }
.acc-item-v3.monday-style.status-border-orange { --row-tone: #ff9800; }
.acc-item-v3.monday-style.status-border-urgent { --row-tone: var(--st-new); }
.acc-item-v3.monday-style.status-border-danger { --row-tone: #d10501; }
.acc-item-v3.monday-style.status-border-danger-dark { --row-tone: #a04e4e; }
.acc-item-v3.monday-style.status-border-sky { --row-tone: #09b1e2; }
.acc-item-v3.monday-style.status-border-primary { border-left-color: var(--primary, #6366f1) !important; --row-tone: var(--primary, #6366f1); }
.acc-item-v3.monday-style[class*="status-border-"]:not(.status-border-default) { background: color-mix(in srgb, var(--row-tone) 3.5%, #ffffff) !important; }
.acc-item-v3.monday-style[class*="status-border-"]:not(.status-border-default):hover { background: color-mix(in srgb, var(--row-tone) 6%, #ffffff) !important; }

.acc-item-v3.monday-style:hover {
    background: #f8fafc !important;
}

@media (min-width: 992px) {
    .richieste-header-grid {
        grid-template-columns: 130px minmax(0,2.6fr) 64px minmax(0,2fr) 1.5fr 1fr 70px auto !important;
        align-items: center !important;
        gap: 12px !important;
    }
    .richieste-header-grid .grid-col-buyid { align-items: flex-start !important; justify-content: center !important; }
    .richieste-header-grid .grid-col-status { text-align: left !important; justify-content: flex-start !important; }
    .richieste-header-grid .grid-col-notif { justify-content: center !important; align-items: center !important; }
    
    .richieste-header-grid > div:not(:last-child):not(.grid-col-chevron):not(.grid-col-connector):not(.grid-col-id) {
        border-right: 1px solid rgba(0, 0, 0, 0.05);
        padding-right: 8px;
        min-height: 24px;
        display: flex;
        align-items: center;
    }
}

/* Popover scuro delle viste rapide (spiega cosa filtra ogni pill) */
.quick-view-popover-v3 {
    background: #0f172a;
    border: none;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.28);
    max-width: 260px;
}
.quick-view-popover-v3 .popover-body {
    color: #fff;
    font-size: 0.68rem;
    line-height: 1.35;
    padding: 6px 10px;
}
/* Freccia coerente col fondo scuro (il pill è sotto → popover placement top) */
.quick-view-popover-v3.bs-popover-top .arrow::after { border-top-color: #0f172a; }
.quick-view-popover-v3.bs-popover-bottom .arrow::after { border-bottom-color: #0f172a; }

/* ══ Mobile (<992px): card "tile" ben definite, gerarchia compatta, righe alternate.
   Solo restyling responsive del render v3 esistente; desktop (>=992px) invariato. ══ */
@media (max-width: 991px) {
    /* Header di colonna: da mobile le card non sono incolonnate, quindi le etichette
       (ID & DATA, CLIENTE, …) sono solo ingombro → nascoste. (La regola base
       .richieste-header-grid{display:grid!important} scavalca il d-none di Bootstrap,
       quindi serve un override più specifico.) */
    .acc-header-v3.richieste-header-bar-v3 {
        display: none !important;
    }

    /* Ogni richiesta = tile distinta: stacco tra le card, angoli arrotondati (std V3),
       ombra leggera; il bordo sinistro colorato per stato resta. */
    .acc-item-v3.monday-style {
        margin: 0 10px 10px !important;
        border: 1px solid rgba(15, 23, 42, 0.08) !important;
        border-left-width: 6px !important;
        border-radius: 14px !important;
        box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05) !important;
    }
    /* Righe alternate: tinta leggera sulle card pari, solo su mobile. */
    #buyerleads_dt.buyerleads-dt-v3 tbody tr:nth-child(even) .acc-item-v3.monday-style.status-border-default {
        background: #f9fafb !important;
    }

    /* Gerarchia a aree: meta in alto (BUY+ora | chevron), cliente, immobile,
       consulente, riga finale stato + notifica (niente più bottone a tutta larghezza). */
    .acc-header-v3.richieste-header-grid {
        grid-template-columns: 1fr auto !important;
        grid-template-areas:
            "buyid    chevron"
            "client   client"
            "property property"
            "agent    agent"
            "status   notif" !important;
        gap: 10px !important;
        padding: 12px 14px !important;
        align-items: center !important;
    }
    .richieste-header-grid .grid-col-buyid     { grid-area: buyid !important; }
    .richieste-header-grid .grid-col-chevron   { grid-area: chevron !important; justify-self: end !important; }
    .richieste-header-grid .grid-col-id        { grid-area: client !important; }
    .richieste-header-grid .grid-col-property  { grid-area: property !important; }
    .richieste-header-grid .grid-col-agent     { grid-area: agent !important; }
    .richieste-header-grid .grid-col-status    { grid-area: status !important; justify-self: start !important; }
    .richieste-header-grid .grid-col-notif     { grid-area: notif !important; justify-self: end !important; }
    .richieste-header-grid .grid-col-connector { display: none !important; }

    /* Cliente: via il box-in-box, il tile fa già da cornice → più aria, meno spreco. */
    .acc-item-v3 .mini-client-card-v3 {
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
    }
    /* Stato: da "bottone" a chip compatta allineata a sinistra. */
    .grid-col-status .status-pill-v3 {
        width: auto !important;
        max-width: 100% !important;
        min-height: 0 !important;
    }
    /* Corpo espanso: meno indentazione (era 74px) e angoli coerenti col tile. */
    .acc-body-richieste-v3 {
        padding: 14px 16px !important;
        border-radius: 0 0 13px 13px !important;
    }
}

/* ── Righe delle liste v3 sul telefono (DESIGN.md §27): schede piccole e separate come le voci delle
   app di CRM (non i riquadri grandi del desktop). In alto avatar, nome e dettaglio con lo stato
   piccolo a destra; poi il contesto su una riga; in fondo codice e data, notifica, foto del
   consulente e la freccia per aprire la riga. */
@media (max-width: 767px) {
    .acc-item-v3.monday-style {
        margin: 0 8px 8px !important;
        border: 1px solid rgba(15, 23, 42, 0.08) !important;
        border-left: 4px solid #cbd5e1 !important;
        border-radius: 14px !important;
        box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05) !important;
        overflow: hidden;
    }
    /* Niente contenitore attorno alle schede: le schede stanno direttamente sulla pagina */
    .results-panel-v3 { background: transparent !important; border: 0 !important; box-shadow: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; overflow: visible !important; }
    .results-panel-v3 .acc-item-v3.monday-style { margin: 0 0 8px !important; }
    /* Anche il contenitore di DataTables (bianco su desktop, .dataTables_wrapper) sparisce */
    .results-panel-v3 .dataTables_wrapper { background: transparent !important; border-radius: 0 !important; }
    .acc-header-v3.richieste-header-grid {
        grid-template-columns: minmax(0, 1fr) auto auto auto !important;
        grid-template-areas:
            "client   status   status status"
            "property property property property"
            "buyid    notif    agent  chevron" !important;
        gap: 6px 10px !important;
        padding: 12px 14px 11px 12px !important;
        align-items: center !important;
    }
    .richieste-header-grid .grid-col-chevron { display: inline-flex !important; grid-area: chevron !important; align-items: center; justify-content: center; width: 28px !important; height: 28px !important; border-radius: 50% !important; background: #f1f5f9 !important; font-size: 0.7rem; }
    /* Niente trattino quando la richiesta non ha immobile */
    /* Immobile di Richieste: pillola come quella del desktop, rif in evidenza e indirizzo che si accorcia */
    .acc-item-v3 .mini-property-card-v3 { display: inline-flex !important; flex-direction: row !important; align-items: center !important; justify-content: flex-start !important; width: auto !important; gap: 7px; min-width: 0; max-width: 100%; padding: 5px 12px !important; border: 1px solid #e2e8f0 !important; border-radius: 999px !important; background: #f8fafc !important; box-shadow: none !important; }
    .acc-item-v3 .mini-property-card-v3 .prop-rif-v3 { font-size: 0.8rem !important; white-space: nowrap; }
    .acc-item-v3 .mini-property-card-v3 .prop-addr-v3 { min-width: 0; font-size: 0.76rem !important; color: #64748b !important; }
    .richieste-header-grid .grid-col-property:has(.prop-none-v3) { display: none !important; }
    .richieste-header-grid .grid-col-status { align-self: start !important; justify-self: end !important; }
    .richieste-header-grid .grid-col-notif:empty, .richieste-header-grid .grid-col-agent:empty, .richieste-header-grid .grid-col-property:empty { display: none !important; }
    /* Nome e dettaglio */
    .acc-item-v3 .mini-client-card-v3 { gap: 11px !important; align-items: center !important; min-width: 0; }
    .acc-item-v3 .client-avatar-v3, .acc-item-v3 .client-photo-v3 { width: 40px !important; height: 40px !important; flex: 0 0 40px !important; font-size: 0.78rem !important; }
    .acc-item-v3 .entity-name-v3 { font-size: 0.95rem !important; font-weight: 700 !important; line-height: 1.25 !important; }
    .acc-item-v3 .entity-link-v3 { display: none !important; } /* la riga si apre toccandola */
    .acc-item-v3 .contact-line-v3 { font-size: 0.76rem !important; color: #64748b !important; }
    .acc-item-v3 .contact-line-v3:nth-child(n+3) { display: none !important; }
    /* Stato: chip piccola in alto a destra */
    .acc-item-v3 .richieste-header-grid .grid-col-status .status-pill-v3 { width: auto !important; min-width: 0 !important; min-height: 0 !important; height: auto !important; padding: 3px 9px !important; border-radius: 999px !important; box-shadow: none !important; }
    .acc-item-v3 .richieste-header-grid .grid-col-status .status-pill-v3 .status-pill-label { font-size: 0.62rem !important; letter-spacing: 0.02em; white-space: nowrap; }
    /* Seconda riga: codice e data in piccolo, chip su una riga (sfumano se troppe), solo la foto */
    .richieste-header-grid .grid-col-buyid { flex-direction: row !important; align-items: center !important; gap: 6px !important; }
    .acc-item-v3 .buy-id-btn-v3 { padding: 4px 11px !important; font-size: 0.78rem !important; }
    .acc-item-v3 .buy-id-btn-v3 i { display: none; }
    .acc-item-v3 .rel-date-v3, .acc-item-v3 .rel-date-v3 * { color: #64748b !important; }
    .acc-item-v3 .rel-date-v3 { font-size: 0.68rem !important; white-space: nowrap; }
    .richieste-header-grid .grid-col-property { font-size: 0.78rem; color: #334155; }
    .richieste-header-grid .grid-col-property { display: flex !important; flex-wrap: nowrap !important; gap: 4px !important; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
    .richieste-header-grid .grid-col-property .cell-stack-v3 { flex-direction: row; gap: 4px; }
    .acc-item-v3 .source-chip-v3 { font-size: 0.68rem !important; padding: 2px 8px !important; }
    .richieste-header-grid .grid-col-agent { justify-self: end !important; }
    .acc-item-v3 .grid-col-agent .consulente-pill-v3 { padding: 0 !important; border: 0 !important; background: none !important; }
    .acc-item-v3 .grid-col-agent .consulente-name-v3 { display: none !important; }
    .acc-item-v3 .grid-col-agent .consulente-avatar-v3 { width: 24px !important; height: 24px !important; font-size: 0.55rem !important; }
    .acc-item-v3:active > .acc-header-v3 { background: rgba(15, 23, 42, 0.035); }
    .acc-body-richieste-v3 { border-radius: 0 !important; }
}

/* ── Spotlight Search Bar */
.spotlight-search-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    padding: 6px 18px;
    gap: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.2s ease-in-out;
}
.spotlight-search-container:focus-within {
    border-color: var(--secondary, #c0392b);
    box-shadow: 0 10px 30px rgba(192, 57, 43, 0.08) !important;
    background: #ffffff;
}
.spotlight-search-icon {
    font-size: 1.35rem;
    color: #94a3b8;
    transition: color 0.2s;
}
.spotlight-search-container:focus-within .spotlight-search-icon {
    color: var(--secondary, #c0392b);
}
.spotlight-input {
    flex: 1;
    min-width: 0; /* senza, l'input non scende sotto la sua larghezza e su mobile spinge "Filtri Avanzati" fuori dalla pagina */
    border: none !important;
    background: transparent !important;
    outline: none !important;
    font-size: 1.15rem;
    font-weight: 500;
    color: #1e293b;
    padding: 12px 0;
    box-shadow: none !important;
}
.spotlight-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}
.btn-filter-modal-trigger {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    color: #475569;
    font-weight: 700;
    font-size: 0.82rem;
    border-radius: 14px;
    padding: 10px 18px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s ease-in-out;
    cursor: pointer;
}
.btn-filter-modal-trigger:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #0f172a;
    transform: translateY(-1px);
}
.btn-filter-modal-trigger i {
    font-size: 0.95rem;
}
/* Drawer aperto: il pulsante che l'ha aperto resta acceso, cosi' si vede da dove
   e' uscito il pannello e come richiuderlo. */
.btn-filter-modal-trigger[aria-expanded="true"] {
    background: color-mix(in srgb, var(--primary, #6366f1) 10%, transparent);
    border-color: color-mix(in srgb, var(--primary, #6366f1) 25%, transparent) !important;
    color: var(--primary, #6366f1);
}

/* Spotlight Suggestions Dropdown styles */
.spotlight-suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 16px !important;
    z-index: 1050 !important;
    overflow: hidden;
    padding: 6px !important;
}
.spotlight-suggestion-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 10px 16px !important;
    border-radius: 10px !important;
    color: #475569 !important;
    font-size: 0.9rem !important;
    cursor: pointer !important;
    transition: all 0.1s ease-in-out !important;
}
.spotlight-suggestion-item i {
    font-size: 1rem !important;
    color: #94a3b8 !important;
    width: 20px !important;
    text-align: center !important;
}
.spotlight-suggestion-item:hover,
.spotlight-suggestion-item.active {
    background: color-mix(in srgb, var(--primary, #6366f1) 8%, transparent) !important;
    color: var(--primary, #6366f1) !important;
}
.spotlight-suggestion-item:hover i,
.spotlight-suggestion-item.active i {
    color: var(--primary, #6366f1) !important;
}
.spotlight-suggestion-item strong {
    color: #1e293b !important;
}
.spotlight-suggestion-item:hover strong,
.spotlight-suggestion-item.active strong {
    color: var(--primary, #6366f1) !important;
}
.spotlight-suggestion-item .query-highlight {
    font-weight: 600 !important;
    color: #0f172a !important;
}
.spotlight-suggestion-item:hover .query-highlight,
.spotlight-suggestion-item.active .query-highlight {
    color: color-mix(in srgb, var(--primary, #6366f1) 82%, black) !important;
}


/* ── DataTable Controls & Pagination V3 Recalibration */
.dataTables_wrapper {
    background: #ffffff !important;
    border-bottom-left-radius: 20px !important;
    border-bottom-right-radius: 20px !important;
}
.dataTables_wrapper::after {
    content: "";
    clear: both;
    display: table;
}

/* Length Changer dropdown styling */
.dataTables_length {
    padding: 12px 18px !important;
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
    font-size: 0.82rem !important;
    font-weight: 500 !important;
    color: #64748b !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}
.dataTables_length label {
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}
.dataTables_length select {
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 4px 12px !important;
    outline: none !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    background: #ffffff !important;
    cursor: pointer !important;
    height: auto !important;
    font-size: 0.82rem !important;
    transition: border-color 0.15s ease-in-out !important;
}
.dataTables_length select:focus {
    border-color: var(--primary, #6366f1) !important;
}

/* Info Summary text styling */
.dataTables_wrapper .dataTables_info {
    float: left !important;
    padding: 20px 24px !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    color: #64748b !important;
    font-family: inherit !important;
}

/* Pagination buttons styling */
.dataTables_wrapper .dataTables_paginate {
    float: right !important;
    padding: 16px 24px !important;
    display: flex !important;
    align-items: center !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    color: #475569 !important;
    padding: 6px 12px !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.15s ease-in-out !important;
    margin: 0 2px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary, #6366f1) !important; /* Premium Indigo */
    color: #ffffff !important;
    border-color: var(--primary, #6366f1) !important;
    box-shadow: 0 4px 10px color-mix(in srgb, var(--primary, #6366f1) 20%, transparent) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    color: #ffffff !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    background: #f8fafc !important;
    color: #94a3b8 !important;
    border-color: #e2e8f0 !important;
    box-shadow: none !important;
}









/* ── Modal V3 Premium ─────────────────────────────────────────────────────── */
.modal-content-glass-v3 {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 28px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.modal-header-v3 {
    padding: 24px 30px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header-v3 .header-icon-wrap {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: #fff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 8px 16px rgba(192, 57, 43, 0.2);
}

.modal-header-v3 .modal-title {
    font-weight: 800;
    color: #1e293b;
    font-size: 1.1rem;
}

.close-v3 {
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.close-v3:hover {
    background: #fee2e2;
    color: #ef4444;
}

.label-v3 {
    font-size: 0.65rem;
    font-weight: 800;
    color: #94a3b8;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    display: block;
}

.input-wrap-v3 {
    position: relative;
    width: 100%;
}
.input-wrap-v3 .form-control-v3 {
    padding-left: 42px !important;
}
/* Password field: extra right padding to clear both our toggle + browser/extension icons */
.input-wrap-v3 .form-control-v3.has-pwd-toggle {
    padding-right: 72px !important;
}
.pwd-toggle-v3 {
    position: absolute;
    /* sit at ~44px from right: leaves ~32px gap for browser/extension password-manager icons */
    right: 44px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    font-size: 0.9rem;
    transition: color 0.15s;
    z-index: 2;
}
.pwd-toggle-v3:hover { color: #475569; }

.input-icon-v3 {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #cbd5e1;
    font-size: 0.9rem;
    z-index: 5;
}

.custom-control-v3 {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.custom-control-v3 input {
    display: none;
}

.checkbox-box-v3 {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid #cbd5e1;
    margin-right: 10px;
    display: inline-block;
    position: relative;
    transition: all 0.2s;
}

.custom-control-v3 input:checked + label .checkbox-box-v3 {
    background: var(--secondary);
    border-color: var(--secondary);
}

.custom-control-v3 input:checked + label .checkbox-box-v3::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #fff;
    font-size: 10px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.custom-control-v3 label {
    font-size: 0.85rem;
    color: #475569;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.modal-footer-v3 {
    background: rgba(0, 0, 0, 0.02);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn-cancel-v3 {
    padding: 10px 24px;
    border-radius: 14px;
    background: transparent;
    border: 1px solid #cbd5e1;
    color: #64748b;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel-v3:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.btn-primary-v3 {
    padding: 10px 24px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    border: none;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(192, 57, 43, 0.25);
    transition: all 0.2s;
}

.btn-primary-v3:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(192, 57, 43, 0.35);
}

.alert-v3 {
    padding: 14px 20px;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 600;
}

.alert-danger-v3 {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.alert-success-v3 {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

/* ── Brand Identity V3 ────────────────────────────────────────────────────── */
.brand-card-v3 {
    border-radius: 24px;
    overflow: hidden;
}

.brand-card-header-v3 {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.brand-card-header-toggle-v3 {
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
}

.brand-card-header-toggle-v3:hover {
    background: rgba(255, 255, 255, 0.35);
}

.brand-card-v3.is-collapsed .brand-card-header-toggle-v3 {
    border-bottom-color: transparent;
}

.brand-card-chevron-v3 {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(148, 163, 184, 0.12);
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.brand-card-v3.is-collapsed .brand-card-chevron-v3 {
    transform: rotate(-90deg);
}

.brand-card-header-v3 .header-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    flex-shrink: 0;
}

.brand-card-title-v3 {
    font-size: 1rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
}

.brand-card-subtitle-v3 {
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.brand-card-body-v3 {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.brand-row-v3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    gap: 24px;
}

.brand-section-label-v3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.brand-section-hint-v3 {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-bottom: 12px;
}

.brand-upload-zone-v3 {
    position: relative;
    min-height: 88px;
    border-radius: 16px;
    border: 1.5px dashed rgba(148, 163, 184, 0.4);
    background: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    transition: all 0.2s ease;
    margin-bottom: 12px;
}

.brand-upload-zone-v3:hover {
    border-color: var(--secondary, #4f46e5);
    background: rgba(255, 255, 255, 0.75);
}

.brand-upload-zone-v3.dark {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.12);
}

.brand-upload-zone-v3.dark:hover {
    border-color: var(--secondary, #4f46e5);
}

.brand-upload-zone-v3 img {
    max-height: 60px;
    max-width: 100%;
    object-fit: contain;
}

.brand-upload-placeholder-v3 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #cbd5e1;
    font-size: 0.78rem;
    font-weight: 600;
}

.brand-upload-zone-v3.dark .brand-upload-placeholder-v3 {
    color: #64748b;
}

.brand-upload-placeholder-v3 i {
    font-size: 1.4rem;
}

.brand-actions-v3 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-btn-upload-v3 {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--primary, #6366f1) 10%, transparent);
    color: color-mix(in srgb, var(--primary, #6366f1) 82%, black);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.brand-btn-upload-v3:hover {
    background: color-mix(in srgb, var(--primary, #6366f1) 18%, transparent);
    transform: translateY(-1px);
}

.brand-btn-remove-v3 {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 12px;
    background: rgba(220, 38, 38, 0.08);
    color: #dc2626;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.brand-btn-remove-v3:hover {
    background: rgba(220, 38, 38, 0.16);
    transform: translateY(-1px);
}

.brand-color-row-v3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-color-swatch-v3 {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
    cursor: pointer;
    overflow: hidden;
}

.brand-color-swatch-v3 input[type="color"] {
    position: absolute;
    inset: -4px;
    width: calc(100% + 8px);
    height: calc(100% + 8px);
    border: none;
    padding: 0;
    cursor: pointer;
    background: none;
}

.brand-color-hex-v3 {
    flex: 1;
    font-family: 'SF Mono', 'Roboto Mono', monospace;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.brand-icon-btn-v3 {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.brand-icon-btn-v3.save {
    background: linear-gradient(135deg, var(--secondary, #4f46e5), var(--primary, #1e293b));
    color: #fff;
    box-shadow: 0 6px 14px rgba(79, 70, 229, 0.25);
}

.brand-icon-btn-v3.save:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(79, 70, 229, 0.35);
}

.brand-icon-btn-v3.reset {
    background: rgba(148, 163, 184, 0.12);
    color: #94a3b8;
}

.brand-icon-btn-v3.reset:hover {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

/* ── Company Directory V3 ─────────────────────────────────────────────────── */
.dir-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: .75rem;
}
.dir-page-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary, #1a1a2e);
    margin: 0;
}
.dir-page-title span {
    color: var(--secondary, #c0392b);
}
.dir-search-wrap {
    position: relative;
    max-width: 420px;
    width: 100%;
}
.dir-search-wrap .dir-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: .95rem;
}
.dir-search-input {
    width: 100%;
    padding: .6rem 1rem .6rem 2.4rem;
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 50px;
    font-size: .95rem;
    background: rgba(255,255,255,.7);
    backdrop-filter: blur(6px);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.dir-search-input:focus {
    border-color: var(--secondary, #c0392b);
    box-shadow: 0 0 0 3px rgba(192,57,43,.1);
}
.dir-section-label {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #9ca3af;
    margin: 1.5rem 0 .75rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.dir-section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(0,0,0,.08);
}
.dir-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr));
    gap: 1rem;
}
.dir-card {
    background: rgba(255,255,255,.75);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0,0,0,.07);
    border-radius: 14px;
    padding: 1.1rem 1.2rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: transform .18s, box-shadow .18s;
    position: relative;
}
.dir-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
}
.dir-avatar {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary, #c0392b), #e74c3c);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}
.dir-avatar.dir-avatar-user {
    background: linear-gradient(135deg, #1a1a2e, #2c3e50);
}
.dir-info { flex: 1; min-width: 0; }
.dir-name {
    font-weight: 700;
    font-size: .97rem;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dir-subtitle {
    font-size: .8rem;
    color: #6b7280;
    margin-bottom: .45rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dir-contact-row {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .82rem;
    color: #374151;
    margin-bottom: .2rem;
    min-width: 0;
}
.dir-contact-row i { color: #9ca3af; width: 14px; min-width: 14px; text-align: center; }
.dir-contact-row a {
    color: inherit;
    text-decoration: none;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dir-contact-row a:hover { color: var(--secondary, #c0392b); }
.dir-notes {
    font-size: .78rem;
    color: #9ca3af;
    margin-top: .4rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.dir-badges {
    position: absolute;
    top: .6rem;
    right: .7rem;
    display: flex;
    gap: .3rem;
}
.dir-badge {
    font-size: .65rem;
    font-weight: 600;
    padding: .15em .6em;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.dir-badge-private {
    background: rgba(245,158,11,.12);
    color: #d97706;
    border: 1px solid rgba(245,158,11,.3);
}
.dir-badge-user {
    background: rgba(59,130,246,.1);
    color: #3b82f6;
    border: 1px solid rgba(59,130,246,.2);
}
.dir-actions {
    display: flex;
    gap: .3rem;
    margin-top: .6rem;
}
.dir-btn-call {
    border: 1px solid rgba(34,197,94,.4);
    background: rgba(34,197,94,.08);
    color: #16a34a;
    border-radius: 6px;
    padding: .25rem .6rem;
    font-size: .75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.dir-btn-call:hover {
    background: rgba(34,197,94,.18);
    border-color: rgba(34,197,94,.7);
}
.dir-btn-edit {
    border: 1px solid rgba(0,0,0,.15);
    background: transparent;
    color: #374151;
    border-radius: 6px;
    padding: .25rem .6rem;
    font-size: .75rem;
    cursor: pointer;
    transition: background .15s;
}
.dir-btn-edit:hover { background: rgba(0,0,0,.05); }
.dir-btn-delete {
    border: none;
    background: transparent;
    color: #ef4444;
    border-radius: 6px;
    padding: .25rem .5rem;
    font-size: .75rem;
    cursor: pointer;
    transition: background .15s;
}
.dir-btn-delete:hover { background: rgba(239,68,68,.08); }
.dir-filter-tabs {
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
}
.dir-tab {
    padding: .35rem .9rem;
    border-radius: 20px;
    font-size: .82rem;
    font-weight: 600;
    border: 1px solid rgba(0,0,0,.12);
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    transition: all .15s;
}
.dir-tab.active {
    background: var(--secondary, #c0392b);
    color: #fff;
    border-color: transparent;
}
.dir-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #9ca3af;
    font-size: .95rem;
}
.dir-empty i { font-size: 2.5rem; display: block; margin-bottom: .75rem; opacity: .4; }

.dir-hint {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .55rem .9rem;
    margin-bottom: 1.25rem;
    background: rgba(255,255,255,.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.4);
    border-left: 2px solid rgba(99,179,237,.45);
    border-radius: 8px;
    box-shadow: 0 1px 6px rgba(0,0,0,.04);
    font-size: .8rem;
    color: #6b7280;
    line-height: 1.5;
}
.dir-hint-icon {
    flex-shrink: 0;
    color: rgba(99,179,237,.7);
    font-size: .85rem;
}
.dir-hint em { font-style: normal; color: var(--secondary, #c0392b); font-weight: 600; }

/* ── Scala tipografica del Centralino Live ─────────────────────────────────
   Il tema imposta `html { font-size: 14px }` (connect.min.css), mentre le
   dimensioni della plancia sono scritte con i token di una scala a base 16:
   0.72rem voleva dire 11.5px e ne rendeva 10.1. Il fattore 16/14 = 1.143
   rimette ogni misura dove era stata disegnata.

   La correzione pero' vale solo dove c'e' spazio: padding, gap e la colonna
   softphone sono in px e non si stringono, quindi sotto i 1600px il testo
   piu' grande faceva andare a capo la barra azioni e troncava numeri ed
   etichette. Li' si resta a 1, cioe' a come la plancia rende oggi.

   La variabile vive sul body della sola pagina Centralino Live, messa da
   views/richieste_v3.php: fuori di li' il fallback `1` lascia tutto com'e',
   compresi i .reqb- del modulo richiesta usato anche nella banca dati. */
body.pbx-live-page-v3 { --pbx-fs: 1; }
@media (min-width: 1600px) { body.pbx-live-page-v3 { --pbx-fs: 1.143; } }

/* ── Dialpad PBX V3 ───────────────────────────────────────────────────────── */

/* Trigger button */
/* FAB fisso per aprire il dialpad */
.dialpad-fab {
    position: fixed;
    right: 1.4rem;
    bottom: 5rem;
    z-index: 1040;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #1a1a2e 0%, #2c2c54 100%);
    color: #fff;
    font-size: calc(1.25rem * var(--pbx-fs, 1));
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 18px rgba(0,0,0,.28);
    transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .18s;
}
.dialpad-fab:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 8px 28px rgba(0,0,0,.32);
}
.dialpad-fab:active { transform: scale(.93); }

/* Modal entrance: slide from right */
#DialpadModal {
    overflow: hidden !important;
}
#DialpadModal .modal-dialog {
    margin: 0;
    position: fixed;
    right: 0;
    top: 0;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 1.2rem .9rem;
    pointer-events: none;
}
#DialpadModal.fade .modal-dialog {
    transform: translateX(120%);
    transition: transform .38s cubic-bezier(.22, 1, .36, 1);
}
#DialpadModal.show .modal-dialog {
    transform: translateX(0);
}

.dialpad-dialog { width: 320px; max-width: 96vw; pointer-events: auto; }

.dialpad-modal-content {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(12px);
    box-shadow: 0 24px 60px rgba(0,0,0,.18);
}

.dialpad-header {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: 1.1rem 1.2rem .9rem;
    background: linear-gradient(135deg, #1a1a2e 0%, #2c2c54 100%);
    color: #fff;
}
.dialpad-header-icon {
    width: 38px; height: 38px; min-width: 38px;
    border-radius: 10px;
    background: rgba(255,255,255,.15);
    display: flex; align-items: center; justify-content: center;
    font-size: calc(1.1rem * var(--pbx-fs, 1));
}
.dialpad-header-title { font-weight: 700; font-size: calc(.95rem * var(--pbx-fs, 1)); line-height: 1.2; }
.dialpad-header-sub   { font-size: calc(.72rem * var(--pbx-fs, 1)); opacity: .6; margin-top: 1px; }
.dialpad-close {
    margin-left: auto;
    background: rgba(255,255,255,.12);
    border: none;
    color: #fff;
    width: 30px; height: 30px;
    border-radius: 8px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s;
}
.dialpad-close:hover { background: rgba(255,255,255,.25); }

.dialpad-body {
    padding: 1.2rem 1.1rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: .85rem;
}

.dialpad-contact-select { border-radius: 10px !important; }

.dialpad-display-wrap {
    position: relative;
}
.dialpad-display {
    width: 100%;
    text-align: center;
    font-family: 'Courier New', Courier, monospace;
    font-size: calc(1.5rem * var(--pbx-fs, 1));
    font-weight: 700;
    letter-spacing: 2px;
    border: 1.5px solid rgba(0,0,0,.1);
    border-radius: 12px;
    padding: .55rem 2.8rem .55rem .8rem;
    background: rgba(0,0,0,.025);
    outline: none;
    transition: border-color .2s;
    color: #1a1a2e;
}
.dialpad-display:focus { border-color: #1a1a2e; }
.dialpad-display::placeholder { color: #c4c4c4; font-weight: 400; font-size: calc(1rem * var(--pbx-fs, 1)); letter-spacing: 0; }
.dialpad-backspace-btn {
    position: absolute;
    right: 10px; top: 50%;
    transform: translateY(-50%);
    background: none; border: none;
    color: #9ca3af; font-size: calc(1.1rem * var(--pbx-fs, 1));
    cursor: pointer; padding: 4px;
    transition: color .15s;
}
.dialpad-backspace-btn:hover { color: #374151; }

.dialpad-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.dialpad-key {
    border: 1.5px solid rgba(0,0,0,.08);
    background: rgba(0,0,0,.025);
    border-radius: 12px;
    padding: .7rem .4rem .5rem;
    font-size: calc(1.3rem * var(--pbx-fs, 1));
    font-weight: 700;
    color: #1a1a2e;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    transition: background .12s, transform .1s;
    user-select: none;
}
.dialpad-key span {
    font-size: calc(.55rem * var(--pbx-fs, 1));
    font-weight: 600;
    letter-spacing: .08em;
    color: #9ca3af;
    margin-top: 2px;
}
.dialpad-key:hover    { background: rgba(0,0,0,.06); }
.dialpad-key:active   { background: rgba(0,0,0,.1); transform: scale(.95); }
.dialpad-key-sym      { font-size: calc(1.5rem * var(--pbx-fs, 1)); padding: .65rem .4rem; }

/* Tastierino collassabile: compatto di default, si espande col toggle */
.dialpad-keypad-toggle-v3 {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: .5rem; border: 1px solid rgba(0,0,0,.08);
    background: rgba(0,0,0,.025); border-radius: 10px; cursor: pointer;
    font-size: calc(.76rem * var(--pbx-fs, 1)); font-weight: 700; color: #475569; transition: all .15s ease;
}
.dialpad-keypad-toggle-v3:hover { border-color: #1a1a2e; color: #1a1a2e; }
.dialpad-keypad-caret-v3 { font-size: calc(.68rem * var(--pbx-fs, 1)); transition: transform .2s ease; }
.dialpad-keypad-toggle-v3.is-active .dialpad-keypad-caret-v3 { transform: rotate(180deg); }
.dialpad-keypad-collapse-v3 { display: none; }
.dialpad-keypad-collapse-v3.is-open { display: block; }

/* ── Ricerca rubrica + separatore (veste "softphone") ─────────────────── */
.dialpad-search-v3 { display: flex; flex-direction: column; gap: 5px; }
.dialpad-search-label-v3 {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: calc(.66rem * var(--pbx-fs, 1)); font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #94a3b8;
}
.dialpad-search-label-v3 i { color: #6366f1; }
/* select2 v4 dentro al softphone: campo ricerca con lente */
.dialpad-body .select2-container { width: 100% !important; }
.dialpad-body .select2-container--default .select2-selection--single {
    height: 52px; border: 1.5px solid rgba(0,0,0,.09); border-radius: 13px;
    background: #f8fafc; display: flex; align-items: center; padding: 0 14px;
    box-shadow: none; position: relative; cursor: text;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.dialpad-body .select2-container--default .select2-selection--single:hover { border-color: rgba(0,0,0,.16); }
.dialpad-body .select2-container--default.select2-container--open .select2-selection--single,
.dialpad-body .select2-container--default .select2-selection--single:focus-within {
    border-color: #6366f1; background: #fff; box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}
/* lente a sinistra */
.dialpad-body .select2-selection__rendered::before {
    content: "\f002"; font: 900 .82rem/1 "Font Awesome 6 Free"; color: #94a3b8; margin-right: 10px; flex: 0 0 auto;
}
.dialpad-body .select2-container--default .select2-selection--single .select2-selection__rendered {
    display: flex; align-items: center; line-height: normal; color: #1a1a2e; font-weight: 600; font-size: calc(.88rem * var(--pbx-fs, 1)); padding: 0; min-width: 0; width: 100%;
}
.dialpad-body .select2-container--default .select2-selection--single .select2-selection__placeholder { color: #9ca3af; font-weight: 400; font-size: calc(.88rem * var(--pbx-fs, 1)); }
/* è una ricerca, non un menu: via la freccetta del dropdown */
.dialpad-body .select2-container--default .select2-selection--single .select2-selection__arrow { display: none; }
/* clear (×) come pallino tondo a destra */
.dialpad-body .select2-container--default .select2-selection--single .select2-selection__clear {
    order: 9; margin: 0 0 0 auto; width: 19px; height: 19px; flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; background: rgba(0,0,0,.06); color: #64748b; font-weight: 700; font-size: calc(.82rem * var(--pbx-fs, 1)); line-height: 1;
    transition: background .15s, color .15s;
}
.dialpad-body .select2-container--default .select2-selection--single .select2-selection__clear:hover { background: #fee2e2; color: #dc2626; }
/* contatto selezionato: nome + numero pill */
.dp-sel-v3 { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.dp-sel-name-v3 { font-weight: 700; color: #1a1a2e; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-sel-num-v3 { flex: 0 0 auto; font-size: .76rem; font-weight: 600; color: #475569; background: rgba(99,102,241,.1); padding: 1px 8px; border-radius: 7px; font-variant-numeric: tabular-nums; }
/* Dropdown della rubrica (agganciato al body → scoped con dropdownCssClass) */
.select2-dropdown.dialpad-dropdown-v3 {
    border: 1.5px solid rgba(99,102,241,.22); border-radius: 14px;
    box-shadow: 0 20px 48px -14px rgba(15,23,42,.30); overflow: hidden; padding: 6px;
    background: #fff;
}
.dialpad-dropdown-v3.select2-dropdown--above { margin-bottom: 5px; }
.dialpad-dropdown-v3.select2-dropdown--below { margin-top: 5px; }
.dialpad-dropdown-v3 .select2-search--dropdown { padding: 3px 3px 6px; }
.dialpad-dropdown-v3 .select2-search--dropdown .select2-search__field {
    border: 1.5px solid rgba(0,0,0,.1) !important; border-radius: 10px; padding: 8px 11px;
    font-size: calc(.88rem * var(--pbx-fs, 1)); outline: none; box-shadow: none; background: rgba(0,0,0,.02);
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.dialpad-dropdown-v3 .select2-search--dropdown .select2-search__field:focus {
    border-color: #6366f1 !important; box-shadow: 0 0 0 3px rgba(99,102,241,.12); background: #fff;
}
.dialpad-dropdown-v3 .select2-results__message { color: #94a3b8; font-size: calc(.8rem * var(--pbx-fs, 1)); padding: 12px 8px; text-align: center; }
.dialpad-dropdown-v3 .select2-results__options { max-height: 264px; }
.dialpad-dropdown-v3 .select2-results__option { border-radius: 10px; padding: 7px 9px; margin-bottom: 2px; font-size: calc(.85rem * var(--pbx-fs, 1)); transition: background .12s; }
.dialpad-dropdown-v3 .select2-results__option--highlighted[aria-selected] { background: rgba(99,102,241,.12) !important; color: #1a1a2e !important; }
.dialpad-dropdown-v3 .select2-results__option[aria-selected=true] { background: rgba(99,102,241,.06); }
/* separatore "oppure componi il numero" */
.dialpad-sep-v3 { display: flex; align-items: center; gap: 10px; }
.dialpad-sep-v3::before, .dialpad-sep-v3::after { content: ''; flex: 1; height: 1px; background: rgba(0,0,0,.07); }
.dialpad-sep-v3 span { font-size: calc(.64rem * var(--pbx-fs, 1)); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #b0b8c4; white-space: nowrap; }

.dialpad-call-btn {
    width: 60px; height: 60px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    font-size: calc(1.4rem * var(--pbx-fs, 1));
    cursor: pointer;
    align-self: center;
    box-shadow: 0 6px 20px rgba(34,197,94,.4);
    transition: transform .15s, box-shadow .15s;
    display: flex; align-items: center; justify-content: center;
}
.dialpad-call-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 28px rgba(34,197,94,.5);
}
.dialpad-call-btn:active { transform: scale(.96); }

/* ── In-call screen ────────────────────────────────────────────────── */
.dialpad-incall {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2.6rem 1.4rem 2rem;
    gap: .5rem;
    background: radial-gradient(125% 80% at 50% 0%, #2c2c5a 0%, #16162e 55%, #0d0d1d 100%);
    border-radius: 0 0 20px 20px;
    overflow: hidden;
}
/* alone ambientale dietro all'avatar */
.dialpad-incall::before {
    content: '';
    position: absolute; top: -38%; left: 50%; transform: translateX(-50%);
    width: 280px; height: 280px; border-radius: 50%;
    background: radial-gradient(circle, rgba(124,92,246,.4), transparent 62%);
    pointer-events: none;
}
.dialpad-incall-avatar {
    position: relative; z-index: 1;
    width: 86px; height: 86px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: calc(1.75rem * var(--pbx-fs, 1));
    font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 12px 32px rgba(99,102,241,.5);
    margin-bottom: .55rem;
}
/* anelli pulsanti "in squillo/chiamata" */
.dialpad-incall-avatar::before,
.dialpad-incall-avatar::after {
    content: '';
    position: absolute; inset: -9px;
    border-radius: 50%;
    border: 2px solid rgba(139,92,246,.55);
    animation: dialpad-ring 2.1s ease-out infinite;
    pointer-events: none;
}
.dialpad-incall-avatar::after { animation-delay: 1.05s; }
@keyframes dialpad-ring {
    0%   { transform: scale(.82); opacity: .75; }
    100% { transform: scale(1.55); opacity: 0; }
}
.dialpad-incall-number {
    position: relative; z-index: 1;
    font-size: calc(1.4rem * var(--pbx-fs, 1));
    font-weight: 800;
    letter-spacing: 1px;
    color: #fff;
}
.dialpad-incall-label {
    position: relative; z-index: 1;
    display: inline-flex; align-items: center; gap: 7px;
    font-size: calc(.72rem * var(--pbx-fs, 1));
    color: rgba(255,255,255,.65);
    letter-spacing: .06em;
    text-transform: uppercase;
}
.dialpad-incall-label::before {
    content: '';
    width: 7px; height: 7px; border-radius: 50%;
    background: #22c55e;
    animation: pbx-live-blink 1.6s infinite;
}
.dialpad-incall-timer {
    position: relative; z-index: 1;
    font-variant-numeric: tabular-nums;
    font-size: calc(2.1rem * var(--pbx-fs, 1));
    font-weight: 800;
    letter-spacing: 2px;
    color: #fff;
    margin: .55rem 0 1.4rem;
    text-align: center;
    transition: font-size .25s, color .25s;
}
.dialpad-incall-timer.is-hint {
    font-size: calc(.8rem * var(--pbx-fs, 1));
    font-weight: 500;
    letter-spacing: .02em;
    color: rgba(255,255,255,.6);
    font-style: italic;
    text-transform: none;
}
.dialpad-incall-label.is-hint-label::before { background: #f59e0b; }
.dialpad-hangup-btn {
    position: relative; z-index: 1;
    width: 66px; height: 66px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #f43f5e, #b91c1c);
    color: #fff;
    font-size: calc(1.4rem * var(--pbx-fs, 1));
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 30px rgba(244,63,94,.5);
    transition: transform .15s, box-shadow .15s;
}
.dialpad-hangup-btn::after {
    content: '';
    position: absolute; inset: -6px; border-radius: 50%;
    border: 2px solid rgba(244,63,94,.45);
    animation: dialpad-ring 1.9s ease-out infinite;
    pointer-events: none;
}
.dialpad-hangup-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 36px rgba(244,63,94,.65);
}
.dialpad-hangup-btn:active { transform: scale(.94); }
/* durante la chiamata il footer chiaro stona con lo schermo scuro */
.softphone-panel-v3.is-incall .dialpad-footer { display: none; }

/* ── Chiamata in arrivo: Rispondi / Rifiuta ───────────────────────────── */
.dialpad-incoming-actions {
    position: relative; z-index: 1;
    display: flex; align-items: center; justify-content: center;
    gap: 2.4rem;
    margin-top: .4rem;
}
.dialpad-answer-btn {
    position: relative;
    width: 66px; height: 66px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    font-size: calc(1.4rem * var(--pbx-fs, 1));
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 30px rgba(34,197,94,.5);
    transition: transform .15s, box-shadow .15s;
}
.dialpad-answer-btn::after {
    content: '';
    position: absolute; inset: -6px; border-radius: 50%;
    border: 2px solid rgba(34,197,94,.5);
    animation: dialpad-ring 1.9s ease-out infinite;
    pointer-events: none;
}
.dialpad-answer-btn:hover { transform: scale(1.08); box-shadow: 0 12px 36px rgba(34,197,94,.65); }
.dialpad-answer-btn:active { transform: scale(.94); }
.dialpad-answer-btn:disabled { opacity: .6; cursor: default; }
/* in arrivo, il tasto rosso è di rifiuto: niente alone pulsante extra */
.dialpad-hangup-sm { width: 58px; height: 58px; font-size: calc(1.25rem * var(--pbx-fs, 1)); }

/* ── Barra azioni in chiamata: Trasferisci · Tasti · Chiudi ───────────── */
.dialpad-incall-actions {
    position: relative; z-index: 1;
    display: flex; align-items: flex-start; justify-content: center;
    gap: 1.4rem;
    margin-top: .3rem;
}
.dialpad-act-btn {
    display: flex; flex-direction: column; align-items: center; gap: 7px;
    border: none; background: none; cursor: pointer;
    color: rgba(255,255,255,.82);
    font-size: calc(.68rem * var(--pbx-fs, 1)); font-weight: 600; letter-spacing: .03em;
    transition: color .15s;
}
.dialpad-act-btn .dialpad-act-ico {
    width: 54px; height: 54px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: calc(1.2rem * var(--pbx-fs, 1));
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.16);
    transition: background .15s, transform .12s;
}
.dialpad-act-btn:hover { color: #fff; }
.dialpad-act-btn:hover .dialpad-act-ico { background: rgba(255,255,255,.18); }
.dialpad-act-btn:active .dialpad-act-ico { transform: scale(.92); }
.dialpad-act-hangup { color: #fda4af; }
.dialpad-act-hangup .dialpad-act-ico {
    background: linear-gradient(135deg, #f43f5e, #b91c1c);
    border-color: transparent;
    box-shadow: 0 8px 22px rgba(244,63,94,.45);
}
.dialpad-act-hangup:hover { color: #fff; }
.dialpad-act-hangup:hover .dialpad-act-ico { background: linear-gradient(135deg, #fb5773, #c81e1e); }

/* ── Pannello trasferimento ───────────────────────────────────────────── */
.dialpad-transfer-panel {
    position: relative; z-index: 1;
    display: flex; align-items: center; gap: 8px;
    width: 100%;
    margin: .2rem 0 .2rem;
}
.dialpad-transfer-input {
    flex: 1; min-width: 0;
    border: 1px solid rgba(255,255,255,.2);
    background: rgba(255,255,255,.08);
    color: #fff;
    border-radius: 12px;
    padding: .6rem .8rem;
    font-size: calc(.95rem * var(--pbx-fs, 1));
    outline: none;
}
.dialpad-transfer-input::placeholder { color: rgba(255,255,255,.45); }
.dialpad-transfer-input:focus { border-color: rgba(139,92,246,.7); background: rgba(255,255,255,.12); }
.dialpad-transfer-go {
    flex: 0 0 auto;
    width: 42px; height: 42px; border-radius: 12px;
    border: none; cursor: pointer;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff; font-size: calc(1rem * var(--pbx-fs, 1));
    display: flex; align-items: center; justify-content: center;
    transition: transform .12s, filter .12s;
}
.dialpad-transfer-go:hover { filter: brightness(1.1); }
.dialpad-transfer-go:active { transform: scale(.94); }
.dialpad-transfer-go:disabled { opacity: .6; cursor: default; }

/* ── Tastierino DTMF in chiamata (su sfondo scuro) ────────────────────── */
.dialpad-dtmf-panel {
    position: relative; z-index: 1;
    width: 100%;
    margin: .2rem 0 .3rem;
}
.dialpad-grid-dtmf { gap: 7px; }
.dialpad-grid-dtmf .dialpad-dtmf-key {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.16);
    color: #fff;
    padding: .55rem .4rem;
    font-size: calc(1.15rem * var(--pbx-fs, 1));
}
.dialpad-grid-dtmf .dialpad-dtmf-key:hover  { background: rgba(255,255,255,.16); }
.dialpad-grid-dtmf .dialpad-dtmf-key:active { background: rgba(255,255,255,.24); transform: scale(.95); }

/* ── Info Contatto modal — refresh V3 (scoped, non tocca l'HTML server) ───── */
#buyerleadhistoryModal .modal-content { border: none; border-radius: 22px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.28); }
#buyerleadhistoryModal .modal-header { background: #fff; border-bottom: 1px solid #eef2f7; padding: 18px 24px; align-items: center; }
#buyerleadhistoryModal .modal-title { font-weight: 800; font-size: 1.05rem; color: #1c2434; letter-spacing: .01em; }
#buyerleadhistoryModal .modal-header .close { font-size: 1.5rem; opacity: .45; transition: opacity .15s; }
#buyerleadhistoryModal .modal-header .close:hover { opacity: 1; }
#buyerleadhistoryModal .modal-body { padding: 22px 24px; }
#buyerleadhistoryModal .modal-footer { border-top: 1px solid #eef2f7; padding: 14px 24px; }
#buyerleadhistoryModal .profile-img img { width: 84px !important; height: 84px !important; border-radius: 50% !important; object-fit: cover; border: 3px solid #fff; box-shadow: 0 8px 24px rgba(0,0,0,.12); background: #f1f5f9; }
#buyerleadhistoryModal .profile-name span { color: #475569; }
#buyerleadhistoryModal .profile-name hr, #buyerleadhistoryModal > .modal-dialog hr { margin: 10px 0; border-color: #eef2f7; }
#buyerleadhistoryModal .nav-tabs { border-bottom: 1px solid #eef2f7; gap: 6px; }
#buyerleadhistoryModal .nav-tabs .nav-link { border: none !important; border-radius: 12px 12px 0 0; color: #94a3b8; font-weight: 700; padding: 10px 16px; transition: all .15s ease; }
#buyerleadhistoryModal .nav-tabs .nav-link:hover { color: #1c2434; background: #f8fafc; }
#buyerleadhistoryModal .nav-tabs .nav-link.active { color: var(--primary, #6366f1); background: color-mix(in srgb, var(--primary, #6366f1) 8%, white); border-bottom: 2px solid var(--primary, #6366f1) !important; }
#buyerleadhistoryModal table.dataTable thead th { border: none; color: #94a3b8; font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 800; }
#buyerleadhistoryModal table.dataTable tbody td { border: none; border-top: 1px solid #f1f5f9; vertical-align: middle; font-size: .82rem; }
#buyerleadhistoryModal table.dataTable tbody tr:hover { background: #f8fafc; }
#buyerleadhistoryModal td .btn { border-radius: 10px !important; }
#buyerleadhistoryModal .modal-footer .btn { border-radius: 12px; font-weight: 700; padding: 8px 18px; }

/* Scheda contatto incorporata inline nell'identikit (riusa il look della modale) */
.pbx-ik-full-v3 { margin-top: 2px; }
.pbx-ik-full-v3 .profile-header { margin-bottom: 4px; }
.pbx-ik-full-v3 .profile-img img { width: 64px !important; height: 64px !important; border-radius: 50% !important; object-fit: cover; border: 3px solid #fff; box-shadow: 0 8px 24px rgba(0,0,0,.12); background: #f1f5f9; }
.pbx-ik-full-v3 .profile-name { margin-top: 8px !important; }
.pbx-ik-full-v3 .profile-name span { color: #475569; font-size: calc(.9rem * var(--pbx-fs, 1)); }
.pbx-ik-full-v3 .profile-name hr, .pbx-ik-full-v3 hr { margin: 8px 0; border-color: #eef2f7; }
.pbx-ik-full-v3 .nav-tabs { border-bottom: 1px solid #eef2f7; gap: 6px; flex-wrap: wrap; }
.pbx-ik-full-v3 .nav-tabs .nav-link { border: none !important; border-radius: 12px 12px 0 0; color: #94a3b8; font-weight: 700; padding: 8px 14px; font-size: calc(.82rem * var(--pbx-fs, 1)); transition: all .15s ease; }
.pbx-ik-full-v3 .nav-tabs .nav-link:hover { color: #1c2434; background: #f8fafc; }
.pbx-ik-full-v3 .nav-tabs .nav-link.active { color: var(--primary, #6366f1); background: color-mix(in srgb, var(--primary, #6366f1) 8%, white); border-bottom: 2px solid var(--primary, #6366f1) !important; }
.pbx-ik-full-v3 table.dataTable thead th { border: none; color: #94a3b8; font-size: calc(.68rem * var(--pbx-fs, 1)); text-transform: uppercase; letter-spacing: .04em; font-weight: 800; }
.pbx-ik-full-v3 table.dataTable tbody td { border: none; border-top: 1px solid #f1f5f9; vertical-align: middle; font-size: calc(.8rem * var(--pbx-fs, 1)); }
.pbx-ik-full-v3 table.dataTable tbody tr:hover { background: #f8fafc; }
.pbx-ik-full-v3 td .btn { border-radius: 10px !important; }
.pbx-ik-full-v3 .dataTables_wrapper { padding-top: 4px; }

.dialpad-footer {
    font-size: calc(.72rem * var(--pbx-fs, 1));
    color: #9ca3af;
    text-align: center;
    padding: .6rem 1.1rem .85rem;
    border-top: 1px solid rgba(0,0,0,.06);
}
.dialpad-footer i { margin-right: 3px; }
.dialpad-footer a { color: #6366f1; font-weight: 700; text-decoration: none; }
.dialpad-footer a:hover { color: #4f46e5; text-decoration: underline; }

/* ── remoteModal glass override ─────────────────────────────────────────────
   Neutralizza il wrapper Bootstrap SOLO quando il contenuto usa .modal-content-glass-v3
   Per i modal old-style (con .card) Bootstrap mantiene il suo sfondo bianco
   ─────────────────────────────────────────────────────────────────────────── */
/* Header e footer Bootstrap sempre nascosti (vuoti) per tutti i remoteModal */
#remoteModal > .modal-dialog > .modal-content > .modal-header {
    display: none !important;
}
#remoteModal > .modal-dialog > .modal-content > .modal-footer {
    display: none !important;
}
/* Padding top per tutti i remoteModal dato che l'header Bootstrap è nascosto */
#remoteModal > .modal-dialog > .modal-content > .modal-body {
    padding-top: 20px !important;
}
/* Glass-v3: azzera il padding perché il contenuto porta il proprio layout */
#remoteModal:has(.modal-content-glass-v3) > .modal-dialog > .modal-content > .modal-body {
    padding: 0 !important;
}
/* Wrapper trasparente solo per modal glass-v3 (il contenuto porta il proprio box) */
#remoteModal:has(.modal-content-glass-v3) .modal-content {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}
#remoteModal:has(.modal-content-glass-v3) > .modal-dialog > .modal-content > .modal-body {
    padding: 0 !important;
}
/* Assicura che la glass card abbia sfondo semi-trasparente visibile */
#remoteModal .modal-content-glass-v3 {
    background: rgba(248, 249, 252, 0.96) !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    border-radius: 24px !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15), 0 0 0 1px rgba(255,255,255,0.6) inset !important;
    overflow: hidden;
}
/* Header e footer su un tono appena più scuro, il contenuto più chiaro: le tre parti si distinguono */
.modal-content-glass-v3 .modal-header-v3 { background: rgba(241, 245, 249, 0.75); }
.modal-content-glass-v3 .modal-body { background: rgba(255, 255, 255, 0.72); }
#remoteModal .modal-footer-v3 {
    background: rgba(241, 245, 249, 0.6) !important;
    border-top: 1px solid rgba(226, 232, 240, 0.6) !important;
    border-radius: 0 0 24px 24px;
}

/* ── remoteModal old-style: upgrade globale al look V3 ───────────────────────
   Applicato ai remoteModal che NON usano .modal-content-glass-v3.
   Zero modifiche ai file PHP — solo CSS.
   ─────────────────────────────────────────────────────────────────────────── */

/* 1. Modal-content: aspetto glass V3 */
#remoteModal:not(:has(.modal-content-glass-v3)) > .modal-dialog > .modal-content {
    background: rgba(248, 249, 252, 0.97) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    border-radius: 28px !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.6) inset !important;
    overflow: hidden !important;
}

/* 2. Modal-body: padding zero — layout gestito dalla card e dalla footer area */
#remoteModal:not(:has(.modal-content-glass-v3)) > .modal-dialog > .modal-content > .modal-body {
    padding: 0 !important;
}

/* 3. Card interna: rimuove il proprio box — il contenitore è il modal-content.
   Il box-shadow bottom simula la riga separatrice prima dei bottoni. */
#remoteModal:not(:has(.modal-content-glass-v3)) .card {
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    margin-bottom: 0 !important;
    box-shadow: 0 1px 0 rgba(226, 232, 240, 0.9) !important;
}

/* 4. Card-header.plaincolor → look V3: sfondo bianco, testo scuro, flex con
   icona simulata tramite ::before (quadrato gradient come i modal V3) */
#remoteModal:not(:has(.modal-content-glass-v3)) .card-header.plaincolor {
    background: transparent !important;
    color: #1e293b !important;
    border-radius: 0 !important;
    margin-top: 0 !important;
    padding: 20px 30px !important;
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.01em !important;
    text-transform: none !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.7) !important;
    border-left: none !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
}
/* Blocco icona gradient simulato — stesso look dell'header-icon-wrap nei modal V3
   Icona placeholder generica (matita): uguale per tutti i modal old-style.
   Per icone custom per-modal occorre aggiungere un <i> nel PHP. */
#remoteModal:not(:has(.modal-content-glass-v3)) .card-header.plaincolor::before {
    content: '\f304' !important; /* fa-pen */
    font-family: 'Font Awesome 5 Free' !important;
    font-weight: 900 !important;
    font-size: 0.95rem !important;
    color: #ffffff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    width: 40px !important;
    height: 40px !important;
    background: linear-gradient(135deg, var(--secondary), var(--primary)) !important;
    border-radius: 12px !important;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15) !important;
}

/* 5. Card-body: padding uniforme; chiaro, come il .modal-body dei modal V3 */
#remoteModal:not(:has(.modal-content-glass-v3)) .card-body {
    padding: 24px 30px !important;
    background: rgba(255, 255, 255, 0.72) !important;
}

/* 5b. Stessi toni dei modal V3 (DESIGN.md §13): header e area pulsanti un filo più scuri,
   contenuto più chiaro. Il fondo del modal-content fa da footer; le card affiancate si
   allungano alla stessa altezza così il chiaro arriva fino in fondo in ogni colonna. */
#remoteModal:not(:has(.modal-content-glass-v3)) > .modal-dialog > .modal-content {
    background: rgba(241, 245, 249, 0.97) !important;
}
#remoteModal:not(:has(.modal-content-glass-v3)) .modal-body .card > .card-header.plaincolor {
    background: rgba(241, 245, 249, 0.75) !important;
}
#remoteModal:not(:has(.modal-content-glass-v3)) .modal-body .row > [class*="col-"] > .card:only-child {
    height: 100% !important;
}
#remoteModal:not(:has(.modal-content-glass-v3)) .modal-body .row > [class*="col-"] > .card:only-child > .card-body {
    flex: 1 1 auto !important;
}
/* Card unica in una colonna stretta (col-md-10 in alcuni form): occupa tutta la larghezza */
#remoteModal:not(:has(.modal-content-glass-v3)) .modal-body .row > [class*="col-"]:only-child:has(> .card:only-child) {
    flex: 0 0 100% !important;
    max-width: 100% !important;
}
/* Card affiancate: niente fessura scura tra le colonne, solo una linea sottile */
#remoteModal:not(:has(.modal-content-glass-v3)) .modal-body .row:has(> [class*="col-"] > .card:only-child) {
    margin-left: 0 !important;
    margin-right: 0 !important;
}
#remoteModal:not(:has(.modal-content-glass-v3)) .modal-body .row > [class*="col-"]:has(> .card:only-child) {
    padding-left: 0 !important;
    padding-right: 0 !important;
}
#remoteModal:not(:has(.modal-content-glass-v3)) .modal-body .row > [class*="col-"]:has(> .card:only-child) + [class*="col-"]:has(> .card:only-child) {
    border-left: 1px solid rgba(226, 232, 240, 0.9);
}

/* 6. Area footer — bottoni azione fuori dal .card.
   I bottoni possono essere in .float-right, diretti in modal-body, o in form.
   Tutti vengono floatati a destra per coerenza con il look V3. */

/* Base: tutti i .btn dell'area footer (fuori dalla .card) */
#remoteModal:not(:has(.modal-content-glass-v3)) .modal-body .btn:not(.card .btn) {
    border-radius: 10px !important;
    font-weight: 600 !important;
    padding: 9px 20px !important;
    float: right !important;
    margin: 0 0 20px 8px !important;
}
/* Bottone "Chiudi"/"Annulla" (btn-default): stile outline neutro come V3 */
#remoteModal:not(:has(.modal-content-glass-v3)) .modal-body .btn.btn-default:not(.card .btn) {
    background: #f1f5f9 !important;
    color: #64748b !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: none !important;
}
#remoteModal:not(:has(.modal-content-glass-v3)) .modal-body .btn.btn-default:not(.card .btn):hover {
    background: #e2e8f0 !important;
    color: #475569 !important;
}
/* Bottone primario: gradient V3 con primary/secondary del tema */
#remoteModal:not(:has(.modal-content-glass-v3)) .modal-body .btn.btn-primary:not(.card .btn) {
    background: linear-gradient(135deg, var(--secondary), var(--primary)) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}
#remoteModal:not(:has(.modal-content-glass-v3)) .modal-body .btn.btn-primary:not(.card .btn):hover {
    background: linear-gradient(135deg, var(--secondary), var(--primary)) !important;
    opacity: 0.9 !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25) !important;
}
/* .float-right wrapper: padding verticale intorno all'area bottoni */
#remoteModal:not(:has(.modal-content-glass-v3)) .modal-body .float-right:has(.btn) {
    width: 100% !important;
    padding: 16px 30px 16px 0 !important;
    display: flex !important;
    justify-content: flex-end !important;
    gap: 8px !important;
}
/* In fila come nei modal V3: Chiudi/Annulla prima, l'azione principale per ultima a destra */
#remoteModal:not(:has(.modal-content-glass-v3)) .modal-body .float-right:has(.btn) > .btn {
    float: none !important;
    margin: 0 !important;
    order: 1;
}
#remoteModal:not(:has(.modal-content-glass-v3)) .modal-body .float-right:has(.btn) > .btn-default,
#remoteModal:not(:has(.modal-content-glass-v3)) .modal-body .float-right:has(.btn) > .btn-secondary {
    order: 0;
}
/* Bottoni diretti in modal-body o form: margin-top per separazione dal contenuto */
#remoteModal:not(:has(.modal-content-glass-v3)) .modal-body > .btn:not(.card .btn),
#remoteModal:not(:has(.modal-content-glass-v3)) .modal-body > form > .btn:not(.card .btn) {
    margin-top: 4px !important;
}
/* Pulsanti diretti nel body o nel form (senza .float-right): in fila a destra come .modal-footer-v3,
   Chiudi/Annulla prima e azione principale per ultima; il resto del contenuto resta a tutta larghezza */
#remoteModal:not(:has(.modal-content-glass-v3)) > .modal-dialog > .modal-content > .modal-body:has(> .btn),
#remoteModal:not(:has(.modal-content-glass-v3)) .modal-body > form:has(> .btn) {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 8px !important;
}
#remoteModal:not(:has(.modal-content-glass-v3)) > .modal-dialog > .modal-content > .modal-body:has(> .btn) > :not(.btn),
#remoteModal:not(:has(.modal-content-glass-v3)) .modal-body > form:has(> .btn) > :not(.btn) {
    flex: 0 0 100% !important;
    max-width: 100% !important;
}
#remoteModal:not(:has(.modal-content-glass-v3)) .modal-body > .btn:not(.card .btn),
#remoteModal:not(:has(.modal-content-glass-v3)) .modal-body > form > .btn:not(.card .btn) {
    float: none !important;
    margin: 16px 0 16px 0 !important;
    order: 2;
}
#remoteModal:not(:has(.modal-content-glass-v3)) .modal-body > .btn:not(.card .btn):last-of-type,
#remoteModal:not(:has(.modal-content-glass-v3)) .modal-body > form > .btn:not(.card .btn):last-of-type { margin-right: 30px !important; }
#remoteModal:not(:has(.modal-content-glass-v3)) .modal-body > .btn.btn-default:not(.card .btn),
#remoteModal:not(:has(.modal-content-glass-v3)) .modal-body > form > .btn.btn-default:not(.card .btn) {
    order: 1;
}
/* Clearfix dopo i bottoni float */
#remoteModal:not(:has(.modal-content-glass-v3)) > .modal-dialog > .modal-content > .modal-body::after {
    content: '' !important;
    display: block !important;
    clear: both !important;
}

/* ── Sessioni & Sicurezza (accordion) ─────────────────────────────────────── */
.acc-sessions-v3 {
    margin: 12px 0 4px 0;
    border-top: 1px solid rgba(226, 232, 240, 0.7);
    padding-top: 14px;
}
.sessions-modal-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.sessions-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}
.sessions-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #64748b;
}
.sessions-header-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.btn-sessions-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1.5px solid #e2e8f0;
    background: rgba(255,255,255,0.7);
    color: #475569;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.btn-sessions-action:hover {
    background: rgba(241,245,249,0.95);
    border-color: #cbd5e1;
    color: #1e293b;
}
.btn-sessions-action.btn-sessions-danger {
    border-color: #fecaca;
    color: #dc2626;
    background: rgba(254,242,242,0.7);
}
.btn-sessions-action.btn-sessions-danger:hover {
    background: rgba(254,226,226,0.95);
    border-color: #fca5a5;
}
.btn-sessions-action.btn-sessions-unlock {
    border-color: #bbf7d0;
    color: #16a34a;
    background: rgba(240,253,244,0.7);
}
.btn-sessions-action.btn-sessions-unlock:hover {
    background: rgba(220,252,231,0.95);
    border-color: #86efac;
}
.sessions-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.sessions-placeholder {
    font-size: 0.78rem;
    color: #94a3b8;
    font-style: italic;
}
.session-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 10px;
    background: rgba(248,250,252,0.8);
    border: 1px solid rgba(226,232,240,0.6);
}
.session-device-icon {
    color: #94a3b8;
    font-size: 0.95rem;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}
.session-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.session-browser {
    font-size: 0.78rem;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.session-meta {
    font-size: 0.7rem;
    color: #94a3b8;
}
.session-current-badge {
    display: inline-block;
    margin-left: 5px;
    padding: 1px 6px;
    background: var(--primary, #6366f1);
    color: #fff;
    border-radius: 20px;
    font-size: 0.62rem;
    font-weight: 700;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.btn-session-kill {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid #fecaca;
    background: rgba(254,242,242,0.7);
    color: #dc2626;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    padding: 0;
}
.btn-session-kill:hover {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

/* ── Abbonamenti ──────────────────────────────────────────────────────────── */

.btn-acc-subs {
    border-color: color-mix(in srgb, var(--primary, #6366f1) 30%, white);
    color: color-mix(in srgb, var(--primary, #6366f1) 82%, black);
}
.btn-acc-subs:hover {
    background: color-mix(in srgb, var(--primary, #6366f1) 82%, black);
    color: #fff;
}

.subs-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(248,250,252,0.8);
    border: 1px solid rgba(226,232,240,0.6);
    margin-bottom: 6px;
}
.subs-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.subs-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #1e293b;
}
.subs-type {
    font-size: 0.7rem;
    font-weight: 500;
    color: #94a3b8;
    margin-left: 4px;
}
.subs-badge {
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.subs-status-active {
    background: rgba(220,252,231,0.9);
    color: #15803d;
    border: 1px solid #bbf7d0;
}
.subs-status-inactive {
    background: rgba(241,245,249,0.9);
    color: #94a3b8;
    border: 1px solid #e2e8f0;
}
.subs-provider {
    font-size: 0.65rem;
    font-weight: 600;
    color: #94a3b8;
    background: rgba(241,245,249,0.8);
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 1px 5px;
    margin-left: 4px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* ── Team badge (accordion header) ──────────────────────────────────────── */
.user-team-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
}
.team-badge-leader {
    background: color-mix(in srgb, var(--primary, #6366f1) 10%, transparent);
    color: color-mix(in srgb, var(--primary, #6366f1) 82%, black);
    border: 1px solid color-mix(in srgb, var(--primary, #6366f1) 25%, transparent);
}
.team-badge-member {
    background: color-mix(in srgb, var(--primary, #6366f1) 10%, transparent);
    color: color-mix(in srgb, var(--primary, #6366f1) 82%, black);
    border: 1px solid color-mix(in srgb, var(--primary, #6366f1) 25%, transparent);
    font-size: 0.72rem;
    padding: 3px 7px;
}

/* ── Team members inline section ─────────────────────────────────────────── */
.team-badge-clickable {
    cursor: pointer;
    user-select: none;
}
.team-badge-clickable:hover {
    background: rgba(251,191,36,0.25);
}
.team-badge-chevron {
    font-size: 0.6rem;
    margin-left: 2px;
    transition: transform 0.2s;
}
.team-members-section {
    margin: 8px 0 12px 0;
    border: 1px solid rgba(251,191,36,0.25);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255,251,235,0.5);
}
.team-members-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #92400e;
    padding: 8px 14px 6px;
    border-bottom: 1px solid rgba(251,191,36,0.2);
}
.team-members-list {
    display: flex;
    flex-direction: column;
}
.team-member-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    text-decoration: none;
    transition: background 0.12s;
    border-bottom: 1px solid rgba(251,191,36,0.12);
}
.team-member-row:last-child { border-bottom: none; }
.team-member-row:hover { background: rgba(251,191,36,0.1); text-decoration: none; }
.team-member-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg,#f59e0b,#d97706);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.team-member-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.team-member-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1e293b;
}
.team-member-role {
    font-size: 0.68rem;
    color: #94a3b8;
}
.team-member-disabled {
    font-size: 0.65rem;
    color: #ef4444;
    font-weight: 600;
    margin-left: 5px;
}
.team-member-link {
    font-size: 0.65rem;
    color: #cbd5e1;
    flex-shrink: 0;
}
.team-member-row:hover .team-member-link { color: #f59e0b; }

.badge-loading-placeholder {
    display: inline-block;
    width: 22px;
    height: 16px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    background: #e2e8f0;
    vertical-align: middle;
}
.badge-loading-placeholder::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: avatar-shimmer 1.4s infinite;
}

/* Tab counter badges — tenue di default, viola sulla tab attiva */
.nav-tabs .nav-link .tab-counter {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 20px;
    margin-left: 5px;
    vertical-align: middle;
    background: #dde3f0;
    color: #7a85a3;
    transition: background 0.2s, color 0.2s;
}

/* ── Richieste V3 — pill counts, filter chips, DT footer, skeleton */

/* Status badge stile Monday (colonna Stato) — colore pieno, larghezza fissa
   uniforme così le righe restano allineate senza riempire tutta la colonna. */
.status-pill-v3 {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 190px;
    min-height: 30px;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-align: center;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
    cursor: default;
}
.status-pill-v3 .status-pill-label {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff;
}
.status-pill-v3.is-active         { background: #00c875; }
.status-pill-v3.is-success-light  { background: #2ecc71; } /* Appuntamento pianificato -> verde chiaro */
.status-pill-v3.is-success        { background: #16a34a; } /* Appuntamento fatto -> verde */
.status-pill-v3.is-success-dark   { background: #15803d; } /* Feedback raccolto -> verde scuro */
.status-pill-v3.is-warning        { background: #fdab3d; }
.status-pill-v3.is-orange         { background: #ff9800; } /* Trasferito al consulente -> arancione vibrante (verso il giallo) */
/* "Da contattare" (Trasferito al consulente, nelle v3): rosso acceso con un puntino che pulsa */
.status-pill-v3.is-urgent         { background: var(--st-new); }
.status-pill-v3.is-urgent::before { content: ''; display: inline-block; flex: 0 0 auto; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #ffffff; animation: myb-urgent-pulse 1.6s ease-out infinite; }
@keyframes myb-urgent-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.85); } 100% { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0); } }
@media (prefers-reduced-motion: reduce) { .status-pill-v3.is-urgent::before { animation: none; } }
.status-pill-v3.is-danger         { background: #d10501; } /* Non risponde -> rosso */
.status-pill-v3.is-danger-dark    { background: #a04e4e; } /* Immobile/Cliente non adatto -> rosso scuro */
.status-pill-v3.is-sky            { background: #09b1e2; } /* In attesa -> azzurrino */
.status-pill-v3.is-default        { background: #7e8a9a; }
.status-pill-v3.is-primary        { background: var(--primary, #6366f1); } /* Da leggere (notifiche) */

/* Badge notifica (colonna Notifiche) — chip morbido con icona leggibile */
.notif-badge-v3 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}
.notif-badge-v3.notif-tg   { background: rgba(0, 136, 204, 0.12);  color: #0088cc; }
.notif-badge-v3.notif-tg:hover   { background: #0088cc; color: #ffffff; }
.notif-badge-v3.notif-wa   { background: rgba(37, 211, 102, 0.14); color: #1ca34e; }
.notif-badge-v3.notif-wa:hover   { background: #25d366; color: #ffffff; }
.notif-badge-v3.notif-mail { background: color-mix(in srgb, var(--primary, #6366f1) 12%, transparent); color: var(--primary, #6366f1); }
.notif-badge-v3.notif-mail:hover { background: var(--primary, #6366f1); color: #ffffff; }
.notif-badge-v3.notif-app  { background: rgba(139, 92, 246, 0.14); color: #8b5cf6; }
.notif-badge-v3.notif-app:hover  { background: #8b5cf6; color: #ffffff; }
.notif-badge-v3.notif-ko   { background: rgba(204, 75, 0, 0.12);   color: #cc4b00; }
.notif-badge-v3.notif-ko:hover   { background: #cc4b00; color: #ffffff; }

/* Pulsante BUY id (colonna ID) — apre la richiesta, con freccetta come in richieste_new */
.buy-id-btn-v3 {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.8rem;
    font-weight: 800;
    /* ID cliccabile: pieno nel colore principale, così si capisce che apre la scheda (DESIGN.md §21) */
    color: #ffffff;
    background: var(--primary, #6366f1);
    border: 1px solid var(--primary, #6366f1);
    box-shadow: 0 2px 6px color-mix(in srgb, var(--primary, #6366f1) 25%, transparent);
    padding: 5px 13px;
    border-radius: 999px;
    white-space: nowrap;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
}
.buy-id-btn-v3 i {
    font-size: 0.68rem;
    opacity: 0.85;
}
.buy-id-btn-v3:hover {
    background: color-mix(in srgb, var(--primary, #6366f1) 82%, black);
    border-color: color-mix(in srgb, var(--primary, #6366f1) 82%, black);
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 3px 8px color-mix(in srgb, var(--primary, #6366f1) 22%, transparent);
}
.buy-id-btn-v3:hover i { opacity: 1; }


/* Count badge sulle quick view pills */
.quick-view-count-v3 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    padding: 2px 7px;
    margin-left: 7px;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.2;
    background: color-mix(in srgb, var(--primary, #6366f1) 10%, transparent);
    color: color-mix(in srgb, var(--primary, #6366f1) 82%, black);
    transition: background 0.2s, color 0.2s;
}
.quick-view-pill-v3.active .quick-view-count-v3 {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

/* Separatore verticale tra viste predefinite e viste personalizzate */
.quick-views-divider-v3 {
    display: inline-block;
    width: 1px;
    align-self: stretch;
    min-height: 24px;
    margin: 0 6px;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.14) 25%, rgba(15, 23, 42, 0.14) 75%, rgba(15, 23, 42, 0));
}
.quick-view-pill-custom-v3 {
    border-style: dashed;
    border-color: color-mix(in srgb, var(--primary, #6366f1) 28%, transparent);
}
.quick-view-pill-custom-v3.active {
    border-style: solid;
}

/* Chips filtri attivi */
.active-filters-chips-v3 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 0 4px;
}
.filter-chip-v3 {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: color-mix(in srgb, var(--primary, #6366f1) 6%, transparent);
    border: 1px solid color-mix(in srgb, var(--primary, #6366f1) 18%, transparent);
    border-radius: 20px;
    padding: 4px 6px 4px 12px;
    font-size: 0.78rem;
    color: #334155;
    font-weight: 600;
    transition: all 0.15s ease-in-out;
}
.filter-chip-v3:hover {
    background: color-mix(in srgb, var(--primary, #6366f1) 10%, transparent);
    border-color: color-mix(in srgb, var(--primary, #6366f1) 30%, transparent);
}
.filter-chip-label-v3 {
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--primary, #6366f1);
}
.filter-chip-value-v3 {
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.filter-chip-remove-v3 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 50%;
    background: color-mix(in srgb, var(--primary, #6366f1) 12%, transparent);
    color: var(--primary, #6366f1);
    font-size: 0.62rem;
    cursor: pointer;
    padding: 0;
    transition: all 0.15s ease-in-out;
}
.filter-chip-remove-v3:hover {
    background: #dc2626;
    color: #ffffff;
}
.filter-chips-clear-all-v3 {
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 20px;
    transition: all 0.15s ease-in-out;
}
.filter-chips-clear-all-v3:hover {
    background: rgba(220, 38, 38, 0.08);
    color: #dc2626;
}
/* Spacer flessibile: spinge "Salva Vista" a fine riga */
.filter-chips-spacer-v3 {
    flex: 1 1 auto;
    min-width: 12px;
}
.btn-save-view-v3 {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid color-mix(in srgb, var(--primary, #6366f1) 25%, transparent);
    background: color-mix(in srgb, var(--primary, #6366f1) 6%, transparent);
    color: color-mix(in srgb, var(--primary, #6366f1) 82%, black);
    font-weight: 700;
    font-size: 0.76rem;
    border-radius: 20px;
    padding: 5px 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease-in-out;
}
.btn-save-view-v3:hover {
    background: var(--primary, #6366f1);
    border-color: var(--primary, #6366f1);
    color: #ffffff;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--primary, #6366f1) 22%, transparent);
    transform: translateY(-1px);
}

/* Footer DataTable premium (length + info + paginazione) */
.dt-footer-v3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 22px;
    background: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}
.dt-footer-left-v3,
.dt-footer-right-v3 {
    display: flex;
    align-items: center;
    gap: 18px;
}

/* Selettore righe per pagina */
.dt-footer-v3 .dataTables_length {
    background: transparent !important;
    border-bottom: none !important;
    padding: 0 !important;
    color: #64748b !important;
    font-weight: 600 !important;
}
.dt-footer-v3 .dataTables_length select {
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    padding: 5px 10px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
}
.dt-footer-v3 .dataTables_length select:hover {
    border-color: color-mix(in srgb, var(--primary, #6366f1) 30%, white) !important;
}

/* Info "1–25 di N richieste" */
.dt-footer-v3 .dataTables_info {
    float: none !important;
    padding: 0 !important;
    color: #94a3b8 !important;
    font-weight: 600 !important;
    font-size: 0.78rem !important;
}

/* Paginazione — bottoni uniformi, piatti, attivo indigo pieno */
.dt-footer-v3 .dataTables_paginate {
    float: none !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 2px !important;
}
.dt-footer-v3 .dataTables_paginate .paginate_button {
    box-sizing: border-box !important;
    min-width: 32px !important;
    height: 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 7px !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 8px !important;
    background: transparent !important;
    color: #64748b !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    transition: background 0.15s ease, color 0.15s ease !important;
}
.dt-footer-v3 .dataTables_paginate .paginate_button:hover {
    background: color-mix(in srgb, var(--primary, #6366f1) 10%, transparent) !important;
    color: color-mix(in srgb, var(--primary, #6366f1) 82%, black) !important;
}
.dt-footer-v3 .dataTables_paginate .paginate_button.current,
.dt-footer-v3 .dataTables_paginate .paginate_button.current:hover {
    background: var(--primary, #6366f1) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px color-mix(in srgb, var(--primary, #6366f1) 28%, transparent) !important;
}
.dt-footer-v3 .dataTables_paginate .paginate_button.disabled,
.dt-footer-v3 .dataTables_paginate .paginate_button.disabled:hover {
    opacity: 1 !important;
    cursor: not-allowed !important;
    background: transparent !important;
    color: #cbd5e1 !important;
}
.dt-footer-v3 .dataTables_paginate .ellipsis {
    min-width: auto !important;
    padding: 0 2px !important;
    color: #cbd5e1 !important;
    letter-spacing: 1px;
}
/* Sul telefono la paginazione (8-9 pulsanti da 54px) usciva dalla pagina e la faceva scorrere di lato
   (.page-container ha overflow-x: auto): pulsanti più stretti e, con tante pagine, a capo */
@media (max-width: 767px) {
    .dt-footer-v3 { padding: 12px 14px; }
    .dt-footer-right-v3 { max-width: 100%; }
    .dt-footer-v3 .pagination { flex-wrap: wrap; }
    .dt-footer-v3 .dataTables_paginate .paginate_button { padding: 0 !important; }
    .dt-footer-v3 .pagination .page-link { margin: 0 1px; padding: 6px 9px; }
}

/* Skeleton loading rows */
.dt-skel-list {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 46px 16px 8px 16px; /* lascia spazio all'header di colonna */
    display: flex;
    flex-direction: column;
}
.dt-skel-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 3fr) minmax(0, 2fr) 1.2fr 1fr 150px;
    align-items: center;
    gap: 14px;
    padding: 14px 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}
.dt-skel-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
}
.dt-skel-stack {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}
.dt-skel-bar {
    height: 11px;
    border-radius: 6px;
}
.dt-skel-bar.skel-w-id    { width: 56px; }
.dt-skel-bar.skel-w-lg    { width: 75%; }
.dt-skel-bar.skel-w-md    { width: 55%; }
.dt-skel-bar.skel-w-sm    { width: 45%; }
.dt-skel-bar.skel-w-badge { width: 80px; height: 22px; border-radius: 5px; }
.dt-skel-avatar,
.dt-skel-bar {
    background: linear-gradient(90deg, #e8ecf3 25%, #f3f6fa 50%, #e8ecf3 75%);
    background-size: 200% 100%;
    animation: dt-skel-shimmer 1.3s ease-in-out infinite;
}
@keyframes dt-skel-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
@media (max-width: 991px) {
    .dt-skel-row { grid-template-columns: 44px minmax(0, 1fr) 80px; }
    .dt-skel-row .skel-w-id,
    .dt-skel-row .skel-w-sm,
    .dt-skel-row > .skel-w-md { display: none; }
}

/* ════════════════════════════════════════════════════════════════
   Centralino Live V3 — pannello chiamate in tempo reale
   ════════════════════════════════════════════════════════════════ */
.pbx-hidden-engine-v3 { display: none !important; }

/* contenitore invisibile: gli elementi (header, pipeline, log) sono card libere */
.pbx-live-panel-v3 {
    /* larghezza colonna destra (softphone + immobile) e gap della plancia */
    --pbx-side-w: 340px;
    --pbx-board-gap: 18px;
    /* colore del raggruppamento: segue lo stato dell'interno (vedi .is-available/.is-dnd) */
    --pbx-zone-c: var(--primary, #6366f1);
    /* Area PBX raggruppata: pannello con sfondo tinta + bordo tratteggiato,
       così le card bianche interne si leggono come contenute in un'unica sezione. */
    position: relative;
    /* interno NEUTRO (nessuna tinta di stato); solo il bordo tratteggiato e la
       legenda seguono lo stato Disponibile/Non disturbare. */
    background:
        radial-gradient(150% 180px at 32px -20px, rgba(15, 23, 42, 0.028), transparent 60%),
        #fbfbfd;
    border: 2px dashed color-mix(in srgb, var(--pbx-zone-c) 40%, transparent);
    box-shadow:
        inset 0 0 0 1px rgba(15, 23, 42, 0.03),
        0 20px 46px -32px rgba(15, 23, 42, 0.30);
    border-radius: 24px;
    overflow: visible;
    display: block;
    padding: 34px 16px 16px;
    /* le colonne si decidono sullo spazio del pannello, non della finestra: il menu laterale aperto ne toglie ~260px */
    container: pbx-live / inline-size;
    margin-top: 24px;
    transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}
/* stato interno → colore coerente con Disponibile / Non disturbare */
.pbx-live-panel-v3.is-available { --pbx-zone-c: #22c55e; }
.pbx-live-panel-v3.is-dnd { --pbx-zone-c: #f59e0b; }
/* AI Voice Agent attivo: tutto il contorno del pannello diventa blu (ha precedenza
   sui colori di stato Disponibile/Non disturbare — vedi ordine sorgente). */
.pbx-live-panel-v3.pbx-ai-on { --pbx-zone-c: #4f46e5; }
/* legenda-tab appoggiata sul bordo: intestazione della sezione */
.pbx-zone-legend-v3 {
    position: absolute; top: -17px; left: 20px;
    display: inline-flex; align-items: center; gap: 10px;
    padding: 6px 16px 6px 6px; border-radius: 999px;
    background: #fff;
    border: 1.5px solid color-mix(in srgb, var(--pbx-zone-c) 24%, transparent);
    box-shadow: 0 12px 28px -12px color-mix(in srgb, var(--pbx-zone-c) 55%, transparent);
}
.pbx-zone-legend-ico-v3 {
    width: 30px; height: 30px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--pbx-zone-c), color-mix(in srgb, var(--pbx-zone-c) 60%, #fff));
    color: #fff; font-size: calc(0.82rem * var(--pbx-fs, 1));
    box-shadow: 0 5px 14px -4px color-mix(in srgb, var(--pbx-zone-c) 70%, transparent);
}
.pbx-zone-legend-txt-v3 { font-size: calc(0.72rem * var(--pbx-fs, 1)); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #64748b; }
.pbx-zone-legend-txt-v3 b { color: color-mix(in srgb, var(--pbx-zone-c) 72%, #1e293b); font-weight: 800; }
.pbx-zone-legend-pulse-v3 {
    width: 8px; height: 8px; border-radius: 50%; background: var(--pbx-zone-c);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--pbx-zone-c) 50%, transparent);
    animation: pbx-zone-pulse 1.6s infinite; margin-left: 2px;
}
@keyframes pbx-zone-pulse {
    0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pbx-zone-c) 50%, transparent); }
    70%  { box-shadow: 0 0 0 7px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}
/* in Non disturbare il puntino è fisso (non "live") */
.pbx-live-panel-v3.is-dnd .pbx-zone-legend-pulse-v3 { animation: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--pbx-zone-c) 22%, transparent); }

/* ── Separatore + titolo "Database Richieste" (stacca PBX dall'elenco) ─────── */
.db-section-head-v3 {
    display: flex; align-items: center; gap: 14px;
    margin: 34px 0 20px; padding-top: 26px;
    border-top: 1.5px dashed rgba(15, 23, 42, 0.1);
}
.db-section-ico-v3 {
    width: 44px; height: 44px; min-width: 44px; border-radius: 14px;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--secondary, #e8743b), color-mix(in srgb, var(--secondary, #e8743b) 60%, #f59e0b));
    color: #fff; font-size: 1.1rem;
    box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--secondary, #e8743b) 75%, transparent);
}
.db-section-title-v3 { font-size: 1.35rem; font-weight: 800; color: #0f172a; line-height: 1.15; }
.db-section-sub-v3 { font-size: 0.85rem; color: #94a3b8; margin-top: 2px; }

/* ── Header (barra a sé) */
.pbx-live-header-v3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    container: pbx-live-head / inline-size;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary, #6366f1) 45%, black) 0%, color-mix(in srgb, var(--primary, #6366f1) 72%, black) 55%, var(--primary, #6366f1) 100%);
    color: #fff;
    border-radius: 18px;
    margin-bottom: 16px;
    box-shadow: 0 8px 22px color-mix(in srgb, var(--primary, #6366f1) 22%, transparent);
}
.pbx-live-brand-v3 {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    white-space: nowrap;
}
.pbx-live-dot-v3 {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #f43f5e;
    box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.6);
    animation: pbx-live-blink 1.6s infinite;
    flex: 0 0 auto;
}
@keyframes pbx-live-blink {
    0%   { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.55); }
    70%  { box-shadow: 0 0 0 9px rgba(244, 63, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0); }
}
/* Dot live colorato per stato interno: Disponibile (verde, pulsa) / DND (ambra, fisso) */
.pbx-live-dot-v3.is-available { background: #22c55e; animation-name: pbx-live-blink-green; }
@keyframes pbx-live-blink-green {
    0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
    70%  { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
.pbx-live-dot-v3.is-dnd { background: #f59e0b; animation: none; box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18); }
.pbx-live-title-v3 {
    font-size: calc(1.02rem * var(--pbx-fs, 1));
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 0.01em;
}
.pbx-live-subtitle-v3 {
    font-size: calc(0.72rem * var(--pbx-fs, 1));
    color: rgba(255, 255, 255, 0.62);
    font-weight: 500;
    margin-top: 2px;
}
.pbx-live-controls-v3 {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

/* Pulsante "Chiamate AI" in stato attivo (ENABLE_BETA_AI_VOICEAGENT on):
   blu pieno + pallino "live" verde pulsante che segnala l'AI attiva. */
.pbx-control-btn-ai-on-v3 {
    background: rgba(79, 70, 229, 0.92);
    border-color: rgba(129, 140, 248, 0.85);
}
.pbx-control-btn-ai-on-v3:hover { background: #4f46e5; }
a.pbx-control-btn-ai-on-v3:hover { color: #fff; }
.pbx-ai-dot-v3 {
    display: none;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #93c5fd;
    box-shadow: 0 0 0 0 rgba(147, 197, 253, 0.75);
    animation: pbx-ai-dot-blink 1.6s infinite;
    flex: 0 0 auto;
}
/* Il pallino live compare solo quando il pulsante è nello stato "AI attiva adesso" */
.pbx-control-btn-ai-on-v3 .pbx-ai-dot-v3 { display: block; }
@keyframes pbx-ai-dot-blink {
    0%   { box-shadow: 0 0 0 0 rgba(147, 197, 253, 0.7); }
    70%  { box-shadow: 0 0 0 8px rgba(147, 197, 253, 0); }
    100% { box-shadow: 0 0 0 0 rgba(147, 197, 253, 0); }
}

/* Selettore interno */
.pbx-exten-wrap-v3 {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 5px 8px 5px 12px;
    color: #fff;
    font-size: calc(0.82rem * var(--pbx-fs, 1));
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.pbx-exten-wrap-v3:hover { background: rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.35); }
.pbx-exten-wrap-v3 > i { font-size: calc(0.9rem * var(--pbx-fs, 1)); opacity: 0.9; }
/* Select nativo stilizzato (no select2): si fonde nell'header scuro */
.pbx-exten-select-v3 {
    appearance: none; -webkit-appearance: none; -moz-appearance: none;
    background: transparent; border: none; outline: none; box-shadow: none;
    color: #fff; font-weight: 700; font-size: calc(0.85rem * var(--pbx-fs, 1)); letter-spacing: 0.01em;
    padding: 2px 24px 2px 2px; margin: 0; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' fill='none' stroke='%23ffffff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 4px center; background-size: 10px;
}
.pbx-exten-select-v3:focus { outline: none; }
.pbx-exten-select-v3 option { color: #1a1a2e; background: #fff; font-weight: 600; }

/* Toggle Disponibile / DND */
.pbx-status-toggle-v3 {
    display: inline-flex;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 11px;
    padding: 3px;
    gap: 2px;
}
.pbx-status-opt-v3 {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.62);
    font-size: calc(0.74rem * var(--pbx-fs, 1));
    font-weight: 700;
    padding: 5px 11px;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.pbx-status-opt-v3 .pbx-status-dot-v3 {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.7;
}
.pbx-status-opt-v3:hover { color: #fff; }
.pbx-status-avail.is-active {
    background: #22c55e;
    color: #fff;
    box-shadow: 0 3px 10px rgba(34, 197, 94, 0.4);
}
.pbx-status-dnd.is-active {
    background: #f59e0b;
    color: #fff;
    box-shadow: 0 3px 10px rgba(245, 158, 11, 0.4);
}
.pbx-status-opt-v3.is-active .pbx-status-dot-v3 { opacity: 1; }

/* ── Hero chiamata in corso */
.pbx-hero-v3 { padding: 16px 18px 6px; }
.pbx-hero-card-v3 {
    border-radius: 18px;
    padding: 16px 18px;
    position: relative;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--primary, #6366f1) 14%, transparent);
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary, #6366f1) 6%, transparent), color-mix(in srgb, var(--primary, #6366f1) 2%, transparent));
}
.pbx-hero-card-v3.incall,
.pbx-hero-card-v3.ringing {
    border-color: rgba(34, 197, 94, 0.35);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.02));
    animation: pbx-hero-glow 2s ease-in-out infinite;
}
@keyframes pbx-hero-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
    50%      { box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12); }
}
.pbx-hero-statusbar-v3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.pbx-hero-status-v3 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: calc(0.72rem * var(--pbx-fs, 1));
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #15803d;
}
.pbx-hero-card-v3:not(.incall):not(.ringing) .pbx-hero-status-v3 { color: #64748b; }
.pbx-pulse-v3 {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
    animation: pbx-live-blink 1.4s infinite;
}
.pbx-hero-card-v3:not(.incall):not(.ringing) .pbx-pulse-v3 { background: #94a3b8; animation: none; }
.pbx-hero-time-v3 { font-size: calc(0.72rem * var(--pbx-fs, 1)); color: #94a3b8; font-weight: 600; }
.pbx-hero-body-v3 {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}
.pbx-hero-avatar-v3 {
    flex: 0 0 auto;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: calc(1.15rem * var(--pbx-fs, 1));
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--primary, #6366f1), color-mix(in srgb, var(--primary, #6366f1) 60%, black));
    box-shadow: 0 6px 16px color-mix(in srgb, var(--primary, #6366f1) 30%, transparent);
}
.pbx-hero-card-v3.incall .pbx-hero-avatar-v3,
.pbx-hero-card-v3.ringing .pbx-hero-avatar-v3 {
    background: linear-gradient(135deg, #22c55e, #15803d);
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.35);
}
.pbx-hero-info-v3 { min-width: 0; flex: 1; }
.pbx-hero-name-v3 {
    font-size: calc(1.08rem * var(--pbx-fs, 1));
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.pbx-hero-number-v3 {
    font-size: calc(0.9rem * var(--pbx-fs, 1));
    font-weight: 600;
    color: #334155;
    margin-top: 3px;
}
.pbx-hero-number-v3 i, .pbx-hero-source-v3 i { color: #94a3b8; font-size: calc(0.78rem * var(--pbx-fs, 1)); margin-right: 5px; }
.pbx-hero-source-v3 { font-size: calc(0.78rem * var(--pbx-fs, 1)); color: #64748b; margin-top: 2px; }
.pbx-recurr-v3 {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: calc(0.68rem * var(--pbx-fs, 1));
    font-weight: 800;
    color: var(--primary, #6366f1);
    background: color-mix(in srgb, var(--primary, #6366f1) 12%, transparent);
    padding: 2px 7px;
    border-radius: 20px;
}
.pbx-hero-actions-v3 { display: flex; gap: 8px; flex-wrap: wrap; }

/* Bottoni hero */
.pbx-btn-v3 {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid transparent;
    border-radius: 11px;
    padding: 9px 14px;
    font-size: calc(0.8rem * var(--pbx-fs, 1));
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.pbx-btn-primary-v3 {
    background: var(--primary, #6366f1);
    color: #fff;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--primary, #6366f1) 28%, transparent);
    flex: 1;
    justify-content: center;
}
.pbx-btn-primary-v3:hover { background: color-mix(in srgb, var(--primary, #6366f1) 82%, black); transform: translateY(-1px); }
.pbx-btn-call-v3 {
    background: #22c55e;
    color: #fff;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.28);
}
.pbx-btn-call-v3:hover { background: #16a34a; transform: translateY(-1px); }
.pbx-btn-ghost-v3 {
    background: #fff;
    border-color: #e2e8f0;
    color: #475569;
}
.pbx-btn-ghost-v3:hover { border-color: var(--primary, #6366f1); color: color-mix(in srgb, var(--primary, #6366f1) 82%, black); }

/* Hero idle */
.pbx-hero-idle-v3 {
    text-align: center;
    padding: 26px 18px;
    border: 1.5px dashed color-mix(in srgb, var(--primary, #6366f1) 20%, transparent);
    border-radius: 18px;
    background: color-mix(in srgb, var(--primary, #6366f1) 2%, transparent);
}
.pbx-hero-idle-icon-v3 {
    width: 52px; height: 52px;
    margin: 0 auto 12px;
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: calc(1.3rem * var(--pbx-fs, 1));
    color: color-mix(in srgb, var(--primary, #6366f1) 72%, white);
    background: color-mix(in srgb, var(--primary, #6366f1) 8%, transparent);
}
.pbx-hero-idle-title-v3 { font-size: calc(0.95rem * var(--pbx-fs, 1)); font-weight: 800; color: #334155; }
.pbx-hero-idle-sub-v3 { font-size: calc(0.78rem * var(--pbx-fs, 1)); color: #94a3b8; margin-top: 3px; }

/* ── Feed recenti */
.pbx-recent-bar-v3 { padding: 12px 20px 6px; }
.pbx-recent-label-v3 {
    font-size: calc(0.68rem * var(--pbx-fs, 1));
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
}
.pbx-recent-label-v3 i { margin-right: 5px; }
.pbx-feed-v3 { padding: 0 12px 8px; max-height: 360px; overflow-y: auto; }

.pbx-card-v3 {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 13px;
    transition: background 0.15s ease;
}
.pbx-card-v3:hover { background: color-mix(in srgb, var(--primary, #6366f1) 4.5%, transparent); }
.pbx-card-icon-v3 {
    flex: 0 0 auto;
    width: 34px; height: 34px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: calc(0.82rem * var(--pbx-fs, 1));
    background: #eef2f6;
    color: #64748b;
}
.pbx-card-icon-v3.missed   { background: rgba(226, 68, 92, 0.12);  color: #e2445c; }
.pbx-card-icon-v3.voicemail{ background: rgba(245, 158, 11, 0.14); color: #d97706; }
.pbx-card-icon-v3.answered,
.pbx-card-icon-v3.elsewhere{ background: rgba(34, 197, 94, 0.14);  color: #16a34a; }
.pbx-card-icon-v3.outgoing { background: color-mix(in srgb, var(--primary, #6366f1) 12%, transparent); color: var(--primary, #6366f1); }
.pbx-card-icon-v3.afterhours{ background: rgba(100, 116, 139, 0.14); color: #64748b; }
.pbx-card-info-v3 { min-width: 0; flex: 1; }
.pbx-card-name-v3 {
    font-size: calc(0.86rem * var(--pbx-fs, 1));
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
}
.pbx-card-sub-v3 {
    font-size: calc(0.74rem * var(--pbx-fs, 1));
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pbx-recurr-sm-v3 {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: calc(0.62rem * var(--pbx-fs, 1));
    font-weight: 800;
    color: var(--primary, #6366f1);
    background: color-mix(in srgb, var(--primary, #6366f1) 12%, transparent);
    padding: 1px 5px;
    border-radius: 20px;
}
.pbx-card-time-v3 { font-size: calc(0.72rem * var(--pbx-fs, 1)); color: #94a3b8; font-weight: 600; white-space: nowrap; flex: 0 0 auto; }
.pbx-card-actions-v3 { display: flex; gap: 4px; flex: 0 0 auto; }
.pbx-icon-btn-v3 {
    width: 30px; height: 30px;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: calc(0.8rem * var(--pbx-fs, 1));
    transition: all 0.15s ease;
}
.pbx-icon-btn-v3:hover { background: color-mix(in srgb, var(--primary, #6366f1) 12%, transparent); color: color-mix(in srgb, var(--primary, #6366f1) 82%, black); }
.pbx-icon-btn-v3.pbx-makecall:hover { background: rgba(34, 197, 94, 0.14); color: #16a34a; }

.pbx-empty-v3 {
    text-align: center;
    padding: 24px;
    color: #94a3b8;
    font-size: calc(0.82rem * var(--pbx-fs, 1));
    font-weight: 600;
}
.pbx-empty-v3 i { margin-right: 6px; }

/* ── Richieste V3 — template di riga (ex-inline) */
/* Immobile mini-card */
.mini-property-card-v3 {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    overflow: hidden;
}
.prop-rif-v3 { font-weight: 700; color: var(--primary, #6366f1); }
.prop-addr-v3 { font-size: 0.75rem; color: #64748b; max-width: 100%; }

/* Cliente */
.mini-client-body-v3 { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.entity-name-v3 { font-weight: 700; color: #0f172a; }
.entity-link-v3 { font-size: 0.8rem; color: var(--primary, #6366f1); }
.contact-lines-v3 {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    overflow: hidden;
}
.contact-line-icon-v3 { font-size: 0.72rem; color: #94a3b8; margin-right: 6px; width: 12px; text-align: center; }
.contact-line-email-v3 { font-size: 0.78rem; color: #64748b; }
.contact-line-phone-v3 { font-size: 0.82rem; font-weight: 500; }

/* Colonna consulente */
.grid-agent-icon-v3 { font-size: 0.72rem; color: var(--primary, #6366f1); margin-right: 4px; }
.grid-agent-name-v3 { font-weight: 600; }
.acc-chevron-v3 i { font-size: 0.65rem; }
.richieste-header-grid .grid-col-property { position: relative; }

/* Corpo accordion richieste */
.acc-body-richieste-v3 {
    display: none;
    padding: 20px 24px 20px 40px;
    background: #f8fafc;
    border-top: 1.5px solid;
    border-image: linear-gradient(to right, color-mix(in srgb, var(--primary, #6366f1) 0%, transparent), color-mix(in srgb, var(--primary, #6366f1) 15%, transparent) 35%, color-mix(in srgb, var(--primary, #6366f1) 15%, transparent) 65%, color-mix(in srgb, var(--primary, #6366f1) 0%, transparent)) 1;
}
.acc-timeline-wrap-v3 { position: relative; padding-left: 30px; text-align: left; }
.acc-timeline-line-v3 {
    position: absolute;
    left: 8px; top: 0; bottom: 10px;
    width: 2px;
    border-left: 2px dashed color-mix(in srgb, var(--primary, #6366f1) 45%, white);
}
.acc-timeline-dot-v3 {
    position: absolute;
    left: -4px;
    width: 8px; height: 8px;
    border-radius: 50%;
    background-color: var(--primary, #6366f1);
    display: block;
}
.acc-timeline-dot-v3.top { top: 0; transform: translateY(-50%); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #6366f1) 15%, transparent); }
.acc-timeline-dot-v3.bottom { bottom: -4px; }
.acc-icon-accent { color: var(--primary, #6366f1); }
.acc-actions-v3 { margin-top: 16px; }

/* Dettagli */
/* Tutta la riga con qualunque numero di colonne: "span 3" forzava 3 colonne anche su mobile */
.acc-detail-span3 { grid-column: 1 / -1; }
.acc-detail-note { min-width: 250px; }
.acc-detail-empty-v3 { color: #94a3b8; font-size: 0.8rem; }
.acc-detail-italic { font-style: italic; }
.acc-detail-label-danger { color: #dc2626; display: flex; align-items: center; gap: 5px; }
.acc-detail-label-danger i { font-size: 0.7rem; }
.acc-detail-note .acc-detail-label i { color: #64748b; }

/* Chip fonte */
.source-chip-v3 {
    display: inline-flex;
    white-space: nowrap; /* "2 nodi" su una riga */
    align-items: center;
    gap: 5px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #334155;
}
.source-chip-v3 i { font-size: 0.65rem; color: var(--primary, #6366f1); }

/* Box commento */
.acc-comment-v3 {
    background: #f8fafc;
    border-left: 3px solid #cbd5e1;
    border-radius: 4px;
    padding: 9px 12px;
    margin-top: 4px;
}
.acc-comment-v3 span { color: #374151; font-size: 0.83rem; line-height: 1.6; display: block; }

/* Nota interna (semantica: rossa) */
.acc-internal-note-v3 {
    background: linear-gradient(135deg, rgba(254,226,226,0.9), rgba(255,241,241,0.7));
    border: 1px solid rgba(220,38,38,0.2);
    border-left: 3px solid #dc2626;
    border-radius: 0 10px 10px 10px;
    padding: 10px 13px;
    margin-top: 4px;
    position: relative;
}
.acc-internal-note-badge {
    position: absolute;
    top: -8px; left: 10px;
    font-size: 0.75rem;
    color: #dc2626;
    background: #fff;
    border-radius: 50%;
    padding: 1px;
}
.acc-internal-note-text { color: #991b1b; font-size: 0.82rem; line-height: 1.5; display: block; }

/* ── Richieste V3 — popover anteprima immobile (ex-inline) */
.prop-pop-title-v3 { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.prop-pop-title-main-v3 { display: flex; align-items: center; gap: 8px; font-weight: 800; color: #1e293b; text-transform: none; }
.prop-pop-title-main-v3 i, .prop-pop-title-main-v3 strong { color: var(--primary, #6366f1); }
.prop-pop-close-v3 { font-size: 1.2rem; font-weight: 700; border: none; background: transparent; padding: 0; color: #94a3b8; opacity: 0.7; cursor: pointer; }
.prop-pop-close-v3:hover { opacity: 1; }
.prop-pop-loading-v3 { width: 280px; text-align: center; padding: 15px 0; color: var(--primary, #6366f1); }
.prop-pop-loading-sub-v3 { font-size: 0.75rem; color: #94a3b8; margin-top: 8px; font-weight: 600; }
.prop-pop-body-v3 { width: 280px; font-size: 0.85rem; color: #475569; font-family: inherit; }
.prop-pop-img-v3 { width: 280px !important; max-width: 100% !important; height: 140px !important; object-fit: cover !important; border-radius: 12px; margin-bottom: 12px; display: block; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); }
.prop-pop-address-v3 { font-weight: 800; font-size: 0.95rem; margin-bottom: 10px; color: #0f172a; line-height: 1.4; display: flex; align-items: flex-start; gap: 4px; }
.prop-pop-address-v3 > i { color: var(--primary, #6366f1); margin-top: 3px; font-size: 0.85rem; margin-right: 4px; }
.prop-pop-badges-v3 { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.prop-pop-badge-v3 { padding: 5px 8px; border-radius: 6px; font-size: 0.75rem; font-weight: 700; }
.prop-pop-badge-price { background: rgba(0, 200, 117, 0.08); color: #00c875; }
.prop-pop-badge-offer { background: rgba(253, 171, 61, 0.08); color: #fdab3d; }
.prop-pop-badge-type  { background: color-mix(in srgb, var(--primary, #6366f1) 8%, transparent); color: var(--primary, #6366f1); }
.prop-pop-badge-mq    { background: rgba(100, 116, 139, 0.08); color: #64748b; font-weight: 400; }
.prop-pop-agent-v3 { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; background: color-mix(in srgb, var(--primary, #6366f1) 4%, transparent); border: 1px solid color-mix(in srgb, var(--primary, #6366f1) 8%, transparent); padding: 8px 12px; border-radius: 10px; }
.prop-pop-agent-v3 > i { font-size: 1.1rem; color: var(--primary, #6366f1); }
.prop-pop-agent-info-v3 { display: flex; flex-direction: column; line-height: 1.2; }
.prop-pop-agent-label-v3 { font-size: 0.68rem; text-transform: uppercase; font-weight: 700; color: #94a3b8; letter-spacing: 0.03em; }
.prop-pop-agent-name-v3 { font-size: 0.82rem; font-weight: 600; color: #1e293b; }
.prop-pop-desc-v3 { font-size: 0.8rem; color: #64748b; margin-bottom: 12px; max-height: 80px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; line-height: 1.4; }
.prop-pop-actions-v3 { display: flex; gap: 8px; border-top: 1px solid rgba(0, 0, 0, 0.05); padding-top: 12px; margin-top: 8px; width: 100%; }
.prop-pop-btn-v3 { font-weight: 700; padding: 8px 12px; border-radius: 8px; font-size: 0.75rem; display: flex; align-items: center; justify-content: center; gap: 6px; flex: 1; text-decoration: none; }
.prop-pop-btn-primary-v3 { background: var(--primary, #6366f1); border: none; color: #fff; }
.prop-pop-btn-primary-v3:hover { color: #fff; text-decoration: none; opacity: 0.92; }
.prop-pop-btn-outline-v3 { border: 1px solid #0ea5e9; color: #0ea5e9; background: transparent; }
.prop-pop-btn-outline-v3:hover { background: rgba(14, 165, 233, 0.08); color: #0ea5e9; text-decoration: none; }
.prop-pop-error-v3 { color: #dc3545; }

/* ── Richieste V3 — barra ricerca, drawer filtri, risultati (ex-inline) */
.quick-views-bar-v3 { gap: 12px; }
.quick-views-pills-v3 { gap: 8px; }
.spotlight-wrapper { position: relative; width: 100%; }

.filters-drawer-panel-v3 {
    border-radius: 20px;
    padding: 24px;
    position: relative;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.08);
}
.filters-drawer-head-v3 { border-bottom: 1px solid rgba(0, 0, 0, 0.05); padding-bottom: 12px; }
.filters-drawer-head-left-v3 { gap: 12px; }
.filters-drawer-icon-v3 {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--primary, #6366f1) 10%, transparent);
    color: var(--primary, #6366f1);
    display: flex; align-items: center; justify-content: center;
}
.filters-drawer-title-v3 { margin: 0; font-weight: 800; font-size: 1rem; color: #1e293b; }
.filters-drawer-sub-v3 { font-size: 0.75rem; color: #64748b; }
.filters-drawer-close-v3 { border: none; background: transparent; color: #64748b; font-size: 1.1rem; cursor: pointer; padding: 4px; }
.filters-form-v3 { margin: 0; }
.filters-section-title-v3 {
    font-size: 0.72rem; font-weight: 800; color: #475569;
    text-transform: uppercase; letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 8px; margin-bottom: 16px;
}
.filters-section-title-v3 i { color: var(--primary, #6366f1); }
.filters-footer-v3 {
    padding-top: 20px; margin-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex; justify-content: space-between;
}
.filters-btn-v3 { padding: 8px 24px; font-size: 0.85rem; font-weight: 700; }
.filters-btn-apply-v3 { padding: 8px 30px; font-size: 0.85rem; font-weight: 700; }

.results-count-v3 { font-size: 0.85rem; }
.results-actions-v3 { display: flex; align-items: center; gap: 16px; }
.results-panel-v3 { border-radius: 20px; position: relative; }
.richieste-header-bar-v3 {
    background: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 0.68rem; font-weight: 800; color: #94a3b8;
    text-transform: uppercase; pointer-events: none;
    border-top-left-radius: 20px; border-top-right-radius: 20px;
}
/* Larghezza piena anche quando DataTable applica la sua classe: il resto del
   reset e' nella regola condivisa .acc-dt-v3 (vedi DESIGN.md §21). */
.buyerleads-dt-v3, table.dataTable.buyerleads-dt-v3 { width: 100% !important; }

/* Stato nascosto iniziale per elementi mostrati via JS (.show()/.fadeIn() — niente !important) */
.is-hidden-v3 { display: none; }

/* Icone quick-view (colori per vista predefinita) */
.qv-icon-oggi { color: #f59e0b; }
.qv-icon-recenti { color: #0ea5e9; }
.qv-icon-mai_contattate { color: #8b5cf6; }
.qv-icon-richiamare { color: #e2445c; }
.qv-icon-feedback { color: #10b981; }
.qv-icon-perse { color: #e2445c; }
.qv-icon-risposte { color: #16a34a; }
.qv-icon-segreteria { color: #f59e0b; }
.qv-icon-richiamate { color: #0ea5e9; }
.qv-icon-fuori_orario { color: #8b5cf6; }
.qv-icon-da_richiamare { color: #e2445c; }
/* Icone colorate sulle pill delle viste: tone della vista (MYB.SavedViews), altrimenti il colore principale.
   :where() lascia vincere sia .qv-icon-<id> sia .qv-tone-<tono>. */
:where(.quick-view-pill-v3 > i:first-child) { color: var(--primary, #6366f1); }
.qv-tone-red { color: #e2445c; }
.qv-tone-orange { color: #f97316; }
.qv-tone-amber { color: #f59e0b; }
.qv-tone-green { color: #16a34a; }
.qv-tone-sky { color: #0ea5e9; }
.qv-tone-blue { color: #3b82f6; }
.qv-tone-violet { color: #8b5cf6; }
.qv-tone-pink { color: #ec4899; }
.qv-tone-slate { color: #64748b; }
.quick-view-pill-v3.active [class*="qv-icon-"], .quick-view-pill-v3.active [class*="qv-tone-"] { color: inherit; }
.pbx-exten-select-v3 { width: auto; min-width: 96px; max-width: 200px; }

/* ── Richieste V3 — pill consulente con avatar cache */
.consulente-pill-v3 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    min-width: 0;
    padding: 3px 12px 3px 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.consulente-avatar-v3 {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.62rem;
    font-weight: 800;
    border: 1px solid color-mix(in srgb, var(--primary, #6366f1) 18%, transparent);
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary, #6366f1) 18%, white), color-mix(in srgb, var(--primary, #6366f1) 8%, white));
    color: var(--primary, #6366f1);
}
.consulente-avatar-v3.is-loading { border-color: transparent; }
.consulente-avatar-v3.is-loading::after { border-radius: 50%; }
.consulente-avatar-v3 .user-avatar-wa-img { border-radius: 50%; }
.consulente-avatar-v3.has-wa-photo { border-color: rgba(0, 0, 0, 0.06); }
.consulente-avatar-v3.loaded-initials {
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary, #6366f1) 18%, white), color-mix(in srgb, var(--primary, #6366f1) 8%, white));
    color: var(--primary, #6366f1);
}
.consulente-name-v3 {
    min-width: 0;
    font-weight: 600;
    font-size: 0.82rem;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.consulente-none-v3 { color: #dc2626; font-size: 0.8rem; font-weight: 600; background: #fef2f2; border-color: #fecaca; padding: 5px 12px; }
.consulente-none-v3 i { margin-right: 4px; }
.consulente-none-v3 .consulente-name-v3 { color: inherit; }

/* ════════════════════════════════════════════════════════════════
   Nuova Richiesta — Drawer di conversione/inserimento
   ════════════════════════════════════════════════════════════════ */
/* Pulsante "Nuovo …" di una lista: stesso aspetto di "Nuova Richiesta" (DESIGN.md §27) */
.btn-create-v3,
.btn-nuova-richiesta-v3 {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 22px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary, #6366f1), color-mix(in srgb, var(--primary, #6366f1) 70%, black));
    color: #fff;
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 18px color-mix(in srgb, var(--primary, #6366f1) 30%, transparent);
    transition: all 0.15s ease;
}
.btn-create-v3:hover,
.btn-nuova-richiesta-v3:hover { transform: translateY(-1px); box-shadow: 0 8px 24px color-mix(in srgb, var(--primary, #6366f1) 38%, transparent); }
.btn-create-v3 i,
.btn-nuova-richiesta-v3 i { font-size: 0.85rem; }
.btn-create-v3, .btn-create-v3:hover, .btn-create-v3:focus { color: #fff; text-decoration: none; white-space: nowrap; }
.btn-create-v3:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary, #6366f1) 35%, transparent); outline-offset: 2px; }
.quick-views-create-v3 { margin-left: auto; padding-left: 12px; display: flex; align-items: center; gap: 8px; }
/* "Importa CSV" accanto a "Nuovo …": quadratino chiaro della stessa altezza, solo icona */
.btn-import-v3 { display: inline-grid; place-items: center; flex: 0 0 auto; width: 42px; height: 42px; border: 1px solid #e2e8f0; border-radius: 14px; background: #ffffff; color: #475569; transition: all 0.15s ease; }
.btn-import-v3:hover, .btn-import-v3:focus { background: color-mix(in srgb, var(--primary, #6366f1) 8%, #ffffff); border-color: color-mix(in srgb, var(--primary, #6366f1) 30%, #ffffff); color: var(--primary, #6366f1); text-decoration: none; }
.btn-import-v3:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary, #6366f1) 35%, transparent); outline-offset: 2px; }
.btn-import-v3 i, .btn-import-v3 i::before { font-size: 0.95rem; color: inherit !important; }
@media (max-width: 575.98px) {
    .quick-views-create-v3 { order: -1; width: 100%; padding-left: 0; margin: 0 0 10px; }
    .quick-views-create-v3 .btn-create-v3 { flex: 1 1 auto; justify-content: center; }
}

.richiesta-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 1090;
}
.richiesta-drawer-overlay.is-open { opacity: 1; visibility: visible; }

.richiesta-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 520px;
    max-width: 94vw;
    background: #fff;
    box-shadow: -14px 0 44px rgba(15, 23, 42, 0.16);
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1091;
    display: flex;
    flex-direction: column;
}
.richiesta-drawer.is-open { transform: translateX(0); }
body.drawer-open { overflow: hidden; }

.richiesta-drawer-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary, #6366f1) 55%, black), var(--primary, #6366f1));
    color: #fff;
    flex: 0 0 auto;
}
.richiesta-drawer-head-icon {
    width: 42px; height: 42px;
    border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.16);
    font-size: 1.1rem;
    flex: 0 0 auto;
}
.richiesta-drawer-head-text { flex: 1; min-width: 0; }
.richiesta-drawer-title { font-size: 1.1rem; font-weight: 800; line-height: 1.15; }
.richiesta-drawer-sub { font-size: 0.78rem; color: rgba(255, 255, 255, 0.72); margin-top: 2px; }
.richiesta-drawer-sub i { margin-right: 4px; }
.richiesta-drawer-close {
    width: 34px; height: 34px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    flex: 0 0 auto;
    transition: background 0.15s ease;
}
.richiesta-drawer-close:hover { background: rgba(255, 255, 255, 0.28); }

.richiesta-drawer-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 20px 22px;
}
.richiesta-drawer-footer {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 22px;
    border-top: 1px solid rgba(0, 0, 0, 0.07);
    background: #f8fafc;
}
.btn-drawer-cancel-v3 {
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 9px 18px;
    border-radius: 11px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn-drawer-cancel-v3:hover { border-color: #cbd5e1; color: #0f172a; }
.btn-drawer-save-v3 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    background: var(--primary, #6366f1);
    color: #fff;
    font-weight: 800;
    font-size: 0.85rem;
    padding: 9px 22px;
    border-radius: 11px;
    cursor: pointer;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--primary, #6366f1) 28%, transparent);
    transition: all 0.15s ease;
}
.btn-drawer-save-v3:hover { transform: translateY(-1px); }

/* ── Centralino V3 — plancia di controllo proattiva */
.pbx-control-divider-v3 { width: 1px; height: 24px; background: rgba(255, 255, 255, 0.18); margin: 0 2px; }
/* Chiama · Nota · Richiesta: un solo elemento flex, cosi' vanno a capo insieme.
   Il separatore le segue perche' e' l'ultimo prima del gruppo. */
.pbx-control-group-v3 { display: flex; align-items: center; gap: 8px; }
.pbx-control-btn-v3 {
    display: inline-flex; align-items: center; gap: 7px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.1);
    color: #fff; font-size: calc(0.78rem * var(--pbx-fs, 1)); font-weight: 700;
    padding: 7px 13px; border-radius: 11px; cursor: pointer;
    transition: all 0.15s ease;
}
.pbx-control-btn-v3:hover { background: rgba(255, 255, 255, 0.2); }
a.pbx-control-btn-v3 { text-decoration: none; }
a.pbx-control-btn-v3:hover { text-decoration: none; color: #fff; }
/* Barra su una riga il piu' possibile: quando lo spazio manca i pulsanti restano solo icona (col title),
   poi anche Disponibile / Non disturbare (colore, pallino e tooltip); andare a capo e' l'ultima risorsa.
   ponytail: soglie stimate sulla barra completa (backoffice + Chiamate AI), da ritoccare se cambiano i pulsanti */
.pbx-control-btn-v3, .pbx-status-opt-v3 { white-space: nowrap; }
@container pbx-live-head (max-width: 1080px) {
    .pbx-live-subtitle-v3 { display: none; }
    .pbx-control-btn-v3:not(.pbx-control-btn-primary-v3) .pbx-btn-lbl-v3 { display: none; }
    .pbx-control-btn-v3:not(.pbx-control-btn-primary-v3) { padding: 7px 10px; }
}
@container pbx-live-head (max-width: 900px) {
    .pbx-status-opt-v3 .pbx-btn-lbl-v3 { display: none; }
}
.pbx-control-btn-primary-v3 { background: #fff; color: var(--primary, #6366f1); border-color: #fff; }
.pbx-control-btn-primary-v3:hover { background: #fff; color: var(--primary, #6366f1); transform: translateY(-1px); }
.pbx-note-dot-v3 { display: none; width: 7px; height: 7px; border-radius: 50%; background: #fbbf24; margin-left: 2px; }

/* Hero panel proattivo */
.pbx-hero-panel-v3 { padding: 0 18px; }
.pbx-identikit-v3 {
    background: #f8fafc; border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 14px; padding: 12px 14px; margin-bottom: 10px;
}
.pbx-identikit-loading-v3, .pbx-identikit-empty-v3 { font-size: calc(0.8rem * var(--pbx-fs, 1)); color: #94a3b8; padding: 4px 0; }
.pbx-identikit-empty-v3 i { margin-right: 6px; }
.pbx-identikit-head-v3 { font-size: calc(0.72rem * var(--pbx-fs, 1)); font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: #64748b; margin-bottom: 8px; display: flex; align-items: center; gap: 7px; }
.pbx-identikit-count-v3 { background: color-mix(in srgb, var(--primary, #6366f1) 10%, transparent); color: var(--primary, #6366f1); font-size: calc(0.68rem * var(--pbx-fs, 1)); padding: 1px 8px; border-radius: 20px; }
.pbx-identikit-list-v3 { display: flex; flex-direction: column; gap: 6px; }
.pbx-identikit-row-v3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: calc(0.78rem * var(--pbx-fs, 1)); }
.pbx-ik-status-v3 { font-size: calc(0.66rem * var(--pbx-fs, 1)); font-weight: 800; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; color: #fff; }
.pbx-ik-status-v3.active { background: #00c875; }
.pbx-ik-status-v3.success-dark { background: #15803d; }
.pbx-ik-status-v3.warning { background: #fdab3d; }
.pbx-ik-status-v3.danger { background: #e2445c; }
.pbx-ik-status-v3.sky { background: #0ea5e9; }
.pbx-ik-status-v3.default { background: #7e8a9a; }
.pbx-ik-tag-v3 { font-size: calc(0.74rem * var(--pbx-fs, 1)); color: #475569; }
.pbx-ik-tag-v3 i { color: #94a3b8; margin-right: 3px; }
.pbx-ik-date-v3 { margin-left: auto; font-size: calc(0.72rem * var(--pbx-fs, 1)); color: #94a3b8; }
.pbx-ik-full-btn-v3 { margin-top: 10px; width: 100%; border: 1px solid #e2e8f0; background: #fff; color: var(--primary, #6366f1); font-weight: 700; font-size: calc(0.76rem * var(--pbx-fs, 1)); padding: 7px; border-radius: 9px; cursor: pointer; transition: all 0.15s ease; }
.pbx-ik-full-btn-v3:hover { border-color: var(--primary, #6366f1); }

/* Post-it condiviso (giallo) */
.pbx-sticky-wrap-v3 { margin-bottom: 10px; }
.pbx-sticky-v3 { background: #fef9c3; border: 1px solid #fde68a; border-radius: 14px; padding: 10px 13px; }
.pbx-sticky-label-v3 { font-size: calc(0.72rem * var(--pbx-fs, 1)); font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; color: #a16207; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.pbx-sticky-saved-v3 { font-size: calc(0.66rem * var(--pbx-fs, 1)); font-weight: 600; color: #16a34a; margin-left: auto; text-transform: none; letter-spacing: 0; }
.pbx-sticky-text-v3 { width: 100%; min-height: 54px; border: none; background: transparent; resize: vertical; font-size: calc(0.85rem * var(--pbx-fs, 1)); color: #713f12; outline: none; font-family: inherit; }
.pbx-sticky-text-v3::placeholder { color: #ca9a3f; }
.pbx-sticky-ro-v3 { font-size: calc(0.85rem * var(--pbx-fs, 1)); color: #713f12; white-space: pre-wrap; }

/* Nota personale (popover) */
/* Nota personale in stile post-it 3D: carta gialla, inclinata, sollevata */
.pbx-personal-note-panel-v3 {
    position: fixed; z-index: 1095; width: 300px;
    background: linear-gradient(165deg, #fff7ad 0%, #ffec86 100%);
    border: none; border-radius: 3px 3px 6px 6px;
    padding: 16px 15px 20px;
    box-shadow:
        0 1px 1px rgba(0, 0, 0, 0.10),
        0 10px 20px -6px rgba(133, 100, 12, 0.38),
        0 22px 42px -14px rgba(0, 0, 0, 0.30);
    transform: rotate(-1.6deg); transform-origin: top center;
    animation: pbxPnotePop 0.2s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes pbxPnotePop {
    from { opacity: 0; transform: rotate(-1.6deg) scale(.9) translateY(-8px); }
    to   { opacity: 1; transform: rotate(-1.6deg) scale(1); }
}
/* nastro adesivo in alto */
.pbx-personal-note-panel-v3::before {
    content: ''; position: absolute; top: -10px; left: 50%;
    transform: translateX(-50%) rotate(-2.5deg);
    width: 78px; height: 19px; border-radius: 2px;
    background: rgba(255, 255, 255, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
}
/* angolo piegato in basso a destra */
.pbx-personal-note-panel-v3::after {
    content: ''; position: absolute; right: 0; bottom: 0; width: 32px; height: 32px;
    background: linear-gradient(135deg, transparent 46%, rgba(0, 0, 0, 0.06) 47%, rgba(180, 120, 10, 0.28) 100%);
    border-bottom-right-radius: 6px;
}
.pbx-pnote-head-v3 { font-size: calc(0.72rem * var(--pbx-fs, 1)); font-weight: 800; text-transform: uppercase; color: #92610a; margin-bottom: 9px; display: flex; align-items: center; gap: 6px; letter-spacing: .02em; }
.pbx-pnote-priv-v3 { margin-left: auto; font-size: calc(0.62rem * var(--pbx-fs, 1)); background: rgba(202, 138, 4, 0.16); color: #a16207; padding: 1px 8px; border-radius: 20px; text-transform: none; font-weight: 700; }
.pbx-pnote-text-v3 {
    width: 100%; min-height: 124px; border: none; border-radius: 0; padding: 4px 2px;
    background: transparent; color: #5b4708; font-size: calc(0.95rem * var(--pbx-fs, 1)); line-height: 1.55;
    resize: vertical; outline: none;
    font-family: ui-rounded, 'SF Pro Rounded', 'Segoe UI', system-ui, inherit;
}
.pbx-pnote-text-v3::placeholder { color: rgba(146, 97, 10, 0.5); }
.pbx-pnote-text-v3:focus { border: none; box-shadow: none; }

/* ── Pannello richiesta inline (ex-drawer) sotto la plancia.
   max-height (non display:none) così i select2 hanno larghezza all'init. */
.richiesta-panel-v3 {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease;
}
.richiesta-panel-v3.is-open { max-height: 3000px; opacity: 1; }
.richiesta-panel-inner-v3 {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 20px;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    margin-top: 16px;
}
.richiesta-panel-v3 .richiesta-drawer-body { overflow: visible; }

/* Form "Nuova richiesta" dentro al modale: mostrato pieno, corpo scrollabile */
.richiesta-modal-content-v3 { border: none; border-radius: 20px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.28); }
#richiestaModalBody { overflow-x: hidden; }
#richiestaModalBody .richiesta-panel-v3 { max-height: none; opacity: 1; overflow: visible; }
#richiestaModalBody .richiesta-panel-inner-v3 { margin-top: 0; border: none; box-shadow: none; border-radius: 20px; }
#richiestaModalBody .richiesta-drawer-body { overflow: visible; }
/* select2 inizializzato in un contenitore più largo: forza il 100% nel modale */
#richiestaModalBody .select2-container { width: 100% !important; max-width: 100%; }
#richiestaModal .modal-dialog { max-width: 720px; }
/* Override compatti per rendere il form nel modale più snello e meno gigantesco */
#richiestaModalBody { font-size: 0.82rem; }
#richiestaModalBody .form-group { margin-bottom: 10px; }
#richiestaModalBody label { font-size: 0.76rem; font-weight: 600; color: #64748b; margin-bottom: 4px; }
#richiestaModalBody .form-control { font-size: 0.82rem; padding: 6px 10px; height: auto; }
#richiestaModalBody .select2-container--default .select2-selection--single { height: 36px !important; font-size: 0.82rem; display: flex !important; align-items: center !important; }
#richiestaModalBody .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: normal !important; padding-left: 12px !important; }
#richiestaModalBody .select2-container--default .select2-selection--single .select2-selection__arrow { height: 34px !important; display: flex !important; align-items: center !important; }
#richiestaModalBody .reqb-section-title-v3 { font-size: calc(0.68rem * var(--pbx-fs, 1)); margin-bottom: 8px; }
#richiestaModalBody .reqb-section-v3 { margin-bottom: 10px; }
#richiestaModalBody .reqb-contact-done-v3 { padding: 6px 14px; font-size: calc(0.78rem * var(--pbx-fs, 1)); margin-top: 2px; }
#richiestaModalBody .richiesta-drawer-footer { padding: 10px 22px; }
#richiestaModalBody .btn-drawer-save-v3, #richiestaModalBody .btn-drawer-cancel-v3 { padding: 6px 14px; font-size: 0.78rem; }
/* indicatore salvataggio nota personale */
.pbx-pnote-saved-v3 { font-size: calc(0.62rem * var(--pbx-fs, 1)); font-weight: 700; color: #16a34a; text-transform: none; }

/* ── Plancia: zona principale (chiamata+identikit+richiesta) | log chiamate */
@media (min-width: 992px) {
    .pbx-board-grid-v3 {
        display: grid;
        grid-template-columns: 1.65fr 1fr;
        gap: 0;
        align-items: stretch;
    }
    .pbx-board-log-v3 {
        border-left: 1px solid rgba(0, 0, 0, 0.06);
        background: rgba(15, 23, 42, 0.012);
        display: flex;
        flex-direction: column;
        min-height: 0;
    }
    .pbx-board-log-v3 .pbx-feed-v3 { flex: 1; max-height: 520px; }
}
/* dentro la zona principale, identikit appena sotto la chiamata */
.pbx-hero-v3.has-call .pbx-hero-panel-v3 { margin-top: 2px; }

/* chip dati contatto nell'identikit rapido */
.pbx-ik-chips-v3 { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pbx-ik-chip-v3 { display: inline-flex; align-items: center; gap: 5px; font-size: calc(0.72rem * var(--pbx-fs, 1)); color: #475569; background: #fff; border: 1px solid #e2e8f0; border-radius: 20px; padding: 3px 9px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pbx-ik-chip-v3 i { color: #94a3b8; font-size: calc(0.66rem * var(--pbx-fs, 1)); }

/* ── Modulo Crea Richiesta a box (immobile | info immobile) */
.reqb-section-v3 { margin-bottom: 16px; }
.reqb-section-title-v3 { font-size: calc(0.72rem * var(--pbx-fs, 1)); font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: #94a3b8; margin-bottom: 10px; display: flex; align-items: center; gap: 7px; }
.reqb-section-title-v3 i { color: var(--primary, #6366f1); }
.reqb-immobile-grid-v3 { margin-bottom: 16px; }
.reqb-box-v3 { background: #f8fafc; border: 1px solid rgba(0, 0, 0, 0.06); border-radius: 14px; padding: 14px; height: 100%; }
.reqb-box-info-v3 { background: color-mix(in srgb, var(--primary, #6366f1) 4%, transparent); border-color: color-mix(in srgb, var(--primary, #6366f1) 12%, transparent); }
.reqb-box-label-v3 { font-size: calc(0.72rem * var(--pbx-fs, 1)); font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; color: #64748b; margin-bottom: 9px; display: flex; align-items: center; gap: 6px; }
.reqb-box-label-v3 i { color: var(--primary, #6366f1); }
.reqb-box-v3 .select2-container { width: 100% !important; }

.reqb-propinfo-v3 { font-size: calc(0.82rem * var(--pbx-fs, 1)); color: #475569; }
.reqb-propinfo-empty-v3, .reqb-propinfo-loading-v3 { font-size: calc(0.78rem * var(--pbx-fs, 1)); color: #94a3b8; padding: 6px 0; }
.reqb-propinfo-empty-v3 i { margin-right: 5px; }
.reqb-pi-photo-v3 { width: 100%; height: 90px; object-fit: cover; border-radius: 10px; margin-bottom: 8px; display: block; }
.reqb-pi-addr-v3 { font-weight: 700; color: #0f172a; margin-bottom: 8px; font-size: calc(0.85rem * var(--pbx-fs, 1)); }
.reqb-pi-addr-v3 i { color: var(--primary, #6366f1); margin-right: 4px; }
.reqb-pi-badges-v3 { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.reqb-pi-badge-v3 { font-size: calc(0.72rem * var(--pbx-fs, 1)); font-weight: 700; padding: 3px 8px; border-radius: 6px; }
.reqb-pi-badge-v3.price { background: rgba(0, 200, 117, 0.1); color: #00a35c; }
.reqb-pi-badge-v3.offer { background: rgba(253, 171, 61, 0.12); color: #d97706; }
.reqb-pi-badge-v3.type  { background: color-mix(in srgb, var(--primary, #6366f1) 10%, transparent); color: var(--primary, #6366f1); }
.reqb-pi-badge-v3.mq    { background: rgba(100, 116, 139, 0.1); color: #64748b; }
.reqb-pi-agent-v3 { font-size: calc(0.78rem * var(--pbx-fs, 1)); color: #475569; margin-bottom: 6px; }
.reqb-pi-agent-v3 i { color: var(--primary, #6366f1); margin-right: 4px; }
.reqb-pi-desc-v3 { font-size: calc(0.76rem * var(--pbx-fs, 1)); color: #64748b; line-height: 1.4; max-height: 62px; overflow: hidden; }
.reqb-pi-link-v3 { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: calc(0.74rem * var(--pbx-fs, 1)); font-weight: 700; color: var(--primary, #6366f1); text-decoration: none; }
.reqb-pi-link-v3:hover { text-decoration: underline; }

/* ── Modalità rapida (richiesta da chiamata): l'anagrafica resta visibile
   (riepilogo per contatto noto, campi editabili per uno nuovo/sconosciuto) */
.richiesta-panel-v3.quick-mode .reqb-hide-quick { display: block; }
#reqQuickSlot .richiesta-panel-v3.is-open { margin-bottom: 6px; }
#reqQuickSlot { padding: 0 18px; }

/* ── Densità modulo Crea Richiesta + plancia */
.reqb-immobile-section-v3 { margin-bottom: 16px; }
.reqb-immobile-section-v3 .select2-container { width: 100% !important; }
/* "Per quale immobile?" solo per richieste specifiche / collaborazione (vedi reqSyncImmobile) */
.richiesta-panel-v3 .reqb-immobile-section-v3 { display: none; }
.richiesta-panel-v3.needs-immobile .reqb-immobile-section-v3 { display: block; }
.reqb-propinfo-v3 { margin-top: 10px; }
.reqb-propinfo-v3:empty { display: none; margin-top: 0; }
.reqb-pi-card-v3 { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid rgba(0, 0, 0, 0.06); border-radius: 12px; padding: 10px; }
.reqb-pi-photo-v3 { width: 140px !important; height: 100px !important; object-fit: cover; border-radius: 10px; flex: 0 0 auto; margin-bottom: 0 !important; display: block; }
.reqb-pi-body-v3 { min-width: 0; flex: 1; }
.reqb-pi-addr-v3 { margin-bottom: 6px; }
.reqb-pi-badges-v3 { margin-bottom: 6px; }
.reqb-pi-agent-v3 { margin-bottom: 4px; }
.reqb-pi-desc-v3 { display: none; } /* descrizione fuori dalla card compatta */

/* note più basse nel modulo richiesta */
.richiesta-panel-v3 textarea.form-control { min-height: 58px; }

/* identikit e post-it affiancati nella zona principale (meno verticale) */
@media (min-width: 992px) {
    .pbx-hero-panel-v3 { display: grid; grid-template-columns: 1.25fr 1fr; gap: 12px; align-items: start; }
    .pbx-hero-panel-v3 .pbx-sticky-wrap-v3 { margin-bottom: 0; }
}
.pbx-sticky-text-v3 { min-height: 62px; }

/* ════════════════════════════════════════════════════════════════
   Centralino Live — Pipeline sequenziale (concept nuovo)
   ════════════════════════════════════════════════════════════════ */
.pbx-pipeline-v3 {
    display: flex;
    align-items: flex-start;
    gap: 0;
    padding: 18px;
    flex-wrap: wrap;
}
.pbx-pl-box-v3 {
    background: #f8fafc;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    padding: 14px;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.pbx-pl-call-v3 { flex: 1 1 200px; }
.pbx-pl-identikit-v3 { flex: 1.15 1 220px; }
.pbx-pl-convert-v3 { flex: 1.25 1 240px; }
.pbx-pl-immobile-v3 { flex: 1.1 1 220px; }

.pbx-pl-arrow-v3 {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    color: #cdd3df;
    font-size: calc(1.2rem * var(--pbx-fs, 1));
}

.pbx-pl-step-head-v3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: calc(0.7rem * var(--pbx-fs, 1));
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 10px;
}
.pbx-pl-step-num-v3 {
    flex: 0 0 auto;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--primary, #6366f1);
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: calc(0.66rem * var(--pbx-fs, 1)); font-weight: 800;
}

/* Stato bloccato (placeholder) */
.pbx-pl-box-v3.is-locked { background: rgba(15, 23, 42, 0.02); border-style: dashed; }
.pbx-pl-box-v3.is-locked .pbx-pl-step-num-v3 { background: #cbd5e1; }
.pbx-pl-locked-msg-v3 {
    display: flex; align-items: center; gap: 8px;
    font-size: calc(0.78rem * var(--pbx-fs, 1)); color: #94a3b8;
    padding: 8px 0;
}
.pbx-pl-box-v3:not(.is-locked) .pbx-pl-locked-msg-v3 { display: none; }
.pbx-pl-box-v3.is-locked .pbx-pl-slot-v3,
.pbx-pl-box-v3.is-locked .pbx-pl-immobile-content-v3 { display: none; }
.pbx-pl-empty-v3 { font-size: calc(0.78rem * var(--pbx-fs, 1)); color: #94a3b8; padding: 6px 0; }
.pbx-pl-empty-v3 i { margin-right: 6px; }

/* BOX 1 — Chiamata */
.pbx-callbox-status-v3 {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: calc(0.7rem * var(--pbx-fs, 1)); font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em;
    color: #15803d; margin-bottom: 10px;
}
.pbx-callbox-status-v3:not(.incall):not(.ringing) { color: #64748b; }
.pbx-pl-call-v3.has-call { border-color: rgba(34, 197, 94, 0.3); background: linear-gradient(135deg, rgba(34,197,94,0.07), rgba(34,197,94,0.01)); }
.pbx-callbox-main-v3 { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.pbx-callbox-avatar-v3 {
    flex: 0 0 auto; width: 46px; height: 46px; border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; color: #fff;
    background: linear-gradient(135deg, var(--primary, #6366f1), color-mix(in srgb, var(--primary, #6366f1) 60%, black));
}
.pbx-callbox-avatar-v3.incall, .pbx-callbox-avatar-v3.ringing { background: linear-gradient(135deg, #22c55e, #15803d); }
.pbx-callbox-info-v3 { min-width: 0; flex: 1; }
.pbx-callbox-name-v3 { font-size: calc(0.98rem * var(--pbx-fs, 1)); font-weight: 800; color: #0f172a; display: flex; align-items: center; gap: 6px; }
.pbx-callbox-num-v3 { font-size: calc(0.84rem * var(--pbx-fs, 1)); font-weight: 600; color: #334155; margin-top: 2px; }
.pbx-callbox-num-v3 i, .pbx-callbox-src-v3 i { color: #94a3b8; font-size: calc(0.72rem * var(--pbx-fs, 1)); margin-right: 4px; }
.pbx-callbox-src-v3 { font-size: calc(0.76rem * var(--pbx-fs, 1)); color: #64748b; }
.pbx-callbox-time-v3 { font-size: calc(0.7rem * var(--pbx-fs, 1)); color: #94a3b8; white-space: nowrap; align-self: flex-start; }
.pbx-callbox-actions-v3 { display: flex; gap: 8px; margin-top: auto; }
.pbx-cb-btn-v3 {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border: none; border-radius: 11px; padding: 9px; font-size: calc(0.8rem * var(--pbx-fs, 1)); font-weight: 700; cursor: pointer;
    transition: all 0.15s ease;
}
.pbx-cb-btn-v3.primary { background: var(--primary, #6366f1); color: #fff; }
.pbx-cb-btn-v3.primary:hover { transform: translateY(-1px); }
.pbx-cb-btn-v3.call { background: #22c55e; color: #fff; }
.pbx-cb-btn-v3.call:hover { background: #16a34a; }
.pbx-callbox-idle-v3 { text-align: center; color: #94a3b8; padding: 18px 0; }
.pbx-callbox-idle-v3 i { font-size: calc(1.4rem * var(--pbx-fs, 1)); display: block; margin-bottom: 8px; color: #cbd5e1; }
.pbx-callbox-idle-v3 div { font-size: calc(0.82rem * var(--pbx-fs, 1)); }

/* LOG box con schede */
.pbx-log-box-v3 { margin: 0 18px 14px; border: 1px solid rgba(0, 0, 0, 0.06); border-radius: 16px; overflow: hidden; }
.pbx-log-tabs-v3 { display: flex; background: #f8fafc; border-bottom: 1px solid rgba(0, 0, 0, 0.06); }
.pbx-log-tab-v3 {
    display: inline-flex; align-items: center; gap: 7px;
    border: none; background: transparent; cursor: pointer;
    padding: 11px 18px; font-size: calc(0.8rem * var(--pbx-fs, 1)); font-weight: 700; color: #94a3b8;
    border-bottom: 2px solid transparent; transition: all 0.15s ease;
}
.pbx-log-tab-v3:hover { color: #475569; }
.pbx-log-tab-v3.is-active { color: var(--primary, #6366f1); border-bottom-color: var(--primary, #6366f1); background: #fff; }
.pbx-log-tab-count-v3 { font-size: calc(0.66rem * var(--pbx-fs, 1)); font-weight: 800; background: rgba(15,23,42,0.06); color: #64748b; padding: 1px 7px; border-radius: 20px; }
.pbx-log-tab-v3.is-active .pbx-log-tab-count-v3 { background: color-mix(in srgb, var(--primary, #6366f1) 12%, transparent); color: var(--primary, #6366f1); }
.pbx-log-feed-v3 { max-height: 300px; padding: 8px 10px; }

/* Il modulo richiesta dentro il box Converti (sblocca) */
.pbx-pl-convert-v3 .richiesta-panel-v3 { max-height: none; opacity: 1; }
.pbx-pl-convert-v3 .richiesta-panel-inner-v3 { margin-top: 0; border: none; box-shadow: none; border-radius: 0; }
.pbx-pl-convert-v3 .richiesta-drawer-header { display: none; } /* l'intestazione è lo step-head del box */
.pbx-pl-convert-v3 .richiesta-drawer-body { padding: 0; }
.pbx-pl-convert-v3 .richiesta-drawer-footer { background: transparent; border-top: 1px solid rgba(0,0,0,0.06); padding: 12px 0 0; }
.pbx-pl-convert-v3 .reqb-box-v3 { background: #fff; }

/* Box Immobile (step 4) — riusa la card info compatta */
.pbx-pl-immobile-content-v3 .reqb-pi-card-v3 { border: none; padding: 0; background: transparent; }
.pbx-pl-immobile-content-v3 .reqb-pi-photo-v3 { width: 100% !important; height: 120px !important; margin-bottom: 8px !important; }
.pbx-pl-immobile-content-v3 .reqb-pi-card-v3 { flex-direction: column; }

@media (max-width: 1100px) {
    .pbx-pl-arrow-v3 { transform: rotate(90deg); width: 100%; height: 22px; }
    .pbx-pl-box-v3 { flex: 1 1 100% !important; }
}

/* ════════════════════════════════════════════════════════════════
   Centralino pipeline — SEMPLIFICAZIONE (meno info, meno spazio, più bassa)
   ════════════════════════════════════════════════════════════════ */
.pbx-pipeline-v3 { padding: 14px; }
.pbx-pl-box-v3 { padding: 11px; border-radius: 13px; }
.pbx-pl-step-head-v3 { margin-bottom: 8px; font-size: calc(0.65rem * var(--pbx-fs, 1)); }
.pbx-pl-step-num-v3 { width: 18px; height: 18px; font-size: calc(0.6rem * var(--pbx-fs, 1)); }
.pbx-pl-arrow-v3 { width: 26px; font-size: calc(1rem * var(--pbx-fs, 1)); }

/* Box 1 — Chiamata compatta */
.pbx-callbox-status-v3 { margin-bottom: 7px; font-size: calc(0.62rem * var(--pbx-fs, 1)); }
.pbx-callbox-avatar-v3 { width: 38px; height: 38px; border-radius: 11px; font-size: calc(0.76rem * var(--pbx-fs, 1)); }
.pbx-callbox-main-v3 { gap: 9px; margin-bottom: 9px; }
.pbx-callbox-name-v3 { font-size: calc(0.9rem * var(--pbx-fs, 1)); }
.pbx-callbox-num-v3 { font-size: calc(0.8rem * var(--pbx-fs, 1)); margin-top: 1px; }
.pbx-callbox-src-v3 { font-size: calc(0.72rem * var(--pbx-fs, 1)); }
.pbx-callbox-time-v3 { font-size: calc(0.66rem * var(--pbx-fs, 1)); }
.pbx-cb-btn-v3 { padding: 7px; font-size: calc(0.76rem * var(--pbx-fs, 1)); border-radius: 9px; }

/* Box 2 — Identikit compatto */
.pbx-ik-chips-v3 { gap: 4px; margin-bottom: 7px; }
.pbx-ik-chip-v3 { font-size: calc(0.67rem * var(--pbx-fs, 1)); padding: 2px 7px; }
.pbx-identikit-list-v3 { gap: 4px; }
.pbx-identikit-row-v3 { font-size: calc(0.73rem * var(--pbx-fs, 1)); }
.pbx-ik-status-v3 { font-size: calc(0.62rem * var(--pbx-fs, 1)); padding: 2px 6px; }
.pbx-ik-full-btn-v3 { margin-top: 8px; padding: 5px; font-size: calc(0.7rem * var(--pbx-fs, 1)); }
.pbx-identikit-empty-v3, .pbx-pl-empty-v3 { font-size: calc(0.74rem * var(--pbx-fs, 1)); padding: 4px 0; }

/* Post-it: striscia compatta */
.pbx-sticky-wrap-v3 { margin: 8px 0 0; }
.pbx-sticky-v3 { padding: 7px 10px; border-radius: 10px; }
.pbx-sticky-label-v3 { margin-bottom: 3px; font-size: calc(0.63rem * var(--pbx-fs, 1)); }
.pbx-sticky-text-v3 { min-height: 32px; font-size: calc(0.8rem * var(--pbx-fs, 1)); }

/* Box 3 — Converti: via i titoli sezione, campi compatti, note collassate */
.pbx-pl-convert-v3 .reqb-section-title-v3 { display: none; }
.pbx-pl-convert-v3 .reqb-section-v3 { margin-bottom: 10px; }
.pbx-pl-convert-v3 .reqb-immobile-section-v3 { margin-bottom: 10px; padding: 10px; }
.pbx-pl-convert-v3 .reqb-box-label-v3 { margin-bottom: 7px; }
.pbx-pl-convert-v3 .form-group { margin-bottom: 8px; }
.pbx-pl-convert-v3 label { font-size: calc(0.74rem * var(--pbx-fs, 1)); margin-bottom: 3px; }
.pbx-pl-convert-v3 textarea.form-control { min-height: 44px; }
.pbx-pl-convert-v3 .richiesta-drawer-footer { padding: 10px 0 0; }
.pbx-pl-convert-v3 .btn-drawer-save-v3, .pbx-pl-convert-v3 .btn-drawer-cancel-v3 { padding: 7px 16px; font-size: calc(0.8rem * var(--pbx-fs, 1)); }

/* toggle note collassabile */
.reqb-extra-v3 { margin-bottom: 10px; }
.reqb-extra-summary-v3 {
    cursor: pointer; list-style: none; user-select: none;
    font-size: calc(0.74rem * var(--pbx-fs, 1)); font-weight: 700; color: var(--primary, #6366f1);
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 0;
}
.reqb-extra-summary-v3::-webkit-details-marker { display: none; }
.reqb-extra-summary-v3::before { content: '\f067'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: calc(0.66rem * var(--pbx-fs, 1)); }
details[open] > .reqb-extra-summary-v3::before { content: '\f068'; }

/* Box 4 — Immobile più piccolo */
.pbx-pl-immobile-content-v3 .reqb-pi-photo-v3 { height: 88px !important; }
.pbx-pl-immobile-content-v3 .reqb-pi-addr-v3 { font-size: calc(0.8rem * var(--pbx-fs, 1)); margin-bottom: 5px; }
.pbx-pl-immobile-content-v3 .reqb-pi-badges-v3 { margin-bottom: 5px; }
.pbx-pl-immobile-content-v3 .reqb-pi-badge-v3 { font-size: calc(0.68rem * var(--pbx-fs, 1)); padding: 2px 7px; }
.pbx-pl-immobile-content-v3 .reqb-pi-agent-v3 { font-size: calc(0.74rem * var(--pbx-fs, 1)); }

/* Log — righe compatte, meno alto */
.pbx-log-box-v3 { margin: 0 14px 12px; }
.pbx-log-feed-v3 { max-height: 210px; padding: 6px 8px; }
.pbx-log-tab-v3 { padding: 9px 14px; font-size: calc(0.76rem * var(--pbx-fs, 1)); }
.pbx-card-v3 { padding: 7px 9px; gap: 9px; }
.pbx-card-icon-v3 { width: 30px; height: 30px; font-size: calc(0.74rem * var(--pbx-fs, 1)); }
.pbx-card-name-v3 { font-size: calc(0.81rem * var(--pbx-fs, 1)); }
.pbx-card-sub-v3 { font-size: calc(0.7rem * var(--pbx-fs, 1)); }

/* ── Centralino: box liberi (no contenitore unico) */
.pbx-pipeline-v3 { padding: 0; margin-bottom: 16px; gap: 4px; }
.pbx-pl-box-v3 { background: #fff; border-color: rgba(0, 0, 0, 0.05); box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05); }
.pbx-pl-box-v3.is-locked { background: rgba(255, 255, 255, 0.55); box-shadow: none; border-style: dashed; }
.pbx-log-box-v3 { margin: 0 0 16px; background: #fff; box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05); }

/* ════════════════════════════════════════════════════════════════
   Centralino Live — layout "command board" (rif. mockup)
   ════════════════════════════════════════════════════════════════ */
/* Barra chiamata attiva */
.pbx-callbar-v3 {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--secondary, #e8743b);
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    padding: 16px 20px;
    margin-bottom: 18px;
    transition: border-left-color .3s ease, padding .25s ease, box-shadow .3s ease;
}
/* Ingresso chiamata: il contenuto scivola/sfuma + un soft "ring" verde one-shot */
.pbx-callbar-v3.pbx-callbar-anim .pbx-callbar-inner-v3 { animation: pbxCallbarContentIn .34s cubic-bezier(.22, 1, .36, 1); }
.pbx-callbar-v3.pbx-callbar-anim.has-call { animation: pbxCallbarRing .7s ease-out; }
@keyframes pbxCallbarContentIn {
    from { opacity: 0; transform: translateY(-7px); }
    to   { opacity: 1; transform: none; }
}
@keyframes pbxCallbarRing {
    0%   { box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06), 0 0 0 0 rgba(34, 197, 94, 0.35); }
    45%  { box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06), 0 0 0 6px rgba(34, 197, 94, 0.16); }
    100% { box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06), 0 0 0 0 rgba(34, 197, 94, 0); }
}
@media (prefers-reduced-motion: reduce) {
    .pbx-callbar-v3.pbx-callbar-anim .pbx-callbar-inner-v3,
    .pbx-callbar-v3.pbx-callbar-anim.has-call { animation: none; }
}
/* Idle: strip sottile e accento spento (niente box vuoto ingombrante) */
.pbx-callbar-v3:has(.pbx-callbar-inner-v3.idle) {
    padding: 9px 18px; border-left-color: #cbd5e1;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}
.pbx-callbar-inner-v3.idle .pbx-callbar-icon-v3 { width: 34px; height: 34px; font-size: calc(0.95rem * var(--pbx-fs, 1)); }
.pbx-callbar-inner-v3.idle .pbx-callbar-name-v3 { font-size: calc(0.9rem * var(--pbx-fs, 1)); }
/* callbar: main row — no wrap, one clean horizontal strip */
.pbx-callbar-inner-v3 { display: flex; align-items: center; gap: 14px; flex-wrap: nowrap; position: relative; }
.pbx-callbar-inner-v3.idle { opacity: 0.85; }
.pbx-callbar-icon-v3 {
    flex: 0 0 auto; width: 52px; height: 52px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center; font-size: calc(1.3rem * var(--pbx-fs, 1));
    background: color-mix(in srgb, var(--secondary, #e8743b) 16%, white);
    color: var(--secondary, #e8743b);
}
.pbx-callbar-icon-v3.incall, .pbx-callbar-icon-v3.ringing { background: rgba(34,197,94,0.14); color: #16a34a; animation: pbx-live-blink 1.6s infinite; }
.pbx-callbar-icon-v3.idle { background: #f1f5f9; color: #94a3b8; }
.pbx-callbar-info-v3 { min-width: 0; flex: 0 1 auto; }
/* Nota identikit del contatto nello spazio centrale della call-bar (post-it inline) */
/* Nota del contatto nella call-bar, in stile post-it (carta gialla, leggermente sollevata) */
.pbx-callbar-note-v3 {
    flex: 0 1 auto; max-width: 60%; min-width: 0; margin: 0 auto; align-self: center;
    display: flex; align-items: center; gap: 8px;
    padding: 9px 15px; border-radius: 3px 3px 6px 6px;
    background: linear-gradient(172deg, #fff59a 0%, #ffe969 100%);
    border: none;
    box-shadow: 0 1px 1px rgba(0,0,0,.10), 0 6px 14px -6px rgba(133,100,12,.55);
    color: #7a4d09; font-size: calc(0.84rem * var(--pbx-fs, 1)); font-weight: 600; line-height: 1.3;
    transform: rotate(-0.7deg);
}
.pbx-callbar-note-v3.is-empty { display: none; }
.pbx-callbar-note-v3.is-editable { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.pbx-callbar-note-v3.is-editable:hover { transform: rotate(-0.7deg) translateY(-1px); box-shadow: 0 1px 1px rgba(0,0,0,.10), 0 10px 20px -8px rgba(133,100,12,.6); }
.pbx-callbar-note-v3 > i { color: #b45309; flex: 0 0 auto; }
.pbx-callbar-note-txt-v3 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1100px) { .pbx-callbar-note-v3 { display: none; } }

/* Tasto "modifica nota" nell'intestazione identikit (solo backoffice) */
.pbx-ik-noteedit-v3 {
    display: inline-flex; align-items: center; gap: 5px;
    border: 1px dashed #fcd34d; background: rgba(254, 240, 138, .35); color: #a16207;
    font-size: calc(0.68rem * var(--pbx-fs, 1)); font-weight: 700; text-transform: none; letter-spacing: 0;
    padding: 2px 9px; border-radius: 999px; cursor: pointer; transition: background .15s;
}
.pbx-ik-noteedit-v3:hover { background: rgba(254, 240, 138, .7); }
.pbx-ik-noteedit-v3 i { font-size: calc(0.66rem * var(--pbx-fs, 1)); color: #ca8a04; }
.pbx-callbar-status-v3 {
    display: flex; align-items: center; gap: 8px;
    font-size: calc(0.68rem * var(--pbx-fs, 1)); font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--secondary, #e8743b);
}
.pbx-callbar-prio-v3 { background: color-mix(in srgb, var(--secondary, #e8743b) 14%, white); color: var(--secondary, #e8743b); padding: 1px 8px; border-radius: 6px; font-size: calc(0.62rem * var(--pbx-fs, 1)); }
.pbx-callbar-name-v3 { font-size: calc(1.2rem * var(--pbx-fs, 1)); font-weight: 800; color: #1c2434; line-height: 1.15; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.pbx-callbar-meta-v3 { font-size: calc(0.82rem * var(--pbx-fs, 1)); color: #64748b; margin-top: 2px; white-space: nowrap; }
.pbx-callbar-meta-v3 i { font-size: calc(0.72rem * var(--pbx-fs, 1)); color: #94a3b8; margin-right: 4px; }
.pbx-callbar-timer-v3 { flex: 0 0 auto; text-align: center; padding: 0 14px; border-left: 1px solid rgba(0,0,0,0.07); border-right: 1px solid rgba(0,0,0,0.07); }
.pbx-callbar-time-v3 { font-size: calc(1.4rem * var(--pbx-fs, 1)); font-weight: 800; color: #1c2434; font-variant-numeric: tabular-nums; }
.pbx-callbar-timelbl-v3 { font-size: calc(0.6rem * var(--pbx-fs, 1)); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #94a3b8; }
.pbx-callbar-actions-v3 { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.pbx-callbar-convert-v3 {
    display: inline-flex; align-items: center; gap: 9px;
    background: #1c2434; color: #fff; border: none; border-radius: 14px;
    padding: 14px 22px; font-size: calc(0.92rem * var(--pbx-fs, 1)); font-weight: 700; cursor: pointer;
    box-shadow: 0 6px 16px rgba(28, 36, 52, 0.22); transition: all 0.15s ease;
}
.pbx-callbar-convert-v3:hover { transform: translateY(-1px); background: #141b2a; }
.pbx-callbar-iconbtn-v3 {
    width: 46px; height: 46px; border-radius: 14px; border: 1px solid #e2e8f0;
    background: #fff; color: #64748b; cursor: pointer; font-size: calc(0.95rem * var(--pbx-fs, 1)); transition: all 0.15s ease;
}
.pbx-callbar-iconbtn-v3:hover { border-color: #22c55e; color: #16a34a; }

/* Banner "chiamata in attesa": compare sotto la call-bar quando una nuova
   chiamata arriva mentre l'operatore sta compilando una richiesta. Non tocca
   il modulo: offre solo il passaggio manuale al nuovo chiamante. */
.pbx-pending-v3 { margin: -6px 0 18px; }
.pbx-pending-inner-v3 {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 16px; border-radius: 16px;
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(217, 119, 6, 0.28);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 24px rgba(180, 83, 9, 0.10);
}
.pbx-pending-ico-v3 {
    flex: 0 0 auto; width: 36px; height: 36px; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(217, 119, 6, 0.14); color: #d97706; font-size: 0.95rem;
    animation: pbxPendingPulse 1.6s ease-in-out infinite;
}
@keyframes pbxPendingPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.pbx-pending-txt-v3 { flex: 1 1 auto; min-width: 0; }
.pbx-pending-title-v3 {
    font-size: 0.86rem; font-weight: 800; color: #0f172a; line-height: 1.2;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pbx-pending-sub-v3 {
    font-size: 0.74rem; color: #94a3b8; margin-top: 2px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pbx-pending-btn-v3 {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px;
    border: none; border-radius: 12px; cursor: pointer;
    padding: 9px 16px; font-size: 0.8rem; font-weight: 700;
    background: #d97706; color: #fff;
    box-shadow: 0 6px 16px rgba(217, 119, 6, 0.28);
    transition: all 0.15s ease;
}
.pbx-pending-btn-v3:hover { transform: translateY(-1px); background: #b45309; }
.pbx-pending-x-v3 {
    flex: 0 0 auto; width: 32px; height: 32px; border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.06); background: rgba(255, 255, 255, 0.7);
    color: #94a3b8; cursor: pointer; font-size: 0.8rem; transition: all 0.15s ease;
}
.pbx-pending-x-v3:hover { color: #dc2626; border-color: rgba(220, 38, 38, 0.3); }
@media (max-width: 760px) {
    .pbx-pending-inner-v3 { flex-wrap: wrap; }
    .pbx-pending-btn-v3 { width: 100%; justify-content: center; }
}

/* Griglia 3 card */
.pbx-cards-grid-v3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.pbx-rcard-v3 {
    background: #fff; border: 1px solid rgba(0, 0, 0, 0.05); border-radius: 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05); padding: 18px; min-width: 0;
}
.pbx-rcard-head-v3 {
    display: flex; align-items: center; gap: 10px;
    font-size: calc(0.8rem * var(--pbx-fs, 1)); font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em;
    color: #1c2434; margin-bottom: 14px;
}
.pbx-rcard-ico-v3 {
    width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--secondary, #e8743b) 14%, white); color: var(--secondary, #e8743b); font-size: calc(0.85rem * var(--pbx-fs, 1));
}

/* Card Identikit */
.pbx-ik-badge-v3 { margin-left: auto; font-size: calc(0.6rem * var(--pbx-fs, 1)); font-weight: 800; padding: 3px 9px; border-radius: 20px; letter-spacing: 0.03em; }
.pbx-ik-badge-v3.caldo { background: #dcfce7; color: #15803d; }
.pbx-ik-badge-v3.tiepido { background: #fef3c7; color: #b45309; }
.pbx-ik-badge-v3.nuovo { background: #e2e8f0; color: #64748b; }
.pbx-ik-rows-v3 { display: flex; flex-direction: column; gap: 9px; margin-bottom: 12px; }
.pbx-ik-rowx-v3 { display: flex; align-items: baseline; gap: 10px; }
.pbx-ik-rk-v3 { flex: 0 0 76px; font-size: calc(0.7rem * var(--pbx-fs, 1)); font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: #94a3b8; }
.pbx-ik-rv-v3 { font-size: calc(0.86rem * var(--pbx-fs, 1)); font-weight: 700; color: #1c2434; min-width: 0; }
.pbx-ik-rv-v3.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pbx-ik-last-v3 { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.pbx-ik-loading-v3, .pbx-ik-empty-v3 { font-size: calc(0.8rem * var(--pbx-fs, 1)); color: #94a3b8; padding: 10px 0; }
.pbx-ik-empty-v3 i { margin-right: 6px; }
.pbx-ik-full-btn-v3 { width: 100%; margin-top: 6px; border: 1px solid #e8e8ef; background: #fff; color: var(--secondary, #e8743b); font-weight: 700; font-size: calc(0.74rem * var(--pbx-fs, 1)); padding: 8px; border-radius: 11px; cursor: pointer; }
.pbx-ik-full-btn-v3:hover { border-color: var(--secondary, #e8743b); }

/* ── Identikit inline: meta a chip + storico richieste compatto ──────────── */
.pbx-ik-meta-v3 { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pbx-ik-chip-v3 {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: calc(0.74rem * var(--pbx-fs, 1)); font-weight: 600; color: #475569;
    background: #f1f5f9; border: 1px solid rgba(0,0,0,0.04);
    padding: 3px 9px; border-radius: 8px; max-width: 100%;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pbx-ik-chip-v3 i { color: #94a3b8; font-size: calc(0.72rem * var(--pbx-fs, 1)); }
.pbx-ik-chip-v3.strong { color: #1c2434; font-weight: 800; background: color-mix(in srgb, var(--secondary, #e8743b) 12%, white); border-color: transparent; }
.pbx-ik-chip-v3.strong i { color: var(--secondary, #e8743b); }

.pbx-ik-reqs-v3 { display: flex; flex-direction: column; gap: 5px; margin-bottom: 8px; }
.pbx-ik-req-v3 {
    display: flex; align-items: center; gap: 9px; flex-wrap: nowrap;
    padding: 6px 10px; border-radius: 9px; background: #f8fafc;
    border: 1px solid rgba(0,0,0,0.04); min-width: 0;
}
.pbx-ik-req-id-v3 { flex: 0 0 auto; font-size: calc(0.72rem * var(--pbx-fs, 1)); font-weight: 800; color: #94a3b8; font-variant-numeric: tabular-nums; }
.pbx-ik-req-v3 .pbx-ik-status-v3 { flex: 0 0 auto; }
.pbx-ik-req-imm-v3 { flex: 1 1 auto; min-width: 0; font-size: calc(0.78rem * var(--pbx-fs, 1)); font-weight: 600; color: #334155; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pbx-ik-req-imm-v3 i { color: #94a3b8; margin-right: 3px; }
.pbx-ik-req-agent-v3 { flex: 0 0 auto; font-size: calc(0.74rem * var(--pbx-fs, 1)); color: #64748b; white-space: nowrap; }
.pbx-ik-req-agent-v3 i { color: #cbd5e1; margin-right: 3px; }
.pbx-ik-req-date-v3 { flex: 0 0 auto; font-size: calc(0.7rem * var(--pbx-fs, 1)); color: #94a3b8; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pbx-ik-more-v3 { font-size: calc(0.72rem * var(--pbx-fs, 1)); color: #94a3b8; font-weight: 600; padding: 2px 2px 8px; }

/* Card Gestione azione */
.pbx-action-placeholder-v3 { display: flex; align-items: center; gap: 9px; color: #94a3b8; font-size: calc(0.82rem * var(--pbx-fs, 1)); padding: 18px 0; }
.pbx-action-card-v3.has-form .pbx-action-placeholder-v3 { display: none; }
.pbx-action-card-v3 #plConvertSlot { display: none; }
.pbx-action-card-v3.has-form #plConvertSlot { display: block; animation: pbxSlotIn .3s ease; }
@keyframes pbxSlotIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .pbx-action-card-v3.has-form #plConvertSlot { animation: none; } }
.pbx-action-card-v3 .richiesta-panel-v3 { max-height: none; opacity: 1; overflow: visible; }
.pbx-action-card-v3 .richiesta-panel-inner-v3 { border: none; box-shadow: none; margin: 0; border-radius: 0; }
.pbx-action-card-v3 .richiesta-drawer-header { display: none; }
.pbx-action-card-v3 .richiesta-drawer-body { padding: 0; }
/* Titoli di sezione visibili anche in rapida: il form si legge come step
   (Dati anagrafici → Classificazione → Per quale immobile → Assegnazione). */
.pbx-action-card-v3 .reqb-section-title-v3 { display: flex; align-items: center; gap: 6px; font-size: calc(0.68rem * var(--pbx-fs, 1)); font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: #475569; margin-bottom: 7px; }
.pbx-action-card-v3 .reqb-section-title-v3 i { color: var(--secondary, #e8743b); font-size: calc(0.74rem * var(--pbx-fs, 1)); }
.pbx-action-card-v3 .reqb-immobile-section-v3 { background: #f8fafc; padding: 10px; margin-bottom: 10px; border-radius: 12px; border: 1px solid #eef1f6; }
.pbx-action-card-v3 .reqb-box-label-v3 { font-size: calc(0.68rem * var(--pbx-fs, 1)); font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: #475569; display: flex; align-items: center; gap: 6px; margin-bottom: 7px; }
.pbx-action-card-v3 .reqb-box-label-v3 i { color: var(--secondary, #e8743b); }
/* Separazione netta tra i gruppi (anagrafica · azioni · dati collegati) */
.pbx-action-card-v3 .reqb-section-v3 { margin-bottom: 10px; padding-top: 10px; border-top: 1px solid rgba(0,0,0,0.07); }
.pbx-action-card-v3 .reqb-section-v3:first-child,
.pbx-action-card-v3 .reqb-anagrafica-v3 { border-top: none; padding-top: 0; }
/* Chiamante noto: anagrafica nascosta → la Classificazione è la prima, senza bordo */
.richiesta-panel-v3.quick-mode:not(.needs-name) .reqb-class-section-v3 { border-top: none; padding-top: 0; }
.pbx-action-card-v3 .reqb-immobile-section-v3 { margin-top: 0; }
.pbx-action-card-v3 label { font-size: calc(0.68rem * var(--pbx-fs, 1)); font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: #94a3b8; margin-bottom: 3px; display: block; }
.pbx-action-card-v3 .form-group { margin-bottom: 0; }
/* La card è stretta: ogni campo a piena larghezza (niente griglia Bootstrap) */
.pbx-action-card-v3 .row { display: block; margin: 0; }
.pbx-action-card-v3 [class*="col-md-"] { width: 100%; max-width: 100%; flex: 0 0 100%; padding: 0; }
.pbx-action-card-v3 .reqb-section-v3 .row > [class*="col-md-"] + [class*="col-md-"] { margin-top: 8px; }
.pbx-action-card-v3 .richiesta-drawer-footer { padding: 10px 0 0; background: transparent; border: none; justify-content: stretch; }
.pbx-action-card-v3 .btn-drawer-cancel-v3 { display: none; }
.pbx-action-card-v3 .btn-drawer-save-v3 { width: 100%; justify-content: center; background: var(--secondary, #e8743b); padding: 11px; font-size: calc(0.88rem * var(--pbx-fs, 1)); border-radius: 12px; box-shadow: 0 8px 20px color-mix(in srgb, var(--secondary, #e8743b) 28%, transparent); }
.pbx-action-card-v3 .btn-drawer-save-v3:hover { filter: brightness(1.04); }
.pbx-action-card-v3 .form-control { height: 38px; padding-top: 5px; padding-bottom: 5px; }
.pbx-action-card-v3 .select2-container { width: 100% !important; }
.pbx-action-card-v3 .select2-container .select2-selection--single,
.pbx-action-card-v3 .select2-container--default .select2-selection--single { height: 38px; border-radius: 10px; border-color: #e2e8f0; display: flex; align-items: center; }
.pbx-action-card-v3 .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: normal; padding-left: 12px; }
.pbx-action-card-v3 .select2-container--default .select2-selection--single .select2-selection__arrow { height: 36px; }
.pbx-action-card-v3 .reqb-extra-summary-v3 { margin-top: 2px; }
/* Classificazione: righe allineate in alto (label/campi sulla stessa linea) */
.reqb-class-section-v3 .row { align-items: flex-start; }
/* In modalità rapida: la riga torna flex, Tipo e Fonte affiancati (metà/metà).
   Serve battere 9871 (col-md → width:100%) e 9872 (margin-top sulla 2ª col). */
.pbx-action-card-v3 .reqb-class-section-v3 .row { display: flex; flex-wrap: wrap; align-items: flex-start; margin: 0; column-gap: 12px; row-gap: 9px; }
.pbx-action-card-v3 .reqb-class-section-v3 .row > [class*="col-md-"] {
    flex: 1 1 0 !important; width: auto !important; max-width: none !important;
    min-width: 150px; margin-top: 0 !important; padding: 0 !important;
}
.pbx-action-card-v3 .reqb-q-status { display: none; }

/* ── Note e segnalazioni a tab (Condivise / Interne) ──────────────────────── */
.reqb-notes-tabs-v3 { margin-top: 4px; }
.reqb-notes-tabhead-v3 { display: inline-flex; gap: 4px; padding: 3px; background: #f1f5f9; border-radius: 12px; margin-bottom: 10px; }
.reqb-notes-tab-v3 {
    display: inline-flex; align-items: center; gap: 6px;
    border: none; background: transparent; cursor: pointer;
    font-size: calc(0.76rem * var(--pbx-fs, 1)); font-weight: 700; color: #64748b;
    padding: 6px 14px; border-radius: 9px; transition: all .15s ease;
}
.reqb-notes-tab-v3 i { font-size: calc(0.72rem * var(--pbx-fs, 1)); opacity: .85; }
.reqb-notes-tab-v3:hover { color: #1e293b; }
.reqb-notes-tab-v3.is-active { background: #fff; color: var(--primary, #6366f1); box-shadow: 0 2px 6px -1px rgba(15, 23, 42, .12); }
.reqb-notes-pane-v3 { display: none; }
.reqb-notes-pane-v3.is-active { display: block; animation: pbxSlotIn .2s ease; }
.reqb-notes-field-v3 {
    width: 100%; min-height: 92px; resize: vertical;
    border: 1.5px solid #e2e8f0; border-radius: 12px;
    background: #f8fafc; padding: 11px 13px;
    font-size: calc(0.88rem * var(--pbx-fs, 1)); color: #1e293b; font-family: inherit; line-height: 1.5; outline: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.reqb-notes-field-v3::placeholder { color: #94a3b8; }
.reqb-notes-field-v3:focus { border-color: var(--primary, #6366f1); background: #fff; box-shadow: 0 0 0 3px rgba(99, 102, 241, .12); }
.reqb-notes-hint-v3 { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: calc(0.7rem * var(--pbx-fs, 1)); font-weight: 600; color: #94a3b8; }
.reqb-notes-hint-v3 i { font-size: calc(0.68rem * var(--pbx-fs, 1)); }
/* Interne: accento ambra + campo tinta calda per distinguerle */
.reqb-notes-pane-v3[data-pane="int"] .reqb-notes-hint-v3 { color: #b45309; }
.reqb-notes-pane-v3[data-pane="int"] .reqb-notes-hint-v3 i { color: #d97706; }
.reqb-notes-pane-v3[data-pane="int"] .reqb-notes-field-v3 { background: #fffdf5; border-color: #fde9c8; }
.reqb-notes-pane-v3[data-pane="int"] .reqb-notes-field-v3:focus { border-color: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, .14); background: #fff; }

/* Dati anagrafici: telefono ed email come TESTO di default, editabili su "Modifica" */
.reqb-contact-summary-v3 { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; padding: 7px 10px; background: #f8fafc; border: 1px solid #eef1f6; border-radius: 10px; }
.reqb-contact-sumitems-v3 { display: flex; flex-wrap: wrap; gap: 2px 14px; min-width: 0; }
.reqb-contact-sumitem-v3 { display: inline-flex; align-items: center; gap: 6px; font-size: calc(0.8rem * var(--pbx-fs, 1)); font-weight: 600; color: #334155; min-width: 0; }
.reqb-contact-sumitem-v3 i { color: #94a3b8; font-size: calc(0.7rem * var(--pbx-fs, 1)); flex: 0 0 auto; }
.reqb-contact-sumval-v3 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reqb-contact-sumval-v3.empty { color: #cbd5e1; font-weight: 500; font-style: italic; }
.reqb-contact-toggle-v3 { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; color: #64748b; font-size: calc(0.72rem * var(--pbx-fs, 1)); font-weight: 700; cursor: pointer; transition: all 0.15s ease; }
.reqb-contact-toggle-v3:hover { border-color: var(--secondary, #e8743b); color: var(--secondary, #e8743b); }
.reqb-contact-done-v3 { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px; border: none; border-radius: 9px; background: var(--secondary, #e8743b); color: #fff; font-size: calc(0.76rem * var(--pbx-fs, 1)); font-weight: 700; cursor: pointer; transition: filter 0.15s ease; }
.reqb-contact-done-v3:hover { filter: brightness(1.05); }
/* Anagrafica: contatto noto (.has-contact) → barra riepilogo; nuovo/sconosciuto
   → campi editabili. "Modifica" (.show-contact) apre i campi anche per uno noto.
   Specificità alta per battere .pbx-action-card-v3 .row e Bootstrap .row. */
.reqb-contact-extra-v3 { margin-top: 10px; }
/* default (nessun contatto noto): campi editabili, riepilogo nascosto */
.richiesta-panel-v3 .reqb-anagrafica-v3 .reqb-contact-summary-v3 { display: none; }
.richiesta-panel-v3 .reqb-anagrafica-v3 .reqb-contact-extra-v3 { display: flex; flex-wrap: wrap; }
/* contatto noto: mostra la barra grigia, nascondi i campi (finché non "Modifica") */
.richiesta-panel-v3 .reqb-anagrafica-v3.has-contact .reqb-contact-summary-v3 { display: flex; }
.richiesta-panel-v3 .reqb-anagrafica-v3.has-contact:not(.show-contact) .reqb-contact-extra-v3 { display: none; }
/* Modifica su contatto noto: apri i campi, nascondi la barra */
.richiesta-panel-v3 .reqb-anagrafica-v3.has-contact.show-contact .reqb-contact-summary-v3 { display: none; }
.pbx-action-card-v3 .reqb-anagrafica-v3 .reqb-contact-extra-v3 { flex-direction: column; gap: 10px; }

/* Assegnazione: riepilogo "a chi va" + forzatura on demand */
.reqb-assign-summary-v3 { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; background: #f8fafc; border: 1px solid #eef1f6; border-radius: 10px; }
.reqb-assign-who-v3 { display: flex; align-items: center; gap: 9px; min-width: 0; }
.reqb-assign-ic-v3 { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: rgba(99,102,241,0.1); color: #4f46e5; font-size: calc(0.82rem * var(--pbx-fs, 1)); }
.reqb-assign-txt-v3 { min-width: 0; }
.reqb-assign-name-v3 { font-size: calc(0.84rem * var(--pbx-fs, 1)); font-weight: 800; color: #1c2434; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reqb-assign-reason-v3 { font-size: calc(0.68rem * var(--pbx-fs, 1)); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: #94a3b8; }
.reqb-assign-v3.is-forced .reqb-assign-ic-v3 { background: color-mix(in srgb, var(--secondary, #e8743b) 14%, white); color: var(--secondary, #e8743b); }
.reqb-assign-v3.is-forced .reqb-assign-reason-v3 { color: var(--secondary, #e8743b); }
.reqb-force-extra-v3 { display: none; margin-top: 10px; }
.reqb-assign-v3.show-force .reqb-force-extra-v3 { display: block; }
.reqb-force-clear-v3 { margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border: none; background: none; color: #94a3b8; font-size: calc(0.72rem * var(--pbx-fs, 1)); font-weight: 700; cursor: pointer; transition: color 0.15s ease; }
.reqb-force-clear-v3:hover { color: var(--secondary, #e8743b); }

/* Card Immobile */
.pbx-prop-placeholder-v3 { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #cbd5e1; font-size: calc(0.82rem * var(--pbx-fs, 1)); padding: 30px 0; gap: 10px; }
.pbx-prop-placeholder-v3 i { font-size: calc(1.6rem * var(--pbx-fs, 1)); }
.pbx-prop-placeholder-v3 div { color: #94a3b8; }
.pbx-prop-card-v3 { padding: 0; overflow: hidden; }
.pbx-prop-card-v3 .pbx-prop-placeholder-v3 { padding: 40px 18px; }
.pbx-prop-card-v3.has-prop .pbx-prop-placeholder-v3 { display: none; }
.pbx-prop-card-v3 #plImmobileContent { display: none; }
.pbx-prop-card-v3.has-prop #plImmobileContent { display: block; }
.pbx-prop-photo-wrap-v3 { position: relative; }
.pbx-prop-photo-v3 { width: 100%; height: 118px; object-fit: cover; display: block; }
.pbx-prop-photo-v3.noimg { display: flex; align-items: center; justify-content: center; background: #f1f5f9; color: #cbd5e1; font-size: calc(2rem * var(--pbx-fs, 1)); }
.pbx-prop-rif-v3 { position: absolute; top: 10px; right: 10px; background: #1c2434; color: #fff; font-size: calc(0.64rem * var(--pbx-fs, 1)); font-weight: 800; padding: 3px 9px; border-radius: 8px; }
.pbx-prop-body-v3 { padding: 12px 14px 14px; }
.pbx-prop-cap-v3 { font-size: calc(0.64rem * var(--pbx-fs, 1)); font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--secondary, #e8743b); margin-bottom: 2px; }
.pbx-prop-title-v3 { font-size: calc(0.98rem * var(--pbx-fs, 1)); font-weight: 800; color: #1c2434; line-height: 1.2; }
.pbx-prop-loc-v3 { font-size: calc(0.78rem * var(--pbx-fs, 1)); color: #64748b; margin-top: 2px; }
.pbx-prop-loc-v3 i { color: #94a3b8; margin-right: 3px; }
/* Prezzo · Spazio: riga compatta invece di due grossi box */
.pbx-prop-stats-v3 { display: flex; gap: 8px; margin: 10px 0; }
.pbx-prop-stat-v3 { flex: 1 1 0; display: flex; align-items: baseline; gap: 6px; background: #f8fafc; border-radius: 10px; padding: 7px 11px; }
.pbx-prop-stat-k-v3 { font-size: calc(0.6rem * var(--pbx-fs, 1)); font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: #94a3b8; }
.pbx-prop-stat-v-v3 { font-size: calc(0.92rem * var(--pbx-fs, 1)); font-weight: 800; color: #1c2434; }
.pbx-prop-specs-v3 { display: flex; flex-wrap: wrap; gap: 5px 12px; margin: 0 0 10px; }
.pbx-prop-spec-v3 { display: inline-flex; align-items: center; gap: 5px; font-size: calc(0.72rem * var(--pbx-fs, 1)); font-weight: 600; color: #475569; }
.pbx-prop-spec-v3 i { color: #94a3b8; font-size: calc(0.72rem * var(--pbx-fs, 1)); }
.pbx-prop-info-v3 { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; padding-top: 9px; border-top: 1px solid #eef2f7; }
/* Titolo (via) + badge categoria */
.pbx-prop-titlerow-v3 { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pbx-prop-titlerow-v3 .pbx-prop-title-v3 { flex: 0 1 auto; }
.pbx-prop-catbadge-v3 { flex: 0 0 auto; font-size: calc(0.6rem * var(--pbx-fs, 1)); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--secondary, #e8743b); background: color-mix(in srgb, var(--secondary, #e8743b) 13%, white); padding: 3px 9px; border-radius: 20px; }
/* Pulsante "Apri su Google Maps" accanto alla località */
.pbx-prop-maps-v3 { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; font-size: calc(0.72rem * var(--pbx-fs, 1)); font-weight: 700; color: #2563eb; text-decoration: none; white-space: nowrap; }
.pbx-prop-maps-v3:hover { text-decoration: underline; color: #1d4ed8; }
.pbx-prop-maps-v3 i { font-size: calc(0.72rem * var(--pbx-fs, 1)); }
/* Azioni a icone: Scheda completa · Annuncio · Gestionale */
.pbx-prop-actions-v3 { display: flex; gap: 8px; margin-top: 12px; }
.pbx-prop-iconbtn-v3 {
    flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center;
    height: 42px; border-radius: 12px; border: 1px solid #e2e8f0; background: #f8fafc;
    color: #475569; font-size: calc(1rem * var(--pbx-fs, 1)); text-decoration: none; transition: all .15s ease;
}
.pbx-prop-iconbtn-v3:hover { border-color: var(--secondary, #e8743b); color: var(--secondary, #e8743b); background: #fff; transform: translateY(-1px); }
/* Link immobile (Annuncio · Gestionale) sotto "Scheda completa" */
.pbx-prop-links-v3 { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pbx-prop-link-v3 {
    flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 8px 10px; border-radius: 11px; border: 1px solid #e2e8f0; background: #f8fafc;
    color: #475569; font-size: calc(0.76rem * var(--pbx-fs, 1)); font-weight: 700; text-decoration: none; transition: all .15s ease;
}
.pbx-prop-link-v3:hover { border-color: var(--secondary, #e8743b); color: var(--secondary, #e8743b); text-decoration: none; }
.pbx-prop-link-v3 i { font-size: calc(0.74rem * var(--pbx-fs, 1)); }
.pbx-prop-irow-v3 { display: flex; justify-content: space-between; gap: 12px; font-size: calc(0.74rem * var(--pbx-fs, 1)); }
.pbx-prop-ik-v3 { color: #94a3b8; white-space: nowrap; }
.pbx-prop-iv-v3 { font-weight: 700; color: #1c2434; text-align: right; }
.pbx-prop-tags-v3 { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.pbx-prop-tag-v3 { font-size: calc(0.72rem * var(--pbx-fs, 1)); color: #475569; background: #f1f5f9; border-radius: 20px; padding: 3px 10px; }
.pbx-prop-tag-v3 i { color: #94a3b8; margin-right: 3px; }
.pbx-prop-full-btn-v3 { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; border: 1px solid #e2e8f0; background: #fff; color: #1c2434; font-weight: 700; font-size: calc(0.8rem * var(--pbx-fs, 1)); padding: 11px; border-radius: 12px; text-decoration: none; }
.pbx-prop-full-btn-v3:hover { background: #f8fafc; text-decoration: none; color: #1c2434; }
.pbx-prop-loading-v3, .pbx-prop-na-v3 { padding: 30px; text-align: center; color: #94a3b8; }
/* Skeleton loader della card immobile (riusa il keyframe avatar-shimmer) */
.pbx-skel-v3 { position: relative; overflow: hidden; background: #e2e8f0; border-radius: 8px; }
.pbx-skel-v3::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%); background-size: 200% 100%; animation: avatar-shimmer 1.4s infinite; }
.pbx-prop-skel-photo-v3 { height: 150px; border-radius: 0; }
.pbx-prop-skel-body-v3 { padding: 16px 18px; display: flex; flex-direction: column; gap: 9px; }
.pbx-skel-line-v3 { height: 12px; }
.pbx-skel-line-v3.w40 { width: 40%; }
.pbx-skel-line-v3.w50 { width: 50%; }
.pbx-skel-line-v3.w60 { width: 60%; }
.pbx-skel-line-v3.w70 { width: 70%; }
.pbx-prop-skel-stats-v3 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0; }
.pbx-prop-skel-stat-v3 { height: 46px; border-radius: 12px; }
/* Skeleton identikit (stessa libreria .pbx-skel-v3 dell'immobile) */
.pbx-ik-skel-v3 { display: flex; flex-direction: column; gap: 12px; padding: 8px 2px; }
.pbx-ik-skel-tabs-v3 { display: flex; gap: 8px; margin-bottom: 4px; }
.pbx-ik-skel-tabs-v3 .pbx-skel-v3 { height: 30px; width: 92px; border-radius: 10px; }
.pbx-ik-skel-row-v3 { display: flex; align-items: center; gap: 12px; }
.pbx-ik-skel-row-v3 .pbx-skel-line-v3 { height: 14px; }
.pbx-ik-skel-row-v3 .pbx-skel-line-v3.w40 { flex: 0 0 26%; width: auto; }
.pbx-ik-skel-row-v3 .pbx-skel-line-v3.w70 { flex: 1 1 auto; width: auto; }
/* skeleton sopra la tabella richieste mentre la DataTable carica le righe */
.pbx-ik-full-v3 .tab-pane { position: relative; }
.pbx-ik-tblskel-v3 {
    position: absolute; inset: 0; z-index: 3; background: #fff;
    display: flex; flex-direction: column; gap: 12px; padding: 10px 4px;
}

/* Card Cronologia (primo slot) */
.pbx-hist-card-v3 { display: flex; flex-direction: column; min-height: 0; container-type: inline-size; }
/* Card stretta: il canale è ridondante (resta nel tooltip dell'orario) → lo sopprimo */
@container (max-width: 280px) {
    .pbx-hrow-src-v3:not(.missed):not(.live) { display: none; }
}
.pbx-hist-tabs-v3 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; border-bottom: 1px solid rgba(0,0,0,0.06); padding-bottom: 9px; margin-bottom: 10px; }
.pbx-history-tab-v3 { border: none; background: transparent; cursor: pointer; padding: 0 0 2px; font-size: calc(0.76rem * var(--pbx-fs, 1)); font-weight: 800; color: #94a3b8; border-bottom: 2px solid transparent; display: inline-flex; align-items: center; gap: 5px; }
.pbx-history-tab-v3 i { font-size: calc(0.72rem * var(--pbx-fs, 1)); opacity: 0.85; }
.pbx-history-tab-v3.is-active { color: #1c2434; border-bottom-color: var(--secondary, #e8743b); }
.pbx-history-count-v3 { font-size: calc(0.64rem * var(--pbx-fs, 1)); font-weight: 800; background: #f1f5f9; color: #64748b; padding: 1px 7px; border-radius: 20px; }
.pbx-history-tab-v3.is-active .pbx-history-count-v3 { background: color-mix(in srgb, var(--secondary, #e8743b) 14%, white); color: var(--secondary, #e8743b); }
.pbx-histlist-v3 { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; overflow-x: hidden; max-height: 360px; padding-right: 2px; }
.pbx-histlist-v3:empty::after { content: 'Nessuna chiamata'; color: #cbd5e1; font-size: calc(0.78rem * var(--pbx-fs, 1)); padding: 14px 0; }
.pbx-hrow-v3 { display: flex; align-items: center; gap: 11px; padding: 9px 8px; border-radius: 11px; transition: background 0.12s ease; }
.pbx-hrow-v3:hover { background: #f8fafc; }
.pbx-hcard-dir-v3 { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-size: calc(0.72rem * var(--pbx-fs, 1)); }
.pbx-hcard-dir-v3.in { background: rgba(34,197,94,0.12); color: #16a34a; }
.pbx-hcard-dir-v3.missed { background: rgba(226,68,92,0.12); color: #e2445c; }
.pbx-hcard-dir-v3.out { background: rgba(59,130,246,0.12); color: #2563eb; }
.pbx-hcard-dir-v3.vm { background: rgba(234,179,8,0.14); color: #b45309; }
.pbx-hcard-dir-v3 img { width: 18px; height: 18px; object-fit: contain; display: block; }
.pbx-hrow-body-v3 { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pbx-hrow-line1-v3 { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.pbx-hrow-num-v3 { flex: 1 1 auto; min-width: 0; font-size: calc(0.85rem * var(--pbx-fs, 1)); font-weight: 800; color: #1c2434; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pbx-hrow-time-v3 { flex: 0 0 auto; font-size: calc(0.72rem * var(--pbx-fs, 1)); font-weight: 700; color: #94a3b8; cursor: help; text-decoration: underline dotted rgba(148,163,184,0.5); text-underline-offset: 2px; }
/* Tooltip ricco dell'orario (solo questi: scoping via :has) */
.tooltip-inner:has(.pbx-tip-v3) { max-width: 280px; text-align: left; padding: 10px 12px; }
.pbx-tip-head-v3 { font-size: calc(0.86rem * var(--pbx-fs, 1)); font-weight: 800; line-height: 1.2; }
.pbx-tip-name-v3 { font-size: calc(0.73rem * var(--pbx-fs, 1)); opacity: 0.7; margin-top: 1px; }
.pbx-tip-rows-v3 { margin-top: 7px; padding-top: 7px; border-top: 1px solid rgba(255,255,255,0.16); display: flex; flex-direction: column; gap: 4px; }
.pbx-tip-row-v3 { display: flex; justify-content: space-between; gap: 16px; font-size: calc(0.72rem * var(--pbx-fs, 1)); line-height: 1.3; }
.pbx-tip-k-v3 { opacity: 0.62; white-space: nowrap; }
.pbx-tip-v-v3 { font-weight: 700; text-align: right; }
.pbx-hrow-line2-v3 { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pbx-hrow-subname-v3 { flex: 0 1 auto; min-width: 0; font-size: calc(0.72rem * var(--pbx-fs, 1)); color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pbx-hrow-src-v3 { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; font-size: calc(0.46rem * var(--pbx-fs, 1)); font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: #64748b; background: #f1f5f9; border: 1px solid rgba(0,0,0,0.05); border-radius: 4px; padding: 1px 5px; line-height: 1.7; }
.pbx-hrow-src-v3.missed { flex: 0 0 auto; color: #e2445c; background: rgba(226,68,92,0.1); border-color: rgba(226,68,92,0.2); }
.pbx-hrow-src-v3.live { flex: 0 0 auto; color: #16a34a; background: rgba(34,197,94,0.12); border-color: rgba(34,197,94,0.25); }
.pbx-hrow-src-v3.live i { font-size: calc(0.4rem * var(--pbx-fs, 1)); margin-right: 2px; vertical-align: middle; animation: pbxLivePulse 1.2s ease-in-out infinite; }
@keyframes pbxLivePulse { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }
.pbx-hrow-v3.live { background: rgba(34,197,94,0.06); }
.pbx-hrow-v3.live .pbx-hrow-time-v3 { color: #16a34a; text-decoration: none; }
.pbx-recurr-sm-v3 { flex: 0 0 auto; }
/* Identikit presente: tasto pieno accent. Assente: spento/tratteggiato. */
.pbx-hcard-ib-ik-v3.has-ik { color: #fff; background: var(--secondary, #e8743b); border-color: var(--secondary, #e8743b); box-shadow: 0 2px 6px rgba(232,116,59,0.25); }
.pbx-hcard-ib-ik-v3.has-ik:hover { color: #fff; background: #d8602b; border-color: #d8602b; }
.pbx-hcard-ib-ik-v3.no-ik { color: #cbd5e1; background: #f8fafc; border-color: #e2e8f0; border-style: dashed; cursor: not-allowed; box-shadow: none; }
.pbx-hcard-ib-ik-v3.no-ik:hover { color: #cbd5e1; background: #f8fafc; border-color: #e2e8f0; }
.pbx-hrow-actions-v3 { flex: 0 0 auto; display: flex; gap: 4px; }
.pbx-hcard-ib-v3 { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 7px; border: 1px solid #e2e8f0; background: #fff; color: #64748b; cursor: pointer; font-size: calc(0.68rem * var(--pbx-fs, 1)); transition: all 0.15s ease; }
.pbx-hcard-ib-v3:hover { border-color: var(--secondary, #e8743b); color: var(--secondary, #e8743b); }
/* Centralino Live sul telefono (segnalazione di un'agenzia: scritte minuscole, tasti piccoli, intestazione fuori dallo
   schermo): etichette da ~7px a 11px, tasti 44px (HIG), intestazione che va a capo, elenchi che scorrono con la pagina */
@media (max-width: 767.98px) {
    .pbx-live-header-v3 { flex-wrap: wrap; padding: 14px 16px; }
    .pbx-live-brand-v3 { flex-shrink: 1; min-width: 0; white-space: normal; }
    /* La riga su due livelli: tre tasti da 44px accanto al testo lo troncavano ("+31…", "Lored…", "IMMO…"). Sopra chi ha
       chiamato e quando, a tutta larghezza, col nome su una riga sua e le etichette che vanno a capo; sotto i tasti, come
       una piccola barra allineata al testo */
    .pbx-hrow-v3 { flex-wrap: wrap; align-items: flex-start; row-gap: 10px; padding: 12px 8px; }
    .pbx-hrow-body-v3 { flex: 1 1 0; gap: 4px; }
    .pbx-hrow-num-v3 { font-size: 0.95rem; }
    .pbx-hrow-time-v3 { font-size: 0.78rem; }
    .pbx-hrow-line2-v3 { flex-wrap: wrap; row-gap: 4px; }
    .pbx-hrow-subname-v3 { flex-basis: 100%; font-size: 0.86rem; color: #475569; }
    .pbx-hrow-src-v3 { font-size: 0.69rem; }
    .pbx-hrow-src-v3.live i { font-size: 0.6rem; }
    .pbx-hrow-actions-v3 { flex: 1 1 100%; gap: 8px; padding-left: 39px; } /* 39 = icona 28 + spazio 11: sotto il testo */
    .pbx-hcard-ib-v3 { flex: 1 1 0; width: auto; height: 44px; border-radius: 12px; font-size: 1rem; }
    .pbx-feed-v3, .pbx-histlist-v3 { max-height: none; }
}
.pbx-feed-more-v3 { margin-top: 8px; width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 12px; border: 1px dashed #d8dee9; border-radius: 11px; background: #fff; color: #64748b; font-size: calc(0.76rem * var(--pbx-fs, 1)); font-weight: 700; cursor: pointer; transition: all 0.15s ease; }
.pbx-feed-more-v3:hover { border-color: var(--secondary, #e8743b); color: var(--secondary, #e8743b); background: color-mix(in srgb, var(--secondary, #e8743b) 6%, white); }
.pbx-feed-more-v3.is-loading { opacity: 0.6; pointer-events: none; }
.pbx-feed-loading-v3 { display: flex; align-items: center; justify-content: center; padding: 24px 0; color: #cbd5e1; font-size: calc(1.1rem * var(--pbx-fs, 1)); }
.pbx-hist-foot-v3 { margin-top: 10px; padding-top: 9px; border-top: 1px solid rgba(0,0,0,0.06); display: flex; align-items: center; gap: 7px; font-size: calc(0.78rem * var(--pbx-fs, 1)); font-weight: 700; color: #64748b; text-decoration: none; transition: color 0.15s ease; }
/* link successivi (es. Registro Solleciti): stessa lista, senza bordo/spazio ripetuti */
.pbx-hist-foot-v3 + .pbx-hist-foot-v3 { margin-top: 8px; padding-top: 0; border-top: none; }
.pbx-hist-foot-v3:hover { color: var(--secondary, #e8743b); }
.pbx-hist-foot-v3 i { font-size: calc(0.8rem * var(--pbx-fs, 1)); }

/* Pannello Identikit: drawer collassabile che "esce da sotto" la barra chiamata.
   Niente gap: la barra perde il raggio inferiore e il drawer si attacca sotto,
   condividendo l'accento sinistro, come un figlio che scivola fuori. */
.pbx-callbar-v3.has-ik-open {
    margin-bottom: 0;
    border-bottom-left-radius: 0; border-bottom-right-radius: 0;
    box-shadow: 0 4px 10px -6px rgba(15, 23, 42, 0.08);
}
.pbx-ik-panel-v3 {
    margin-top: 0; margin-bottom: 18px; padding: 13px 18px;
    border-top-left-radius: 0; border-top-right-radius: 0;
    border-left: 4px solid var(--secondary, #e8743b);
    border-top: 1px dashed rgba(0, 0, 0, 0.07);
    box-shadow: 0 12px 24px -10px rgba(15, 23, 42, 0.12);
    transform-origin: top center;
    animation: pbxIkSlide 0.2s ease;
    overflow: hidden;
}
@keyframes pbxIkSlide { from { opacity: 0; transform: translateY(-10px) scaleY(0.96); } to { opacity: 1; transform: translateY(0) scaleY(1); } }
.pbx-ik-panel-v3 .pbx-rcard-head-v3 { margin-bottom: 10px; }
/* post-it compatto dentro l'identikit inline */
.pbx-ik-panel-v3 .pbx-sticky-wrap-v3 { margin: 0 0 8px; }
.pbx-ik-panel-v3 .pbx-sticky-v3 { padding: 7px 11px; border-radius: 10px; }
.pbx-ik-panel-v3 .pbx-sticky-label-v3 { margin-bottom: 3px; font-size: calc(0.66rem * var(--pbx-fs, 1)); }
.pbx-ik-panel-v3 .pbx-sticky-text-v3 { min-height: 32px; font-size: calc(0.82rem * var(--pbx-fs, 1)); }
.pbx-ik-panel-v3 .pbx-ik-full-btn-v3 { margin-top: 2px; padding: 6px; font-size: calc(0.72rem * var(--pbx-fs, 1)); }
.pbx-ik-close-v3 { margin-left: 4px; border: none; background: transparent; color: #cbd5e1; cursor: pointer; font-size: calc(0.95rem * var(--pbx-fs, 1)); padding: 2px 4px; line-height: 1; }
.pbx-ik-close-v3:hover { color: #e2445c; }
/* Nota post-it come chip compatto accanto al titolo (se presente) */
.pbx-ik-note-slot-v3 { flex: 0 1 auto; min-width: 0; display: inline-flex; }
.pbx-ik-note-chip-v3 {
    display: inline-block; max-width: 100%; vertical-align: middle;
    border: 1px solid #fde68a; background: #fef9c3; color: #a16207;
    font-size: calc(0.72rem * var(--pbx-fs, 1)); font-weight: 700; text-transform: none; letter-spacing: 0;
    padding: 3px 11px; border-radius: 999px; line-height: 1.4; cursor: default;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
button.pbx-ik-note-chip-v3 { cursor: pointer; transition: background .15s; }
button.pbx-ik-note-chip-v3:hover { background: #fef08a; }
.pbx-ik-note-chip-v3 i { margin-right: 6px; color: #ca8a04; }
.pbx-ik-note-chip-v3.empty { background: #f8fafc; border-color: #e2e8f0; color: #94a3b8; font-weight: 600; }
.pbx-ik-note-chip-v3.empty i { color: #cbd5e1; }
/* Comprimi/espandi: chevron nell'intestazione; nasconde il corpo, tiene la testa */
.pbx-ik-collapse-v3 { margin-left: auto; border: none; background: transparent; color: #94a3b8; cursor: pointer; font-size: calc(0.85rem * var(--pbx-fs, 1)); padding: 2px 5px; line-height: 1; transition: color .15s; }
.pbx-ik-collapse-v3:hover { color: #1c2434; }
.pbx-ik-collapse-v3 i { transition: transform .2s ease; }
.pbx-ik-panel-v3.is-collapsed > *:not(.pbx-rcard-head-v3) { display: none; }
.pbx-ik-panel-v3.is-collapsed .pbx-rcard-head-v3 { margin-bottom: 0; }
.pbx-ik-panel-v3.is-collapsed .pbx-ik-collapse-v3 i { transform: rotate(180deg); }
.pbx-callbar-idbtn-v3.is-active { background: var(--secondary, #e8743b); border-color: var(--secondary, #e8743b); color: #fff; }

@media (max-width: 1100px) {
    .pbx-callbar-timer-v3 { border-right: none; }
}

/* Pulsante Attacca (hangup AMI) sulla barra chiamata */
.pbx-callbar-iconbtn-v3.hangup { border-color: rgba(226, 68, 92, 0.3); color: #e2445c; }
.pbx-callbar-iconbtn-v3.hangup:hover { background: #e2445c; border-color: #e2445c; color: #fff; }

/* Pulsante Rispondi (answer AMI → deskphone) */
.pbx-callbar-answer-v3 {
    display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto;
    background: #22c55e; color: #fff; border: none; border-radius: 12px;
    padding: 10px 18px; font-size: calc(0.84rem * var(--pbx-fs, 1)); font-weight: 800; cursor: pointer; white-space: nowrap;
    box-shadow: 0 3px 12px rgba(34,197,94,0.32);
    animation: pbx-answer-pulse 1.4s infinite;
    transition: background 0.15s ease, transform 0.15s ease;
}
.pbx-callbar-answer-v3:hover { background: #16a34a; transform: translateY(-1px); }
.pbx-callbar-answer-v3:disabled { opacity: 0.6; pointer-events: none; animation: none; }
@keyframes pbx-answer-pulse {
    0%, 100% { box-shadow: 0 3px 12px rgba(34,197,94,0.32); }
    50%       { box-shadow: 0 3px 20px rgba(34,197,94,0.58); }
}

/* Pulsante Transfer */
.pbx-callbar-iconbtn-v3.pbx-transfer-btn { border-color: rgba(99,102,241,0.3); color: var(--primary, #6366f1); }
.pbx-callbar-iconbtn-v3.pbx-transfer-btn:hover { background: var(--primary, #6366f1); border-color: var(--primary, #6366f1); color: #fff; }
.pbx-callbar-iconbtn-v3.pbx-transfer-btn.is-active { background: var(--primary, #6366f1); border-color: var(--primary, #6366f1); color: #fff; }

/* Pannello transfer: riga separata sotto la callbar, full-width */
.pbx-transfer-panel-v3 {
    display: flex; align-items: center; gap: 8px;
    margin-top: 12px; padding-top: 12px;
    border-top: 1px solid rgba(0,0,0,0.06);
    animation: pbxIkSlide 0.15s ease;
}
.pbx-transfer-panel-v3 label {
    font-size: calc(0.78rem * var(--pbx-fs, 1)); font-weight: 700; color: #64748b;
    white-space: nowrap; margin: 0;
}
.pbx-transfer-input-v3 {
    flex: 1; height: 40px; border: 1.5px solid #e2e8f0; border-radius: 10px;
    padding: 0 14px; font-size: calc(0.88rem * var(--pbx-fs, 1)); outline: none; font-family: inherit;
    transition: border-color 0.15s ease;
}
.pbx-transfer-input-v3:focus { border-color: var(--primary, #6366f1); box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
.pbx-transfer-go-v3 {
    height: 40px; padding: 0 18px; border: none; border-radius: 10px;
    background: var(--primary, #6366f1); color: #fff; font-size: calc(0.84rem * var(--pbx-fs, 1)); font-weight: 700;
    cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
    transition: background 0.15s ease;
}
.pbx-transfer-go-v3:hover { background: color-mix(in srgb, var(--primary,#6366f1) 80%, black); }
.pbx-transfer-go-v3:disabled { opacity: 0.6; pointer-events: none; }
.pbx-transfer-cancel-v3 {
    height: 40px; width: 40px; border: 1px solid #e2e8f0; border-radius: 10px;
    background: #fff; color: #94a3b8; cursor: pointer; font-size: calc(0.9rem * var(--pbx-fs, 1));
    transition: all 0.15s ease; display: inline-flex; align-items: center; justify-content: center;
}
.pbx-transfer-cancel-v3:hover { border-color: #e2445c; color: #e2445c; background: rgba(226,68,92,0.05); }

/* ── Layout a 2 colonne: plancia (header+callbar+card) a sinistra,
   softphone+immobile a destra che parte dall'alto, allineato all'header. ── */
.pbx-live-layout-v3 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--pbx-side-w, 340px);
    gap: var(--pbx-board-gap, 18px);
    align-items: start;
}
.pbx-live-main-col-v3 { min-width: 0; }
/* Plancia sinistra: Cronologia · Gestione azione (l'immobile è a destra) */
.pbx-live-main-col-v3 .pbx-cards-grid-v3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }

/* Colonna destra: softphone (in alto) impilato sopra l'immobile */
.pbx-live-side-v3 {
    display: flex; flex-direction: column; gap: var(--pbx-board-gap, 18px);
    min-width: 0;
    /* Il grid e' align-items:start: qui serve l'altezza piena della riga. */
    align-self: stretch;
}
/* Il box immobile resta appeso sotto il softphone e si allunga fino al fondo di
   "Salvataggio richiesta", cosi' quando l'identikit cresce non resta il buco. */
.pbx-live-side-v3 > .pbx-prop-card-v3 { flex: 1 1 auto; display: flex; flex-direction: column; }
.pbx-live-side-v3 > .pbx-prop-card-v3 > * { flex: 1 1 auto; }
.pbx-softphone-mini-v3 { min-width: 0; }
/* Mini-card: footer rubrica nascosto in colonna (riappare quando sganciato) */
/* Nota rubrica: mostrata anche nella mini-card, compatta */
.pbx-softphone-mini-v3 .dialpad-footer { padding: .55rem 1rem .75rem; font-size: calc(.7rem * var(--pbx-fs, 1)); }
.pbx-softphone-mini-v3 .dialpad-body { padding: 1rem 1rem 1.1rem; gap: .7rem; }
.pbx-softphone-mini-v3 .dialpad-header { padding: .8rem 1rem .7rem; }
/* In chiamata: tieni la mini-card compatta (la dimensione piena resta solo
   quando il softphone è sganciato in popover). */
.pbx-softphone-mini-v3 .dialpad-incall { padding: 1.3rem 1.1rem 1.2rem; gap: .3rem; }
.pbx-softphone-mini-v3 .dialpad-incall-avatar { width: 54px; height: 54px; font-size: calc(1.2rem * var(--pbx-fs, 1)); margin-bottom: .3rem; }
.pbx-softphone-mini-v3 .dialpad-incall-number { font-size: calc(1.05rem * var(--pbx-fs, 1)); }
.pbx-softphone-mini-v3 .dialpad-incall-timer { font-size: calc(1.45rem * var(--pbx-fs, 1)); margin: .3rem 0 .8rem; }
.pbx-softphone-mini-v3 .dialpad-incall-timer.is-hint { font-size: calc(.76rem * var(--pbx-fs, 1)); margin: .2rem 0 .6rem; }
.pbx-softphone-mini-v3 .dialpad-hangup-btn,
.pbx-softphone-mini-v3 .dialpad-answer-btn { width: 52px; height: 52px; font-size: calc(1.2rem * var(--pbx-fs, 1)); }
.pbx-softphone-mini-v3 .dialpad-hangup-sm { width: 46px; height: 46px; font-size: calc(1.1rem * var(--pbx-fs, 1)); }
.pbx-softphone-mini-v3 .dialpad-incoming-actions { gap: 1.6rem; margin-top: .2rem; }
.pbx-softphone-mini-v3 .dialpad-incall-actions { gap: 1rem; margin-top: .15rem; }
.pbx-softphone-mini-v3 .dialpad-act-btn .dialpad-act-ico { width: 44px; height: 44px; font-size: calc(1.05rem * var(--pbx-fs, 1)); }

/* Responsive. Sotto i 1200px di pannello la Cronologia, a tre colonne, restava sui 300px e troncava numeri e nomi
   ("+.", "Lored…"): la colonna destra sparisce. Il softphone vive nella finestra mobile (tasto Chiama, FAB, chiamata in
   arrivo: il dock nascosto non risulta visibile) e l'immobile scelto scende sotto "Salvataggio richiesta".
   Sotto i 760px tutto a 1 colonna, softphone di nuovo in pagina. */
@container pbx-live (max-width: 1200px) {
    .pbx-live-layout-v3 { grid-template-columns: 1fr; }
    .pbx-live-side-v3 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
    .pbx-live-side-v3 > .pbx-softphone-mini-v3 { display: none; }
    .pbx-live-side-v3 > .pbx-prop-card-v3 { grid-column: 2; }
    .pbx-live-side-v3 > .pbx-prop-card-v3:not(.has-prop) { display: none; }
}
@container pbx-live (max-width: 760px) {
    .pbx-live-main-col-v3 .pbx-cards-grid-v3 { grid-template-columns: 1fr; }
    .pbx-live-side-v3 { display: flex; flex-direction: column; }
    .pbx-live-side-v3 > .pbx-softphone-mini-v3 { display: block; }
    .pbx-live-side-v3 > .pbx-prop-card-v3:not(.has-prop) { display: flex; }
}

/* Softphone ancorato (riusa l'estetica del dialpad come card) */
.softphone-panel-v3 { width: 100%; }
.softphone-redock-btn { margin-left: auto; }

/* Finestra mobile (sgancio) in basso a destra */
.softphone-float-v3 {
    position: fixed; right: 1.4rem; bottom: 5rem; z-index: 1050; width: 320px; max-width: 94vw;
    animation: softphoneFloatIn 0.26s cubic-bezier(.22, 1, .36, 1);
}
@keyframes softphoneFloatIn { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
.softphone-float-v3 .softphone-panel-v3 { box-shadow: 0 24px 60px rgba(0,0,0,.22); }

/* Flash quando si richiama il softphone già visibile */
.softphone-flash-v3 { animation: softphoneFlash 0.9s ease; }
@keyframes softphoneFlash {
    0%, 100% { box-shadow: 0 24px 60px rgba(0,0,0,.18); }
    30%, 60% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--secondary, #e8743b) 55%, transparent), 0 24px 60px rgba(0,0,0,.18); }
}

/* ── Insights Broker selector (V3 glass) ───────────────────────────────────── */
.broker-selector-wrap { margin-top: 1.5rem; }
.broker-selector-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    box-shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.18);
    padding: 2rem 2.25rem;
}
.broker-selector-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.75rem; }
.broker-selector-icon {
    width: 52px; height: 52px; flex: 0 0 52px; border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    color: #fff; font-size: 1.4rem; box-shadow: 0 8px 18px -6px rgba(99, 102, 241, 0.5);
}
.broker-selector-title { font-size: 1.4rem; font-weight: 800; color: var(--primary); margin: 0; }
.broker-selector-sub { font-size: .85rem; color: #94a3b8; margin: 2px 0 0; }
.broker-selector-label {
    font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
    color: #94a3b8; margin-bottom: .4rem; display: block;
}
.broker-selector-card .form-control,
.broker-selector-card .select2-container--default .select2-selection--single {
    border-radius: 12px !important;
    border: 1.5px solid rgba(0, 0, 0, 0.08) !important;
    background: rgba(255, 255, 255, 0.7) !important;
    min-height: 46px; height: 46px; padding: .5rem .9rem;
    transition: all .18s ease;
}
.broker-selector-card .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 30px; padding-left: 0; }
.broker-selector-card .select2-container--default .select2-selection--single .select2-selection__arrow { height: 44px; }
.broker-selector-card .form-control:focus {
    border-color: var(--secondary) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12) !important;
}
.broker-selector-btn {
    margin-top: .5rem; border: none; border-radius: 14px; padding: .85rem 1rem;
    font-weight: 700; letter-spacing: .03em; color: #fff;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    box-shadow: 0 10px 22px -8px rgba(99, 102, 241, 0.6); transition: all .18s ease;
}
.broker-selector-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -8px rgba(99, 102, 241, 0.7); color: #fff; }
.broker-month-group { display: flex; gap: .6rem; }
.broker-month-group select { flex: 1; }

/* Statistiche: classi al posto degli stili inline, stesso aspetto di prima nel classico */
.stats-card .stats-text.stats-vs { margin-top: 0; line-height: 1.1; }
.stats-card .stats-text.stats-label { opacity: 0.8; text-transform: uppercase; }
.stat-delta-dual { font-size: 0.62rem; font-weight: 600; vertical-align: middle; }

/* ── Report Statistiche v3 (.ins3, stats_report_head(), DESIGN.md §48): stessi fogli bianchi, pillole e scala della
   Dashboard v3 sopra i componenti di sempre (stats-card, modern-stat-card, chart-card, card con testata, tabelle), così i
   dati e il JS restano quelli. Testate in tondo e senza fasce colorate, il colore solo per dire su/giù/perso; in calo
   ambra come nella home, mai rosso. I colori Bootstrap dei testi portati a 4,5:1 sul bianco */
.ins3 { --ins-ink: #0f172a; --ins-text: #1e293b; --ins-mute: #64748b; --ins-line: rgba(15, 23, 42, 0.07);
    --ins-sheet: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 28px -18px rgba(15, 23, 42, 0.18); padding-top: 4px; }
.ins3-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin: 2px 4px 20px; }
.ins3-kicker { margin: 0 0 2px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ins-mute); }
.ins3-title { margin: 0; font-size: 1.75rem; font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; color: var(--ins-ink); }
.ins3-sub { margin: 4px 0 0; font-size: 0.857rem; color: var(--ins-mute); }
.ins3-head-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ins3-period { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 12px; background: #eef1f5; }
.ins3-step, .ins3-change { display: inline-flex; align-items: center; justify-content: center; height: 32px; border-radius: 9px; font-size: 0.857rem; font-weight: 600;
    color: #334155 !important; text-decoration: none !important; }
.ins3-step { width: 32px; font-size: 0.75rem; }
.ins3-change { padding: 0 12px; }
a.ins3-step:hover, .ins3-change:hover { background: #ffffff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1); }
.ins3-step.is-off { color: #cbd5e1 !important; }
.ins3-step:focus-visible, .ins3-change:focus-visible { outline: 2px solid var(--primary, #582679); outline-offset: 2px; }
.ins3-unit { min-width: 240px; }
/* Periodo: menu in testata (stesso report su mese, trimestre, semestre, anno) e scelte rapide nel selettore */
.ins3-span select { height: 38px; min-width: 170px; padding: 0 34px 0 14px; border: 0 !important; border-radius: 12px !important; background-color: #eef1f5 !important; font-weight: 600; color: var(--ins-text, #1e293b); }
.ins3-span select:focus-visible { outline: 2px solid var(--primary, #582679); outline-offset: 2px; }
.ins3-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ins3-chip { height: 32px; padding: 0 12px; border: 1px solid rgba(15, 23, 42, 0.1); border-radius: 999px; background: #ffffff; font-size: 0.85rem; font-weight: 600; color: #334155; cursor: pointer; transition: border-color 0.15s ease, color 0.15s ease; }
.ins3-chip:hover { border-color: color-mix(in srgb, var(--primary, #582679) 40%, transparent); color: var(--primary, #582679); }
.ins3-chip[aria-pressed="true"] { border-color: var(--primary, #582679); background: var(--primary, #582679); color: #ffffff; }
.ins3-chip:focus-visible { outline: 2px solid var(--primary, #582679); outline-offset: 2px; }
.ins3-unit .select2-container { width: 100% !important; }
.ins3-unit .select2-container--default .select2-selection--single { height: 38px; border: 0 !important; border-radius: 12px !important; background: #eef1f5 !important; }
.ins3-unit .select2-container--default .select2-selection--single .select2-selection__rendered { padding-left: 14px; line-height: 38px; font-weight: 600; color: var(--ins-text); }
.ins3-unit .select2-container--default .select2-selection--single .select2-selection__arrow { height: 36px; }
.ins3 .section-title { margin: 8px 4px 12px; padding: 0; border: 0; font-size: 1.15rem; font-weight: 800; letter-spacing: -0.015em; text-transform: none; color: var(--ins-ink); }
.ins3 .section-title i { font-size: 0.95em; color: var(--primary, #582679); }
/* indicatori: come le card della home (etichetta sopra, numero, confronti sotto) */
.ins3 .stats-row { margin-bottom: 4px; }
.ins3 .stats-row > [class*="col-"] { display: flex; padding-bottom: 14px; }
.ins3 .stats-card { flex: 1 1 auto; margin: 0 !important; border: 1px solid rgba(15, 23, 42, 0.06) !important; border-radius: 20px !important; background: #ffffff !important; box-shadow: var(--ins-sheet) !important; }
.ins3 .stats-card .card-body { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px; }
.ins3 .stats-card .stats-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; float: none; }
.ins3 .stats-card .card-title { order: 1; margin: 0; font-size: 2rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; color: var(--ins-ink) !important; font-variant-numeric: tabular-nums; }
.ins3 .stats-card .stats-text { order: 2; margin: 0 !important; font-size: 0.8rem; font-weight: 500; line-height: 1.4 !important; opacity: 1 !important; color: var(--ins-mute); }
.ins3 .stats-card .stats-info > .stats-text:last-child { order: 0; margin-bottom: 2px !important; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.ins3 .stats-card .card-title span.stats-change { margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #f1f5f9; font-size: 0.78rem; font-weight: 700; letter-spacing: 0; color: #475569; vertical-align: 0.35em; }
.ins3 .stats-card .card-title span.stats-change.stats-change-success { background: #dcfce7; color: #166534; }
.ins3 .stats-card .card-title span.stats-change.stats-change-danger { background: #fef3c7; color: #92400e; }
.ins3 .stats-card .stats-icon { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 32px; height: 32px; margin: 0; padding: 0; border-radius: 10px; float: none; }
.ins3 .stats-card .stats-icon.change-success { background: #dcfce7; color: #166534; }
.ins3 .stats-card .stats-icon.change-danger { background: #fef3c7; color: #92400e; }
.ins3 .stats-card .stats-icon i { font-size: 18px; }
/* card dei dati: fogli bianchi con titolo scuro, nessun sollevamento al passaggio (non sono pulsanti) */
.ins3 .modern-stat-card { margin-bottom: 18px; border: 1px solid rgba(15, 23, 42, 0.06); border-radius: 20px; background: #ffffff; box-shadow: var(--ins-sheet);
    -webkit-backdrop-filter: none; backdrop-filter: none; transition: none; }
.ins3 .modern-stat-card:hover { box-shadow: var(--ins-sheet); transform: none; }
.ins3 [class*="col-"] > .modern-stat-card { height: calc(100% - 18px); }
.ins3 .modern-stat-header, .ins3 .modern-stat-header.plaincolor { gap: 10px; padding: 16px 18px 0; background: none !important; color: var(--ins-ink) !important; }
.ins3 .modern-stat-header h6 { font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; text-transform: none; color: var(--ins-ink); }
.ins3 .hero-icon { flex: 0 0 auto; border-radius: 10px; background: color-mix(in srgb, var(--primary, #582679) 10%, #ffffff); color: var(--primary, #582679); }
.ins3 .modern-stat-body { padding: 10px 18px 16px; }
/* .modern-stat-hero ha regole globali con !important (lettere strette, nessun margine): qui si riportano a posto */
.ins3 .modern-stat-hero { flex-direction: column; align-items: flex-start; gap: 4px; margin: 0 0 8px !important; padding: 0 0 12px !important; border-bottom: 1px solid var(--ins-line);
    font-size: 1rem !important; font-weight: 400 !important; letter-spacing: 0 !important; line-height: 1.4 !important; }
.ins3 .modern-stat-hero.clickable-hero { margin: -6px -8px 8px !important; padding: 6px 8px 12px !important; border-radius: 12px 12px 0 0; }
.ins3 .modern-stat-hero.clickable-hero:hover { opacity: 1; background: #f8fafc; }
.ins3 .modern-stat-hero .value { font-size: 1.6rem !important; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; color: var(--ins-ink); font-variant-numeric: tabular-nums;
    background: none; -webkit-text-fill-color: currentColor; overflow-wrap: anywhere; }
.ins3 .modern-stat-hero .label { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 0.8rem; color: var(--ins-mute); }
.ins3 .modern-stat-item { gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--ins-line); font-size: 0.893rem; color: var(--ins-text); }
.ins3 .modern-stat-item .item-label { color: var(--ins-text); }
.ins3 .modern-stat-item .item-value, .ins3 .modern-stat-item > span:last-child:not(:first-child) { flex: 0 0 auto; text-align: right; font-weight: 700; color: var(--ins-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ins3 .modern-stat-item.pl-2, .ins3 .modern-stat-item.pl-3 { padding-left: 14px !important; font-size: 0.857rem; }
.ins3 .modern-stat-item.pl-2 .item-label, .ins3 .modern-stat-item.pl-3 > span:first-child { color: var(--ins-mute); }
.ins3 .modern-stat-divider { margin-top: 6px !important; padding-top: 12px !important; border-top: 1px solid var(--ins-line) !important; font-weight: 400 !important; }
.ins3 .modern-stat-divider:not(:has(.item-value)) { border-bottom: 0; }
.ins3 .modern-stat-divider:not(:has(.item-value)) .item-label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ins-mute); }
.ins3 .icon-muted-small, .ins3 .modern-stat-card .fa-magnifying-glass { font-size: 0.75rem !important; opacity: 0.55 !important; }
/* confronti: pillole come la home; in calo ambra */
.ins3 .badge.badge-light { padding: 2px 8px; border: 0 !important; border-radius: 999px; background: #eef1f5 !important; font-size: 0.75rem; font-weight: 700; letter-spacing: 0; color: #475569; }
.ins3 .stat-delta-dual { font-size: 0.75rem; }
.ins3 .badge .text-danger, .ins3 .badge.text-danger { color: #b45309 !important; }
.ins3 .text-success { color: #15803d !important; }
.ins3 .text-warning { color: #b45309 !important; }
.ins3 .text-danger { color: #b91c1c !important; }
.ins3 .text-info { color: #0e7490 !important; }
/* schede: controllo segmentato al posto delle pillole in sfumatura */
.ins3 .dashboard-tabs-container, .ins3 .card-header-tabs { display: inline-flex; flex-wrap: wrap; gap: 2px; margin: 6px 0 14px; padding: 3px; border: 0; border-radius: 12px; background: #eef1f5;
    box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.ins3 .dashboard-tabs { flex-wrap: wrap; gap: 2px; }
.ins3 .dashboard-tabs .nav-link, .ins3 .card-header-tabs .nav-link { display: flex; align-items: center; height: 34px; padding: 0 14px !important; border: 0 !important; border-radius: 9px !important;
    background: none !important; font-size: 0.893rem !important; font-weight: 600 !important; letter-spacing: 0 !important; text-transform: none !important; color: #475569 !important; transform: none !important; }
.ins3 .dashboard-tabs .nav-link.active, .ins3 .card-header-tabs .nav-link.active { background: #ffffff !important; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1) !important; color: var(--primary, #582679) !important; }
.ins3 .dashboard-tabs .nav-link:hover:not(.active), .ins3 .card-header-tabs .nav-link:hover:not(.active) { background: rgba(255, 255, 255, 0.6) !important; color: var(--ins-text) !important; }
.ins3 .dashboard-tabs .nav-link:focus-visible, .ins3 .card-header-tabs .nav-link:focus-visible { outline: 2px solid var(--primary, #582679); outline-offset: 2px; }
.ins3 .dashboard-tabs .nav-link i { font-size: 0.95em; }
.ins3 .card-header-tabs { margin: 0; }
.ins3 .tab-content-container { padding: 0; border: 0; background: none !important; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
/* grafici e card con testata: fogli bianchi, titolo in tondo, niente fascia colorata */
.ins3 .chart-card { margin-bottom: 18px; border: 1px solid rgba(15, 23, 42, 0.06); border-radius: 20px; background: #ffffff; box-shadow: var(--ins-sheet); -webkit-backdrop-filter: none; backdrop-filter: none; }
.ins3 .chart-card-header { gap: 10px; padding: 16px 20px 0; border: 0; }
.ins3 .chart-card-title { font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; text-transform: none; color: var(--ins-ink); }
.ins3 .chart-card-header .badge { white-space: nowrap; }
.ins3 .chart-card-body { padding: 12px 20px 18px; }
.ins3 .card:not(.stats-card) { margin-bottom: 18px; border: 1px solid rgba(15, 23, 42, 0.06) !important; border-radius: 20px !important; background: #ffffff !important; box-shadow: var(--ins-sheet) !important; }
.ins3 .card .card:not(.stats-card) { margin-bottom: 0; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
.ins3 .card > .card-header { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 16px 20px 4px; border: 0 !important; border-radius: 20px 20px 0 0 !important; background: none !important;
    font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; text-transform: none !important; color: var(--ins-ink) !important; }
.ins3 .card > .card-header b { font-weight: 700; }
.ins3 .card > .card-body { padding: 12px 20px 18px; }
.ins3 .card .card > .card-header, .ins3 .card .card > .card-body { padding-inline: 0; }
.ins3 .table { margin-bottom: 0; font-size: 0.893rem; color: var(--ins-text); font-variant-numeric: tabular-nums; }
.ins3 .table th, .ins3 .table td { padding: 8px 10px; border-color: var(--ins-line) !important; vertical-align: middle; }
.ins3 .table thead th, .ins3 table.dataTable thead th { border-top: 0 !important; border-bottom: 1px solid var(--ins-line) !important; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
    text-transform: uppercase; color: var(--ins-mute); white-space: nowrap; }
.ins3 .table-striped tbody tr:nth-of-type(odd) { background: #f8fafc; }
.ins3 .table-hover tbody tr:hover { background: #f1f5f9; }
/* tabelle (MYB.Insights.js): posizione con medaglia, iniziali del consulente, totale in evidenza, zeri attenuati, piè v3 */
.ins3 td:has(> .db3-pos) { width: 1%; }
.ins3 .table .is-num { text-align: right; white-space: nowrap; }
.ins3 td.ins3-who { white-space: nowrap; }
.ins3 td.ins3-who .db3-av { margin-right: 8px; vertical-align: middle; }
.ins3 td.is-total { font-weight: 700; color: var(--ins-ink); background: color-mix(in srgb, var(--primary, #582679) 4%, transparent); }
.ins3 td.is-zero, .ins3 td.is-zero b { font-weight: 400; color: #94a3b8 !important; }
.ins3 .agent-popover-trigger { border-bottom: 1px dashed #cbd5e1; font-weight: 600 !important; color: var(--ins-ink) !important; text-decoration: none !important; }
.ins3 .agent-popover-trigger:hover { border-bottom-color: var(--primary, #582679); color: var(--primary, #582679) !important; }
.ins3 .badge-gci-details { padding: 0 !important; border: 0 !important; background: none !important; font-size: 0.893rem !important; font-weight: 700 !important; letter-spacing: 0;
    text-transform: none !important; color: var(--ins-ink) !important; }
.ins3 .gci-details-link:hover .badge-gci-details { color: var(--primary, #582679) !important; }
.ins3 table.dataTable.no-footer, .ins3 .dataTables_scrollBody { border-bottom: 0 !important; }
.ins3 table.dataTable tbody tr > .dtfc-fixed-left, .ins3 table.dataTable thead tr > .dtfc-fixed-left { background: #ffffff; }
.ins3 table.dataTable tbody tr:hover > .dtfc-fixed-left { background: #f1f5f9; }
.ins3 .card-body .dt-footer-v3 { margin: 12px -20px -18px; padding: 12px 20px; background: none; }
.ins3 .row > .col-md-6:has(table[id$="LeaderboardTable"]) { flex: 0 0 100%; max-width: 100%; }
/* Report Broker v3 (stats-broker-v3.php): frase, indicatori, fogli a griglia con barre a segmenti e legenda, classifiche
   con barra in proporzione. Ogni barra ha accanto i numeri e un'etichetta: il colore non è mai l'unica informazione */
.ins3 { --db-ink: #0f172a; --db-text: #1e293b; --db-mute: #64748b; --db-line: rgba(15, 23, 42, 0.07); }
.ins3-hello { margin: -8px 4px 18px; }
.ins3-sentence { max-width: 980px; margin: 0; font-size: 1.43rem; font-weight: 600; line-height: 1.4; letter-spacing: -0.01em; color: var(--ins-ink); text-wrap: balance; }
.ins3-sentence b { font-weight: 800; color: var(--primary, #582679); }
.ins3-kpis { margin-bottom: 18px; }
.ins3-kpis.db3-kpi-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1399px) { .ins3-kpis.db3-kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ins3-kpis .db3-kpi-foot small { font-size: 0.8rem; }
.ins3-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.ins3-s5 { grid-column: span 5; } .ins3-s6 { grid-column: span 6; } .ins3-s7 { grid-column: span 7; } .ins3-s12 { grid-column: span 12; }
.ins3-card { min-width: 0; padding: 18px 20px; border: 1px solid rgba(15, 23, 42, 0.06); border-radius: 20px; background: #ffffff; box-shadow: var(--ins-sheet); }
.ins3-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 4px; }
.ins3-h h3 { margin: 0; font-size: 1.07rem; font-weight: 700; letter-spacing: -0.01em; text-transform: none; color: var(--ins-ink); }
.ins3-h > .db3-link, .ins3-h > .gl3-seg { margin-left: auto; }
.ins3-say { margin: 0 0 12px; font-size: 0.893rem; color: var(--ins-mute); }
/* Base degli importi (selettore in testata, quando la pagina ne ha due): delle due versioni di un importo se ne vede una */
.ins3:not(.is-alt) [data-amt="1"], .ins3.is-alt [data-amt="0"] { display: none !important; }
.ins3-amt-seg button { height: 30px; font-size: 0.8rem; }
.ins3 .db3-kpi > [data-amt] { display: flex; flex: 1 1 auto; flex-direction: column; gap: 4px; }
.ins3-section { display: flex; align-items: center; gap: 10px; margin: 30px 4px 12px; font-size: 1.15rem; font-weight: 800; letter-spacing: -0.015em; text-transform: none; color: var(--ins-ink); scroll-margin-top: 90px; }
.ins3-section i { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 9px;
    background: color-mix(in srgb, var(--primary, #582679) 12%, #ffffff); font-size: 0.8rem; color: var(--primary, #582679); }
/* colore per ambito (icone e barre, mai fasce): tema = soldi e proposte, verde acqua = incarichi, azzurro = richieste, oro = consulenti */
.ins3-ico { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 10px; font-size: 0.9rem; }
.ins3-ico.is-brand { background: color-mix(in srgb, var(--primary, #582679) 12%, #ffffff); color: var(--primary, #582679); }
.ins3-ico.is-teal { background: #ccfbf1; color: #0f766e; }
.ins3-ico.is-sky { background: #e0f2fe; color: #0369a1; }
.ins3-ico.is-gold { background: #fef3c7; color: #a16207; }
.ins3 .is-tone-teal { --ins-tone: #0d9488; }
.ins3 .is-tone-sky { --ins-tone: #0284c7; }
.ins3-bar span { background: var(--ins-tone, var(--primary, #582679)) !important; }
.ins3-kpis .db3-kpi { position: relative; }
.ins3-kpis .db3-kpi > .ins3-ico { position: absolute; top: 14px; right: 14px; }
.ins3-kpis .db3-kpi-label { padding-right: 40px; }
/* l'indicatore protagonista: la produzione, nel colore del tema come i pulsanti principali */
.ins3-kpis .db3-kpi.is-hero { border: 0; background: linear-gradient(135deg, var(--secondary, #7c3aed), var(--primary, #582679)); box-shadow: 0 14px 30px -16px color-mix(in srgb, var(--primary, #582679) 70%, transparent);
    color: #ffffff !important; }
.ins3-kpis .db3-kpi.is-hero:hover { box-shadow: 0 18px 36px -16px color-mix(in srgb, var(--primary, #582679) 80%, transparent); }
.ins3-kpis .is-hero .db3-kpi-label, .ins3-kpis .is-hero .db3-kpi-foot, .ins3-kpis .is-hero .db3-kpi-foot small { color: rgba(255, 255, 255, 0.85); }
.ins3-kpis .is-hero .db3-kpi-value { color: #ffffff; }
.ins3-kpis .is-hero .db3-delta { background: rgba(255, 255, 255, 0.2); color: #ffffff; }
.ins3-ico.is-hero { background: rgba(255, 255, 255, 0.2); color: #ffffff; }
/* righe delle classifiche: ognuna nel suo <li>; con il link tutta la riga è cliccabile e lo fa vedere */
.ins3-board > li { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ins-line); }
.ins3-board > li:first-child, .ins3-board > li.is-lead + li { border-top-color: transparent; }
.ins3-board > li > .ins3-row { border-top: 0; }
.ins3-row.is-link { grid-template-columns: 28px minmax(0, 1fr) auto 14px; margin: 0 -8px; padding-inline: 8px; border-radius: 12px; color: inherit; text-decoration: none !important;
    transition: background 0.15s ease; }
.ins3-row.is-link:hover { background: #f8fafc; }
.ins3-row.is-link:hover .ins3-name { color: var(--primary, #582679); }
.ins3-row.is-link:focus-visible { outline: 2px solid var(--primary, #582679); outline-offset: 2px; }
.ins3-go { font-size: 1.3rem; line-height: 1; color: #94a3b8; transition: transform 0.15s ease, color 0.15s ease; }
.ins3-row.is-link:hover .ins3-go { color: var(--primary, #582679); transform: translateX(2px); }
.ins3-board > li.is-lead > .ins3-row { margin: 0 -8px; padding-inline: 8px; border-radius: 12px; background: linear-gradient(90deg, #fffbeb, rgba(255, 251, 235, 0)); }
.ins3-board > li.is-lead > .ins3-row.is-link:hover { background: #fef3c7; }
@media (prefers-reduced-motion: reduce) { .ins3-go, .ins3-row.is-link { transition: none; } }
/* tabelle complete: il nome apre il riepilogo (▾), l'importo le transazioni (lente) — devono sembrarlo */
.ins3-hint { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; }
.ins3-hint i { color: var(--primary, #582679); }
.ins3 .agent-popover-trigger { border-bottom: 1px dashed color-mix(in srgb, var(--primary, #582679) 45%, transparent); color: var(--primary, #582679) !important; }
.ins3 .agent-popover-trigger::after { content: ' ▾'; font-size: 0.75em; }
.ins3 .gci-details-link .badge-gci-details { border-bottom: 1px dashed color-mix(in srgb, var(--primary, #582679) 45%, transparent) !important; }
.ins3 .gci-details-link .fa-magnifying-glass { opacity: 1 !important; color: var(--primary, #582679) !important; }
.ins3 .gci-details-link:hover .badge-gci-details, .ins3 .gci-details-link:focus-visible .badge-gci-details { border-bottom-style: solid !important; }
.ins3-hero { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 4px 0 10px; }
.ins3-big { font-size: 2rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; color: var(--ins-ink); font-variant-numeric: tabular-nums; }
.ins3-hero-label { font-size: 0.857rem; color: var(--ins-mute); }
.ins3-stack { display: flex; gap: 2px; height: 14px; margin: 10px 0 12px; overflow: hidden; border-radius: 999px; background: #eef1f5; }
.ins3-stack span { display: block; height: 100%; }
.ins3-t1 { background: var(--primary, #582679); } .ins3-t2 { background: #a78bfa; } .ins3-t3 { background: #ddd6fe; }
.ins3-t4 { background: #f59e0b; } .ins3-t5 { background: #cbd5e1; } .ins3-t6 { background: #16a34a; }
.ins3-legend { margin: 0; padding: 0; list-style: none; }
.ins3-legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 84px; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--ins-line); font-size: 0.929rem; color: var(--ins-text); }
.ins3-legend li:first-child { border-top: 0; }
.ins3-legend li > i { width: 10px; height: 10px; border-radius: 3px; }
.ins3-legend li > b { font-weight: 700; text-align: right; color: var(--ins-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ins3-legend li > small { font-size: 0.8rem; text-align: right; color: var(--ins-mute); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ins3-legend li.is-sub { padding: 5px 0 5px 20px; border-top: 0; font-size: 0.857rem; color: var(--ins-mute); }
.ins3-legend li.is-sub > b { font-weight: 600; color: var(--ins-text); }
/* Confronto a richiesta (Confronto: nessuno | periodo precedente | anno precedente): accanto a ogni numero la variazione e il
   valore di allora; nascosto finché non lo si sceglie */
.ins3-cmpbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: -6px 4px 16px; font-size: 0.857rem; font-weight: 600; color: var(--ins-mute); }
.ins3-cmp { display: none; align-items: center; justify-content: flex-end; gap: 5px; white-space: nowrap; font-size: 0.75rem; font-weight: 600; color: var(--ins-mute); }
.ins3[data-cmp="prev"] .ins3-cmp[data-cmp="prev"], .ins3[data-cmp="ly"] .ins3-cmp[data-cmp="ly"] { display: inline-flex; }
.ins3-cmp .db3-delta { padding: 0 6px; font-size: 0.72rem; }
.ins3-cmp small { font-size: 0.75rem; font-weight: 500; }
.ins3-legend li { grid-template-columns: 10px minmax(0, 1fr) auto 84px auto; }
.ins3-cmpcell { display: flex; flex-direction: column; align-items: flex-end; }
.ins3-cmpcell:empty { display: none; }
.ins3-val .ins3-cmp { margin-top: 2px; }
.ins3-mini .ins3-cmp { display: none; margin-top: 2px; }
.ins3[data-cmp="prev"] .ins3-mini .ins3-cmp[data-cmp="prev"], .ins3[data-cmp="ly"] .ins3-mini .ins3-cmp[data-cmp="ly"] { display: flex; justify-content: flex-start; }
.ins3-mini .ins3-cmp span, .ins3-mini .ins3-cmp small { display: inline-flex; font-size: 0.72rem; font-weight: 600; letter-spacing: 0; text-transform: none; }
.ins3-mini .ins3-cmp .db3-delta { padding: 0 6px; }
.ins3-val .ins3-cmp-js { display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; font-size: 0.72rem; font-weight: 600; color: var(--ins-mute); }
.ins3-mini { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-top: 14px; }
.ins3-mini div { padding: 10px 12px; border-radius: 14px; background: #f8fafc; }
.ins3-mini span { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ins-mute); }
.ins3-mini b { font-size: 1.07rem; color: var(--ins-ink); font-variant-numeric: tabular-nums; }
.ins3-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 28px; }
.ins3-cols .modern-stat-divider:first-child { margin-top: 0 !important; padding-top: 0 !important; border-top: 0 !important; }
.ins3-board { margin: 0; padding: 0; list-style: none; }
.ins3-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--ins-line); }
.ins3-row.is-plain { grid-template-columns: minmax(0, 1fr) auto; }
.ins3-board > .ins3-row:first-child, .ins3-board > li > .ins3-row { border-top: 0; }
.ins3-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ins3-name { overflow: hidden; font-size: 0.929rem; font-weight: 600; color: var(--ins-text); white-space: nowrap; text-overflow: ellipsis; }
.ins3-name a { color: inherit; }
.ins3-name a:hover { color: var(--primary, #582679); }
.ins3-bar { height: 6px; margin-top: 7px; overflow: hidden; border-radius: 999px; background: #eef1f5; }
.ins3-bar span { display: block; height: 100%; border-radius: 999px; background: var(--primary, #582679); }
.ins3-val { display: flex; flex-direction: column; align-items: flex-end; font-size: 1rem; font-weight: 800; color: var(--ins-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ins3-val small { font-size: 0.75rem; font-weight: 600; color: var(--ins-mute); }
.ins3-row .db3-skel { display: block; }
.ins3-chart { display: flex; align-items: flex-end; gap: 8px; height: 180px; padding-top: 6px; border-bottom: 1px solid var(--ins-line); }
.ins3-col { display: flex; flex: 1 1 0; flex-direction: column; justify-content: flex-end; align-items: stretch; gap: 4px; height: 100%; min-width: 0; }
.ins3-col-val { font-size: 0.72rem; font-weight: 700; text-align: center; color: var(--ins-mute); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ins3-col.is-cur .ins3-col-val { color: var(--ins-ink); }
.ins3-col-bar { width: 100%; border-radius: 6px 6px 0 0; background: color-mix(in srgb, var(--primary, #582679) 30%, #ffffff); }
.ins3-col:hover .ins3-col-bar { background: color-mix(in srgb, var(--primary, #582679) 60%, #ffffff); }
.ins3-col.is-cur .ins3-col-bar { background: var(--primary, #582679); }
.ins3-axis { display: flex; gap: 8px; margin-top: 6px; }
.ins3-axis span { flex: 1 1 0; font-size: 0.72rem; text-align: center; color: var(--ins-mute); }
.ins3-note { margin: 10px 0 0; font-size: 0.8rem; color: var(--ins-mute); }
.ins3-note:empty { display: none; }
.ins3-note a { font-weight: 600; color: var(--primary, #582679); }
@media (max-width: 1199px) { .ins3-s5, .ins3-s6, .ins3-s7 { grid-column: span 12; } }
@media (max-width: 767px) {
    .ins3-sentence { font-size: 1.15rem; }
    .ins3-card { padding: 14px; border-radius: 16px; }
    .ins3-cols { grid-template-columns: 1fr; }
    .ins3-legend li { grid-template-columns: 10px minmax(0, 1fr) auto; }
    .ins3-legend li > .ins3-cmpcell { grid-column: 2 / -1; align-items: flex-start; }
    .ins3-legend li > small { grid-column: 2 / -1; text-align: left; margin-top: -6px; }
}
@media (min-width: 768px) and (max-width: 1399px) { .ins3 .row > .col-md-3:has(> .modern-stat-card) { flex: 0 0 50%; max-width: 50%; } }
@media (max-width: 767px) {
    .ins3-head { align-items: flex-start; }
    .ins3-title { font-size: 1.4rem; }
    .ins3-unit { flex: 1 1 100%; min-width: 0; }
    .ins3 .stats-card .card-title { font-size: 1.6rem; }
    .ins3 .dashboard-tabs-container { display: flex; }
}

/* ── Insights Broker: banner versione ──────────────────────────────────────── */
.v3-version-banner {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 14px;
    padding: .65rem 1rem;
    margin-bottom: 1.25rem;
    font-size: .85rem; color: #475569;
}
.v3-version-link {
    display: inline-flex; align-items: center;
    font-weight: 700; font-size: .8rem; color: var(--secondary, #4f46e5);
    background: #fff; border: 1.5px solid rgba(99, 102, 241, 0.25);
    border-radius: 10px; padding: .35rem .75rem; transition: all .18s ease;
}
.v3-version-link:hover { background: var(--secondary, #4f46e5); color: #fff; text-decoration: none; }

/* ── Pagina 404 (views/error_404.php) ───────────────────────────────────────
   Standalone: la vista non carica il layout dell'app, quindi qui ci sono anche
   le regole di base su body e main che altrove arrivano dal tema. */
.err-body-v3 {
    margin: 0; min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #0f172a;
    background: radial-gradient(1100px 600px at 50% -10%, rgba(99, 102, 241, 0.16), transparent 60%), #f8fafc;
}
.err-page-v3 {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 40px 20px; box-sizing: border-box;
}
.err-card-v3 {
    width: 100%; max-width: 560px; text-align: center;
    padding: 48px 40px; border-radius: 28px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.10);
    box-sizing: border-box;
}
.err-logo-v3 { max-height: 34px; max-width: 200px; margin-bottom: 28px; opacity: 0.85; }
.err-code-v3 {
    font-size: 5.5rem; font-weight: 800; line-height: 1; letter-spacing: -0.04em;
    background: linear-gradient(160deg, #1e293b 0%, #64748b 55%, #cbd5e1 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: #334155;
}
/* Modulo a licenza non attivo (ShowLockedPage): il lucchetto al posto del numero */
.err-lock-v3 { font-size: 3.6rem; }
.err-title-v3 { font-size: 1.5rem; font-weight: 800; color: #0f172a; margin: 14px 0 0; }
.err-text-v3 { font-size: 0.95rem; line-height: 1.6; color: #475569; margin: 12px 0 0; }
.err-url-v3 {
    display: inline-flex; align-items: center; gap: 9px; max-width: 100%;
    margin-top: 22px; padding: 9px 16px; border-radius: 12px;
    background: rgba(248, 250, 252, 0.9); border: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 0.8rem; color: #94a3b8;
}
.err-url-v3 span {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.err-url-v3 i { flex: 0 0 auto; }
.err-actions-v3 { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.err-btn-v3 {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 12px 22px; border-radius: 14px; cursor: pointer;
    font-size: 0.9rem; font-weight: 700; text-decoration: none;
    border: 1px solid rgba(0, 0, 0, 0.08); background: #fff; color: #334155;
    transition: all 0.15s ease;
}
.err-btn-v3:hover { transform: translateY(-1px); color: #0f172a; text-decoration: none; }
.err-btn-primary-v3 {
    border-color: transparent; background: var(--secondary, #4f46e5); color: #fff;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.26);
}
.err-btn-primary-v3:hover { color: #fff; filter: brightness(0.94); }
.err-hint-v3 { font-size: 0.78rem; color: #94a3b8; margin: 26px 0 0; line-height: 1.5; }

/* Accesso negato (403): stessa struttura del 404, tono rosso. Distingue a colpo
   d'occhio "non esiste" da "esiste ma non puoi", senza cambiare impaginazione. */
.err-tone-denied .err-code-v3 {
    background: linear-gradient(160deg, #b91c1c 0%, #ef4444 55%, #fecaca 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: #b91c1c;
}
.err-tone-denied .err-url-v3 {
    background: rgba(254, 226, 226, 0.7); border-color: rgba(220, 38, 38, 0.2); color: #b91c1c;
}
@media (max-width: 520px) {
    .err-card-v3 { padding: 36px 24px; }
    .err-code-v3 { font-size: 4rem; }
    .err-btn-v3 { width: 100%; justify-content: center; }
}

/* ── Release note pubblica (views/releasenote_public.php) ─────────────────
   Standalone come la 404: riusa .err-body-v3 per sfondo e font. */
.rn-topbar-v3 {
    position: sticky; top: 0; z-index: 10;
    display: flex; justify-content: center; align-items: center; height: 68px;
    border-bottom: 1px solid transparent;
    transition: background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.rn-topbar-v3.is-scrolled {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}
.rn-logo-v3 { max-height: 36px; max-width: 220px; display: block; }
.rn-page-v3 { max-width: 780px; margin: 0 auto; padding: 44px 20px 56px; box-sizing: border-box; }
.rn-hero-v3 { text-align: center; margin-bottom: 28px; }
.rn-badge-v3 {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px; border-radius: 20px;
    background: rgba(99, 102, 241, 0.1); color: #4f46e5;
    font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
}
.rn-title-v3 {
    font-size: 2.4rem; font-weight: 800; line-height: 1.15; letter-spacing: -0.02em;
    color: #0f172a; margin: 16px 0 0;
}
.rn-date-v3 { display: inline-flex; gap: 8px; align-items: center; font-size: 0.85rem; color: #94a3b8; margin: 12px 0 0; }
.rn-card-v3 {
    padding: 40px 44px; border-radius: 28px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
    font-size: 1.02rem; line-height: 1.75; color: #334155;
}
.rn-card-v3 .docu-paragraph,
.rn-card-v3 .docu-bulleted-list,
.rn-card-v3 .docu-numbered-list { color: #334155; }
.rn-card-v3 .docu-block:last-child .docu-paragraph { margin-bottom: 0; }
.rn-card-v3 .docu-image { border-radius: 16px; }
.rn-card-v3 .docu-embed {
    min-height: 0; aspect-ratio: 16 / 9; border: 0; border-radius: 16px;
    margin: 8px 0 1.5rem; box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}
.rn-card-v3 a { color: #4f46e5; }
.rn-cta-v3 {
    display: flex; gap: 20px; align-items: center;
    margin-top: 28px; padding: 26px 28px; border-radius: 24px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.10), rgba(23, 162, 184, 0.08)), rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}
.rn-footer-mock-v3 {
    flex: 0 0 auto; display: flex; align-items: center; gap: 8px;
    padding: 10px 12px; border-radius: 16px;
    background: #fff; box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}
.rn-footer-mock-v3 span { width: 8px; height: 8px; border-radius: 50%; background: #e2e8f0; }
.rn-footer-help-v3 {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 36px; border-radius: 8px;
    border: 1px solid #17a2b8; color: #17a2b8;
}
.rn-footer-help-v3 .material-icons-outlined { font-size: 22px; }
.rn-cta-v3 h2 { font-size: 1.05rem; font-weight: 800; color: #0f172a; margin: 0; }
.rn-cta-v3 p { font-size: 0.88rem; line-height: 1.6; color: #475569; margin: 6px 0 0; }
.rn-cta-v3 .material-icons-outlined.rn-inline-v3 { font-size: 17px; vertical-align: -3px; color: #17a2b8; }
.rn-cta-v3 a { color: #4f46e5; font-weight: 600; }
.rn-cta-v3 .rn-support-v3 { font-size: 0.8rem; color: #94a3b8; margin-top: 10px; }
.rn-footer-v3 {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 0.85rem; color: #64748b;
}
.rn-footer-inner-v3 {
    max-width: 1080px; margin: 0 auto; padding: 44px 20px 32px; box-sizing: border-box;
    display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px;
}
.rn-footer-brand-v3 .rn-logo-v3 { max-height: 32px; }
.rn-footer-brand-v3 p { line-height: 1.6; margin: 14px 0 0; max-width: 280px; }
.rn-footer-col-v3 h3 {
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    color: #0f172a; margin: 6px 0 12px;
}
.rn-footer-col-v3 p { line-height: 1.7; margin: 0; }
.rn-footer-col-v3 a { color: #4f46e5; font-weight: 600; text-decoration: none; }
.rn-footer-col-v3 a:hover { text-decoration: underline; }
.rn-footer-legal-v3 {
    max-width: 1080px; margin: 0 auto; padding: 18px 20px 26px; box-sizing: border-box;
    border-top: 1px solid rgba(0, 0, 0, 0.05); font-size: 0.75rem; color: #94a3b8;
}
@media (max-width: 520px) {
    .rn-title-v3 { font-size: 1.8rem; }
    .rn-card-v3 { padding: 26px 22px; border-radius: 22px; }
    .rn-cta-v3 { flex-direction: column; align-items: flex-start; padding: 22px; }
    .rn-footer-inner-v3 { grid-template-columns: 1fr 1fr; gap: 24px; }
    .rn-footer-brand-v3 { grid-column: 1 / -1; }
}

/* ── Avviso di dismissione della vecchia plancia Centralino Live ───────────
   Mostrato solo su /pbx/live/new (views/richieste_v2.php), non sulla banca
   dati richieste che condivide la stessa vista. */
.legacy-notice-v3 {
    display: flex; align-items: center; gap: 16px;
    margin: 0 0 20px; padding: 16px 20px; border-radius: 18px;
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(217, 119, 6, 0.28);
    box-shadow: 0 8px 24px rgba(180, 83, 9, 0.08);
}
.legacy-notice-ico-v3 {
    flex: 0 0 auto; width: 42px; height: 42px; border-radius: 14px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(217, 119, 6, 0.14); color: #d97706; font-size: 1.05rem;
}
.legacy-notice-txt-v3 { flex: 1 1 auto; min-width: 0; }
.legacy-notice-title-v3 { font-size: 0.95rem; font-weight: 800; color: #0f172a; line-height: 1.3; }
.legacy-notice-sub-v3 { font-size: 0.83rem; color: #475569; line-height: 1.5; margin-top: 3px; }
.legacy-notice-sub-v3 strong { color: #b45309; }
.legacy-notice-btn-v3 {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: 9px;
    padding: 11px 20px; border-radius: 14px; border: none; cursor: pointer;
    font-size: 0.86rem; font-weight: 700; text-decoration: none;
    background: #d97706; color: #fff;
    box-shadow: 0 8px 20px rgba(217, 119, 6, 0.26); transition: all 0.15s ease;
}
.legacy-notice-btn-v3:hover { transform: translateY(-1px); background: #b45309; color: #fff; text-decoration: none; }
@media (max-width: 860px) {
    .legacy-notice-v3 { flex-wrap: wrap; }
    .legacy-notice-btn-v3 { width: 100%; justify-content: center; }
}

/* ═══ Elenchi V3: componenti condivisi ════════════════════════════════════════
   Un elenco V3 e' una DataTable usata come motore (paginazione server-side,
   filtri, export) che renderizza una sola colonna: la riga e' una scheda
   .acc-item-v3. Barra delle etichette e righe condividono la stessa griglia di
   colonne, che ogni elenco dichiara per se'.

   Chi aggiunge un elenco nuovo: vedi DESIGN.md, "Elenco accordion V3". */

/* La tabella sparisce: niente bordi, niente padding, la cella e' la scheda.
   #buyerleads_dt tiene il nome storico, la banca dati richieste usa questo
   schema da prima che fosse una classe. */
.acc-dt-v3,
#buyerleads_dt.buyerleads-dt-v3 { border: none !important; border-collapse: collapse !important; margin: 0 !important; }
.acc-dt-v3 tbody tr,
#buyerleads_dt.buyerleads-dt-v3 tbody tr { background: transparent !important; border: none !important; }
.acc-dt-v3 tbody td,
#buyerleads_dt.buyerleads-dt-v3 tbody td { border: none !important; padding: 0 !important; }
/* Le righe v3 disegnano da sé il loro sfondo: le celle restano trasparenti (DataTables colora di grigio
   la colonna su cui si ordina, .sorting_1, e sul telefono senza pannello si vedeva dietro le schede) */
#buyerleads_dt.buyerleads-dt-v3 tbody td, .acc-dt-v3 tbody td { background: transparent !important; }

/* L'unica colonna visibile deve prendere tutta la larghezza del pannello:
   senza, la cella si stringe sul contenuto, le colonne in fr della griglia
   collassano a zero e la riga si accartoccia sotto le etichette. */
.acc-dt-v3, table.dataTable.acc-dt-v3 { width: 100% !important; table-layout: fixed !important; }
.acc-dt-v3 tbody td { width: 100% !important; }

/* Griglia di colonne: la base sta qui, il template per colonne lo mette
   l'elenco (di norma dentro @media (min-width: 992px)). */
.acc-grid-v3 {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    align-items: center !important;
}

/* Barra delle etichette di colonna: stessa griglia delle righe. I 6px di bordo
   trasparente stanno al posto del bordo di stato di .monday-style, cosi' le
   etichette cadono esattamente sopra le colonne. */
.acc-headbar-v3 {
    border-left: 6px solid transparent;
    padding: 12px 22px !important;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    cursor: default;
    background: rgba(248, 250, 252, 0.7);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.acc-headbar-v3:hover { background: rgba(248, 250, 252, 0.7); }

/* Sotto i 992px le schede non sono piu' incolonnate: le etichette sono ingombro.
   (.acc-grid-v3 e' display:grid !important e scavalca il d-none di Bootstrap,
   quindi serve un selettore piu' specifico.) */
@media (max-width: 991px) {
    .acc-header-v3.acc-headbar-v3 { display: none !important; }
}

.acc-item-v3.is-open .acc-grid-v3 .acc-chevron-v3 i { transform: rotate(180deg); }

/* ── Toni semantici ───────────────────────────────────────────────────────────
   Una coppia di colori per significato, dichiarata una volta sola. Si applicano
   accanto a .pill-v3 o .dot-v3: <span class="pill-v3 tone-bad-v3">Persa</span> */
.tone-ok-v3      { --tone-bg: #dcfce7;                  --tone-fg: #15803d; --tone-dot: #22c55e; }
.tone-ok-soft-v3 { --tone-bg: #ecfdf5;                  --tone-fg: #059669; --tone-dot: #34d399; }
.tone-bad-v3     { --tone-bg: #fee2e2;                  --tone-fg: #dc2626; --tone-dot: #ef4444; }
.tone-warn-v3    { --tone-bg: rgba(251, 191, 36, 0.15); --tone-fg: #d97706; --tone-dot: #f59e0b; }
.tone-info-v3    { --tone-bg: #e0f2fe;                  --tone-fg: #0369a1; --tone-dot: #0ea5e9; }
.tone-neutral-v3 { --tone-bg: #f1f5f9;                  --tone-fg: #64748b; --tone-dot: #cbd5e1; }
.tone-ai-v3      { --tone-bg: rgba(99, 102, 241, 0.1);  --tone-fg: #4f46e5; --tone-dot: #6366f1; }
.tone-live-v3    { --tone-bg: #dcfce7;                  --tone-fg: #15803d; --tone-dot: #22c55e; }

.pill-v3 {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
    background: var(--tone-bg, #f1f5f9);
    color: var(--tone-fg, #64748b);
}
.pill-v3 i { font-size: 0.7rem; }
/* Varianti di forma: piu' piccola, oppure quadrata da tabella (codici, numeri). */
.pill-sm-v3 { padding: 2px 9px; font-size: 0.7rem; gap: 4px; }
.pill-box-v3 { border-radius: 8px; padding: 3px 8px; min-width: 34px; justify-content: center; gap: 4px; }

.dot-v3 {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--tone-dot, #cbd5e1);
}
/* Puntino di stato "in diretta": stesso tono, alone che pulsa. */
.dot-live-v3 { animation: dot-pulse-v3 1.4s infinite; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); }
@keyframes dot-pulse-v3 {
    70% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* ── Timeline di eventi ───────────────────────────────────────────────────────
   Elenco verticale di momenti dentro il corpo di una scheda: ora, cosa, esito. */
.tl-v3 { position: relative; padding-left: 8px; }
.tl-v3::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: rgba(0, 0, 0, 0.06);
}
/* Griglia e non flex: le colonne si dimensionano sulla riga piu' larga, quindi
   ora, etichetta ed esito restano incolonnati anche quando le etichette hanno
   lunghezze diverse ("IVR 900" contro "Casella - Fuori Orario"). */
.tl-row-v3 {
    position: relative;
    display: grid;
    grid-template-columns: 9px 62px minmax(150px, auto) max-content max-content;
    justify-content: start;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    font-size: 0.78rem;
}
.tl-row-v3 .dot-v3 { z-index: 1; box-shadow: 0 0 0 3px #fff; }
.tl-time-v3 { font-variant-numeric: tabular-nums; color: #94a3b8; font-size: 0.72rem; min-width: 62px; }
.tl-label-v3 { font-weight: 700; color: #334155; min-width: 110px; }
.tl-note-v3 { font-size: 0.72rem; color: #94a3b8; font-style: italic; }
.tl-empty-v3 { font-size: 0.78rem; color: #94a3b8; font-style: italic; }

/* ── Identificativo copiabile ────────────────────────────────────────────────── */
.copy-id-v3 {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    color: #475569;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    border: 1px solid #e2e8f0;
    transition: all 0.15s ease;
}
.copy-id-v3:hover { background: var(--primary, #c0392b); border-color: var(--primary, #c0392b); color: #fff; }
/* Variante in riga: piu' piccola e in sordina, ma resta una targhetta con la sua
   icona - se si puo' copiare deve sembrare qualcosa su cui cliccare. */
.copy-id-v3.copy-id-inline-v3 {
    padding: 2px 8px;
    border-radius: 7px;
    gap: 5px;
    font-size: 0.68rem;
    color: #94a3b8;
    background: #f8fafc;
    border-color: #e9eef5;
}
.copy-id-v3.copy-id-inline-v3 i { font-size: 0.64rem; opacity: 0.75; }

/* ── Menu Esporta ─────────────────────────────────────────────────────────────
   I pulsanti dell'estensione Buttons vengono spostati dentro un .dropdown-menu:
   il loro contenitore deve sparire come scatola e lasciare le voci a tutta
   larghezza, come fossero normali .dropdown-item. */
.export-dropdown-v3 { display: inline-flex; align-items: center; }
.export-ico-excel-v3 { color: #15803d; }
.export-ico-csv-v3 { color: #16a34a; }

/* ── Viste di un elenco (MYB.SavedViews) ──────────────────────────────────────
   Pill delle viste predefinite e di quelle salvate dall'utente. Erano in un blocco
   <style> dentro richieste_v3.php: stanno qui perche' le usa il componente, quindi
   qualunque elenco. */
.quick-view-pill-v3 {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
.quick-view-pill-v3:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: color-mix(in srgb, var(--primary, #6366f1) 25%, transparent);
    color: #1e293b;
    transform: translateY(-1px);
}
.quick-view-pill-v3.active {
    background: var(--primary, #6366f1) !important;
    border-color: var(--primary, #6366f1) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--primary, #6366f1) 25%, transparent);
}
.quick-view-pill-v3 .btn-delete-view-v3 {
    border: none;
    background: transparent;
    color: inherit;
    opacity: 0.5;
    padding: 0;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    transition: all 0.15s;
}
.quick-view-pill-v3 .btn-delete-view-v3:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.25);
}
.quick-view-pill-v3.active .btn-delete-view-v3:hover {
    background: rgba(0, 0, 0, 0.15);
}

/* ── Ricerca a campo unico: voci del suggeritore ─────────────────────────────── */
.spotlight-suggestion-body-v3 { display: flex; flex-direction: column; text-align: left; }
.spotlight-suggestion-label-v3 {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1px;
}

/* ── Mini scheda anagrafica (avatar + due righe) ─────────────────────────────── */
.mini-entity-v3 { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mini-entity-avatar-v3 {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary, #e8743b), var(--primary, #c0392b));
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.mini-entity-body-v3 { display: flex; flex-direction: column; min-width: 0; }
.mini-entity-title-v3 { font-size: 0.88rem; font-weight: 700; color: #0f172a; white-space: nowrap; }
.mini-entity-sub-v3 { font-size: 0.72rem; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-entity-empty-v3 { color: #cbd5e1; font-style: italic; }

/* Cella a due piani: due informazioni minute incolonnate (numero + etichetta,
   chip + conteggio). */
.cell-stack-v3 { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
/* un'etichetta lunga resta nella sua colonna e finisce coi puntini (per intero nel dettaglio della riga) */
.cell-stack-v3 > span { max-width: 100%; }
.cell-stack-v3 .source-chip-v3 { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.cell-stack-v3 .source-chip-v3 i { margin-right: 5px; }
/* Importi sulla riga (Produzione): pillola col totale, al clic la composizione */
.money-pill-v3 { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border: 1px solid color-mix(in srgb, #16a34a 30%, #ffffff); border-radius: 999px; background: color-mix(in srgb, #16a34a 9%, #ffffff); color: #15803d; font-size: 0.82rem; font-weight: 800; white-space: nowrap; cursor: pointer; transition: background 0.15s ease, box-shadow 0.15s ease; }
.money-pill-v3 > i:first-child { font-size: 0.7rem; opacity: 0.8; }
.money-pill-v3:hover { background: color-mix(in srgb, #16a34a 15%, #ffffff); box-shadow: 0 3px 10px color-mix(in srgb, #16a34a 18%, transparent); }
.money-pill-v3:focus-visible { outline: 2px solid var(--primary, #6366f1); outline-offset: 2px; }
.money-pill-v3.is-zero { border-color: #e2e8f0; background: #f8fafc; color: #94a3b8; }
.money-done-v3 { font-size: 0.75rem; color: #16a34a; }
.money-popover-v3 { min-width: 260px; border: 1px solid #e2e8f0; border-radius: 14px; box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14); }
.money-popover-v3 .popover-header { padding: 10px 14px; border-radius: 14px 14px 0 0; background: #f8fafc; font-size: 0.82rem; font-weight: 800; color: #0f172a; }
.money-popover-v3 .popover-body { padding: 10px 14px 12px; }
.money-line-v3 { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; font-size: 0.82rem; color: #475569; }
.money-line-v3 b { color: #0f172a; font-variant-numeric: tabular-nums; }
.money-line-v3.is-total { margin: 4px 0; padding-top: 7px; border-top: 1px dashed #e2e8f0; font-weight: 800; color: #0f172a; }
.money-line-v3.is-total b { color: #15803d; }
.money-bar-v3 { height: 6px; margin: 8px 0 4px; border-radius: 999px; background: #eef2f7; overflow: hidden; }
.money-bar-v3 i { display: block; height: 100%; border-radius: 999px; background: #16a34a; }
.money-popover-v3 small { font-size: 0.72rem; color: #64748b; }

/* Icona SVG che si comporta come una icona di font: prende corpo e colore dal
   testo che la ospita, quindi segue anche gli hover dei pulsanti. */
/* Pallino d'azione accanto a un dato: apre un dettaglio senza occupare una
   colonna sua. Sta dentro la riga di testo, allineato al testo. */
.dot-btn-v3 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Il pallino e' piu' largo dell'icona che ospita: le glifi larghe come la
       tessera arrivano a toccare il bordo se il cerchio e' appena piu' grande. */
    width: 24px;
    height: 24px;
    padding: 0;
    margin-left: 8px;
    border: none;
    border-radius: 50%;
    font-size: 0.6rem;
    color: var(--primary, #c0392b);
    background: color-mix(in srgb, var(--primary, #c0392b) 10%, transparent);
    cursor: pointer;
    vertical-align: middle;
    transition: all 0.15s ease;
}
.dot-btn-v3:hover { background: var(--primary, #c0392b); color: #fff; }

/* Data della riga, data intera nel tooltip. E' un dato che si legge, non una
   nota a margine: corpo pieno e colore da testo, solo l'icona resta in sordina. */
.when-v3 { font-size: 0.82rem; font-weight: 600; color: #334155; white-space: nowrap; cursor: help; }
.when-v3 i { margin-right: 4px; color: #94a3b8; font-weight: 400; }

/* ═══ Registro Eventi Centralino (views/pbx_history_new.php) ═══════════════════
   Usa i componenti qui sopra: restano solo il template di colonne e i due o tre
   pezzi che esistono soltanto nel centralino. */

@media (min-width: 992px) {
    .pbx-call-grid-v3 {
        grid-template-columns: 150px minmax(0, 2.2fr) minmax(0, 1.6fr) minmax(0, 1.8fr) 175px auto !important;
    }
}

.acc-item-v3.is-live { background: rgba(220, 252, 231, 0.35) !important; }

/* Numero di linea e conteggio eventi: due etichette minute proprie del registro. */
.pbx-line-num-v3 { font-size: 0.78rem; font-weight: 600; color: #334155; white-space: nowrap; }
.pbx-line-num-v3 i { color: #94a3b8; margin-right: 4px; font-size: 0.7rem; }
.pbx-legs-v3 { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pbx-legs-v3 .pill-box-v3 { cursor: help; }
.pbx-legs-count-v3 { font-size: 0.65rem; color: #cbd5e1; font-weight: 600; }
.pbx-legs-more-v3 { background: transparent; color: #94a3b8; font-weight: 600; }

.pbx-call-body-v3 {
    display: none;   /* lo apre pbxToggleAcc scrivendo display inline */
    padding: 18px 22px;
}
.pbx-body-head-v3 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.pbx-body-sub-v3 { font-size: 0.72rem; color: #94a3b8; }
.pbx-call-body-v3 .acc-actions-v3 { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(0, 0, 0, 0.05); }
.pbx-tl-ai-v3 { font-size: 0.7rem; font-weight: 700; color: #4f46e5; margin-left: 6px; text-decoration: none; }

@media (max-width: 991px) {
    .pbx-call-grid-v3 {
        grid-template-columns: 1fr auto !important;
        grid-template-areas:
            "state   chevron"
            "caller  caller"
            "line    line"
            "legs    when" !important;
    }
    .pbx-call-grid-v3 .grid-col-state { grid-area: state; }
    .pbx-call-grid-v3 .grid-col-caller { grid-area: caller; }
    .pbx-call-grid-v3 .grid-col-line { grid-area: line; flex-direction: row; align-items: center; gap: 8px; }
    .pbx-call-grid-v3 .grid-col-legs { grid-area: legs; }
    .pbx-call-grid-v3 .grid-col-when { grid-area: when; justify-self: end; }
    .pbx-call-grid-v3 .grid-col-chevron { grid-area: chevron; }
    .pbx-call-body-v3 { padding: 16px; }
    /* Troppo stretto per incolonnare: si torna a flusso con a capo. */
    .tl-row-v3 { display: flex; flex-wrap: wrap; }
    .tl-label-v3 { min-width: 0; }
}

/* ── Riga delle liste v3 (spostato da richieste_v3.php: condiviso da tutte le liste
   con i componenti di Richieste v3, vedi MYB.TableList) */
.mini-client-card-v3 {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(15, 23, 42, 0.025);
    border: 1px solid rgba(15, 23, 42, 0.07);
    border-radius: 12px;
    padding: 8px 12px;
    width: 100%;
    overflow: hidden;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.acc-item-v3:hover .mini-client-card-v3 {
    background: color-mix(in srgb, var(--primary, #6366f1) 4.5%, transparent);
    border-color: color-mix(in srgb, var(--primary, #6366f1) 18%, transparent);
}
.client-avatar-v3 {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    color: color-mix(in srgb, var(--primary, #6366f1) 82%, black);
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary, #6366f1) 18%, transparent), color-mix(in srgb, var(--primary, #6366f1) 8%, transparent));
    border: 1px solid color-mix(in srgb, var(--primary, #6366f1) 18%, transparent);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.rel-date-v3 {
    font-size: 0.68rem;
    color: #94a3b8;
    white-space: nowrap;
    cursor: help;
}
.rel-date-v3 i { margin-right: 2px; }
.mini-client-card-v3 .entity-name-v3 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    font-size: 0.9rem;
}
.client-card-contacts-v3 {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.client-card-contacts-v3 > div { line-height: 1.3; }

/* ── Wiki v3: indice (views/wiki_index_v3.php) con i componenti delle liste v3 */
/* Il riquadro colorato della classica (.wiki-hero), più basso, con la barra di ricerca v3 */
/* Pulsante "+" tondo per creare (Nuovo documento, …): is-sm / is-lg per la misura, is-light su fondi colorati */
.btn-add-round-v3 {
    width: 38px; height: 38px; flex: 0 0 auto;
    border-radius: 50%; border: none; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--primary, #6366f1); color: #ffffff !important;
    font-size: 0.95rem; text-decoration: none !important;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--primary, #6366f1) 32%, transparent);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-add-round-v3:hover { transform: translateY(-1px) scale(1.06); box-shadow: 0 10px 22px color-mix(in srgb, var(--primary, #6366f1) 40%, transparent); }
.btn-add-round-v3:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary, #6366f1) 35%, transparent); outline-offset: 2px; }
.btn-add-round-v3.is-sm { width: 28px; height: 28px; font-size: 0.75rem; box-shadow: 0 3px 8px color-mix(in srgb, var(--primary, #6366f1) 28%, transparent); }
.btn-add-round-v3.is-lg { width: 50px; height: 50px; font-size: 1.2rem; }
.btn-add-round-v3.is-light { background: #ffffff; color: var(--primary, #6366f1) !important; box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18); }

.wiki-hero.wiki-v3-hero { padding: clamp(28px, 4vw, 44px) clamp(16px, 3vw, 32px); border-radius: 28px; margin: 4px 0 18px; }
.wiki-v3-hero h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); letter-spacing: -1.5px; margin-bottom: 8px; }
.wiki-v3-hero p { font-size: clamp(0.9rem, 1.3vw, 1.05rem); margin-bottom: 22px; }
.wiki-v3-hero .spotlight-wrapper { max-width: 760px; margin: 0 auto; text-align: left; }
.wiki-v3-hero .spotlight-search-container { background: #ffffff; border-color: transparent; }
.wiki-v3-hero-add { position: absolute; top: 18px; right: 18px; z-index: 2; }
@media (max-width: 575.98px) {
    .wiki-v3-hero-add.is-lg { top: 12px; right: 12px; width: 40px; height: 40px; font-size: 1rem; }
    .wiki-hero.wiki-v3-hero { padding-top: 58px; }
}
.wiki-v3 .active-filters-chips-v3 { margin-top: 4px; }

.wiki-v3-panel { overflow: hidden; }
.wiki-v3-panel-head {
    display: flex; align-items: center; gap: 10px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.wiki-v3-panel-head > i { color: var(--primary, #6366f1); }
.wiki-v3-panel-head h3 { margin: 0; font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: #475569; }
.wiki-v3-count {
    margin-left: auto;
    font-size: 0.72rem; font-weight: 700; color: #64748b;
    background: rgba(0,0,0,0.04); border-radius: 10px; padding: 1px 8px;
}
.wiki-v3-panel-head .btn-add-round-v3 { margin-left: 4px; }

.wiki-v3-row {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 20px 12px calc(20px + var(--wiki-level, 0) * 22px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    color: inherit; text-decoration: none;
    position: relative;
    transition: background 0.15s;
}
.wiki-v3-row:last-of-type { border-bottom: none; }
.wiki-v3-row::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: var(--primary, #6366f1); opacity: 0; transition: opacity 0.15s;
}
.wiki-v3-row:hover { background: color-mix(in srgb, var(--primary, #6366f1) 4%, transparent); text-decoration: none; color: inherit; }
.wiki-v3-row:hover::before { opacity: 1; }
.wiki-v3-row.is-child { background: rgba(0,0,0,0.012); }
.wiki-v3-branch { color: #cbd5e1; font-size: 0.7rem; margin-right: -4px; }
.wiki-v3-icon {
    width: 24px; flex: 0 0 24px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.35rem; color: #64748b;
}
.wiki-v3-icon.is-page { color: var(--primary, #6366f1); }
.wiki-v3-icon.is-pdf { color: #dc2626; }
.wiki-v3-icon.is-word { color: #2563eb; }
.wiki-v3-icon.is-excel { color: #16a34a; }
.wiki-v3-icon.is-ppt { color: #ea580c; }
.wiki-v3-icon.is-zip { color: #a16207; }
.wiki-v3-icon.is-img { color: #9333ea; }
.wiki-v3-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wiki-v3-main .entity-name-v3 { font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; }
.wiki-v3-excerpt { font-size: 0.75rem; color: #64748b; }
.wiki-v3-excerpt mark { padding: 0 2px; border-radius: 3px; background: #fef08a; }
.wiki-v3-code { flex: 0 0 auto; }
.wiki-v3-cat { flex: 0 0 auto; }
.wiki-v3-go { color: #cbd5e1; font-size: 0.75rem; transition: transform 0.15s, color 0.15s; }
.wiki-v3-row:hover .wiki-v3-go { color: var(--primary, #6366f1); transform: translateX(3px); }

.wiki-v3-empty { padding: 36px 20px; text-align: center; color: #94a3b8; font-size: 0.85rem; }
.wiki-v3-empty i { display: block; font-size: 1.6rem; margin-bottom: 10px; opacity: 0.5; }
.wiki-v3-nomatch { display: none; }

@media (max-width: 575.98px) {
    .wiki-v3-row { flex-wrap: wrap; gap: 8px 10px; padding: 12px 16px 12px calc(16px + var(--wiki-level, 0) * 14px); }
    .wiki-v3-go { display: none; }
    .wiki-v3-main { flex: 1 1 55%; }
    .wiki-v3-main .entity-name-v3 { white-space: normal; }
}

/* ── Liste v3: griglia senza le colonne connettore e notifica (Page::TableListShell, notif => false) */
.acc-lean-v3 .grid-col-connector, .acc-lean-v3 .grid-col-notif { display: none !important; }
@media (min-width: 992px) {
    .acc-lean-v3 .richieste-header-grid { grid-template-columns: 130px minmax(0,2.6fr) minmax(0,2fr) 1.5fr 1fr auto !important; }
}

/* ── Liste v3: miniatura (foto immobile) al posto delle iniziali, h.client(..., { photo, property }) */
.client-photo-v3 {
    flex: 0 0 auto;
    width: 46px; height: 46px;
    border-radius: 11px;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: color-mix(in srgb, var(--primary, #6366f1) 8%, #ffffff);
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
/* Blocco che apre la scheda rapida (h.client con property): tutto cliccabile */
.mini-client-card-v3.is-previewable { cursor: pointer; transition: background 0.15s, border-color 0.15s, transform 0.15s; }
.mini-client-card-v3.is-previewable:hover { background: color-mix(in srgb, var(--primary, #6366f1) 6%, #ffffff); border-color: color-mix(in srgb, var(--primary, #6366f1) 28%, transparent); transform: translateY(-1px); }
.mini-client-card-v3.is-previewable:hover .client-photo-v3 { box-shadow: 0 6px 14px rgba(15, 23, 42, 0.14); }
.mini-client-card-v3.is-previewable:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary, #6366f1) 35%, transparent); outline-offset: 2px; }
.client-photo-v3 img { width: 100%; height: 100%; object-fit: cover; display: block; }
.client-photo-v3.is-empty::before {
    content: "\f015";
    font-family: "Font Awesome 6 Free"; font-weight: 900;
    color: color-mix(in srgb, var(--primary, #6366f1) 70%, #ffffff);
    font-size: 1rem;
}

/* Scheda rapida dell'immobile (MYB.TableList.propertyPreview): stessa resa del popover di Richieste v3 */
.prop-popover-v3 { border-radius: 16px !important; border: 1px solid rgba(0,0,0,0.08) !important; box-shadow: 0 10px 30px rgba(0,0,0,0.12) !important; max-width: 320px !important; width: 320px !important; }
.prop-popover-v3 .popover-header { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 0.85rem; color: #1e293b; background: rgba(0,0,0,0.02); border-bottom: 1px solid rgba(0,0,0,0.05); border-top-left-radius: 16px; border-top-right-radius: 16px; padding: 10px 16px; }
.prop-popover-v3 .popover-body { padding: 14px 16px; }
.prop-popover-v3 .prop-pop-title-v3 { display: flex; justify-content: space-between; align-items: center; width: 100%; gap: 10px; }

/* ── Liste v3: "Ordina per" nella barra dei risultati (MYB.TableList, opzione sort) */
.sort-dropdown-v3 .dropdown-item { display: flex; align-items: center; font-size: 0.82rem; font-weight: 600; color: #334155; }
.sort-dropdown-v3 .sort-check-v3 { width: 14px; visibility: hidden; color: var(--primary, #6366f1); }
.sort-dropdown-v3 .dropdown-item.active { background: color-mix(in srgb, var(--primary, #6366f1) 8%, #ffffff); color: var(--primary, #6366f1); }
.sort-dropdown-v3 .dropdown-item.active .sort-check-v3 { visibility: visible; }
.sort-dropdown-v3 .sort-dir-v3 { margin-left: auto; font-size: 0.72rem; }
.sort-dropdown-v3 [data-sort-label] { color: #0f172a; }

/* ── Liste v3 su mobile: le azioni della barra risultati vanno a capo per voce intera, mai a metà
   (niente scorrimento orizzontale: taglierebbe i menu Ordina/Esporta) */
@media (max-width: 575.98px) {
    .acc-results-bar-v3 .results-actions-v3 {
        display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px;
        width: 100%; margin-top: 6px;
    }
    .acc-results-bar-v3 .results-actions-v3 .acc-expand-link,
    .acc-results-bar-v3 .results-actions-v3 .dropdown > .acc-expand-link { white-space: nowrap; }
}

/* ═══ Task manager v3 (Attività, DESIGN.md §28): gruppi per scadenza e righe da task ═══ */
.acc-header-v3.task-row-v3 {
    display: grid;
    grid-template-columns: 30px minmax(0, 2fr) minmax(0, 1.3fr) minmax(0, 1fr) 110px 170px 140px 24px;
    align-items: center;
    gap: 14px;
    padding: 11px 18px;
}
.acc-header-v3.task-row-v3.richieste-header-bar-v3 { padding-top: 12px; padding-bottom: 12px; }
.task-row-v3 .grid-col-chevron { width: 24px; }
.task-col-main { min-width: 0; }
.task-title-v3 {
    font-size: 0.9rem; font-weight: 700; color: #0f172a;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Titolo dal commento (l'indicazione del task): fino a due righe */
.task-title-v3.is-note {
    white-space: normal; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical;
}
.task-title-v3.is-empty { color: #94a3b8; font-weight: 600; font-style: italic; }
.task-type-v3 {
    display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto;
    padding: 2px 9px; border-radius: 999px;
    font-size: 0.7rem; font-weight: 700; color: #475569;
    background: rgba(15, 23, 42, 0.05);
    white-space: nowrap;
}
.task-type-v3 i { font-size: 0.66rem; color: var(--primary, #6366f1); }
.task-type-v3 .fa-whatsapp { color: #16a34a; }
.task-lock-v3 { color: #94a3b8; font-size: 0.72rem; margin-right: 6px; }
.task-meta-v3 { display: flex; align-items: center; gap: 12px; margin-top: 3px; min-width: 0; font-size: 0.76rem; color: #64748b; }
.task-rel-v3 {
    display: inline-flex; align-items: center; gap: 5px; min-width: 0; max-width: 60%;
    color: #475569; text-decoration: none !important;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.task-rel-v3 i { font-size: 0.65rem; color: #94a3b8; }
.task-rel-v3 b { color: var(--primary, #6366f1); font-weight: 800; }
.task-rel-v3:hover { color: var(--primary, #6366f1); }

/* Spunta rapida: cerchio che si riempie */
.task-check-v3 {
    width: 22px; height: 22px; padding: 0;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    background: #ffffff;
    display: inline-flex; align-items: center; justify-content: center;
    color: transparent; font-size: 0.62rem;
    cursor: pointer;
    transition: all 0.15s ease;
}
button.task-check-v3:hover { border-color: #16a34a; color: #16a34a; background: #f0fdf4; transform: scale(1.08); }
button.task-check-v3:focus-visible { outline: 3px solid rgba(22, 163, 74, 0.3); outline-offset: 2px; }
.task-check-v3.is-locked { border-style: dashed; }
.task-check-v3.is-checked { border-color: #16a34a; background: #16a34a; color: #ffffff; cursor: default; }
.task-item-v3.is-done .task-title-v3 { color: #94a3b8; text-decoration: line-through; text-decoration-color: #cbd5e1; }
.task-item-v3.is-completing { opacity: 0.55; transition: opacity 0.3s; }

/* Scadenza */
.task-due-v3 { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 700; color: #475569; white-space: nowrap; }
.task-due-v3 i { font-size: 0.7rem; opacity: 0.7; }
.task-due-v3.is-overdue { color: #dc2626; }
.task-due-v3.is-today { color: #d97706; }
.task-due-v3.is-tomorrow { color: #2563eb; }
.task-due-v3.is-done { color: #94a3b8; font-weight: 600; }

/* Stato più piccolo che nelle altre liste, a pillola: qui conta il task */
.task-row-v3 .task-col-status .status-pill-v3 {
    display: inline-flex; width: auto; max-width: 100%; min-height: 0;
    padding: 4px 11px; border-radius: 999px; font-size: 0.64rem;
}
/* Intestazioni delle colonne: da desktop (Bootstrap 4 non ha d-lg-grid, d-none va scavalcato) */
@media (min-width: 992px) {
    .acc-header-v3.task-row-v3.richieste-header-bar-v3 { display: grid !important; }
}
.task-row-v3 .task-col-owner { min-width: 0; }

/* Intestazioni di gruppo */
#activities_dt tr.task-group-tr-v3 > td { padding: 0 !important; border: none !important; background: transparent !important; }
.task-group-v3 {
    display: flex; align-items: center; gap: 8px;
    padding: 16px 18px 8px;
    font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
    color: #475569;
    border-bottom: 2px solid currentColor;
    border-bottom-color: rgba(0, 0, 0, 0.06);
}
.task-group-v3 > i { font-size: 0.8rem; }
.task-group-v3 > span:not(.task-group-count-v3) { color: inherit !important; } /* il tema colora gli span */
.task-group-count-v3 { font-size: 0.68rem; font-weight: 700; color: #64748b; background: rgba(0,0,0,0.05); border-radius: 10px; padding: 1px 8px; letter-spacing: 0; }
.task-group-v3.is-overdue { color: #dc2626; border-bottom-color: rgba(220, 38, 38, 0.35); }
.task-group-v3.is-today { color: #d97706; border-bottom-color: rgba(217, 119, 6, 0.35); }
.task-group-v3.is-tomorrow { color: #2563eb; border-bottom-color: rgba(37, 99, 235, 0.3); }
.task-group-v3.is-week { color: #0284c7; border-bottom-color: rgba(2, 132, 199, 0.3); }
.task-group-v3.is-later, .task-group-v3.is-nodate { color: #64748b; }
.task-group-v3.is-done { color: #16a34a; border-bottom-color: rgba(22, 163, 74, 0.3); }

/* Colonne Relazionato a e Tipo (desktop); su mobile tipo e record stanno sotto il titolo */
.task-col-rel, .task-col-type { min-width: 0; }
.task-row-v3:not(.richieste-header-bar-v3) .task-meta-v3 { display: none; }
.task-relcol-v3 { display: flex; flex-direction: column; min-width: 0; text-decoration: none !important; }
.task-relcol-name-v3 { font-size: 0.84rem; font-weight: 600; color: #1e293b !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-relcol-code-v3 { font-size: 0.72rem; font-weight: 700; color: var(--primary, #6366f1) !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-relcol-v3:hover .task-relcol-name-v3 { color: var(--primary, #6366f1); }
.task-typecol-v3 { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 0.82rem; font-weight: 600; color: #334155; }
.task-typecol-v3 > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #334155 !important; } /* il tema colora gli span */
.task-typecol-v3 i { flex: 0 0 auto; width: 16px; text-align: center; font-size: 0.8rem; color: var(--primary, #6366f1); }
.task-typecol-v3 .fa-whatsapp { color: #16a34a; }
.task-typecol-sub-v3 { display: block; margin-left: 23px; font-size: 0.72rem; color: #94a3b8 !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-empty-v3 { color: #cbd5e1; }

/* Mobile: spunta a sinistra, titolo, sotto scadenza · assegnatario · stato */
@media (max-width: 991px) {
    .task-row-v3 .task-col-rel, .task-row-v3 .task-col-type { display: none; }
    .task-row-v3 .task-meta-v3 { display: flex !important; }
    .acc-header-v3.task-row-v3 {
        grid-template-columns: 26px auto minmax(0, 1fr) auto auto;
        grid-template-areas:
            "check main  main  main   main"
            "check due   owner status chevron";
        gap: 8px 10px;
        padding: 12px 14px;
    }
    .task-row-v3 .task-col-check { grid-area: check; align-self: start; padding-top: 2px; }
    .task-row-v3 .task-col-main { grid-area: main; }
    .task-row-v3 .task-col-chevron { grid-area: chevron; align-self: center; }
    .task-row-v3 .task-col-due { grid-area: due; }
    .task-row-v3 .task-col-owner { grid-area: owner; min-width: 0; }
    .task-row-v3 .task-col-status { grid-area: status; justify-self: end; }
}

/* ── Liste v3 (MYB.TableList): caricamento come Richieste v3 — righe-scheletro e barra sopra il pannello */
.acc-loading-v3 {
    position: absolute; inset: 0; z-index: 50;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.2s ease, visibility 0s linear 0.2s;
    background: rgba(248, 250, 252, 0.94);
    backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
    border-radius: 20px; overflow: hidden;
}
.acc-loading-bar-v3 {
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    border-radius: 20px 20px 0 0;
    background: linear-gradient(90deg, transparent, var(--primary, #6366f1) 40%, color-mix(in srgb, var(--primary, #6366f1) 72%, white) 60%, transparent);
    background-size: 200% 100%;
    animation: acc-loading-slide-v3 1.2s ease-in-out infinite;
}
.acc-loading-v3.is-on { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.12s ease; }
@keyframes acc-loading-slide-v3 { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .acc-loading-bar-v3 { animation: none; } }

/* Riga aperta: intestazione su un fondo appena più scuro, come in Richieste v3 */
.acc-dt-v3 .acc-item-v3.is-open > .acc-header-v3 { background: #f8fafc; transition: background 0.2s ease; }

/* Scheletro di caricamento delle righe task (Attività): stessa griglia di .task-row-v3 */
.dt-skel-row.task-skel-v3 { grid-template-columns: 30px minmax(0, 2fr) minmax(0, 1.3fr) minmax(0, 1fr) 110px 170px 140px 24px; padding: 13px 18px; gap: 14px; }
.task-skel-v3 .task-skel-check-v3 { width: 22px; height: 22px; }
.task-skel-v3 .task-skel-tag-v3 { width: 120px; height: 16px; border-radius: 999px; }
.task-skel-v3 .task-skel-due-v3 { width: 64px; }
.task-skel-owner-v3 { display: flex; align-items: center; gap: 8px; padding: 3px 12px 3px 3px; border-radius: 999px; border: 1px solid rgba(15, 23, 42, 0.06); width: max-content; }
.task-skel-owner-v3 .dt-skel-avatar { width: 28px; height: 28px; }
.task-skel-owner-v3 .dt-skel-bar { width: 70px; }
.task-skel-v3 .task-skel-status-v3 { width: 96px; height: 20px; border-radius: 999px; }
.task-skel-group-v3 { padding: 16px 18px 8px; border-bottom: 2px solid rgba(0, 0, 0, 0.05); }
.task-skel-group-v3 .dt-skel-bar { display: block; width: 110px; height: 12px; }
@media (max-width: 991px) {
    .dt-skel-row.task-skel-v3 { grid-template-columns: 26px minmax(0, 1fr) auto; }
    .task-skel-v3 .task-skel-due-v3, .task-skel-v3 .task-skel-owner-v3,
    .dt-skel-row.task-skel-v3 > :nth-child(3), .dt-skel-row.task-skel-v3 > :nth-child(4) { display: none; }
}

/* ═══ Agenda personale v3 (views/agenda_v3.php + assets/js/MYB.AgendaV3.js, DESIGN.md §29) ═══ */
.agv3 { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; align-items: start; }
.agv3-today, .agv3-main { border-radius: 22px; }

/* Pannello Oggi */
.agv3-today { padding: 20px 16px 16px; position: sticky; top: 84px; max-height: calc(100vh - 110px); display: flex; flex-direction: column; }
.agv3-today-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 0 4px 14px; }
.agv3-today-title { margin: 0; font-size: 1.25rem; font-weight: 800; color: #0f172a; }
.agv3-today-date { font-size: 0.82rem; color: #64748b; margin-top: 2px; }
.agv3-today-list { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; padding: 2px 4px 4px; }
.agv3-today-card {
    position: relative; display: flex; flex-direction: column; gap: 5px; width: 100%; text-align: left;
    padding: 12px 14px 12px 16px; border-radius: 14px; cursor: pointer; overflow: hidden;
    background: #ffffff; border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.agv3-today-card::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--ev); }
.agv3-today-card:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08); border-color: color-mix(in srgb, var(--ev) 35%, transparent); }
.agv3-today-card:focus-visible { outline: 3px solid color-mix(in srgb, var(--ev) 35%, transparent); outline-offset: 2px; }
.agv3-today-card.is-past { opacity: 0.55; }
.agv3-today-card.is-live { border-color: color-mix(in srgb, var(--ev) 45%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ev) 14%, transparent); }
.agv3-today-time { font-size: 0.74rem; font-weight: 800; color: color-mix(in srgb, var(--ev) 80%, #0f172a); display: inline-flex; align-items: center; gap: 6px; }
.agv3-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ev); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ev) 25%, transparent); }
.agv3-today-name { font-size: 0.9rem; font-weight: 700; color: #0f172a; line-height: 1.3; }
.agv3-today-place { font-size: 0.76rem; color: #64748b; display: flex; gap: 6px; align-items: baseline; }
.agv3-today-place i { color: var(--ev); font-size: 0.7rem; }
.agv3-today-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }
.agv3-today-type { display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 700; color: color-mix(in srgb, var(--ev) 80%, #0f172a); background: color-mix(in srgb, var(--ev) 12%, #ffffff); padding: 3px 9px; border-radius: 999px; }
.agv3-today-empty { text-align: center; color: #94a3b8; font-size: 0.85rem; padding: 26px 10px; }
.agv3-today-empty i { display: block; font-size: 1.6rem; margin-bottom: 8px; opacity: 0.6; }
.agv3-today-skel { height: 84px; border-radius: 14px; background: linear-gradient(90deg, #eef2f7 25%, #f6f8fb 50%, #eef2f7 75%); background-size: 200% 100%; animation: dt-skel-shimmer 1.3s ease-in-out infinite; }

/* Pannello del giorno: frecce ieri/domani, "Torna a oggi", mini calendario */
.agv3-daynav { display: flex; align-items: center; gap: 6px; min-width: 0; }
.agv3-daynav-text { min-width: 0; text-align: center; flex: 1; }
.agv3-daynav-btn { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; border: 1px solid rgba(15, 23, 42, 0.1); background: #ffffff; color: #475569; display: inline-flex; align-items: center; justify-content: center; font-size: 0.72rem; cursor: pointer; transition: background 0.15s; }
.agv3-daynav-btn:hover { background: #f1f5f9; }
.agv3-today-head { align-items: center; }
.agv3-today-links { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px 8px; min-height: 8px; }
.agv3-backtoday { border: none; background: color-mix(in srgb, var(--primary, #6366f1) 10%, #ffffff); color: var(--primary, #6366f1); font-size: 0.74rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; cursor: pointer; }
.agv3-backtoday[hidden] { display: none; }
.agv3-mini-toggle { display: none; margin-left: auto; border: none; background: transparent; color: #64748b; font-size: 0.78rem; font-weight: 700; cursor: pointer; }
.agv3-mini { padding: 4px 4px 14px; margin-bottom: 10px; border-bottom: 1px solid rgba(15, 23, 42, 0.06); }
.agv3-mini-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; font-size: 0.84rem; font-weight: 800; color: #0f172a; }
.agv3-mini-head button { width: 26px; height: 26px; border: none; border-radius: 8px; background: transparent; color: #64748b; font-size: 0.7rem; cursor: pointer; }
.agv3-mini-head button:hover { background: #f1f5f9; }
.agv3-mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.agv3-mini-grid > span { font-size: 0.66rem; font-weight: 700; color: #94a3b8; padding: 2px 0 4px; }
.agv3-mini-day {
    position: relative; height: 30px; border: none; border-radius: 9px; background: transparent;
    font-size: 0.78rem; font-weight: 600; color: #334155; cursor: pointer; transition: background 0.12s;
}
.agv3-mini-day:hover { background: #f1f5f9; }
.agv3-mini-day.is-out { color: #cbd5e1; }
.agv3-mini-day.is-today { color: var(--primary, #6366f1); font-weight: 800; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--primary, #6366f1) 45%, transparent); }
.agv3-mini-day.is-busy::after { content: ''; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: color-mix(in srgb, var(--primary, #6366f1) 70%, #ffffff); }
.agv3-mini-day.is-selected { background: var(--primary, #6366f1); color: #ffffff; box-shadow: 0 4px 10px color-mix(in srgb, var(--primary, #6366f1) 30%, transparent); }
.agv3-mini-day.is-selected::after { background: #ffffff; }
.agv3-mini-day:focus-visible { outline: 2px solid color-mix(in srgb, var(--primary, #6366f1) 45%, transparent); outline-offset: 1px; }

/* Luogo: sfumatura "mappa" leggera con il segnaposto, nel colore dell'evento */
.agv3-today-card.has-place::after, .agv3-ev.has-place::after {
    content: ''; position: absolute; top: 0; right: 0; width: 46%; height: 100%; pointer-events: none;
    background:
        radial-gradient(circle at 70% 26%, var(--ev) 0 3px, #ffffff 3.5px 5px, transparent 5.5px),
        linear-gradient(118deg, transparent 38%, rgba(255, 255, 255, 0.75) 39% 42%, transparent 43%),
        linear-gradient(28deg, transparent 56%, rgba(255, 255, 255, 0.6) 57% 59%, transparent 60%),
        linear-gradient(160deg, transparent 70%, rgba(255, 255, 255, 0.55) 71% 73%, transparent 74%),
        radial-gradient(ellipse at 75% 20%, color-mix(in srgb, var(--ev) 22%, transparent), transparent 70%);
    -webkit-mask-image: linear-gradient(to left, #000 35%, transparent);
    mask-image: linear-gradient(to left, #000 35%, transparent);
    opacity: 0.9;
}

/* Barra: periodo, navigazione, viste */
.agv3-main { padding: 16px 18px 18px; min-width: 0; }
.agv3-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.agv3-nav, .agv3-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.agv3-nav-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(15, 23, 42, 0.12); background: #ffffff; color: #334155; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.15s; }
.agv3-nav-btn:hover { background: #f1f5f9; }
.agv3-today-btn { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(15, 23, 42, 0.12); background: #ffffff; font-size: 0.82rem; font-weight: 700; color: #334155; cursor: pointer; }
.agv3-today-btn:hover { background: #f1f5f9; }
.agv3-range { margin: 0 0 0 6px; font-size: 1.15rem; font-weight: 800; color: #0f172a; }
.agv3-views { display: inline-flex; padding: 3px; border-radius: 12px; background: #f1f5f9; }
.agv3-views button { border: none; background: transparent; padding: 6px 12px; border-radius: 9px; font-size: 0.8rem; font-weight: 700; color: #64748b; cursor: pointer; }
.agv3-views button.is-active { background: #ffffff; color: #0f172a; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12); }
@media (min-width: 768px) { .agv3-views [data-agv3-view="timeGrid3Day"] { display: none; } } /* 3 giorni: solo sul telefono, al posto della settimana */
/* Agenda visualizzata: pillola della persona con foto, menu delle agende visibili */
.agv3-who-btn {
    display: inline-flex; align-items: center; gap: 8px; max-width: 260px;
    padding: 3px 12px 3px 3px; border-radius: 999px; cursor: pointer;
    background: #ffffff; border: 1px solid rgba(15, 23, 42, 0.1); box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}
.agv3-who-btn:hover { border-color: color-mix(in srgb, var(--primary, #6366f1) 35%, transparent); }
.agv3-who-btn .consulente-avatar-v3, .agv3-who-item .consulente-avatar-v3 { width: 30px; height: 30px; font-size: 0.66rem; display: inline-flex; align-items: center; justify-content: center; }
.agv3-who-name { font-size: 0.84rem; font-weight: 700; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agv3-who-name small { font-weight: 500; color: #94a3b8; }
.agv3-who-caret { font-size: 0.62rem; color: #94a3b8; margin-left: 2px; }
.agv3-who-menu { min-width: 250px; max-height: 360px; overflow-y: auto; padding: 6px; border-radius: 14px; border: 1px solid rgba(15, 23, 42, 0.08); box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14); }
/* .agv3-who-menu davanti: [dir=ltr] .dropdown-item del tema metterebbe display block e il suo padding */
.dropdown-menu.agv3-who-menu .agv3-who-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; }
.dropdown-menu.agv3-who-menu .agv3-who-item:hover { background: #f8fafc; }
.dropdown-menu.agv3-who-menu .agv3-who-item.is-active, .dropdown-menu.agv3-who-menu .agv3-who-item.is-active:hover { background: var(--primary, #6366f1); }
.dropdown-menu.agv3-who-menu .agv3-who-item.is-active .agv3-who-name, .dropdown-menu.agv3-who-menu .agv3-who-item.is-active .agv3-who-name small { color: #ffffff; }
.dropdown-menu.agv3-who-menu .agv3-who-item.is-active .consulente-avatar-v3 { border-color: rgba(255, 255, 255, 0.7); }
.agv3-who-team { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--primary, #6366f1) 12%, #ffffff); color: var(--primary, #6366f1); font-size: 0.8rem; }
.agv3-who-label { padding: 4px 10px 2px; font-size: 0.66rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: #94a3b8; }

/* Calendario */
.agv3-cal .fc { font-family: inherit; }
.agv3-cal .fc-unthemed td, .agv3-cal .fc-unthemed th, .agv3-cal .fc-unthemed thead, .agv3-cal .fc-unthemed tbody, .agv3-cal .fc-unthemed .fc-divider, .agv3-cal .fc-unthemed .fc-row { border-color: #eef2f7; }
.agv3-cal #calendar.is-loading { opacity: 0.6; transition: opacity 0.2s; }
.agv3-cal .fc-head th { padding: 8px 4px 10px; border-bottom-width: 1px; }
.agv3-dh { display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 0 6px; position: relative; text-align: left; }
.agv3-dh-name { font-size: 0.72rem; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 0.05em; }
.agv3-dh-num { font-size: 1.25rem; font-weight: 800; color: #0f172a; line-height: 1.2; }
.agv3-dh-count { font-size: 0.7rem; color: #94a3b8; min-height: 1em; }
.agv3-dh.is-today .agv3-dh-name, .agv3-dh.is-today .agv3-dh-num { color: var(--primary, #6366f1); }
.agv3-dh.is-today::after { content: ''; position: absolute; left: 0; right: 0; bottom: -11px; height: 3px; border-radius: 3px; background: var(--primary, #6366f1); }
.agv3-cal .fc-today { background: color-mix(in srgb, var(--primary, #6366f1) 3%, #ffffff) !important; }
.agv3-cal .fc-axis { font-size: 0.72rem; color: #94a3b8; }
.agv3-cal .fc-time-grid .fc-slats td { height: 2.4em; }
/* Adattata allo schermo (MYB.AgendaV3 fit): la giornata sta tutta in una schermata */
.agv3-cal .is-fitted .fc-time-grid .fc-slats td { height: var(--agv3-slot); }
.agv3-cal .is-fitted .fc-axis { font-size: 0.66rem; }
.agv3-cal .fc-time-grid .fc-slats .fc-minor td { border-top-style: dashed; border-top-color: #f3f5f8; }
.agv3-cal .fc-now-indicator-line { border-color: var(--primary, #6366f1); border-top-width: 2px; }
.agv3-cal .fc-now-indicator-arrow { border-color: var(--primary, #6366f1); border-top-color: transparent; border-bottom-color: transparent; }
.agv3-cal .fc-nonbusiness { background: repeating-linear-gradient(135deg, rgba(15, 23, 42, 0.018) 0 6px, transparent 6px 12px); }

/* Evento nella griglia oraria: card tinta nel suo colore */
.agv3-cal .fc-time-grid-event.agv3-fc-ev, .agv3-cal .fc-day-grid-event.agv3-fc-ev { background: transparent !important; border: none !important; box-shadow: none !important; }
.agv3-cal .fc-time-grid-event.agv3-fc-ev { margin: 1px 2px; }
/* FullCalendar (.fc-view-container *) rimette content-box quando il suo CSS arriva dopo questo (scheda richiesta):
   la card sforerebbe l'orario di fine di padding + bordo */
.agv3-cal .fc-view-container .agv3-ev { box-sizing: border-box; }
.agv3-ev {
    position: relative; height: 100%; min-height: 22px; box-sizing: border-box; overflow: hidden;
    display: flex; flex-direction: column; gap: 3px;
    padding: 8px 10px; border-radius: 10px;
    background: color-mix(in srgb, var(--ev) 12%, #ffffff);
    border: 1px solid color-mix(in srgb, var(--ev) 35%, #ffffff);
    color: color-mix(in srgb, var(--ev) 72%, #0f172a);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.agv3-fc-ev:hover .agv3-ev { box-shadow: 0 6px 16px color-mix(in srgb, var(--ev) 22%, transparent); }
.agv3-ev-ico { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: var(--ev); color: #ffffff; font-size: 0.72rem; margin-bottom: 4px; }
.agv3-ev-title { position: relative; z-index: 1; font-size: 0.8rem; font-weight: 800; line-height: 1.25; color: color-mix(in srgb, var(--ev) 70%, #0f172a); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; }
.agv3-ev-place { position: relative; z-index: 1; font-size: 0.7rem; display: flex; gap: 5px; align-items: baseline; opacity: 0.85; min-width: 0; }
.agv3-ev-place span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agv3-ev-foot { margin-top: auto; position: relative; z-index: 1; }
.agv3-ev.is-compact { padding: 3px 8px; gap: 0; border-radius: 8px; }
.agv3-ev.is-compact .agv3-ev-title { -webkit-line-clamp: 2; line-clamp: 2; font-size: 0.74rem; }
.agv3-ev.is-compact.has-place::after { width: 30%; }

/* Tutto il giorno: una riga sottile (pallino + titolo), la fascia in alto resta bassa */
.agv3-cal .fc-day-grid-event.agv3-fc-allday { margin: 1px 2px 2px; }
.agv3-allday { display: flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 6px; font-size: 0.72rem; font-weight: 700; color: color-mix(in srgb, var(--ev) 75%, #0f172a); background: color-mix(in srgb, var(--ev) 12%, #ffffff); border: 1px solid color-mix(in srgb, var(--ev) 25%, #ffffff); white-space: nowrap; overflow: hidden; }
.agv3-allday span { overflow: hidden; text-overflow: ellipsis; }
.agv3-cal .fc-time-grid-container + .fc-divider, .agv3-cal .fc-divider { padding: 0 !important; height: 2px; }
.agv3-cal .fc-day-grid .fc-row { min-height: 0 !important; }
.agv3-cal .fc-day-grid .fc-content-skeleton { padding-bottom: 2px; }

/* Elenco della pila di appuntamenti in parallelo (dettaglio al clic) */
.agv3-cl-list { list-style: none; margin: 0; padding: 8px; max-height: 320px; overflow-y: auto; }
.agv3-cl-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: none; border-radius: 10px; background: transparent; text-align: left; cursor: pointer; }
.agv3-cl-item:hover { background: #f8fafc; }
.agv3-cl-time { flex: 0 0 96px; font-size: 0.76rem; font-weight: 800; color: color-mix(in srgb, var(--ev) 80%, #0f172a); }
.agv3-cl-name { flex: 1; min-width: 0; font-size: 0.84rem; font-weight: 600; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agv3-cl-item > i { color: #cbd5e1; font-size: 0.7rem; }
.agv3-cl-back { display: block; width: 100%; padding: 9px 16px; border: none; border-bottom: 1px solid #f1f5f9; background: #ffffff; text-align: left; font-size: 0.78rem; font-weight: 700; color: var(--primary, #6366f1); cursor: pointer; }
.agv3-today-name i.fa-layer-group { font-size: 0.72rem; color: var(--ev); }

/* Pila della vista Settimana/Giorno: titoli uno per riga (più colonne se la card è larga) */
.agv3-ev.is-stack { background: #ffffff; border: 1px solid rgba(15, 23, 42, 0.12); border-left: 4px solid #94a3b8; color: #334155; padding: 6px 8px; gap: 4px; }
.agv3-stack-head { flex: 0 0 auto; font-size: 0.66rem; font-weight: 800; color: #64748b; text-transform: uppercase; letter-spacing: 0.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agv3-stack-head i { font-size: 0.62rem; }
.agv3-stack-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; overflow: hidden; flex: 1 1 auto; min-height: 0; -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 14px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 14px), transparent); }
.agv3-stack-list li { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 0.74rem; font-weight: 700; color: #0f172a; }
.agv3-stack-list li span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agv3-stack-list .agv3-dot, .agv3-cl-name .agv3-dot { display: inline-block; flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--ev); }
@container (max-height: 32px) { .agv3-stack-head { display: none; } }
@container (min-width: 420px) {
    .agv3-stack-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 3px 16px; align-content: start; }
}

/* Dettagli in base allo spazio: ogni informazione ha una forma grande e una piccola, le container
   query scelgono quale mostrare; il titolo c'è sempre e va a capo tra le parole */
.agv3-ev { container-type: size; }
.agv3-ev-title { overflow-wrap: break-word; hyphens: auto; -webkit-line-clamp: 4; line-clamp: 4; }
.agv3-ev-mini-ico { display: none; font-size: 0.62rem; margin-right: 5px; opacity: 0.85; }
.agv3-ev-meta { position: relative; z-index: 1; display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 0.72rem; font-weight: 600; opacity: 0.9; }
.agv3-ev-time { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agv3-ev-time-short { display: none; white-space: nowrap; }
.agv3-ev-people { display: none; align-items: center; gap: 3px; flex: 0 0 auto; padding: 0 6px; height: 16px; border-radius: 999px; font-size: 0.62rem; font-weight: 800; background: color-mix(in srgb, var(--ev) 22%, #ffffff); color: color-mix(in srgb, var(--ev) 80%, #0f172a); }
.agv3-ev-people i { font-size: 0.55rem; }
.agv3-ev-people-corner { display: none; position: absolute; top: 3px; right: 3px; z-index: 2; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 999px; font-size: 0.58rem; font-weight: 800; line-height: 15px; text-align: center; color: #ffffff; background: var(--ev); }
/* Pallini piccoli dei partecipanti (due foto + "+N") in fondo alla riga dell'orario */
.agv3-ev-mavs { display: none; flex: 0 0 auto; margin-left: auto; }
.agv3-ev-mavs .agv3-av { width: 17px; height: 17px; font-size: 0.46rem; border-width: 1.5px; margin-left: -5px; }
.agv3-ev-mavs .agv3-av:first-child { margin-left: 0; }
/* Media (bassa o stretta): icona piccola accanto al titolo, le foto diventano pallini piccoli */
@container (max-height: 78px) {
    .agv3-ev-ico, .agv3-ev-place, .agv3-ev-foot { display: none; }
    .agv3-ev-mini-ico { display: inline; }
    .agv3-ev-mavs { display: inline-flex; }
}
@container (max-width: 150px) {
    .agv3-ev-ico, .agv3-ev-place, .agv3-ev-foot { display: none; }
    .agv3-ev-mini-ico { display: inline; }
    .agv3-ev-mavs { display: inline-flex; }
    .agv3-ev-title { font-size: 0.74rem; -webkit-line-clamp: 6; line-clamp: 6; }
}
/* Stretta: dell'orario solo l'inizio, i partecipanti come "👤 3" */
@container (max-width: 115px) {
    .agv3-ev-time { display: none; }
    .agv3-ev-time-short { display: inline; }
    .agv3-ev-mavs { display: none; }
    .agv3-ev-people { display: inline-flex; }
}
/* Una riga sola: titolo con l'iconcina, i partecipanti come pallini nell'angolo
   (le altezze delle container query sono quelle interne, senza il padding della card) */
@container (max-height: 32px) {
    .agv3-ev-meta { position: static; }
    .agv3-ev-time, .agv3-ev-time-short, .agv3-ev-people { display: none; }
    .agv3-ev-mavs { display: inline-flex; position: absolute; top: 3px; right: 3px; z-index: 2; }
    .agv3-ev-title { -webkit-line-clamp: 2; line-clamp: 2; }
    .agv3-ev.has-people .agv3-ev-title { padding-right: 44px; }
}
/* Una riga e stretta: al posto dei pallini il numerino nell'angolo */
@container (max-height: 32px) and (max-width: 170px) {
    .agv3-ev-mavs { display: none; }
    .agv3-ev.has-people .agv3-ev-title { padding-right: 16px; }
    .agv3-ev-people-corner { display: block; }
}

/* Inviti (evento creato da un altro): busta davanti al titolo; da rispondere = card bianca col bordo
   tratteggiato, forse = righe, rifiutato = sbiadito e barrato (come Google Calendar) */
.agv3-ev-inv { font-size: 0.66rem; margin-right: 4px; opacity: 0.9; }
.agv3-ev.is-invited .agv3-ev-mini-ico { display: none; } /* la busta prende il posto dell'iconcina del tipo */
.agv3-ev.is-invited.st-needsAction { background: #ffffff; border: 1.5px dashed color-mix(in srgb, var(--ev) 60%, #ffffff); }
.agv3-ev.is-invited.st-tentative { background-image: repeating-linear-gradient(135deg, transparent 0 7px, color-mix(in srgb, var(--ev) 12%, transparent) 7px 14px); }
.agv3-ev.is-invited.st-declined { opacity: 0.55; }
.agv3-ev.is-invited.st-declined .agv3-ev-title { text-decoration: line-through; }
.agv3-pop-person small { color: #94a3b8; font-weight: 500; }
.agv3-pop-inv.st-needsAction b { color: #b45309; }
.agv3-pop-inv.st-declined b { text-decoration: line-through; }

/* Partecipanti */
.agv3-avs { display: inline-flex; }
.agv3-av { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 0.56rem; font-weight: 800; color: color-mix(in srgb, var(--ev, #6366f1) 80%, #0f172a); background: color-mix(in srgb, var(--ev, #6366f1) 20%, #ffffff); border: 2px solid #ffffff; margin-left: -6px; }
.agv3-avs .agv3-av:first-child { margin-left: 0; }
.agv3-av.is-more { background: #ffffff; color: #64748b; }
.agv3-av.has-wa-photo { padding: 0; overflow: hidden; background: #ffffff; }
.agv3-av .user-avatar-wa-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }

/* Mese ed elenco */
.agv3-mo { display: flex; align-items: center; gap: 5px; padding: 2px 6px; border-radius: 6px; font-size: 0.74rem; color: #334155; background: color-mix(in srgb, var(--ev) 10%, #ffffff); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agv3-mo b { font-weight: 700; color: color-mix(in srgb, var(--ev) 75%, #0f172a); }
.agv3-dot { flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--ev); }
.agv3-cal .fc-list-view { border: none; }
.agv3-cal .fc-list-heading td { background: #f8fafc !important; font-weight: 800; color: #0f172a; }
.agv3-cal .fc-list-item td { padding: 11px 14px; }
.agv3-cal .fc-list-item-title { font-weight: 600; color: #0f172a; }
.agv3-list-place { margin-left: 8px; font-size: 0.78rem; color: #64748b; font-weight: 500; }
.agv3-list-place i { margin-right: 4px; font-size: 0.7rem; }

/* Dettaglio evento */
.agv3-popover { max-width: 360px !important; width: 360px !important; border: none !important; border-radius: 18px !important; box-shadow: 0 22px 50px rgba(15, 23, 42, 0.2) !important; }
.agv3-popover .popover-body { padding: 0 !important; }
.agv3-pop { border-radius: 18px; overflow: hidden; background: #ffffff; }
.agv3-pop-head { display: flex; align-items: flex-start; gap: 12px; padding: 16px 16px 14px; background: color-mix(in srgb, var(--ev) 10%, #ffffff); border-bottom: 1px solid color-mix(in srgb, var(--ev) 18%, #ffffff); }
.agv3-pop-head .agv3-ev-ico { width: 34px; height: 34px; flex-basis: 34px; border-radius: 10px; font-size: 0.85rem; margin: 0; }
.agv3-pop-head > div { flex: 1; min-width: 0; }
.agv3-pop-title { font-size: 1rem; font-weight: 800; color: #0f172a; line-height: 1.3; }
.agv3-pop-type { display: inline-block; margin-top: 5px; font-size: 0.72rem; font-weight: 700; color: color-mix(in srgb, var(--ev) 80%, #0f172a); background: #ffffff; border-radius: 999px; padding: 2px 9px; }
.agv3-pop-close { border: none; background: transparent; color: #64748b; width: 28px; height: 28px; border-radius: 8px; cursor: pointer; }
.agv3-pop-close:hover { background: rgba(15, 23, 42, 0.06); }
.agv3-pop-row { display: flex; gap: 12px; padding: 10px 16px 0; font-size: 0.84rem; color: #334155; }
.agv3-pop-row > i { width: 16px; margin-top: 3px; color: #94a3b8; text-align: center; }
.agv3-pop-row b { display: block; color: #0f172a; font-weight: 700; }
.agv3-pop-row span, .agv3-pop-row a { font-size: 0.78rem; color: #64748b; }
.agv3-pop-row a { color: var(--primary, #6366f1); font-weight: 700; }
.agv3-pop-desc { font-size: 0.82rem; color: #475569; max-height: 90px; overflow: auto; }
.agv3-pop-sub { padding: 14px 16px 6px; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: #94a3b8; }
.agv3-pop-people { list-style: none; margin: 0; padding: 0 16px; display: flex; flex-direction: column; gap: 6px; max-height: 130px; overflow: auto; }
.agv3-pop-people li { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: #334155; }
.agv3-pop-people .agv3-av { margin: 0; width: 24px; height: 24px; }
.agv3-pop-person { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agv3-pop-people i { color: #cbd5e1; }
.agv3-pop-people i.is-yes { color: #16a34a; }
.agv3-pop-people i.is-no { color: #dc2626; }
.agv3-pop-actions { display: flex; gap: 8px; padding: 16px; margin-top: 12px; border-top: 1px solid #f1f5f9; background: #f8fafc; flex-wrap: wrap; }
.agv3-pop-main { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 12px; border-radius: 10px; font-size: 0.8rem; font-weight: 700; color: #ffffff !important; background: var(--primary, #6366f1); text-decoration: none !important; }
.agv3-pop-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 12px; border-radius: 10px; font-size: 0.8rem; font-weight: 700; color: #334155 !important; background: #ffffff; border: 1px solid #e2e8f0; cursor: pointer; text-decoration: none !important; }
.agv3-pop-btn:hover { background: #f1f5f9; }
.agv3-pop-btn.is-danger { color: #dc2626 !important; }

@media (max-width: 991px) {
    .agv3 { grid-template-columns: minmax(0, 1fr); }
    .agv3-today, .agv3-main { min-width: 0; }
    .agv3-today { position: static; max-height: none; }
    /* Mini calendario ripiegato su mobile: si apre col pulsante "Calendario" */
    .agv3-mini-toggle { display: inline-flex; align-items: center; gap: 6px; }
    .agv3-mini { display: none; }
    .agv3-today.show-mini .agv3-mini { display: block; }
    .agv3-today-list { flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
    .agv3-today-card { flex: 0 0 78%; scroll-snap-align: start; }
    .agv3-today-skel { flex: 0 0 78%; }
    .agv3-range { width: 100%; margin: 6px 0 0; order: 5; }
    .agv3-tools { width: 100%; }
    .agv3-views { flex: 1; }
    .agv3-views button { flex: 1; }
    .agv3-popover { width: calc(100vw - 32px) !important; max-width: calc(100vw - 32px) !important; }
}
@media (prefers-reduced-motion: reduce) { .agv3-today-skel { animation: none; } }

/* Giorno scelto nel pannello (frecce o mini calendario): evidenziato anche nel calendario grande */
.agv3-cal .fc-bg td.agv3-picked:not(.fc-today), .agv3-cal .fc-day-grid td.fc-day.agv3-picked:not(.fc-today) { background: color-mix(in srgb, var(--primary, #6366f1) 6%, #ffffff) !important; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--primary, #6366f1) 35%, transparent); }
.agv3-cal th.agv3-picked:not(.fc-today) .agv3-dh-num { display: inline-block; padding: 0 8px; border-radius: 999px; background: var(--primary, #6366f1); color: #ffffff; }
.agv3-cal th.agv3-picked:not(.fc-today) .agv3-dh-name { color: var(--primary, #6366f1); }
.agv3-cal .fc-day-top.agv3-picked .fc-day-number { background: var(--primary, #6366f1); color: #ffffff; border-radius: 999px; padding: 1px 7px; }
.agv3-picked-flash { animation: agv3-picked-flash 1s ease-out; }
@keyframes agv3-picked-flash { 0% { box-shadow: inset 0 0 0 3px var(--primary, #6366f1); background-color: color-mix(in srgb, var(--primary, #6366f1) 18%, #ffffff); } 100% { } }
@media (prefers-reduced-motion: reduce) { .agv3-picked-flash { animation: none; } }

/* ── Agende unificate v3 (DESIGN.md §29b): una riga per collega, stesse card dell'agenda personale */
.agv3-team-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 20px; padding: 0 7px; margin-left: 4px; border-radius: 999px; font-size: 0.7rem; font-weight: 800; vertical-align: middle; color: #64748b; background: #f1f5f9; }
.agv3-team-people { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 14px; max-height: 340px; overflow-y: auto; }
.agv3-tp-search-wrap { position: relative; margin: 2px 0 8px; }
.agv3-tp-search-wrap:has(.agv3-tp-search[hidden]) { display: none; }
.agv3-tp-search-wrap i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 0.75rem; color: #94a3b8; pointer-events: none; }
.agv3-tp-search { width: 100%; height: 36px; padding: 0 12px 0 32px; border: 1px solid #e2e8f0; border-radius: 10px; background: #f8fafc; font-size: 0.82rem; color: #0f172a; }
.agv3-tp-search:focus { outline: none; border-color: var(--primary, #6366f1); background: #ffffff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #6366f1) 15%, transparent); }
.agv3-tp-none { padding: 8px; font-size: 0.8rem; color: #94a3b8; }
.agv3-tp { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border: 0; border-radius: 10px; background: transparent; text-align: left; cursor: pointer; }
.agv3-tp:hover { background: #f8fafc; }
.agv3-tp:focus-visible { outline: 2px solid var(--primary, #6366f1); outline-offset: 1px; }
.agv3-tp-check { flex: 0 0 18px; width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid #cbd5e1; display: inline-flex; align-items: center; justify-content: center; font-size: 0.6rem; color: transparent; background: #ffffff; transition: background 0.15s ease, border-color 0.15s ease; }
.agv3-tp.is-on .agv3-tp-check { background: var(--primary, #6366f1); border-color: var(--primary, #6366f1); color: #ffffff; }
.agv3-tp .consulente-avatar-v3 { width: 26px; height: 26px; font-size: 0.6rem; display: inline-flex; align-items: center; justify-content: center; }
.agv3-tp-name { min-width: 0; font-size: 0.82rem; font-weight: 700; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agv3-tp-name small { font-weight: 500; color: #94a3b8; }
.agv3-tp:not(.is-on) .consulente-avatar-v3, .agv3-tp:not(.is-on) .agv3-tp-name { opacity: 0.45; }

.agv3-tl { --tl-who: 200px; overflow-x: auto; margin: 0 -18px -18px; border-top: 1px solid #eef2f7; border-radius: 0 0 22px 22px; }
.agv3-tl-inner { min-width: calc(var(--tl-who) + var(--tl-cols) * var(--tl-hour)); }
.agv3-tl[data-view="week"] .agv3-tl-inner { min-width: calc(var(--tl-who) + 7 * 150px); }
.agv3-tl-head { display: flex; position: sticky; top: 0; z-index: 3; background: #ffffff; border-bottom: 1px solid #e2e8f0; }
.agv3-tl-corner { flex: 0 0 var(--tl-who); position: sticky; left: 0; z-index: 4; display: flex; align-items: flex-end; gap: 6px; padding: 10px 16px; background: #ffffff; border-right: 1px solid #eef2f7; font-size: 0.66rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: #94a3b8; }
.agv3-tl-corner b { color: #64748b; }
.agv3-tl-scale { flex: 1; display: grid; grid-template-columns: repeat(var(--tl-cols), minmax(0, 1fr)); }
.agv3-tl-hour { padding: 12px 8px 8px; border-left: 1px solid #eef2f7; font-size: 0.7rem; font-weight: 700; color: #94a3b8; }
.agv3-tl-col { padding: 8px 10px; border-left: 1px solid #eef2f7; }
.agv3-tl-row { display: flex; border-bottom: 1px solid #eef2f7; }
.agv3-tl-row:last-child { border-bottom: 0; }
.agv3-tl-who { flex: 0 0 var(--tl-who); position: sticky; left: 0; z-index: 2; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 16px; background: #ffffff; border-right: 1px solid #eef2f7; }
.agv3-tl-who > span { min-width: 0; }
.agv3-tl-who b { display: block; font-size: 0.84rem; font-weight: 700; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agv3-tl-who small { display: block; font-size: 0.7rem; font-weight: 600; color: #94a3b8; }
.agv3-tl-allday { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; }
.agv3-tl-allday:empty { display: none; }
.agv3-tl-allday .agv3-tl-ev.is-allday { height: 20px; }
.agv3-tl-who .consulente-avatar-v3 { width: 32px; height: 32px; font-size: 0.66rem; display: inline-flex; align-items: center; justify-content: center; }
/* Giorno: righe delle ore sullo sfondo, clic su uno spazio libero = nuovo evento */
.agv3-tl-track { flex: 1; position: relative; min-height: 62px; cursor: cell; background: linear-gradient(to right, #eef2f7 1px, transparent 1px) 0 0 / calc(100% / var(--tl-cols)) 100%; transition: background-color 0.15s ease; }
.agv3-tl-track:hover { background-color: color-mix(in srgb, var(--primary, #6366f1) 3%, #ffffff); }
.agv3-tl-track.is-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: none; }
.agv3-tl-cell { display: flex; flex-direction: column; gap: 4px; min-width: 0; min-height: 62px; padding: 6px; border-left: 1px solid #eef2f7; }
.agv3-tl-cell:hover { background: color-mix(in srgb, var(--primary, #6366f1) 3%, #ffffff); }
.agv3-tl-cell.agv3-picked { background: color-mix(in srgb, var(--primary, #6366f1) 5%, #ffffff); }
.agv3-tl-col.agv3-picked .agv3-dh-num { display: inline-block; padding: 0 8px; border-radius: 999px; background: var(--primary, #6366f1); color: #ffffff; }
.agv3-tl-col.agv3-picked .agv3-dh-name { color: var(--primary, #6366f1); }
/* Le card sono quelle dell'agenda personale: qui solo la posizione (Giorno) o il flusso (Settimana) */
.agv3-tl-ev { position: absolute; z-index: 1; display: block; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.agv3-tl-ev.is-flow { position: relative; width: 100%; height: 52px; } /* 52px: titolo e riga dell'orario */
.agv3-tl-ev.is-flow.is-allday { height: 24px; }
.agv3-tl-ev > .agv3-ev, .agv3-tl-ev > .agv3-allday { height: 100%; }
.agv3-tl-ev:hover > .agv3-ev { box-shadow: 0 6px 16px color-mix(in srgb, var(--ev) 22%, transparent); }
.agv3-tl-ev:focus-visible { outline: 2px solid var(--primary, #6366f1); outline-offset: 1px; border-radius: 10px; }
.agv3-tl-more { position: relative; align-self: flex-start; padding: 2px 6px; border-radius: 6px; font-size: 0.72rem; font-weight: 800; color: var(--primary, #6366f1); }
.agv3-tl-more:hover { background: color-mix(in srgb, var(--primary, #6366f1) 8%, #ffffff); }
.agv3-tl-now { position: absolute; top: 0; bottom: 0; z-index: 2; width: 2px; margin-left: -1px; background: var(--primary, #6366f1); pointer-events: none; }
.agv3-tl-skel { display: block; height: 40px; border-radius: 10px; background: linear-gradient(90deg, #eef2f7 25%, #f6f8fb 50%, #eef2f7 75%); background-size: 200% 100%; animation: dt-skel-shimmer 1.3s ease-in-out infinite; }
.agv3-tl-skel.is-day { position: absolute; top: 11px; left: 8%; width: 26%; }
.agv3-tl-err { display: flex; align-items: center; gap: 6px; grid-column: 1 / -1; height: 100%; min-height: 62px; padding: 0 16px; font-size: 0.76rem; font-weight: 600; color: #b91c1c; }
@media (max-width: 991px) {
    .agv3-tl { --tl-who: 150px; }
    .agv3-team-people { flex-direction: row; flex-wrap: wrap; }
    .agv3-tp { width: auto; }
}
@media (prefers-reduced-motion: reduce) { .agv3-tl-skel { animation: none; } }
/* Sale riunioni (DESIGN.md §29g): icona della sala col suo colore al posto della foto */
.agv3-tl-link { display: flex; align-items: center; gap: 6px; min-width: 0; color: inherit; text-decoration: none; }
.agv3-tl-link b { min-width: 0; }
.agv3-tl-link i { flex: 0 0 auto; font-size: 0.66rem; color: #94a3b8; opacity: 0; transform: translateX(-3px); transition: opacity 0.15s ease, transform 0.15s ease; }
.agv3-tl-link:hover b, .agv3-tl-link:focus-visible b { color: var(--primary, #6366f1); text-decoration: underline; }
.agv3-tl-link:hover i, .agv3-tl-link:focus-visible i { opacity: 1; transform: none; color: var(--primary, #6366f1); }
@media (hover: none) { .agv3-tl-link i { opacity: 1; transform: none; } }
.agv3-room-name { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: 0.86rem; color: #0f172a; }
.agv3-room-name b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 767px) { .agv3-room-name b { display: none; } }
.agv3-room-ico { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 10px; font-size: 0.8rem; color: var(--room, var(--primary, #6366f1)); background: color-mix(in srgb, var(--room, var(--primary, #6366f1)) 14%, #ffffff); }
/* Pulsante "Sale" (sale e calendari condivisi della sidebar): sedi a fisarmonica con le loro sale dentro */
.agv3-top { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-bottom: 12px; }
@media (max-width: 767px) { .agv3-top { justify-content: space-between; margin-bottom: 10px; } } /* telefono: riga sotto il titolo */
.agv3-rooms-btn { display: inline-flex; align-items: center; gap: 6px; }
.agv3-rooms-menu .agv3-room-ico { width: 30px; height: 30px; }
.agv3-rooms-group > summary { list-style: none; cursor: pointer; }
.agv3-rooms-group > summary::-webkit-details-marker { display: none; }
.dropdown-menu.agv3-who-menu .agv3-rooms-group > summary:hover { background: #f8fafc; }
.agv3-rooms-group > summary .agv3-who-caret { margin-left: auto; transition: transform 0.2s ease; }
.agv3-rooms-group[open] > summary .agv3-who-caret { transform: rotate(180deg); }
.dropdown-menu.agv3-who-menu .agv3-rooms-group > a.agv3-who-item { padding-left: 26px; }

/* ── Agenda personale su telefono (DESIGN.md §29c): come un'app. Titolo col mese che apre il mini
   calendario, striscia della settimana, vista Giorno con swipe, dettaglio in un foglio dal basso,
   "+ Nuovo evento" nel pulsante centrale della barra in basso. Tutto il resto è quello di §29. */
.agv3-mtitle, .agv3-strip, .agv3-mhost { display: none; }
@media (max-width: 767px) {
    .agv3:not(.agv3-is-team) > .agv3-today { display: none; }
    /* Un solo scroll, come un'app: il pannello è alto quanto lo schermo fino alla barra in basso
       (--agv3-mh, MYB.AgendaV3 fitPhone), testata e striscia ferme, scorre solo la giornata */
    .agv3 .agv3-main { display: flex; flex-direction: column; height: var(--agv3-mh, auto); overflow: hidden; padding: 14px 12px 0; border-radius: 22px; }
    .agv3-head { flex: 0 0 auto; }
    .agv3 .agv3-cal { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 0 -12px; padding: 0 12px 12px; -webkit-overflow-scrolling: touch; }
    .agv3-is-team .agv3-tl { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; margin: 0 -12px; }
    .agv3 .agv3-bar { flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
    .agv3 .agv3-mtitle { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 2px 4px; border: 0; background: transparent; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
    .agv3-mtitle small { font-size: 0.78rem; font-weight: 600; color: #64748b; }
    .agv3-mtitle b { display: inline-flex; align-items: center; gap: 6px; font-size: 1.35rem; font-weight: 800; color: #0f172a; letter-spacing: -0.01em; }
    .agv3-mtitle b i { font-size: 0.7rem; color: #94a3b8; transition: transform 0.2s ease; }
    .agv3-main.show-mini .agv3-mtitle b i { transform: rotate(180deg); }
    /* Barra: a destra solo "Oggi" e la foto della persona; frecce e periodo in parole li fanno striscia e swipe */
    .agv3 .agv3-nav { order: 2; margin-left: auto; }
    .agv3 .agv3-nav-btn, .agv3 .agv3-range { display: none; }
    .agv3 .agv3-tools { order: 3; width: 100%; flex-wrap: nowrap; }
    .agv3-top .agv3-who-btn .agv3-who-name, .agv3-top .agv3-who-btn .agv3-who-caret { display: none; }
    .agv3-top .agv3-who-btn { padding: 3px; }
    .agv3 .agv3-tools .acc-expand-link { display: none; } /* Daily Report: nel pulsante centrale */
    .agv3-is-team .agv3-views { display: none; } /* unificate sul telefono: solo Giorno */
    .agv3-is-team .agv3-tools { order: 3; width: auto; } /* senza viste: il pulsante accanto a "Oggi" */
    .agv3:not(.agv3-is-team) .agv3-views [data-agv3-view="timeGridWeek"] { display: none; }
    /* Mini calendario sotto il titolo, si apre toccando il mese */
    .agv3 .agv3-mhost { display: block; }
    .agv3-mhost .agv3-mini { display: none; margin: 0 0 12px; padding: 10px 6px; border: 1px solid #eef2f7; border-radius: 16px; background: #ffffff; }
    .agv3-main.show-mini .agv3-mhost .agv3-mini { display: block; animation: agv3-drop 0.2s ease; }
    /* Striscia della settimana: giorni tondi, scelto pieno, oggi con l'anello, puntino se occupato */
    .agv3 .agv3-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 0 -2px 12px; touch-action: pan-y; }
    .agv3-strip-day { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0; border: 0; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; }
    .agv3-strip-day span { font-size: 0.68rem; font-weight: 700; color: #94a3b8; text-transform: capitalize; }
    .agv3-strip-day b { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; font-size: 1rem; font-weight: 800; color: #0f172a; background: #ffffff; border: 1px solid #eef2f7; transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease; }
    .agv3-strip-day:active b { transform: scale(0.92); }
    .agv3-strip-day.is-today b { color: var(--primary, #6366f1); border: 2px solid color-mix(in srgb, var(--primary, #6366f1) 45%, #ffffff); }
    .agv3-strip-day.is-selected b { color: #ffffff; background: var(--primary, #6366f1); border-color: var(--primary, #6366f1); box-shadow: 0 6px 14px color-mix(in srgb, var(--primary, #6366f1) 30%, transparent); }
    .agv3-strip-day.is-selected span { color: var(--primary, #6366f1); }
    .agv3-strip-day.is-busy b::after { content: ''; position: absolute; top: 1px; right: 1px; width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; border: 2px solid #ffffff; }
    /* Striscia e swipe fanno da intestazione: nella vista Giorno niente riga del giorno */
    .agv3:not(.agv3-is-team) .fc-timeGridDay-view .fc-head { display: none; }
    .agv3:not(.agv3-is-team) .agv3-cal .fc-time-grid .fc-slats td { height: var(--agv3-mslot, 44px); } /* pizzico: MYB.AgendaV3 pinchHours */
    .agv3:not(.agv3-is-team) .agv3-cal .fc-axis { width: 44px !important; font-size: 0.7rem; }
    .agv3:not(.agv3-is-team) .agv3-cal .fc-day-grid .fc-axis span { display: none; } /* "Tutto il giorno" non ci sta */
    .agv3:not(.agv3-is-team) .agv3-cal { touch-action: pan-y; }
    /* Mese: la striscia non serve, giorni come in un'app (numero e puntini) */
    .agv3-main[data-view="dayGridMonth"] .agv3-strip { display: none !important; }
    .agv3:not(.agv3-is-team) .fc-dayGrid-view .fc-day-top { text-align: center; padding-top: 6px; }
    .agv3:not(.agv3-is-team) .fc-dayGrid-view .fc-day-top .fc-day-number { float: none; display: inline-block; font-weight: 700; }
    .agv3:not(.agv3-is-team) .fc-dayGrid-view .fc-row { min-height: 56px; }
    .agv3-mdots { display: flex; justify-content: center; gap: 3px; margin-top: 3px; }
    .agv3-mdots i { width: 5px; height: 5px; border-radius: 50%; background: var(--primary, #6366f1); }
    
    /* Dettaglio nel foglio dal basso: il contenuto è quello del popover */
    .agv3-dsheet .myb-sheet { padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); }
    .agv3-dsheet .myb-sheet__handle { margin: 0 auto 6px; }
    .agv3-dsheet .agv3-pop { border-radius: 0; box-shadow: none; }
    .agv3-dsheet .agv3-pop-actions { position: sticky; bottom: 0; }
    .agv3-dsheet .agv3-cl-back { margin: 0 16px 6px; }
}
/* Telefono, tutte le pagine v3: il banner della nuova versione diventa un piccolo link a destra */
@media (max-width: 767px) {
    .v3-version-banner { justify-content: flex-end; margin-bottom: 0.5rem !important; padding: 0 !important; border: 0 !important; background: transparent !important; }
    .v3-version-banner > span { display: none; }
    .v3-version-banner .v3-version-link { padding: 0.2rem 0.6rem; border-width: 1px; font-size: 0.72rem; background: rgba(255, 255, 255, 0.7); }
    .v3-version-banner .v3-version-link { font-size: 0; }
    .v3-version-banner .v3-version-link i { font-size: 0.72rem; }
    .v3-version-banner .v3-version-link::after { content: 'Versione precedente'; font-size: 0.72rem; }
}
/* Bozza di un nuovo evento sul telefono (MYB.AgendaV3 showGhost) */
.agv3-ghost { position: absolute; right: 4px; z-index: 5; display: flex; align-items: center; gap: 6px; padding: 0 10px; border: 1.5px solid var(--primary, #6366f1); border-radius: 10px; background: color-mix(in srgb, var(--primary, #6366f1) 12%, #ffffff); color: var(--primary, #6366f1); font-size: 0.8rem; font-weight: 800; box-shadow: 0 6px 16px color-mix(in srgb, var(--primary, #6366f1) 22%, transparent); animation: agv3-ghost-in 0.16s ease-out; cursor: pointer; }
@keyframes agv3-ghost-in { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes agv3-drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .agv3-main.show-mini .agv3-mhost .agv3-mini { animation: none; } }
/* Agende unificate sul telefono (§29b): testata come l'agenda personale, colleghi in una riga di chip
   che scorre (con la ricerca), colonna dei nomi stretta (foto e nome), solo Giorno */
@media (max-width: 767px) {
    .agv3-is-team > .agv3-team-side { padding: 12px 12px 8px; }
    .agv3-is-team .agv3-team-side .agv3-today-head { margin-bottom: 8px; }
    .agv3-is-team .agv3-team-side .agv3-today-date, .agv3-is-team .agv3-team-side #agv3New, .agv3-is-team .agv3-team-side .agv3-mini-toggle { display: none; }
    .agv3-is-team .agv3-team-side .agv3-today-links:not(:has(#agv3TeamAll:not([hidden]))) { display: none; }
    .agv3-is-team .agv3-team-people { flex-direction: row; flex-wrap: nowrap; gap: 6px; max-height: none; overflow-x: auto; overflow-y: hidden; margin: 0 -12px 4px; padding: 2px 12px 6px; scroll-snap-type: x proximity; scrollbar-width: none; }
    .agv3-is-team .agv3-team-people::-webkit-scrollbar { display: none; }
    .agv3-is-team .agv3-tp { flex: 0 0 auto; width: auto; padding: 5px 10px 5px 5px; border: 1px solid #e2e8f0; border-radius: 999px; background: #ffffff; scroll-snap-align: start; }
    .agv3-is-team .agv3-tp.is-on { border-color: color-mix(in srgb, var(--primary, #6366f1) 40%, #ffffff); background: color-mix(in srgb, var(--primary, #6366f1) 7%, #ffffff); }
    .agv3-is-team .agv3-tp-check { display: none; }
    .agv3-is-team .agv3-tp-name { font-size: 0.78rem; }
    .agv3-is-team .agv3-tp-name small { display: none; }
    .agv3-tl { --tl-who: 76px; margin: 0 -12px -16px; }
    .agv3-tl-corner { padding: 8px 6px; font-size: 0; }
    .agv3-tl-corner b { font-size: 0.66rem; }
    .agv3-tl-who { flex-direction: column; justify-content: center; gap: 4px; padding: 8px 4px; text-align: center; }
    .agv3-tl-who > span { width: 100%; }
    .agv3-tl-who b { font-size: 0.68rem; }
    .agv3-tl-who small { display: none; }
    .agv3-tl-allday .agv3-tl-ev.is-allday { height: 18px; }
    .agv3-tl-hour { padding: 10px 6px 6px; }
}

/* ── Centro notifiche (DESIGN.md §30): pannello laterale su desktop, foglio dal basso sul telefono,
   voci da app raggruppate per giorno; archivia con lo swipe (telefono) o col pulsante (desktop) */
.modal.notif-v3 { z-index: 10000 !important; }
body.modal-open-notif { overflow: hidden !important; }
.modal.notif-v3 .notif-v3-dialog { position: fixed; top: 12px; right: 12px; bottom: 12px; width: 420px; max-width: calc(100vw - 24px); margin: 0; transform: translateX(30px); transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1); }
.modal.notif-v3.show .notif-v3-dialog { transform: none; }
.modal.notif-v3 .notif-v3-panel { display: flex; flex-direction: column; height: 100%; overflow: hidden; border: 1px solid rgba(15, 23, 42, 0.08); border-radius: 22px; background: #ffffff; box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18); }
.notif-v3-handle { display: none; }
.notif-v3-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 16px 8px 20px; }
.notif-v3-title { display: flex; align-items: center; gap: 8px; }
.notif-v3-title h5 { margin: 0; font-size: 1.15rem; font-weight: 800; color: #0f172a; }
.notif-v3-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--primary, #6366f1); color: #ffffff; font-size: 0.72rem; font-weight: 800; }
.notif-v3-head-actions { display: flex; gap: 6px; }
.notif-v3-iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #f1f5f9; color: #475569 !important; font-size: 0.85rem; cursor: pointer; text-decoration: none !important; }
.notif-v3-iconbtn:hover { background: #e2e8f0; }
.notif-v3-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 16px 12px 20px; border-bottom: 1px solid #eef2f7; }
.notif-v3-seg { display: inline-flex; padding: 3px; border-radius: 12px; background: #f1f5f9; }
.notif-v3-seg button { padding: 6px 12px; border: 0; border-radius: 9px; background: transparent; font-size: 0.8rem; font-weight: 700; color: #64748b; cursor: pointer; }
.notif-v3-seg button.is-active { background: #ffffff; color: #0f172a; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12); }
.notif-v3-readall { display: inline-flex; align-items: center; gap: 6px; padding: 6px 4px; border: 0; background: none; font-size: 0.78rem; font-weight: 700; color: var(--primary, #6366f1); cursor: pointer; }
.notif-v3-readall:disabled { opacity: 0.4; cursor: default; }
.notif-v3-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 0 14px; }
.notif-v3-day { position: sticky; top: 0; z-index: 2; padding: 12px 20px 6px; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #94a3b8; background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.notif-v3-swipe { position: relative; max-height: 400px; overflow: hidden; }
.notif-v3-swipe.is-leaving { max-height: 0; opacity: 0; transition: max-height 0.22s ease, opacity 0.22s ease; }
.notif-v3-swipe-bg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding-right: 22px; background: #64748b; color: #ffffff; font-size: 0.82rem; font-weight: 700; transition: background 0.15s ease; }
.notif-v3-swipe.is-armed .notif-v3-swipe-bg { background: #dc2626; }
.notif-v3-item { position: relative; z-index: 1; display: flex; gap: 12px; padding: 12px 20px; background: #ffffff; cursor: pointer; transition: background 0.15s ease; -webkit-tap-highlight-color: transparent; }
.notif-v3-item:hover { background: #f8fafc; }
.notif-v3-item:focus-visible { outline: 2px solid var(--primary, #6366f1); outline-offset: -2px; }
.notif-v3-item.is-unread { background: color-mix(in srgb, var(--primary, #6366f1) 4%, #ffffff); }
.notif-v3-ico { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 12px; font-size: 0.9rem; }
.notif-v3-ico.is-primary { color: var(--primary, #6366f1); background: color-mix(in srgb, var(--primary, #6366f1) 12%, #ffffff); }
.notif-v3-ico.is-warning { color: #d97706; background: #fef3c7; }
.notif-v3-ico.is-danger { color: #dc2626; background: #fee2e2; }
.notif-v3-ico.is-success { color: #16a34a; background: #dcfce7; }
.notif-v3-ico.is-sky { color: #0284c7; background: #e0f2fe; }
.notif-v3-ico.is-slate { color: #64748b; background: #f1f5f9; }
.notif-v3-body { flex: 1; min-width: 0; padding-right: 30px; }
.notif-v3-row { display: flex; align-items: baseline; gap: 6px; margin-bottom: 2px; }
.notif-v3-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.88rem; font-weight: 600; color: #0f172a; }
.notif-v3-item.is-unread .notif-v3-name { font-weight: 800; }
.notif-v3-id { flex: 0 0 auto; padding: 1px 6px; border-radius: 6px; background: #f1f5f9; font-size: 0.66rem; font-weight: 700; color: #64748b; }
.notif-v3-time { flex: 0 0 auto; margin-left: auto; font-size: 0.72rem; color: #94a3b8; }
.notif-v3-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.78rem; line-height: 1.45; color: #475569; }
.notif-v3-meta span { margin-right: 4px; color: #94a3b8; }
.notif-v3-archive { position: absolute; top: 50%; right: 14px; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid #e2e8f0; border-radius: 50%; background: #ffffff; color: #64748b; font-size: 0.78rem; opacity: 0; transform: translateY(-50%); transition: opacity 0.15s ease; cursor: pointer; }
.notif-v3-item:hover .notif-v3-archive, .notif-v3-archive:focus-visible { opacity: 1; }
.notif-v3-archive:hover { color: #dc2626; border-color: #fecaca; }
.notif-v3-dot { position: absolute; top: 18px; left: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--primary, #6366f1); }
.notif-v3-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 56px 24px; text-align: center; font-size: 0.84rem; color: #64748b; }
.notif-v3-empty i { margin-bottom: 8px; font-size: 2rem; color: #cbd5e1; }
.notif-v3-empty b { font-size: 0.95rem; color: #0f172a; }
.notif-v3-empty.is-error i { color: #fca5a5; }
.notif-v3-skel { height: 62px; margin: 12px 20px; border-radius: 14px; background: linear-gradient(90deg, #eef2f7 25%, #f6f8fb 50%, #eef2f7 75%); background-size: 200% 100%; animation: dt-skel-shimmer 1.3s ease-in-out infinite; }
.notif-v3-more { display: flex; justify-content: center; padding: 14px; }
.notif-v3-spin { width: 20px; height: 20px; border: 2px solid #e2e8f0; border-top-color: var(--primary, #6366f1); border-radius: 50%; animation: notif-v3-spin 0.8s linear infinite; }
@keyframes notif-v3-spin { to { transform: rotate(360deg); } }
.notif-v3-undo { margin-left: 6px; font-weight: 800; color: #ffffff !important; text-decoration: underline !important; }
@media (max-width: 767px) {
    .modal.notif-v3 .notif-v3-dialog { top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-width: none; height: 88vh; height: 88dvh; transform: translateY(100%); }
    .modal.notif-v3.show .notif-v3-dialog { transform: none; }
    .modal.notif-v3 .notif-v3-panel { border: 0; border-radius: 22px 22px 0 0; }
    .notif-v3-handle { display: block; width: 38px; height: 5px; margin: 8px auto 0; border-radius: 3px; background: rgba(0, 0, 0, 0.15); }
    .notif-v3-head { padding-top: 8px; }
    .notif-v3-archive { display: none; } /* sul telefono si archivia con lo swipe */
    .notif-v3-body { padding-right: 0; }
    .notif-v3-list { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
}
/* Desktop: scheda che si apre dalla campanella (--notif-top/right/caret da notifAnchor), pagina appena velata */
@media (min-width: 768px) {
    .modal.notif-v3 .notif-v3-dialog { top: var(--notif-top, 72px); right: var(--notif-right, 16px); bottom: auto; width: 420px; height: auto; display: flex; opacity: 0; transform: translateY(-6px) scale(0.97); transform-origin: calc(100% - var(--notif-caret, 20px)) 0; transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.15s ease; }
    .modal.notif-v3.show .notif-v3-dialog { opacity: 1; transform: none; }
    .modal.notif-v3 .notif-v3-dialog::before { content: ''; position: absolute; top: -7px; right: var(--notif-caret, 20px); width: 14px; height: 14px; border-top: 1px solid rgba(15, 23, 42, 0.08); border-left: 1px solid rgba(15, 23, 42, 0.08); border-radius: 3px 0 0 0; background: #ffffff; transform: rotate(45deg); }
    .modal.notif-v3 .notif-v3-panel { height: auto; max-height: min(680px, calc(100vh - var(--notif-top, 72px) - 16px)); width: 100%; border-radius: 24px; box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2), 0 2px 8px rgba(15, 23, 42, 0.06); }
    body.modal-open-notif .modal-backdrop.show { opacity: 0.3; }
}
@media (prefers-reduced-motion: reduce) { .notif-v3-skel, .notif-v3-spin { animation: none; } .modal.notif-v3 .notif-v3-dialog { transition: none; } }
/* In modalità app le modali generiche hanno maniglia propria (::before), angoli e scorrimento sul
   contenitore: il pannello notifiche ha la sua maniglia e scorre solo l'elenco */
html.myb-app #notifModal.modal > .modal-dialog > .modal-content { overflow: hidden !important; padding-bottom: 0; }
html.myb-app #notifModal .modal-content::before { display: none !important; }
@media (min-width: 768px) { html.myb-app #notifModal.modal > .modal-dialog > .modal-content { border-radius: 24px !important; } }
@media (max-width: 767px) { html.myb-app #notifModal.modal > .modal-dialog > .modal-content { border-radius: 22px 22px 0 0 !important; } }

/* Pagina del Centro Notifiche: stessi tipi e colori del pannello; le lette sbiadite, le da leggere piene */
.notif-row-v3 { display: flex; align-items: center; gap: 12px; min-width: 0; }
.notif-row-v3 .notif-v3-ico { flex: 0 0 38px; }
.acc-item-v3.monday-style.is-read, .acc-item-v3.monday-style.is-read[class*="status-border-"]:not(.status-border-default) { background: #ffffff !important; }
.acc-item-v3.is-read > .acc-header-v3 { opacity: 0.55; transition: opacity 0.15s ease; }
.acc-item-v3.is-read:hover > .acc-header-v3, .acc-item-v3.is-read.is-open > .acc-header-v3 { opacity: 0.9; }

/* ── Modulo evento v3 (DESIGN.md §29d): pannello centrale su desktop, schermo intero sul telefono.
   Il contenitore resta .mailbox-item (la pagina lo apre e chiude con .show), qui cambia solo l'aspetto */
.mailbox-item.evf { position: fixed; top: 50%; left: 50%; right: auto; bottom: auto; z-index: 1060; display: flex; width: 580px; max-width: calc(100vw - 32px); height: auto; max-height: calc(100vh - 48px); margin: 0; padding: 0; overflow: hidden; border-radius: 24px; background: #ffffff; box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28); opacity: 0; visibility: hidden; pointer-events: none; transform: translate(-50%, -47%) scale(0.98); transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.22s; }
.mailbox-item.evf.show { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, -50%); transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1); }
.mailbox-item.evf + .mailbox-item-overlay { z-index: 1055; background: rgba(15, 23, 42, 0.35); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.evf-form { display: flex; flex-direction: column; width: 100%; min-height: 0; margin: 0; }
.evf-head { display: flex; align-items: center; gap: 10px; padding: 16px 16px 4px 24px; }
.evf-title { order: 1; flex: 1; margin: 0; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #94a3b8; }
.evf-head .close-modal { order: 2; }
.evf-iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #f1f5f9; color: #475569; cursor: pointer; }
.evf-iconbtn:hover { background: #e2e8f0; }
.evf-save-top { display: none; }
.evf-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 24px 12px; }
.evf-name { width: 100%; margin: 2px 0 10px; padding: 8px 0; border: 0; border-bottom: 2px solid #e2e8f0; background: transparent; font-size: 1.4rem; font-weight: 800; color: #0f172a; outline: none; transition: border-color 0.15s ease; }
.evf-name::placeholder { color: #cbd5e1; font-weight: 700; }
.evf-name:focus { border-bottom-color: var(--primary, #6366f1); }
.evf-row { display: flex; gap: 14px; padding: 12px 0; border-top: 1px solid #f1f5f9; }
.evf-row[hidden] { display: none; }
.evf-ico { flex: 0 0 20px; margin-top: 11px; font-size: 0.95rem; text-align: center; color: #94a3b8; }
.evf-field { flex: 1; min-width: 0; }
.evf-label { display: flex; align-items: center; justify-content: space-between; margin: 0 0 6px; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: #94a3b8; }
.evf-textbtn { padding: 0; border: 0; background: none; font-size: 0.72rem; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--primary, #6366f1); cursor: pointer; }
.evf-input { height: 42px; padding: 0 12px; border: 1px solid #e2e8f0; border-radius: 12px; background: #f8fafc; font-size: 0.92rem; font-weight: 600; color: #0f172a; outline: none; transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease; }
.evf-input:focus { border-color: var(--primary, #6366f1); background: #ffffff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #6366f1) 15%, transparent); }
.evf-when { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.evf-date { flex: 1 1 160px; min-width: 0; }
.evf-time { flex: 0 0 108px; }
.evf-arrow { color: #94a3b8; font-weight: 700; }
.evf-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.evf-chips button { padding: 5px 11px; border: 1px solid #e2e8f0; border-radius: 999px; background: #ffffff; font-size: 0.76rem; font-weight: 700; color: #475569; cursor: pointer; transition: all 0.15s ease; }
.evf-chips button:hover { border-color: color-mix(in srgb, var(--primary, #6366f1) 40%, #ffffff); }
.evf-chips button.is-active { border-color: var(--primary, #6366f1); background: color-mix(in srgb, var(--primary, #6366f1) 10%, #ffffff); color: var(--primary, #6366f1); }
.evf-notes { width: 100%; height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; line-height: 1.45; font-weight: 500; }
.evf .tox-tinymce { border: 1px solid #e2e8f0 !important; border-radius: 12px !important; }
/* select2 dentro il modulo: stesso campo arrotondato */
.evf .select2-container--default .select2-selection--single, .evf .select2-container--default .select2-selection--multiple { min-height: 42px; border: 1px solid #e2e8f0 !important; border-radius: 12px !important; background: #f8fafc !important; }
.evf .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 40px; padding-left: 12px; font-weight: 600; color: #0f172a; }
.evf .select2-container--default .select2-selection--single .select2-selection__arrow { height: 40px; }
.evf .select2-container--default.select2-container--focus .select2-selection--multiple, .evf .select2-container--default.select2-container--open .select2-selection--single { border-color: var(--primary, #6366f1) !important; background: #ffffff !important; }
.evf .select2-container--default .select2-selection--multiple .select2-selection__choice { margin-top: 6px; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--primary, #6366f1) 10%, #ffffff); color: color-mix(in srgb, var(--primary, #6366f1) 80%, #0f172a); font-size: 0.78rem; font-weight: 700; }
/* Interruttore Privato */
.evf-row-switch { align-items: center; }
.evf-row-switch .evf-ico { margin-top: 0; }
.evf-switch { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; cursor: pointer; }
.evf-switch span { display: flex; flex-direction: column; }
.evf-switch b { font-size: 0.9rem; color: #0f172a; }
.evf-switch small { font-size: 0.74rem; color: #94a3b8; }
.evf-switch input { position: absolute; opacity: 0; pointer-events: none; }
.evf-switch-ui { position: relative; flex: 0 0 42px; height: 24px; border-radius: 999px; background: #e2e8f0; transition: background 0.15s ease; }
.evf-switch-ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #ffffff; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25); transition: transform 0.15s ease; }
.evf-switch input:checked + .evf-switch-ui { background: var(--primary, #6366f1); }
.evf-switch input:checked + .evf-switch-ui::after { transform: translateX(18px); }
.evf-switch input:focus-visible + .evf-switch-ui { outline: 2px solid var(--primary, #6366f1); outline-offset: 2px; }
.evf-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px; border-top: 1px solid #eef2f7; background: #f8fafc; }
.evf-cancel { padding: 10px 18px; border: 1px solid #e2e8f0; border-radius: 12px; background: #ffffff; font-size: 0.88rem; font-weight: 700; color: #475569; cursor: pointer; }
.evf-cancel:hover { background: #f1f5f9; }
.evf-save { padding: 10px 22px; border: 0; border-radius: 12px; background: var(--primary, #6366f1); font-size: 0.88rem; font-weight: 800; color: #ffffff; cursor: pointer; box-shadow: 0 8px 18px color-mix(in srgb, var(--primary, #6366f1) 30%, transparent); }
.evf-save:hover { filter: brightness(1.08); }
/* Telefono: schermo intero dal basso, come Google Calendar (✕ a sinistra, Salva a destra) */
@media (max-width: 767px) {
    .mailbox-item.evf { top: 0; left: 0; width: 100%; max-width: none; height: 100%; max-height: none; border-radius: 0; transform: translateY(100%); }
    .mailbox-item.evf.show { transform: none; }
    .evf-head { padding: calc(10px + env(safe-area-inset-top)) 12px 6px; border-bottom: 1px solid #f1f5f9; }
    .evf-head .close-modal { order: 0; }
    .evf-title { text-align: center; font-size: 0.95rem; letter-spacing: 0; text-transform: none; color: #0f172a; }
    .evf-save-top { order: 3; display: inline-flex; align-items: center; padding: 8px 16px; border: 0; border-radius: 999px; background: var(--primary, #6366f1); font-size: 0.85rem; font-weight: 800; color: #ffffff; }
    .evf-body { padding: 8px 16px calc(20px + env(safe-area-inset-bottom)); }
    .evf-foot { display: none; }
    .evf-date { flex-basis: 100%; }
    .evf-time { flex: 1 1 0; }
}
/* Le tendine di select2 (Categoria, Collega a, record, Partecipanti) si aprono in fondo alla pagina con
   z-index 1051: col modulo aperto (1060) restavano sotto e la tendina sembrava bloccata */
body.mailbox-item-show .select2-container--open { z-index: 1075 !important; }
body.mailbox-item-show .select2-container--open .select2-dropdown { z-index: 1075 !important; }
/* Campi facoltativi: su desktop sempre aperti; sul telefono righe chiuse con il riassunto a destra */
.evf-opt-toggle { display: none; }
@media (max-width: 767px) {
    .evf-opt .evf-ico { margin-top: 13px; }
    .evf-chips { flex-wrap: nowrap; overflow-x: auto; margin-right: -16px; padding-right: 16px; scrollbar-width: none; }
    .evf-chips::-webkit-scrollbar { display: none; }
    .evf-chips button { flex: 0 0 auto; }
    .evf-opt-toggle { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
    .evf-opt-label { flex: 0 0 auto; font-size: 0.95rem; font-weight: 700; color: #0f172a; }
    .evf-opt-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; font-size: 0.85rem; color: #94a3b8; }
    .evf-opt-value.is-set { color: var(--primary, #6366f1); font-weight: 700; }
    .evf-opt-caret { flex: 0 0 auto; font-size: 0.72rem; color: #94a3b8; transition: transform 0.2s ease; }
    .evf-opt.is-open .evf-opt-caret { transform: rotate(180deg); }
    .evf-opt-body { display: none; padding: 6px 0 4px; }
    .evf-opt.is-open .evf-opt-body { display: block; animation: agv3-drop 0.18s ease; }
    .evf-opt .evf-opt-body > .evf-label:first-child { display: none; } /* l'etichetta è già nella riga */
    .evf-opt .evf-opt-body > .evf-label .evf-textbtn { display: none; }
}
@media (prefers-reduced-motion: reduce) { .mailbox-item.evf, .mailbox-item.evf.show { transition: none; } }

/* Fissa in calendario dalla richiesta (v3, views/richieste__manage.php, DESIGN.md §29f): campi del
   modulo evento a sinistra, agenda v3 del consulente (MYB.AgendaV3 incorporata) a destra in un
   riquadro compatto che scorre da sé; sul telefono prima i campi, poi la giornata con la striscia */
.bks-v3 { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 24px; align-items: start; }
.bks-v3:not(:has(.bks-v3-cal)) { grid-template-columns: minmax(0, 480px); }
.bks-v3-first { border-top: 0; padding-top: 0; }
.bks-v3 .evf-date { flex-basis: 100%; }
.bks-v3 .evf-time { flex: 1 1 0; }
.bks-v3-save { width: 100%; margin-top: 16px; }
.bks-v3-save:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; filter: none; }
.bks-v3-hint { margin: 8px 0 0; font-size: 0.78rem; color: #64748b; }
.bks-ag-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.bks-ag-range { flex: 1; min-width: 0; margin: 0 4px; overflow: hidden; font-size: 0.95rem; font-weight: 800; color: #0f172a; white-space: nowrap; text-overflow: ellipsis; }
.bks-ag-cal { max-height: 440px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid #eef2f7; border-radius: 16px; background: #ffffff; }
.bks-ag-cal .fc-head { position: sticky; top: 0; z-index: 4; background: #ffffff; }
.bks-ag-cal .fc-highlight { opacity: 1; border-radius: 8px; background: color-mix(in srgb, var(--primary, #6366f1) 16%, transparent); box-shadow: inset 0 0 0 2px var(--primary, #6366f1); }
/* Suggerimento di Klaila: simbolo K del marchio ed etichetta col suo gradiente, in piccolo; fondo appena tinto, bordo sfumato, un riflesso che passa una volta quando compare */
.bks-ai { position: relative; display: flex; align-items: center; gap: 10px; margin: 0 0 10px; padding: 9px 10px; overflow: hidden; border: 1px solid transparent; border-radius: 14px; font-size: 0.8rem; line-height: 1.4; color: #475569;
    background: linear-gradient(100deg, rgba(3, 126, 243, 0.05), rgba(197, 42, 146, 0.05) 55%, rgba(228, 128, 60, 0.05)) padding-box, linear-gradient(#ffffff, #ffffff) padding-box, var(--claila-border-gradient) border-box; }
.bks-ai::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.75) 50%, transparent 70%); transform: translateX(-100%); animation: bks-ai-sheen 1.4s ease 0.3s 1; pointer-events: none; }
@keyframes bks-ai-sheen { to { transform: translateX(100%); } }
.evf-field .bks-ai { margin: 12px 0 0; }
.bks-ai-logo { flex: 0 0 auto; width: 22px; height: 27px; object-fit: contain; }
.bks-ai-text { flex: 1; min-width: 0; }
.bks-ai-text b { color: #0f172a; }
.bks-ai-label { display: block; margin-bottom: 1px; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; background: var(--claila-border-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--myb-purple, #c52a92); }
.bks-ai-use { position: relative; z-index: 1; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border: 1.5px solid transparent; border-radius: 999px; font-size: 0.75rem; font-weight: 800; color: var(--myb-purple, #c52a92); white-space: nowrap; cursor: pointer;
    background: linear-gradient(#ffffff, #ffffff) padding-box, var(--claila-border-gradient) border-box; transition: color 0.15s ease, background 0.15s ease; }
.bks-ai-use:hover, .bks-ai-use:focus-visible { color: #ffffff; background: var(--claila-border-gradient) padding-box, var(--claila-border-gradient) border-box; }
@media (prefers-reduced-motion: reduce) { .bks-ai::after { display: none; } }
/* "Automazione per il cliente" (richiesta v3, DESIGN.md §29f): cosa parte e quando, con lo stato VERIFICATO
   (buyerleads/automationCheck), non quello dell'interruttore. Verde solo se partirà davvero; grigio mentre
   verifica, se è spenta o se non è previsto nulla; ambra se qualcosa non partirà o non si riesce a verificare;
   rosso se non partirà nulla. Tutto bene = una riga; i dettagli si aprono da soli quando c'è da sistemare */
.bks-auto { margin-top: 14px; padding: 12px 14px; border: 1px solid #e2e8f0; border-radius: 14px; background: #f8fafc; transition: background 0.15s ease, border-color 0.15s ease; }
.bks-auto[hidden] { display: none; }
.bks-auto-head { display: flex; align-items: center; gap: 10px; }
.bks-auto-ico { flex: 0 0 32px; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 10px; font-size: 0.85rem; color: #ffffff; background: #94a3b8; transition: background 0.15s ease; }
.bks-auto-title { flex: 1; display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.bks-auto-title b { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; color: #0f172a; }
.bks-auto-caret { font-size: 0.65rem; color: #94a3b8; transition: transform 0.2s ease; }
.bks-auto.is-expanded .bks-auto-caret { transform: rotate(180deg); }
.bks-auto-state { font-size: 0.76rem; font-weight: 700; color: #475569; }
.bks-auto-retry { margin-left: 4px; padding: 2px 10px; border: 1px solid currentColor; border-radius: 999px; background: #ffffff; font-size: 0.72rem; font-weight: 800; color: inherit; cursor: pointer; }
.bks-auto-toggle { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 44px; margin: 0; padding: 0 2px; border-radius: 999px; cursor: pointer; }
.bks-auto-toggle[hidden] { display: none; }
.bks-auto-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.bks-auto-toggle .evf-switch-ui { flex: 0 0 42px; }
.bks-auto-toggle input:checked + .evf-switch-ui { background: #64748b; }
.bks-auto-toggle input:checked + .evf-switch-ui::after { transform: translateX(18px); }
.bks-auto-toggle:has(input:focus-visible) { outline: 2px solid var(--primary, #6366f1); outline-offset: 2px; }
.bks-auto-flow { display: none; position: relative; list-style: none; margin: 10px 0 0 15px; padding: 0 0 0 20px; border-left: 2px solid #cbd5e1; }
.bks-auto.is-expanded .bks-auto-flow { display: block; }
.bks-auto-flow li { position: relative; display: flex; flex-direction: column; padding: 2px 0 8px; }
.bks-auto-flow li:last-child { padding-bottom: 0; }
.bks-auto-flow li::before { content: ''; position: absolute; left: -27px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: #ffffff; border: 3px solid #94a3b8; }
.bks-auto-when { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: #475569; }
.bks-auto-what { font-size: 0.82rem; font-weight: 600; color: #334155; }
.bks-auto-what i { margin-right: 4px; color: #64748b; }
.bks-auto-check { font-size: 0.75rem; font-weight: 600; line-height: 1.4; color: #475569; }
.bks-auto-check:empty { display: none; }
.bks-auto-check a { display: inline-flex; align-items: center; min-height: 30px; margin: 4px 0 0 2px; padding: 3px 11px; border: 1px solid currentColor; border-radius: 999px; background: #ffffff; font-weight: 800; color: inherit; text-decoration: none; }
.bks-auto-flow li.is-ok::before { border-color: #22c55e; }
.bks-auto-flow li.is-ok .bks-auto-check { color: #15803d; }
.bks-auto-flow li.is-warn::before { border-color: #f59e0b; }
.bks-auto-flow li.is-warn .bks-auto-check { color: #b45309; }
.bks-auto-flow li.is-none .bks-auto-check { color: #64748b; }
/* Partirà tutto */
.bks-auto[data-auto-state="ok"] { border-color: #bbf7d0; background: #f0fdf4; }
.bks-auto[data-auto-state="ok"] .bks-auto-ico { background: linear-gradient(135deg, #22c55e, #15803d); box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3); }
.bks-auto[data-auto-state="ok"] .bks-auto-state { color: #15803d; }
.bks-auto[data-auto-state="ok"] .bks-auto-toggle input:checked + .evf-switch-ui { background: #16a34a; }
.bks-auto[data-auto-state="ok"] .bks-auto-flow { border-left-color: #86efac; }
/* Qualcosa non partirà, o non si riesce a verificare */
.bks-auto[data-auto-state="warn"], .bks-auto[data-auto-state="unknown"] { border-color: #fde68a; background: #fffbeb; }
.bks-auto[data-auto-state="warn"] .bks-auto-ico, .bks-auto[data-auto-state="unknown"] .bks-auto-ico { background: #d97706; }
.bks-auto[data-auto-state="warn"] .bks-auto-state, .bks-auto[data-auto-state="unknown"] .bks-auto-state { color: #b45309; }
.bks-auto[data-auto-state="warn"] .bks-auto-toggle input:checked + .evf-switch-ui, .bks-auto[data-auto-state="unknown"] .bks-auto-toggle input:checked + .evf-switch-ui { background: #d97706; }
.bks-auto[data-auto-state="warn"] .bks-auto-flow { border-left-color: #fcd34d; }
/* Non partirà nulla */
.bks-auto[data-auto-state="bad"] { border-color: #fecaca; background: #fef2f2; }
.bks-auto[data-auto-state="bad"] .bks-auto-ico { background: #b91c1c; }
.bks-auto[data-auto-state="bad"] .bks-auto-state { color: #b91c1c; }
.bks-auto[data-auto-state="bad"] .bks-auto-toggle input:checked + .evf-switch-ui { background: #b91c1c; }
/* Spenta: passi barrati, testo leggibile (niente opacità) */
.bks-auto[data-auto-state="off"] .bks-auto-what { text-decoration: line-through; color: #64748b; }
.bks-auto[data-auto-state="off"] .bks-auto-check { display: none; }
/* Senza licenza WhatsApp Connector: stesso riquadro "da attivare" (cosa farebbe + Marketplace), tono AI v3 */
.bks-auto.is-locked { border-style: dashed; border-color: #c7d2fe; background: #f8fafc; }
.bks-auto.is-locked .bks-auto-ico { background: linear-gradient(135deg, #818cf8, #6366f1); }
.bks-auto.is-locked .bks-auto-title { cursor: default; }
.bks-auto.is-locked .bks-auto-title b { flex-wrap: wrap; }
.bks-auto.is-locked .bks-auto-title .pill-v3 { display: inline-flex; gap: 4px; }
.bks-auto.is-locked .bks-auto-state { font-weight: 600; color: #475569; }
.bks-auto.is-locked .bks-auto-flow { display: block; border-left: 2px dashed #c7d2fe; }
.bks-auto.is-locked .bks-auto-flow li::before { border-color: #a5b4fc; }
.bks-auto.is-locked .bks-auto-when { color: #4f46e5; }
.bks-auto.is-locked .bks-auto-what i { color: #6366f1; }
.bks-auto-cta { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; margin-top: 12px; padding: 6px 14px; border-radius: 999px; background: #4f46e5; font-size: 0.8rem; font-weight: 800; color: #ffffff !important; text-decoration: none !important; }
.bks-auto-cta:hover { filter: brightness(1.08); }
.bks-auto-cta.is-static { background: #eef2ff; color: #4338ca !important; font-weight: 700; }
/* Sotto "Fissa": il cliente non riceverà la conferma */
.bks-v3-save-note { margin: 8px 2px 0; font-size: 0.78rem; font-weight: 700; color: #b45309; }
.bks-v3-save-note[hidden] { display: none; }
.bks-v3-save-note::before { content: '\f071'; margin-right: 6px; font-family: 'Font Awesome 6 Free'; font-weight: 900; }
@media (max-width: 767px) {
    /* Telefono: "Fissa" resta sempre a portata, anche con il riquadro aperto */
    .bks-v3-save { position: sticky; bottom: 8px; z-index: 5; }
}
/* Appuntamenti sullo stesso immobile nell'agenda del modale: bordo col gradiente di Klaila che scorre piano,
   sulla card (::before; ::after è già il disegno "mappa" degli eventi con luogo) */
.bks-ag-cal .fc-event.is-same-property .agv3-ev { box-shadow: 0 4px 14px rgba(197, 42, 146, 0.22); }
.bks-ag-cal .fc-event.is-same-property .agv3-ev::before { content: ''; position: absolute; inset: 0; z-index: 3; padding: 2px; border-radius: inherit; pointer-events: none;
    background: linear-gradient(90deg, var(--myb-cyan, #037ef3), var(--myb-purple, #c52a92), var(--myb-orange, #e4803c), var(--myb-cyan, #037ef3)); background-size: 300% 100%;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: bks-same-flow 4s linear infinite; }
@keyframes bks-same-flow { to { background-position: 300% 0; } }
.bks-same-legend { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 0.76rem; font-weight: 700; color: #475569; }
.bks-same-legend i { display: inline-block; width: 18px; height: 10px; border-radius: 4px; border: 2px solid transparent; background: linear-gradient(#ffffff, #ffffff) padding-box, var(--claila-border-gradient) border-box; }
@media (prefers-reduced-motion: reduce) { .bks-ag-cal .fc-event.is-same-property .agv3-ev::before { animation: none; } }
@media (max-width: 991px) { .bks-v3 { grid-template-columns: minmax(0, 1fr); } }
.bks-step-head, .bks-step-back { display: none; }
@media (max-width: 767px) {
    /* Due passi: prima l'agenda (con "Fissa appuntamento" per saltarla), un tocco su un orario apre il modulo */
    .bks-v3:has(.bks-v3-cal):not(.is-step-form) .bks-v3-form, .bks-v3.is-step-form .bks-v3-cal { display: none; }
    .bks-step-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
    .bks-step-head span { font-size: 0.88rem; font-weight: 700; color: #475569; }
    .bks-step-go { flex: 0 0 auto; display: inline-flex; align-items: center; padding: 8px 14px; border: 0; border-radius: 999px; background: var(--primary, #6366f1); font-size: 0.82rem; font-weight: 800; color: #ffffff; cursor: pointer; }
    .bks-step-back { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 8px; padding: 6px 0; border: 0; background: none; font-size: 0.88rem; font-weight: 700; color: var(--primary, #6366f1); cursor: pointer; }
    .bks-v3-hint { display: none; } /* lo dice già la testata del passo */
    .bks-ag-bar .agv3-nav-btn, .bks-ag-views [data-agv3-view="timeGridWeek"] { display: none; } /* striscia e swipe al posto delle frecce; Giorno o 3 giorni */
    .bks-ag-bar { flex-wrap: wrap; }
    .bks-ag-views { order: 9; width: 100%; margin-top: 6px; }
    .bks-ag-views button { flex: 1; }
    .bks-v3-cal .bks-ag-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 0 -2px 10px; touch-action: pan-y; }
    .bks-ag-cal { max-height: 52vh; touch-action: pan-y; }
    .bks-ag-cal .fc-timeGridDay-view .fc-head { display: none; }
    .bks-ag-cal .fc-axis { width: 44px !important; font-size: 0.7rem; }
    .bks-ag-cal .fc-day-grid .fc-axis span { display: none; }
}

/* Colore dell'evento nel modulo (colori di Google Calendar; il primo è il colore dell'agenda) */
.evf-colors { display: flex; flex-wrap: wrap; gap: 8px; }
.evf-color { position: relative; margin: 0; cursor: pointer; }
.evf-color input { position: absolute; opacity: 0; pointer-events: none; }
.evf-color span { display: block; width: 28px; height: 28px; border-radius: 50%; background: var(--c); transition: transform 0.12s ease, box-shadow 0.12s ease; }
.evf-color.is-default span { background: #ffffff; border: 2px dashed #cbd5e1; }
.evf-color:hover span { transform: scale(1.08); }
.evf-color input:checked + span { box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--c, #94a3b8); }
.evf-color input:checked + span::after { content: '\f00c'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 0.72rem; color: #ffffff; }
.evf-color.is-default input:checked + span::after { color: #64748b; }
.evf-color input:focus-visible + span { outline: 2px solid var(--primary, #6366f1); outline-offset: 3px; }
.evf-dot { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 50%; vertical-align: middle; }

/* Menu contestuale degli eventi (DESIGN.md §29g): al puntatore su desktop, foglio dal basso sul telefono */
.agv3-cm { position: fixed; z-index: 1070; width: 250px; padding: 6px; border: 1px solid rgba(15, 23, 42, 0.08); border-radius: 16px; background: #ffffff; box-shadow: 0 18px 44px rgba(15, 23, 42, 0.2); animation: agv3-cm-in 0.12s ease-out; }
@keyframes agv3-cm-in { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }
.agv3-cm-head { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px 6px; }
.agv3-cm-head b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.86rem; color: #0f172a; }
.agv3-cm-head small { font-size: 0.74rem; color: #94a3b8; }
.agv3-cm-colors { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; padding: 6px 10px 10px; border-bottom: 1px solid #f1f5f9; }
.agv3-cm-color { position: relative; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: var(--c); cursor: pointer; transition: transform 0.12s ease; }
.agv3-cm-color:hover { transform: scale(1.12); }
.agv3-cm-color.is-active { box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--c); }
.agv3-cm-color.is-active::after { content: '\f00c'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 0.66rem; color: #ffffff; }
.agv3-cm-color:focus-visible { outline: 2px solid var(--primary, #6366f1); outline-offset: 3px; }
.agv3-cm-list { display: flex; flex-direction: column; padding: 4px 0 0; }
.agv3-cm-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: none; text-align: left; font-size: 0.85rem; font-weight: 600; color: #334155; cursor: pointer; }
.agv3-cm-item i { width: 16px; text-align: center; color: #94a3b8; }
.agv3-cm-item:hover, .agv3-cm-item:focus-visible { background: #f1f5f9; outline: none; }
.agv3-cm-item.is-danger, .agv3-cm-item.is-danger i { color: #dc2626; }
.agv3-cmsheet .myb-sheet { padding: 8px 12px calc(12px + env(safe-area-inset-bottom)); }
.agv3-cmsheet .myb-sheet__handle { margin: 0 auto 8px; }
.agv3-cmsheet .agv3-cm-head b { font-size: 1rem; }
.agv3-cmsheet .agv3-cm-colors { grid-template-columns: repeat(6, 1fr); gap: 12px; justify-items: center; padding: 10px 10px 14px; }
.agv3-cmsheet .agv3-cm-color { width: 34px; height: 34px; }
.agv3-cmsheet .agv3-cm-item { min-height: 48px; font-size: 0.95rem; }

/* "Collega a": una ricerca su tutti i tipi di record, risultati per tipo, record scelto come scheda */
.evf-link-box { position: relative; }
.evf-link-search { position: relative; }
.evf-link-search > i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: 0.8rem; color: #94a3b8; pointer-events: none; }
.evf-link-q { width: 100%; padding-left: 36px; }
.evf-link-hint { margin-top: 6px; font-size: 0.74rem; color: #94a3b8; }
.evf-link-hint[hidden], .evf-link-search[hidden], .evf-link-picked[hidden], .evf-link-locked[hidden] { display: none; }
.evf-link-list { position: absolute; left: 0; right: 0; top: 46px; z-index: 5; max-height: 300px; overflow-y: auto; padding: 6px; border: 1px solid #e2e8f0; border-radius: 14px; background: #ffffff; box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16); }
.evf-link-group { padding: 8px 8px 4px; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #94a3b8; }
.evf-link-opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: 0; border-radius: 10px; background: none; text-align: left; cursor: pointer; }
.evf-link-opt.is-active, .evf-link-opt:hover { background: color-mix(in srgb, var(--primary, #6366f1) 8%, #ffffff); }
.evf-link-ico { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 10px; background: color-mix(in srgb, var(--t, #64748b) 12%, #ffffff); color: var(--t, #64748b); font-size: 0.82rem; }
.evf-link-text { display: flex; flex-direction: column; min-width: 0; }
.evf-link-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.86rem; color: #0f172a; }
.evf-link-text small { font-size: 0.72rem; font-weight: 600; color: #94a3b8; }
.evf-link-empty { padding: 14px 10px; text-align: center; font-size: 0.82rem; color: #94a3b8; }
.evf-link-loading { display: flex; justify-content: center; gap: 5px; padding: 16px; }
.evf-link-loading span { width: 7px; height: 7px; border-radius: 50%; background: #cbd5e1; animation: evf-dots 1s infinite ease-in-out; }
.evf-link-loading span:nth-child(2) { animation-delay: 0.15s; }
.evf-link-loading span:nth-child(3) { animation-delay: 0.3s; }
@keyframes evf-dots { 0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); } 40% { opacity: 1; transform: none; } }
.evf-link-picked { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border: 1px solid color-mix(in srgb, var(--primary, #6366f1) 25%, #ffffff); border-radius: 14px; background: color-mix(in srgb, var(--primary, #6366f1) 5%, #ffffff); }
.evf-link-picked .evf-link-text { flex: 1; }
.evf-link-clear { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 0; border-radius: 50%; background: #ffffff; color: #64748b; cursor: pointer; }
.evf-link-clear:hover { color: #dc2626; }
.evf-link-locked { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: #94a3b8; }
.evf-link-box.is-locked .evf-link-search, .evf-link-box.is-locked .evf-link-hint, .evf-link-box.is-locked .evf-link-clear { display: none; }
@media (prefers-reduced-motion: reduce) { .evf-link-loading span { animation: none; } }

/* Voci di "Collega a" più ricche: nome + stato, pillola dell'immobile (rif. + indirizzo), dettagli in piccolo */
.evf-link-opt { align-items: flex-start; }
.evf-link-opt .evf-link-ico, .evf-link-picked .evf-link-ico { margin-top: 2px; }
.evf-link-text { gap: 3px; }
.evf-link-l1 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.evf-link-l1 b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.88rem; color: #0f172a; }
.evf-link-status { flex: 0 0 auto; padding: 1px 8px; border-radius: 999px; font-size: 0.64rem; font-weight: 800; letter-spacing: 0.02em; text-transform: uppercase; white-space: nowrap; }
.evf-link-status.is-sky { background: #e0f2fe; color: #0369a1; }
.evf-link-status.is-success { background: #dcfce7; color: #15803d; }
.evf-link-status.is-danger { background: #fee2e2; color: #b91c1c; }
.evf-link-status.is-slate { background: #f1f5f9; color: #475569; }
.evf-link-prop { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px 10px; border: 1px solid #e2e8f0; border-radius: 999px; background: #f8fafc; font-size: 0.76rem; color: #475569; align-self: flex-start; }
.evf-link-prop i { font-size: 0.66rem; color: #d97706; }
.evf-link-prop b { color: var(--primary, #6366f1); font-weight: 800; white-space: nowrap; }
.evf-link-prop span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.evf-link-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evf-link-list { max-height: 340px; }

/* ── Sensazione da app nativa (DESIGN.md §31), solo nel guscio "app" */
/* Tocco: niente riquadro grigio del browser né attesa del doppio tocco; niente menu "copia/seleziona"
   tenendo premuti bottoni e barre (i testi, es. i numeri di telefono, restano selezionabili) */
.myb-app { -webkit-tap-highlight-color: transparent; }
.myb-app :is(a, button, [role="button"], label, summary) { touch-action: manipulation; }
.myb-app :is(button, .btn, [role="button"], .myb-tabbar, .page-header, .myb-sheet__tile, .btn-create-v3, .btn-acc-action, .agv3-views, .agv3-strip, .evf-chips) { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
/* Risposta al tocco: ciò che si preme si abbassa un attimo, come nelle app */
.myb-app :is(button, .btn, [role="button"], .btn-create-v3, .btn-acc-action, .myb-sheet__tile, .buy-id-btn-v3, .agv3-today-card, .agv3-tp, .evf-link-opt, .notif-v3-item, .agv3-cm-item) { transition: transform 0.1s ease, background-color 0.15s ease, box-shadow 0.15s ease; }
.myb-app :is(button, .btn, [role="button"], .btn-create-v3, .btn-acc-action, .myb-sheet__tile, .buy-id-btn-v3, .agv3-today-card, .agv3-tp, .evf-link-opt, .agv3-cm-item):active:not(:disabled) { transform: scale(0.96); }
.myb-app .notif-v3-item:active { background: #f1f5f9; }
/* App installata: niente rimbalzo bianco oltre i bordi della pagina (il "tira per aggiornare" è nostro) */
@media (display-mode: standalone) { html, body { overscroll-behavior-y: none; } }
html.myb-installed, html.myb-installed body { overscroll-behavior-y: none; }
/* Freccia dello swipe "indietro" dal bordo e rotellina del "tira per aggiornare" (MYB.MobileShell) */
.myb-back-hint { position: fixed; top: 50%; left: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: #ffffff; color: #475569; box-shadow: 0 6px 20px rgba(15, 23, 42, 0.2); opacity: 0; transform: translate(-44px, -50%); pointer-events: none; transition: background-color 0.15s ease, color 0.15s ease; }
.myb-back-hint.is-ready { background: var(--primary, #6366f1); color: #ffffff; }
.myb-back-hint.is-leaving, .myb-ptr.is-leaving { opacity: 0 !important; transition: opacity 0.2s ease; }
.myb-ptr { position: fixed; top: calc(8px + env(safe-area-inset-top)); left: 50%; z-index: 2000; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: #ffffff; color: #94a3b8; box-shadow: 0 6px 20px rgba(15, 23, 42, 0.18); opacity: 0; transform: translate(-50%, 0); pointer-events: none; }
.myb-ptr.is-ready { color: var(--primary, #6366f1); }
.myb-ptr.is-loading i { animation: myb-ptr-spin 0.7s linear infinite; }
@keyframes myb-ptr-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .myb-app :is(button, .btn, [role="button"]):active { transform: none; } .myb-ptr.is-loading i { animation: none; } }

/* Mini-card immobile (lista Richieste v3 e scheda richiesta v3) */
.mini-property-card-v3 {
    background: color-mix(in srgb, var(--primary, #6366f1) 3%, transparent);
    border: 1px solid color-mix(in srgb, var(--primary, #6366f1) 8%, transparent);
    border-radius: 10px;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    width: 100%;
    text-align: left;
}
.mini-property-card-v3:hover {
    background: color-mix(in srgb, var(--primary, #6366f1) 8%, transparent);
    border-color: color-mix(in srgb, var(--primary, #6366f1) 25%, transparent);
    transform: translateY(-1px);
}

/* ── Schede v3 (.c3-*: views/richieste_manage_v3.php, MYB.Card3, DESIGN.md §32) ───────────────────────
   Testata a blocchi (cliente + azioni a icona · striscia dati · avanzamento a frecce), poi la cronologia
   divisa in "In programma" e "Fatto" con card colorate per tipo e la barra per scrivere, e a destra le
   card a cartella. A tutta larghezza; sul telefono una colonna e la barra Chiama / WhatsApp / Esito. */
.c3 { --c3-line: #e9edf3; --c3-ink: #1c2434; --c3-mute: #64748b; display: flex; flex-direction: column; gap: 18px; width: 100%; }
.c3-card { padding: 20px 22px; border: 1px solid var(--c3-line); border-radius: 18px; background: #ffffff; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04); min-width: 0; }
.c3-back { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; font-size: 0.95rem; font-weight: 700; color: var(--c3-ink) !important; text-decoration: none !important; }
.c3-back span { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid var(--c3-line); border-radius: 50%; background: #ffffff; font-size: 0.75rem; }
.c3-muted { color: var(--c3-mute); font-weight: 600; }
/* Identità del tipo di scheda (myb_entity kind/icon, c3_kind): icona tonda e nome in alto, e l'ID del riquadro nello
   stesso colore. Il colore dice il tipo; lo stato resta su bordo tratteggiato e pillola. Tinte lontane da quelle di
   stato e dal viola del brand */
.c3[data-kind="sky"] { --k: #0284c7; --k-bg: #e0f2fe; --k-ink: #075985; }
.c3[data-kind="amber"] { --k: #b45309; --k-bg: #fef3c7; --k-ink: #78350f; }
.c3[data-kind="teal"] { --k: #0f766e; --k-bg: #ccfbf1; --k-ink: #134e4a; }
.c3[data-kind="violet"] { --k: #6d28d9; --k-bg: #ede9fe; --k-ink: #4c1d95; }
.c3[data-kind="rose"] { --k: #be123c; --k-bg: #ffe4e6; --k-ink: #881337; }
.c3[data-kind="slate"] { --k: #475569; --k-bg: #e2e8f0; --k-ink: #1e293b; }
/* La sfumatura delle cose primarie (testata del riquadro principale, barra delle etichette): il colore del tipo verso il
   nero, come l'header del Centralino Live col primario */
.c3 { --k-grad: linear-gradient(135deg, color-mix(in srgb, var(--k, #6366f1) 45%, black) 0%, color-mix(in srgb, var(--k, #6366f1) 72%, black) 55%, var(--k, #6366f1) 100%); }
.c3-kind { display: flex; align-items: center; gap: 12px; align-self: flex-start; }
.c3-kind-ico { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%; background: var(--k-bg, #eef2f7); color: var(--k, #475569); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--k, #475569) 30%, transparent); }
.c3-kind-ico .material-icons { font-size: 26px; }
.c3-kind-txt { display: flex; flex-direction: column; gap: 1px; line-height: 1.15; }
.c3-kind-name { font-size: 1.2rem; font-weight: 800; color: var(--k-ink, var(--c3-ink)); }
.c3-kind-back { display: inline-flex; align-items: center; gap: 5px; font-size: 0.8rem; font-weight: 700; color: var(--c3-mute) !important; text-decoration: none !important; }
.c3-kind-back i { font-size: 0.65rem; }
.c3-kind-back:hover { color: var(--c3-ink) !important; }
.c3[data-kind] .c3-id { background: var(--k); }
/* Il Contatto (e l'Agenzia) è una persona: biglietto da visita con l'avatar più grande nel colore del tipo */
.c3[data-entity="contacts"] .c3-client .c3-avatar, .c3[data-entity="agencies"] .c3-client .c3-avatar { flex-basis: 72px; width: 72px; height: 72px; font-size: 1.45rem; background: var(--k-bg); color: var(--k); }
.c3[data-entity="contacts"] .c3-name, .c3[data-entity="agencies"] .c3-name { font-size: 1.6rem; line-height: 1.15; }
.c3[data-entity="contacts"] .c3-phone-mask, .c3[data-entity="agencies"] .c3-phone-mask { white-space: nowrap; }
.c3-link { padding: 0; border: 0; background: none; font-size: 0.85rem; font-weight: 800; color: var(--primary, #6366f1); cursor: pointer; }
.c3-link i { font-size: 0.65rem; }
.c3-h2 { margin: 0; font-size: 0.98rem; font-weight: 800; color: var(--c3-ink); }

/* Testata: cliente + azioni */
.c3-head { container-type: inline-size; --head-tint: transparent; }
/* Lo stato colora l'interno della richiesta (il riquadro tratteggiato), non tutta la card */
.c3-head .c3-bond { background: color-mix(in srgb, var(--head-tint) 22%, #ffffff); border-color: color-mix(in srgb, var(--head-line, var(--primary, #6366f1)) 40%, #ffffff); } /* niente gradiente: tinta piatta appena percettibile + bordo nel colore dello stato */
.c3-head[data-tone="urgent"] { --head-tint: var(--st-new-soft); --head-line: var(--st-new); }
.c3-head[data-tone="warn"] { --head-tint: var(--st-pending-soft); --head-line: var(--st-pending); }
.c3-head[data-tone="info"] { --head-tint: var(--st-follow-soft); --head-line: var(--st-follow); }
.c3-head[data-tone="ok"] { --head-tint: var(--st-ok-soft); --head-line: var(--st-ok); }
.c3-head[data-tone="lost"] { --head-tint: var(--st-lost-soft); --head-line: var(--st-lost); }
.c3-main { container: c3main / inline-size; }
/* La richiesta = cliente ↔ immobile (+ consulente): riquadro tratteggiato con "RICHIESTA BUY… collega" sul bordo
   e la freccia delle liste (.link-connector-v3) tra cliente e immobile */
.c3-bond { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 10px; padding: 26px 14px 14px; border: 2px dashed color-mix(in srgb, var(--primary, #6366f1) 28%, #ffffff); border-radius: 22px; }
@media (max-width: 767px) { .c3-ask.is-feedback .c3-ask-txt { flex-wrap: wrap; } .c3-ask.is-feedback .c3-fb-acts { flex-basis: 100%; margin-left: 0; } .c3-fb-acts > * { flex: 1 1 auto; } .c3-fb-acts .c3-fb-main, .c3-fb-acts .c3-fb-alt { justify-content: center; width: 100%; } .c3-fb-drop, .c3-fb-drop > button { width: 100%; } }
.c3-bond-link { display: flex; align-items: center; justify-content: center; font-size: 1.6rem; line-height: 1; color: #cdd3df; transform: rotate(90deg); }
.c3-bond .c3-strip { grid-template-columns: minmax(0, 1fr); gap: 6px; margin-top: 0; padding: 0; border: 0; }
.c3-bond .c3-strip .c3-field, .c3-bond .c3-strip .c3-field:first-child { padding: 12px 14px; border: 1px solid var(--c3-line); border-radius: 14px; background: #ffffff; }
.c3-bond-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.c3-bond-side .c3-status { padding: 0; min-width: 0; }
.c3-bond-side .c3-status-btn { min-width: 0; max-width: 100%; }
.c3-bond-side .c3-status .dropdown-menu { max-width: 260px; }
/* Esito e Consulente: stessa riga "etichetta | valore", etichette in colonna */
.c3-bond-side { --lbl-w: 74px; }
.c3-bond-side .c3-status-label, .c3-bond .c3-strip .c3-field.is-compact .c3-field-label { flex: 0 0 var(--lbl-w); width: var(--lbl-w); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c3-mute); }
.c3-bond .c3-strip .c3-field.is-compact { padding: 0 !important; }
/* La matita del consulente accanto alla pillola, non sotto l'etichetta */
.c3-bond .c3-strip .c3-field.is-compact .c3-field-label { display: inline-flex; align-items: center; }
.c3-bond .c3-strip .c3-field.is-compact .c3-field-value { display: inline-flex; align-items: center; gap: 4px; }
.c3-bond .c3-strip .c3-field.is-compact .consulente-pill-v3 { transform: none; }
.c3-bond-side .c3-strip { display: flex; flex-direction: column; gap: 10px; }
/* Immobile in alto, sotto le due righe Esito e Consulente */
.c3-bond-side .c3-strip { display: contents; }
.c3-bond-side .c3-strip .c3-field:not(.is-compact) { order: -1; }
.c3-bond-side .c3-status-btn { min-height: 40px; padding: 0 12px; font-size: 0.78rem; letter-spacing: 0.02em; }
/* Il consulente è un'informazione secondaria: una riga, non un box */
.c3-bond .c3-strip .c3-field.is-compact { flex-direction: row; align-items: center; gap: 8px; padding: 2px 4px; border: 0; background: none; }
.c3-bond .c3-strip .c3-field.is-compact .c3-field-label { margin: 0; }
.c3-bond .c3-strip .c3-field.is-compact .c3-field-value { min-width: 0; }
.c3-bond .c3-strip .c3-field.is-compact .consulente-pill-v3 { transform: scale(0.9); transform-origin: left center; }
@container c3main (min-width: 620px) {
    .c3-bond { grid-template-columns: minmax(0, 1.25fr) auto minmax(0, 1.25fr); align-items: start; gap: 0; }
    /* Cliente, freccia e immobile sulla stessa riga, alla stessa altezza (il cliente detta l'altezza, 112px) */
    .c3-bond-link { align-self: start; height: 112px; margin: 38px -2px 0; transform: none; font-size: 2.2rem; }
    .c3-bond-client .c3-entity .c3-folder-body { min-height: 112px; display: flex; flex-direction: column; justify-content: center; }
    .c3-bond-side .c3-strip .c3-field:not(.is-compact) { min-height: 112px; margin-top: 38px; display: flex; flex-direction: column; justify-content: center; }
    .c3-bond .c3-strip { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; }
}
.c3-client { display: flex; align-items: center; gap: 16px; min-width: 0; }
/* Contatto del CRM: badge come le card cliente delle liste (.mini-client-card-v3) */
.c3-folder.tone-entity { --f: #eef0fb; --f-ink: #3730a3; }
.c3-entity .c3-folder-tab { height: 38px; padding: 0 16px; font-size: 0.82rem; }
.c3-entity .c3-folder-tab::after { width: 28px; clip-path: path('M0 0 C 12 0 12 38 28 38 L 0 38 Z'); }
.c3-entity .c3-folder-body { padding: 14px 16px; }
.c3-entity-code { display: inline-flex; align-items: center; gap: 5px; margin-left: 6px; padding: 2px 9px; border-radius: 999px; background: #ffffff; font-size: 0.74rem; font-weight: 800; color: var(--primary, #6366f1) !important; text-decoration: none !important; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08); }
.c3-entity-code i { font-size: 0.6rem; opacity: 0.7; }
.c3-entity-code:hover { background: color-mix(in srgb, var(--primary, #6366f1) 8%, #ffffff); }
.c3-avatar { flex: 0 0 64px; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px #ffffff, 0 0 0 4px var(--c3-line); }
.c3-avatar.is-initials { display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--primary, #6366f1) 12%, #ffffff); font-size: 1.25rem; font-weight: 800; color: var(--primary, #6366f1); }
.c3-who { flex: 1; min-width: 0; }
.c3-name { display: block; gap: 6px 10px; margin: 0; font-size: 1.4rem; font-weight: 800; color: var(--c3-ink); letter-spacing: -0.01em; }
.c3-name .entity-link-v3 { font-size: 0.8rem; }
.c3-name .buy-id-btn-v3 { font-size: 0.72rem; }
.c3-contacts { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 6px; font-size: 0.9rem; }
.c3-contacts a { color: #334155; font-weight: 600; text-decoration: none; }
.c3-contacts i { margin-right: 4px; color: #94a3b8; }
.c3-client-none { color: #b45309; font-weight: 700; }
.c3-more-menu .dropdown-item { display: flex; align-items: center; gap: 10px; padding: 9px 16px; font-size: 0.86rem; }
.c3-more-menu .dropdown-item i { width: 16px; text-align: center; color: #64748b; }

/* Striscia dei dati: etichetta sopra, valore sotto, separatori */
.c3-strip { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); margin-top: 18px; padding: 16px 0; border-top: 1px solid var(--c3-line); border-bottom: 1px solid var(--c3-line); }
.c3-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 0 18px; border-left: 1px solid var(--c3-line); }
.c3-field:first-child { padding-left: 0; border-left: 0; }
.c3-field-label { font-size: 0.78rem; font-weight: 600; color: var(--c3-mute); }
.c3-field-value { min-width: 0; font-size: 0.92rem; font-weight: 700; color: var(--c3-ink); }
.c3-field-value .consulente-pill-v3 { margin: -4px 0; max-width: 100%; }
.c3-field-value .consulente-name-v3 { max-width: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c3-prop-link { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; font: inherit; font-weight: 700; cursor: pointer; color: var(--primary, #6366f1) !important; text-decoration: none !important; }
.c3-prop-addr { display: block; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.76rem; font-weight: 500; color: var(--c3-mute); }

/* Avanzamento a frecce */
.c3-progress { padding-top: 16px; }
.c3-progress-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.c3-progress-outcome { display: flex; align-items: center; gap: 10px; font-size: 0.86rem; font-weight: 600; color: var(--c3-mute); }
.c3-progress-outcome .status-pill-v3 { width: auto; max-width: none; min-height: 26px; }
.c3-stages { display: flex; margin: 0; padding: 0; list-style: none; }
.c3-stages li { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; height: 52px; margin-right: -8px; padding: 0 22px; background: #eef1f5; color: #7b8698; font-size: 0.9rem; font-weight: 700; text-align: center;
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 0 100%, 16px 50%); }
.c3-stages li:first-child { border-radius: 26px 0 0 26px; clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 0 100%); }
.c3-stages li:last-child { margin-right: 0; }
.c3-stages li:nth-child(4) { flex-grow: 1.3; } /* "Appuntamento": nome più lungo */
.c3-stages li.is-wide { flex-grow: 1.3; } /* nomi più lunghi in altre schede */
/* Fasi cliccabili: il contenuto occupa tutta la freccia */
.c3-stages li > button, .c3-stages li > div { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; width: 100%; height: 100%; min-width: 0; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: center; }
.c3-stages li > button { cursor: pointer; }
.c3-stages li:has(> button):not(.is-current):hover { filter: brightness(0.95); }
.c3-stages li:has(> button:focus-visible) { outline: 2px solid var(--primary, #6366f1); outline-offset: -2px; }
.c3-stages li > button:focus-visible { outline: none; }
.c3-stages li span { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.c3-stages li small { font-size: 0.68rem; font-weight: 700; opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.c3-stages li.is-done { background: #dcf5e6; color: #15803d; }
.c3-stages li.is-current { background: linear-gradient(135deg, var(--st-pending), var(--st-pending-dark)); color: #ffffff; }
.c3-stages li.is-current.tone-ok { background: linear-gradient(135deg, var(--st-ok), var(--st-ok-dark)); }
.c3-stages li.is-current.tone-info { background: linear-gradient(135deg, var(--st-follow), var(--st-follow-dark)); }
.c3-stages li.is-current.tone-urgent { background: linear-gradient(135deg, var(--st-new), var(--st-new-dark)); }
/* Saltata: la richiesta non ci è passata (es. chiusa "Non adatto" alla prima chiamata) */
.c3-stages li.is-skipped { background: repeating-linear-gradient(135deg, #f1f5f9 0 8px, #e2e8f0 8px 10px); color: #94a3b8; }
.c3-stages li.is-skipped span { font-weight: 600; }
.c3-stages li.is-lost { background: linear-gradient(135deg, var(--st-lost), var(--st-lost-dark)); color: #ffffff; }
.c3-ask[hidden] { display: none; }
/* Azione suggerita (Klaila): riga a sé tra richiesta e cronologia, sfondo neutro, un solo accento (il colore dello
   stato sul bordo sinistro e sull'icona), bottoni standard. Niente sfumature: lo stato colorato è già la pillola Esito */
.c3-next { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 10px 14px 12px; border: 0; border-radius: 14px; background: linear-gradient(100deg, rgba(3, 126, 243, 0.045), rgba(197, 42, 146, 0.045) 55%, rgba(228, 128, 60, 0.045)), #ffffff; box-shadow: 0 4px 16px rgba(197, 42, 146, 0.07); } /* un velo dei colori Klaila, non bianco pieno */
/* Bordo Klaila che scorre piano (come gli appuntamenti sullo stesso immobile nell'agenda): è l'AI che suggerisce */
.c3-next::before { content: ''; position: absolute; inset: 0; padding: 1.5px; border-radius: inherit; pointer-events: none;
    background: linear-gradient(90deg, var(--myb-cyan, #037ef3), var(--myb-purple, #c52a92), var(--myb-orange, #e4803c), var(--myb-cyan, #037ef3)); background-size: 300% 100%;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: bks-same-flow 6s linear infinite; }
.c3-next .c3-ai-head .bks-ai-label { background: var(--claila-border-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
@media (prefers-reduced-motion: reduce) { .c3-next::before { animation: none; } }
.c3-next:has(.c3-ask.is-urgent:not([hidden])) { --ask: var(--st-new); }
.c3-next:has(.c3-ask:not(.is-urgent):not(.is-feedback):not([hidden])) { --ask: var(--st-pending); }
.c3-next:has(.c3-ask.is-feedback:not([hidden])) { --ask: var(--st-ok); }
.c3-next:has(.c3-ask.is-recall) { --ask: var(--st-follow); }
.c3-next:not(:has(.c3-ask:not([hidden]))) { display: none; }
.c3-ai-head { display: flex; align-items: center; gap: 8px; }
.c3-ai-head .c3-ai-logo { display: block; height: 13px; width: auto; }
.c3-ai-head .bks-ai-label { margin: 0; font-size: 0.64rem; background: none; -webkit-text-fill-color: currentColor; color: var(--c3-mute); }
.c3-ask { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; border: 0; background: none; }
.c3-ask.is-focus { animation: c3-focus 2.4s ease-out both; border-radius: 10px; }
.c3-ask-txt { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.c3-ask-txt > i { font-size: 1rem; color: var(--ask, var(--primary, #6366f1)); }
.c3-ask-txt > span { display: flex; flex: 1 1 220px; flex-direction: column; min-width: 0; }
.c3-ask-txt b { font-size: 0.92rem; color: var(--c3-ink); }
.c3-ask-txt small { font-size: 0.78rem; color: var(--c3-mute); }
.c3-ask-txt > .btn-acc-action, .c3-ask-txt > .c3-link, .c3-ask-txt > .c3-fb-acts { order: 2; }
.c3-ask-txt > .btn-acc-action { margin-left: auto; }
.c3-ask-call.btn-acc-action, .c3-fb-main.btn-acc-action { display: inline-flex; align-items: center; gap: 7px; width: auto; margin: 0 !important; }
.c3-fb-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-left: auto; }
.c3-fb-alt { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border: 1px solid var(--c3-line); border-radius: 10px; background: #ffffff; font-size: 0.8rem; font-weight: 700; color: var(--c3-ink); cursor: pointer; }
.c3-fb-alt:hover { background: #f1f5f9; }
.c3-fb-alt i { font-size: 0.75rem; color: var(--c3-mute); }
.c3-fb-drop .dropdown-menu { min-width: 200px; }
.c3-fb-drop .c3-act-caret { font-size: 0.65rem; opacity: 0.8; }
.c3-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.c3-tile { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 12px; border: 1.5px solid var(--c3-line); border-radius: 12px; background: #ffffff; text-align: left; cursor: pointer; transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease; }
.c3-tile:hover { border-color: color-mix(in srgb, var(--primary, #6366f1) 40%, #ffffff); box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06); transform: translateY(-1px); }
.c3-tile > i { flex: 0 0 34px; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; background: #f1f5f9; font-size: 0.9rem; color: #475569; }
.c3-tile span { display: flex; flex-direction: column; min-width: 0; }
.c3-tile b { font-size: 0.88rem; color: var(--c3-ink); }
.c3-tile small { font-size: 0.74rem; color: var(--c3-mute); }
.c3-tile[data-c3-outcome="2"] > i { background: #dcfce7; color: #15803d; }
.c3-tile[data-c3-outcome="9"] > i { background: #e0f2fe; color: #0369a1; }
.c3-tile[data-c3-outcome="8"] > i { background: #fee2e2; color: #b91c1c; }
.c3-tile[data-c3-outcome="6"] > i { background: #fde2e2; color: #991b1b; }
.c3-tile.is-current { border-color: var(--secondary, #e8743b); box-shadow: inset 0 0 0 1px var(--secondary, #e8743b); }

/* Colonne */
.c3-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 18px; align-items: start; }
.c3-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.c3-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
/* Desktop: la colonna destra (azioni, in programma, commento) resta a vista scorrendo */
@media (min-width: 992px) {
    /* .page-container ha overflow auto ma non scorre (scorre la pagina): così lo sticky non si aggancerebbe mai */
    .page-container:has(> .c3, .c3) { overflow: visible; }
    /* senza overflow: i menu (Altre azioni, A chi) non devono essere tagliati */
    .c3-side { position: sticky; top: 16px; }
    /* l'ultimo riquadro (Allegati) non finisce sotto il pulsante di Klaila (fisso in basso a destra, 64px) */
    .c3-side { padding-bottom: 88px; }
}
/* Pannello Azioni (in alto a destra) */
.c3-actions-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.c3-call-big { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 16px; background: linear-gradient(135deg, var(--primary, #6366f1), color-mix(in srgb, var(--primary, #6366f1) 70%, black)); color: #ffffff !important; text-decoration: none !important; box-shadow: 0 10px 24px color-mix(in srgb, var(--primary, #6366f1) 30%, transparent); transition: transform 0.1s ease, filter 0.15s ease; }
.c3-call-big:hover { filter: brightness(1.08); }
.c3-call-big:active { transform: scale(0.98); }
.c3-call-big > i { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); font-size: 1.05rem; }
.c3-call-big span { display: flex; flex-direction: column; min-width: 0; }
.c3-call-big b { font-size: 1.02rem; }
.c3-call-big small { font-size: 0.8rem; opacity: 0.85; }
.c3-call-big.is-disabled { background: #f1f5f9; color: var(--c3-mute) !important; box-shadow: none; }
.c3-call-big.is-disabled > i { background: #ffffff; }
.c3-call-big:is(button) { width: 100%; border: 0; text-align: left; cursor: pointer; }
.c3-call-big small { letter-spacing: 0.04em; }
/* Chiama e WhatsApp sotto il contatto: due pulsanti grandi affiancati */
.c3-client-acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; align-self: stretch; width: 100%; margin-top: 16px; }
.c3-client-acts .c3-call-big span { min-width: 0; }
.c3-client-acts .c3-call-big[hidden] { display: none; }
.c3-client-acts .c3-fix-form { grid-column: 1 / -1; margin-bottom: 0; }
.c3-client-acts .c3-fix-form .btn-acc-sessions { order: 0; }
.c3-client-acts .c3-call-big b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.c3-client-acts > :only-child { grid-column: 1 / -1; }
.c3-client-acts .c3-call-big { justify-content: center; height: 48px; min-height: 0; padding: 0 14px; border-radius: 14px; }
.c3-client-acts .c3-call-big > i { width: 30px; height: 30px; font-size: 0.9rem; }
.c3-call-big.is-wa { background: linear-gradient(135deg, #22c55e, #15803d); box-shadow: 0 10px 24px rgba(22, 163, 74, 0.28); }
.c3-call-big.is-wa > i { font-size: 1.2rem; }

/* Numero oscurato: il cellulare in chiaro solo nel foglio "Stai per chiamare" */
.c3-phone-mask { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; font-size: inherit; font-weight: 600; color: #334155; letter-spacing: 0.04em; cursor: pointer; }
.c3-phone-mask span { margin-left: 4px; font-size: 0.75rem; font-weight: 800; letter-spacing: 0; color: var(--primary, #6366f1); }
.c3-phone-mask:hover span { text-decoration: underline; }
.c3-callsheet { --c3-line: #e9edf3; --c3-ink: #1c2434; --c3-mute: #64748b; text-align: center; }
.c3-callsheet .modal-body { position: relative; padding: 26px 22px 18px; }
.c3-callsheet .close { position: absolute; top: 12px; right: 14px; }
.c3-callsheet .c3-call-avatar { display: inline-flex; margin: 0 auto 10px; }
.c3-call-kicker { margin: 0; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c3-mute); }
.c3-call-name { margin: 2px 0 8px; font-size: 1.2rem; font-weight: 800; color: var(--c3-ink); outline: none; }
.c3-call-num { display: flex; justify-content: center; gap: 0.32em; margin-bottom: 18px; font-size: 1.5rem; font-weight: 800; letter-spacing: 0.03em; color: var(--c3-ink); font-variant-numeric: tabular-nums; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; pointer-events: none; }
.c3-call-num small, .c3-call-num button { pointer-events: auto; }
.c3-copyask { margin-top: 10px; padding: 12px; border-radius: 14px; background: #fff7ed; }
.c3-copyask[hidden], .c3-call-alt[hidden] { display: none; }
.c3-copyask p { margin: 0 0 8px; font-size: 0.92rem; font-weight: 800; color: var(--c3-ink); }
.c3-copyask > div { display: flex; gap: 8px; }
.c3-copyask .c3-act { flex: 1 1 0; justify-content: center; font-size: 0.8rem; }
.c3-copyask .c3-act.is-yes { border-color: #16a34a; background: #16a34a; color: #ffffff !important; }
.c3-call-go { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; border-radius: 16px; background: #16a34a; color: #ffffff !important; font-size: 1.02rem; font-weight: 800; text-decoration: none !important; box-shadow: 0 10px 24px rgba(22, 163, 74, 0.28); }
.c3-call-go:hover { filter: brightness(1.06); }
.c3-call-go.is-disabled { opacity: 0.5; pointer-events: none; box-shadow: none; }
#ModalCall .c3-act:disabled { opacity: 0.45; cursor: not-allowed; }
/* "Com'è andata?" (chiamato senza esito): nella barra del telefono il pulsante principale è l'esito, non Chiama */
.c3[data-status="13"] .c3-bar-btn.is-outcome { border-color: transparent; background: #f59e0b; color: #ffffff; }
.c3[data-status="13"] .c3-bar-btn.is-call { border-color: #eef2f7; background: #ffffff; color: var(--primary, #6366f1) !important; }
/* Telefono: aree di tocco di almeno 44px anche per i controlli piccoli */
@media (pointer: coarse) {
    .c3-edit-btn, .c3-tl-del, .c3-private, .c3-chip, .pr3-pen { position: relative; }
    .c3-tl-del::before, .c3-private::before, .c3-chip::before { content: ''; position: absolute; inset: -8px; }
    .c3-edit-btn::before, .pr3-pen::before { content: ''; position: absolute; inset: -10px; } /* 24 + 20 = 44px */
    .c3-file-cat { min-height: 32px; }
    .c3-type-pill, .c3-when-chips button, .c3-composer-modes button, .c3-voice-btn, .c3-voice-stop { min-height: 44px; }
}
.c3-call-qr { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px 16px; margin: 0 0 16px; padding: 12px; border: 1.5px solid #e2d9fb; border-radius: 16px; background: #faf8ff; text-align: left; transition: border-color 0.2s ease, background 0.2s ease; }
.c3-call-qr[data-mode="vcard"] { border-color: #bbf7d0; background: #f0fdf4; }
.c3-call-qr.is-swapped .c3-call-qr-code { animation: c3-qr-swap 0.45s ease; }
@keyframes c3-qr-swap { 0% { transform: rotateY(90deg); opacity: 0.3; } 100% { transform: none; opacity: 1; } }
.c3-qr-modes { display: flex; grid-column: 1 / -1; gap: 4px; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.8); }
.c3-qr-modes button { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 10px; border: 0; border-radius: 999px; background: none; font-size: 0.78rem; font-weight: 800; color: var(--c3-mute); cursor: pointer; }
.c3-qr-modes button.is-active { background: #7c3aed; color: #ffffff; }
.c3-call-qr[data-mode="vcard"] .c3-qr-modes button.is-active { background: #16a34a; }
.c3-call-qr[hidden], .c3-call-qr p[hidden] { display: none; }
.c3-call-qr-code { flex: 0 0 auto; padding: 6px; border-radius: 10px; background: #ffffff; }
.c3-call-qr-code img, .c3-call-qr-code canvas { display: block; width: 112px; height: 112px; }
.c3-call-qr p { margin: 0; font-size: 0.8rem; line-height: 1.4; color: var(--c3-mute); }
.c3-call-qr b { display: block; margin-bottom: 2px; font-size: 0.92rem; color: var(--c3-ink); }
/* Foglio aperto da "Chiama": solo i modi di chiamare tracciati */
#ModalCall.is-call-only [data-c3-copy], #ModalCall.is-call-only [data-c3-vcard], #ModalCall.is-call-only .c3-qr-modes { display: none !important; }
#ModalCall.is-call-only .c3-call-name { margin-bottom: 16px; }
.c3-fix-num { display: block; margin: -10px auto 14px; font-size: 0.76rem; color: var(--c3-mute); }
.c3-fix-num[hidden], .c3-fix-form[hidden], .c3-call-num[hidden] { display: none; }
.c3-fix-form { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-bottom: 16px; }
.c3-fix-form input { flex: 1 1 200px; height: 44px; padding: 0 14px; border: 1.5px solid color-mix(in srgb, var(--primary, #6366f1) 45%, #ffffff); border-radius: 12px; font-size: 1.1rem; font-weight: 700; text-align: center; }
.c3-fix-form .btn-acc-action { width: auto; margin: 0 !important; }
.c3-fix-form small { flex-basis: 100%; font-size: 0.74rem; color: var(--c3-mute); }
.c3-own-ask { display: flex; flex-basis: 100%; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; padding: 12px; border-radius: 12px; background: #fff7ed; }
.c3-own-ask p { flex-basis: 100%; margin: 0; text-align: center; }
.c3-own-ask .btn-acc-action { width: auto; margin: 0 !important; order: 0; }
.c3-call-note { margin: 8px 0 0; font-size: 0.76rem; color: var(--c3-mute); }
.c3-call-alt { display: flex; gap: 8px; margin-top: 10px; }
.c3-call-alt .c3-act { flex: 1 1 0; flex-direction: column; justify-content: center; gap: 4px; padding: 8px 6px; font-size: 0.78rem; }
.c3-call-cancel { display: block; margin: 14px auto 0; color: var(--c3-mute); }
@media (max-width: 767.98px) { .c3-desktop-only { display: none !important; } }
.c3-act-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.c3-act-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; } /* senza email (o appuntamento) l'ultima azione prende tutta la riga */
.c3-act { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 46px; padding: 0 14px; border: 1.5px solid var(--c3-line); border-radius: 12px; background: #ffffff; font-size: 0.86rem; font-weight: 700; color: var(--c3-ink) !important; text-decoration: none !important; cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease; }
.c3-act:hover { border-color: color-mix(in srgb, var(--primary, #6366f1) 35%, #ffffff); background: color-mix(in srgb, var(--primary, #6366f1) 4%, #ffffff); }
.c3-act > i { width: 18px; text-align: center; color: var(--primary, #6366f1); }
.c3-act.is-wa > i { color: #16a34a; }
.c3-act.is-warn { border-color: #fcd34d; background: #fffbeb; }
.c3-act.is-warn > i { color: #d97706; }
.c3-act.is-more { border-style: dashed; color: var(--c3-mute) !important; }
.c3-act-caret { margin-left: auto; font-size: 0.65rem; }
/* Le azioni principali hanno ognuna il suo colore: WhatsApp verde, Appuntamento lilla (come le cartelle) */
.c3-act.is-tile { flex-direction: column; justify-content: center; gap: 4px; min-height: 60px; padding: 8px; border: 0; border-radius: 16px; font-size: 0.86rem; font-weight: 800; transition: transform 0.1s ease, filter 0.15s ease, box-shadow 0.15s ease; }
.c3-act.is-tile > i { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #ffffff; font-size: 1rem; box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08); }
.c3-act.is-tile:hover { filter: brightness(0.97); box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08); }
.c3-act.is-tile:active { transform: scale(0.98); }
.c3-act-grid > .is-tile:only-child { flex-direction: row; min-height: 52px; } /* una sola: riga normale, non un blocco */
.c3-call-big { min-height: 76px; }
.c3-act.is-wa.is-tile { background: #dcf5e7; color: #14532d !important; }
.c3-act.is-wa.is-tile > i { color: #16a34a; }
.c3-act.is-appt.is-tile { background: #ece5fb; color: #4c1d95 !important; }
.c3-act.is-appt.is-tile > i { color: #7c3aed; }
/* Esito attuale = pulsante "Cambia": lo stato si vede (pillola nel suo colore) e si cambia da lì */
.c3-status { display: flex; align-items: center; gap: 10px; padding: 4px 2px; }
.c3-status-label { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c3-mute); }
/* Pillola piena come gli stati di ClickUp */
.c3-status-btn { --st: var(--primary, #6366f1); display: inline-flex; flex: 1 1 auto; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--st); font-size: 0.82rem; font-weight: 800; letter-spacing: 0.03em; text-transform: uppercase; color: #ffffff; cursor: pointer; transition: filter 0.15s ease; }
.c3-status-btn:hover, .c3-status-btn[aria-expanded="true"] { filter: brightness(0.93); }
.c3-status-btn > span { flex: 1 1 auto; overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.c3-status-btn > .fa-chevron-down { font-size: 0.7rem; opacity: 0.85; }
.c3-status-btn .c3-status-dot { --ring: #ffffff; background: radial-gradient(closest-side, var(--st) 48%, transparent 50%), conic-gradient(#ffffff calc(var(--p) * 1%), rgba(255, 255, 255, 0.3) 0); box-shadow: none; }
.c3-status-btn .c3-status-dot[style*="--p: 100"] { background: #ffffff; }
/* Cerchietto di avanzamento (ClickUp): anello del colore dello stato, riempito per --p (0–100) */
.c3-status-dot { --p: 50; --ring: var(--st); display: inline-block; flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%;
    background: radial-gradient(closest-side, #ffffff 48%, transparent 50%), conic-gradient(var(--ring) calc(var(--p) * 1%), color-mix(in srgb, var(--ring) 18%, #ffffff) 0);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ring) 45%, #ffffff); }
.c3-status-dot[style*="--p: 100"] { background: var(--ring); box-shadow: none; } /* completo: pieno */
.c3-status-menu { min-width: 100%; padding: 6px; border: 1px solid var(--c3-line); border-radius: 14px; box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16); }
.c3-status-menu .dropdown-header { padding: 4px 10px 6px; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.c3-status-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 0.84rem; font-weight: 700; }
.c3-status-item[aria-current] { background: color-mix(in srgb, var(--st) 10%, #ffffff); }
.c3-status-check { margin-left: auto; color: var(--st); }
.c3-actions-card .c3-more-menu { width: 100%; }
.c3-actions-card .c3-more-menu .dropdown-menu { width: 100%; }

/* Cronologia: tab, In programma / Fatto, card per tipo */
.c3-tl { display: flex; flex-direction: column; padding: 14px 22px 0; }
/* La tela della pagina non ha margine sotto: la cronologia, ultima, ci finiva a filo e i due angoli (20 e 24px) non
   combaciavano. Sotto lo stesso margine dei lati (15px) */
.c3 { padding-bottom: 15px; }
/* Desktop: la cronologia è alta almeno quanto lo schermo (meno la testata), così anche con poche voci si scorre fino a
   portare in alto il modulo dove si scrive */
@media (min-width: 992px) { .c3-tl { min-height: calc(100vh - 140px); } }
.c3-tl-wrap { display: flex; flex-direction: column; min-width: 0; container-type: inline-size; }
.c3-tl-wrap > .c3-tl { position: relative; z-index: 0; border-color: transparent; }
.c3-tl-wrap:has(.c3-tabs button:first-child.is-active) > .c3-tl { border-top-left-radius: 0; }
/* Linguette a cartella: la scelta è bianca e si fonde con la scheda, le altre restano dietro col colore del tipo
   (gli stessi colori delle voci in cronologia) */
.c3-tabs { position: relative; z-index: 1; display: flex; align-items: flex-end; gap: 3px; margin-bottom: -1px; overflow-x: auto; scrollbar-width: none; }
.c3-tabs::-webkit-scrollbar { display: none; }
.c3-tabs button { --t: #eef2f7; --t-ink: #475569; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border: 1px solid transparent; border-bottom: 0; border-radius: 14px 14px 0 0; background: var(--t); font-size: 0.82rem; font-weight: 700; color: var(--t-ink); white-space: nowrap; cursor: pointer; transition: height 0.15s ease, background 0.15s ease; }
.c3-tabs button[data-c3-filter="commenti"] { --t: #fdf3cf; --t-ink: #92400e; }
.c3-tabs button[data-c3-filter="attivita"] { --t: #dcf3ee; --t-ink: #115e59; }
.c3-tabs button[data-c3-filter="appuntamenti"] { --t: #ece5fb; --t-ink: #5b21b6; }
.c3-tabs button[data-c3-filter="messaggi"] { --t: #dcf5e7; --t-ink: #166534; }
.c3-tabs button[data-c3-filter="chiamate"] { --t: #e3eefc; --t-ink: #1e40af; }
/* Dietro tutte uguali (grigie): il colore del tipo resta sull'icona, piena solo la scelta */
.c3-tabs button:not(.is-active) { background: #e4e8ef; color: #475569; }
.c3-tabs button > i { color: var(--t-ico, var(--t-ink)); }
.c3-tabs button[data-c3-filter="commenti"] { --t-ico: #f59e0b; }
.c3-tabs button[data-c3-filter="attivita"] { --t-ico: #14b8a6; }
.c3-tabs button[data-c3-filter="appuntamenti"] { --t-ico: #8b5cf6; }
.c3-tabs button[data-c3-filter="messaggi"] { --t-ico: #22c55e; }
.c3-tabs button[data-c3-filter="chiamate"] { --t-ico: #3b82f6; }
.c3-tabs .pbx-history-count-v3.is-zero { opacity: 0.55; }
.c3-tabs button:hover { filter: brightness(0.97); }
.c3-tabs button.is-active { position: relative; z-index: 1; height: 48px; margin-right: 26px; padding: 0 16px; border-radius: 16px 0 0 0; background: #ffffff; font-size: 0.88rem; font-weight: 800; color: var(--c3-ink); filter: none; }
/* Il taglio laterale curvo delle cartelle (.c3-folder-tab::after), qui sulla linguetta scelta */
.c3-tabs button.is-active::after { content: ''; position: absolute; left: calc(100% - 1px); bottom: 0; width: 34px; height: 100%; background: #ffffff; clip-path: path('M0 0 C 14 0 14 48 34 48 L 0 48 Z'); }
.c3-tabs .pbx-history-count-v3 { background: rgba(255, 255, 255, 0.7); color: var(--t-ink); }
.c3-tabs button.is-active .pbx-history-count-v3 { background: var(--t); }
/* Stretta: le icone restano (sono il colore del tipo), si stringono gli spazi */
@container (max-width: 760px) { .c3-tabs { gap: 2px; } .c3-tabs button { gap: 4px; padding: 0 7px; font-size: 0.78rem; } .c3-tabs button.is-active { margin-right: 20px; padding: 0 10px; font-size: 0.84rem; } }
/* Ancora più stretta (7 linguette): le non scelte solo icona e numero, il nome nel title; la scelta per intero */
@container (max-width: 820px) { .c3-tabs:has(> :nth-child(7)) button:not(.is-active) .c3-tab-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
.c3-tl-scroll { display: flex; flex-direction: column; gap: 10px; max-height: min(70vh, 820px); margin-right: -12px; padding: 6px 12px 16px 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
/* Posizionati: i testi per lettori di schermo (.sr-only, assoluti) e i popup restano nella loro riga; senza, si ancoravano
   alla scheda fuori dal riquadro che scorre e allungavano la pagina fin dove arriva l'ultima riga della cronologia */
.c3-tl-scroll, .c3-tl-scroll .c3-item { position: relative; }
.c3-sec { display: flex; align-items: center; gap: 8px; margin: 14px 0 2px; font-size: 1.05rem; font-weight: 800; color: var(--c3-ink); }
.c3-day { margin-top: 8px; font-size: 0.76rem; font-weight: 700; color: var(--c3-mute); }
.c3-item { --it-bg: #f8fafc; --it-line: #eef2f7; --it-ico: #64748b; padding: 12px 14px; border: 1px solid var(--it-line); border-radius: 14px; background: var(--it-bg); }
.c3-item-head { display: flex; align-items: center; gap: 10px; }
.c3-item-ico { flex: 0 0 30px; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 9px; background: #ffffff; font-size: 0.8rem; color: var(--it-ico); box-shadow: inset 0 0 0 1px var(--it-line); }
.c3-item-ico.is-avatar { border-radius: 50%; font-size: 0.66rem; font-weight: 800; }
.c3-item-title { flex: 1; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; min-width: 0; font-size: 0.88rem; color: var(--c3-ink); }
.c3-item-title .pill-v3 { font-size: 0.64rem; }
.c3-item-who { font-size: 0.78rem; font-weight: 600; color: var(--c3-mute); }
.c3-item time { font-size: 0.74rem; font-weight: 700; color: var(--c3-mute); white-space: nowrap; }
.c3-item-body { margin: 8px 0 0 40px; font-size: 0.86rem; line-height: 1.5; color: #334155; white-space: pre-line; overflow-wrap: anywhere; }
.c3-item.kind-comment { --it-bg: #fffbeb; --it-line: #fdeaa8; --it-ico: #b45309; }
.c3-item.kind-comment.is-private { --it-bg: #fff7ed; --it-line: #fed7aa; }
.c3-item.kind-appointment { --it-bg: #f3f0ff; --it-line: #e2d9fb; --it-ico: #6d28d9; }
.c3-item.kind-message, .c3-item.kind-sms, .c3-item.kind-email { --it-bg: #f0fdf4; --it-line: #d1f2dc; --it-ico: #16a34a; }
.c3-item.kind-call, .c3-item.kind-pbx_call { --it-bg: #eff6ff; --it-line: #dbe7fb; --it-ico: #2563eb; }
.c3-item.kind-ai_call { --it-bg: #f5f3ff; --it-line: #ddd6fe; --it-ico: #7c3aed; }
.c3-item.kind-activity, .c3-item.kind-activity_done { --it-bg: #ffffff; --it-line: var(--c3-line); --it-ico: #0f766e; }
.c3-item.kind-outcome { --it-bg: #ffffff; --it-line: var(--c3-line); }
.c3-item.kind-outcome.tone-ok { --it-ico: #15803d; }
.c3-item.kind-outcome.tone-bad { --it-ico: #b91c1c; }
.c3-item.kind-outcome.tone-warn { --it-ico: #b45309; }
.c3-item.kind-outcome.tone-info { --it-ico: #0369a1; }
.c3-item.tone-bad.kind-message, .c3-item.tone-bad.kind-sms { --it-bg: #fef2f2; --it-line: #fecaca; --it-ico: #b91c1c; }
.c3-item.is-compact { padding: 4px 4px 4px 14px; border: 0; background: none; }
.c3-item.is-compact .c3-item-ico { width: 24px; height: 24px; flex-basis: 24px; font-size: 0.7rem; box-shadow: none; background: #f1f5f9; }
.c3-item.is-compact .c3-item-title { font-size: 0.82rem; }
.c3-item.is-compact .c3-item-title b { font-weight: 600; }
.c3-item.is-compact .c3-item-body { margin: 2px 0 0 34px; font-size: 0.78rem; color: var(--c3-mute); }
.c3-when-chip { font-size: 0.72rem; font-weight: 800; padding: 3px 9px; border-radius: 20px; background: #eef2ff; color: #4338ca; white-space: nowrap; }
.c3-when-chip.is-today { background: #fef3c7; color: #b45309; }
.c3-when-chip.is-late { background: #fee2e2; color: #b91c1c; }
.c3-todo-check { position: relative; flex: 0 0 26px; width: 26px; height: 26px; border: 2px solid #94a3b8; border-radius: 8px; background: #ffffff; cursor: pointer; }
.c3-todo-check::before, .c3-tl-del::before { content: ''; position: absolute; inset: -9px; }
.c3-todo-check:hover { border-color: #16a34a; }
.c3-item.is-done .c3-todo-check, .c3-todo-check.is-checked { border-color: #16a34a; background: #16a34a; }
.c3-todo-check.is-checked { display: inline-flex; align-items: center; justify-content: center; padding: 0; font-size: 0.75rem; color: #ffffff; }
/* Modifica al volo dalla testata */
.c3-edit-btn { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 24px; height: 24px; margin-left: 2px; padding: 0; border: 0; border-radius: 50%; background: transparent; font-size: 0.8rem; color: #64748b; vertical-align: middle; cursor: pointer; opacity: 0; transition: opacity 0.15s ease, background 0.15s ease; }
/* La matita compare solo accanto a ciò che stai indicando (una riga, non tutta la schedina) */
.c3-field:hover > .c3-field-label > .c3-edit-btn, .c3-field.is-compact:hover .c3-edit-btn, .c3-name:hover .c3-edit-btn,
.c3-title-line:hover .c3-edit-btn, .c3-src:hover .c3-edit-btn, .c3-fact:hover .c3-edit-btn, .c3-notes-empty:hover .c3-edit-btn,
.c3-folder-tab:hover .c3-edit-btn, .c3-contacts [data-c3-field]:hover .c3-edit-btn, .c3-edit-btn:focus-visible { opacity: 1; }
.c3-edit-btn:hover { background: #eef2f7; color: var(--primary, #582679); }
@media (hover: none) { .c3-edit-btn { opacity: 1; } }
.c3-field[data-c3-field] { position: relative; }
.c3-pop { position: absolute; top: 100%; left: 0; z-index: 30; width: min(320px, 86vw); margin-top: 6px; padding: 8px; border: 1px solid var(--c3-line); border-radius: 14px; background: #ffffff; box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16); font-size: 0.84rem; color: var(--c3-mute); }
.c3-pop:has(.select2-container) { padding: 0; border: 0; background: none; box-shadow: none; }
.c3-pop .select2-container--open .select2-dropdown { position: static !important; overflow: hidden; border: 1px solid var(--c3-line); border-radius: 14px; box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16); }
.c3-pop .select2-container > .selection { display: none; }
.c3-pop select[size] { width: 100%; border: 0; }
.c3-name-input { width: min(420px, 100%); padding: 2px 8px; border: 1.5px solid color-mix(in srgb, var(--primary, #6366f1) 45%, #ffffff); border-radius: 10px; font: inherit; color: var(--c3-ink); outline: none; }
.c3-text-input { width: 100%; padding: 4px 8px; border: 1.5px solid color-mix(in srgb, var(--primary, #6366f1) 45%, #ffffff); border-radius: 10px; font: inherit; font-weight: 600; color: var(--c3-ink); outline: none; resize: vertical; }
.c3-field-sub { display: block; margin-top: 2px; font-size: 0.78rem; font-weight: 500; color: var(--c3-mute); }
.c3-field-sub a { color: inherit; text-decoration: underline; }
[data-c3-field].is-saved .c3-field-value, .c3-name.is-saved [data-c3-name] { animation: c3-saved 1.6s ease-out; border-radius: 8px; }
.c3-item-actions { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0 0 40px; }
.c3-item-actions .c3-link { font-size: 0.78rem; text-decoration: none; }
.c3-link.is-danger { color: #b91c1c; }
[data-c3-next-ev], [data-c3-plan] .c3-item.kind-appointment { cursor: pointer; transition: box-shadow 0.15s ease, transform 0.1s ease; }
[data-c3-next-ev]:hover, [data-c3-plan] .c3-item.kind-appointment:hover { box-shadow: 0 6px 18px rgba(76, 29, 149, 0.14); }
/* ID della richiesta ben visibile sopra il nome, si copia con un tocco */
.c3-idrow { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c3-mute); }
.c3-id { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px; border: 0; border-radius: 999px; background: var(--primary, #6366f1); font-size: 0.85rem; font-weight: 800; letter-spacing: 0.02em; color: #ffffff; cursor: pointer; }
.c3-id i { font-size: 0.75rem; opacity: 0.8; }
.c3-id:hover { filter: brightness(1.1); }
.c3-auto-chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; background: linear-gradient(135deg, #fef3c7, #fde68a); font-size: 0.68rem; font-weight: 800; color: #92400e; white-space: nowrap; }
.c3-auto-chip i { font-size: 0.62rem; color: #d97706; }
.c3-msg-toggle { margin: 6px 0 0 40px; font-size: 0.78rem; }
.c3-msg { margin: 8px 0 0 40px; }
.c3-msg-text { padding: 10px 12px; border-radius: 4px 14px 14px 14px; background: #ffffff; font-size: 0.84rem; line-height: 1.45; color: var(--c3-ink); white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06); }
.c3-msg small { display: block; margin-top: 4px; font-size: 0.72rem; color: var(--c3-mute); }
.c3-todo-check.is-checked:hover { border-color: #15803d; background: #15803d; }
/* Voce appena registrata: entra dall'alto e si illumina, così si vede che è stata salvata e dove è finita */
.c3-item.is-new { animation: c3-enter 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.25) both, c3-glow 2.2s ease-out 0.35s both; }
@keyframes c3-enter { from { opacity: 0; transform: translateY(-16px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes c3-glow { 0%, 45% { box-shadow: 0 0 0 3px #22c55e, 0 12px 28px rgba(34, 197, 94, 0.28); } 100% { box-shadow: 0 0 0 0 transparent; } }
.c3-item.is-new { position: relative; z-index: 1; }
.c3-item.is-focus { animation: c3-focus 2.4s ease-out both; }
@keyframes c3-focus { 0%, 50% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #6366f1) 60%, transparent); } 100% { box-shadow: 0 0 0 0 transparent; } }
.c3-item.is-new::after { content: '\2713  Salvato'; position: absolute; top: -9px; right: 14px; padding: 2px 9px; border-radius: 999px; background: #16a34a; font-size: 0.7rem; font-weight: 800; color: #ffffff; white-space: pre; box-shadow: 0 4px 10px rgba(22, 163, 74, 0.3); animation: c3-badge 2.4s ease-out both; pointer-events: none; }
@keyframes c3-badge { 0% { opacity: 0; transform: translateY(4px) scale(0.8); } 12%, 75% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.c3-folder .c3-composer.is-saved textarea { animation: c3-saved 0.9s ease-out; }
@keyframes c3-saved { 0% { background: #dcfce7; border-color: #86efac; } 100% { background: #ffffff; border-color: transparent; } }
@media (prefers-reduced-motion: reduce) { .c3-item.is-new { animation: c3-glow 2.2s ease-out both; } .c3-folder .c3-composer.is-saved textarea { animation: none; } }
.c3-item.is-done .c3-item-title b { text-decoration: line-through; color: #94a3b8; }
.c3-tl-del { position: relative; padding: 0 4px; border: 0; background: none; color: #94a3b8; cursor: pointer; }
.c3-tl-del:hover { color: #b91c1c; }
.c3-tl-skel { height: 56px; border-radius: 14px; background: linear-gradient(90deg, #f1f5f9, #f8fafc, #f1f5f9); background-size: 200% 100%; animation: myb-shimmer 1.2s linear infinite; }
.c3-tl-empty { margin: 0; padding: 12px 0; font-size: 0.84rem; color: var(--c3-mute); }
.c3-tl-more { display: flex; margin: 4px auto 0; }

/* Barra per scrivere (in fondo alla cronologia, resta visibile) */
.c3-composer { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 8px; margin: 0 -8px 14px; padding: 8px; border: 1px solid var(--c3-line); border-radius: 999px; background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1); }
.c3-composer:has(.c3-composer-todo:not([hidden])) { border-radius: 22px; }
.c3-composer:focus-within { border-color: color-mix(in srgb, var(--primary, #6366f1) 45%, #ffffff); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #6366f1) 15%, transparent), 0 12px 28px rgba(15, 23, 42, 0.1); }
.c3-composer-modes { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: #f1f5f9; }
.c3-composer-modes button { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border: 0; border-radius: 999px; background: transparent; font-size: 0.78rem; font-weight: 800; color: var(--c3-mute); cursor: pointer; }
.c3-composer-modes button.is-active { background: #ffffff; color: var(--c3-ink); box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12); }
.c3-composer textarea { width: 100%; min-height: 38px; max-height: 160px; padding: 9px 4px; border: 0; background: transparent; font-size: 0.9rem; color: var(--c3-ink); resize: none; outline: none; }
.c3-private { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; margin: 0; padding: 0 12px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; color: var(--c3-mute); cursor: pointer; }
.c3-private:hover { background: #f1f5f9; }
.c3-private input { position: absolute; opacity: 0; pointer-events: none; }
.c3-private:has(input:checked) { background: #fff7ed; color: #b45309; box-shadow: inset 0 0 0 1.5px #fdba74; }
.c3-private:has(input:focus-visible) { outline: 2px solid var(--primary, #6366f1); outline-offset: 2px; }
.c3-composer.is-private { border-color: #fdba74; background: rgba(255, 247, 237, 0.96); }
.c3-private[hidden] { display: none; }
.c3-add { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--c3-ink); font-size: 0.85rem; font-weight: 800; color: #ffffff; cursor: pointer; }
.c3-add:disabled { opacity: 0.4; cursor: not-allowed; }
.c3-composer-todo { grid-column: 1 / -1; padding: 0 6px 4px; }
/* Nella cartella "Commento o attività" (colonna destra): scelta e lucchetto in alto, testo, poi Aggiungi */
.c3-folder .c3-composer { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "modes lock" "text text" "todo todo" "add add"; gap: 10px; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
/* Tag nei commenti (@nome): l'elenco si apre sotto il testo, fuori dal flusso della griglia */
.c3-mention-list { position: absolute; grid-area: text; top: calc(100% + 4px); left: 0; z-index: 30; min-width: 220px; max-width: 100%; padding: 4px; border: 1px solid var(--c3-line); border-radius: 12px; background: #fff; box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14); }
.c3-mention-list button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 0; border-radius: 8px; background: none; color: #1f2937; font-size: 0.86rem; font-weight: 600; text-align: left; cursor: pointer; }
.c3-mention-list button.is-active, .c3-mention-list button:hover { background: #f1ecfa; color: #5b2a86; }
.c3-mention-list .avatar-v3 { width: 24px; height: 24px; font-size: 0.66rem; }
.c3-mention { color: #5b2a86; font-weight: 700; }
.c3-folder .c3-composer:focus-within { box-shadow: none; }
.c3-folder .c3-composer-modes { grid-area: modes; justify-self: start; background: rgba(255, 255, 255, 0.6); }
.c3-folder .c3-private { grid-area: lock; height: 34px; background: rgba(255, 255, 255, 0.6); }
.c3-folder .c3-composer textarea { grid-area: text; min-height: 72px; padding: 10px 12px; border: 1.5px solid transparent; border-radius: 14px; background: #ffffff; }
.c3-folder .c3-composer textarea:focus { border-color: color-mix(in srgb, var(--primary, #6366f1) 45%, #ffffff); }
.c3-folder .c3-composer.is-private textarea { border-color: #fdba74; background: #fff7ed; }
.c3-folder .c3-composer-todo { grid-area: todo; padding: 0; }
.c3-folder .c3-add { grid-area: add; justify-self: end; }
/* Nota vocale (c3_composer, MYB.Card3): il microfono fra i comandi; registrazione e audio su una riga intera.
   Con l'AI il microfono ha i colori di Klaila. Solo per i commenti: nelle attività sparisce */
.c3-composer:has(> .c3-voice-btn:not([hidden])) { grid-template-columns: auto minmax(0, 1fr) auto auto auto; }
.c3-folder .c3-composer, .c3-folder .c3-composer:has(> .c3-voice-btn:not([hidden])) { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "modes lock" "text text" "voice voice" "todo todo" "mic add"; }
.c3-folder .c3-voice-btn { grid-area: mic; justify-self: start; }
.c3-folder .c3-voice { grid-area: voice; }
/* Il pulsante è di Klaila: bordo sfumato (come .bks-ai-use), microfono con "AI" in apice, pillola Beta */
.c3-voice-btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 14px; border: 1.5px solid transparent; border-radius: 999px; font-size: 0.78rem; font-weight: 800; color: var(--myb-purple, #c52a92); white-space: nowrap; cursor: pointer;
    background: linear-gradient(#ffffff, #ffffff) padding-box, var(--claila-border-gradient) border-box; transition: background 0.15s ease; }
.c3-voice-btn:hover { background: linear-gradient(100deg, rgba(3, 126, 243, 0.08), rgba(197, 42, 146, 0.08) 55%, rgba(228, 128, 60, 0.08)) padding-box, linear-gradient(#ffffff, #ffffff) padding-box, var(--claila-border-gradient) border-box; }
.c3-voice-ico { position: relative; display: inline-flex; padding-right: 9px; }
.c3-voice-ico i { background: var(--claila-border-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 0.95rem; }
.c3-voice-ico b { position: absolute; top: -5px; right: -2px; font-size: 0.62rem; font-weight: 900; letter-spacing: 0.02em; background: var(--claila-border-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.c3-beta { margin-left: 4px; padding: 1px 6px; border-radius: 999px; background: #f3e8f4; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: #9d1f74; }
.c3-voice-btn.is-off, .c3-private.is-off { opacity: 0.4; pointer-events: none; }
.c3-voice { grid-column: 1 / -1; order: 1; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 5px 6px 5px 12px; border-radius: 14px; background: #ffffff; font-size: 0.82rem; font-weight: 700; color: var(--c3-ink); }
.c3-voice-btn[hidden], .c3-voice[hidden], .c3-composer:has(.c3-composer-todo:not([hidden])) :is(.c3-voice, .c3-voice-btn) { display: none; }
.c3-voice-dot { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background: #ef4444; animation: c3-voice-rec 1.2s ease-in-out infinite; }
@keyframes c3-voice-rec { 50% { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { .c3-voice-dot { animation: none; } }
.c3-voice-time { font-variant-numeric: tabular-nums; }
.c3-voice-lbl { flex: 1; font-weight: 600; color: var(--c3-mute); }
/* Klaila al lavoro (trascrive e riassume) e poi il suo riassunto: la riga prende il suo bordo sfumato; mentre lavora
   un riflesso passa di continuo, come in .bks-ai */
.c3-voice { flex-wrap: wrap; }
.c3-voice.is-ai { position: relative; overflow: hidden; border: 1px solid transparent; background: linear-gradient(100deg, rgba(3, 126, 243, 0.05), rgba(197, 42, 146, 0.05) 55%, rgba(228, 128, 60, 0.05)) padding-box, linear-gradient(#ffffff, #ffffff) padding-box, var(--claila-border-gradient) border-box; }
.c3-voice.is-busy::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.8) 50%, transparent 70%); transform: translateX(-100%); animation: bks-ai-sheen 1.6s ease-in-out infinite; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .c3-voice.is-busy::after { animation: none; } }
.c3-voice-k { flex: 0 0 auto; width: 18px; height: 22px; object-fit: contain; }
.c3-voice .c3-voice-lbl .bks-ai-label { margin-bottom: 1px; }
.c3-voice-spin { color: var(--myb-purple, #c52a92); }
.c3-voice-ai { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin: 2px 0 0; font-size: 0.78rem; font-weight: 600; color: var(--c3-mute); }
.c3-voice-ai .c3-voice-k { width: 15px; height: 18px; }
.c3-voice-ai .bks-ai-label { display: inline; margin: 0; white-space: nowrap; }
/* Con una nota vocale il composer va su più righe (testo, nota, comandi) e lascia la pillola: con il riassunto su più
   righe diventava un ovale. Con il riassunto di Klaila prende il suo bordo */
@container c3compose (min-width: 761px) {
    .c3-tl-composer .c3-composer:has(> .c3-voice:not([hidden])) { grid-template-columns: auto minmax(0, 1fr) auto auto auto; grid-template-areas: "text text text text text" "voice voice voice voice voice" "modes . mic lock add"; border-radius: 24px; }
    .c3-tl-composer .c3-composer:has(> .c3-voice:not([hidden])) textarea { grid-area: text; padding: 8px 10px 4px; }
    .c3-tl-composer .c3-composer:has(> .c3-voice:not([hidden])) .c3-composer-modes { grid-area: modes; }
    .c3-tl-composer .c3-composer:has(> .c3-voice:not([hidden])) .c3-private { grid-area: lock; }
    .c3-tl-composer .c3-composer:has(> .c3-voice:not([hidden])) .c3-add { grid-area: add; }
    .c3-tl-composer .c3-composer:has(> .c3-voice:not([hidden])) .c3-voice-btn { grid-area: mic; }
    .c3-tl-composer .c3-composer:has(> .c3-voice:not([hidden])) .c3-voice { grid-area: voice; }
}
.c3-composer.is-ai-note, .c3-tl-composer .c3-composer.is-ai-note { border-color: transparent; background: linear-gradient(#f7f9fb, #f7f9fb) padding-box, var(--claila-border-gradient) border-box; }
.c3-ai-chip { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 1px 8px 1px 6px; border: 1px solid transparent; border-radius: 999px; vertical-align: 1px; font-size: 0.7rem; font-weight: 800;
    background: linear-gradient(#ffffff, #ffffff) padding-box, var(--claila-border-gradient) border-box; color: var(--myb-purple, #c52a92); }
.c3-ai-chip img { width: 10px; height: 12px; object-fit: contain; }
.c3-voice-stop { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: #dc2626; font-size: 0.8rem; font-weight: 800; color: #ffffff; cursor: pointer; }
/* Lettore della nota vocale (MYB.Card3 voicePlayer): pillola con play nel colore primario, barra, durata, velocità e
   la trascrizione a richiesta sotto, smorzata come una citazione */
.c3-vp-wrap { max-width: 440px; margin-top: 8px; }
.c3-voice .c3-vp-wrap { flex: 1; min-width: 0; max-width: none; margin: 0; }
.c3-vp { display: flex; align-items: center; gap: 10px; padding: 5px 6px 5px 5px; border-radius: 999px; background: #eef1f6; }
.c3-vp-play { flex: 0 0 auto; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--primary, #582679); color: #ffffff; cursor: pointer; }
.c3-vp-play .fa-play { margin-left: 2px; }
.c3-vp-track { position: relative; flex: 1; min-width: 48px; height: 6px; border-radius: 3px; background: #cfd6e0; cursor: pointer; }
.c3-vp-track::before { content: ''; position: absolute; inset: -12px 0; } /* 30px di area di tocco */
.c3-vp-track:focus-visible { outline: 2px solid var(--primary, #582679); outline-offset: 6px; }
.c3-vp-fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: var(--primary, #582679); }
.c3-vp-fill::after { content: ''; position: absolute; top: 50%; right: -6px; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--primary, #582679); box-shadow: 0 0 0 2px #ffffff; }
.c3-vp-time { flex: 0 0 auto; min-width: 32px; font-size: 0.78rem; font-weight: 700; font-variant-numeric: tabular-nums; color: #475569; }
.c3-vp-rate, .c3-vp-tr { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border: 0; border-radius: 999px; background: #ffffff; font-size: 0.75rem; font-weight: 800; color: var(--c3-ink); cursor: pointer; }
.c3-vp-rate { min-width: 40px; justify-content: center; font-variant-numeric: tabular-nums; }
.c3-vp-tr[aria-expanded="true"] { background: var(--primary, #582679); color: #ffffff; }
.c3-vp-text { margin: 8px 0 0 18px; padding: 2px 0 2px 12px; border-left: 3px solid #cfd6e0; font-size: 0.86rem; font-weight: 400; line-height: 1.5; color: #334155; white-space: pre-wrap; }
.c3-vp-text[hidden] { display: none; }
@media (max-width: 520px) { .c3-vp-tr span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }
@media (pointer: coarse) { .c3-vp-rate, .c3-vp-tr { position: relative; } .c3-vp-rate::before, .c3-vp-tr::before { content: ''; position: absolute; inset: -8px -2px; } }
.c3-when-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
[data-c3-dues] { display: contents; }
/* Tipo di attività: una pillola a tendina, facoltativa da toccare */
.c3-type-pill { flex: 0 0 auto; width: auto !important; min-width: 0; field-sizing: content; height: 28px; padding: 0 24px 0 10px; border: 1px dashed #94a3b8; border-radius: 20px; background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2364748b' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 9px center; font-size: 0.75rem; font-weight: 700; color: #475569; cursor: pointer; appearance: none; -webkit-appearance: none; }
.c3-type-pill:hover { border-style: solid; color: var(--c3-ink); }
.c3-type-pill[hidden], .c3-due-input[hidden], .c3-smart[hidden] { display: none; }
.c3-type-pill.is-auto { border-style: solid; border-color: #a78bfa; background-color: #f5f3ff; color: #5b21b6; }
/* Attività anche su Google Calendar (evento sull'intera giornata, come la spunta della vecchia maschera) */
.c3-cal-pill { position: relative; display: inline-flex; align-items: center; margin: 0; padding: 0 10px; background-image: none; }
.c3-cal-pill input { position: absolute; opacity: 0; pointer-events: none; }
.c3-cal-pill:has(input:checked) { border-style: solid; border-color: #15803d; background-color: #dcfce7; color: #14532d; }
.c3-cal-pill:has(input:focus-visible) { outline: 2px solid var(--primary, #6366f1); outline-offset: 2px; }
.c3-for { font-weight: 800; color: #5b21b6; }
.c3-asg-wrap { position: relative; display: inline-flex; }
.c3-asg-wrap[hidden], .c3-asg-pop[hidden] { display: none; }
.c3-asg-btn.c3-type-pill { background-color: #ffffff; }
.c3-asg-btn.is-other { border-style: solid; border-color: #a78bfa; color: #5b21b6; }
.c3-asg-pop { position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 40; display: flex; flex-direction: column; width: 240px; padding: 8px; border: 1px solid var(--c3-line); border-radius: 14px; background: #ffffff; box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16); }
.c3-asg-pop input { height: 36px; margin-bottom: 6px; padding: 0 10px; border: 1.5px solid var(--c3-line); border-radius: 10px; font-size: 0.82rem; outline: none; }
.c3-asg-pop input:focus { border-color: color-mix(in srgb, var(--primary, #6366f1) 45%, #ffffff); }
.c3-asg-list { display: flex; flex-direction: column; max-height: 220px; overflow-y: auto; }
.c3-asg-list button { padding: 8px 10px; border: 0; border-radius: 8px; background: none; font-size: 0.82rem; font-weight: 600; color: var(--c3-ink); text-align: left; cursor: pointer; }
.c3-asg-list button:hover, .c3-asg-list button[aria-selected="true"] { background: #f5f3ff; color: #5b21b6; }
.c3-asg-list em { padding: 8px 10px; font-size: 0.8rem; color: var(--c3-mute); }
.c3-smart { margin: 8px 0 0; font-size: 0.75rem; font-weight: 700; color: #6d28d9; }
.c3-smart i { margin-right: 4px; }
.c3-when-chips button { padding: 5px 11px; border: 1px solid var(--c3-line); border-radius: 20px; background: #ffffff; font-size: 0.75rem; font-weight: 700; color: #475569; cursor: pointer; }
.c3-when-chips button.is-active { border-color: var(--primary, #6366f1); color: var(--primary, #6366f1); background: color-mix(in srgb, var(--primary, #6366f1) 8%, #ffffff); }
.c3-due-input { padding: 4px 10px; border: 1px solid var(--c3-line); border-radius: 20px; font-size: 0.75rem; color: #475569; }

/* Card a cartella (colonna laterale) */
.c3-folder { --f: #fdf6c3; --f-ink: #713f12; }
.c3-folder.tone-lilac { --f: #ece5fb; --f-ink: #4c1d95; }
.c3-folder.tone-mint { --f: #dcf5e7; --f-ink: #14532d; }
.c3-folder.tone-sky { --f: #e3eefc; --f-ink: #1e3a8a; }
.c3-folder.tone-grey { --f: #f1f5f9; --f-ink: #64748b; } /* note vuote: il giallo solo quando c'è qualcosa */
/* Un filo appena più scuro del colore della cartella attorno a tutta la sagoma (linguetta, curva e corpo): le
   cartelle a tinta piatta si staccano dallo sfondo anche per chi vede meno i contrasti tenui. drop-shadow sul
   contenitore perché la curva della linguetta è ritagliata (clip-path) e un bordo non la seguirebbe */
.c3-folder { --f-line: color-mix(in srgb, var(--f-ink) 13%, var(--f)); filter: drop-shadow(1px 0 0 var(--f-line)) drop-shadow(-1px 0 0 var(--f-line)) drop-shadow(0 1px 0 var(--f-line)) drop-shadow(0 -1px 0 var(--f-line)); }
/* Il filtro fa di ogni cartella un livello: quella in uso sta sopra le altre, così i suoi menu (tag @, A chi, giorno)
   non finiscono sotto la cartella successiva */
.c3-folder:focus-within, .c3-folder:has(.c3-pop, .c3-due-pop, .c3-mention-list:not([hidden]), .dropdown-menu.show) { position: relative; z-index: 5; }
.c3-folder-tab { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 18px 0 0 0; background: var(--f); font-size: 0.95rem; font-weight: 800; color: var(--f-ink); }
.c3-folder-tab::after { content: ''; position: absolute; left: calc(100% - 1px); bottom: 0; width: 34px; height: 100%; background: var(--f); clip-path: path('M0 0 C 14 0 14 46 34 46 L 0 46 Z'); }
.c3-folder-body { padding: 18px 20px; border-radius: 0 20px 20px 20px; background: var(--f); color: #3f3a2e; }
.c3-plan { display: flex; flex-direction: column; gap: 8px; }
.c3-plan:empty { display: none; }
.c3-next-appt + .c3-plan:not(:empty) { margin-top: 10px; }
.c3-plan .c3-item { border-color: transparent; background: #ffffff; }
.c3-plan .c3-tl-skel { height: 44px; }
.c3-folder-empty { margin: 0; font-size: 0.85rem; color: var(--f-ink); opacity: 0.85; }
.c3-notes-empty { display: flex; align-items: center; gap: 7px; margin: 14px 0 0; font-size: 0.82rem; font-weight: 700; color: var(--c3-mute); }
.c3-notes-empty span { font-weight: 500; }
/* Note della richiesta nella testata: la linguetta nasce dalla riga dei campi, il foglio è parte della scheda */
.c3-head .c3-folder.notes { margin-top: 16px; }
.c3-head .c3-folder.notes .c3-folder-tab { height: 38px; padding: 0 18px; font-size: 0.88rem; }
.c3-head .c3-folder.notes .c3-folder-tab::after { width: 28px; clip-path: path('M0 0 C 12 0 12 38 28 38 L 0 38 Z'); }
.c3-head .c3-folder.notes .c3-folder-body { padding: 14px 18px; }
.c3-note-body { font-size: 0.9rem; line-height: 1.55; color: #3b3423; overflow-wrap: anywhere; }
/* Note come foglietto giallo sotto il contatto (nel riquadro tratteggiato): 4 righe, poi "Mostra tutto" */
.c3-sticky { --f-ink: #854d0e; position: relative; margin: 12px 4px 0; padding: 10px 14px 12px; border-radius: 4px 14px 14px 14px; background: #fef9c3; box-shadow: 0 1px 0 rgba(133, 77, 14, 0.08), 0 6px 14px -8px rgba(133, 77, 14, 0.35); font-size: 0.84rem; color: #422006; }
.c3-sticky-head { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--f-ink); }
.c3-sticky .c3-note-body.is-clamped { -webkit-line-clamp: 4; line-clamp: 4; }
.c3-sticky-add { font-size: 0.82rem; color: var(--f-ink); }
.c3-sticky-empty { margin: 0; color: #a16207; }
.c3-sticky:hover .c3-edit-btn, .c3-sticky:focus-within .c3-edit-btn { opacity: 1; }
.c3-sticky .c3-text-input { width: 100%; background: #fffef0; }
.c3-note-body.is-clamped { display: -webkit-box; -webkit-line-clamp: 8; line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
.c3-more { margin-top: 6px; padding: 0; border: 0; background: none; font-size: 0.8rem; font-weight: 800; color: var(--f-ink); cursor: pointer; }
.c3-note-disc { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; font-size: 0.76rem; font-weight: 700; color: var(--f-ink); }
.c3-note-disc img { width: 12px; height: 15px; }
.c3-note-ai-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 0.76rem; font-weight: 700; color: var(--f-ink); }
.c3-next-appt { display: flex; align-items: center; gap: 12px; }
.c3-next-date { display: flex; flex-direction: column; align-items: center; min-width: 76px; padding: 8px; border-radius: 12px; background: #ffffff; font-size: 0.8rem; font-weight: 700; color: var(--f-ink); }
.c3-next-date b { font-size: 0.86rem; color: var(--c3-ink); }
.c3-next-what { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.c3-next-what b { font-size: 0.9rem; color: var(--c3-ink); }
.c3-next-what small { font-size: 0.76rem; color: #5b5470; }
.c3-next-what .fa-bolt.is-on { color: #16a34a; }
.c3-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 1px solid var(--c3-line); border-radius: 999px; background: #ffffff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06); font: inherit; font-size: 0.78rem; font-weight: 800; color: var(--c3-ink) !important; text-decoration: none !important; white-space: nowrap; cursor: pointer; transition: background-color 0.15s ease, border-color 0.15s ease; }
.c3-chip > i { font-size: 0.7rem; color: var(--primary, #6366f1); }
.c3-chip:hover { border-color: color-mix(in srgb, var(--primary, #6366f1) 35%, #ffffff); background: color-mix(in srgb, var(--primary, #6366f1) 4%, #ffffff); }
.c3-chip:disabled { opacity: 0.45; cursor: not-allowed; }
.c3-folder-tab .c3-chip { height: 28px; border-color: transparent; } /* sul colore della linguetta basta la pillola bianca */
.c3-integr-list { display: flex; flex-direction: column; gap: 8px; }
.c3-integr-list .btn { display: flex; align-items: center; justify-content: flex-start; gap: 8px; width: 100%; margin: 0 !important; padding: 10px 12px; border: 0 !important; border-radius: 12px; background: #ffffff !important; font-size: 0.84rem; font-weight: 700; color: var(--c3-ink) !important; box-shadow: none !important; text-align: left; }

/* Focus visibile da tastiera su tutto ciò che si tocca */
.c3 :is(button, a, [tabindex]):focus-visible, #ModalOutcome :is(button, a, [tabindex]):focus-visible { outline: 2px solid var(--primary, #6366f1); outline-offset: 2px; }
/* Al clic (mouse/dito) niente cornice di focus del browser: resta solo da tastiera */
:is(.c3, #ModalOutcome, #ModalCall) :is(button, a, [tabindex]):focus:not(:focus-visible) { outline: none; box-shadow: none; }

/* Foglio "Com'è andata?" */
.c3-sheet .modal-title { font-size: 1.05rem; font-weight: 800; }
.c3-sheet-sub { display: block; margin-top: 2px; font-size: 0.78rem; color: var(--c3-mute); }
.c3-later { display: block; margin: 14px auto 0; color: var(--c3-mute); }
.c3-step-title { display: flex; align-items: center; gap: 8px; margin: 12px 0; font-size: 1rem; font-weight: 800; color: var(--c3-ink); }
.c3-disclose { margin-bottom: 14px; padding: 12px 14px; border-radius: 12px; background: #f8fafc; border: 1px solid #eef2f7; font-size: 0.84rem; line-height: 1.45; color: #334155; }
.c3-disclose.is-ok { background: #f0fdf4; border-color: #bbf7d0; }
.c3-disclose.is-warn { background: #fffbeb; border-color: #fde68a; }
.c3-disclose b { display: block; margin-bottom: 4px; }
.c3-block { width: 100%; justify-content: center; min-height: 42px; }
#ModalOutcome .c3-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Barra azioni (telefono) */
.c3-bar { display: none; }
.c3-bar-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 46px; padding: 0 10px; border: 1.5px solid #eef2f7; border-radius: 14px; background: #ffffff; font-size: 0.85rem; font-weight: 800; color: var(--c3-ink); text-decoration: none !important; cursor: pointer; }
.c3-bar-btn.is-call { border-color: transparent; background: var(--primary, #6366f1); color: #ffffff !important; }
.c3-bar-btn.is-wa { border-color: #bbf7d0; background: #f0fdf4; color: #15803d !important; }
.c3-bar-btn.is-disabled { color: #94a3b8; cursor: not-allowed; }
.c3-dot { position: absolute; top: 6px; right: 14px; width: 9px; height: 9px; border-radius: 50%; background: var(--st-new); box-shadow: 0 0 0 2px #ffffff; }

@media (max-width: 1399px) {
    .c3-grid { grid-template-columns: minmax(0, 1fr) 360px; }
}
/* La striscia e le frecce seguono la larghezza della card (che ora divide la riga con le Azioni) */
@container (max-width: 980px) {
    .c3-stages li { padding: 0 12px 0 20px; font-size: 0.8rem; }
    .c3-stages li small { font-size: 0.62rem; }
}
@container (max-width: 500px) {
    .c3-stages { overflow-x: auto; scrollbar-width: none; }
    .c3-stages li { flex: 0 0 auto; min-width: 116px; }
}
@media (max-width: 991px) {
    .c3-grid { grid-template-columns: minmax(0, 1fr); }
    /* Il lavoro: leggo le note, poi chiamo → le note della richiesta salgono sopra la cronologia */
    .c3-main, .c3-side { display: contents; }
    .c3-main > .c3-head { order: 0; }
    .c3-side > .c3-actions-card { order: 1; }
    .c3-side > .c3-folder.plan { order: 3; }
    .c3-side > .c3-folder.compose { order: 4; }
    .c3-main > .c3-next { order: 0; } /* subito sotto la testata */
    .c3-main > .c3-tl-wrap { order: 5; }
    .c3-side > .c3-folder { order: 6; }
    .c3-stages li { padding: 0 16px; font-size: 0.8rem; }
}
@media (max-width: 767px) {
    .c3 { gap: 14px; padding-bottom: 96px; }
    .c3-card { padding: 16px; border-radius: 16px; }
    .c3-client { flex-wrap: wrap; }
    .c3-avatar { flex-basis: 52px; width: 52px; height: 52px; }
    .c3-name { font-size: 1.2rem; }
    .c3[data-entity="contacts"] .c3-client .c3-avatar, .c3[data-entity="agencies"] .c3-client .c3-avatar { flex-basis: 64px; width: 64px; height: 64px; }
    .c3[data-entity="contacts"] .c3-name, .c3[data-entity="agencies"] .c3-name { font-size: 1.4rem; }
    .c3-side > .c3-actions-card { display: none; } /* sul telefono c'è la barra in basso */
    .c3-when-chips button, .c3-composer-modes button { min-height: 36px; }
    .c3-field { padding: 0 12px; }
    .c3-stages { overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
    .c3-stages::-webkit-scrollbar { display: none; }
    .c3-stages li { flex: 0 0 auto; min-width: 118px; height: 46px; }
    .c3-tiles, #ModalOutcome .c3-tiles { grid-template-columns: minmax(0, 1fr); }
    .c3-tl { padding: 4px 14px 0; }
    .c3-tl-scroll { max-height: none; margin-right: 0; padding-right: 0; overflow: visible; order: 2; }
    .c3-item-body, .c3-msg-toggle, .c3-msg, .c3-item-actions { margin-left: 0; }
    .c3-bar { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabbar-h, 64px) + 22px + env(safe-area-inset-bottom)); z-index: 1030; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; max-width: 440px; margin: 0 auto; padding: 8px; border: 1px solid rgba(255, 255, 255, 0.7); border-radius: 20px; background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12); }
    body.modal-open .c3-bar, .myb-typing .c3-bar { display: none; }
}
@media (prefers-reduced-motion: reduce) { .c3-tl-skel { animation: none; } }

/* "Configurala": pulsantino che porta in Automazioni (automazione disattivata o non configurata) */
.bks-auto-fix { display: inline-flex; align-items: center; gap: 5px; margin-left: 6px; padding: 3px 10px; border-radius: 999px; background: var(--primary, #6366f1); font-size: 0.74rem; font-weight: 800; color: #ffffff !important; text-decoration: none !important; white-space: nowrap; vertical-align: middle; }
.bks-auto-fix:hover { filter: brightness(1.08); }
.bks-auto-fix i { font-size: 0.68rem; }

/* Modifica al volo (immobile, consulente): la lista Select2 come gli altri menu della scheda, compatta */
.c3-pop { width: min(300px, 86vw); }
.c3-pop .select2-dropdown { padding: 6px; border-radius: 14px !important; }
.c3-pop .select2-search--dropdown { padding: 0 0 6px; }
.c3-pop .select2-search--dropdown .select2-search__field { height: 36px; padding: 0 10px 0 32px; border: 1.5px solid var(--c3-line) !important; border-radius: 10px !important; box-shadow: none !important; outline: none; font-size: 0.84rem;
    background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Ccircle cx='6' cy='6' r='4.5'/%3E%3Cpath d='M9.5 9.5 13 13'/%3E%3C/svg%3E") no-repeat 10px center; }
.c3-pop .select2-search--dropdown .select2-search__field:focus { border-color: color-mix(in srgb, var(--primary, #6366f1) 45%, #ffffff) !important; }
.c3-pop .select2-results__options { max-height: 240px !important; }
.c3-pop .select2-results__option { margin: 0 !important; padding: 7px 10px !important; border: 0 !important; border-radius: 8px !important; background: none !important; font-size: 0.84rem; font-weight: 600; color: var(--c3-ink) !important; }
.c3-pop .select2-results__option--highlighted { background: #f1f5f9 !important; }
.c3-pop .select2-results__option[aria-selected="true"] { background: color-mix(in srgb, var(--primary, #6366f1) 8%, #ffffff) !important; color: var(--primary, #6366f1) !important; }

/* Foglio "Com'è andata?": stessi colori della scheda (il modale sta fuori da .c3) e titolo normale, non maiuscolo */
.c3-sheet { --c3-line: #e9edf3; --c3-ink: #1c2434; --c3-mute: #64748b; }
.c3-sheet .modal-header { align-items: flex-start; border-bottom: 1px solid var(--c3-line); background: #ffffff; }
.c3-sheet .modal-title { font-size: 1.05rem; font-weight: 800; letter-spacing: 0; text-transform: none; color: var(--c3-ink); }
.c3-step-sub { margin: -4px 0 12px; font-size: 0.84rem; color: var(--c3-mute); }

.c3-folder.is-focus .c3-folder-body { animation: c3-focus 2.4s ease-out both; }

/* il pulsante Configurala dentro le righe dell'automazione: i colori del pulsante, non quelli della riga */
.bks-auto-check .bks-auto-fix, .bks-auto .bks-auto-fix { background: var(--primary, #6366f1) !important; color: #ffffff !important; }

.bks-auto .bks-auto-fix.is-light { border: 1px solid #bbf7d0; background: #ffffff !important; color: #15803d !important; cursor: pointer; }
/* Nella riga Klaila basta il logo: niente icona in più accanto al titolo */
.c3-next .c3-ask-txt > i { display: none; }

/* Esito senza automazione: "Mandagli tu un WhatsApp" come suggerimento principale */
.bks-auto-suggest { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 10px; padding: 10px 12px; border: 1.5px solid #bbf7d0; border-radius: 12px; background: #ffffff; text-align: left; cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease; }
.bks-auto-suggest:hover { border-color: #4ade80; background: #f0fdf4; }
.bks-auto-suggest > i:first-child { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: #dcfce7; font-size: 1.05rem; color: #16a34a; }
.bks-auto-suggest span { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; }
.bks-auto-suggest b { font-size: 0.88rem; color: #14532d; }
.bks-auto-suggest small { font-size: 0.74rem; color: #64748b; }
.bks-auto-suggest > .fa-chevron-right { font-size: 0.7rem; color: #16a34a; }

/* Non risponde: scelte manuali (senza licenza) e attività Richiamare */
.bks-nr { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.bks-nr[hidden] { display: none; }
.bks-nr-opt { display: flex; align-items: center; gap: 12px; margin: 0; padding: 10px 12px; border: 1.5px solid #e9edf3; border-radius: 12px; background: #ffffff; cursor: pointer; }
.bks-nr-opt input { flex: 0 0 auto; width: 18px; height: 18px; accent-color: var(--primary, #6366f1); }
.bks-nr-opt span { display: flex; flex-direction: column; min-width: 0; }
.bks-nr-opt b { font-size: 0.88rem; color: #1c2434; }
.bks-nr-opt small { font-size: 0.74rem; color: #64748b; }
.bks-nr-opt:has(input:checked) { border-color: color-mix(in srgb, var(--primary, #6366f1) 40%, #ffffff); background: color-mix(in srgb, var(--primary, #6366f1) 4%, #ffffff); }
.bks-nr .bks-auto-suggest { margin-top: 0; }
/* "Configurala" nella riga dell'automazione: su una riga sua, sotto il messaggio, piccolo e ordinato */
.bks-auto-check .bks-auto-fix, .bks-auto .bks-auto-fix:not(.is-light) { display: flex; width: max-content; margin: 8px 0 0; padding: 5px 12px; border: 1px solid color-mix(in srgb, var(--primary, #6366f1) 30%, #ffffff); border-radius: 8px; background: #ffffff !important; font-size: 0.76rem; font-weight: 800; color: var(--primary, #6366f1) !important; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06); }
.bks-auto-check .bks-auto-fix:hover { background: color-mix(in srgb, var(--primary, #6366f1) 6%, #ffffff) !important; filter: none; }

/* Fase incompleta (feedback ancora da raccogliere): righe diagonali verdi, si capisce che manca qualcosa */
.c3-stages li.is-current.tone-partial { background: repeating-linear-gradient(135deg, var(--st-ok-soft) 0 9px, color-mix(in srgb, var(--st-ok) 22%, #ffffff) 9px 18px); color: var(--st-ok-ink); }
.c3-stages li.is-current.tone-partial small { opacity: 1; }

.c3-status-menu .c3-status-group { margin-top: 4px; padding: 6px 10px 2px; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #94a3b8; }
.c3-status-menu .c3-status-group:first-child { margin-top: 0; }
.c3-status-menu { max-height: 70vh; overflow-y: auto; }

/* Prossimo passo dopo l'esito (Non risponde / In attesa) */
.bks-next { margin-top: 12px; padding: 12px; border: 1.5px solid #e9edf3; border-radius: 12px; background: #ffffff; }
.bks-next[hidden] { display: none; }
.bks-next > b { display: block; margin-bottom: 8px; font-size: 0.88rem; color: #1c2434; }
.bks-next-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bks-next-chips button { padding: 6px 12px; border: 1px solid #e9edf3; border-radius: 20px; background: #ffffff; font-size: 0.8rem; font-weight: 700; color: #475569; cursor: pointer; }
.bks-next-chips button.is-active { border-color: var(--primary, #6366f1); background: color-mix(in srgb, var(--primary, #6366f1) 8%, #ffffff); color: var(--primary, #6366f1); }
.bks-next-chips button[data-next-days=""].is-active { border-color: #cbd5e1; background: #f1f5f9; color: #64748b; }
.c3-item-note { margin: 6px 0 0 34px; padding: 8px 10px; border-radius: 10px; background: #fffbeb; font-size: 0.82rem; line-height: 1.45; color: #3f3a2e; }
.c3-item-note i { margin-right: 4px; color: #b45309; }
@media (max-width: 767px) { .c3-item-note { margin-left: 0; } }
.c3-item.kind-survey { --it-bg: #f0fdf4; --it-line: #bbf7d0; --it-ico: #15803d; }
.c3-survey { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin: 10px 0 0 40px; }
.c3-sv-row { padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.75); }
.c3-sv-row[hidden] { display: none; }
.c3-survey dt { margin: 0 0 3px; font-size: 0.72rem; font-weight: 600; line-height: 1.35; color: var(--c3-mute); }
.c3-survey dd { margin: 0; font-size: 0.88rem; font-weight: 700; color: var(--c3-ink); }
.c3-sv-more { margin: 8px 0 0 40px; font-size: 0.78rem; }
@media (max-width: 767px) { .c3-survey, .c3-sv-more { margin-left: 0; } }
.c3-feedback { margin: 10px 0 0 40px; padding: 10px 12px; border-left: 3px solid #22c55e; border-radius: 10px; background: rgba(255, 255, 255, 0.75); font-size: 0.88rem; line-height: 1.5; color: var(--c3-ink); white-space: pre-line; }
@media (max-width: 767px) { .c3-feedback { margin-left: 0; } }

/* ── Barra in alto, desktop (DESIGN.md §33) ──────────────────────────────────────────────────────────────
   Niente barra: a sinistra il titolo della pagina, grande; a destra una sola capsula (ricerca, notifiche,
   strumenti, profilo). Il markup resta quello di Page::GetHeader (il telefono lo usa per l'app bar, .myb-app):
   le liste diventano "display: contents" e ogni voce si mette al suo posto con "order". */
html.myb-shell:not(.myb-app) .page-header { position: relative !important; top: auto !important; left: auto !important; width: auto !important; z-index: 1020; margin: 10px 15px 18px; padding: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; }
html.myb-shell:not(.myb-app) .page-header .navbar { display: flex !important; align-items: center; gap: 0; min-height: 58px; padding: 0 !important; background: transparent !important; flex-wrap: nowrap; }
html.myb-shell:not(.myb-app) .page-header .navbar > .navbar-nav,
html.myb-shell:not(.myb-app) .page-header #navbarNav,
html.myb-shell:not(.myb-app) .page-header #navbarNav > .navbar-nav,
html.myb-shell:not(.myb-app) .page-header .navbar-nav form,
html.myb-shell:not(.myb-app) .page-header .navbar-nav form > div[style] { display: contents !important; }
html.myb-shell:not(.myb-app) .page-header .navbar-toggler,
html.myb-shell:not(.myb-app) .page-header .myb-appbar-back,
html.myb-shell:not(.myb-app) .page-header .myb-appbar-home,
html.myb-shell:not(.myb-app) .page-header .myb-appbar-search,
/* nel lanciatore */
html.myb-shell:not(.myb-app) .page-header li:has(> a[href*="/agenda/personal/view"]),
html.myb-shell:not(.myb-app) .page-header li:has(> #wa_navbar_btn),
html.myb-shell:not(.myb-app) .page-header li:has(> a[data-target="#menuModal"]),
html.myb-shell:not(.myb-app) .page-header li:has(> a[data-remote*="AttendanceRegister"]) { display: none !important; }
html.myb-shell:not(.myb-app) .page-content { margin-top: 0 !important; } /* il tema lasciava spazio a una barra fissa */
html.myb-shell:not(.myb-app) .page-content > .page-info { display: none; }

/* Sotto i 1200px il tema nasconde la barra laterale: il pulsante ☰ per aprirla va per primo */
html.myb-shell:not(.myb-app) .page-header .small-screens-sidebar-link { order: -1; margin-right: 10px; }
@media (min-width: 1200px) { html.myb-shell:not(.myb-app) .page-header .small-screens-sidebar-link { display: none !important; } }

/* Titolo della pagina: è lui la testata */
/* contain: un titolo lungo (es. "Richiesta · Nome · BUY…") si taglia con i puntini invece di allargare la pagina */
html.myb-shell:not(.myb-app) .page-header .myb-appbar-title { display: block !important; order: 0; flex: 1 1 auto; min-width: 0; contain: inline-size; margin: 0 24px 0 4px; overflow: hidden; color: #0f172a; font-size: 1.55rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; white-space: nowrap; text-overflow: ellipsis; }

/* Capsula: le voci sono elementi separati, insieme fanno un'unica pillola bianca */
html.myb-shell:not(.myb-app) .page-header li:has(.myb-search-pill),
html.myb-shell:not(.myb-app) .page-header li:has(#notifTrigger),
html.myb-shell:not(.myb-app) .page-header .myb-cap-act,
html.myb-shell:not(.myb-app) .page-header .myb-launcher,
html.myb-shell:not(.myb-app) .page-header .nav-profile { position: relative; display: flex !important; align-items: center; height: 52px; margin: 0; padding: 0 3px; background: #fff; border-block: 1px solid rgba(15, 23, 42, 0.07); box-shadow: 0 10px 24px -14px rgba(15, 23, 42, 0.28); }
html.myb-shell:not(.myb-app) .page-header li:has(.myb-search-pill) { order: 2; padding-left: 6px; border-left: 1px solid rgba(15, 23, 42, 0.07); border-radius: 999px 0 0 999px; }
html.myb-shell:not(.myb-app) .page-header li:has(#notifTrigger) { order: 3; }
/* Senza ricerca (il proprietario) la capsula comincia dalla campanella: anche lei va arrotondata */
html.myb-shell:not(.myb-app) .page-header .navbar:not(:has(.myb-search-pill)) li:has(#notifTrigger) { padding-left: 6px; border-left: 1px solid rgba(15, 23, 42, 0.07); border-radius: 999px 0 0 999px; }
/* Attività: voce centrale, subito dopo la ricerca (nel lanciatore resta solo sul telefono) */
html.myb-shell:not(.myb-app) .page-header .myb-cap-act { order: 2; }
html.myb-shell:not(.myb-app) .page-header .myb-launch-menu [data-myb-launch-act] { display: none; }
html.myb-shell:not(.myb-app) .page-header .myb-launcher { order: 4; }
html.myb-shell:not(.myb-app) .page-header .nav-profile { order: 5; padding-right: 6px; border-right: 1px solid rgba(15, 23, 42, 0.07); border-radius: 0 999px 999px 0; }
/* Stai usando l'account di un altro utente: fuori dalla capsula, prima, ben visibile */
html.myb-shell:not(.myb-app) .page-header li:has(.myb-embody-end),
html.myb-shell:not(.myb-app) .page-header li:has(> a[data-target="#superadminEmbodyModal"]) { order: 1; display: flex; margin-right: 10px; }

/* Pulsanti della capsula: tondi, senza bordi né ombre */
html.myb-shell:not(.myb-app) .page-header .navbar ul.navbar-nav > li > a.nav-link,
html.myb-shell:not(.myb-app) .page-header .navbar-nav li > button.nav-link { position: relative; display: inline-flex !important; align-items: center; justify-content: center; gap: 6px; width: 42px; height: 42px; padding: 0 !important; margin: 0; border: 0 !important; border-radius: 999px; background: transparent !important; box-shadow: none !important; color: #475569 !important; transition: background 0.15s ease, color 0.15s ease; }
html.myb-shell:not(.myb-app) .page-header .navbar ul.navbar-nav > li > a.nav-link:hover,
html.myb-shell:not(.myb-app) .page-header .navbar-nav li > button.nav-link:hover,
html.myb-shell:not(.myb-app) .page-header .navbar ul.navbar-nav > li.show > a.nav-link { background: #f1f5f9 !important; color: #0f172a !important; }
html.myb-shell:not(.myb-app) .page-header .navbar ul.navbar-nav > li > a.nav-link:focus-visible,
html.myb-shell:not(.myb-app) .page-header .navbar-nav li > button.nav-link:focus-visible { outline: 2px solid var(--myb-cyan); outline-offset: 2px; }
html.myb-shell:not(.myb-app) .page-header .navbar-nav .nav-link i { margin: 0 !important; font-size: 22px !important; line-height: 1 !important; vertical-align: middle !important; }

/* Ricerca: un campo grigio dentro la capsula, con la scorciatoia */
html.myb-shell:not(.myb-app) .page-header .myb-search-pill { display: flex; align-items: center; width: clamp(200px, 22vw, 320px); min-width: 0; height: 42px; margin: 0; padding: 0 5px 0 14px !important; border: 0 !important; border-radius: 999px !important; background: #f1f5f9 !important; box-shadow: none !important; }
html.myb-shell:not(.myb-app) .page-header .myb-search-pill::after,
html.myb-shell:not(.myb-app) .page-header .myb-search-pill::before { display: none !important; }
html.myb-shell:not(.myb-app) .page-header .myb-search-pill:hover { background: #e9eef5 !important; }
html.myb-shell:not(.myb-app) .page-header .myb-search-pill-text { display: flex; align-items: center; gap: 8px; color: #64748b; font-size: 0.9rem; font-weight: 500; }
html.myb-shell:not(.myb-app) .page-header .myb-search-pill-text i { margin: 0 !important; font-size: 20px !important; line-height: 1 !important; vertical-align: middle !important; }
html.myb-shell:not(.myb-app) .page-header .myb-search-kbd { margin-left: auto; padding: 2px 9px; border: 1px solid #dbe2ea; border-radius: 999px; background: #fff; color: #64748b; font: 600 0.72rem/1.4 inherit; box-shadow: none; }
html.myb-shell:not(.myb-app) .page-header .myb-search-pill-mic { width: 32px; height: 32px; margin-left: 6px; }
.myb-app .myb-search-kbd { display: none; }

/* Notifiche: il numero sull'icona */
html.myb-shell:not(.myb-app) .page-header #notifBadge { position: absolute; top: 4px; left: auto; right: 0; min-width: 18px; width: auto; height: 18px; padding: 0 5px; border-radius: 9px; font-size: 10.5px; line-height: 18px; pointer-events: none; }

/* Lanciatore: griglia di riquadri */
html.myb-shell:not(.myb-app) .page-header .myb-launch-menu { position: absolute !important; top: 100% !important; right: -4px !important; left: auto !important; transform: none !important; width: 312px; margin-top: 12px; padding: 10px; border: 1px solid rgba(15, 23, 42, 0.08); border-radius: 18px; box-shadow: 0 20px 44px rgba(15, 23, 42, 0.16); }
html.myb-shell:not(.myb-app) .page-header .myb-launch-menu.show { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
/* "Torna alla versione precedente" nel menu utente: secondaria, più piccola delle voci vere (Profilo, Sessioni) */
.dropdown-menu a.dropdown-item.myb-v3-switch { padding-top: 6px; padding-bottom: 6px; font-size: 0.85rem; font-weight: 500; }
.myb-launch-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 84px; padding: 10px 6px; border-radius: 14px; color: #334155; font-size: 0.8rem; font-weight: 700; text-align: center; text-decoration: none; transition: background 0.15s ease; }
.myb-launch-tile:hover, .myb-launch-tile:focus-visible { background: #f1f5f9; color: #0f172a; text-decoration: none; }
.myb-launch-tile i { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #f1ecfa; color: #5b2a86; font-size: 22px; }
.myb-launch-tile small { margin-top: -4px; color: #94a3b8; font-size: 0.68rem; font-weight: 600; }
.myb-launcher.is-wa-on .myb-launch-wa { color: var(--st-ok); }
.myb-launcher.is-wa-off .myb-launch-wa { color: var(--st-lost); }
/* WhatsApp scollegato o in connessione: un pallino sul lanciatore, perché va sistemato */
.myb-launch-dot { display: none; position: absolute; top: 8px; right: 8px; width: 9px; height: 9px; border: 2px solid #fff; border-radius: 50%; }
.myb-launcher.is-wa-off .myb-launch-dot { display: block; background: var(--st-lost); }
.myb-launcher.is-wa-wait .myb-launch-dot { display: block; background: var(--st-pending); }

/* Profilo: foto e nome dentro la capsula, menu sotto */
html.myb-shell:not(.myb-app) .page-header .navbar ul.navbar-nav > li.nav-profile > a.nav-link { width: auto; height: 42px; gap: 8px; padding: 0 10px 0 3px !important; }
html.myb-shell:not(.myb-app) .page-header .nav-profile img { width: 36px !important; height: 36px !important; margin: 0 !important; border-radius: 50%; object-fit: cover; }
html.myb-shell:not(.myb-app) .page-header .nav-profile .dropdown-toggle > span { display: none; }
html.myb-shell:not(.myb-app) .page-header .nav-profile .myb-appbar-name { display: inline !important; color: #0f172a; font-size: 0.9rem; font-weight: 700; }
html.myb-shell:not(.myb-app) .page-header .nav-profile .dropdown-icon { margin: 0 !important; font-size: 18px !important; color: #94a3b8; }
html.myb-shell:not(.myb-app) .page-header .nav-profile .dropdown-toggle::after { display: none; }
html.myb-shell:not(.myb-app) .page-header .nav-profile .dropdown-menu { right: 0; left: auto; margin-top: 12px; border-radius: 14px; }

/* "Torna al tuo utente" */
html.myb-shell:not(.myb-app) .page-header .navbar-nav li > button.myb-embody-end { width: auto; height: 42px; padding: 0 14px !important; background: var(--st-pending-soft) !important; color: var(--st-pending-ink) !important; font-size: 0.82rem; font-weight: 700; }
html.myb-shell:not(.myb-app) .page-header .navbar-nav li > button.myb-embody-end:hover { background: #fde68a !important; color: var(--st-pending-ink) !important; }
html.myb-shell:not(.myb-app) .page-header .myb-embody-end i { font-size: 18px !important; }
.myb-app .myb-embody-label { display: none; }

/* ── App bar del telefono: mini capsula (DESIGN.md §33) ──────────────────────────────────────────────────
   Ricerca, Strumenti e profilo in un'unica pillola di vetro (prima: cerchi separati) */
.myb-app .page-header .navbar > .navbar-nav { gap: 2px; padding: 3px; border: 1px solid rgba(255, 255, 255, 0.9); border-radius: 999px; background: rgba(255, 255, 255, 0.78); box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08), inset 0 1px 1px #fff; backdrop-filter: blur(12px) saturate(180%); -webkit-backdrop-filter: blur(12px) saturate(180%); }
.myb-app .page-header .navbar > ul.navbar-nav > li > a.nav-link,
.myb-app .page-header .navbar > ul.navbar-nav form button.nav-link { width: 36px; height: 36px; border: 0 !important; background: transparent !important; box-shadow: none !important; backdrop-filter: none; -webkit-backdrop-filter: none; }
.myb-app .page-header .myb-appbar-search { order: 1; }
.myb-app .page-header .myb-launcher { order: 2; position: relative; }
.myb-app .page-header .nav-profile { order: 3; }
.myb-app .page-header .nav-profile img { width: 32px !important; height: 32px !important; box-shadow: none; }
.myb-app .page-header .nav-profile .myb-appbar-name { margin-right: 8px; }
.myb-app .page-header .navbar-nav form > div[style] > li > button.myb-embody-end { color: var(--st-pending-ink) !important; }
.myb-app .myb-launch-dot { top: 5px; right: 5px; }
/* Strumenti sul telefono: foglio dal basso, sopra la barra delle schede */
.myb-launch-sheet { position: fixed; inset: 0; z-index: 1100; }
.myb-launch-sheet[hidden] { display: none; }
.myb-launch-sheet__veil { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.35); animation: mybLaunchFade 0.2s ease-out; }
.myb-launch-sheet__panel { position: absolute; left: 10px; right: 10px; bottom: calc(var(--tabbar-h, 64px) + 22px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 12px; border-radius: 24px; background: #fff; box-shadow: 0 20px 44px rgba(15, 23, 42, 0.2); animation: mybLaunchUp 0.22s ease-out; }
@keyframes mybLaunchUp { from { opacity: 0; transform: translateY(16px); } }
@keyframes mybLaunchFade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .myb-launch-sheet__veil, .myb-launch-sheet__panel { animation: none; } }

/* ── Schede v3: allegati, etichette, procedure, storico, cestino (DESIGN.md §34) ───────────────────────── */
/* Fonte e annuncio sotto il nome dell'opportunità */
.c3-srcs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; }
.c3-src { display: inline-flex; align-items: center; gap: 2px; }
.c3-src .c3-link { font-size: 0.78rem; text-decoration: none; }
.c3-src-k { margin-right: 2px; color: var(--c3-mute); }
.c3-zone { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* Etichette */
.c3-tags { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--c3-line); }
.c3-tags > .fa-hashtag { color: #94a3b8; font-size: 0.8rem; }
.c3-tag { display: inline-flex; align-items: center; gap: 4px; }
.c3-tag button { padding: 0 2px; border: 0; background: none; font-size: 0.95rem; line-height: 1; color: inherit; opacity: 0.6; cursor: pointer; }
.c3-tag button:hover, .c3-tag button:focus-visible { opacity: 1; }
.c3-type-pill.c3-tag-add { padding-right: 10px; background-image: none; }
/* "+ Etichetta" (MYB.Card3 pickOpen): menu fisso sul body sotto il pulsante (sopra se manca spazio); sul telefono un
   foglio dal basso. Righe: casella + chip com'è nella scheda; evidenziata = sfondo grigio, messa = casella spuntata */
.c3-tag-pop { position: fixed; z-index: 1060; display: flex; flex-direction: column; width: 320px; max-width: calc(100vw - 16px); max-height: min(440px, calc(100vh - 24px));
    padding: 8px; border: 1px solid rgba(15, 23, 42, 0.08); border-radius: 14px; background: #ffffff; box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18); }
.c3-tp-grab { display: none; }
.c3-tp-search { position: relative; flex: 0 0 auto; }
.c3-tp-search i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); font-size: 0.78rem; color: #94a3b8; }
.c3-tp-search input { width: 100%; height: 36px; padding: 0 10px 0 30px; border: 1.5px solid var(--c3-line, #e2e8f0); border-radius: 10px; font-size: 0.84rem; outline: none; }
.c3-tp-search input:focus { border-color: color-mix(in srgb, var(--primary, #6366f1) 45%, #ffffff); }
.c3-tp-list { flex: 1 1 auto; min-height: 0; margin-top: 4px; overflow-y: auto; }
.c3-tp-row { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 4px 8px; border-radius: 8px; cursor: pointer; }
.c3-tp-row.is-hi { background: #f1f5f9; }
.c3-tp-row .c3-tp-box { flex: 0 0 16px; font-size: 0.95rem; color: #94a3b8; text-align: center; }
.c3-tp-row[aria-checked="true"] .c3-tp-box { color: #334155; }
.c3-tp-row .c3-tag { flex: 0 1 auto; min-width: 0; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.c3-tp-row.is-disabled { cursor: default; opacity: 0.7; }
.c3-tp-row.is-busy { pointer-events: none; }
.c3-tp-row.is-new { color: var(--primary, #6366f1); font-size: 0.82rem; font-weight: 700; }
.c3-tp-row.is-new small { color: #94a3b8; font-weight: 600; }
.c3-tp-auto { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; font-size: 0.7rem; color: #b45309; }
.c3-tp-confirm { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; margin: 2px 8px 6px 32px; padding: 8px 10px; border-radius: 10px; background: var(--st-pending-soft, #fef3c7); color: var(--st-pending-ink, #78350f); font-size: 0.78rem; font-weight: 600; }
.c3-tp-confirm span { display: inline-flex; align-items: center; gap: 8px; }
.c3-tp-empty, .c3-tp-similar { margin: 8px 8px 4px; font-size: 0.78rem; color: #64748b; }
.c3-tp-similar { color: #b45309; }
.c3-tp-foot { display: none; }
/* Le etichette nel menu (sul body, fuori dalla testata): stesso aspetto della scheda */
.c3-tag-pop .c3-tag { position: relative; display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px 0 15px; border-radius: 0 6px 6px 0; background: #eef2f7; color: #334155;
    font-size: 0.74rem; font-weight: 600; white-space: nowrap; clip-path: polygon(7px 0, 100% 0, 100% 100%, 7px 100%, 0 50%); }
.c3-tag-pop .c3-tag::before { content: ''; position: absolute; left: 6px; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%; background: #ffffff; }
.c3-tag-pop .c3-tag.c3-cat { background: #dde4ed; color: #0f172a; font-weight: 700; }
.c3-tag-pop .c3-tag.is-auto::before { background: var(--st-pending, #f59e0b); }
.c3-tag-pop .c3-tag.is-auto > i { font-size: 0.64rem; color: #d97706; }
@media (max-width: 767px) {
    .c3-tag-pop.is-sheet { left: 0 !important; right: 0; top: auto !important; bottom: 0; width: auto; max-width: none; max-height: 75vh; padding: 8px 12px calc(12px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; }
    .c3-tag-pop.is-sheet .c3-tp-grab { display: block; width: 36px; height: 4px; margin: 2px auto 10px; border-radius: 2px; background: #cbd5e1; }
    .c3-tag-pop.is-sheet .c3-tp-row { min-height: 44px; }
    .c3-tag-pop.is-sheet .c3-tp-foot { display: flex; justify-content: flex-end; padding-top: 8px; }
}
.c3-asg-list button.is-new { color: #5b21b6; }
/* Linguetta di una cartella con un'azione (Procedura, Carica) */
.c3-tab-act { margin-left: 8px; }
/* Allegati */
.c3-files { display: flex; flex-direction: column; gap: 8px; }
.c3-file { padding: 8px 10px; border: 1px solid var(--c3-line); border-radius: 12px; background: #ffffff; }
.c3-file-main { display: flex; align-items: center; gap: 8px; min-width: 0; }
.c3-file-main > i { color: #64748b; font-size: 1.05rem; }
.c3-file-main a, .c3-file-main > span { flex: 1; min-width: 0; overflow: hidden; font-size: 0.85rem; font-weight: 700; color: var(--c3-ink); text-overflow: ellipsis; white-space: nowrap; }
.c3-file > small { display: block; margin: 3px 0 0 26px; font-size: 0.74rem; color: var(--c3-mute); }
.c3-file.is-staged { border-style: dashed; border-color: #a7d7b9; background: #f6fdf9; }
.c3-file-cats { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.c3-file-cats .c3-type-pill { padding-right: 10px; background-image: none; }
.c3-type-pill.is-on { border-style: solid; border-color: #15803d; background: #dcfce7; color: #14532d; }
.c3-file progress { width: 100%; height: 6px; margin-top: 8px; accent-color: #16a34a; }
.c3-file-err { margin: 6px 0 0; font-size: 0.78rem; color: var(--st-lost-dark); }
.c3-file-go { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 4px; }
/* Cartella Allegati = zona per caricare al volo (l'elenco è nella linguetta Allegati) */
.c3-drop { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border: 1.5px dashed #9fd3b5; border-radius: 14px; background: rgba(255, 255, 255, 0.65); text-align: left; color: #14532d; cursor: pointer; transition: background 0.15s ease, border-color 0.15s ease; }
.c3-drop > i { font-size: 1.4rem; color: #16a34a; }
.c3-drop b { display: block; font-size: 0.86rem; }
.c3-drop small { display: block; font-size: 0.74rem; color: var(--c3-mute); }
.c3-drop:hover, .c3-drop:focus-visible { border-color: #16a34a; background: #ffffff; }
.c3-folder.files.is-drop .c3-drop { border-color: #16a34a; background: #ecfdf3; }
.c3-folder.files [data-c3-files-open] { align-self: flex-start; font-size: 0.8rem; }
.c3-tabs button[data-c3-filter="allegati"] { --t: #dcf5e7; --t-ink: #166534; --t-ico: #16a34a; }
.c3-tl.is-files.is-drop { box-shadow: inset 0 0 0 2px #16a34a; }
/* Caricato da destra: la copia del file vola nella linguetta Allegati, che fa un saltello */
.c3-fly { position: fixed; z-index: 2000; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #a7d7b9; border-radius: 12px; background: #ffffff; box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18); font-size: 0.85rem; font-weight: 700; color: var(--c3-ink); white-space: nowrap; overflow: hidden; pointer-events: none; transition: transform 0.6s cubic-bezier(0.55, 0, 0.7, 0.2), opacity 0.6s ease-in; }
.c3-fly > i { color: #16a34a; }
.c3-fly > span { overflow: hidden; text-overflow: ellipsis; }
.c3-tabs button.is-bump { animation: c3-bump 0.6s ease-out; }
@keyframes c3-bump { 0% { transform: none; } 35% { transform: translateY(-4px) scale(1.08); } 70% { transform: translateY(1px); } 100% { transform: none; } }
.c3-file.is-new { animation: c3-enter 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.25) both, c3-glow 2.2s ease-out 0.35s both; }
.c3-file-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-bottom: 4px; font-size: 0.74rem; color: var(--c3-mute); }
.c3-file-filters > span { margin-right: 2px; font-weight: 700; }
.c3-file-filter { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border: 1px solid var(--c3-line); border-radius: 999px; background: #ffffff; font-size: 0.74rem; font-weight: 700; color: #475569; cursor: pointer; }
.c3-file-filter span { font-weight: 800; color: #94a3b8; }
.c3-file-filter:hover { border-color: #94a3b8; }
.c3-file-filter[aria-pressed="true"] { border-color: #16a34a; background: #ecfdf3; color: #14532d; }
.c3-file-filter[aria-pressed="true"] span { color: #16a34a; }
/* Procedura in "In programma": avanzamento, passi da fare, il primo bloccato */
.c3-proc { margin: 8px 0; padding: 10px; border: 1px solid #ddd6fe; border-radius: 14px; background: #faf8ff; }
.c3-proc-head { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 0.86rem; font-weight: 800; color: #4c1d95; }
.c3-proc-head > span:not(.sr-only) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c3-proc-head .c3-status-dot { --st: #7c3aed; }
.c3-proc-fold { display: inline-flex; align-items: center; gap: 6px; margin: 2px 0 6px; font-size: 0.78rem; text-decoration: none; }
.c3-todo-check.is-locked { display: inline-flex; align-items: center; justify-content: center; border-style: dashed; background: #f1f5f9; font-size: 0.7rem; color: #64748b; }
.c3-item-sub { margin: 2px 0 0 40px; font-size: 0.76rem; color: var(--c3-mute); }
.c3-when-btn { position: relative; padding: 0; border: 0; background: none; cursor: pointer; }
.c3-when-btn:hover .c3-when-chip { text-decoration: underline; }
.c3-due-pop { top: calc(100% + 4px); bottom: auto; right: 0; left: auto; width: 200px; }
.c3-due-pop button { padding: 8px 10px; border: 0; border-radius: 8px; background: none; font-size: 0.82rem; font-weight: 600; text-align: left; cursor: pointer; }
.c3-due-pop button:hover { background: #f5f3ff; }
.c3-due-pop input { margin: 6px 0 0; }
.c3-item.kind-procedure, .c3-item.kind-activity_deleted, .c3-item.kind-file, .c3-item.kind-changes { --it-bg: #ffffff; --it-line: var(--c3-line); --it-ico: #64748b; }
/* Scelta della procedura */
.c3-proc-list { display: flex; flex-direction: column; gap: 8px; }
.c3-proc-opt { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1.5px solid var(--c3-line); border-radius: 12px; background: #ffffff; text-align: left; cursor: pointer; }
.c3-proc-opt.is-on { border-color: #7c3aed; background: #faf8ff; }
.c3-proc-opt small { font-size: 0.78rem; color: var(--c3-mute); }
.c3-proc-steps { margin: 6px 0 0; padding-left: 18px; font-size: 0.78rem; color: var(--c3-ink); }
.c3-proc-steps .is-more { list-style: none; color: var(--c3-mute); }
.c3-proc-warn { margin: 0; font-size: 0.78rem; color: var(--st-pending-ink); }
/* Storico: prima → dopo */
.c3-changes { display: grid; gap: 4px; margin: 6px 0 0 40px; font-size: 0.8rem; }
.c3-changes > div { display: grid; grid-template-columns: 110px 1fr; gap: 8px; }
.c3-changes > div.is-long { grid-template-columns: 1fr; }
.c3-changes dt { font-weight: 700; color: var(--c3-mute); }
.c3-changes dd { margin: 0; overflow-wrap: anywhere; color: var(--c3-ink); }
.c3-changes-toggle { margin: 4px 0 0 40px; font-size: 0.78rem; text-decoration: none; }
/* Cestino: grigio (non rosso: rosso vuol dire persa), una fascia in cima e un solo gesto, Ripristina */
.c3-head[data-tone="trash"] { --head-tint: #f1f5f9; --head-line: #94a3b8; }
.c3-trash { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; padding: 14px 16px; border: 1.5px solid #cbd5e1; border-radius: 14px; background: #f8fafc; }
.c3-trash > i { font-size: 1.4rem; color: #475569; }
.c3-trash > div { flex: 1; min-width: 0; }
.c3-trash h2 { margin: 0; font-size: 1rem; font-weight: 800; color: var(--c3-ink); }
.c3-trash p { margin: 2px 0 0; font-size: 0.82rem; color: var(--c3-mute); }
@media (max-width: 767px) { .c3-trash .btn-acc-action { display: none; } } /* sul telefono Ripristina è nella barra in basso */
.c3-status-btn.is-trash { --st: #94a3b8; background: #e2e8f0; color: #334155; }
.c3-bar-btn.is-restore { flex: 1; background: #334155; color: #ffffff; }
/* Schedina dell'opportunità: tipo · zona · prezzo come righe brevi sotto il nome */
.c3-facts { display: grid; gap: 4px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--c3-line); }
.c3-fact { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: baseline; gap: 8px; }
.c3-fact-label { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c3-mute); }
.c3-fact-value { display: inline-flex; align-items: baseline; gap: 4px; min-width: 0; font-size: 0.86rem; font-weight: 700; color: var(--c3-ink); }
/* Etichette come ultima riga del riquadro tratteggiato, a tutta larghezza */
/* Etichette: la fascia in fondo alla testata (DESIGN.md §34), da bordo a bordo nel tono dello stato della scheda (più
   deciso della tinta del riquadro), etichette bianche sopra; titolo scuro col conteggio, a destra le automazioni */
.c3-bond .c3-bond-tags { grid-column: 1 / -1; margin: 14px -14px -14px; padding: 12px 16px; border-top: 1px solid color-mix(in srgb, var(--head-line, var(--primary, #6366f1)) 28%, #ffffff);
    border-radius: 0 0 20px 20px; background: color-mix(in srgb, var(--head-line, var(--primary, #6366f1)) 13%, #ffffff); }
.c3-bond .c3-bond-tags .c3-tags-label { margin-right: 6px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #0f172a; }
.c3-tags-n { color: #64748b; letter-spacing: 0; }
.c3-tags-auto { order: 99; margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 0.76rem; font-weight: 700; color: var(--st-pending-ink, #78350f); }
.c3-tags-auto[hidden] { display: none; }
.c3-tags-auto i { color: #d97706; }
.c3-bond .c3-bond-tags .c3-tag { height: 24px; background: #ffffff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06); }
.c3-bond .c3-bond-tags .c3-tag::before { background: color-mix(in srgb, var(--head-line, #94a3b8) 30%, #ffffff); }
.c3-bond .c3-bond-tags .c3-tag.c3-cat { background: #ffffff; color: #0f172a; font-weight: 800; }
.c3-bond .c3-bond-tags .c3-tag.c3-cat.is-other { background: rgba(255, 255, 255, 0.6); color: #475569; font-weight: 600; }
.c3-bond .c3-bond-tags .c3-tag.is-auto::before { background: var(--st-pending, #f59e0b); }
.c3-bond .c3-bond-tags .c3-tag.is-auto { cursor: help; }
.c3-bond .c3-bond-tags .c3-tag-add { background: transparent; border: 1px dashed color-mix(in srgb, var(--head-line, #64748b) 55%, #ffffff); color: #0f172a; }
.c3-bond .c3-bond-tags .c3-tag-add:hover { background: rgba(255, 255, 255, 0.7); }
.c3-bond .c3-bond-tags.is-missing-cat { box-shadow: inset 0 3px 0 var(--st-pending, #f59e0b); }
@media (hover: none) { .c3-bond .c3-bond-tags .c3-tag { height: 28px; } }
/* Etichetta viva: al passaggio (o al tocco) su un'etichetta con automazione, a che punto è sul record */
.c3-live { position: fixed; z-index: 1065; width: 300px; max-width: calc(100vw - 16px); padding: 12px 14px; border: 1px solid #fde68a; border-radius: 14px; background: #fffbeb; box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18); font-size: 0.8rem; color: #334155; }
.c3-live-head { display: flex; align-items: center; gap: 6px; font-weight: 800; color: #0f172a; }
.c3-live-head i { color: #d97706; }
.c3-live-st { margin-left: auto; padding: 1px 8px; border-radius: 999px; font-size: 0.7rem; font-weight: 800; white-space: nowrap; }
.c3-live-st.is-run { background: var(--st-ok-soft, #dcfce7); color: var(--st-ok-ink, #166534); }
.c3-live-st.is-done { background: #e2e8f0; color: #475569; }
.c3-live-st.is-wait { background: var(--st-pending-soft, #fef3c7); color: var(--st-pending-ink, #78350f); }
.c3-live-st.is-err { background: var(--st-lost-soft, #fee2e2); color: var(--st-lost-ink, #991b1b); }
.c3-live-name { margin-top: 4px; color: #78350f; }
.c3-live-dots { display: flex; gap: 4px; margin: 8px 0 6px; }
.c3-live-dots i { width: 8px; height: 8px; border-radius: 50%; background: #fde68a; }
.c3-live-dots i.is-sent { background: #d97706; }
.c3-live-dots i.is-err { background: var(--st-lost, #dc2626); }
.c3-live-dots i.is-off { background: #cbd5e1; }
.c3-live-row { margin-top: 2px; color: #475569; }
.c3-live + .c3-live { margin-top: 8px; }
.c3-live-link { display: inline-block; margin-top: 8px; padding: 0; border: 0; background: none; font-size: 0.78rem; font-weight: 800; color: #b45309; cursor: pointer; }
.c3-tags-label { display: inline-flex; align-items: center; gap: 5px; margin-right: 4px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c3-mute); }
.c3-tags-label i { font-size: 0.7rem; }
/* Allegati: la categoria è un piccolo menu sulla riga; tutta la cartella accetta i file trascinati */
.c3-file-cat { height: 22px; max-width: 150px; margin-right: 4px; padding: 0 20px 0 8px; border: 1px solid var(--c3-line); border-radius: 999px; background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M1 1l3 3 3-3' fill='none' stroke='%2364748b' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 7px center; font-size: 0.72rem; font-weight: 700; color: #475569; cursor: pointer; appearance: none; -webkit-appearance: none; }
span.c3-file-cat { display: inline-flex; align-items: center; padding-right: 8px; background-image: none; cursor: default; }
.c3-file-cat:hover { border-color: #94a3b8; }
.c3-file.is-up { border-style: dashed; }
.c3-folder.files .c3-folder-body { transition: box-shadow 0.15s ease, background 0.15s ease; }
.c3-folder.files.is-drop .c3-folder-body { box-shadow: inset 0 0 0 2px #16a34a; background: #ecfdf3; }
@media (hover: none) { .c3-drop-hint { display: none; } }
/* Etichette e categorie (DESIGN.md §34): lo stesso chip neutro a forma d'etichetta (lato sinistro appena a punta col
   forellino), distinti da tono, peso e icona, non dal colore del tipo (identità) né dal primary (azioni). Etichetta: grigio
   chiaro, "#" attenuato. Categoria: grigio più deciso, grassetto, segnalibro, nome leggibile, per prima; messa da altri:
   testo chiaro. Automazione: fulmine e forellino ambra. La punta è un ritaglio: niente bordi (li taglierebbe). Anche
   nell'elenco Contatti (.ctag-v3) */
.c3-bond .c3-tag, .ctag-v3 { position: relative; display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px 0 15px; border: 0; border-radius: 0 6px 6px 0;
    background: #eef2f7; color: #334155; font-size: 0.74rem; font-weight: 600; white-space: nowrap; clip-path: polygon(7px 0, 100% 0, 100% 100%, 7px 100%, 0 50%); }
.c3-bond .c3-tag::before, .ctag-v3::before { content: ''; position: absolute; left: 6px; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%; background: #ffffff; }
.c3-tag .c3-hash, .ctag-v3 .c3-hash { color: #94a3b8; font-weight: 500; }
.c3-bond .c3-tag.c3-cat, .ctag-v3.is-primary { background: #dde4ed; color: #0f172a; font-weight: 700; }
.c3-cat > .fa-bookmark, .ctag-v3.is-primary > .fa-bookmark { font-size: 0.6rem; color: #64748b; }
.c3-bond .c3-tag.c3-cat.is-other { background: #eef2f7; color: #64748b; font-weight: 600; }
.c3-bond .c3-tag.is-auto::before { background: var(--st-pending, #f59e0b); }
.c3-bond .c3-tag button { align-self: stretch; min-width: 22px; margin-right: -6px; padding: 0 6px; border: 0; background: none; color: #64748b; }
.c3-tag-bolt { font-size: 0.7rem; color: #d97706; }
.c3-bond .c3-tag.is-auto > i { font-size: 0.64rem; color: #d97706; }
/* La × occupa spazio solo sull'etichetta sotto il mouse (o col focus): niente vuoto a destra; sui touch resta sempre */
@media (hover: hover) {
    .c3-bond .c3-tag { padding-right: 8px; }
    .c3-bond .c3-tag button { min-width: 0; max-width: 0; margin-right: 0; padding: 0; overflow: hidden; opacity: 0; transition: max-width 0.15s ease, opacity 0.15s ease; }
    .c3-bond .c3-tag:hover button, .c3-bond .c3-tag button:focus-visible { max-width: 22px; padding: 0 4px 0 2px; margin-right: -4px; opacity: 1; }
}
/* Passo bloccato: popup con il perché e le scelte */
#c3BlockedModal .modal-title i { margin-right: 6px; color: #64748b; font-size: 0.9em; }
.c3-blk-step { margin: 0 0 12px; }
.c3-blk-step b { display: block; font-size: 1rem; color: var(--c3-ink); }
.c3-blk-step small { color: var(--c3-mute); }
.c3-blk-why { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px dashed #cbd5e1; border-radius: 12px; background: #f8fafc; }
.c3-blk-why > span { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c3-mute); }
.c3-blk-why b { font-size: 0.92rem; color: var(--c3-ink); }
.c3-blk-why small { font-size: 0.8rem; color: var(--c3-mute); }
.c3-blk-why .is-late { color: var(--st-lost-dark); font-weight: 700; }
.c3-blk-note { margin: 12px 0 0; font-size: 0.8rem; color: var(--c3-mute); }
.c3-blk-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 16px; }
.c3-blk-acts .c3-link { margin-right: auto; }

.c3-blk-acts .btn-acc-action { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border: 1px solid var(--c3-line); border-radius: 12px; background: #ffffff; font-weight: 700; }
.c3-blk-acts .btn-acc-action:hover { border-color: #94a3b8; }
/* Linguetta Attività: "Da fare" con i pulsanti, poi lo storico */
.c3-acts-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.c3-acts-bar .c3-day { margin: 0 auto 0 0; }
.c3-acts-history { margin-top: 18px; }
.c3-plan-all { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 0.8rem; text-decoration: none; }

/* Il cestino delle righe (allegati, attività) compare solo passandoci sopra, come le matite */
@media (hover: hover) {
    .c3-file .c3-tl-del, .c3-item .c3-tl-del { opacity: 0; transition: opacity 0.15s ease; }
    .c3-file:hover .c3-tl-del, .c3-item:hover .c3-tl-del, .c3-tl-del:focus-visible { opacity: 1; }
}
/* Varianti della pillola sul bianco (dove la pillola bianca sparirebbe): primaria piena, tonale lilla */
.c3-chip.is-primary { border-color: transparent; background: var(--primary, #6366f1); box-shadow: 0 4px 12px color-mix(in srgb, var(--primary, #6366f1) 28%, transparent); color: #ffffff !important; }
.c3-chip.is-primary > i { color: #ffffff; }
.c3-chip.is-primary:hover { background: color-mix(in srgb, var(--primary, #6366f1) 88%, black); }
.c3-chip.is-tonal { border-color: transparent; background: color-mix(in srgb, var(--primary, #6366f1) 10%, #ffffff); box-shadow: none; color: var(--primary, #6366f1) !important; }
.c3-chip.is-tonal:hover { background: color-mix(in srgb, var(--primary, #6366f1) 16%, #ffffff); }
.c3-in-cal { margin-left: 4px; font-size: 0.72rem; color: #7c3aed; }
/* Chi deve fare l'attività (se non sei tu): badge piccolo con la foto */
.c3-asg-badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px 0 2px; border: 1px solid var(--c3-line); border-radius: 999px; background: #ffffff; font-size: 0.72rem; font-weight: 700; color: var(--c3-ink); vertical-align: middle; white-space: nowrap; }
.c3-asg-badge .avatar-v3 { width: 18px; height: 18px; font-size: 0.55rem; }
/* Box "Commento o attività" dentro le linguette Commenti e Attività */
.c3-folder[hidden], .c3-tl-compose[hidden] { display: none !important; }
.c3-tl-compose { margin: 0 0 14px; }
.c3-quick { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border: 1.5px solid var(--c3-line); border-radius: 16px; background: #ffffff; }
.c3-quick:focus-within { border-color: color-mix(in srgb, var(--primary, #6366f1) 45%, #ffffff); }
.c3-quick textarea, .c3-quick input[type=text] { flex: 1; min-width: 0; padding: 6px 0; border: 0; outline: none; background: none; font: inherit; font-size: 0.88rem; resize: none; }
.c3-quick .c3-private { flex: 0 0 auto; }
/* Nota vocale nel modulo rapido: il microfono non si stringe, la barra (registrazione, riassunto) va a capo sotto il testo */
.c3-quick .c3-voice-btn { flex: 0 0 auto; }
.c3-quick:has(> .c3-voice:not([hidden])) { flex-wrap: wrap; }
.c3-quick .c3-voice { flex: 1 1 100%; order: 0; }
.c3-quick .c3-private.is-on { color: #c2410c; }
/* Form attività nella linguetta: testo, poi tipo · quando · a chi · Aggiungi (su due righe quando lo spazio manca) */
.c3-quick.is-todo { flex-wrap: wrap; }
.c3-quick.is-todo input[type=text] { flex: 1 1 200px; }
.c3-quick-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-left: auto; }
.c3-quick-opts .c3-type-pill { max-width: 170px; text-overflow: ellipsis; }
/* Workflow: il pulsante "speciale" (scuro, con il bordo sfumato animato di Klaila) e il gruppo dei suoi passi */
.c3-wf-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px 0 4px; border: 0; border-radius: 999px; background: linear-gradient(135deg, #1e1b4b, #312e81); color: #ffffff; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.01em; cursor: pointer; isolation: isolate; box-shadow: 0 6px 18px rgba(49, 46, 129, 0.28); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.c3-wf-btn::before { content: ''; position: absolute; inset: -2px; z-index: -1; border-radius: inherit; background: var(--claila-border-gradient); background-size: 200% 100%; animation: c3-wf-flow 4s linear infinite; }
.c3-wf-btn::after { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: linear-gradient(135deg, #1e1b4b, #312e81); }
.c3-wf-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(49, 46, 129, 0.36); }
.c3-wf-btn:focus-visible { outline: 2px solid var(--myb-cyan); outline-offset: 3px; }
.c3-wf-ico { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(255, 255, 255, 0.14); font-size: 0.72rem; }
@keyframes c3-wf-flow { to { background-position: 200% 0; } }
@media (prefers-reduced-motion: reduce) { .c3-wf-btn::before { animation: none; } }
.c3-wf-kicker { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 4px; font-size: 0.64rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #6d28d9; }
.c3-wf-title-ico { margin-right: 4px; color: #4338ca; font-size: 0.9em; }
.c3-quick { position: relative; } .c3-quick .c3-mention-list { top: calc(100% + 4px); left: 8px; } /* elenco dei @tag sotto il form della linguetta */

/* ── Pagina Workflow (views/workflows_v3.php, MYB.Workflows.js, DESIGN.md §34) ─────────────────────────── */
.wf3-lead { margin: -4px 0 14px; font-size: 0.84rem; color: var(--c3-mute); }
.wf3-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 14px; }
.wf3-card { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; border: 1px solid var(--c3-line); border-radius: 18px; background: #ffffff; box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05); }
.wf3-card-head { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; }
.wf3-card-head h3 { grid-column: 1; margin: 0; font-size: 1.02rem; font-weight: 800; color: var(--c3-ink); }
.wf3-scope { grid-column: 1 / -1; justify-self: start; display: inline-flex; align-items: center; gap: 5px; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.wf3-scope.is-agency { color: #4338ca; }
.wf3-scope.is-personal { color: #0f766e; }
.wf3-scope.is-template { color: #a21caf; }
.wf3-count { font-size: 0.76rem; font-weight: 700; color: var(--c3-mute); }
.wf3-desc { margin: 0; font-size: 0.84rem; color: #475569; }
.wf3-flow { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 10px 12px; border-radius: 12px; background: #faf8ff; list-style: none; font-size: 0.82rem; color: var(--c3-ink); }
.wf3-flow li { display: flex; align-items: baseline; gap: 8px; }
.wf3-flow small { color: var(--c3-mute); }
.wf3-flow .is-more { color: var(--c3-mute); padding-left: 26px; }
.wf3-n { display: inline-grid; place-items: center; flex: 0 0 18px; height: 18px; border-radius: 50%; background: #ede9fe; font-size: 0.66rem; font-weight: 800; color: #5b21b6; }
.wf3-card-acts { display: flex; align-items: center; gap: 14px; margin-top: auto; }
.wf3-card-acts .c3-link { font-size: 0.8rem; text-decoration: none; }
.wf3-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 36px 16px; border: 1.5px dashed #ddd6fe; border-radius: 18px; text-align: center; }
.wf3-empty > i { font-size: 1.6rem; color: #7c3aed; }
.wf3-empty p { max-width: 460px; margin: 0; font-size: 0.86rem; color: var(--c3-mute); }
.wf3-empty b { display: block; color: var(--c3-ink); }
/* Modelli di MyBrokerage AI: elenco compatto per scheda, i passi si aprono a richiesta */
.wf3-more { grid-column: 1 / -1; margin: 2px 0 0; font-size: 0.84rem; color: var(--c3-mute); }
/* L'invito ai modelli in cima all'elenco (workflow e flussi): bordo Klaila, una sola azione */
.wf3-tpl-cta { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1.5px solid transparent; border-radius: 18px; background: linear-gradient(#fbf9ff, #fbf9ff) padding-box, var(--claila-border-gradient) border-box; }
.wf3-tpl-cta p { flex: 1; min-width: 0; margin: 0; font-size: 0.9rem; color: #475569; }
.wf3-tpl-cta b { display: block; font-size: 1rem; color: var(--c3-ink); }
.wf3-tpl-cta-ico { display: inline-grid; flex: 0 0 auto; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: var(--claila-border-gradient); color: #ffffff; font-size: 1.05rem; }
.wf3-tpl-cta .c3-wf-btn { flex: 0 0 auto; }
.wf3-tpl-when { margin: 0 16px 8px; font-size: 0.8rem; color: var(--c3-mute); }
.wf3-tpl-group .af3-import { margin-bottom: 0; }
.af3-tpl-note { margin: 0 0 12px; padding: 10px 14px; border: 1.5px solid transparent; border-radius: 14px; background: linear-gradient(#fbf9ff, #fbf9ff) padding-box, var(--claila-border-gradient) border-box; font-size: 0.86rem; color: #475569; }
.af3-tpl-note i { color: #a21caf; }
@media (max-width: 575.98px) { .wf3-tpl-cta { flex-wrap: wrap; } .wf3-tpl-cta .c3-wf-btn { margin-left: 56px; } }
.wf3-tpl-group { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; }
.wf3-tpl-group h3 { margin: 8px 0 2px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c3-mute); }
.wf3-tpl { border: 1px solid var(--c3-line); border-radius: 14px; background: #ffffff; }
.wf3-tpl[open] { box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05); }
.wf3-tpl summary { display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; list-style: none; }
.wf3-tpl summary::-webkit-details-marker { display: none; }
.wf3-tpl summary:focus-visible { outline: 2px solid var(--myb-cyan); outline-offset: 2px; border-radius: 14px; }
.wf3-tpl summary > i { color: var(--c3-mute); font-size: 0.75rem; transition: transform 0.15s; }
.wf3-tpl[open] summary > i { transform: rotate(180deg); }
.wf3-tpl-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wf3-tpl-name b { font-size: 0.92rem; color: var(--c3-ink); }
.wf3-tpl-name small { font-size: 0.8rem; color: var(--c3-mute); }
.wf3-tpl .wf3-flow { margin: 0 16px; }
.wf3-tpl .wf3-card-acts { padding: 12px 16px 14px; }
@media (prefers-reduced-motion: reduce) { .wf3-tpl summary > i { transition: none; } }
/* Editor */
.wf3-editor .modal-body { display: flex; flex-direction: column; gap: 16px; }
.wf3-field { display: flex; flex-direction: column; gap: 6px; }
.wf3-field > label, .wf3-label { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c3-mute); }
.wf3-field > label small { text-transform: none; letter-spacing: 0; font-weight: 600; }
.wf3-field > input, .wf3-field > textarea, .wf3-field > select, .wf3-step-title { width: 100%; padding: 9px 12px; border: 1.5px solid var(--c3-line); border-radius: 12px; font: inherit; font-size: 0.9rem; color: var(--c3-ink); outline: none; }
.wf3-field > input:focus, .wf3-field > textarea:focus, .wf3-field > select:focus, .wf3-step-title:focus, .wf3-step-opts select:focus, .wf3-days input:focus { border-color: color-mix(in srgb, var(--primary, #6366f1) 45%, #ffffff); }
.wf3-scope-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.wf3-scope-pick label { display: grid; grid-template-columns: auto 1fr; gap: 0 10px; align-items: center; padding: 10px 12px; border: 1.5px solid var(--c3-line); border-radius: 12px; cursor: pointer; }
.wf3-scope-pick label.is-on { border-color: #7c3aed; background: #faf8ff; }
.wf3-scope-pick label.is-off { opacity: 0.55; cursor: not-allowed; }
.wf3-scope-pick input { position: absolute; opacity: 0; pointer-events: none; }
.wf3-scope-pick label:focus-within { outline: 2px solid var(--myb-cyan); outline-offset: 2px; }
.wf3-scope-pick i { grid-row: span 2; color: #6d28d9; }
.wf3-scope-pick small { color: var(--c3-mute); }
.wf3-steps { display: flex; flex-direction: column; gap: 10px; margin: 0 0 4px; padding: 0; list-style: none; }
.wf3-step { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; padding: 12px; border: 1px solid var(--c3-line); border-radius: 14px; background: #ffffff; }
.wf3-step-n { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #312e81; font-size: 0.75rem; font-weight: 800; color: #ffffff; }
.wf3-step-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.wf3-step-opts { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: end; }
.wf3-step-opts label { display: flex; flex-direction: column; gap: 3px; margin: 0; font-size: 0.7rem; font-weight: 800; color: var(--c3-mute); }
.wf3-step-opts select, .wf3-days input { height: 32px; padding: 0 8px; border: 1.5px solid var(--c3-line); border-radius: 10px; background: #ffffff; font: inherit; font-size: 0.82rem; font-weight: 600; color: var(--c3-ink); outline: none; }
.wf3-step-opts select { max-width: 210px; }
.wf3-days { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; font-weight: 600; color: var(--c3-ink); }
.wf3-days input { width: 64px; }
.wf3-step-opts .wf3-cal { flex-direction: row; align-items: center; gap: 6px; height: 32px; font-size: 0.8rem; color: var(--c3-ink); }
.wf3-step-hint { font-size: 0.76rem; color: #6d28d9; }
.wf3-step-acts { display: flex; flex-direction: column; gap: 2px; }
.wf3-step-acts .c3-tl-del:disabled { opacity: 0.3; cursor: default; }
.wf3-error { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--st-lost-soft); font-size: 0.84rem; color: var(--st-lost-ink); }
.wf3-foot { display: flex; justify-content: flex-end; align-items: center; gap: 14px; }
@media (max-width: 600px) { .wf3-step { grid-template-columns: minmax(0, 1fr) auto; } .wf3-step-n { display: none; } .wf3-step-opts select { max-width: 100%; } }
.c3-wf-manage { margin-right: auto; font-size: 0.8rem; }
.wf3-flow small { white-space: nowrap; }
/* Quando parte un passo: una frase con il menu di cosa aspettare, e sotto (se aspetta) il lucchetto in parole */
.wf3-when { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 0.82rem; font-weight: 600; color: var(--c3-ink); }
.wf3-when-k, .wf3-when-from { color: var(--c3-mute); }
.wf3-when .c3-type-pill { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.wf3-when .c3-type-pill:focus-visible { outline: 2px solid var(--myb-cyan); outline-offset: 2px; }
.wf3-wait { display: flex; align-items: baseline; gap: 6px; margin: 0; font-size: 0.76rem; font-weight: 600; color: #312e81; }
.wf3-wait[hidden] { display: none; }
/* Editor workflow: "Crea un evento in calendario" con la spiegazione; piede con Annulla a sinistra e icona staccata */
.wf3-step-opts .wf3-cal { flex-direction: row; align-items: flex-start; gap: 8px; height: auto; max-width: 320px; padding-top: 18px; }
.wf3-step-opts .wf3-cal input { margin-top: 3px; }
.wf3-step-opts .wf3-cal span { display: flex; flex-direction: column; gap: 1px; }
.wf3-step-opts .wf3-cal b { font-size: 0.8rem; color: var(--c3-ink); }
.wf3-step-opts .wf3-cal small { font-size: 0.72rem; font-weight: 500; color: var(--c3-mute); }
.wf3-foot .c3-link { order: -1; }
.wf3-foot .btn-acc-action { display: inline-flex; align-items: center; gap: 8px; }
.wf3-field > .c3-chip { align-self: flex-start; }

/* ── Kanban delle liste v3 (MYB.Kanban, DESIGN.md §36) ──────────────────────────────────────────────── */
.kb3-switch { display: inline-flex; padding: 3px; margin-right: 6px; border-radius: 999px; background: #eef2f7; }
.kb3-switch button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: none; font-size: 0.8rem; font-weight: 700; color: #64748b; cursor: pointer; }
.kb3-switch button[aria-pressed="true"] { background: #ffffff; color: var(--c3-ink, #0f172a); box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12); }
.kb3-switch button:focus-visible { outline: 2px solid var(--primary, #6366f1); outline-offset: 2px; }
/* Lista · Kanban in alto (TableListShell 'switch'), accanto a "Nuovo …": si vede subito che c'è un'altra vista */
body.kb3-mode .sort-dropdown-v3 { display: none !important; } /* il kanban ha il suo ordine per colonna */
.quick-views-mode-v3 { margin-left: auto; }
.quick-views-mode-v3 + .quick-views-create-v3 { margin-left: 0; }
.kb3-switch.is-big { margin: 0; padding: 3px; gap: 2px; background: #e9eef5; border: 0; box-shadow: none; }
.kb3-switch.is-big button { height: 30px; padding: 0 14px; font-size: 0.78rem; font-weight: 700; color: #475569; transition: background 0.15s ease, color 0.15s ease; }
.kb3-switch.is-big button i { font-size: 0.8rem; }
.kb3-switch.is-big button:hover { color: #0f172a; }
/* Attivo: segmento bianco con testo e icona primary. Si riconosce ma non fa concorrenza alla vista scelta
   accanto, che resta l'unica pillola piena (il selettore è un'impostazione, non un filtro) */
.kb3-switch.is-big button[aria-pressed="true"] { background: #ffffff; color: var(--primary, #6366f1); box-shadow: 0 1px 3px rgba(15, 23, 42, 0.14); }
@media (max-width: 575.98px) {
    .quick-views-mode-v3 { order: -1; width: 100%; margin: 0 0 4px; }
    .kb3-switch.is-big { display: flex; width: 100%; }
    .kb3-switch.is-big button { flex: 1; justify-content: center; }
}
.kb3-wrap { margin: 0 -4px 24px; }
.kb3-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 12px; padding: 2px 4px 12px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; }
.kb3-col { display: flex; flex-direction: column; min-width: 0; max-height: calc(100vh - 220px); border-radius: 18px; background: #eef2f7; scroll-snap-align: start; }
.kb3-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding: 12px 14px 8px; }
.kb3-head h3 { margin: 0; font-size: 0.9rem; font-weight: 800; color: var(--c3-ink, #0f172a); }
.kb3-count { padding: 1px 8px; border-radius: 999px; background: #ffffff; font-size: 0.74rem; font-weight: 800; color: #475569; }
.kb3-list { flex: 1; display: flex; flex-direction: column; gap: 8px; min-height: 80px; padding: 4px 8px 8px; overflow-y: auto; scrollbar-width: thin; }
.kb3-col.is-empty .kb3-list::before { content: 'Nessuna'; display: block; padding: 18px 0; border: 1.5px dashed #cbd5e1; border-radius: 12px; font-size: 0.78rem; text-align: center; color: #94a3b8; }
.kb3-col.is-empty .kb3-list:has(.kb3-card)::before { content: none; }
.kb3-card { position: relative; display: flex; flex-direction: column; gap: 5px; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 14px; background: #ffffff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05); cursor: grab; transition: box-shadow 0.15s ease, opacity 0.15s ease; }
.kb3-card:hover { box-shadow: 0 6px 16px rgba(15, 23, 42, 0.1); }
.kb3-card.is-locked { cursor: pointer; }
.kb3-card.is-chosen { cursor: grabbing; box-shadow: 0 12px 28px rgba(15, 23, 42, 0.2); }
.kb3-card.is-ghost { opacity: 0.35; border-style: dashed; }
.kb3-card.is-saving { opacity: 0.6; pointer-events: none; }
.kb3-card.is-new { animation: c3-glow 1.6s ease-out both; }
.kb3-title { padding-right: 26px; font-size: 0.86rem; font-weight: 800; line-height: 1.3; color: var(--c3-ink, #0f172a) !important; text-decoration: none !important; overflow-wrap: anywhere; }
.kb3-title:hover { text-decoration: underline !important; }
.kb3-client { font-size: 0.78rem; color: #475569; }
.kb3-client i { width: 12px; color: #94a3b8; }
.kb3-facts { display: flex; flex-wrap: wrap; gap: 4px; }
.kb3-foot { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
/* Lo stato preciso (il sottostato della fase) in una pillola piccola, colori della scala di h.statusMod */
.kb3-st { max-width: 62%; padding: 2px 9px; overflow: hidden; border-radius: 999px; background: #f1f5f9; font-size: 0.7rem; font-weight: 700; color: #475569; text-overflow: ellipsis; white-space: nowrap; }
.kb3-st.is-warning { background: #fff7ed; color: #c2410c; }
.kb3-st.is-success { background: #dcfce7; color: #15803d; }
.kb3-st.is-success-light { background: #ecfdf3; color: #15803d; }
.kb3-st.is-danger { background: #fee2e2; color: #b91c1c; }
.kb3-st.is-sky { background: #e0f2fe; color: #0369a1; }
.kb3-st.is-orange { background: #ffedd5; color: #c2410c; }
.kb3-when { margin-left: auto; font-size: 0.72rem; color: #94a3b8; white-space: nowrap; }
.kb3-avatar { width: 22px; height: 22px; font-size: 0.6rem; }
.kb3-move { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border: 0; border-radius: 8px; background: none; color: #94a3b8; cursor: pointer; opacity: 0; transition: opacity 0.15s ease; }
.kb3-card:hover .kb3-move, .kb3-move:focus-visible, .kb3-card.has-menu .kb3-move { opacity: 1; }
.kb3-move:hover { background: #f1f5f9; color: #334155; }
@media (hover: none) { .kb3-move { opacity: 1; } }
.kb3-menu { position: fixed; z-index: 1060; width: 220px; display: flex; flex-direction: column; min-width: 210px; max-height: 320px; padding: 6px; overflow-y: auto; border: 1px solid #e2e8f0; border-radius: 12px; background: #ffffff; box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18); cursor: default; }
.kb3-menu h6 { margin: 6px 8px 2px; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #94a3b8; }
.kb3-menu button { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 8px; border: 0; border-radius: 8px; background: none; font-size: 0.82rem; font-weight: 600; text-align: left; color: #1f2937; cursor: pointer; }
.kb3-menu button:hover:not([disabled]), .kb3-menu button:focus-visible { background: #f1ecfa; color: #5b2a86; }
.kb3-menu button.is-sub { padding-left: 16px; }
.kb3-menu button[disabled] { color: #94a3b8; cursor: default; }
.kb3-menu .kb3-menu-cancel { justify-content: center; margin-top: 4px; border-top: 1px solid #f1f5f9; border-radius: 0 0 8px 8px; color: #64748b; }
.kb3-more { margin: 0 8px 10px; padding: 8px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, 0.7); font-size: 0.78rem; font-weight: 700; color: #475569; cursor: pointer; }
.kb3-more:hover { background: #ffffff; }
.kb3-skel { display: flex; flex-direction: column; gap: 8px; flex: 0 0 auto; padding: 12px; border: 1px solid #e2e8f0; border-radius: 14px; background: #ffffff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05); }
.kb3-skel-bar { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, #eef2f7 25%, #f6f8fb 50%, #eef2f7 75%); background-size: 200% 100%; animation: dt-skel-shimmer 1.3s ease-in-out infinite; }
.kb3-skel-bar.is-sm { height: 9px; }
.kb3-skel-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.kb3-skel-dot { width: 24px; height: 24px; border-radius: 50%; background: #eef2f7; }
.kb3-err { margin: 8px; font-size: 0.8rem; color: #b91c1c; }
@media (max-width: 767px) { .kb3-board { grid-auto-columns: 82%; } .kb3-col { max-height: calc(100vh - 260px); } }
@media (prefers-reduced-motion: reduce) { .kb3-skel-bar { animation: none; } .kb3-card.is-new { animation: none; } }

/* ── Profilo v3 (views/profile_v3.php, MYB.Profile.js, DESIGN.md §37) ─────────────────────────────────── */
.pf3 { --pf-line: #e9edf3; --pf-ink: #1c2434; --pf-mute: #64748b; display: flex; flex-direction: column; gap: 18px; }
.pf3-other { margin: 0; padding: 10px 14px; border-radius: 12px; background: #fff7ed; font-size: 0.86rem; color: #9a3412; }
.pf3-other a { margin-left: 6px; font-weight: 700; color: inherit; text-decoration: underline; }
.pf3-head { display: flex; align-items: center; gap: 20px; padding: 22px 24px; border: 1px solid var(--pf-line); border-radius: 22px; background: linear-gradient(120deg, color-mix(in srgb, var(--primary, #6366f1) 9%, #ffffff) 0%, #ffffff 55%); }
.pf3-avatar { width: 84px; height: 84px; flex: 0 0 auto; border-radius: 50% !important; font-size: 1.6rem; box-shadow: 0 0 0 4px #ffffff, 0 0 0 5px color-mix(in srgb, var(--primary, #6366f1) 25%, #ffffff), 0 8px 20px rgba(15, 23, 42, 0.12); }
.pf3-avatar img { border-radius: 50%; }
.pf3-id { flex: 1; min-width: 0; }
.pf3-id .pf3-pill:not(.is-off) { border: 1px solid color-mix(in srgb, var(--primary, #6366f1) 22%, #ffffff); background: #ffffff; color: var(--primary, #4f46e5); }
.pf3-id h1 { margin: 0; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.01em; color: var(--pf-ink); }
.pf3-health { flex: 0 0 auto; width: 290px; align-self: stretch; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px solid #fde68a; border-radius: 16px; background: #fffbeb; }
.pf3-health-title { display: flex; align-items: center; gap: 7px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: #92400e; }
.pf3-health ul { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.pf3-health li a { display: flex; align-items: center; gap: 8px; padding: 5px 6px; margin: 0 -6px; border-radius: 8px; font-size: 0.84rem; font-weight: 700; color: #78350f !important; text-decoration: none !important; }
.pf3-health li a > i:first-child { font-size: 0.78rem; color: #d97706; }
.pf3-health li a > i:last-child { margin-left: auto; font-size: 0.7rem; opacity: 0.5; }
.pf3-health li a:hover { background: #fef3c7; }
.pf3-health li a:hover > i:last-child { opacity: 1; }
/* Niente da sistemare: il riquadro non c'è */
.pf3-health.is-ok { display: none; }
.pf3-id p { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 4px 0 0; font-size: 0.88rem; color: var(--pf-mute); }
.pf3-contacts span { display: inline-flex; align-items: center; gap: 6px; }
.pf3-contacts .pf3-copy { padding: 1px 8px; font-size: 0.76rem; color: var(--pf-mute); }
.pf3-panel-body > .pf3-sub:first-child { margin-top: 4px; }
.pf3-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 18px; align-items: start; }
.pf3-nav { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 2px; padding: 14px 10px; border: 1px solid var(--pf-line); border-radius: 20px; background: #ffffff; }
.pf3-nav-link { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; font-size: 0.9rem; font-weight: 700; color: #475569 !important; text-decoration: none !important; }
.pf3-nav-link i { width: 18px; text-align: center; color: #94a3b8; }
.pf3-nav-dot { width: 8px; height: 8px; margin-left: auto; border-radius: 50%; background: #f59e0b; box-shadow: 0 0 0 3px #fef3c7; }
.pf3-nav-link:hover { background: #f1f5f9; }
.pf3-nav-link.is-active { background: color-mix(in srgb, var(--primary, #6366f1) 10%, #ffffff); color: var(--primary, #4f46e5) !important; }
.pf3-nav-link.is-active i { color: inherit; }
.pf3-nav-link:focus-visible { outline: 2px solid var(--primary, #6366f1); outline-offset: 1px; }
.pf3-panel { padding: 22px 24px; border: 1px solid var(--pf-line); border-radius: 20px; background: #ffffff; min-width: 0; }
.pf3-panel-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; padding-bottom: 16px; border-bottom: 1px solid #f1f5f9; }
.pf3-panel-head h2 { margin: 0; font-size: 1.2rem; font-weight: 800; color: var(--pf-ink); outline: none; }
.pf3-panel-ico { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 44px; height: 44px; border-radius: 14px; font-size: 1.1rem; background: color-mix(in srgb, var(--primary, #6366f1) 10%, #ffffff); color: var(--primary, #4f46e5); }
.pf3-panel-ico.is-notifiche { background: #fef3c7; color: #b45309; }
.pf3-panel-ico.is-collegamenti { background: #dcfce7; color: #15803d; }
.pf3-panel-ico.is-workflow { background: #ede9fe; color: #6d28d9; }
.pf3-panel-ico.is-etichette { background: #fce7f3; color: #be185d; }
.pf3-panel-ico.is-sicurezza { background: #e0f2fe; color: #0369a1; }
.pf3-panel-ico.is-documenti { background: #fff7ed; color: #c2410c; }
.pf3-panel-ico.is-account { background: #f1f5f9; color: #475569; }
/* Avanzate in fondo a Collegamenti: chiuse, si aprono al clic */
.pf3-adv { margin-top: 22px; border: 1.5px solid #e2e8f0; border-radius: 16px; background: #f8fafc; }
.pf3-adv summary { display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; list-style: none; }
.pf3-adv summary::-webkit-details-marker { display: none; }
.pf3-adv summary > i:first-child { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; background: #1e293b; color: #e2e8f0; font-size: 0.85rem; }
.pf3-adv summary span { flex: 1; min-width: 0; }
.pf3-adv summary b { display: block; font-size: 0.92rem; color: var(--pf-ink); }
.pf3-adv summary small { display: block; font-size: 0.8rem; color: var(--pf-mute); }
.pf3-adv-caret { font-size: 0.75rem; color: #94a3b8; transition: transform 0.15s ease; }
.pf3-adv[open] .pf3-adv-caret { transform: rotate(180deg); }
.pf3-adv summary:focus-visible { outline: 2px solid var(--primary, #6366f1); outline-offset: 2px; border-radius: 14px; }
.pf3-adv-body { padding: 0 16px 14px; }
.pf3-banner { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 12px; padding: 10px 14px; border: 1px solid #bfdbfe; border-radius: 12px; background: #eff6ff; font-size: 0.82rem; line-height: 1.45; color: #1e3a8a; }
.pf3-banner > i { margin-top: 3px; color: #3b82f6; }
.pf3-adv-body > .pf3-sub:first-child { margin-top: 4px; }
/* Le righe a larghezza di lettura: etichetta e campo vicini anche sugli schermi larghi (il Workflow resta largo) */
.pf3-panel-body { max-width: 820px; }
[data-pf-panel="workflow"] .pf3-panel-body { max-width: none; }
.pf3-panel-head p { margin: 3px 0 0; font-size: 0.86rem; color: var(--pf-mute); }
.pf3-sub { margin: 22px 0 8px; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: #94a3b8; }
/* Riga d'impostazione: cosa è (e perché) a sinistra, il controllo a destra */
.pf3-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 320px); gap: 8px 24px; align-items: center; padding: 14px 0; border-top: 1px solid #f1f5f9; }
.pf3-panel-body > .pf3-row:first-child, .pf3-panel-body > form > .pf3-row:first-child { border-top: 0; }
.pf3-row-txt label, .pf3-row-label { display: block; margin: 0; font-size: 0.92rem; font-weight: 700; color: var(--pf-ink); }
.pf3-row-txt small { display: block; margin-top: 2px; font-size: 0.8rem; line-height: 1.45; color: var(--pf-mute); }
.pf3-row-ctl { display: flex; justify-content: flex-end; min-width: 0; }
.pf3-input { width: 100%; height: 40px; padding: 0 12px; border: 1.5px solid #e2e8f0; border-radius: 12px; background: #ffffff; font-size: 0.9rem; color: var(--pf-ink); transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.3s ease; }
.pf3-input:focus { outline: none; border-color: color-mix(in srgb, var(--primary, #6366f1) 55%, #ffffff); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary, #6366f1) 10%, transparent); }
.pf3-input.is-saving { opacity: 0.6; }
.pf3-input.is-saved { border-color: #86efac; background: #f0fdf4; }
/* Orari visite (Collegamenti): giorno + due fasce; sul telefono giorno e fasce uno sotto l'altro */
.pf3-hours { margin-top: 10px; }
.pf3-hours-day { display: grid; grid-template-columns: 96px minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid #eef2f7; }
.pf3-hours-day:first-child { border-top: 0; }
.pf3-hours-name { font-size: 0.88rem; font-weight: 600; color: var(--pf-ink); }
.pf3-hours-range { display: flex; align-items: center; gap: 6px; color: #94a3b8; }
.pf3-hours-range .pf3-input { flex: 1; min-width: 0; padding: 0 8px; }
@media (max-width: 575px) { .pf3-hours-day { grid-template-columns: minmax(0, 1fr); gap: 6px; } }
.pf3-ro { font-size: 0.9rem; font-weight: 600; color: var(--pf-ink); text-align: right; overflow-wrap: anywhere; }
.pf3-ro.is-empty { color: #94a3b8; font-weight: 500; font-style: italic; }
.pf3-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 16px; border: 1.5px solid #e2e8f0; border-radius: 12px; background: #ffffff; font-size: 0.86rem; font-weight: 700; color: var(--pf-ink) !important; text-decoration: none !important; white-space: nowrap; cursor: pointer; }
.pf3-btn:hover { border-color: #cbd5e1; background: #f8fafc; }
.pf3-btn.is-primary { border-color: transparent; background: var(--primary, #4f46e5); color: #ffffff !important; }
.pf3-btn.is-primary:hover { filter: brightness(1.08); }
.pf3-btn.is-danger { border-color: #fecaca; color: #b91c1c !important; }
.pf3-btn.is-danger:hover { background: #fef2f2; }
.pf3-btn:disabled { opacity: 0.55; cursor: default; }
.pf3-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: #f1f5f9; font-size: 0.76rem; font-weight: 700; color: #475569; }
.pf3-pill.is-on { background: #dcfce7; color: #15803d; }
.pf3-pill.is-warn { background: #fef3c7; color: #92400e; }
.pf3-pill.is-off { background: #fee2e2; color: #b91c1c; }
/* Interruttore */
.pf3-switch { position: relative; display: inline-flex; margin: 0; cursor: pointer; }
.pf3-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pf3-switch i { width: 44px; height: 26px; border-radius: 999px; background: #cbd5e1; transition: background 0.15s ease; }
.pf3-switch i::after { content: ''; display: block; width: 20px; height: 20px; margin: 3px; border-radius: 50%; background: #ffffff; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25); transition: transform 0.15s ease; }
.pf3-switch input:checked + i { background: #16a34a; }
.pf3-switch input:checked + i::after { transform: translateX(18px); }
.pf3-switch input:focus-visible + i { outline: 2px solid var(--primary, #6366f1); outline-offset: 2px; }
.pf3-switch input:disabled + i { opacity: 0.6; }
/* Canale delle notifiche: schede a scelta singola, ognuna con il suo stato */
.pf3-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 8px; margin-bottom: 8px; }
.pf3-choice { position: relative; display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px 14px; border: 1.5px solid #e2e8f0; border-radius: 14px; background: #ffffff; cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease; }
.pf3-choice input { position: absolute; opacity: 0; }
.pf3-choice > i { width: 20px; text-align: center; font-size: 1.1rem; color: #64748b; }
.pf3-choice > span:not(.pf3-choice-tick) { flex: 1; min-width: 0; }
.pf3-choice-tick { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 22px; height: 22px; border: 1.5px solid #cbd5e1; border-radius: 50%; font-size: 0.65rem; color: transparent; }
.pf3-choice.is-on .pf3-choice-tick { border-color: var(--primary, #4f46e5); background: var(--primary, #4f46e5); color: #ffffff; }
.pf3-choice b { display: block; font-size: 0.88rem; color: var(--pf-ink); }
.pf3-choice small { display: block; margin-top: 1px; overflow: hidden; font-size: 0.76rem; color: var(--pf-mute); text-overflow: ellipsis; white-space: nowrap; }
.pf3-choice small.is-warn { color: #b45309; }
.pf3-custom { margin: 4px 0 8px; padding: 12px 14px 6px; border-radius: 16px; background: #f8fafc; }
.pf3-reco { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: #dcfce7; font-size: 0.66rem; font-style: normal; font-weight: 800; letter-spacing: 0.02em; color: #15803d; vertical-align: 1px; }
.pf3-note { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0 4px; font-size: 0.8rem; line-height: 1.45; color: var(--pf-mute); }
.pf3-note > i { margin-top: 3px; color: #94a3b8; }
.pf3-custom-q { margin: 0 0 8px; font-size: 0.8rem; font-weight: 700; color: var(--pf-mute); }
.pf3-choice:hover { border-color: #cbd5e1; }
.pf3-choice.is-on { border-color: var(--primary, #4f46e5); background: color-mix(in srgb, var(--primary, #6366f1) 6%, #ffffff); }
.pf3-choice.is-on > i { color: var(--primary, #4f46e5); }
.pf3-choice:has(input:focus-visible) { outline: 2px solid var(--primary, #6366f1); outline-offset: 2px; }
/* Un collegamento (Google, WhatsApp, partner, 2FA): icona, stato, azione */
.pf3-conn { display: flex; align-items: center; gap: 14px; margin: 4px 0 8px; padding: 14px 16px; border: 1.5px solid #e2e8f0; border-radius: 16px; background: #f8fafc; }
.pf3-conn > div { flex: 1; min-width: 0; }
.pf3-conn b { display: block; font-size: 0.92rem; color: var(--pf-ink); }
.pf3-conn small { display: block; margin-top: 2px; font-size: 0.8rem; color: var(--pf-mute); overflow-wrap: anywhere; }
.pf3-conn-ico { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; background: #ffffff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08); font-size: 1.1rem; color: #475569; }
.pf3-conn-ico img { width: 20px; height: 20px; }
.pf3-conn-ico.is-wa { color: #16a34a; }
.pf3-conn.is-on { border-color: #bbf7d0; background: #f0fdf4; }
.pf3-conn.is-on b::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: #16a34a; vertical-align: 1px; }
.pf3-conn.is-warn { border-color: #fde68a; background: #fffbeb; }
.pf3-conn.is-warn b::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: #d97706; vertical-align: 1px; }
.pf3-links { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 8px; }
.pf3-links a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid #e2e8f0; border-radius: 14px; color: var(--pf-ink) !important; text-decoration: none !important; }
.pf3-links a > i:first-child { width: 22px; text-align: center; font-size: 1.05rem; color: #64748b; }
.pf3-links a > span { flex: 1; min-width: 0; }
.pf3-links b { display: block; font-size: 0.9rem; }
.pf3-links small { display: block; font-size: 0.8rem; color: var(--pf-mute); }
.pf3-links a > i:last-child { font-size: 0.75rem; color: #94a3b8; }
.pf3-links a:hover { border-color: #cbd5e1; background: #f8fafc; }
.pf3-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.pf3-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 999px; background: #ede9fe; font-size: 0.82rem; font-weight: 700; color: #4c1d95; }
.pf3-tag small { font-weight: 800; color: #7c3aed; opacity: 0.7; }
.pf3-tag button { width: 22px; height: 22px; border: 0; border-radius: 50%; background: none; font-size: 0.72rem; color: #6d28d9; cursor: pointer; }
.pf3-tag button:hover { background: rgba(109, 40, 217, 0.12); }
.pf3-empty { margin: 4px 0; font-size: 0.86rem; color: #94a3b8; }
/* Password: occhio dentro il campo, barra di robustezza, requisiti che si spuntano, conferma che coincide */
.pf3-pswd .pf3-row { align-items: start; }
.pf3-pswd .pf3-row-ctl { flex-direction: column; align-items: stretch; gap: 6px; }
.pf3-pw { position: relative; }
.pf3-pw .pf3-input { padding-right: 42px; }
.pf3-pw-eye { position: absolute; top: 50%; right: 4px; width: 34px; height: 34px; margin-top: -17px; border: 0; border-radius: 9px; background: none; color: #94a3b8; cursor: pointer; }
.pf3-pw-eye:hover { background: #f1f5f9; color: #334155; }
.pf3-pw-eye:focus-visible { outline: 2px solid var(--primary, #6366f1); outline-offset: 1px; }
.pf3-pw-meter { height: 6px; border-radius: 999px; background: #eef2f7; overflow: hidden; }
.pf3-pw-meter span { display: block; width: 0; height: 100%; border-radius: inherit; transition: width 0.2s ease, background 0.2s ease; }
.pf3-pw-meter[data-level="1"] span { width: 20%; background: #ef4444; }
.pf3-pw-meter[data-level="2"] span { width: 45%; background: #f59e0b; }
.pf3-pw-meter[data-level="3"] span { width: 72%; background: #22c55e; }
.pf3-pw-meter[data-level="4"] span { width: 100%; background: #15803d; }
.pf3-pw-rules { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; margin: 0; padding: 0; list-style: none; font-size: 0.76rem; color: #94a3b8; }
.pf3-pw-rules li::before { content: '\f111'; margin-right: 6px; font-family: 'Font Awesome 6 Free'; font-size: 0.5rem; font-weight: 400; vertical-align: 1px; }
.pf3-pw-rules li.is-ok { color: #15803d; }
.pf3-pw-rules li.is-ok::before { content: '\f00c'; font-size: 0.7rem; font-weight: 900; }
.pf3-pw-rules li:first-child:not(.is-ok) { color: #64748b; font-weight: 700; } /* l'unico obbligatorio */
.pf3-pw-gen { align-self: flex-start; font-size: 0.8rem; }
.pf3-pw-match { min-height: 1.1em; margin: 0; font-size: 0.78rem; font-weight: 700; }
.pf3-pw-match.is-ok { color: #15803d; }
.pf3-pw-match.is-bad { color: #b91c1c; }
.pf3-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding-top: 12px; }
.pf3-err { margin: 0; font-size: 0.82rem; font-weight: 600; color: #b91c1c; }
.pf3-inline { display: flex; gap: 8px; max-width: 460px; margin-top: 8px; }
.pf3-code { max-width: 140px; font-size: 1.1rem; letter-spacing: 0.2em; text-align: center; }
.pf3-steps { margin: 12px 0 0; padding-left: 20px; }
.pf3-steps li { margin-bottom: 16px; font-size: 0.88rem; color: var(--pf-ink); }
.pf3-steps small { display: block; margin-top: 4px; color: var(--pf-mute); }
.pf3-qr { display: inline-block; margin-top: 10px; padding: 8px; border-radius: 12px; background: #ffffff; box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12); }
.pf3-codes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pf3-codes code { padding: 4px 8px; border-radius: 8px; background: #f1f5f9; color: var(--pf-ink); }
.pf3-docs { display: flex; flex-direction: column; gap: 8px; }
.pf3-doc { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border: 1px solid var(--pf-line); border-radius: 12px; }
.pf3-doc b { display: block; font-size: 0.88rem; }
.pf3-doc small { font-size: 0.78rem; color: var(--pf-mute); }
.pf3-copy { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1.5px solid #e2e8f0; border-radius: 10px; background: #f8fafc; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.86rem; font-weight: 700; color: var(--pf-ink); cursor: pointer; }
.pf3-danger { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; padding: 14px 16px; border: 1.5px solid #fecaca; border-radius: 16px; background: #fef2f2; }
.pf3-danger b { display: block; font-size: 0.92rem; color: #991b1b; }
.pf3-danger small { font-size: 0.8rem; color: #b91c1c; }
.pf3-wf .quick-views-bar-v3 { margin-top: 4px; }
/* Chiavi API (markup del server, anche nella pagina classica) */
.apikey-row { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; padding: 12px 14px; border: 1px solid rgba(15, 23, 42, 0.07); border-radius: 12px; background: #f8fafc; }
.apikey-main { flex: 1; min-width: 0; }
.apikey-name { font-size: 0.9rem; font-weight: 700; color: #0f172a; }
.apikey-meta { margin-top: 2px; font-size: 0.76rem; color: #94a3b8; }
.apikey-meta code { padding: 0; background: none; color: #94a3b8; }
.apikey-revoke { padding: 6px 8px; border: none; border-radius: 8px; background: transparent; color: #94a3b8; cursor: pointer; }
.apikey-revoke:hover { background: #fee2e2; color: #dc2626; }
.apikey-empty { padding: 6px 0 2px; font-size: 0.86rem; color: #94a3b8; }
.apikey-new { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 7px 7px 7px 15px; border: 1.5px solid #e2e8f0; border-radius: 16px; background: #ffffff; }
.apikey-new:focus-within { border-color: color-mix(in srgb, var(--primary, #6366f1) 55%, #ffffff); }
.apikey-new-ico { flex-shrink: 0; font-size: 0.82rem; color: #94a3b8; }
.apikey-new input { flex: 1; min-width: 0; padding: 8px 0; border: none; outline: none; background: transparent; font-size: 0.87rem; color: #0f172a; }
.apikey-new button { flex-shrink: 0; padding: 9px 18px; border: none; border-radius: 11px; background: var(--primary, #4f46e5); font-size: 0.83rem; font-weight: 700; color: #ffffff; cursor: pointer; }
.apikey-new button:disabled { opacity: 0.5; cursor: not-allowed; }
.apikey-fresh { position: relative; margin-top: 16px; }
.apikey-fresh pre { margin: 0; padding: 16px 96px 16px 16px; border: 0; border-radius: 14px; background: #111a33; font-size: 0.8rem; color: #e2e8f0; white-space: pre-wrap; word-break: break-all; }
.apikey-copy { position: absolute; top: 11px; right: 11px; padding: 5px 11px; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 10px; background: rgba(255, 255, 255, 0.12); font-size: 0.7rem; font-weight: 600; color: #e2e8f0; }
.apikey-warn { margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: rgba(228, 128, 60, 0.14); font-size: 0.82rem; line-height: 1.5; color: #92400e; }
.pf3 .tech-sub { margin: 0; padding: 0; border: 0; }
.pf3 .tech-sub-head { display: none; }
/* Telefono e finestre strette: la navigazione diventa una riga di pillole che scorre, le righe si impilano */
@media (max-width: 991px) {
    .pf3-grid { grid-template-columns: minmax(0, 1fr); }
    .pf3-nav { position: sticky; top: 0; z-index: 5; flex-direction: row; gap: 4px; padding: 6px; overflow-x: auto; border-radius: 16px; scrollbar-width: none; }
    .pf3-nav::-webkit-scrollbar { display: none; }
    .pf3-nav-link { white-space: nowrap; }
}
@media (max-width: 991px) {
    .pf3-head { flex-wrap: wrap; }
    .pf3-health { width: 100%; }
}
@media (max-width: 640px) {
    .pf3-head { padding: 16px; }
    .pf3-avatar { width: 56px; height: 56px; }
    .pf3-panel { padding: 18px 16px; }
    .pf3-row { grid-template-columns: minmax(0, 1fr); }
    .pf3-row-ctl { justify-content: flex-start; }
    .pf3-ro { text-align: left; }
    .pf3-conn, .pf3-danger { flex-wrap: wrap; }
}
/* Agenda non collegata a Google Calendar (gcal_connect_hint), al posto del calendario */
.gcal-connect-v3 { display: flex; flex-direction: column; align-items: center; gap: 6px; max-width: 420px; margin: 0 auto; padding: 48px 24px; text-align: center; font-size: 0.84rem; color: #64748b; }
.gcal-connect-v3 > i { margin-bottom: 6px; font-size: 2.2rem; color: #94a3b8; }
.gcal-connect-v3 b { font-size: 1rem; color: #0f172a; }
.gcal-connect-v3 .btn { margin-top: 10px; }
.gcal-connect-v3 .btn i { margin-right: 6px; }
.gcal-connect-v3 small { color: #94a3b8; }
.agv3.agv3-no-gcal { grid-template-columns: minmax(0, 1fr); }
.agv3-no-gcal .agv3-nav, .agv3-no-gcal .agv3-views, .agv3-no-gcal .agv3-mtitle, .agv3-no-gcal .agv3-strip { display: none; }

/* Report Venditore v3 (views/reports.php, DESIGN.md §38): scelta dell'immobile e download, poi cosa contiene */
.srp3 { max-width: 880px; }
.srp3 .users-page-header { margin-bottom: 1rem; }
.srp3-sub { margin: 4px 0 0; font-size: 0.9rem; color: #64748b; }
.srp3 .glass-v3-panel { padding: 20px 22px; margin-bottom: 16px; }
.srp3-row { display: flex; gap: 10px; align-items: stretch; margin-top: 6px; }
.srp3-select { flex: 1; min-width: 0; }
.srp3 .select2-container .select2-selection--single { height: auto; min-height: 52px; display: flex; align-items: center; border-radius: 14px; border-color: #e2e8f0; }
.srp3 .select2-container .select2-selection__rendered { line-height: 1.3; padding: 6px 36px 6px 14px; }
.srp3 .select2-container .select2-selection__arrow { height: 100%; }
.srp3-go { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; padding: 0 20px; border: 0; border-radius: 14px; background: var(--primary, #6366f1); font-size: 0.9rem; font-weight: 800; color: #ffffff; cursor: pointer; transition: opacity 0.15s ease, transform 0.1s ease; }
.srp3-go:hover:not(:disabled) { box-shadow: 0 8px 18px color-mix(in srgb, var(--primary, #6366f1) 30%, transparent); }
.srp3-go:active:not(:disabled) { transform: scale(0.98); }
.srp3-go:disabled { opacity: 0.45; cursor: not-allowed; }
.srp3-go:focus-visible { outline: 2px solid var(--primary, #6366f1); outline-offset: 2px; }
/* Scarica report: il formato si sceglie dal menu, ognuno con a cosa serve */
.srp3-dl { flex: 0 0 auto; display: flex; }
/* Il riquadro dell'immobile sopra "Cosa contiene": i pannelli di vetro (backdrop-filter) sono livelli a sé e quello che viene
   dopo copriva il menu del formato */
.srp3-pick { position: relative; z-index: 2; }
/* Download in corso nella pagina: barra a stima, poi esito (scaricato o errore) */
.srp3-status { margin-top: 14px; }
.srp3-bar { height: 6px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.srp3-bar > span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--primary, #6366f1); transition: width 0.2s linear; }
.srp3-status.is-done .srp3-bar > span { background: #16a34a; }
.srp3-status.is-error .srp3-bar { display: none; }
.srp3-msg { margin: 8px 0 0; font-size: 0.84rem; color: #475569; }
.srp3-status.is-done .srp3-msg { color: #15803d; font-weight: 700; }
.srp3-status.is-error .srp3-msg { color: #b91c1c; font-weight: 700; }
.srp3-menu { min-width: 300px; padding: 6px; border: 1px solid #e2e8f0; border-radius: 14px; box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14); }
.srp3-fmt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 8px 12px; border: 0; border-radius: 10px; background: none; text-align: left; cursor: pointer; }
.srp3-fmt:hover, .srp3-fmt:focus-visible { background: #f1f5f9; outline: none; }
.srp3-fmt > i { width: 22px; font-size: 1.3rem; text-align: center; }
.srp3-fmt .fa-file-pdf { color: #dc2626; }
.srp3-fmt .fa-file-word { color: #2563eb; }
.srp3-fmt b { display: block; font-size: 0.92rem; color: #1c2434; }
.srp3-fmt small { display: block; font-size: 0.8rem; color: #475569; }
.srp3-opt { display: grid; grid-template-columns: auto auto 1fr; align-items: baseline; column-gap: 8px; }
.srp3-opt b { font-size: 0.86rem; color: #0f172a; }
.srp3-who { justify-self: end; grid-column: 3; font-size: 0.72rem; font-weight: 700; color: #64748b; }
.srp3-addr { grid-column: 1 / -1; font-size: 0.78rem; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srp3-off { font-size: 0.66rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; padding: 1px 6px; border-radius: 999px; background: #f1f5f9; color: #64748b; }
.srp3-opt.is-off b { color: #64748b; }
.select2-results__option--highlighted .srp3-opt b, .select2-results__option--highlighted .srp3-who, .select2-results__option--highlighted .srp3-addr { color: #ffffff; }
.srp3-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; margin: 10px 0 0; padding: 0; list-style: none; }
.srp3-list li { display: flex; gap: 10px; align-items: flex-start; }
.srp3-list b { display: block; font-size: 0.86rem; color: #0f172a; }
.srp3-list small { display: block; font-size: 0.76rem; color: #64748b; }
.srp3-ico { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 10px; color: var(--primary, #6366f1); background: color-mix(in srgb, var(--primary, #6366f1) 10%, #ffffff); }
@media (max-width: 767px) {
    .srp3-row { flex-direction: column; }
    .srp3-go { justify-content: center; min-height: 48px; }
    .srp3-list { grid-template-columns: minmax(0, 1fr); }
}

/* Kanban delle attività (DESIGN.md §36): titolo = l'indicazione, fatte barrate, record collegato su una riga */
#actKanban .kb3-title { display: block; font-weight: 700; color: #0f172a; }
#actKanban .kb3-title.is-done { text-decoration: line-through !important; color: #94a3b8 !important; }
#actKanban .kb3-title.is-empty { color: #94a3b8 !important; font-weight: 600; }
#actKanban .kb3-title:hover { text-decoration: none !important; }
#actKanban .task-rel-v3 { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#actKanban .kb3-col[data-kb-col="overdue"] .kb3-head h3 { color: #dc2626; }
#actKanban .kb3-row { display: flex; align-items: flex-start; gap: 8px; padding-right: 26px; }
#actKanban .kb3-row .kb3-title { flex: 1; min-width: 0; padding-right: 0; }
#actKanban .kb3-check { flex: 0 0 auto; width: 22px; height: 22px; margin-top: -1px; font-size: 0.66rem; }

/* Barra dei risultati in una riga (TableListShell, DESIGN.md §27): quanti e filtri attivi a sinistra,
   Salva vista · Ordina · "⋯" a destra; senza filtri resta "15 attività ……… Ordina ⋯" */
.acc-results-bar-v3 { gap: 8px 16px; }
.results-left-v3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; flex: 1 1 auto; min-width: 0; }
.results-left-v3 .results-count-v3 { color: #64748b; white-space: nowrap; }
.results-left-v3 .results-count-v3 b { color: #0f172a; }
.results-left-v3 .active-filters-chips-v3 { margin: 0; padding: 0; }
.results-save-view-v3[hidden] { display: none !important; }
.results-more-btn-v3 { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 999px; }
.results-more-btn-v3:hover, .results-more-v3.show .results-more-btn-v3 { background: #eef2f7; text-decoration: none; }
.results-more-v3 .dropdown-menu { min-width: 240px; }

/* Kanban Opportunità: azioni al volo sulla scheda (commento, attività, chiama) e il piccolo modulo accanto */
.kb3-acts { display: flex; gap: 4px; margin-top: 2px; padding-top: 6px; border-top: 1px dashed #eef2f7; }
.kb3-act { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #64748b; font-size: 0.82rem; cursor: pointer; text-decoration: none !important; transition: background 0.15s ease, color 0.15s ease; }
.kb3-act:hover, .kb3-act.is-open { background: color-mix(in srgb, var(--primary, #6366f1) 10%, #ffffff); color: var(--primary, #6366f1); }
.kb3-act.is-call:hover { background: var(--st-ok-soft, #dcfce7); color: var(--st-ok, #16a34a); }
.kb3-act:focus-visible { outline: 2px solid var(--primary, #6366f1); outline-offset: 1px; }
/* Desktop: le icone si accendono passando sulla scheda (restano visibili ma tenui); al tocco sempre piene */
@media (hover: hover) { .kb3-card .kb3-act { opacity: 0.55; } .kb3-card:hover .kb3-act, .kb3-act:focus-visible, .kb3-act.is-open { opacity: 1; } }
.kb3-quick { position: fixed; z-index: 1060; display: flex; flex-direction: column; gap: 8px; width: 300px; max-width: calc(100vw - 16px); padding: 12px; border: 1px solid rgba(15, 23, 42, 0.08); border-radius: 16px; background: #ffffff; box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18); }
.kb3-quick-label { margin: 0; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: #64748b; }
.kb3-quick textarea { width: 100%; resize: vertical; min-height: 72px; padding: 8px 10px; border: 1px solid #e2e8f0; border-radius: 10px; font-size: 0.86rem; color: #0f172a; }
.kb3-quick textarea:focus { outline: none; border-color: color-mix(in srgb, var(--primary, #6366f1) 45%, #e2e8f0); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #6366f1) 14%, transparent); }
.kb3-quick-dues { display: flex; flex-wrap: wrap; gap: 4px; }
.kb3-quick-dues button { padding: 4px 9px; border: 1px solid #e2e8f0; border-radius: 999px; background: #ffffff; font-size: 0.74rem; font-weight: 700; color: #475569; cursor: pointer; }
.kb3-quick-dues button.is-on { border-color: var(--primary, #6366f1); background: color-mix(in srgb, var(--primary, #6366f1) 10%, #ffffff); color: var(--primary, #6366f1); }
.kb3-quick-foot { display: flex; justify-content: flex-end; gap: 6px; }
.kb3-quick-cancel { padding: 6px 12px; border: 0; border-radius: 999px; background: transparent; font-size: 0.8rem; font-weight: 700; color: #64748b; cursor: pointer; }
.kb3-quick-save { padding: 6px 14px; border: 0; border-radius: 999px; background: var(--primary, #6366f1); font-size: 0.8rem; font-weight: 800; color: #ffffff; cursor: pointer; }
.kb3-quick-save:disabled { opacity: 0.6; cursor: default; }

/* Schede v3: "Collegati" (Contatto: richieste, opportunità, lead; Agenzia: i lead) — una riga per record, col codice */
.c3-linked-list { display: flex; flex-direction: column; gap: 4px; max-height: 320px; overflow-y: auto; }
.c3-linked { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; color: var(--c3-ink, #0f172a) !important; text-decoration: none !important; transition: background 0.15s ease; }
.c3-linked:hover, .c3-linked:focus-visible { background: color-mix(in srgb, var(--k, var(--primary, #6366f1)) 8%, #ffffff); }
.c3-linked-code { flex: 0 0 auto; padding: 2px 7px; border-radius: 999px; background: #eef2f7; font-size: 0.7rem; font-weight: 800; color: #475569; }
.c3-linked-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.c3-linked-txt b { font-size: 0.84rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c3-linked-txt small { font-size: 0.74rem; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c3-linked > .fa-chevron-right { font-size: 0.7rem; color: #94a3b8; }
.c3-linked-new { display: flex; gap: 14px; margin-top: 8px; padding: 0 10px; }

/* Schede v3: i dati vuoti non si mostrano; un solo "+ Aggiungi dato" per gruppo (c3_add_fact) */
.c3-fact[hidden], .c3-add-fact[hidden] { display: none !important; }
.c3-add-fact-wrap { margin-top: 6px; }
.c3-add-fact { font-size: 0.8rem; }
.c3-add-fact-menu { min-width: 200px; border-radius: 12px; }

/* Schede v3: ricorrenze del contatto (chip da toccare, "+ Ricorrenza", modulo in linea) */
.c3-ann { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.c3-ann-chip .is-on { color: var(--st-ok, #16a34a); }
.c3-ann-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: 100%; margin-top: 6px; padding: 10px; border: 1px solid #e2e8f0; border-radius: 12px; background: #ffffff; }
.c3-ann-form[hidden] { display: none; }
.c3-ann-form .c3-text-input { width: auto; }
.c3-ann-auto { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 0.8rem; color: #475569; }
.c3-ann-btns { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.c3-ann-del { color: var(--st-lost, #dc2626) !important; }

/* Contatti v3: "La mia ultima attività" (quando e come ci ho lavorato io) */
.my-last-v3 { display: inline-flex; flex-direction: column; gap: 1px; line-height: 1.2; }
.my-last-v3 small { padding-left: 20px; font-size: 0.72rem; color: #64748b; }
.my-last-v3.is-none { font-size: 0.8rem; color: #94a3b8; }

/* Contatti v3: etichette in tabella (categorie piene, etichette #nome leggere, "+N") */
.ctags-v3 { display: flex; flex-wrap: nowrap; gap: 4px; min-width: 0; overflow: hidden; } /* una riga sola: 3 e poi "+N" */
.ctag-v3 { flex: 0 1 auto; min-width: 0; max-width: 150px; overflow: hidden; text-overflow: ellipsis; display: inline-block; line-height: 20px; }
.ctag-v3.is-more { flex: 0 0 auto; padding: 0 8px; border-radius: 999px; clip-path: none; background: #f1f5f9; color: #64748b; box-shadow: inset 0 0 0 1px #e2e8f0; cursor: default; }
.ctag-v3.is-more::before { display: none; }
.ctag-none-v3 { color: #cbd5e1; }

/* Contatti v3: griglia propria (la riga è quella di Richieste, h.row): ID · Contatto (nome, cellulare, email) · Etichette ·
   Ultima attività, senza le celle di collegamento, stato e notifiche; la colonna più larga è quella delle etichette */
.contacts-grid-v3 .grid-col-connector, .contacts-grid-v3 .grid-col-notif,
#contacts_dt .richieste-header-grid > .grid-col-connector, #contacts_dt .richieste-header-grid > .grid-col-notif { display: none !important; }
@media (min-width: 992px) {
    .acc-lean-v3 .contacts-grid-v3, .contacts-grid-v3, #contacts_dt .richieste-header-grid { grid-template-columns: 120px minmax(0, 1.2fr) minmax(0, 1.4fr) auto 150px auto !important; }
    #contacts_dt .grid-col-id .mini-client-card-v3 { max-width: 380px; }
}

.c3-tag-group { display: block; padding: 8px 10px 2px; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #94a3b8; }
.c3-asg-list button.is-cat .fa-bookmark { margin-right: 4px; font-size: 0.65rem; color: #64748b; }

/* Scheda contatto v3: voce della cronologia che arriva da una richiesta / opportunità / lead del contatto */
.c3-from { display: inline-flex; align-items: center; gap: 4px; margin-left: 4px; padding: 1px 7px; border-radius: 6px; background: #f1f5f9; color: #475569 !important; font-size: 0.7rem; font-weight: 700; text-decoration: none !important; white-space: nowrap; vertical-align: 1px; }
.c3-from:hover, .c3-from:focus-visible { background: #e2e8f0; color: #0f172a !important; }
.c3-from i { font-size: 0.6rem; color: #94a3b8; }

/* Scheda contatto v3: categoria obbligatoria che manca (prima di modificare il contatto va scelta) */
.c3-cat-required { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border: 1px solid color-mix(in srgb, var(--st-pending, #f59e0b) 55%, transparent); border-radius: 999px;
    background: var(--st-pending-soft, #fef3c7); color: var(--st-pending-ink, #78350f); font-size: 0.76rem; font-weight: 700; cursor: pointer; }
.c3-cat-required:hover, .c3-cat-required:focus-visible { background: color-mix(in srgb, var(--st-pending, #f59e0b) 25%, #ffffff); }

/* ── Schede v3 a sottrazione (DESIGN.md §32, 13/10/2026): una sola card bianca, niente riquadro tratteggiato, cartelle,
   tinte di stato e maiuscoletti. Gruppi bianchi su grigio chiaro e un solo accento per significato: il colore dello
   stato resta solo su pillola e frecce, il colore del tipo sull'icona in alto. In fondo al file: vince sulle regole sopra */
/* Il legame resta (DESIGN.md §32: "Opportunità POT… collega" il cliente e l'immobile, con la freccia), ma neutro:
   tratteggio grigio, senza la tinta dello stato; dentro niente altre scatole */
/* Una cornice sola: è la card della testata a essere tratteggiata (legame + etichette + lavorazione), il riquadro interno
   non ha più bordo; "Opportunità POT…" sta sul bordo della card */
.c3-head.c3-card { position: relative; padding-top: 30px; border: 2px dashed #d5dbe5; box-shadow: none; }
.c3-head .c3-bond { position: static; margin-top: 0; padding: 0; border: 0; border-radius: 0; background: none; }
@container c3main (min-width: 620px) {
    .c3-bond { column-gap: 8px; }
    /* La freccia punta al centro del riquadro di destra (l'opportunità, l'immobile…), non a metà riga: la colonna resta
       come spazio, la freccia la disegna il riquadro */
    .c3-bond-link { width: 44px; height: auto; margin: 0; visibility: hidden; }
    .c3-bond-side .c3-strip > .c3-field:first-child:not(.is-compact) { position: relative; }
    .c3-bond-side .c3-strip > .c3-field:first-child:not(.is-compact)::before { content: '\f101'; position: absolute; top: 50%; right: 100%; width: 44px; margin-right: 1px;
        transform: translateY(-50%); font: 900 2.2rem/1 'Font Awesome 6 Free'; text-align: center; color: #cdd3df; pointer-events: none; }
    .c3-bond-client .c3-entity .c3-folder-body, .c3-bond-side .c3-strip .c3-field:not(.is-compact) { min-height: 0; margin-top: 0; }
}
/* Il cliente nel riquadro: niente cartellina, solo una riga d'intestazione */
.c3-entity { filter: none; }
.c3-entity .c3-folder-tab { height: auto; padding: 0 0 8px; border-radius: 0; background: none; font-size: 0.8rem; font-weight: 700; color: var(--c3-mute); }
.c3-entity .c3-folder-tab::after { display: none; }
.c3-entity .c3-folder-body { padding: 12px 14px; border: 1px solid var(--c3-line); border-radius: 14px; background: #ffffff; }
.c3-bond .c3-phone-mask { white-space: nowrap; }
.c3-bond .c3-client { gap: 12px; }
.c3-entity-code { background: #f1f5f9; box-shadow: none; color: var(--c3-mute) !important; }
/* Nelle schede figlie (Opportunità, Richiesta, Lead) il contatto è un'anteprima della sua scheda: un foglio grigio chiaro
   che si solleva appena dal lato destro (ombra solo sotto il bordo destro, un filo ruotata); il verde acqua del Contatto
   solo sul testo della linguetta */
:is(.c3[data-kind="amber"], .c3[data-kind="sky"], .c3[data-entity="recruiting_leads"]) .c3-entity { --f: #ffffff; --f-ink: #0f5f58; --f-line: #dfe4ec; isolation: isolate;
    /* bianco con un filo grigio che segue anche la curva della linguetta (un bordo non la seguirebbe) */
    filter: drop-shadow(1px 0 0 var(--f-line)) drop-shadow(-1px 0 0 var(--f-line)) drop-shadow(0 1px 0 var(--f-line)) drop-shadow(0 -1px 0 var(--f-line)); }
:is(.c3[data-kind="amber"], .c3[data-kind="sky"], .c3[data-entity="recruiting_leads"]) .c3-entity .c3-folder-tab { height: 32px; padding: 0 14px; border-radius: 14px 0 0 0; background: var(--f); font-size: 0.78rem; font-weight: 700; color: var(--f-ink); }
:is(.c3[data-kind="amber"], .c3[data-kind="sky"], .c3[data-entity="recruiting_leads"]) .c3-entity .c3-folder-tab::after { display: block; width: 24px; clip-path: path('M0 0 C 10 0 10 32 24 32 L 0 32 Z'); }
:is(.c3[data-kind="amber"], .c3[data-kind="sky"], .c3[data-entity="recruiting_leads"]) .c3-entity .c3-folder-body { position: relative; padding: 14px 16px; border: 0; border-radius: 0 16px 16px 16px; background: var(--f); box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06); }
:is(.c3[data-kind="amber"], .c3[data-kind="sky"], .c3[data-entity="recruiting_leads"]) .c3-entity .c3-folder-body::after { content: ''; position: absolute; z-index: -1; top: 22%; right: 8px; bottom: 6px; width: 45%; border-radius: 0 16px 16px 0;
    box-shadow: 8px 6px 14px rgba(15, 23, 42, 0.16); transform: rotate(1.6deg); transform-origin: left center; pointer-events: none; }
:is(.c3[data-kind="amber"], .c3[data-kind="sky"], .c3[data-entity="recruiting_leads"]) .c3-entity-code { background: #f1f5f9; color: var(--f-ink) !important; }
/* Contatto e opportunità: due lati con un bordino leggero, la freccia in mezzo */
.c3-bond .c3-strip .c3-field:not(.is-compact), .c3-bond .c3-strip .c3-field:first-child:not(.is-compact) { padding: 14px 16px; border: 1px solid var(--c3-line); border-radius: 14px; background: #ffffff; box-shadow: none; }
/* Chiama resta il solo pulsante pieno; WhatsApp bianco con l'icona verde */
/* Chiama e WhatsApp alla pari: stessa larghezza, tutti e due pieni */
.c3-client-acts { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 14px; }
.c3-client-acts .c3-call-big { gap: 6px; padding: 0 10px; height: 40px; border-radius: 12px; box-shadow: none; background: var(--primary, #6366f1); }
.c3-client-acts .c3-call-big > i { width: auto; height: auto; background: none; font-size: 0.95rem; }
.c3-client-acts .c3-call-big b { font-size: 0.9rem; }
.c3-client-acts .c3-call-big.is-wa { background: #16a34a; }
.c3-sticky { margin: 14px 0 0; box-shadow: none; border-radius: 12px; }
/* Etichette: una riga sotto un filo, chip neutri; il ⚡ resta ambra */
.c3-bond .c3-bond-tags .c3-tag.is-auto::before { background: var(--st-pending, #f59e0b); }
/* Etichette dei campi in tondo, grigie */
.c3-fact-label, .c3-status-label, .c3-tags-label, .c3-bond .c3-bond-tags .c3-tags-label, .c3-sticky-head, .c3-idrow,
.c3-bond-side .c3-status-label, .c3-bond .c3-strip .c3-field.is-compact .c3-field-label { font-size: 0.8rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--c3-mute); }
/* La colonna destra resta a cartelle (In programma, Commento o attività, Allegati): piace così */
/* Klaila: bordo fermo, etichetta in testo normale */
.c3-next::before { animation: none; }
.c3-next .c3-ai-head .bks-ai-label { background: none; -webkit-text-fill-color: var(--c3-mute); color: var(--c3-mute); }
.c3-prev-st { font-size: 0.8rem; font-weight: 600; color: var(--c3-mute); }
/* Richiesta: l'immobile è una schedina che apre l'anteprima (showPropertyPreview) */
.c3-prop-card { display: flex; align-items: center; gap: 10px; width: 100%; margin: 2px 0 10px; padding: 8px 10px; border: 1px solid var(--c3-line); border-radius: 12px; background: #f8fafc; font: inherit; text-align: left; cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease; }
.c3-prop-card:hover, .c3-prop-card:focus-visible { border-color: color-mix(in srgb, var(--primary, #6366f1) 40%, #ffffff); background: #ffffff; }
.c3-prop-ico { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 34px; height: 34px; border-radius: 10px; background: #ffffff; color: var(--primary, #6366f1); box-shadow: inset 0 0 0 1px var(--c3-line); }
.c3-prop-txt { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.c3-prop-txt b { font-size: 0.92rem; color: var(--c3-ink); }
.c3-prop-txt b .c3-muted { margin-left: 4px; }
.c3-prop-txt small { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 0.76rem; line-height: 1.3; color: var(--c3-mute); }
.c3-prop-go { flex: 0 0 auto; font-size: 0.78rem; font-weight: 700; color: var(--primary, #6366f1); }
.c3-prop-go i { font-size: 0.65rem; }
/* …e la cosa di destra (Opportunità, Immobile…) è il blocco principale: bianco, un'elevazione morbida un po' più alta del
   contatto, un filo del colore del tipo in cima, il titolo più grande */
:is(.c3[data-kind="amber"], .c3[data-kind="sky"], .c3[data-entity="recruiting_leads"]) .c3-bond-side .c3-strip > .c3-field:first-child:not(.is-compact) { border-color: #e6eaf0; box-shadow: 0 12px 28px -14px rgba(15, 23, 42, 0.22), 0 2px 6px -2px rgba(15, 23, 42, 0.06); }
/* in ogni scheda la prima schedina a destra ("Dettaglio opportunità", "Dettaglio contatto"…) ha una piccola testata
   nella sfumatura del tipo (--k-grad), la stessa della barra delle etichette in fondo: le due cose primarie si rispondono */
.c3 .c3-bond-side .c3-strip > .c3-field:first-child:not(.is-compact) > .c3-field-label { display: flex; align-items: center; gap: 8px; margin: -14px -16px 14px; padding: 10px 16px;
    border-radius: 13px 13px 0 0; font-size: 0.82rem; font-weight: 800; letter-spacing: 0.01em; color: #ffffff; background: var(--k-grad); }
.c3 .c3-bond-side .c3-strip > .c3-field:first-child:not(.is-compact) > .c3-field-label .c3-edit-btn { margin-left: auto; color: rgba(255, 255, 255, 0.75); }
:is(.c3[data-kind="amber"], .c3[data-kind="sky"], .c3[data-entity="recruiting_leads"]) .c3-bond-side .c3-strip > .c3-field:first-child:not(.is-compact) .c3-title-line { font-size: 1.15rem; font-weight: 800; color: var(--c3-ink); }
/* Valore dell'opportunità: sempre visibile in fondo alla schedina, con "Calcola" (prezzo incarico × provvigioni) */
.c3-value { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--c3-line); }
.c3-value-label { flex: 1 1 auto; font-size: 0.8rem; font-weight: 700; color: var(--c3-mute); }
.c3-value-amount { display: inline-flex; align-items: center; gap: 4px; font-size: 1.15rem; font-weight: 800; color: var(--c3-ink); }
.c3-value-amount:hover .c3-edit-btn { opacity: 1; }
.c3-value-calc-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 1px solid var(--c3-line); border-radius: 999px; background: #ffffff; font-size: 0.8rem; font-weight: 700; color: var(--c3-ink); cursor: pointer; }
.c3-value-calc-btn:hover, .c3-value-calc-btn[aria-expanded="true"] { border-color: color-mix(in srgb, var(--primary, #6366f1) 40%, #ffffff); color: var(--primary, #6366f1); }
.c3-value-form { display: grid; gap: 10px; flex-basis: 100%; margin-top: 8px; padding: 14px; border-radius: 14px; background: #f8fafc; }
.c3-value-form[hidden] { display: none; }
.c3-value-form label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; font-size: 0.85rem; font-weight: 600; color: var(--c3-ink); }
.c3-value-in { display: inline-flex; align-items: center; gap: 6px; }
.c3-value-in input { width: 104px; height: 36px; padding: 0 10px; border: 1px solid var(--c3-line); border-radius: 10px; background: #ffffff; font: inherit; text-align: right; }
.c3-value-in input:focus { outline: none; border-color: color-mix(in srgb, var(--primary, #6366f1) 45%, #ffffff); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #6366f1) 14%, transparent); }
.c3-value-in i { width: 14px; font-style: normal; font-weight: 700; color: var(--c3-mute); }
.c3-value-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding-top: 10px; border-top: 1px dashed #d5dbe5; }
.c3-value-total span { font-weight: 700; }
.c3-value-total b { margin-left: auto; font-size: 1.15rem; font-weight: 900; color: var(--c3-ink); }
.c3-value-total small { flex-basis: 100%; text-align: right; font-size: 0.76rem; color: var(--c3-mute); }
.c3-value-acts { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.c3-value-acts .c3-add { height: 36px; }
/* Etichette: in fondo alla cornice tratteggiata, una barra come l'header del Centralino Live (.pbx-live-header-v3:
   sfumatura scura del primario, angoli 18px, ombra nel primario); etichette come i suoi pulsanti di vetro, col pallino
   del loro colore (--tg-h da MYB.Card3); "+ Etichetta" bianco pieno come "+ Richiesta"; automazioni col ⚡ ambra */
.c3-head > .c3-bond-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 22px 0 0; padding: 14px 18px; border: 0; border-radius: 18px;
    background: var(--k-grad); box-shadow: 0 8px 22px color-mix(in srgb, var(--k, #6366f1) 22%, transparent); color: #ffffff; }
.c3-head > .c3-bond-tags .c3-tags-label { display: inline-flex; align-items: center; gap: 8px; margin-right: 8px; font-size: 1rem; font-weight: 800; letter-spacing: 0.01em; text-transform: none; color: #ffffff; }
.c3-head > .c3-bond-tags .c3-tags-label > i { margin: 0; font-size: 0.85rem; color: rgba(255, 255, 255, 0.7); }
.c3-head > .c3-bond-tags .c3-tags-n { font-weight: 600; color: rgba(255, 255, 255, 0.62); }
.c3-head > .c3-bond-tags .c3-tag { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 11px;
    background: rgba(255, 255, 255, 0.1); box-shadow: none; font-size: 0.82rem; font-weight: 700; white-space: nowrap; color: #ffffff; transition: background 0.15s ease; }
.c3-head > .c3-bond-tags .c3-tag:hover { background: rgba(255, 255, 255, 0.2); }
.c3-head > .c3-bond-tags .c3-tag::before { content: ''; flex: 0 0 8px; height: 8px; border-radius: 50%; background: hsl(var(--tg-h, 215) 85% 68%); }
.c3-head > .c3-bond-tags .c3-tag .c3-hash { display: none; }
.c3-head > .c3-bond-tags .c3-tag.c3-cat::before, .c3-head > .c3-bond-tags .c3-tag.is-auto::before { display: none; }
.c3-head > .c3-bond-tags .c3-tag.c3-cat > .fa-bookmark { color: rgba(255, 255, 255, 0.75); }
.c3-head > .c3-bond-tags .c3-tag.c3-cat.is-other { background: transparent; border-style: dashed; color: rgba(255, 255, 255, 0.7); }
.c3-head > .c3-bond-tags .c3-tag.is-auto { border-color: rgba(251, 191, 36, 0.7); background: rgba(251, 191, 36, 0.14); cursor: help; }
.c3-head > .c3-bond-tags .c3-tag.is-auto > i { font-size: 0.72rem; color: #fbbf24; }
.c3-head > .c3-bond-tags .c3-tag button { align-self: stretch; min-width: 22px; margin-right: -6px; padding: 0 6px; border: 0; background: none; font-size: 0.95rem; color: inherit; opacity: 0.7; cursor: pointer; }
@media (hover: hover) {
    .c3-head > .c3-bond-tags .c3-tag button { min-width: 0; max-width: 0; margin-right: 0; padding: 0; overflow: hidden; opacity: 0; transition: max-width 0.15s ease, opacity 0.15s ease; }
    .c3-head > .c3-bond-tags .c3-tag:hover button, .c3-head > .c3-bond-tags .c3-tag button:focus-visible { max-width: 22px; padding: 0 4px 0 2px; margin-right: -4px; opacity: 1; }
}
.c3-head > .c3-bond-tags .c3-tag-add { height: 32px; padding: 0 14px; border: 1px solid #ffffff; border-radius: 11px; background: #ffffff; font-size: 0.82rem; font-weight: 800;
    color: var(--k-ink, #312e81); transition: transform 0.15s ease; }
.c3-head > .c3-bond-tags .c3-tag-add:hover, .c3-head > .c3-bond-tags .c3-tag-add:focus-visible { background: #ffffff; color: var(--k-ink, #312e81); transform: translateY(-1px); }
.c3-head > .c3-bond-tags .c3-tags-auto { font-size: 0.8rem; font-weight: 600; color: rgba(255, 255, 255, 0.75); }
.c3-head > .c3-bond-tags .c3-tags-auto i { color: #fbbf24; }
.c3-head > .c3-bond-tags .c3-cat-required { height: 32px; border-radius: 11px; }
.c3-head > .c3-bond-tags.is-missing-cat { box-shadow: inset 0 0 0 2px #fbbf24, 0 8px 22px color-mix(in srgb, var(--k, #6366f1) 22%, transparent); }
@media (max-width: 767px) { .c3-head > .c3-bond-tags { margin-top: 16px; padding: 12px 14px; } .c3-head > .c3-bond-tags .c3-tags-auto { flex-basis: 100%; margin-left: 0; } }
/* Legenda sul bordo della cornice: il tipo nel suo colore e il codice da copiare (c3_legend) */
.c3-bond-legend { position: absolute; top: -15px; left: 20px; display: flex; align-items: center; gap: 8px; padding: 0 8px; border-radius: 999px;
    background: linear-gradient(to bottom, transparent 45%, #ffffff 45%); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c3-mute); }
.c3[data-kind] .c3-bond-legend > span { color: var(--k-ink); }
/* "Versione precedente", discreta a destra dell'intestazione (era il banner "Stai usando la nuova scheda") */
.c3-kind { align-self: stretch; }
.c3-kind-classic { margin-left: auto; font-size: 0.78rem; font-weight: 700; color: var(--c3-mute) !important; text-decoration: none !important; }
.c3-kind-classic:hover { color: var(--c3-ink) !important; text-decoration: underline !important; }

/* ── Scouting: Converti in opportunità e Stabile (foglio portone, DESIGN.md §34) ── */
.c3-act.is-convert.is-tile { background: var(--st-ok-soft, #dcfce7); color: var(--st-ok-ink, #14532d) !important; }
.c3-act.is-convert.is-tile > i { color: var(--st-ok, #16a34a); }
.c3-converted { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: var(--st-ok-soft, #dcfce7); font-size: 0.85rem; font-weight: 700; color: var(--st-ok-ink, #14532d) !important; text-decoration: none !important; }
.c3-converted > .fa-chevron-right { margin-left: auto; font-size: 0.7rem; }
.c3-convert .modal-body { display: flex; flex-direction: column; gap: 16px; }
.c3-convert fieldset { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; border: 0; }
.c3-convert legend { margin: 0 0 2px; font-size: 0.78rem; font-weight: 800; color: var(--c3-mute); }
.c3-convert label { display: flex; flex-direction: column; gap: 4px; margin: 0; font-size: 0.8rem; font-weight: 700; color: var(--c3-ink); }
.c3-convert input, .c3-convert select { height: 40px; padding: 0 12px; border: 1px solid var(--c3-line); border-radius: 10px; background: #ffffff; font: inherit; font-weight: 600; color: var(--c3-ink); }
.c3-convert input:focus, .c3-convert select:focus { outline: none; border-color: color-mix(in srgb, var(--primary, #6366f1) 45%, #ffffff); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #6366f1) 14%, transparent); }
.c3-convert-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.c3-convert-hint { font-size: 0.76rem; color: var(--c3-mute); }
.c3-convert-err { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--st-lost-soft, #fee2e2); font-size: 0.82rem; font-weight: 700; color: var(--st-lost-ink, #7f1d1d); }
.c3-convert .modal-footer { justify-content: space-between; }
@media (max-width: 575px) { .c3-convert-pair { grid-template-columns: minmax(0, 1fr); } }

.c3-folder.tone-rose { --f: #ffe4e6; --f-ink: #881337; }
/* Foglio portone nella cartella "Stabile": indirizzo e riassunto, note di accesso, i campanelli (un piano per riga
   dall'alto, una casella per unità col colore dello stato), "+ Piano"; il riquadro sul campanello (MYB.Card3) */
.c3-portone { display: flex; flex-direction: column; gap: 10px; }
.c3-portone-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.c3-portone-head b { display: block; font-size: 0.92rem; font-weight: 800; color: var(--c3-ink); }
.c3-portone-head span { font-size: 0.76rem; font-weight: 600; color: var(--c3-mute); }
.c3-portone-head .c3-chip { flex: 0 0 auto; }
.c3-portone-notes { display: flex; align-items: flex-start; gap: 8px; width: 100%; padding: 8px 10px; border: 1px solid rgba(255, 255, 255, 0.7); border-radius: 10px; background: rgba(255, 255, 255, 0.65);
    font: inherit; font-size: 0.8rem; font-weight: 600; text-align: left; white-space: pre-line; color: var(--c3-ink); cursor: pointer; }
.c3-portone-notes > i { margin-top: 3px; font-size: 0.72rem; color: var(--f-ink, #881337); }
.c3-portone-notes.is-empty { color: var(--c3-mute); font-weight: 500; }
.c3-portone-notes:hover { background: #ffffff; }
.c3-portone-floor { align-self: flex-start; font-size: 0.8rem; }
.c3-portone.is-big .c3-bell { min-width: 96px; max-width: 180px; height: 46px; }
.c3-bells { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.c3-bells-row, .c3-bells-loose { display: flex; align-items: flex-start; gap: 8px; }
.c3-bells-loose { flex-wrap: wrap; margin-top: 4px; padding-top: 10px; border-top: 1px dashed rgba(136, 19, 55, 0.25); }
.c3-bells-loose small { flex-basis: 100%; font-size: 0.74rem; color: var(--c3-mute); }
.c3-bells-floor { display: inline-flex; flex: 0 0 34px; align-items: center; justify-content: center; height: 40px; border-radius: 10px; background: rgba(255, 255, 255, 0.6); font-size: 0.8rem; font-weight: 800; color: var(--c3-mute); }
.c3-bells-floor.is-loose { background: transparent; border: 1px dashed #cbd5e1; }
.c3-bells-units { display: flex; flex: 1 1 auto; flex-wrap: wrap; gap: 6px; min-width: 0; }
.c3-bell { --b: var(--st-new, #f97316); position: relative; display: inline-flex; flex-direction: column; justify-content: center; align-items: flex-start; min-width: 64px; max-width: 130px; height: 40px; padding: 0 10px 0 12px;
    border: 1px solid var(--c3-line); border-radius: 10px; background: #ffffff; box-shadow: inset 3px 0 0 var(--b); font: inherit; line-height: 1.1; text-align: left; color: var(--c3-ink); cursor: pointer; }
.c3-bell b { font-size: 0.8rem; font-weight: 800; }
.c3-bell span { max-width: 100%; overflow: hidden; font-size: 0.72rem; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; color: var(--c3-mute); }
.c3-bell > .fa-star { position: absolute; top: 4px; right: 5px; font-size: 0.6rem; color: var(--st-ok, #16a34a); }
.c3-bell.is-follow { --b: var(--st-follow, #0ea5e9); }
.c3-bell.is-ok { --b: var(--st-ok, #16a34a); }
.c3-bell.is-lost { --b: var(--st-lost, #dc2626); }
.c3-bell:hover { border-color: #cbd5e1; background: #f8fafc; }
.c3-bell:focus-visible { outline: 2px solid var(--k, #be123c); outline-offset: 2px; }
.c3-bell.is-current { border-color: var(--k, #be123c); box-shadow: inset 3px 0 0 var(--b), 0 0 0 2px color-mix(in srgb, var(--k, #be123c) 25%, transparent); }
.c3-bell.is-locked { --b: #cbd5e1; flex-direction: row; align-items: center; gap: 6px; min-width: 0; background: #f8fafc; font-size: 0.78rem; font-weight: 700; color: #94a3b8; }
.c3-bell.is-locked i { font-size: 0.65rem; }
.c3-bell.is-add { min-width: 40px; align-items: center; border-style: dashed; background: transparent; box-shadow: none; font-size: 1.1rem; font-weight: 700; color: var(--c3-mute); }
.c3-bell.is-add:hover { border-color: var(--k, #be123c); color: var(--k, #be123c); }
.c3-bell-pop { position: fixed; z-index: 1070; width: 290px; max-width: calc(100vw - 16px); padding: 14px; border: 1px solid var(--c3-line, #e9edf3); border-radius: 16px; background: #ffffff;
    box-shadow: 0 18px 40px -12px rgba(15, 23, 42, 0.3); --c3-line: #e9edf3; --c3-ink: #1c2434; --c3-mute: #64748b; }
.c3-bell-pop.is-sheet { left: 0; right: 0; bottom: 0; width: auto; max-width: none; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; }
.c3-bp-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 10px; }
.c3-bp-head b { font-size: 0.92rem; font-weight: 800; color: var(--c3-ink); }
.c3-bp-st { padding: 2px 8px; border-radius: 999px; background: var(--st-new-soft, #ffedd5); font-size: 0.72rem; font-weight: 700; color: var(--st-new-ink, #9a3412); }
.c3-bp-st.is-follow { background: var(--st-follow-soft, #e0f2fe); color: var(--st-follow-ink, #075985); }
.c3-bp-st.is-ok { background: var(--st-ok-soft, #dcfce7); color: var(--st-ok-ink, #14532d); }
.c3-bp-st.is-lost { background: var(--st-lost-soft, #fee2e2); color: var(--st-lost-ink, #7f1d1d); }
.c3-bp-form { display: flex; flex-wrap: wrap; gap: 10px; }
.c3-bp-form label { display: flex; flex: 1 1 100px; flex-direction: column; gap: 4px; margin: 0; font-size: 0.78rem; font-weight: 700; color: var(--c3-ink); }
.c3-bp-form label.is-wide { flex-basis: 100%; }
.c3-bp-form input, .c3-bp-form textarea, .c3-bp-form select { width: 100%; padding: 0 10px; border: 1px solid var(--c3-line); border-radius: 10px; background: #ffffff; font: inherit; font-weight: 600; color: var(--c3-ink); }
.c3-bp-form input, .c3-bp-form select { height: 38px; }
.c3-bp-form textarea { padding: 8px 10px; resize: vertical; }
.c3-bp-form input:focus, .c3-bp-form textarea:focus, .c3-bp-form select:focus { outline: none; border-color: color-mix(in srgb, var(--primary, #6366f1) 45%, #ffffff); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #6366f1) 14%, transparent); }
.c3-bp-acts { display: flex; flex-basis: 100%; align-items: center; justify-content: space-between; gap: 10px; }
.c3-bp-acts a { font-size: 0.82rem; font-weight: 800; color: var(--primary, #6366f1) !important; }
.c3-bp-acts a i { font-size: 0.65rem; }
.c3-bp-acts .c3-add { height: 36px; padding: 0 16px; }
.c3-bp-here { font-size: 0.78rem; font-weight: 700; color: var(--c3-mute); }
.c3-bp-note { margin: 0; font-size: 0.84rem; font-weight: 600; line-height: 1.5; color: var(--c3-mute); }
@media (max-width: 767px) { .c3-bell { height: 44px; } .c3-bells-floor { height: 44px; } }
/* Foglio portone a tutto schermo (MYB.Portone): la ricerca dello stabile, i risultati, i campanelli grandi; nella lista
   Scouting il pulsante "Foglio portone" sta nella barra di ricerca accanto a "Filtri Avanzati" */
.btn-portone-trigger { margin-right: 6px; }
@media (max-width: 767px) { .btn-portone-trigger { padding: 10px 12px; font-size: 0; gap: 0; } .btn-portone-trigger i { font-size: 1rem; } }
.c3-portone.is-big { gap: 14px; }
.c3-portone.is-big .c3-portone-notes { border-color: var(--c3-line); background: #f8fafc; }
.c3-portone-find { display: flex; flex-direction: column; gap: 8px; }
.c3-portone-find[hidden], .c3-portone-sheet[hidden] { display: none; }
.c3-portone-sheet { display: flex; flex-direction: column; gap: 12px; }
.c3-portone-q { display: flex; align-items: center; gap: 10px; height: 46px; margin: 0; padding: 0 14px; border: 1px solid var(--c3-line); border-radius: 14px; background: #ffffff; }
.c3-portone-q:focus-within { border-color: color-mix(in srgb, var(--primary, #6366f1) 45%, #ffffff); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #6366f1) 14%, transparent); }
.c3-portone-q i { color: var(--c3-mute); }
.c3-portone-q input { flex: 1 1 auto; min-width: 0; height: 100%; border: 0; background: none; font: inherit; font-size: 0.92rem; font-weight: 600; color: var(--c3-ink); }
.c3-portone-q input:focus { outline: none; }
.c3-portone-hits { display: flex; flex-direction: column; gap: 4px; }
.c3-portone-hit { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 12px; background: #f8fafc; font: inherit; font-size: 0.86rem; text-align: left; color: var(--c3-ink); cursor: pointer; }
.c3-portone-hit:hover, .c3-portone-hit:focus-visible { background: #fff1f2; outline: none; }
.c3-portone-hit > i { color: #be123c; }
.c3-portone-hit span { flex: 1 1 auto; min-width: 0; }
.c3-portone-hit small { flex: 0 0 auto; font-size: 0.76rem; font-weight: 700; color: var(--c3-mute); }
.c3-portone-wait { margin: 0; padding: 10px 2px; font-size: 0.84rem; color: var(--c3-mute); }
/* Le due viste del foglio portone (data-view sul contenitore): Citofono (targhette + inserimento a raffica) e Piani
   (righe per piano, una colonna per scala, "+ Piano") */
[data-c3-portone-wrap][data-view="citofono"] .c3-view-piani, [data-c3-portone-wrap][data-view="citofono"] [data-c3-floor-add],
[data-c3-portone-wrap][data-view="piani"] .c3-view-citofono, [data-c3-portone-wrap][data-view="piani"] [data-c3-quick-add] { display: none !important; }
.c3-portone-switch { display: inline-flex; align-self: flex-start; gap: 2px; padding: 3px; border-radius: 12px; background: rgba(255, 255, 255, 0.6); }
.c3-portone.is-big .c3-portone-switch { background: #f1f5f9; }
.c3-portone-switch button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; font: inherit; font-size: 0.8rem; font-weight: 700; color: var(--c3-mute); cursor: pointer; }
.c3-portone-switch button[aria-pressed="true"] { background: #ffffff; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12); color: var(--c3-ink); }
.c3-portone-switch button i { font-size: 0.75rem; }
/* Citofono: targhette su due colonne, come sulla pulsantiera */
.c3-plates-group + .c3-plates-group { margin-top: 12px; }
.c3-plates-title { margin: 0 0 6px; font-size: 0.74rem; font-weight: 800; color: var(--c3-mute); }
.c3-plates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 6px; border-radius: 12px; background: #e2e8f0; }
.c3-portone.is-big .c3-plates { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.c3-plate { --b: var(--st-new, #f97316); display: flex; align-items: center; gap: 8px; min-width: 0; height: 36px; padding: 0 10px; border: 0; border-radius: 8px; background: #ffffff;
    font: inherit; font-size: 0.8rem; font-weight: 700; text-align: left; color: var(--c3-ink); cursor: pointer; }
.c3-plate span { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.c3-plate small { flex: 0 0 auto; font-size: 0.72rem; font-weight: 800; color: var(--c3-mute); }
.c3-plate-dot { flex: 0 0 8px; height: 8px; border-radius: 50%; background: var(--b); }
.c3-plate > .fa-star { font-size: 0.65rem; color: var(--st-ok, #16a34a); }
.c3-plate.is-follow { --b: var(--st-follow, #0ea5e9); }
.c3-plate.is-ok { --b: var(--st-ok, #16a34a); }
.c3-plate.is-lost { --b: var(--st-lost, #dc2626); }
.c3-plate:hover { background: #f8fafc; }
.c3-plate:focus-visible { outline: 2px solid var(--k, #be123c); outline-offset: 1px; }
.c3-plate.is-current { box-shadow: 0 0 0 2px var(--k, #be123c); }
.c3-plate.is-locked { background: #f8fafc; color: #94a3b8; font-weight: 600; }
.c3-plate.is-locked i { font-size: 0.65rem; }
/* Piani con più scale: una colonna per scala */
.c3-bells-row { display: grid; grid-template-columns: 34px repeat(var(--c3-scale, 1), minmax(0, 1fr)); }
.c3-bells-row.is-head { align-items: end; }
.c3-bells-row.is-head .c3-bells-floor { height: auto; background: none; }
.c3-bells-scale { font-size: 0.74rem; font-weight: 800; color: var(--c3-mute); }
/* Inserimento a raffica */
.c3-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.c3-quick input, .c3-quick select { flex: 1 1 180px; min-width: 0; height: 40px; padding: 0 10px; border: 1px solid var(--c3-line); border-radius: 10px; background: #ffffff; font: inherit; font-size: 0.84rem; font-weight: 600; color: var(--c3-ink); }
.c3-quick .is-short { flex: 0 0 64px; }
.c3-quick select { flex: 1 1 120px; }
.c3-quick input:focus, .c3-quick select:focus { outline: none; border-color: color-mix(in srgb, var(--primary, #6366f1) 45%, #ffffff); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #6366f1) 14%, transparent); }
.c3-quick .c3-add { flex: 0 0 40px; width: 40px; height: 40px; padding: 0; justify-content: center; }
/* Citofono da organizzare: colonne scelte (1-4), targhette da trascinare (KvSortable, MYB.Portone) */
.c3-plates { grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); min-height: 48px; }
.c3-portone.is-big .c3-plates { grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); }
.c3-plate:not(.is-locked) { cursor: grab; touch-action: manipulation; }
.c3-plate.is-chosen { cursor: grabbing; box-shadow: 0 10px 24px rgba(15, 23, 42, 0.22); }
.c3-plate.is-ghost { opacity: 0.35; outline: 2px dashed var(--k, #be123c); outline-offset: -2px; }
.c3-plate.kvsortable-fallback { box-shadow: 0 14px 30px rgba(15, 23, 42, 0.25); }
.c3-plates-cols { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-bottom: 8px; font-size: 0.76rem; font-weight: 700; color: var(--c3-mute); }
.c3-plates-cols > span { margin-right: 4px; }
.c3-plates-cols button { width: 28px; height: 28px; border: 1px solid var(--c3-line); border-radius: 8px; background: #ffffff; font: inherit; font-size: 0.78rem; font-weight: 800; color: var(--c3-mute); cursor: pointer; }
.c3-plates-cols button[aria-pressed="true"] { border-color: var(--k, #be123c); background: var(--k, #be123c); color: #ffffff; }
.c3-plates-cols small { flex-basis: 100%; margin-top: 2px; font-weight: 500; }
@media (max-width: 575px) { .c3-plates[style*="--cols: 3"], .c3-plates[style*="--cols: 4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); } } /* sul telefono al massimo due */

/* ── Revisione "stile Apple" delle schede v3 (DESIGN.md §34) ── */
/* Lo stato in alto a destra, nella riga del tipo: si cambia da qui (o dalle frecce della lavorazione) */
.c3-kind-end { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.c3-kind-end .c3-status { padding: 0; }
.c3-kind-end .c3-status-btn { flex: 0 0 auto; min-width: 200px; min-height: 40px; }
.c3-kind-end .c3-kind-classic { margin-left: 0; }
@media (max-width: 767px) { .c3-kind { flex-wrap: wrap; } .c3-kind-end { flex-basis: 100%; justify-content: space-between; } .c3-kind-end .c3-status-btn { min-width: 0; } }
/* Leggibilità (HIG typography › Ensuring legibility: desktop 13pt di base, mai sotto i 10): scala 11 · 13 · 14 · 16 · 20
   · 28 sulla radice da 14px; la gerarchia la fanno peso e colore (500/600/700), non il grassetto ovunque */
.c3, .c3-sheet, .c3-bell-pop { --c3-mute: #475569; -webkit-font-smoothing: antialiased; }
.c3 .c3-item-body, .c3 .c3-note-body, .c3 .c3-fact-value, .c3 .c3-fact-value .c3-zone { font-size: 1rem; }
.c3 .c3-item-head b, .c3 .c3-item-title, .c3 .c3-item-title b { font-size: 1rem; font-weight: 600; }
.c3 .c3-fact-value { font-weight: 600; }
.c3 .c3-item-who, .c3 .c3-prev-st, .c3 .c3-tab-txt, .c3 .c3-link, .c3 .c3-more, .c3 .c3-kind-back, .c3 .c3-src, .c3 .c3-src-k, .c3 .c3-src a,
.c3 .c3-fact-label, .c3 .c3-value-label, .c3 .c3-value-calc-btn, .c3 .c3-sticky-head, .c3 .c3-field-label, .c3 .c3-folder-tab, .c3 .c3-status-btn span,
.c3 .c3-stages li > button > span, .c3 .c3-stages li > div > span, .c3 .c3-tag, .c3 .c3-tag-add, .c3 .consulente-name-v3, .c3 .c3-act span, .c3 .c3-ask-call,
.c3 .c3-status-menu .dropdown-item, .c3 .c3-private-txt, .c3 .c3-contacts a, .c3 .c3-id { font-size: 0.93rem; }
.c3 .c3-fact-label, .c3 .c3-item-who, .c3 .c3-src-k { font-weight: 500; }
.c3 .c3-tab-txt, .c3 .c3-kind-back, .c3 .c3-sticky-head, .c3 .c3-value-label, .c3 .c3-folder-tab { font-weight: 600; }
.c3 .c3-item-head time, .c3 .c3-day, .c3 .c3-asg-badge, .c3 .c3-when-chip, .c3 .pill-v3, .c3 .c3-kind-classic, .c3 .c3-status-label, .c3 .c3-entity-code,
.c3 .c3-phone-mask span, .c3 .c3-bond-legend > span { font-size: 0.857rem; }
.c3 .c3-stages small, .c3 .c3-auto-chip, .c3 .c3-status-group, .c3 .bks-ai-label, .c3 .pbx-history-count-v3 { font-size: 0.8rem; }
/* Contrasto (HIG accessibility › Vision, 4,5:1): le fasi da fare, WhatsApp, il secondario sul fondo della pagina */
.c3 .c3-stages li:not(.is-done):not(.is-current):not(.is-lost) { color: #475569; }
.c3-client-acts .c3-call-big.is-wa { background: #15803d; }
/* Aree cliccabili (WCAG 2.5.8, almeno 24px): i link di testo prendono altezza senza cambiare aspetto */
.c3 .c3-kind-back, .c3 .c3-kind-classic, .c3 .c3-more, .c3 .c3-link, .c3 .c3-src a, .c3 .c3-contacts a, .c3 .c3-phone-mask button { display: inline-flex; align-items: center; min-height: 28px; }
/* I nomi delle fasi stanno interi */
.c3 .c3-stages li > button > span, .c3 .c3-stages li > div > span { font-size: 0.86rem; }

/* ── Fase B: un foglio di lavoro, non una vetrina. Il colore dice una cosa sola (azione = viola, tipo = colore del tipo,
   stato = i 4 colori di stato, il resto grigio), un solo livello di contenitore, la firma è il legame ── */
/* La testata è un foglio bianco con un'ombra sola (al posto della cornice tratteggiata); sul bordo resta il codice */
.c3-head.c3-card { border: 0; border-radius: 20px; background: #ffffff;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px -12px rgba(15, 23, 42, 0.12); }
.c3-head .c3-bond-legend > span { display: none; }
.c3-head .c3-bond-legend { background: none; }
/* La firma: il legame chi → cosa è una linea nel colore del tipo che finisce in un punto (al posto di "»") */
@container c3main (min-width: 620px) {
    :is(.c3[data-kind="amber"], .c3[data-kind="sky"], .c3[data-entity="recruiting_leads"]) .c3-bond-side .c3-strip > .c3-field:first-child:not(.is-compact)::before {
        content: ''; top: 50%; right: 100%; width: 34px; height: 2px; margin-right: 5px; transform: none; border-radius: 2px;
        background: linear-gradient(90deg, color-mix(in srgb, var(--k) 25%, transparent), var(--k)); }
    :is(.c3[data-kind="amber"], .c3[data-kind="sky"], .c3[data-entity="recruiting_leads"]) .c3-bond-side .c3-strip > .c3-field:first-child:not(.is-compact)::after {
        content: ''; position: absolute; top: 50%; right: 100%; width: 8px; height: 8px; margin: -3px 1px 0 0; border-radius: 50%; background: var(--k); pointer-events: none; }
    /* sul Contatto e sull'Agenzia non c'è un legame da raccontare: niente freccia tra la persona e i suoi dati */
    .c3:is([data-entity="contacts"], [data-entity="agencies"]) .c3-bond-side .c3-strip > .c3-field:first-child:not(.is-compact)::before { content: none; }
}
/* "Dettaglio …" e la fascia delle etichette: il colore del tipo tenue (fondo --k-bg, testo --k-ink), non la sfumatura scura */
.c3 .c3-bond-side .c3-strip > .c3-field:first-child:not(.is-compact) > .c3-field-label { background: var(--k-bg, #f1f5f9); color: var(--k-ink, #1c2434); }
.c3 .c3-bond-side .c3-strip > .c3-field:first-child:not(.is-compact) > .c3-field-label .c3-edit-btn { color: var(--k-ink, #1c2434); }
.c3-head > .c3-bond-tags { padding: 10px 14px; border-radius: 14px; background: var(--k-bg, #f1f5f9); box-shadow: none; color: var(--k-ink, #1c2434); }
.c3-head > .c3-bond-tags .c3-tags-label, .c3-head > .c3-bond-tags .c3-tags-label > i { color: var(--k-ink, #1c2434); }
.c3-head > .c3-bond-tags .c3-tags-n { color: color-mix(in srgb, var(--k-ink, #1c2434) 70%, transparent); }
.c3-head > .c3-bond-tags .c3-tag { border: 0; background: #ffffff; box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08); color: var(--c3-ink); }
.c3-head > .c3-bond-tags .c3-tag:hover { background: #f8fafc; }
.c3-head > .c3-bond-tags .c3-tag.c3-cat > .fa-bookmark { color: var(--k, #475569); }
.c3-head > .c3-bond-tags .c3-tag.c3-cat.is-other { background: transparent; box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12); color: var(--c3-mute); }
.c3-head > .c3-bond-tags .c3-tag.is-auto { background: #fffbeb; box-shadow: 0 0 0 1px #fcd34d; }
.c3-head > .c3-bond-tags .c3-tag.is-auto > i { color: #b45309; }
.c3-head > .c3-bond-tags .c3-tag-add { border: 1px dashed color-mix(in srgb, var(--k-ink, #1c2434) 35%, transparent); background: transparent; color: var(--k-ink, #1c2434); }
.c3-head > .c3-bond-tags .c3-tag-add:hover, .c3-head > .c3-bond-tags .c3-tag-add:focus-visible { border-style: solid; background: #ffffff; color: var(--k-ink, #1c2434); transform: none; }
.c3-head > .c3-bond-tags .c3-tags-auto { color: #92400e; }
/* senza etichette la fascia non ruba la scena: una riga discreta con "+ Etichetta" */
.c3-head > .c3-bond-tags:not(:has(.c3-tag)):not(:has(.c3-cat-required)) { padding: 0; background: none; }
.c3-head > .c3-bond-tags:not(:has(.c3-tag)):not(:has(.c3-cat-required)) .c3-tags-label { color: var(--c3-mute); font-weight: 600; }
/* Colonna destra: cartelle bianche (il colore resta solo sull'icona, per riconoscerle), non più lilla/celeste/menta/rosa */
.c3-side .c3-folder:is(.tone-lilac, .tone-sky, .tone-mint, .tone-rose) { --f: #ffffff; --f-ink: #1c2434; --f-line: rgba(15, 23, 42, 0.08); }
.c3-side .c3-folder.tone-lilac .c3-folder-tab > i { color: #7c3aed; }
.c3-side .c3-folder.tone-sky .c3-folder-tab > i { color: #2563eb; }
.c3-side .c3-folder.tone-mint .c3-folder-tab > i { color: #15803d; }
.c3-side .c3-folder.tone-rose .c3-folder-tab > i { color: #be123c; }
.c3-side .c3-folder:is(.tone-lilac, .tone-sky, .tone-mint, .tone-rose) .c3-folder-body { color: var(--c3-ink); }
.c3-side .c3-portone-notes, .c3-side .c3-portone-switch, .c3-side .c3-bells-floor { background: #f3f5f8; }
/* Azioni: una sola azione principale. L'appuntamento non si propone due volte (lo propone già Klaila) */
.c3:has(.c3-next [data-target="#ModalCalendarSBS"]) .c3-act.is-appt { display: none; }
.c3:has(.c3-next [data-target="#ModalCalendarSBS"]) .c3-act-grid:not(:has(.c3-act:not(.is-appt))) { display: none; }
.c3-act.is-tile:is(.is-appt, .is-convert) { background: #ffffff; box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08); color: var(--c3-ink) !important; }
/* Il giallo è solo delle note: "Dettaglio …" è bianca con un filo nel colore del tipo, la fascia etichette è grigia */
.c3 .c3-bond-side .c3-strip > .c3-field:first-child:not(.is-compact) > .c3-field-label { background: #ffffff; box-shadow: inset 0 3px 0 var(--k, #475569), inset 0 -1px 0 rgba(15, 23, 42, 0.06); color: var(--k-ink, #1c2434); }
.c3-head > .c3-bond-tags { background: #f3f5f8; }
.c3-head > .c3-bond-tags .c3-tags-label > i { color: var(--k, #475569); }
/* Le fasi: nomi interi */
.c3 .c3-stages li { padding: 0 12px 0 18px; }
/* Sulle cartelle bianche i campi si vedono come campi: fondo appena più scuro (HIG: i campi ricevono il contenuto) */
.c3-side .c3-folder .c3-folder.compose .c3-composer textarea, .c3-side .c3-composer textarea { background: #f5f7fa; }
.c3-side .c3-composer-modes { background: #f1f4f8; }
.c3 .c3-stages li { padding: 0 8px 0 16px; }
.c3 .c3-stages li > button > span, .c3 .c3-stages li > div > span { font-size: 0.82rem; }
/* Nelle cartelle bianche le voci (attività, messaggi in programma) stanno su un fondo appena grigio: si raggruppano */
.c3-side .c3-folder:is(.tone-lilac, .tone-sky, .tone-mint, .tone-rose) .c3-item { background: #f7f9fb; box-shadow: none; }
/* Sotto la testata "Dettaglio …" i dati partono subito: niente filo e spazio vuoto in cima */
.c3 .c3-field-label + .c3-field-value > .c3-facts:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
/* La firma vale anche per lo Scouting (immobile → scouting); solo Contatto e Agenzia non hanno un legame da raccontare */
@container c3main (min-width: 620px) {
    .c3:not([data-entity="contacts"]):not([data-entity="agencies"]) .c3-bond-side .c3-strip > .c3-field:first-child:not(.is-compact)::before {
        content: ''; top: 50%; right: 100%; width: 34px; height: 2px; margin-right: 5px; transform: none; border-radius: 2px; font: inherit;
        background: linear-gradient(90deg, color-mix(in srgb, var(--k) 25%, transparent), var(--k)); }
    .c3:not([data-entity="contacts"]):not([data-entity="agencies"]) .c3-bond-side .c3-strip > .c3-field:first-child:not(.is-compact)::after {
        content: ''; position: absolute; top: 50%; right: 100%; width: 8px; height: 8px; margin: -3px 1px 0 0; border-radius: 50%; background: var(--k); pointer-events: none; }
}
/* Inserimento a raffica: il cognome su tutta la riga, il resto sotto */
.c3-side .c3-quick input[name="owner"] { flex-basis: 100%; }
/* Contrasto: le fasi fatte (verde scuro su verde chiaro) e il testo bianco sulla pillola dello stato */
.c3 .c3-stages li.is-done { color: #166534; }
.c3 .c3-status-btn:not(.is-trash) { background: color-mix(in srgb, var(--st) 82%, #000000); }
/* Lo stato in cima al pannello Azioni, sopra Appuntamento: etichetta a sinistra, la pillola su tutta la riga */
.c3-actions-card .c3-status { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; padding: 0; }
.c3-actions-card .c3-status-btn { flex: 1 1 auto; min-width: 0; min-height: 44px; justify-content: flex-start; }
.c3-actions-card .c3-status-btn > span { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: left; }
.c3-actions-card .c3-status:only-child { margin: 0; }

/* ── Etichette, sezione della testata (DESIGN.md §34): sono come si lavora il CRM (filtri, automazioni), quindi belle
   e in vista. Ognuna nel suo colore tenue col pallino; categorie bianche col segnalibro; automazioni ambra col ⚡;
   senza etichette, perché conviene metterle ── */
.c3-head > .c3-bond-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 20px 0 0; padding: 16px 0 0; border: 0;
    border-top: 1px solid rgba(15, 23, 42, 0.07); border-radius: 0; background: none; box-shadow: none; color: var(--c3-ink); }
.c3-head > .c3-bond-tags:not(:has(.c3-tag)):not(:has(.c3-cat-required)) { padding: 16px 0 0; background: none; }
.c3-head > .c3-bond-tags .c3-tags-label { flex: 0 0 auto; margin-right: 6px; font-size: 1rem; font-weight: 700; letter-spacing: 0; color: var(--c3-ink); }
.c3-head > .c3-bond-tags:not(:has(.c3-tag)):not(:has(.c3-cat-required)) .c3-tags-label { color: var(--c3-ink); font-weight: 700; }
.c3-head > .c3-bond-tags .c3-tags-label > i { margin-right: 6px; color: var(--k, #475569); }
.c3-head > .c3-bond-tags .c3-tags-n { font-weight: 600; color: var(--c3-mute); }
.c3-head > .c3-bond-tags .c3-tag { gap: 7px; height: 32px; padding: 0 12px 0 11px; border: 0; border-radius: 999px; background: hsl(var(--tg-h, 215) 85% 95%);
    box-shadow: inset 0 0 0 1px hsl(var(--tg-h, 215) 55% 86%); font-size: 0.93rem; font-weight: 600; color: hsl(var(--tg-h, 215) 50% 25%); transition: background-color 0.15s ease; }
.c3-head > .c3-bond-tags .c3-tag::before { content: ''; display: block; flex: 0 0 8px; height: 8px; border-radius: 50%; background: hsl(var(--tg-h, 215) 70% 48%); }
.c3-head > .c3-bond-tags .c3-tag:hover { background: hsl(var(--tg-h, 215) 85% 91%); }
.c3-head > .c3-bond-tags .c3-tag.c3-cat { background: #ffffff; box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.14); font-weight: 700; color: var(--c3-ink); }
.c3-head > .c3-bond-tags .c3-tag.c3-cat::before, .c3-head > .c3-bond-tags .c3-tag.is-auto::before { display: none; }
.c3-head > .c3-bond-tags .c3-tag.c3-cat > .fa-bookmark { font-size: 0.75rem; color: var(--k, #475569); }
.c3-head > .c3-bond-tags .c3-tag.c3-cat.is-other { background: transparent; box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.14); font-weight: 600; color: var(--c3-mute); }
.c3-head > .c3-bond-tags .c3-tag.is-auto { background: #fef3c7; box-shadow: inset 0 0 0 1px #fcd34d; color: #78350f; }
.c3-head > .c3-bond-tags .c3-tag.is-auto:hover { background: #fde68a; }
.c3-head > .c3-bond-tags .c3-tag.is-auto > i { font-size: 0.75rem; color: #d97706; }
.c3-head > .c3-bond-tags .c3-tag-add { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border: 1px solid color-mix(in srgb, var(--k, #475569) 45%, #ffffff);
    border-radius: 999px; background: #ffffff; font-size: 0.93rem; font-weight: 600; color: var(--k-ink, #1c2434); }
.c3-head > .c3-bond-tags .c3-tag-add > i { font-size: 0.75rem; color: var(--k, #475569); }
.c3-head > .c3-bond-tags .c3-tag-add:hover, .c3-head > .c3-bond-tags .c3-tag-add:focus-visible { border-style: solid; background: var(--k-bg, #f1f5f9); color: var(--k-ink, #1c2434); }
.c3-head > .c3-bond-tags .c3-tags-auto { margin-left: auto; font-size: 0.86rem; color: #92400e; }
.c3-head > .c3-bond-tags .c3-tags-hint { display: none; font-size: 0.86rem; color: var(--c3-mute); }
.c3-head > .c3-bond-tags.is-empty .c3-tags-hint { display: inline; }
.c3-head > .c3-bond-tags.is-empty .c3-tag-add { border-style: dashed; }
/* Contatto senza categoria: la sezione chiede la categoria (ambra) */
.c3-head > .c3-bond-tags.is-missing-cat { padding: 14px; border-top: 0; border-radius: 14px; background: #fffbeb; box-shadow: inset 0 0 0 1px #fde68a; }
/* Impaginazione: in cima "Etichette · n" (e a destra quante avviano automazioni), sotto le etichette con "+ Etichetta"
   in coda */
.c3-head > .c3-bond-tags .c3-tags-label { order: 0; flex: 1 0 auto; }
.c3-head > .c3-bond-tags .c3-tags-auto { order: 1; margin-left: 0; }
.c3-head > .c3-bond-tags .c3-tag, .c3-head > .c3-bond-tags .c3-cat-required { order: 2; }
.c3-head > .c3-bond-tags .c3-tag-add, .c3-head > .c3-bond-tags .c3-tags-hint { order: 3; }
.c3-head > .c3-bond-tags { row-gap: 10px; }
.c3-head > .c3-bond-tags .c3-tags-label { flex: 1 1 auto; }
.c3-head > .c3-bond-tags .c3-tags-auto { order: 0; margin-left: auto; }
.c3-head > .c3-bond-tags::before { content: ''; order: 1; flex-basis: 100%; height: 0; }
/* Etichette tutte di una tinta (il colore non deve dire niente che non c'è): grigio chiaro, testo scuro. Spiccano solo
   le categorie (bianche col segnalibro) e quelle che avviano un'automazione (ambra col ⚡) */
.c3-head > .c3-bond-tags .c3-tag { background: #f1f4f8; box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08); color: var(--c3-ink); }
.c3-head > .c3-bond-tags .c3-tag::before { display: none; }
.c3-head > .c3-bond-tags .c3-tag:hover { background: #e8edf3; }
.c3-head > .c3-bond-tags .c3-tag .c3-hash { display: inline; color: #94a3b8; font-weight: 500; }
.c3-head > .c3-bond-tags .c3-tag.c3-cat { background: #ffffff; box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.14); }
.c3-head > .c3-bond-tags .c3-tag.is-auto { background: #fef3c7; box-shadow: inset 0 0 0 1px #fcd34d; color: #78350f; }

/* Le sezioni a destra si riconoscono a colpo d'occhio: la linguetta ha il colore tenue della sezione (corpo bianco),
   l'icona in un tondino del suo colore. In programma lilla, Commento azzurro, Allegati verde, Stabile rosa, Collegati grigio */
.c3-side .c3-folder { --tab: #f1f4f8; --tab-ink: #334155; --tab-ico: #475569; }
.c3-side .c3-folder.tone-lilac { --tab: #f1ebfe; --tab-ink: #4c1d95; --tab-ico: #7c3aed; }
.c3-side .c3-folder.tone-sky { --tab: #e7f0fe; --tab-ink: #1e3a8a; --tab-ico: #2563eb; }
.c3-side .c3-folder.tone-mint { --tab: #e2f5e9; --tab-ink: #14532d; --tab-ico: #15803d; }
.c3-side .c3-folder.tone-rose { --tab: #ffe9ec; --tab-ink: #881337; --tab-ico: #be123c; }
.c3-side .c3-folder .c3-folder-tab, .c3-side .c3-folder .c3-folder-tab::after { background: var(--tab); }
.c3-side .c3-folder .c3-folder-tab { color: var(--tab-ink); }
.c3-side .c3-folder .c3-folder-tab > i:first-child { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 8px;
    background: #ffffff; font-size: 0.8rem; color: var(--tab-ico) !important; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08); }

/* ── Revisione layout (apple-design, 13/10/2026) ── */
/* Il nome del contatto non va a capo a metà: righe bilanciate e, nella colonna stretta, un passo più piccolo */
.c3 .c3-name { text-wrap: balance; }
@container c3main (max-width: 1100px) { .c3-bond-client .c3-name { font-size: 1.43rem; } }
/* Le linguette della cronologia senza niente dentro non chiedono attenzione (restano cliccabili) */
.c3-tabs button:not(.is-active):has(.pbx-history-count-v3.is-zero) { opacity: 0.55; }
.c3-tabs button:not(.is-active):has(.pbx-history-count-v3.is-zero):hover { opacity: 1; }
/* La matita del titolo non tiene spazio quando non si vede ("Via Roma 1", non "Via Roma    1") */
@media (hover: hover) {
    .c3 .c3-name .c3-edit-btn { max-width: 0; margin: 0; padding: 0; overflow: hidden; opacity: 0; transition: max-width 0.15s ease, opacity 0.15s ease; }
    .c3 .c3-name .c3-title-line:hover .c3-edit-btn, .c3 .c3-name:hover > .c3-edit-btn, .c3 .c3-client:hover .c3-name > .c3-edit-btn, .c3 .c3-name .c3-edit-btn:focus-visible { max-width: 32px; padding: 0 4px; opacity: 1; }
}
/* Raggi e ombre: 3 raggi (8 controlli · 12 riquadri interni · 20 schede) e 2 ombre (a riposo · sollevata) */
.c3, .c3-sheet { --r-sm: 8px; --r-md: 12px; --r-lg: 20px;
    --sh-rest: 0 0 0 1px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --sh-lift: 0 0 0 1px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px -12px rgba(15, 23, 42, 0.14); }
.c3 .c3-card, .c3 .c3-next { border-radius: var(--r-lg); }
.c3 .c3-card:not(.c3-head) { box-shadow: var(--sh-rest); }
.c3 .c3-head.c3-card { box-shadow: var(--sh-lift); }
.c3 .c3-bond .c3-strip .c3-field:not(.is-compact), .c3 .c3-sticky, .c3 .c3-item, .c3 .c3-prop-card, .c3 .c3-plates, .c3 .c3-unit-form { border-radius: var(--r-md); }
.c3 .c3-bond-side .c3-strip > .c3-field:first-child:not(.is-compact) { box-shadow: var(--sh-lift); }
.c3 .c3-bond-side .c3-strip > .c3-field:first-child:not(.is-compact) > .c3-field-label { border-radius: var(--r-md) var(--r-md) 0 0; }
.c3 .c3-act, .c3 .c3-chip:not(.c3-crumb-back), .c3 .c3-value-calc-btn, .c3 .c3-status-btn { border-radius: var(--r-md); }
.c3 .c3-bell, .c3 .c3-plate, .c3 .c3-plates-cols button, .c3 .c3-bells-floor { border-radius: var(--r-sm); }

/* Telefono: sulle schede la barra delle azioni (Chiama, WhatsApp, Stadio) prende il posto di quella dell'app, e
   l'oggetto (Dettaglio…) viene prima delle note */
@media (max-width: 767px) {
    /* anche nell'app la barra della scheda resta, sopra quella dell'app: Chiama ed Esito a un tocco (prima stavano solo nel
       fulmine, due tocchi più lo scorrimento in cima: "i tasti di chiamata e di cambio stato non sono a portata di mano") */
    html:not(.myb-app) body:has(.c3 .c3-bar) .c3-bar { bottom: calc(12px + env(safe-area-inset-bottom)); }
}
@media (max-width: 767px) { /* sul telefono .c3-main è display: contents, la query di contenitore non scatta */
    .c3 .c3-bond .c3-bond-client { display: contents; }
    .c3 .c3-bond .c3-bond-client > .c3-entity { order: 1; }
    .c3 .c3-bond .c3-bond-link { order: 2; }
    .c3 .c3-bond .c3-bond-side { order: 3; }
    .c3 .c3-bond .c3-bond-client > [data-c3-notes] { order: 4; }
}
/* Il commento si scrive in cima alla Cronologia, dove poi compare (MYB.Card3 ci sposta il modulo della colonna destra) */
.c3-tl-composer { margin: 0 0 16px; }
.c3-tl-composer .c3-composer { margin: 0; background: #f7f9fb; }

/* ── Navigazione a binario (prova, ?nav=rail; MYB.NavRail.js): binario di icone flottante con la sfumatura del
   marchio + pannello contestuale chiaro (voci della sezione, "In questa scheda"), chiudibile per tutta la larghezza;
   una voce con figli si guarda in anteprima sopra la pagina. Solo desktop: sul telefono e nell'app resta la barra ── */
.myb-rail, .myb-ctx, .myb-ctx-open, .myb-rail-tip, .myb-ctx-veil { display: none; }
@media (min-width: 992px) {
    html.myb-nav-rail:not(.myb-app) { --rail-w: 76px; --ctx-w: 248px; --nav-gap: 16px; }
    html.myb-nav-rail:not(.myb-app) .page-sidebar { display: none !important; }
    html.myb-nav-rail:not(.myb-app) .page-container { margin-left: calc(var(--nav-gap) * 2 + var(--rail-w)) !important; }
    html.myb-nav-rail.myb-nav-ready:not(.myb-app) .page-container { transition: margin-left 0.2s cubic-bezier(0.23, 1, 0.32, 1); }
    html.myb-nav-rail.myb-ctx-on:not(.myb-app) .page-container { margin-left: calc(var(--nav-gap) * 3 + var(--rail-w) + var(--ctx-w)) !important; }
    html.myb-nav-rail:not(.myb-app) .myb-rail { position: fixed; z-index: 1041; top: var(--nav-gap); bottom: var(--nav-gap); left: var(--nav-gap); display: flex; flex-direction: column; align-items: center;
        width: var(--rail-w); padding: 14px 0; border-radius: 24px; background-size: cover; box-shadow: 0 12px 32px -14px rgba(76, 29, 149, 0.5); }
    .myb-rail-logo { display: block; flex: 0 0 auto; width: 44px; height: 44px; margin-bottom: 12px; overflow: hidden; border-radius: 12px; }
    .myb-rail-logo img { width: auto !important; max-width: none !important; height: 44px; object-fit: cover; object-position: left center; }
    .myb-rail-logo img.myb-rail-mark { width: 44px !important; height: 44px; object-fit: contain; }
    html:not(.myb-rail-wide) .myb-rail-logo.has-mark .myb-rail-full, html.myb-rail-wide .myb-rail-logo .myb-rail-mark { display: none; }
    html:not(.myb-rail-wide) .myb-rail-logo.has-mark { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.85); }
    .myb-rail-list { display: flex; flex: 1 1 auto; flex-direction: column; align-items: center; gap: 4px; width: 100%; min-height: 0; overflow-y: auto; scrollbar-width: none; }
    .myb-rail-list::-webkit-scrollbar { display: none; }
    .myb-rail-list.is-more-below { -webkit-mask-image: linear-gradient(#000 85%, transparent); mask-image: linear-gradient(#000 85%, transparent); }
    .myb-rail-item { position: relative; display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 48px; height: 48px; border: 0; border-radius: 14px;
        background: transparent; color: #ffffff !important; text-decoration: none !important; cursor: pointer; transition: background-color 0.15s ease, transform 0.1s ease; }
    .myb-rail-item .material-icons, .myb-rail-item .material-icons-outlined { font-size: 23px; }
    .myb-rail-item:hover { background: rgba(255, 255, 255, 0.18); }
    .myb-rail-item.is-peek { background: rgba(255, 255, 255, 0.18); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6); }
    .myb-rail-item:active { transform: scale(0.96); }
    .myb-rail-item:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }
    .myb-rail-item.is-active { background: #ffffff; color: var(--primary, #582679) !important; box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.25); }
    /* le voci con figli (aprono il pannello) hanno un puntino: le altre portano subito alla pagina */
    .myb-rail-more { position: absolute; right: 7px; bottom: 7px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: 0.6; }
    .myb-rail-sep { flex: 0 0 auto; width: 28px; height: 1px; margin: 8px 0; background: rgba(255, 255, 255, 0.32); }
    .myb-rail-classic { margin-top: 10px; opacity: 0.75; }
    .myb-rail-classic:hover { opacity: 1; }
    html.myb-nav-rail:not(.myb-app) .myb-rail-tip { position: fixed; z-index: 1060; display: block; padding: 6px 10px; border-radius: 8px; background: #1c2434; font-size: 0.86rem; font-weight: 600;
        white-space: nowrap; color: #ffffff; pointer-events: none; opacity: 0; transform: translate(-4px, -50%); transition: opacity 0.12s ease, transform 0.12s ease; }
    html.myb-nav-rail:not(.myb-app) .myb-rail-tip.is-on { opacity: 1; transform: translate(0, -50%); }
    @media (max-height: 1000px) {
        .myb-rail-item { width: 44px; height: 40px; border-radius: 12px; }
        .myb-rail-list { gap: 2px; }
        .myb-rail-sep { margin: 4px 0; }
    }
    /* Il pannello della sezione: chiaro, flottante accanto al binario; in anteprima sta sopra la pagina */
    html.myb-nav-rail:not(.myb-app) .myb-ctx { position: fixed; z-index: 1040; top: var(--nav-gap); bottom: var(--nav-gap); left: calc(var(--nav-gap) * 2 + var(--rail-w)); flex-direction: column;
        width: var(--ctx-w); padding: 16px 12px; overflow-y: auto; border-radius: 24px; background: #ffffff;
        box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px -12px rgba(15, 23, 42, 0.14); --ink: #1c2434; --mute: #475569; }
    html.myb-nav-rail:is(.myb-ctx-on, .myb-ctx-peek):not(.myb-app) .myb-ctx:not([hidden]) { display: flex; }
    html.myb-nav-rail.myb-ctx-peek:not(.myb-app) .myb-ctx { box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08), 0 24px 48px -16px rgba(15, 23, 42, 0.35); }
    html.myb-nav-rail:not(.myb-app) .myb-ctx-veil { position: fixed; inset: 0; z-index: 1039; display: block; background: rgba(15, 23, 42, 0.28); opacity: 0; pointer-events: none; transition: opacity 0.18s ease; }
    html.myb-nav-rail.myb-ctx-peek:not(.myb-app) .myb-ctx-veil { opacity: 1; pointer-events: auto; }
    /* Con un popup aperto il menu va sotto il velo di Bootstrap (1040) come il resto della pagina, ma nello stesso ordine
       di sempre: il pannello si estende sotto il binario e, a pari livello, lo copriva per intero */
    html.myb-nav-rail:not(.myb-app) body.modal-open .myb-rail { z-index: 1032 !important; }
    html.myb-nav-rail:not(.myb-app) body.modal-open :is(.myb-ctx, .myb-ctx-open) { z-index: 1031 !important; }
    html.myb-nav-rail:not(.myb-app) body.modal-open .myb-rail-glow { z-index: 1030 !important; }
    .myb-ctx-head { display: flex; align-items: center; gap: 10px; padding: 2px 4px 12px; margin-bottom: 6px; border-bottom: 1px solid rgba(15, 23, 42, 0.07); }
    .myb-ctx-head > .material-icons-outlined { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 10px;
        background: color-mix(in srgb, var(--primary, #582679) 10%, #ffffff); font-size: 19px; color: var(--primary, #582679); }
    .myb-ctx-head b { flex: 1 1 auto; min-width: 0; font-size: 1.07rem; font-weight: 700; color: var(--ink); }
    .myb-ctx-close { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 0; border-radius: 10px; background: transparent; color: var(--mute); cursor: pointer; }
    .myb-ctx-close:hover { background: #f1f4f8; color: var(--ink); }
    .myb-ctx-close:focus-visible { outline: 2px solid var(--primary, #582679); outline-offset: 2px; }
    .myb-ctx-list { margin: 0; padding: 0; list-style: none; }
    .myb-ctx-list a { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; border-radius: 10px; font-size: 1rem; font-weight: 600; color: var(--ink) !important; text-decoration: none !important; }
    .myb-ctx-list a:hover { background: #f3f5f8; }
    .myb-ctx-list a.is-active { background: color-mix(in srgb, var(--primary, #582679) 10%, #ffffff); color: var(--primary, #582679) !important; }
    .myb-ctx-list a:focus-visible { outline: 2px solid var(--primary, #582679); outline-offset: -2px; }
    .myb-ctx-ext { margin-left: auto; font-size: 14px !important; color: #94a3b8; }
    .myb-ctx-list.is-parts a { min-height: 36px; font-size: 0.93rem; font-weight: 500; color: var(--mute) !important; }
    .myb-ctx-list.is-parts .material-icons-outlined { font-size: 18px; color: #94a3b8; }
    .myb-ctx-div { height: 1px; margin: 6px 12px; background: rgba(15, 23, 42, 0.07); }
    .myb-ctx-sub { margin: 18px 12px 6px; font-size: 0.857rem; font-weight: 700; color: var(--mute); }
    .myb-ctx-list > .myb-ctx-sub:first-child { margin-top: 4px; }
    /* Pannello chiuso: una linguetta per riaprirlo */
    html.myb-nav-rail.myb-ctx-can:not(.myb-ctx-peek):not(.myb-app) .myb-ctx-open { position: fixed; z-index: 1040; top: 50%; left: calc(var(--nav-gap) + var(--rail-w) - 2px); display: inline-flex; align-items: center; justify-content: center;
        width: 24px; height: 56px; margin-top: -28px; border: 0; border-radius: 0 12px 12px 0; background: #ffffff; box-shadow: 0 4px 12px -4px rgba(15, 23, 42, 0.25); color: #475569; cursor: pointer; }
    .myb-ctx-open:hover { background: #f1f4f8; color: #1c2434; }
    .myb-ctx-open:focus-visible { outline: 2px solid var(--primary, #582679); outline-offset: 2px; }
}
/* Navigazione a binario, impaginazione "da app" (come la reference): il contenuto sta in una tela arrotondata; il
   pannello della sezione non è una scheda staccata ma fa parte della stessa superficie del binario (niente riquadro né
   ombra), la voce attiva è una pillola bianca; in anteprima il pannello copre la tela con un'ombra sul bordo */
@media (min-width: 992px) {
    html.myb-nav-rail:not(.myb-app) body { background: #eceff4; }
    html.myb-nav-rail:not(.myb-app) .page-container { min-height: calc(100vh - var(--nav-gap) * 2); margin-top: var(--nav-gap); margin-right: var(--nav-gap); margin-bottom: var(--nav-gap);
        border-radius: 24px; background: #f7f8fb; box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04); }
    html.myb-nav-rail.myb-ctx-on:not(.myb-app) .page-container { margin-left: calc(var(--nav-gap) * 2 + var(--rail-w) + var(--ctx-w)) !important; }
    html.myb-nav-rail:not(.myb-app) .myb-ctx { left: calc(var(--nav-gap) + var(--rail-w)); width: var(--ctx-w); padding: 18px 12px 18px 16px; border-radius: 0; background: transparent; box-shadow: none; }
    html.myb-nav-rail.myb-ctx-peek:not(.myb-app) .myb-ctx { z-index: 1042; background: #eceff4; box-shadow: 16px 0 32px -20px rgba(15, 23, 42, 0.35); }
    .myb-ctx-head { padding: 4px 4px 14px 8px; border-bottom: 0; }
    .myb-ctx-head > .material-icons-outlined { background: #ffffff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08); }
    .myb-ctx-list a { min-height: 42px; padding: 0 14px; border-radius: 12px; }
    .myb-ctx-list a:hover { background: rgba(15, 23, 42, 0.05); }
    .myb-ctx-list a.is-active { background: #ffffff; box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.08); color: var(--primary, #582679) !important; }
    .myb-ctx-div, .myb-ctx-head + .myb-ctx-list::before { background: rgba(15, 23, 42, 0.08); }
    .myb-ctx-close:hover { background: rgba(15, 23, 42, 0.06); }
    /* chiuso: la linguetta per riaprirlo sta sul bordo della tela */
    html.myb-nav-rail.myb-ctx-can:not(.myb-ctx-peek):not(.myb-app) .myb-ctx-open { left: calc(var(--nav-gap) + var(--rail-w) + 4px); background: #ffffff; }
}
/* La tela è solo il contenuto: titolo e capsula (ricerca, notifiche, profilo) stanno sul fondo, sopra la tela, come la
   barra di un'app; il piè di pagina sotto */
@media (min-width: 992px) {
    html.myb-nav-rail:not(.myb-app) .page-container { min-height: 0; border-radius: 0; background: transparent; box-shadow: none; }
    html.myb-nav-rail:not(.myb-app) .page-content { min-height: calc(100vh - 120px); border-radius: 24px; background: #f7f8fb;
        box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04); }
    html.myb-nav-rail:not(.myb-app) .page-footer { background: transparent; }
}
/* Pannello, pagine elenco: in fondo come vederlo (Lista · Kanban) e le viste (predefinite e salvate) */
@media (min-width: 992px) {
    .myb-ctx-bottom { margin-top: auto; padding-top: 12px; }
    .myb-ctx-modes { display: flex; gap: 2px; margin: 0 4px; padding: 3px; border-radius: 12px; background: rgba(15, 23, 42, 0.06); }
    .myb-ctx-modes button { display: inline-flex; flex: 1 1 0; align-items: center; justify-content: center; gap: 6px; height: 34px; border: 0; border-radius: 9px; background: transparent;
        font: inherit; font-size: 0.93rem; font-weight: 600; color: #475569; cursor: pointer; }
    .myb-ctx-modes button.is-active { background: #ffffff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1); color: var(--primary, #582679); }
    .myb-ctx-modes button:focus-visible { outline: 2px solid var(--primary, #582679); outline-offset: 1px; }
    .myb-ctx-list.is-views a { min-height: 38px; font-size: 0.93rem; font-weight: 500; }
    .myb-ctx-list.is-views a > i { width: 18px; text-align: center; font-size: 0.86rem; color: #94a3b8; }
    .myb-ctx-list.is-views a.is-active > i { color: var(--primary, #582679); }
    .myb-ctx-list.is-views a > span { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
    .myb-ctx-list.is-views a > small { flex: 0 0 auto; min-width: 22px; padding: 1px 6px; border-radius: 999px; background: rgba(15, 23, 42, 0.06); font-size: 0.786rem; font-weight: 700; text-align: center; color: #475569; }
}
/* Binario + pannello = un solo menu (ux-designer + HIG Apple "Sidebars"/"Materials", DESIGN.md §33): la navigazione
   è un livello che galleggia sopra il contenuto, quindi il pannello sta sullo STESSO livello del binario: flottante con
   gli stessi margini, materiale vetro, il binario dentro di lui a sinistra e una sola ombra viola per entrambi; la voce attiva del binario diventa
   una linguetta (.myb-rail-tab, MYB.NavRail.js) dello stesso colore del pannello, con due angoli rovesciati, che ci
   entra dentro; il pannello si apre "a inchiostro" dalla punta della linguetta e la linguetta scivola da una voce all'altra */
@media (min-width: 992px) {
    html.myb-nav-rail:not(.myb-app) { --ctx-bg: #fafbfc; --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1); }
    html.myb-nav-rail:not(.myb-app) .myb-ctx { top: var(--nav-gap); bottom: var(--nav-gap); left: var(--nav-gap); width: calc(var(--rail-w) + var(--ctx-w));
        padding: 14px 12px 16px calc(var(--rail-w) + 12px); border-radius: 24px; background: rgba(250, 251, 252, 0.86);
        -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4);
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), 0 0 0 1px rgba(76, 29, 149, 0.06), 0 12px 32px -14px rgba(76, 29, 149, 0.4); }
    html.myb-nav-rail.myb-ctx-on:not(.myb-app) .page-container { margin-left: calc(var(--nav-gap) * 2 + var(--rail-w) + var(--ctx-w)) !important; }
    html.myb-nav-rail.myb-nav-ready:not(.myb-app) .page-container { transition: margin-left 0.28s var(--ease-out); }
    html.myb-nav-rail.myb-ctx-peek:not(.myb-app) .myb-ctx { z-index: 1040; background: rgba(250, 251, 252, 0.86);
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), 0 0 0 1px rgba(76, 29, 149, 0.06), 0 24px 48px -16px rgba(76, 29, 149, 0.45); }
    /* un oggetto solo: col pannello aperto l'ombra è quella del pannello, il binario non ne porta una sua */
    html.myb-nav-rail:is(.myb-ctx-on, .myb-ctx-peek):not(.myb-app) .myb-rail.has-tab { box-shadow: none; }
    @media (prefers-reduced-transparency: reduce) { html.myb-nav-rail:not(.myb-app) .myb-ctx { background: var(--ctx-bg); -webkit-backdrop-filter: none; backdrop-filter: none; } }
    .myb-ctx-head { flex: 0 0 auto; min-height: 44px; margin: 0 0 12px; padding: 0 0 0 4px; border: 0; background: none; }
    .myb-ctx-head > .material-icons-outlined { width: 36px; height: 36px; border-radius: 11px; box-shadow: none; font-size: 20px;
        background: color-mix(in srgb, var(--primary, #582679) 10%, #ffffff); color: var(--primary, #582679); }
    .myb-ctx-list a:hover { background: rgba(15, 23, 42, 0.045); }
    .myb-ctx-list a.is-active { background: color-mix(in srgb, var(--primary, #582679) 8%, #ffffff); box-shadow: none; color: var(--primary, #582679) !important; }

    /* la linguetta */
    .myb-rail-list { position: relative; }
    .myb-rail-item { z-index: 1; }
    .myb-rail-tab { position: absolute; z-index: 0; top: 0; left: var(--tab-x, 14px); right: var(--tab-x, 14px); height: var(--tab-h, 48px); border-radius: var(--tab-r, 14px);
        background: var(--ctx-bg); transform: translateY(var(--tab-y, 0)); opacity: 0; pointer-events: none;
        transition: transform 0.3s cubic-bezier(0.34, 1.2, 0.64, 1), right 0.16s var(--ease-out), border-radius 0.16s var(--ease-out), opacity 0.1s linear; }
    .myb-rail-tab::before, .myb-rail-tab::after { content: ''; position: absolute; right: 0; width: 12px; height: 12px; opacity: 0; transition: opacity 0.1s linear 0.08s; }
    .myb-rail-tab::before { bottom: 100%; background: radial-gradient(circle at 0 0, transparent 11.5px, var(--ctx-bg) 12px); }
    .myb-rail-tab::after { top: 100%; background: radial-gradient(circle at 0 100%, transparent 11.5px, var(--ctx-bg) 12px); }
    .myb-rail.has-tab .myb-rail-tab { opacity: 1; right: 0; border-radius: var(--tab-r, 14px) 0 0 var(--tab-r, 14px); }
    .myb-rail.has-tab .myb-rail-tab::before, .myb-rail.has-tab .myb-rail-tab::after { opacity: 1; }
    .myb-rail-tab.is-instant { transition: none; }
    /* una sola forma chiara nel binario: la linguetta; la voce sotto diventa viola, la sezione in cui sei resta segnata */
    .myb-rail.has-tab .myb-rail-item.is-active, .myb-rail.has-tab .myb-rail-item.is-peek { background: transparent; box-shadow: none; color: #ffffff !important; }
    .myb-rail.has-tab .myb-rail-item.is-tabbed { color: var(--primary, #582679) !important; transition: color 0.15s linear 0.08s; }
    .myb-rail.has-tab .myb-rail-item.is-here { background: rgba(255, 255, 255, 0.2); }
    .myb-rail-item.is-tabbed:focus-visible { outline: 2px solid var(--primary, #582679); outline-offset: -3px; }
    /* riaprire: una linguetta attaccata al binario, all'altezza della voce attiva */
    html.myb-nav-rail.myb-ctx-can:not(.myb-ctx-peek):not(.myb-app) .myb-ctx-open { left: calc(var(--nav-gap) + var(--rail-w)); top: var(--open-y, 50%); width: 20px; height: 36px; margin-top: -18px;
        border-radius: 0 10px 10px 0; background: var(--ctx-bg); box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06), 0 4px 10px -4px rgba(15, 23, 42, 0.2); transition: width 0.12s var(--ease-out); }
    html.myb-nav-rail.myb-ctx-can:not(.myb-ctx-peek):not(.myb-app) .myb-ctx-open:hover { width: 24px; }
    .myb-ctx-open .material-icons { font-size: 16px; }

    /* movimento: apertura a inchiostro dalla punta della linguetta, voci in cascata; chiusura al contrario */
    .myb-ctx.is-opening { animation: myb-ctx-ink 0.34s var(--ease-out) 0.06s backwards; }
    .myb-ctx.is-closing { display: flex !important; animation: myb-ctx-ink-out 0.22s cubic-bezier(0.4, 0, 1, 1) forwards; }
    .myb-ctx.is-in .myb-ctx-head, .myb-ctx.is-in li, .myb-ctx.is-in .myb-ctx-sub, .myb-ctx.is-in .myb-ctx-modes {
        animation: myb-ctx-item 0.2s var(--ease-out) both; animation-delay: calc(var(--d, 140ms) + min(var(--i, 0), 7) * 24ms); }
    .myb-ctx.is-switch { --d: 90ms; }
    @keyframes myb-ctx-ink { from { clip-path: circle(0 at var(--rail-w) calc(var(--ink-y, 52px) - var(--nav-gap))); } to { clip-path: circle(calc(100vh + 260px) at var(--rail-w) calc(var(--ink-y, 52px) - var(--nav-gap))); } }
    @keyframes myb-ctx-ink-out { from { clip-path: circle(calc(100vh + 260px) at var(--rail-w) calc(var(--ink-y, 52px) - var(--nav-gap))); } to { clip-path: circle(0 at var(--rail-w) calc(var(--ink-y, 52px) - var(--nav-gap))); } }
    @keyframes myb-ctx-item { from { opacity: 0; transform: translate(var(--dx, -8px), var(--dy, 0)); } }
}
@media (min-width: 992px) and (prefers-reduced-motion: reduce) {
    .myb-rail-tab, .myb-rail-tab::before, .myb-rail-tab::after, html.myb-nav-rail.myb-nav-ready:not(.myb-app) .page-container { transition: none !important; }
    .myb-ctx.is-opening, .myb-ctx.is-in .myb-ctx-head, .myb-ctx.is-in li, .myb-ctx.is-in .myb-ctx-sub, .myb-ctx.is-in .myb-ctx-modes { animation: myb-ctx-fade 0.12s linear both; animation-delay: 0s; }
    .myb-ctx.is-closing { animation: none; display: none !important; }
    @keyframes myb-ctx-fade { from { opacity: 0; } }
}
/* Tela a cartella: il titolo della pagina (.myb-canvas-title, sganciato dalla navbar) è la linguetta della tela, con la
   stessa curva delle cartelle delle schede (.c3-folder-tab::after); la capsula in alto a destra (ricerca, notifiche,
   profilo) resta fuori, sul fondo, accanto alla linguetta. --myb-cap-w (MYB.NavRail.js) tiene il titolo lontano */
.myb-canvas-title { display: none; }
@media (min-width: 992px) {
    html.myb-nav-rail:not(.myb-app) { --tab-h: 64px; }
    html.myb-nav-rail:not(.myb-app) .page-container { position: relative; padding-top: 0 !important; }
    html.myb-nav-rail:not(.myb-app) .page-header { position: absolute !important; top: calc((var(--tab-h) - 52px) / 2) !important; right: 0; left: auto !important; margin: 0; padding: 0; background: transparent !important; }
    html.myb-nav-rail:not(.myb-app) .page-header li:has(.myb-search-pill) { width: 240px; }
    html.myb-nav-rail:not(.myb-app) .page-header .myb-appbar-title { display: none !important; }
    html.myb-nav-rail:not(.myb-app) .page-content { position: relative; margin-top: var(--tab-h) !important; border-top-left-radius: 0; box-shadow: none; }
    html.myb-nav-rail:not(.myb-app) .myb-canvas-title { position: absolute; top: calc(var(--tab-h) * -1); left: 0; display: flex; align-items: center; height: var(--tab-h);
        max-width: calc(100% - var(--myb-cap-w, 640px) - 56px); margin: 0; padding: 4px 12px 0 28px; border-radius: 24px 0 0 0; background: #f7f8fb;
        color: #0f172a; font-size: 1.55rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; white-space: nowrap; }
    html.myb-nav-rail:not(.myb-app) .myb-canvas-title::after { content: ''; position: absolute; left: calc(100% - 1px); bottom: 0; width: 48px; height: 100%; background: #f7f8fb;
        clip-path: path('M0 0 C 20 0 20 64 48 64 L 0 64 Z'); }
    html.myb-nav-rail:not(.myb-app) .myb-canvas-title > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}
/* Modale remota in caricamento (#remoteModal.is-loading, Page.Class): la scheda ha già la sua altezza con il loader al
   centro, invece di una riga vuota sullo sfondo scuro; il contenuto arrivato entra con una breve dissolvenza */
#remoteModal.is-loading .modal-body { min-height: 360px; }
#remoteModal.is-loading .modal-body .blockUI { display: none !important; }
#remoteModal .modal-body > .myb-modal-skel { display: flex; flex-direction: column; gap: 28px; padding: 28px 44px 36px; animation: myb-skel-pulse 1.2s ease-in-out infinite alternate; }
.myb-modal-skel-head { display: flex; align-items: center; gap: 16px; margin: -28px -44px 8px; padding: 28px 44px; border-bottom: 1px solid rgba(15, 23, 42, 0.06); }
.myb-modal-skel-head i { width: 44px; height: 44px; border-radius: 12px; background: #dde2ea; }
.myb-modal-skel-head b { width: 260px; height: 16px; border-radius: 8px; background: #dde2ea; }
.myb-modal-skel-row { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.myb-modal-skel span { display: flex; flex-direction: column; gap: 12px; }
.myb-modal-skel em { width: 120px; height: 12px; border-radius: 6px; background: #dde2ea; }
.myb-modal-skel span b { height: 44px; border-radius: 999px; background: #ffffff; box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06); }
@keyframes myb-skel-pulse { to { opacity: 0.55; } }
#remoteModal .modal-body > * { animation: myb-modal-in 0.18s ease-out; }
@keyframes myb-modal-in { from { opacity: 0; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { #remoteModal .modal-body > *, #remoteModal .modal-body > .myb-modal-skel { animation: none; } }
/* Icone Phosphor (DESIGN.md §33). Binario e pannello: una famiglia, contorno a riposo e piena sulla voce scelta (HIG Apple
   "Icons"); in fondo la freccia che apre e chiude il pannello, che parte chiuso (compatto). Le Material tradotte da
   MYB.Phosphor.js tengono il loro testo (nascosto) e la loro dimensione (--ph-size) */
html.myb-ph [data-ph] { font-size: 0 !important; line-height: 1; vertical-align: middle; }
html.myb-ph [data-ph]::before { font-size: var(--ph-size, 24px); }
@media (min-width: 992px) {
    .myb-rail-item > .ph, .myb-rail-item > .ph-fill, .myb-rail-toggle-ico > .ph { font-size: 24px; }
    .myb-rail-item > .myb-ph-fill { display: none; }
    .myb-rail-item:is(.is-active, .is-tabbed, .is-peek) > .ph { display: none; }
    .myb-rail-item:is(.is-active, .is-tabbed, .is-peek) > .myb-ph-fill { display: inline-block; }
    .myb-rail-toggle-ico { display: inline-flex; }
    .myb-rail-toggle { margin-top: 10px; opacity: 0.85; }
    .myb-rail-toggle:hover { opacity: 1; }
    .myb-rail-toggle[hidden] { display: none; }
    html.myb-nav-rail:not(.myb-app) .myb-ctx-open { display: none !important; }
    .myb-ctx-head > .ph-fill { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 11px; font-size: 20px;
        background: color-mix(in srgb, var(--primary, #582679) 10%, #ffffff); color: var(--primary, #582679); }
    .myb-ctx-list.is-parts .ph { font-size: 18px; color: #94a3b8; }
    .myb-ctx-ext.ph { margin-left: auto; font-size: 14px; color: #94a3b8; }
}
/* Scheda v3, riquadro del contatto stretto (pannello aperto): un'email lunga va a capo dentro il riquadro invece di uscirne */
.c3 .c3-contacts > * { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
/* Composer in cima alla cronologia, quando c'è poco spazio (pannello aperto, finestra stretta): il testo su tutta la riga,
   sotto i comandi (Commento/Attività a sinistra, visibilità e Aggiungi a destra), invece di una colonnina che va a capo */
.c3-tl-composer { container: c3compose / inline-size; }
.c3-composer textarea { scrollbar-width: none; }
.c3-composer textarea::-webkit-scrollbar { display: none; }
@container c3compose (max-width: 760px) {
    .c3-tl-composer .c3-composer { grid-template-columns: auto minmax(0, 1fr) auto auto; grid-template-areas: "text text text text" "modes . lock add"; row-gap: 4px; border-radius: 24px; }
    .c3-tl-composer .c3-composer textarea { grid-area: text; padding: 8px 10px 4px; }
    .c3-tl-composer .c3-composer-modes { grid-area: modes; }
    .c3-tl-composer .c3-composer .c3-private { grid-area: lock; }
    .c3-tl-composer .c3-composer .c3-add { grid-area: add; }
    .c3-tl-composer .c3-composer:has(> .c3-voice-btn:not([hidden])) { grid-template-columns: auto minmax(0, 1fr) auto auto auto; grid-template-areas: "text text text text text" "voice voice voice voice voice" "modes . mic lock add"; }
    .c3-tl-composer .c3-voice-btn { grid-area: mic; }
    .c3-tl-composer .c3-voice { grid-area: voice; }
}
/* Composer sul telefono (HIG "Layout" e "Buttons", 44pt): con i tre comandi in fila sotto il testo Aggiungi usciva dal
   riquadro e "Visibile a tutti" andava a capo. Sopra cosa aggiungi e chi lo vede, sotto il testo con il tasto accanto,
   come nelle app di messaggi. Il lucchetto resta solo icona finché è aperto; chiuso dice "Privato" */
@container c3compose (max-width: 520px) {
    .c3-tl-composer .c3-composer { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "modes lock" "text add"; align-items: end; gap: 8px; padding: 8px; }
    .c3-tl-composer .c3-composer-modes { justify-self: start; }
    .c3-tl-composer .c3-composer textarea { min-width: 0; min-height: 44px; padding: 11px 14px; border: 1px solid #cbd3dd; border-radius: 22px; background: #ffffff; }
    .c3-tl-composer .c3-composer .c3-private { justify-self: end; min-width: 44px; height: 44px; padding: 0 12px; }
    .c3-tl-composer .c3-composer .c3-private:not(.is-on) .c3-private-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .c3-tl-composer .c3-composer .c3-add { justify-self: end; width: 44px; height: 44px; padding: 0; justify-content: center; }
    .c3-tl-composer .c3-composer .c3-add span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .c3-tl-composer .c3-composer:has(> .c3-voice-btn:not([hidden])) { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "modes mic lock" "text text add" "voice voice voice"; }
    .c3-tl-composer .c3-voice-btn { width: 52px; height: 44px; padding: 0; justify-content: center; }
    .c3-tl-composer .c3-voice-btn > span:not(.c3-voice-ico) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* Contrasti della scheda (HIG "Accessibility" e "Color"): il composer quasi spariva sulla scheda bianca (bordo 1,17:1), la
   pillola sul composer (1,04:1), il segnaposto era 4,37:1, Aggiungi spento 2,51:1, le linguette vuote 2,34:1 */
.c3-tl-composer .c3-composer { border-color: #cbd3dd; }
.c3-composer-modes { background: #e3e8ef; }
.c3-composer textarea::placeholder { color: #64748b; opacity: 1; }
.c3-add:disabled { opacity: 1; background: #e2e8f0; color: #475569; }
.c3-tabs button:not(.is-active):has(.pbx-history-count-v3.is-zero) { opacity: 1; color: #64748b; }
.c3-tabs .pbx-history-count-v3.is-zero { opacity: 1; }
/* La scelta Commento | Attività in uso col colore primario, così si vede subito cosa si sta per aggiungere */
.c3-tl-composer .c3-composer.is-private { background: #fff7ed; border-color: #fdba74; } /* la regola del composer in cronologia copriva l'arancione del privato */
.c3-composer-modes button.is-active { background: var(--primary, #582679); color: #ffffff; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18); }
/* Colonna destra, sotto In programma: Commento | Attività e il modulo rapido delle linguette, in verticale perché la
   colonna è stretta (testo su tutta la riga, sotto lucchetto o tipo/quando/a chi, e Aggiungi) */
.c3-side-quick { display: grid; gap: 10px; }
.c3-side-quick .c3-composer-modes { grid-area: auto; justify-self: start; } /* .c3-folder .c3-composer-modes ha grid-area: modes, del composer completo */
.c3-side-quick .c3-quick { flex-wrap: wrap; padding: 10px 12px; }
.c3-side-quick .c3-quick textarea, .c3-side-quick .c3-quick input[type=text] { flex: 1 1 100%; min-height: 44px; }
.c3-side-quick .c3-quick .c3-private { margin-right: auto; }
.c3-side-quick .c3-quick-opts { width: 100%; margin-left: 0; }
.c3-side-quick .c3-quick-opts .c3-chip.is-primary { margin-left: auto; }
/* Prossimo appuntamento: tutta la riga apre la linguetta Appuntamenti, dove si modifica o si annulla; la freccia lo dice */
.c3-next-go { margin-left: auto; color: #64748b; font-size: 0.85rem; }
.c3-next-appt { cursor: pointer; }
/* Pannello di vetro (liquid glass, HIG Apple "Materials"): dietro il pannello, lungo il binario, un alone sfocato con i
   colori del binario (.myb-rail-glow, MYB.NavRail.js); il pannello è vetro smerigliato chiaro che lo lascia trasparire,
   più intenso accanto al binario e sfumato verso destra, con il filo di luce del vetro sul bordo. Anche la linguetta è
   vetro, così combacia col pannello. Con "riduci trasparenza" torna pieno */
.myb-rail-glow { display: none; }
@media (min-width: 992px) {
    html.myb-nav-rail:is(.myb-ctx-on, .myb-ctx-peek):not(.myb-app) .myb-rail-glow { position: fixed; z-index: 1039; top: calc(var(--nav-gap) + 24px); bottom: calc(var(--nav-gap) + 24px);
        left: calc(var(--nav-gap) + var(--rail-w) - 40px); display: block; width: 110px; border-radius: 60px; opacity: 0.55; filter: blur(46px); pointer-events: none; }
    html.myb-nav-rail:not(.myb-app) { --glass: rgba(255, 255, 255, 0.58); --glass-tab: rgba(255, 255, 255, 0.74); }
    html.myb-nav-rail:not(.myb-app) .myb-ctx, html.myb-nav-rail.myb-ctx-peek:not(.myb-app) .myb-ctx { background: var(--glass);
        -webkit-backdrop-filter: blur(28px) saturate(1.8); backdrop-filter: blur(28px) saturate(1.8);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 0 0 1px rgba(255, 255, 255, 0.55), 0 0 0 1px rgba(76, 29, 149, 0.06), 0 12px 32px -14px rgba(76, 29, 149, 0.4); }
    html.myb-nav-rail.myb-ctx-peek:not(.myb-app) .myb-ctx { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 0 0 1px rgba(255, 255, 255, 0.55), 0 0 0 1px rgba(76, 29, 149, 0.08), 0 24px 48px -16px rgba(76, 29, 149, 0.45); }
    .myb-rail-tab, .myb-rail-tab::before, .myb-rail-tab::after { -webkit-backdrop-filter: blur(28px) saturate(1.8); backdrop-filter: blur(28px) saturate(1.8); }
    .myb-rail-tab { background: var(--glass-tab); }
    .myb-rail-tab::before { background: var(--glass-tab); -webkit-mask: radial-gradient(circle at 0 0, transparent 11.5px, #000 12px); mask: radial-gradient(circle at 0 0, transparent 11.5px, #000 12px); }
    .myb-rail-tab::after { background: var(--glass-tab); -webkit-mask: radial-gradient(circle at 0 100%, transparent 11.5px, #000 12px); mask: radial-gradient(circle at 0 100%, transparent 11.5px, #000 12px); }
}
@media (min-width: 992px) and (prefers-reduced-transparency: reduce) {
    html.myb-nav-rail:not(.myb-app) .myb-ctx, .myb-rail-tab, .myb-rail-tab::before, .myb-rail-tab::after { background: var(--ctx-bg) !important; -webkit-backdrop-filter: none; backdrop-filter: none; }
    .myb-rail-glow { display: none !important; }
}
/* Binario largo (a scelta, freccia in fondo; MYB.NavRail.js "myb-rail-wide"): la stessa sfumatura, le voci con icona e
   nome; entrando in una voce con sottomenu il binario si riscrive con le sue voci, "In questa scheda" e le viste, con
   "‹ Menu" per tornare (scorrimento laterale come su iOS). Niente pannello né linguetta in questa modalità */
.myb-wide, .myb-w-label { display: none; }
@media (min-width: 992px) {
    html.myb-nav-rail.myb-rail-wide:not(.myb-app) { --rail-w: 324px; } /* = binario + pannello: entrando in una sezione la pagina non si sposta */
    html.myb-nav-rail.myb-rail-wide:not(.myb-app) .myb-rail { align-items: stretch; padding: 14px 12px; }
    html.myb-rail-wide .myb-rail-logo { align-self: flex-start; margin: 0 0 12px 6px; }
    html.myb-rail-wide .myb-rail-list, html.myb-rail-wide .myb-ctx, html.myb-rail-wide .myb-rail-glow, html.myb-rail-wide .myb-rail-tip { display: none !important; }
    html.myb-rail-wide .myb-wide { display: flex; flex: 1 1 auto; flex-direction: column; gap: 2px; min-height: 0; overflow-y: auto; scrollbar-width: none; color: #ffffff; }
    html.myb-rail-wide .myb-wide::-webkit-scrollbar { display: none; }
    /* altre voci sopra o sotto il bordo: sfuma (come .myb-ctx-body, MYB.NavRail.js wideEdge) */
    html.myb-rail-wide .myb-wide { --ft: 0px; --fb: 0px; transition: --ft 0.2s, --fb 0.2s;
        -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 var(--ft), #000 calc(100% - var(--fb)), transparent 100%);
        mask-image: linear-gradient(to bottom, transparent 0, #000 var(--ft), #000 calc(100% - var(--fb)), transparent 100%); }
    html.myb-rail-wide .myb-wide.is-more-above { --ft: 32px; }
    html.myb-rail-wide .myb-wide.is-more-below { --fb: 56px; }
    .myb-wide.is-in > * { animation: myb-w-in 0.22s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
    @keyframes myb-w-in { from { opacity: 0; transform: translateX(var(--wx, 16px)); } }
    .myb-w-item { display: flex; flex: 0 0 auto; align-items: center; gap: 12px; width: 100%; min-height: 40px; padding: 0 12px; border: 0; border-radius: 12px; background: none;
        font-size: 0.95rem; font-weight: 600; text-align: left; color: #ffffff !important; text-decoration: none !important; cursor: pointer; }
    .myb-w-item > span { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
    .myb-w-item > .ph, .myb-w-item > .ph-fill { flex: 0 0 auto; font-size: 20px; }
    .myb-w-item > .myb-ph-fill { display: none; }
    .myb-w-item.is-active > .ph:not(.myb-w-more) { display: none; }
    .myb-w-item.is-active > .myb-ph-fill { display: inline-block; }
    .myb-w-more { font-size: 14px !important; opacity: 0.7; }
    .myb-w-item:hover { background: rgba(255, 255, 255, 0.14); }
    .myb-w-item.is-active { background: #ffffff; color: var(--primary, #582679) !important; box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.25); }
    .myb-w-item:focus-visible, .myb-w-back:focus-visible { outline: 2px solid #ffffff; outline-offset: 1px; }
    .myb-w-group { margin: 14px 12px 4px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255, 255, 255, 0.62); }
    .myb-w-sep { flex: 0 0 auto; height: 1px; margin: 8px 12px; background: rgba(255, 255, 255, 0.24); }
    .myb-w-back { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 4px; align-self: flex-start; min-height: 32px; padding: 0 10px 0 6px; border: 0; border-radius: 10px;
        background: none; font-size: 0.86rem; font-weight: 600; color: rgba(255, 255, 255, 0.85); cursor: pointer; }
    .myb-w-back:hover { background: rgba(255, 255, 255, 0.14); color: #ffffff; }
    .myb-w-head { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; margin: 6px 4px 10px; }
    .myb-w-head > .ph-fill { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(255, 255, 255, 0.18); font-size: 19px; }
    .myb-w-head b { font-size: 1.05rem; font-weight: 700; color: #ffffff; }
    /* voci, parti della scheda e viste sulla sfumatura */
    .myb-wide .myb-ctx-list a { color: #ffffff !important; font-weight: 500; }
    .myb-wide .myb-ctx-list a:hover { background: rgba(255, 255, 255, 0.14); }
    .myb-wide .myb-ctx-list a.is-active { background: #ffffff; color: var(--primary, #582679) !important; box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.25); }
    .myb-wide .myb-ctx-list.is-parts .ph, .myb-wide .myb-ctx-list.is-views a > i, .myb-wide .myb-ctx-ext { color: rgba(255, 255, 255, 0.7) !important; }
    /* "In questa scheda" e le viste: la regola del pannello di vetro (.myb-ctx-list.is-parts a, #334155) ha la stessa forza di
       quella del largo e viene dopo nel file, quindi vinceva lei: testo scuro sul gradiente. Qui una classe in più */
    .myb-wide .myb-ctx-list.is-parts a, .myb-wide .myb-ctx-list.is-views a { color: #ffffff !important; }
    .myb-wide .myb-ctx-list.is-parts a.is-active, .myb-wide .myb-ctx-list.is-views a.is-active { color: var(--primary, #582679) !important; }
    .myb-wide .myb-ctx-list a.is-active > i { color: var(--primary, #582679) !important; }
    .myb-wide .myb-ctx-div { background: rgba(255, 255, 255, 0.24); }
    .myb-wide .myb-ctx-sub { margin: 18px 12px 6px; color: rgba(255, 255, 255, 0.62); }
    .myb-wide .myb-ctx-list.is-views a > small { background: rgba(255, 255, 255, 0.2); color: #ffffff; }
    .myb-wide .myb-ctx-list.is-views a.is-active > small { background: color-mix(in srgb, var(--primary, #582679) 12%, #ffffff); color: var(--primary, #582679); }
    .myb-wide .myb-ctx-modes { background: rgba(255, 255, 255, 0.14); }
    .myb-wide .myb-ctx-modes button { color: #ffffff; }
    .myb-wide .myb-ctx-modes button.is-active { background: #ffffff; color: var(--primary, #582679); }
    .myb-wide .myb-ctx-bottom { margin-top: auto; }
    /* la freccia in fondo: nel largo con la scritta */
    html.myb-rail-wide .myb-rail-toggle { justify-content: flex-start; gap: 12px; width: 100%; padding: 0 12px; }
    html.myb-rail-wide .myb-w-label { display: inline; font-size: 0.9rem; font-weight: 600; }
}
@media (min-width: 992px) and (prefers-reduced-motion: reduce) { .myb-wide.is-in > * { animation: none; } }
/* Largo, dentro una sezione: icone + pannello di vetro aperto, in cima "‹ Menu" per tornare al menu coi nomi */
@media (min-width: 992px) {
    .myb-ctx-back { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 4px; align-self: flex-start; min-height: 30px; margin: 0 0 6px; padding: 0 10px 0 4px;
        border: 0; border-radius: 9px; background: none; font-size: 0.86rem; font-weight: 600; color: #475569; cursor: pointer; }
    .myb-ctx-back:hover { background: rgba(15, 23, 42, 0.05); color: #1c2434; }
    .myb-ctx-back:focus-visible { outline: 2px solid var(--primary, #582679); outline-offset: 1px; }
    .myb-ctx-back .ph { font-size: 14px; }
}
/* Pannello come la reference (DESIGN.md §33): pagina attuale = card bianca con testo accento, titoli di gruppo maiuscoli
   piccoli grigi, voci più ariose; nel largo, in testa, il selettore di sezione (torna al menu coi nomi) */
@media (min-width: 992px) {
    .myb-ctx-list a { min-height: 44px; font-size: 1rem; font-weight: 500; color: #1e293b !important; }
    .myb-ctx-list a:hover { background: rgba(15, 23, 42, 0.045); }
    .myb-ctx-list a:active { background: rgba(15, 23, 42, 0.08); }
    .myb-ctx-list a.is-active { background: #ffffff; box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.06); color: var(--primary, #582679) !important; font-weight: 600; }
    .myb-ctx-list.is-parts a, .myb-ctx-list.is-views a { min-height: 40px; font-size: 0.929rem; color: #334155 !important; }
    .myb-ctx-list.is-views a > small { font-variant-numeric: tabular-nums; }
    .myb-ctx-sub { margin: 20px 12px 6px; font-size: 0.786rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #475569; }
    .myb-ctx-switch { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; width: 100%; min-height: 44px; margin: 0 0 12px; padding: 0 10px 0 8px; border: 0; border-radius: 12px;
        background: #ffffff; box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.06); text-align: left; cursor: pointer; }
    .myb-ctx-switch:hover { box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08), 0 2px 6px -2px rgba(15, 23, 42, 0.12); }
    .myb-ctx-switch:active { background: #f8fafc; }
    .myb-ctx-switch:focus-visible { outline: 2px solid var(--primary, #582679); outline-offset: 2px; }
    .myb-ctx-switch > .ph-fill { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px;
        background: color-mix(in srgb, var(--primary, #582679) 10%, #ffffff); color: var(--primary, #582679); font-size: 16px; }
    .myb-ctx-switch > b { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 1.07rem; font-weight: 600; letter-spacing: -0.01em; color: #0f172a; }
    .myb-ctx-switch > .ph-caret-up-down { flex: 0 0 auto; font-size: 16px; color: #64748b; }
}
/* Menu largo con lo stile del menu classico (lo conoscono tutti): voci bianche al 60% in Lato molto grassetto, la scelta
   bianca piena su una pillola traslucida, titoli dei gruppi Montserrat maiuscoli al 40%, "+" sulle voci con sottomenu,
   logo esteso */
@media (min-width: 992px) {
    .myb-w-item { min-height: 46px; padding: 0 14px; font-family: Lato, sans-serif; font-size: 0.93rem; font-weight: 900; color: rgba(255, 255, 255, 0.62) !important; }
    .myb-w-item > .ph, .myb-w-item > .ph-fill { font-size: 19px; }
    .myb-w-item:hover { background: rgba(255, 255, 255, 0.1); color: #ffffff !important; }
    .myb-w-item.is-active { background: rgba(255, 255, 255, 0.22); box-shadow: none; color: #ffffff !important; }
    .myb-w-more { font-size: 15px !important; opacity: 1; }
    .myb-w-group { margin: 16px 14px 6px; font-family: Montserrat, sans-serif; font-size: 0.857rem; font-weight: 700; letter-spacing: 0.02em; color: rgba(255, 255, 255, 0.45); }
    html.myb-rail-wide .myb-rail-logo { width: auto; max-width: 190px; overflow: visible; }
    html.myb-rail-wide .myb-rail-logo img { max-width: 175px !important; height: 44px; object-fit: contain; object-position: left center; }
}
@media (min-width: 992px) {
    html.myb-rail-wide .myb-rail-toggle { padding: 0 14px; color: rgba(255, 255, 255, 0.62); }
    html.myb-rail-wide .myb-rail-toggle:hover { color: #ffffff; }
    html.myb-rail-wide .myb-w-label { font-family: Lato, sans-serif; font-size: 0.93rem; font-weight: 900; }
}
/* Menu largo, lista principale: stesse misure del menu v3 di sempre (logo grande, voci rientrate, pillola che non tocca
   i bordi, titoli allineati alle icone) */
@media (min-width: 992px) {
    html.myb-nav-rail.myb-rail-wide:not(.myb-app) .myb-rail { padding: 22px 16px 16px; }
    html.myb-rail-wide .myb-rail-logo { height: 46px; margin: 4px 0 18px 18px; }
    html.myb-rail-wide .myb-rail-logo img { height: 46px; }
    .myb-wide { gap: 3px; }
    .myb-w-item { gap: 13px; min-height: 44px; padding: 0 18px; border-radius: 12px; }
    .myb-w-group { margin: 20px 18px 8px; font-size: 0.857rem; }
    .myb-w-group:first-child { margin-top: 6px; }
    html.myb-rail-wide .myb-rail-toggle { padding: 0 18px; }
}
/* Menu largo: icone, logo e freccia sulla stessa colonna del binario compatto (centro a nav-gap + 38px, icone 24px),
   così passando da compatto a largo non si spostano; nomi e titoli dei gruppi partono dopo */
@media (min-width: 992px) {
    html.myb-nav-rail.myb-rail-wide:not(.myb-app) .myb-rail { padding-right: 12px; padding-left: 12px; }
    html.myb-rail-wide .myb-rail-logo { margin-left: 4px; }
    .myb-w-item { padding: 0 14px; gap: 14px; }
    .myb-w-item > .ph, .myb-w-item > .ph-fill { font-size: 24px; }
    .myb-w-group { margin-left: 14px; margin-right: 14px; }
    html.myb-rail-wide .myb-rail-toggle { padding: 0 14px; gap: 14px; }
}
/* La freccia in fondo, anche nel largo: solo l'icona, nello stesso punto del compatto (il nome lo dice il suggerimento) */
@media (min-width: 992px) {
    html.myb-rail-wide .myb-rail-toggle { align-self: flex-start; justify-content: center; width: 48px; margin-left: 2px; padding: 0; opacity: 0.75; }
    html.myb-rail-wide .myb-rail-toggle:hover { opacity: 1; background: rgba(255, 255, 255, 0.14); }
    html.myb-rail-wide .myb-w-label { display: none; }
}
/* Menu largo, lista principale = misure del menu classico (misurate su .page-sidebar): fianchi di 30px, logo 175px
   centrato, voci 45px con 12px 20px di imbottitura, icone 18px a 10px dal nome, titoli 15px 20px 10px */
@media (min-width: 992px) {
    html.myb-nav-rail.myb-rail-wide:not(.myb-app) .myb-rail { padding: 20px 30px 15px; }
    html.myb-rail-wide .myb-rail-logo { align-self: center; height: 75px; margin: 0 0 4px; display: flex; align-items: center; justify-content: center; }
    html.myb-rail-wide .myb-rail-logo img { max-width: 175px !important; height: 45px; object-position: center; }
    .myb-wide { gap: 0; }
    .myb-w-item { min-height: 45px; margin: 3px 0; padding: 12px 20px; gap: 10px; border-radius: 12px; }
    .myb-w-item > .ph, .myb-w-item > .ph-fill { font-size: 18px; }
    .myb-w-group, .myb-w-group:first-child { margin: 0; padding: 15px 20px 10px; }
    html.myb-rail-wide .myb-rail-toggle { margin-left: 6px; }
}
/* Pannello di vetro con più presenza sulle pagine chiare: vetro leggermente grigio-lavanda (le card bianche della
   pagina attuale e del selettore staccano), alone del binario più pieno, bordo destro definito verso la tela */
@media (min-width: 992px) {
    html.myb-nav-rail:not(.myb-app) { --glass: rgba(240, 242, 248, 0.66); --glass-tab: rgba(240, 242, 248, 0.82); }
    html.myb-nav-rail:is(.myb-ctx-on, .myb-ctx-peek):not(.myb-app) .myb-rail-glow { width: 150px; opacity: 0.85; filter: blur(52px); }
    html.myb-nav-rail:not(.myb-app) .myb-ctx, html.myb-nav-rail.myb-ctx-peek:not(.myb-app) .myb-ctx {
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset -1px 0 0 rgba(255, 255, 255, 0.7), 0 0 0 1px rgba(76, 29, 149, 0.08), 0 12px 32px -14px rgba(76, 29, 149, 0.45); }
}
/* Niente alone dietro il vetro (sembrava colore trascinato): pannello uniforme grigio-lavanda, pulito, con bordo e ombra */
@media (min-width: 992px) {
    html.myb-nav-rail:not(.myb-app) .myb-rail-glow { display: none !important; }
    html.myb-nav-rail:not(.myb-app) { --glass: rgba(238, 240, 246, 0.92); --glass-tab: rgba(238, 240, 246, 0.96); }
}
/* Liquid glass vero (HIG "Materials"): dietro il pannello la sfumatura del binario stesa uniforme su tutta l'area (non
   più un alone a macchia), il vetro chiaro la lascia trasparire in modo regolare, con il riflesso di luce in alto */
@media (min-width: 992px) {
    html.myb-nav-rail:is(.myb-ctx-on, .myb-ctx-peek):not(.myb-app) .myb-rail-glow { display: block !important; top: calc(var(--nav-gap) + 10px); bottom: calc(var(--nav-gap) + 10px);
        left: calc(var(--nav-gap) + var(--rail-w)); width: calc(var(--ctx-w) - 10px); border-radius: 24px; opacity: 0.42; filter: blur(22px); }
    html.myb-nav-rail:not(.myb-app) { --glass: rgba(255, 255, 255, 0.64); --glass-tab: rgba(255, 255, 255, 0.78); }
    html.myb-nav-rail:not(.myb-app) .myb-ctx, html.myb-nav-rail.myb-ctx-peek:not(.myb-app) .myb-ctx {
        background: linear-gradient(165deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0) 32%), var(--glass);
        -webkit-backdrop-filter: blur(30px) saturate(1.6); backdrop-filter: blur(30px) saturate(1.6); }
}
@media (min-width: 992px) and (prefers-reduced-transparency: reduce) { html.myb-nav-rail:not(.myb-app) .myb-rail-glow { display: none !important; } }
/* Menu largo, lista principale: 280px come il menu di sempre (entrando in una sezione la pagina scorre di 44px, con la
   transizione del margine già presente) */
@media (min-width: 992px) {
    html.myb-nav-rail.myb-rail-wide:not(.myb-app) { --rail-w: 280px; }
    html.myb-nav-rail.myb-rail-wide:not(.myb-app) .page-container { margin-left: calc(var(--nav-gap) * 2 + var(--rail-w)) !important; }
}
/* Selettori Statistiche (Broker, Recruiting, Agenti, Centralino): le regole generiche delle label vincevano sulla
   etichetta piccola maiuscola grigia della card */
.broker-selector-card .form-group label.broker-selector-label { font-size: .7rem !important; font-weight: 700 !important; letter-spacing: .05em; text-transform: uppercase; color: #94a3b8 !important; margin-bottom: .4rem; }
.broker-selector-card input[type="date"].form-control { color: #334155; }
/* Modale "Nuovo Ticket" (#ticketModal, TicketsV2_Index.php) uniforme ai modali v3 (Nuovo contatto, Nuova opportunità…:
   "remoteModal old-style: upgrade globale al look V3"): vetro chiaro con angoli 28px, testata con riquadro icona in
   sfumatura e titolo scuro, corpo chiaro, pulsanti Annulla neutro e azione in sfumatura; colori del tema al posto del blu */
#ticketModal .modal-content.ticket-modal-modern { background: rgba(241, 245, 249, 0.97); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 28px; box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.6) inset; overflow: hidden; }
#ticketModal .ticket-modal-header { align-items: center; padding: 20px 30px; border-radius: 0; border-bottom: 1px solid rgba(226, 232, 240, 0.7); background: rgba(241, 245, 249, 0.75); }
#ticketModal .ticket-modal-header .modal-title { display: flex; align-items: center; gap: 14px; margin: 0 !important; font-size: 1.05rem; font-weight: 800; letter-spacing: 0.01em; text-transform: none; color: #1e293b !important; }
#ticketModal .ticket-modal-header .modal-title > i { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 40px; height: 40px; margin: 0 !important;
    border-radius: 12px; background: linear-gradient(135deg, var(--secondary), var(--primary)); box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15); font-size: 0.95rem; color: #ffffff; }
#ticketModal .ticket-modal-header small { display: block; margin-left: 54px; color: #64748b !important; }
#ticketModal .ticket-modal-body { padding: 24px 30px 0; background: rgba(255, 255, 255, 0.72); }
#ticketModal .ticket-section-title i { color: var(--primary); }
#ticketModal .form-label-modern { color: #334155; }
#ticketModal .form-control-modern { border-radius: 12px !important; border: 1.5px solid rgba(0, 0, 0, 0.08) !important; background: rgba(255, 255, 255, 0.85) !important; }
#ticketModal .form-control-modern:focus { border-color: var(--secondary) !important; box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12) !important; }
#ticketModal .wizard-progress-bar { background: linear-gradient(90deg, var(--secondary), var(--primary)); }
#ticketModal .step-indicator.active .step-icon { border-color: var(--primary); color: var(--primary); box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12); }
#ticketModal .step-indicator.active .step-label { color: var(--primary); }
#ticketModal .step-indicator.completed .step-icon { border-color: var(--primary); background: var(--primary); color: #ffffff; }
#ticketModal .priority-card { border-color: rgba(0, 0, 0, 0.06); border-radius: 14px; }
#ticketModal .priority-selector input:checked + .priority-card { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 7%, #ffffff); }
#ticketModal .ticket-modal-footer { margin: 24px -30px 0 !important; padding: 16px 30px !important; border-top: 1px solid rgba(226, 232, 240, 0.9) !important; border-radius: 0; background: transparent; }
#ticketModal .ticket-modal-footer .btn { border-radius: 10px; padding: 9px 20px; font-weight: 600; }
#ticketModal .ticket-modal-footer .btn-light, #ticketModal .ticket-modal-footer .btn-outline-secondary { border: 1px solid #e2e8f0; background: #f1f5f9; color: #64748b; box-shadow: none; }
#ticketModal .ticket-modal-footer .btn-light:hover, #ticketModal .ticket-modal-footer .btn-outline-secondary:hover { background: #e2e8f0; color: #475569; }
#ticketModal .ticket-modal-footer .btn-primary, #ticketModal .ticket-modal-footer .btn-success { border: none; background: linear-gradient(135deg, var(--secondary), var(--primary)); color: #ffffff; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); }
#ticketModal .ticket-modal-footer .btn-primary:hover, #ticketModal .ticket-modal-footer .btn-success:hover { opacity: 0.92; }
/* Barra di scorrimento del pannello (quando le voci non ci stanno): sottile, discreta, dentro il vetro; compare più
   visibile solo passandoci sopra, al posto della barra grigia larga del sistema */
@media (min-width: 992px) {
    html.myb-nav-rail:not(.myb-app) .myb-ctx { scrollbar-width: thin; scrollbar-color: transparent transparent; scrollbar-gutter: auto; }
    html.myb-nav-rail:not(.myb-app) .myb-ctx:hover { scrollbar-color: rgba(88, 38, 121, 0.28) transparent; }
    html.myb-nav-rail:not(.myb-app) .myb-ctx::-webkit-scrollbar { width: 8px; }
    html.myb-nav-rail:not(.myb-app) .myb-ctx::-webkit-scrollbar-track { margin: 24px 0; background: transparent; }
    html.myb-nav-rail:not(.myb-app) .myb-ctx::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 99px; background: transparent; background-clip: padding-box; }
    html.myb-nav-rail:not(.myb-app) .myb-ctx:hover::-webkit-scrollbar-thumb { background-color: rgba(88, 38, 121, 0.28); }
    html.myb-nav-rail:not(.myb-app) .myb-ctx::-webkit-scrollbar-thumb:hover { background-color: rgba(88, 38, 121, 0.45); }
}
/* in fondo al pannello una sfumatura, solo se ci sono altre voci sotto (MYB.NavRail.js .is-more-below) */
@media (min-width: 992px) {
    html.myb-nav-rail:not(.myb-app) .myb-ctx.is-more-below::after { content: ''; position: sticky; bottom: -16px; flex: 0 0 36px; margin: -36px -12px -16px; pointer-events: none;
        background: linear-gradient(rgba(246, 244, 248, 0), rgba(246, 244, 248, 0.95)); border-radius: 0 0 24px 24px; }
}
/* scorrendo il pannello, il selettore di sezione resta in cima */
@media (min-width: 992px) { .myb-ctx > .myb-ctx-switch { position: sticky; top: 0; z-index: 2; } }
/* Pannello: selettore in cima e viste in fondo fermi, scorrono solo le voci in mezzo (.myb-ctx-body); dove ci sono altre
   voci sopra o sotto il bordo sfuma (maschera, MYB.NavRail.js .is-more-above/.is-more-below), barra sottile solo al passaggio */
@media (min-width: 992px) {
    html.myb-nav-rail:not(.myb-app) .myb-ctx { overflow: hidden; }
    html.myb-nav-rail:not(.myb-app) .myb-ctx.is-more-below::after { display: none; }
    .myb-ctx > .myb-ctx-switch, .myb-ctx > .myb-ctx-head { position: static; flex: 0 0 auto; }
    .myb-ctx-body, .myb-ctx > .myb-ctx-bottom { --ft: 0px; --fb: 0px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: transparent transparent;
        -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 var(--ft), #000 calc(100% - var(--fb)), transparent 100%);
        mask-image: linear-gradient(to bottom, transparent 0, #000 var(--ft), #000 calc(100% - var(--fb)), transparent 100%); transition: --ft 0.2s, --fb 0.2s; }
    .myb-ctx-body { flex: 1 1 auto; margin: 0 -6px; padding: 0 6px; }
    .myb-ctx > .myb-ctx-bottom { flex: 0 1 auto; max-height: 46%; margin: 0 -6px; padding: 12px 6px 0; border-top: 1px solid rgba(15, 23, 42, 0.06); }
    .myb-ctx-body.is-more-above, .myb-ctx > .myb-ctx-bottom.is-more-above { --ft: 28px; }
    .myb-ctx-body.is-more-below, .myb-ctx > .myb-ctx-bottom.is-more-below { --fb: 36px; }
    .myb-ctx-body:hover, .myb-ctx > .myb-ctx-bottom:hover { scrollbar-color: rgba(88, 38, 121, 0.28) transparent; }
    .myb-ctx-body::-webkit-scrollbar, .myb-ctx > .myb-ctx-bottom::-webkit-scrollbar { width: 6px; }
    .myb-ctx-body::-webkit-scrollbar-thumb, .myb-ctx > .myb-ctx-bottom::-webkit-scrollbar-thumb { border-radius: 99px; background: transparent; }
    .myb-ctx-body:hover::-webkit-scrollbar-thumb, .myb-ctx > .myb-ctx-bottom:hover::-webkit-scrollbar-thumb { background: rgba(88, 38, 121, 0.28); }
}
@property --ft { syntax: '<length>'; inherits: false; initial-value: 0px; }
@property --fb { syntax: '<length>'; inherits: false; initial-value: 0px; }
/* Le viste non scorrono mai se c'è posto: a cedere spazio sono prima le voci (corpo); le viste scorrono solo oltre il 46% */
@media (min-width: 992px) {
    .myb-ctx-body { flex: 1 1 0; }
    .myb-ctx > .myb-ctx-bottom { flex: 0 0 auto; }
}
/* …senza tetto fisso al 46%: le viste prendono tutto quello che serve; se lo spazio non basta, prima si restringono le
   voci (fino a ~3 righe), solo dopo scorrono anche le viste */
@media (min-width: 992px) {
    .myb-ctx-body { flex: 1 1 auto; min-height: 140px; }
    .myb-ctx > .myb-ctx-bottom { flex: 0 0.001 auto; max-height: none; }
}
/* Tela col filo leggero del menu: anello viola tenue fuori e luce bianca dentro; la linguetta del titolo prende lo stesso
   filo sui lati e sulla curva (drop-shadow segue la forma) e copre il filo della tela sotto di sé, così il bordo è unico */
@media (min-width: 992px) {
    html.myb-nav-rail:not(.myb-app) .page-content { box-shadow: 0 0 0 1px rgba(76, 29, 149, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.7), 0 12px 32px -18px rgba(76, 29, 149, 0.18) !important; }
    html.myb-nav-rail:not(.myb-app) .myb-canvas-title { z-index: 1; height: calc(var(--tab-h) + 2px);
        filter: drop-shadow(-1px 0 0 rgba(76, 29, 149, 0.08)) drop-shadow(0 -1px 0 rgba(76, 29, 149, 0.08)) drop-shadow(1px 0 0 rgba(76, 29, 149, 0.08)); }
    html.myb-nav-rail:not(.myb-app) .myb-canvas-title::after { height: calc(100% - 2px); bottom: 2px; }
}
/* la curva della linguetta scende fino in fondo (linguetta alta tab-h + 2px), così copre il filo della tela senza fessure */
@media (min-width: 992px) {
    html.myb-nav-rail:not(.myb-app) .myb-canvas-title::after { bottom: 0; height: 100%; clip-path: path('M0 0 C 20 0 20 64 48 64 L 48 66 L 0 66 Z'); }
}
/* Etichette veloci nel pannello (elenchi CRM): pillole come in scheda, categorie col segnalibro, attive piene; in fondo
   alle voci, subito sopra le viste */
@media (min-width: 992px) {
    .myb-ctx-tags { margin-top: auto; padding-top: 8px; }
    .myb-ctx-tags .myb-ctx-sub small { font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--primary, #582679); }
    .myb-ctx-tagwrap { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 6px 4px; }
    .myb-ctx-tag { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; height: 28px; padding: 0 10px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.7);
        box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.07); font-size: 0.857rem; font-weight: 600; color: #334155; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; transition: background 0.12s, box-shadow 0.12s; }
    .myb-ctx-tag > span { color: #94a3b8; }
    .myb-ctx-tag.is-cat > i { font-size: 12px; color: #64748b; }
    .myb-ctx-tag:hover { background: #ffffff; box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12); }
    .myb-ctx-tag.is-on { background: var(--primary, #582679); box-shadow: none; color: #ffffff; }
    .myb-ctx-tag.is-on > span, .myb-ctx-tag.is-on > i { color: rgba(255, 255, 255, 0.75); }
    .myb-ctx-tag.is-more { background: none; box-shadow: none; color: #64748b; }
    .myb-ctx-tag:focus-visible { outline: 2px solid var(--primary, #582679); outline-offset: 2px; }
}
@media (min-width: 992px) { .myb-ctx-body { display: flex; flex-direction: column; } .myb-ctx-body > * { flex: 0 0 auto; } }
/* Filo della tela uniforme (sostituisce drop-shadow, che sulla curva e sui lati rendeva spessori diversi): stesso anello
   box-shadow su tela e linguetta (la linguetta nasconde il suo lato basso con clip-path e copre il filo della tela sotto
   di sé), la curva disegnata in SVG con lo stesso colore e spessore */
@media (min-width: 992px) {
    html.myb-nav-rail:not(.myb-app) { --canvas-line: rgba(76, 29, 149, 0.11); }
    html.myb-nav-rail:not(.myb-app) .page-content { box-shadow: 0 0 0 1px var(--canvas-line), 0 12px 32px -18px rgba(76, 29, 149, 0.18) !important; }
    html.myb-nav-rail:not(.myb-app) .myb-canvas-title { filter: none; height: calc(var(--tab-h) + 1px); box-shadow: 0 0 0 1px var(--canvas-line); clip-path: inset(-2px -60px 0 -2px); }
    html.myb-nav-rail:not(.myb-app) .myb-canvas-title::after { left: calc(100% - 1px); bottom: 0; width: 49px; height: 100%; clip-path: none;
        background: no-repeat bottom left / 49px 65px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='49' height='65'%3E%3Cpath d='M0 0 C20 0 20 64 49 64 L49 65 L0 65 Z' fill='%23f7f8fb'/%3E%3Cpath d='M0 -0.5 C20 -0.5 20 63.5 49 63.5' fill='none' stroke='%234c1d95' stroke-opacity='0.11' stroke-width='1'/%3E%3C/svg%3E"); }
}
/* filo un po' più deciso: si legge uguale anche dove cade l'ombra del pannello */
@media (min-width: 992px) {
    html.myb-nav-rail:not(.myb-app) { --canvas-line: rgba(76, 29, 149, 0.15); }
    html.myb-nav-rail:not(.myb-app) .myb-canvas-title::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='49' height='65'%3E%3Cpath d='M0 0 C20 0 20 64 49 64 L49 65 L0 65 Z' fill='%23f7f8fb'/%3E%3Cpath d='M0 -0.5 C20 -0.5 20 63.5 49 63.5' fill='none' stroke='%234c1d95' stroke-opacity='0.15' stroke-width='1'/%3E%3C/svg%3E"); }
}
/* .page-container scorre (overflow:auto) e tagliava il filo esterno della tela su lati e fondo: filo INTERNO, mai tagliato.
   La linguetta ha il filo interno solo su sinistra, alto e destra; la curva SVG parte e arriva sulla stessa riga interna */
@media (min-width: 992px) {
    html.myb-nav-rail:not(.myb-app) .page-content { box-shadow: inset 0 0 0 1px var(--canvas-line), 0 12px 32px -18px rgba(76, 29, 149, 0.18) !important; }
    html.myb-nav-rail:not(.myb-app) .myb-canvas-title { clip-path: none; box-shadow: inset 1px 0 0 var(--canvas-line), inset 0 1px 0 var(--canvas-line), inset -1px 0 0 var(--canvas-line); }
    html.myb-nav-rail:not(.myb-app) .myb-canvas-title::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='49' height='65'%3E%3Cpath d='M0 0 C20 0 20 64 49 64 L49 65 L0 65 Z' fill='%23f7f8fb'/%3E%3Cpath d='M0 0.5 C20 0.5 20 64.5 49 64.5' fill='none' stroke='%234c1d95' stroke-opacity='0.15' stroke-width='1'/%3E%3C/svg%3E"); }
}
/* "Fantasma" del pannello della pagina di prima, solo per il raccordo sezione → nomi (MYB.NavRail.js) */
.myb-ctx-ghost { display: none; }
@media (min-width: 992px) {
    html.myb-nav-rail:not(.myb-app) .myb-ctx-ghost { position: fixed; z-index: 1040; top: var(--nav-gap); bottom: var(--nav-gap); left: var(--nav-gap); display: block; width: calc(76px + var(--ctx-w));
        border-radius: 24px; background: var(--glass); -webkit-backdrop-filter: blur(30px) saturate(1.6); backdrop-filter: blur(30px) saturate(1.6);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 0 0 1px rgba(76, 29, 149, 0.08), 0 12px 32px -14px rgba(76, 29, 149, 0.4); pointer-events: none; }
}
/* uscendo da una sezione verso una pagina senza sottomenu: l'alone dietro il vetro sfuma insieme al pannello */
@media (min-width: 992px) {
    html.myb-nav-rail:not(.myb-app) .myb-rail-glow { transition: opacity 0.2s ease; }
}
/* Impersonazione: pulsante compatto con l'icona di uscita e l'ID dell'utente in uso (nome nel suggerimento) */
html.myb-shell:not(.myb-app) .page-header .navbar-nav li > button.myb-embody-end { gap: 6px; padding: 0 12px !important; font-variant-numeric: tabular-nums; }
/* v3 a binario: un po' d'aria tra il bordo alto della tela e il contenuto (la capsula non ci si appoggia sopra) */
@media (min-width: 992px) { html.myb-nav-rail:not(.myb-app) .page-content { padding-top: 22px !important; } }
/* Capsula in alto a destra con più respiro: linguetta del titolo più alta (70px) e capsula staccata dal bordo destro;
   la curva SVG è ridisegnata per la nuova altezza */
@media (min-width: 992px) {
    html.myb-nav-rail:not(.myb-app) { --tab-h: 70px; }
    html.myb-nav-rail:not(.myb-app) .page-header { top: 6px !important; right: 6px; }
    html.myb-nav-rail:not(.myb-app) .myb-canvas-title::after { background-size: 49px 71px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='49' height='71'%3E%3Cpath d='M0 0 C20 0 20 70 49 70 L49 71 L0 71 Z' fill='%23f7f8fb'/%3E%3Cpath d='M0 0.5 C20 0.5 20 70.5 49 70.5' fill='none' stroke='%234c1d95' stroke-opacity='0.15' stroke-width='1'/%3E%3C/svg%3E"); }
}
/* Lanciatore: sotto le nostre app i collegamenti rapidi dell'agenzia (Page::GetHeader, QUICK_LINK), a tutta riga */
.myb-launch-sub { grid-column: 1 / -1; margin: 8px 8px 2px; padding-top: 10px; border-top: 1px solid rgba(15, 23, 42, 0.07); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #64748b; }
.myb-launch-links { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow-y: auto; scrollbar-width: thin; }
.myb-launch-link { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 6px 10px; border-radius: 12px; color: #1e293b !important; text-decoration: none !important; }
.myb-launch-link:hover { background: #f1f5f9; }
.myb-launch-link > i { flex: 0 0 auto; font-size: 18px !important; color: #94a3b8; }
.myb-launch-link > span { display: flex; flex-direction: column; min-width: 0; font-size: 0.9rem; font-weight: 600; line-height: 1.2; }
.myb-launch-link small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 0.75rem; font-weight: 500; color: #94a3b8; }
/* Capsula in alto a destra: tutte le icone con lo stesso peso (Phosphor Regular), le Material piene arrivavano in Bold */
html.myb-ph .page-header .navbar-nav .ph-bold, html.myb-ph .page-header .navbar-nav .ph-bold::before { font-family: "Phosphor" !important; }
/* Capsula centrata in altezza nella fascia sopra la tela (dal bordo della finestra al filo della tela), non sulla linguetta */
@media (min-width: 992px) { html.myb-nav-rail:not(.myb-app) .page-header { top: -2px !important; } }
/* Lanciatore con switch Strumenti | Agenzia: lo switch a tutta riga in cima, i riquadri in griglia, i collegamenti in lista */
.myb-launch-switch { grid-column: 1 / -1; display: flex; gap: 2px; margin: 2px 2px 6px; padding: 3px; border-radius: 12px; background: #f1f5f9; }
.myb-launch-switch button { flex: 1 1 0; height: 32px; border: 0; border-radius: 9px; background: none; font-size: 0.86rem; font-weight: 700; color: #64748b; cursor: pointer; }
.myb-launch-switch button.is-on { background: #ffffff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1); color: var(--primary, #582679); }
.myb-launch-pane { grid-column: 1 / -1; }
.myb-launch-pane.is-apps:not([hidden]) { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.myb-launch-pane[hidden] { display: none !important; }
.myb-launch-pane .myb-launch-links { max-height: 320px; }
/* Capsula in alto a destra più staccata dal fondo (v3 a binario): bordo viola tenue come menu e tela, ombra più piena
   con la tinta del marchio e un filo di luce in alto, come il pannello del menu */
@media (min-width: 992px) {
    html.myb-nav-rail:not(.myb-app) .page-header li:has(.myb-search-pill),
    html.myb-nav-rail:not(.myb-app) .page-header li:has(#notifTrigger),
    html.myb-nav-rail:not(.myb-app) .page-header .myb-cap-act,
    html.myb-nav-rail:not(.myb-app) .page-header .myb-launcher,
    html.myb-nav-rail:not(.myb-app) .page-header .nav-profile { border-color: rgba(76, 29, 149, 0.12) !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 14px 30px -14px rgba(76, 29, 149, 0.45), 0 2px 6px -2px rgba(15, 23, 42, 0.08); }
}
/* Piè di pagina fuori dalla tela, sul fondo, discreto */
@media (min-width: 992px) {
    html.myb-nav-rail:not(.myb-app) .page-footer { margin: 0; padding: 14px 24px 4px !important; border: 0 !important; background: transparent !important; box-shadow: none !important; font-size: 0.8rem; color: #94a3b8; }
}
/* Capsula: stacco più deciso (il primo tentativo era troppo leggero) */
@media (min-width: 992px) {
    html.myb-nav-rail:not(.myb-app) .page-header li:has(.myb-search-pill),
    html.myb-nav-rail:not(.myb-app) .page-header li:has(#notifTrigger),
    html.myb-nav-rail:not(.myb-app) .page-header .myb-cap-act,
    html.myb-nav-rail:not(.myb-app) .page-header .myb-launcher,
    html.myb-nav-rail:not(.myb-app) .page-header .nav-profile { border-color: rgba(76, 29, 149, 0.2) !important;
        box-shadow: inset 0 1px 0 #ffffff, 0 18px 36px -14px rgba(76, 29, 149, 0.55), 0 4px 10px -4px rgba(76, 29, 149, 0.18) !important; }
    html.myb-nav-rail:not(.myb-app) .page-header li:has(.myb-search-pill) { border-left-color: rgba(76, 29, 149, 0.2) !important; }
    html.myb-nav-rail:not(.myb-app) .page-header .nav-profile { border-right-color: rgba(76, 29, 149, 0.2) !important; }
}
/* Menu del profilo: allineato al bordo destro della capsula, anche nella barra del telefono (una regola del tema gli dava left:15px e usciva dallo schermo) */
html.myb-shell .page-header .nav-profile .dropdown-menu { right: 0 !important; left: auto !important; transform: none !important; min-width: 220px; }
/* Le mie sessioni (views/user_sessions.php, .uss-*): card v3, il dispositivo in uso in evidenza, gli altri in lista con
   "Disconnetti", le sessioni chiuse ripiegate; a lato (admin) chi è online e lo sblocco account */
.uss-card { margin-bottom: 18px; padding: 20px 22px; border: 1px solid rgba(15, 23, 42, 0.06); border-radius: 20px; background: #ffffff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 28px -18px rgba(15, 23, 42, 0.18); }
.uss-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.uss-card h2, .uss-closed summary h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.07rem; font-weight: 700; color: #0f172a; text-transform: none; letter-spacing: -0.01em; }
.uss-sub { margin: 2px 0 10px; font-size: 0.86rem; color: #64748b; }
.uss-count { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 22px; padding: 0 8px; border-radius: 999px; background: #f1f5f9; font-size: 0.8rem; font-weight: 700; color: #475569; font-variant-numeric: tabular-nums; }
.uss-count:empty { display: none; }
.uss-list { margin: 0; padding: 0; list-style: none; }
.uss-row { display: flex; align-items: center; gap: 14px; padding: 12px 4px; border-top: 1px solid rgba(15, 23, 42, 0.06); }
.uss-list > .uss-row:first-child { border-top: 0; }
.uss-row.is-current { padding: 14px 16px; border: 0; border-radius: 16px; background: color-mix(in srgb, var(--primary, #582679) 6%, #ffffff); }
.uss-dev, .uss-av { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px; background: #f1f5f9; font-size: 18px; color: #475569; }
.uss-row.is-current .uss-dev { background: linear-gradient(135deg, var(--secondary), var(--primary)); color: #ffffff; box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.3); }
.uss-av { width: 36px; height: 36px; border-radius: 50%; font-size: 0.78rem; font-weight: 700; color: var(--primary, #582679); background: color-mix(in srgb, var(--primary, #582679) 10%, #ffffff); }
.uss-main { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; }
.uss-main b { font-size: 0.95rem; font-weight: 600; color: #1e293b; }
.uss-main small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 0.8rem; color: #64748b; }
.uss-main code { padding: 0; background: none; font-size: 0.78rem; color: #475569; }
.uss-live { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2); vertical-align: 1px; }
.uss-btn { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border: 0; border-radius: 10px; background: linear-gradient(135deg, var(--secondary), var(--primary)); font-size: 0.85rem; font-weight: 600; color: #ffffff !important; text-decoration: none !important; cursor: pointer; }
.uss-btn.is-ghost { border: 1px solid #e2e8f0; background: #ffffff; color: #475569 !important; }
.uss-btn.is-ghost:hover { border-color: #fecaca; background: #fef2f2; color: #b91c1c !important; }
.uss-btn.is-ghost.is-icon { width: 34px; padding: 0; justify-content: center; }
.uss-btn.is-ghost.is-icon:hover { border-color: #e2e8f0; background: #f1f5f9; color: #1e293b !important; }
.uss-btn.is-danger { border: 1px solid #fecaca; background: #fef2f2; color: #b91c1c !important; }
.uss-btn.is-danger:hover { background: #fee2e2; }
.uss-btn:focus-visible { outline: 2px solid var(--primary, #582679); outline-offset: 2px; }
.uss-btn[disabled] { opacity: 0.6; }
.uss-empty { padding: 14px 4px; font-size: 0.88rem; color: #64748b; }
.uss-empty .fa-circle-check { margin-right: 6px; color: #22c55e; }
.uss-closed { padding: 0; }
.uss-closed summary { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; list-style: none; cursor: pointer; }
.uss-closed summary::-webkit-details-marker { display: none; }
.uss-closed summary > i { color: #94a3b8; transition: transform 0.2s; }
.uss-closed[open] summary > i { transform: rotate(180deg); }
.uss-closed .uss-list { max-height: 360px; padding: 0 22px 14px; overflow-y: auto; }
.uss-list.is-closed .uss-row { opacity: 0.7; }
.uss-note { margin: 4px 6px 0; font-size: 0.8rem; color: #94a3b8; }
.uss-note i { margin-right: 6px; }
.uss-unlock { display: flex; gap: 8px; }
.uss-unlock .form-control { height: 38px; border-radius: 10px; }
.uss-result { margin-top: 8px; font-size: 0.85rem; }
.uss-result.is-ok { color: #15803d; } .uss-result.is-err { color: #b91c1c; } .uss-result.is-warn { color: #b45309; }
.uss-skel { height: 70px; border-radius: 16px; background: #f1f5f9; animation: myb-skel-pulse 1.2s ease-in-out infinite alternate; }
/* Binario compatto con lo stesso respiro del menu aperto (passo ~50px invece di 42): voci 44×44, 6px tra l'una e
   l'altra, separatori più ariosi; solo su finestre molto basse si stringe, e se non ci sta la lista scorre con la sfumatura.
   L'anello di fuoco sul pulsante in fondo solo da tastiera */
@media (min-width: 992px) {
    html.myb-nav-rail:not(.myb-app) .myb-rail-item { width: 46px; height: 44px; border-radius: 13px; }
    html.myb-nav-rail:not(.myb-app) .myb-rail-list { gap: 6px; }
    html.myb-nav-rail:not(.myb-app) .myb-rail-sep { margin: 8px 0; }
    html.myb-nav-rail:not(.myb-app) .myb-rail-logo { margin-bottom: 16px; }
    .myb-rail-item:focus:not(:focus-visible) { outline: none; box-shadow: none; }
}
@media (min-width: 992px) and (max-height: 760px) {
    html.myb-nav-rail:not(.myb-app) .myb-rail-item { height: 40px; }
    html.myb-nav-rail:not(.myb-app) .myb-rail-list { gap: 3px; }
    html.myb-nav-rail:not(.myb-app) .myb-rail-sep { margin: 5px 0; }
}
/* ── Dashboard v3 (views/home_v3.php, MYB.Dashboard.js, DESIGN.md §40): fogli bianchi, una frase in cima, l'agenda di oggi,
   "Da fare adesso" a sinistra (il fuoco), team / andamento / da sistemare a destra. Ambra per l'urgente, mai rosso */
.db3 { --db-ink: #0f172a; --db-text: #1e293b; --db-mute: #64748b; --db-line: rgba(15, 23, 42, 0.07); --db-urgent: #d97706; padding-top: 4px; }
.db3-hello { margin: 2px 4px 18px; }
.db3-sentence { max-width: 980px; margin: 0; font-size: 1.43rem; font-weight: 600; line-height: 1.4; letter-spacing: -0.01em; color: var(--db-ink); text-wrap: balance; }
.db3-sentence b { font-weight: 800; color: var(--primary, #582679); }
.db3-meta { display: flex; align-items: center; gap: 10px; margin: 6px 0 0; font-size: 0.857rem; color: var(--db-mute); }
.db3-card { margin-bottom: 18px; padding: 18px 20px; border: 1px solid rgba(15, 23, 42, 0.06); border-radius: 20px; background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 28px -18px rgba(15, 23, 42, 0.18); }
.db3-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.db3-head :is(h2, h3) { margin: 0; font-size: 1.07rem; font-weight: 700; letter-spacing: -0.01em; text-transform: none; color: var(--db-ink); }
.db3-head :is(h2, h3)::first-letter { text-transform: uppercase; }
.db3-head .db3-link { margin-left: auto; }
.db3-link { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 0; border: 0; background: none; font-size: 0.857rem; font-weight: 600; color: var(--primary, #582679) !important; text-decoration: none !important; cursor: pointer; }
.db3-link:hover { text-decoration: underline !important; }
.db3-link i { font-size: 0.75em; }
.db3-chip { padding: 2px 9px; border-radius: 999px; background: #f1f5f9; font-size: 0.75rem; font-weight: 700; color: #475569; }
.db3-chip:empty { display: none; }
.db3-count { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; min-width: 28px; height: 24px; padding: 0 8px; border-radius: 999px; background: #f1f5f9;
    font-size: 0.857rem; font-weight: 700; color: #334155; font-variant-numeric: tabular-nums; }
.db3-count:empty { display: none; }
.db3-empty { margin: 4px 0; font-size: 0.929rem; color: var(--db-mute); }
.db3-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); gap: 18px; align-items: start; }
.db3-grid > * > .db3-card:last-child, .db3-grid > .db3-card { margin-bottom: 0; }
.db3-side { display: flex; flex-direction: column; gap: 18px; }
.db3-side > .db3-card { margin-bottom: 0; }
/* agenda: una striscia di card, l'evento in corso segnato, i passati sbiaditi */
.db3-strip { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; padding-bottom: 2px; }
.db3-event { display: flex; flex: 0 0 210px; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; background: #f8fafc; box-shadow: inset 0 0 0 1px var(--db-line);
    color: var(--db-text) !important; text-decoration: none !important; scroll-snap-align: start; }
.db3-event:hover { background: #f1f5f9; }
.db3-event b { overflow: hidden; font-size: 0.929rem; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.db3-event small { overflow: hidden; font-size: 0.8rem; color: var(--db-mute); white-space: nowrap; text-overflow: ellipsis; }
.db3-event-time { font-size: 0.8rem; font-weight: 700; color: var(--primary, #582679); font-variant-numeric: tabular-nums; }
.db3-event.is-past { opacity: 0.55; }
.db3-event.is-live, .db3-event.is-next { background: color-mix(in srgb, var(--primary, #582679) 6%, #ffffff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary, #582679) 22%, transparent); }
.db3-live { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2); vertical-align: 1px; }
/* Da fare: una riga per segnale, una sola aperta, i record con l'azione principale */
.db3-sigs, .db3-items, .db3-health { margin: 0; padding: 0; list-style: none; }
.db3-sig { border-top: 1px solid var(--db-line); }
.db3-sigs > .db3-sig:first-child { border-top: 0; }
.db3-sig-btn { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 6px; border: 0; border-radius: 12px; background: none; text-align: left;
    color: var(--db-text) !important; text-decoration: none !important; cursor: pointer; }
button.db3-sig-btn:hover, a.db3-sig-btn:hover { background: #f8fafc; }
.db3-sig-btn:focus-visible, .db3-btn:focus-visible, .db3-link:focus-visible, .db3-event:focus-visible { outline: 2px solid var(--primary, #582679); outline-offset: 2px; }
.db3-dot { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; }
.db3-dot.is-urgent { background: var(--db-urgent); box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.16); }
.db3-sig-text { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; }
.db3-sig-text b { font-size: 0.964rem; font-weight: 600; color: var(--db-text); }
.db3-sig-text small { font-size: 0.82rem; color: var(--db-mute); }
.db3-sig-text small.is-late { font-weight: 700; color: #b45309; }
.db3-sig-eur { display: flex; flex: 0 0 auto; flex-direction: column; align-items: flex-end; font-size: 0.893rem; font-weight: 700; color: var(--db-text); font-variant-numeric: tabular-nums; }
.db3-sig-eur small { font-size: 0.72rem; font-weight: 500; color: var(--db-mute); }
.db3-chev { flex: 0 0 auto; font-size: 12px; color: #94a3b8; transition: transform 0.2s ease; }
.db3-sig.is-open .db3-chev { transform: rotate(180deg); }
.db3-sig.is-error .db3-sig-text b { color: var(--db-mute); }
.db3-sig-body { padding: 0 6px 12px 28px; }
.db3-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; }
.db3-item:nth-child(odd) { background: #f8fafc; }
.db3-item-main { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; }
.db3-item-main b { overflow: hidden; font-size: 0.929rem; font-weight: 600; color: var(--db-text); white-space: nowrap; text-overflow: ellipsis; }
.db3-item-main small { overflow: hidden; font-size: 0.8rem; color: var(--db-mute); white-space: nowrap; text-overflow: ellipsis; }
.db3-item-when { display: flex; flex: 0 0 auto; flex-direction: column; align-items: flex-end; font-size: 0.8rem; color: var(--db-mute); }
.db3-item-when em { font-style: normal; font-weight: 700; color: var(--db-text); }
.db3-item-acts { display: flex; flex: 0 0 auto; gap: 6px; }
.db3-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 10px; background: #ffffff; box-shadow: inset 0 0 0 1px #e2e8f0;
    font-size: 0.857rem; font-weight: 600; color: #334155 !important; text-decoration: none !important; white-space: nowrap; }
.db3-btn:hover { background: #f1f5f9; }
.db3-btn.is-primary { background: linear-gradient(135deg, var(--secondary), var(--primary)); box-shadow: none; color: #ffffff !important; }
.db3-btn.is-primary:hover { opacity: 0.92; }
.db3-all { margin: 8px 0 0 12px; }
.db3-more { margin: 6px 6px 0; }
.db3-inpari { margin: 12px 6px 0; padding-top: 12px; border-top: 1px solid var(--db-line); font-size: 0.857rem; color: var(--db-mute); }
.db3-inpari i { margin-right: 4px; color: #16a34a; }
.db3-clear { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 16px; background: #f0fdf4; }
.db3-clear > i { font-size: 28px; color: #16a34a; }
.db3-clear b { display: block; font-size: 1rem; color: #14532d; }
.db3-clear small { font-size: 0.857rem; color: #166534; }
/* team: arretrato per persona */
[data-db-team] { overflow-x: auto; } /* sui telefoni stretti la tabella scorre dentro la card, non sposta la pagina */
.db3-team { width: 100%; border-collapse: collapse; font-size: 0.893rem; }
.db3-team th, .db3-team td { padding: 7px 6px; border-top: 1px solid var(--db-line); text-align: center; font-weight: 500; }
.db3-team thead th { border-top: 0; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--db-mute); }
.db3-team th[scope="row"], .db3-team thead th:first-child { text-align: left; }
.db3-team th[scope="row"] { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--db-text); }
.db3-team tr.is-clear th[scope="row"] { color: var(--db-mute); font-weight: 500; }
.db3-av { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%;
    background: color-mix(in srgb, var(--primary, #582679) 10%, #ffffff); font-size: 0.7rem; font-weight: 700; color: var(--primary, #582679); }
.db3-num { display: inline-block; min-width: 26px; padding: 1px 7px; border-radius: 999px; background: #f1f5f9; font-weight: 700; color: #334155; font-variant-numeric: tabular-nums; }
.db3-num.is-high { background: #fef3c7; color: #92400e; }
.db3-num.is-zero { background: none; color: #cbd5e1; }
/* andamento */
.db3-trend-say { margin: 0 0 4px; font-size: 0.929rem; color: var(--db-text); }
.db3-trend-say > .db3-trend-k { display: block; margin-bottom: 2px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--db-mute); }
.db3-pct { margin-left: 4px; padding: 1px 7px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; }
.db3-pct.is-up { background: #dcfce7; color: #166534; }
.db3-pct.is-down { background: #fef3c7; color: #92400e; }
.db3-chart { min-height: 170px; margin: 0 -8px; }
/* da sistemare */
.db3-hrow { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--db-line); }
.db3-health > .db3-hrow:first-child { border-top: 0; padding-top: 0; }
.db3-hrow > span { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; font-size: 0.929rem; }
.db3-hrow small { font-size: 0.8rem; color: var(--db-mute); }
.db3-hrow.is-urgent b { color: #b45309; }
/* scheletri */
.db3-skel { display: block; border-radius: 12px; background: #f1f5f9; animation: myb-skel-pulse 1.2s ease-in-out infinite alternate; }
.db3-skel.is-line { width: min(620px, 90%); height: 30px; }
.db3-skel.is-strip { width: 100%; height: 74px; }
.db3-skel.is-rows { height: 220px; }
.db3-skel.is-chart { height: 200px; }
@media (prefers-reduced-motion: reduce) { .db3-skel { animation: none; } .db3-chev { transition: none; } }
@media (max-width: 1199px) { .db3-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 767px) {
    .db3-sentence { font-size: 1.15rem; }
    .db3-card { padding: 14px; border-radius: 16px; }
    .db3-item { flex-wrap: wrap; }
    .db3-item-acts { width: 100%; }
    .db3-item-acts .db3-btn { flex: 1 1 0; justify-content: center; height: 40px; }
    .db3-sig-eur small { display: none; }
    .db3-sig-body { padding-left: 6px; }
    .db3-event { flex-basis: 76%; }
}
/* Dashboard v3: fascia indicatori (al massimo 4), sotto la frase e prima dell'agenda */
.db3-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.db3-kpis[hidden] { display: none; }
.db3-kpi { display: flex; flex-direction: column; gap: 4px; min-height: 118px; padding: 16px 18px; border: 1px solid rgba(15, 23, 42, 0.06); border-radius: 20px; background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 28px -18px rgba(15, 23, 42, 0.18); color: var(--db-text) !important; text-decoration: none !important; transition: box-shadow 0.15s ease, transform 0.15s ease; }
a.db3-kpi:hover { box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 16px 34px -18px rgba(76, 29, 149, 0.3); transform: translateY(-1px); }
a.db3-kpi:focus-visible { outline: 2px solid var(--primary, #582679); outline-offset: 2px; }
.db3-kpi-label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--db-mute); }
.db3-kpi-value { font-size: 2rem; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; color: var(--db-ink); font-variant-numeric: tabular-nums; }
.db3-kpi-value em { margin-left: 2px; font-size: 1.1rem; font-style: normal; font-weight: 600; color: var(--db-mute); }
.db3-kpi-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: auto; font-size: 0.8rem; color: var(--db-mute); }
.db3-kpi-foot small { font-size: 0.8rem; }
.db3-kpi-foot b { color: var(--db-text); }
.db3-delta { padding: 1px 8px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.db3-delta.is-up { background: #dcfce7; color: #166534; }
.db3-delta.is-down { background: #fef3c7; color: #92400e; }
.db3-delta.is-flat { background: #f1f5f9; color: #475569; }
.db3-skel.is-kpi { height: 118px; border-radius: 20px; }
@media (max-width: 767px) { .db3-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .db3-kpi { min-height: 104px; padding: 12px 14px; } .db3-kpi-value { font-size: 1.6rem; } }
/* Dashboard v3: tasti rapidi "Nuovo …" sotto la frase, post-it personale, scelta del contatto per "Nuova attività" */
.db3-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.db3-quick-k { margin-right: 2px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--db-mute); }
.db3-quick-btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: #ffffff;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08), 0 2px 6px -3px rgba(15, 23, 42, 0.15); font-size: 0.893rem; font-weight: 600; color: var(--db-text); cursor: pointer; transition: box-shadow 0.15s ease, transform 0.15s ease; }
a.db3-quick-btn, a.db3-quick-btn:hover { color: var(--db-text); text-decoration: none; }
.db3-quick-btn i { color: var(--primary, #582679); }
.db3-quick-btn:hover { box-shadow: 0 0 0 1px rgba(76, 29, 149, 0.2), 0 6px 14px -6px rgba(76, 29, 149, 0.35); transform: translateY(-1px); }
.db3-quick-btn:focus-visible { outline: 2px solid var(--primary, #582679); outline-offset: 2px; }
.db3-quick-act { position: relative; }
.db3-pick { position: absolute; z-index: 30; top: calc(100% + 8px); left: 0; width: 300px; padding: 12px; border-radius: 16px; background: #ffffff;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08), 0 20px 44px -12px rgba(15, 23, 42, 0.25); }
.db3-pick[hidden] { display: none; }
.db3-pick label { display: block; margin: 0 0 6px; font-size: 0.8rem; font-weight: 700; color: var(--db-mute); }
.db3-pick .form-control { height: 38px; border-radius: 10px; }
.db3-pick-list { max-height: 260px; margin: 8px 0 0; padding: 0; overflow-y: auto; list-style: none; }
.db3-pick-list button { display: flex; flex-direction: column; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: none; text-align: left; cursor: pointer; }
.db3-pick-list button:hover, .db3-pick-list button:focus-visible { background: #f1f5f9; outline: none; }
.db3-pick-list b { font-size: 0.9rem; color: var(--db-text); }
.db3-pick-list small { font-size: 0.78rem; color: var(--db-mute); }
.db3-pick-hint { padding: 8px 10px; font-size: 0.85rem; color: var(--db-mute); }
/* ── Obiettivi di produzione (MYB.Goals.js, DESIGN.md §41): modulo nel profilo, barre con la tacca "dove dovresti essere
   oggi" e il ritmo (verde avanti/raggiunto, viola in linea, ambra indietro) */
.gl3-form { margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid rgba(15, 23, 42, 0.07); }
.gl3-rows { display: grid; gap: 12px; }
.gl3-row { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); align-items: center; gap: 4px 16px; }
.gl3-row label { margin: 0; font-size: 0.929rem; font-weight: 600; color: #1e293b; }
.gl3-ctl { display: flex; align-items: center; gap: 8px; }
.gl3-ctl input { width: 130px; }
.gl3-ctl select { width: 150px; }
.gl3-unit { font-weight: 700; color: #64748b; }
.gl3-hint { grid-column: 2; min-height: 1em; font-size: 0.8rem; color: #64748b; }
.gl3-days { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 16px; }
.gl3-days > span { width: 220px; font-size: 0.929rem; font-weight: 600; color: #1e293b; }
.gl3-days [role="group"] { display: flex; gap: 6px; }
.gl3-days button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: #f1f5f9; font-weight: 700; color: #64748b; cursor: pointer; }
.gl3-days button[aria-pressed="true"] { background: var(--primary, #582679); color: #ffffff; }
.gl3-days button:focus-visible, .gl3-seg button:focus-visible { outline: 2px solid var(--primary, #582679); outline-offset: 2px; }
.gl3-save { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.gl3-save small { font-size: 0.85rem; color: #64748b; }
.gl3-empty { margin: 4px 0 8px; font-size: 0.929rem; color: #64748b; }
.gl3-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.gl3-top small { font-size: 0.8rem; color: #64748b; }
.gl3-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 11px; background: #f1f5f9; }
.gl3-seg button { height: 30px; padding: 0 12px; border: 0; border-radius: 8px; background: none; font-size: 0.85rem; font-weight: 600; color: #64748b; cursor: pointer; }
.gl3-seg button[aria-pressed="true"] { background: #ffffff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1); color: var(--primary, #582679); }
.gl3-bars { display: grid; gap: 14px; margin: 0 0 10px; padding: 0; list-style: none; }
.gl3-bar-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 0.893rem; }
.gl3-bar-head b { font-weight: 600; color: #1e293b; }
.gl3-bar-head span { color: #64748b; font-variant-numeric: tabular-nums; }
.gl3-bar-head em { font-style: normal; font-weight: 700; color: #0f172a; }
.gl3-track { position: relative; height: 10px; margin: 6px 0 5px; border-radius: 999px; background: #eef1f5; }
.gl3-fill { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 999px; background: var(--primary, #582679); transition: width 0.4s ease; }
.gl3-mark { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; border-radius: 2px; background: #0f172a; opacity: 0.55; }
.gl3-bar-foot { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; color: #64748b; }
.gl3-pace { padding: 1px 8px; border-radius: 999px; font-weight: 700; }
.gl3-pct { margin-left: auto; font-variant-numeric: tabular-nums; }
.gl3-bar.is-ahead .gl3-fill, .gl3-bar.is-done .gl3-fill { background: #16a34a; }
.gl3-bar.is-ahead .gl3-pace, .gl3-bar.is-done .gl3-pace { background: #dcfce7; color: #166534; }
.gl3-bar.is-on .gl3-pace { background: color-mix(in srgb, var(--primary, #582679) 10%, #ffffff); color: var(--primary, #582679); }
.gl3-bar.is-behind .gl3-fill { background: #f59e0b; }
.gl3-bar.is-behind .gl3-pace { background: #fef3c7; color: #92400e; }
.db3-num.is-ok { background: #dcfce7; color: #166534; }
.db3-goal-cta { margin-left: 12px; }
@media (prefers-reduced-motion: reduce) { .gl3-fill { transition: none; } }
@media (max-width: 767px) { .gl3-row { grid-template-columns: 1fr; } .gl3-hint { grid-column: 1; } .gl3-days > span { width: 100%; } }
/* ── Dashboard a cartelle (DESIGN.md §40): la tela della pagina diventa trasparente e ogni sezione (.db3-folder) è una
   tela a sé; la prima sta sotto la linguetta del titolo, le altre hanno la loro linguetta (.db3-tab, 48px) con la stessa
   curva e lo stesso filo. Sotto i 992px e nell'app le linguette tornano titoli di sezione */
.db3-tab { display: flex; align-items: center; gap: 10px; margin: 22px 4px 12px; font-size: 1.15rem; font-weight: 800; letter-spacing: -0.015em; text-transform: none; color: #0f172a; }
.db3-tab i { font-size: 0.95em; color: var(--primary, #582679); }
.db3-folder[hidden] { display: none; }
@media (min-width: 992px) {
    html.myb-nav-rail:not(.myb-app) .page-content:has(.db3) { padding: 0 !important; background: transparent !important; box-shadow: none !important; }
    /* la prima cartella si attacca alla linguetta del titolo: niente stacco del main-wrapper (5px di fondo pagina) */
    html.myb-nav-rail:not(.myb-app) .page-content:has(.db3) .main-wrapper { padding-top: 0; }
    html.myb-nav-rail:not(.myb-app) .db3 { padding: 0; }
    html.myb-nav-rail:not(.myb-app) .db3-folder { position: relative; padding: 22px 24px 24px; border-radius: 24px; background: #f7f8fb;
        box-shadow: inset 0 0 0 1px var(--canvas-line), 0 12px 32px -18px rgba(76, 29, 149, 0.18); }
    html.myb-nav-rail:not(.myb-app) .db3-folder.is-first { border-top-left-radius: 0; }
    html.myb-nav-rail:not(.myb-app) .db3-folder:not(.is-first) { margin-top: 70px; border-top-left-radius: 0; }
    html.myb-nav-rail:not(.myb-app) .db3-tab { position: absolute; z-index: 1; top: -48px; left: 0; height: 49px; margin: 0; padding: 4px 10px 0 24px; border-radius: 20px 0 0 0; background: #f7f8fb;
        box-shadow: inset 1px 0 0 var(--canvas-line), inset 0 1px 0 var(--canvas-line), inset -1px 0 0 var(--canvas-line); white-space: nowrap; }
    html.myb-nav-rail:not(.myb-app) .db3-tab::after { content: ''; position: absolute; left: calc(100% - 1px); bottom: 0; width: 49px; height: 100%; background-size: 49px 49px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='49' height='49'%3E%3Cpath d='M0 0 C20 0 20 48 49 48 L49 49 L0 49 Z' fill='%23f7f8fb'/%3E%3Cpath d='M0 0.5 C20 0.5 20 48.5 49 48.5' fill='none' stroke='%234c1d95' stroke-opacity='0.15' stroke-width='1'/%3E%3C/svg%3E"); }
    html.myb-nav-rail:not(.myb-app) .db3-folder > .db3-card:last-child,
    html.myb-nav-rail:not(.myb-app) .db3-folder > .db3-kpis:last-child { margin-bottom: 0; }
}
.db3-grid.is-even { grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); }

/* Classifiche del mese: tre colonne, le prime cinque con medaglia ai primi tre, tu evidenziato (anche se sei fuori) */
.db3-boards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 18px; }
.db3-board { margin: 0; }
.db3-board .db3-head { margin-bottom: 2px; }
.db3-board-note { margin: 0 0 10px; font-size: 0.8rem; color: var(--db-mute); }
.db3-ranks { margin: 0; padding: 0; list-style: none; }
.db3-rank { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 6px; border-top: 1px solid var(--db-line); }
.db3-ranks > .db3-rank:first-child { border-top: 0; }
.db3-rank.is-me { margin: 0 -6px; padding-inline: 12px; border-radius: 12px; border-color: transparent; background: color-mix(in srgb, var(--primary, #582679) 7%, #ffffff); }
.db3-rank.is-me + .db3-rank { border-color: transparent; }
.db3-pos { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 999px; background: #f1f5f9; font-size: 0.8rem; font-weight: 800; color: #475569; font-variant-numeric: tabular-nums; }
.db3-pos.is-p1 { background: linear-gradient(135deg, #fde68a, #f59e0b); color: #78350f; }
.db3-pos.is-p2 { background: linear-gradient(135deg, #f1f5f9, #94a3b8); color: #1e293b; }
.db3-pos.is-p3 { background: linear-gradient(135deg, #fed7aa, #c2773a); color: #5b2a07; }
.db3-rank-name { overflow: hidden; font-size: 0.93rem; font-weight: 600; color: var(--db-text); white-space: nowrap; text-overflow: ellipsis; }
.db3-rank-name small { margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: var(--primary, #582679); font-size: 0.7rem; font-weight: 700; color: #fff; }
.db3-rank-val { display: flex; flex-direction: column; align-items: flex-end; font-size: 1.05rem; font-weight: 800; color: var(--db-ink); font-variant-numeric: tabular-nums; line-height: 1.15; }
.db3-rank-val b { font-weight: 800; }
.db3-rank-val em { font-style: normal; font-size: 0.8em; font-weight: 700; color: var(--db-mute); }
.db3-rank-val small { font-size: 0.72rem; font-weight: 500; color: var(--db-mute); }
.db3-rank-gap { padding: 0 0 0 14px; line-height: 1; color: #94a3b8; }

/* ── Note in stile Apple Notes (MYB.Notes.js): elenco con titolo dalla prima riga, ora e anteprima; editor a tutta card.
   Accento giallo delle note di Apple, solo su icone e link: il foglio resta bianco */
.nt3 { --nt-accent: #c99400; display: flex; flex-direction: column; min-height: 0; }
.nt3-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.nt3-head h3 { margin: 0; font-size: 1.07rem; font-weight: 700; letter-spacing: -0.01em; text-transform: none; color: #0f172a; }
.nt3-count { font-size: 0.85rem; font-weight: 600; color: #94a3b8; }
.nt3-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; margin-left: auto; border: 0; border-radius: 10px; background: none; color: var(--nt-accent); font-size: 1.05rem; cursor: pointer; }
.nt3-icon:hover, .nt3-icon:focus-visible { background: #fdf6dc; outline: none; }
.nt3-icon.is-del { margin-left: 0; color: #94a3b8; }
.nt3-icon.is-del:hover { background: #fef2f2; color: #dc2626; }
.nt3-list { max-height: 300px; margin: 0 -8px; padding: 0; overflow-y: auto; list-style: none; }
.nt3-row { display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px; background: none; text-align: left; cursor: pointer; }
.nt3-list li + li .nt3-row { border-top: 1px solid rgba(15, 23, 42, 0.06); border-radius: 0 0 10px 10px; }
.nt3-row:hover, .nt3-row:focus-visible { background: #fdf6dc; outline: none; }
.nt3-row b { overflow: hidden; font-size: 0.93rem; font-weight: 700; color: #1e293b; white-space: nowrap; text-overflow: ellipsis; }
.nt3-row small { overflow: hidden; font-size: 0.8rem; color: #64748b; white-space: nowrap; text-overflow: ellipsis; }
.nt3-row time { margin-right: 8px; font-weight: 600; color: #475569; }
.nt3-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 0 8px; text-align: center; font-size: 0.9rem; color: #64748b; }
.nt3-empty p { margin: 0; }
.nt3-empty > i { font-size: 1.6rem; color: var(--nt-accent); }
.nt3-link { padding: 0; border: 0; background: none; font-size: 0.86rem; font-weight: 600; color: var(--nt-accent); cursor: pointer; }
.nt3-link:hover { text-decoration: underline; }
.nt3-undo { display: flex; align-items: center; justify-content: space-between; margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; background: #1e293b; font-size: 0.85rem; color: #fff; }
.nt3-undo .nt3-link { color: #fde68a; }
.nt3-back { display: inline-flex; align-items: center; gap: 4px; min-height: 34px; padding: 0 6px 0 2px; border: 0; border-radius: 10px; background: none; font-size: 0.93rem; font-weight: 600; color: var(--nt-accent); cursor: pointer; }
.nt3-back:hover, .nt3-back:focus-visible { background: #fdf6dc; outline: none; }
.nt3-back i { font-size: 0.8em; }
.nt3-state { margin-left: auto; font-size: 0.75rem; color: #94a3b8; }
.nt3-date { margin: 0 0 4px; text-align: center; font-size: 0.75rem; color: #94a3b8; }
.nt3-text { width: 100%; min-height: 180px; padding: 4px 2px; border: 0; background: transparent; resize: vertical; font-size: 0.95rem; line-height: 1.55; color: #1e293b; outline: none; }
.nt3-text::placeholder { color: #94a3b8; }
.nt3-pop { position: fixed; z-index: 1060; max-height: min(520px, calc(100vh - 96px)); padding: 14px 16px; overflow-y: auto; border: 1px solid rgba(76, 29, 149, 0.14); border-radius: 18px; background: #ffffff;
    box-shadow: 0 24px 48px -18px rgba(76, 29, 149, 0.4), 0 4px 12px -4px rgba(15, 23, 42, 0.12); animation: nt3-in 0.16s ease-out; }
.nt3-pop[hidden] { display: none; }
.nt3-pop .nt3-list { max-height: 360px; }
@keyframes nt3-in { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
@media (prefers-reduced-motion: reduce) { .nt3-pop { animation: none; } }
html.myb-shell:not(.myb-app) .page-header .myb-cap-notes { order: 2; }
/* WhatsApp al volo (MYB.WAQuick.js): l'icona nella capsula è verde se il tuo WhatsApp è collegato, rossa se no, ambra
   mentre si collega (applyWaNavStatus); il pallino lo dice anche senza colori. Il pannello scende dal pulsante come
   quello delle Note: 1 A chi, 2 Messaggio, Invia */
.myb-cap-wa [data-myb-wa-quick] { position: relative; border: 0; background: none; }
.myb-cap-wa [data-myb-wa-quick] i { font-size: 21px; }
.myb-cap-wa .is-wa-on i { color: #16a34a; }
.myb-cap-wa .is-wa-off i { color: #dc2626; }
.myb-cap-wa .is-wa-wait i { color: #d97706; }
.myb-cap-wa .wq-dot { position: absolute; right: 7px; bottom: 9px; width: 8px; height: 8px; border: 2px solid #ffffff; border-radius: 50%; background: transparent; }
.myb-cap-wa .is-wa-on .wq-dot { background: #16a34a; }
.myb-cap-wa .is-wa-off .wq-dot { background: #dc2626; }
.myb-cap-wa .is-wa-wait .wq-dot { background: #d97706; }
.wq-pop { position: fixed; z-index: 1060; display: flex; flex-direction: column; gap: 12px; max-height: min(560px, calc(100vh - 96px)); padding: 14px 16px; overflow-y: auto;
    border: 1px solid rgba(76, 29, 149, 0.14); border-radius: 18px; background: #ffffff; box-shadow: 0 24px 48px -18px rgba(76, 29, 149, 0.4), 0 4px 12px -4px rgba(15, 23, 42, 0.12); animation: nt3-in 0.16s ease-out; }
.wq-pop[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .wq-pop { animation: none; } }
.wq-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.95rem; color: #1c2434; }
.wq-ico { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: #dcfce7; color: #16a34a; font-size: 1.05rem; }
.wq-status { padding: 2px 8px; border-radius: 999px; font-size: 0.7rem; font-weight: 700; }
.wq-status.is-ok { background: #dcfce7; color: #15803d; }
.wq-status.is-off { background: #fee2e2; color: #b91c1c; }
.wq-head .wq-seg { margin-left: auto; }
.wq-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: #f1f5f9; }
.wq-seg button { min-height: 30px; padding: 0 11px; border: 0; border-radius: 999px; background: none; font-size: 0.78rem; font-weight: 700; color: #475569; cursor: pointer; }
.wq-seg button.is-on { background: #ffffff; color: #1c2434; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.15); }
.wq-step { display: flex; flex-direction: column; gap: 8px; }
.wq-step h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 0.8rem; font-weight: 800; color: #1c2434; }
.wq-step.is-off h3 { color: #94a3b8; }
.wq-n { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: #16a34a; font-size: 0.7rem; color: #ffffff; }
.wq-step.is-off .wq-n { background: #cbd5e1; }
.wq-field { width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid #e2e8f0; border-radius: 12px; background: #ffffff; font: inherit; font-size: 0.86rem; color: #1c2434; }
.wq-field:focus { outline: none; border-color: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15); }
.wq-text { resize: vertical; line-height: 1.45; }
.wq-row { display: flex; gap: 6px; }
.wq-list { display: flex; flex-direction: column; gap: 4px; }
.wq-list:empty { display: none; }
.wq-chosen { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 7px 12px; border: 1px solid #eef1f5; border-radius: 12px; background: #f8fafc; text-align: left; }
.wq-list .evf-link-opt:focus-visible { outline: 2px solid #16a34a; outline-offset: -2px; }
.wq-chosen { border-color: #bbf7d0; background: #f0fdf4; }
.wq-chosen b { display: block; font-size: 0.86rem; color: #1c2434; }
.wq-chosen small { display: block; font-size: 0.74rem; color: #64748b; }
.wq-none, .wq-empty { margin: 0; font-size: 0.8rem; color: #64748b; }
.wq-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid #eef1f5; }
/* Obiettivi nel profilo: giorni lavorativi all'anno (numero, al netto di ferie), obiettivi in sola lettura per l'agente
   e dove vederne l'avanzamento (Statistiche agente, Dashboard) */
.gl3-year { display: grid; grid-template-columns: minmax(150px, 220px) 130px minmax(0, 1fr); align-items: center; gap: 4px 16px; margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(15, 23, 42, 0.07); }
.gl3-year label { margin: 0; font-size: 0.929rem; font-weight: 600; color: #1e293b; }
.gl3-year small { font-size: 0.8rem; color: #64748b; }
.gl3-ro { display: grid; gap: 2px; margin: 0 0 10px; padding: 0; list-style: none; }
.gl3-ro li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 2px; border-top: 1px solid rgba(15, 23, 42, 0.06); font-size: 0.929rem; color: #475569; }
.gl3-ro li:first-child { border-top: 0; }
.gl3-ro b { color: #0f172a; }
.gl3-where { margin: 14px 0 0; font-size: 0.86rem; color: #64748b; }
.gl3-where a { font-weight: 600; color: var(--primary, #582679); }
@media (max-width: 767px) { .gl3-year { grid-template-columns: 1fr; } }
/* Indicatori in due gruppi (il portafoglio, questo mese), ognuno con il suo titoletto */
.db3-kpis { display: flex; flex-direction: column; gap: 16px; }
.db3-kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.db3-kpi-k { margin: 0 4px 8px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--db-mute); }
@media (max-width: 767px) { .db3-kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

/* Classifiche: podio generale (2-1-3 su gradini), la tua posizione in pillole, foto degli agenti nelle righe */
.db3-boards-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 18px; align-items: stretch; margin-bottom: 18px; }
.db3-boards-top:empty { display: none; }
.db3-mine { align-content: center; }
.db3-podium { padding: 18px 20px 14px; border: 1px solid rgba(15, 23, 42, 0.06); border-radius: 20px;
    background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--primary, #582679) 9%, #ffffff), #ffffff 70%); box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 28px -18px rgba(15, 23, 42, 0.18); }
.db3-pod-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: end; }
.db3-pod-step { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; text-align: center; }
.db3-pod-step > b { max-width: 100%; overflow: hidden; font-size: 0.9rem; font-weight: 700; color: var(--db-ink); white-space: nowrap; text-overflow: ellipsis; }
.db3-pod-step > b small { padding: 1px 6px; border-radius: 999px; background: var(--primary, #582679); font-size: 0.68rem; color: #fff; }
.db3-pod-av { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; overflow: hidden; border-radius: 50%; background: #e2e8f0;
    box-shadow: 0 0 0 3px #ffffff, 0 0 0 5px var(--ring, #cbd5e1); font-size: 1rem; font-weight: 800; color: #334155; }
.db3-pod-step.is-p1 .db3-pod-av { --ring: #f59e0b; width: 64px; height: 64px; font-size: 1.15rem; }
.db3-pod-step.is-p2 .db3-pod-av { --ring: #94a3b8; }
.db3-pod-step.is-p3 .db3-pod-av { --ring: #c2773a; }
.db3-pod-av img, .db3-rank-av img { width: 100%; height: 100%; object-fit: cover; }
.db3-pod-step:first-child .db3-pod-av, .db3-pod-step:last-child .db3-pod-av { margin-top: 6px; }
.db3-pod-pts { font-size: 0.78rem; font-weight: 600; color: var(--db-mute); font-variant-numeric: tabular-nums; }
.db3-pod-meds { display: flex; gap: 4px; min-height: 18px; }
.db3-med { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; font-size: 0.68rem; font-style: normal; font-weight: 800; }
.db3-med.is-p1 { background: #fde68a; color: #78350f; }
.db3-med.is-p2 { background: #e2e8f0; color: #1e293b; }
.db3-med.is-p3 { background: #fed7aa; color: #5b2a07; }
.db3-pod-base { display: flex; align-items: flex-start; justify-content: center; width: 100%; margin-top: 6px; padding-top: 8px; border-radius: 12px 12px 4px 4px; font-size: 1.3rem; font-weight: 800; color: #ffffff; }
.db3-pod-step.is-p1 .db3-pod-base { height: 78px; background: linear-gradient(180deg, #fbbf24, #d97706); }
.db3-pod-step.is-p2 .db3-pod-base { height: 56px; background: linear-gradient(180deg, #cbd5e1, #94a3b8); }
.db3-pod-step.is-p3 .db3-pod-base { height: 42px; background: linear-gradient(180deg, #e9a46a, #c2773a); }
.db3-pod-step.is-me .db3-pod-base { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6); }
.db3-podium .db3-board-note { margin: 10px 0 0; text-align: center; }
.db3-mine { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 16px 18px; border-radius: 20px; background: #ffffff; border: 1px solid rgba(15, 23, 42, 0.06); }
.db3-mine-k { width: 100%; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--db-mute); }
.db3-mine-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: #f1f5f9; font-size: 0.84rem; font-weight: 600; color: #334155; }
.db3-mine-chip b { font-weight: 800; color: var(--db-ink); }
.db3-mine-chip.is-p1 { background: #fef3c7; } .db3-mine-chip.is-p2 { background: #eef2f7; } .db3-mine-chip.is-p3 { background: #ffedd5; }
.db3-mine-none { font-size: 0.88rem; color: var(--db-mute); }
.db3-rank-name { display: flex; align-items: center; gap: 8px; }
.db3-rank-name > span:not(.db3-rank-av) { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.db3-rank-name small { flex: 0 0 auto; margin-left: 0; }
.db3-rank-av { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 26px; height: 26px; overflow: hidden; border-radius: 50%; background: #e2e8f0; font-size: 0.66rem; font-weight: 800; color: #475569; }
.db3-pod-steps { max-width: 560px; margin: 0 auto; }
.db3-pod-step.is-empty .db3-pod-av { --ring: #e2e8f0; background: #f8fafc; color: #cbd5e1; }
.db3-pod-step.is-empty > b { font-weight: 600; color: #94a3b8; }
.db3-pod-step.is-empty .db3-pod-base { background: repeating-linear-gradient(135deg, #f1f5f9 0 8px, #e9edf3 8px 16px); color: #94a3b8; }
/* Dashboard: di chi sono i numeri (agenzia / il mio team / solo io), controllo segmentato accanto ad "Aggiorna" */
.db3-scope { display: inline-flex; gap: 2px; margin-left: auto; padding: 3px; border-radius: 12px; background: #eef1f6; }
.db3-scope[hidden] { display: none; }
.db3-scope button { height: 30px; padding: 0 12px; border: 0; border-radius: 9px; background: none; font-size: 0.84rem; font-weight: 700; color: #64748b; cursor: pointer; }
.db3-scope button[aria-pressed="true"] { background: #ffffff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12); color: var(--primary, #582679); }
.db3-scope button:focus-visible { outline: 2px solid var(--primary, #582679); outline-offset: 1px; }
.db3.is-loading .db3-kpis, .db3.is-loading [data-db-todo], .db3.is-loading [data-db-boards] { opacity: 0.55; transition: opacity 0.15s; }

/* ── Home personalizzabile (DESIGN.md §40): scheletri con la sagoma dei contenuti, righe di "Oggi", pannello Personalizza */
.db3-skel.is-line.is-short { width: min(380px, 60%); margin-top: 8px; }
.db3-skel.is-bar { height: 12px; border-radius: 6px; }
.db3-skel.is-bar.is-sm { height: 9px; }
.db3-skel.is-val { height: 28px; margin: 6px 0 4px; border-radius: 8px; }
.db3-skel.is-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; }
.db3-skel.is-pill { flex: none; width: 34px; height: 22px; margin-left: auto; border-radius: 11px; }
.db3-skel.is-av { flex: none; width: 28px; height: 28px; border-radius: 50%; }
.db3-skel.is-num { flex: none; width: 26px; }
.db3-kpi.is-skel, .db3-event.is-skel { gap: 8px; pointer-events: none; }
.db3-kpi-group > .db3-skel { margin-bottom: 10px; }
.db3-sig-text > .db3-skel + .db3-skel { margin-top: 7px; }
.db3-skel-bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; margin-top: 16px; }
.db3-skel-bars > .db3-skel { flex: 1; border-radius: 4px 4px 0 0; }
.db3-skel-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--db-line); }
.db3-skel-row > .is-bar:not(.is-num) { margin-right: auto; }
.db3-board > .db3-skel.is-sm { margin: 8px 0 10px; }
.db3-skel-podium { display: flex; align-items: flex-end; justify-content: center; gap: 12px; height: 190px; }
.db3-skel.is-step { width: 90px; border-radius: 14px 14px 0 0; }
.db3-skel.is-step.is-p1 { height: 100%; }
.db3-skel.is-step.is-p2 { height: 78%; }
.db3-skel.is-step.is-p3 { height: 62%; }

.db3 [data-db-w].is-off { display: none !important; }
[data-db-slot="today"] { display: flex; flex-direction: column; gap: 18px; }
[data-db-slot="today"] > * { margin-bottom: 0; }
.db3-main, .db3-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.db3-main > .db3-card, .db3-side > .db3-card { margin-bottom: 0; }
.db3-grid.is-flip { grid-template-columns: minmax(300px, 1fr) minmax(0, 1.75fr); }
[data-db-slot] > [data-db-w], [data-db-slot] .db3-grid [data-db-w] { position: relative; }
.db3-kpis-w { position: relative; margin-bottom: 18px; }
.db3-kpis-w > .db3-kpis { margin-bottom: 0; }
html.myb-nav-rail:not(.myb-app) .db3-folder > .db3-kpis-w:last-child { margin-bottom: 0; }
.db3-tools { position: absolute; top: 6px; left: 50%; z-index: 3; display: flex; gap: 2px; padding: 2px; transform: translateX(-50%); border-radius: 10px; background: #ffffff;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.12); }
.db3:not(.is-editing) .db3-tools { display: none; }
.db3-tools button { display: flex; align-items: center; justify-content: center; width: 32px; height: 24px; padding: 0; border: 0; border-radius: 8px; background: none;
    font-size: 12px; color: #475569; cursor: pointer; transition: background-color 0.15s; }
.db3-tools :is(.db3-grip, .db3-fgrip) { cursor: grab; touch-action: none; }
.db3-tools button:hover { background: #eef1f6; color: var(--db-ink); }
.db3-tools button:focus-visible { outline: 2px solid var(--primary, #582679); outline-offset: 1px; }
.db3-tools.is-tab { position: static; display: inline-flex; margin-left: 6px; transform: none; }
.db3-tab .db3-tools i { font-size: 12px; color: inherit; }
.db3-folder.is-ghost { opacity: 0.4; }

/* Modalità modifica (Personalizza, come le icone di iOS): card e linguette tremano, i nascosti restano sbiaditi */
.db3-edit-btn { display: inline-flex; align-items: center; gap: 7px; height: 34px; margin-left: auto; padding: 0 14px; border: 0; border-radius: 999px;
    background: color-mix(in srgb, var(--primary, #582679) 10%, #ffffff); font-size: 0.857rem; font-weight: 700; color: var(--primary, #582679); cursor: pointer; }
.db3-scope:not([hidden]) + .db3-edit-btn { margin-left: 8px; }
.db3-edit-btn:hover { background: color-mix(in srgb, var(--primary, #582679) 16%, #ffffff); }
.db3-edit-btn[aria-pressed="true"] { background: var(--primary, #582679); color: #ffffff; }
.db3-edit-btn:focus-visible { outline: 2px solid var(--primary, #582679); outline-offset: 2px; }
@keyframes db3-jiggle { 0%, 100% { transform: rotate(-0.3deg) translateY(0); } 50% { transform: rotate(0.3deg) translateY(-0.5px); } }
.db3.is-editing :is(.db3-card.db3-w, .db3-kpis-w, .db3-tab) { animation: db3-jiggle 0.3s ease-in-out infinite; }
.db3.is-editing :is(.db3-card.db3-w, .db3-kpis-w, .db3-tab):nth-child(2n) { animation-duration: 0.34s; animation-delay: -0.12s; }
.db3.is-editing :is(.db3-card.db3-w, .db3-kpis-w, .db3-tab):nth-child(3n) { animation-duration: 0.27s; animation-delay: -0.2s; }
.db3.is-editing :is(.db3-card.db3-w, .db3-kpis-w) { outline: 1.5px dashed color-mix(in srgb, var(--primary, #582679) 30%, transparent); outline-offset: 3px; }
.db3.is-editing .kvsortable-chosen { animation: none; }
@media (prefers-reduced-motion: reduce) { .db3.is-editing :is(.db3-card.db3-w, .db3-kpis-w, .db3-tab) { animation: none; } }
.db3 [data-db-w].is-dim > :not(.db3-tools):not(.db3-tab) { opacity: 0.35; filter: grayscale(1); }
.db3 :is(.db3-card, .db3-kpis-w).is-dim { max-height: 170px; overflow: hidden; }
.db3-editbar { position: fixed; z-index: 1040; bottom: 24px; left: 50%; display: flex; align-items: center; gap: 14px; box-sizing: border-box; max-width: calc(100vw - 32px);
    padding: 8px 8px 8px 18px; transform: translateX(-50%); border-radius: 16px; background: #0f172a; box-shadow: 0 14px 34px -10px rgba(15, 23, 42, 0.5);
    font-size: 0.857rem; color: #cbd5e1; }
.db3-editbar[hidden] { display: none; }
.db3-editbar > span { white-space: nowrap; }
.db3-editbar b { margin-right: 8px; color: #ffffff; }
.db3-editbar i { margin: 0 2px; color: #ffffff; }
.db3-editbar .db3-link { flex: none; color: #c4b5fd !important; }
.db3-editbar .db3-btn.is-primary { flex: none; height: 36px; padding: 0 18px; border: 0; background: var(--primary, #582679); box-shadow: none; color: #ffffff !important; cursor: pointer; }
@media (max-width: 767px) { .db3-editbar > span { display: none; } .db3-editbar { bottom: calc(16px + env(safe-area-inset-bottom)); } }
html.myb-app .db3-editbar { bottom: calc(84px + env(safe-area-inset-bottom)); }
.db3 [data-db-w].is-ghost { opacity: 0.4; }
/* una colonna senza widget visibili sparisce e l'altra prende tutta la riga; le strette da sole si affiancano */
[data-db-slot="today"] > .db3-grid > :not(:has(> .db3-card:not([hidden], .is-off))) { display: none; }
[data-db-slot="today"] > .db3-grid:not(:has(> .db3-main > .db3-card:not([hidden], .is-off))),
[data-db-slot="today"] > .db3-grid:not(:has(> .db3-side > .db3-card:not([hidden], .is-off))) { grid-template-columns: minmax(0, 1fr); }
[data-db-slot="today"] > .db3-grid:not(:has(> .db3-main > .db3-card:not([hidden], .is-off))) > .db3-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); align-items: start; }
[data-db-slot="today"] > .db3-grid:not(:has(.db3-card:not([hidden], .is-off))) { display: none; }
@media (max-width: 1199px) { .db3-grid.is-flip { grid-template-columns: minmax(0, 1fr); } }

.db3-meta { flex-wrap: wrap; }
/* Onboarding della piattaforma nella Dashboard v3: card con barra di avanzamento e passi (fatti in verde, da fare con
   "Inizia"); ripiegata resta la testata con la barra */
.db3-onb { margin: 0 0 18px; padding: 18px 20px; border: 1.5px solid color-mix(in srgb, var(--primary, #582679) 30%, transparent); border-radius: 20px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary, #582679) 10%, #ffffff), #ffffff 70%); box-shadow: 0 14px 32px -18px rgba(76, 29, 149, 0.45); }
.db3-onb-head { display: flex; align-items: center; gap: 14px; }
.db3-onb-head > div { flex: 1 1 auto; min-width: 0; }
.db3-onb-ico { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 14px;
    background: linear-gradient(135deg, var(--secondary, #f97316), var(--primary, #582679)); font-size: 1.1rem; color: #ffffff; box-shadow: 0 8px 18px -10px rgba(76, 29, 149, 0.6); }
.db3-onb-head h3 { margin: 0; font-size: 1.2rem; font-weight: 800; text-transform: none; color: var(--db-ink); }
.db3-onb-head small { font-size: 0.85rem; color: var(--db-mute); }
.db3-onb-bar { height: 6px; margin: 12px 0 4px; overflow: hidden; border-radius: 999px; background: #eef1f6; }
.db3-onb-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #f97316, var(--primary, #582679)); }
.db3-onb-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 0 24px; margin: 8px 0 0; padding: 0; list-style: none; }
.db3-onb-steps[hidden] { display: none; }
.db3-onb-steps li { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 0; border-top: 1px solid var(--db-line); font-size: 0.9rem; color: var(--db-text); }
.db3-onb-steps li > span:not(.db3-onb-n) { flex: 1 1 auto; }
.db3-onb-steps li.is-done { color: var(--db-mute); }
.db3-onb-steps li.is-done > span { text-decoration: line-through; text-decoration-color: #cbd5e1; }
.db3-onb-steps li.is-done i { font-size: 1.15rem; color: #16a34a; }
.db3-onb-steps li.is-done small { font-size: 0.78rem; font-weight: 600; color: #16a34a; }
.db3-onb-n { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%;
    border: 1.5px solid color-mix(in srgb, var(--primary, #582679) 45%, transparent); font-size: 0.75rem; font-weight: 800; color: var(--primary, #582679); }
/* Note: titolo grande come in Apple Notes (prima riga della nota), il corpo subito sotto */
.nt3-title { display: block; width: 100%; padding: 2px 2px 4px; overflow: hidden; border: 0; background: transparent; resize: none; font-size: 1.35rem; font-weight: 800; line-height: 1.25; letter-spacing: -0.01em; color: #0f172a; outline: none; }
.nt3-title::placeholder { color: #cbd5e1; }
.nt3.is-edit .nt3-text { min-height: 150px; padding-top: 2px; }
/* ── Attività v3, revisione "Promemoria" (DESIGN.md §28): niente colonna Stato (gruppo, data e spunta lo dicono già;
   resta l'etichetta "In attesa"), righe bianche senza fascia rossa (il rosso è solo della data e del gruppo), gruppi
   come titoli di sezione leggibili, cerchio vuoto che mostra la spunta solo al passaggio */
.acc-header-v3.task-row-v3 { grid-template-columns: 30px minmax(0, 2.3fr) minmax(0, 1.3fr) minmax(0, 1fr) 110px 180px 24px; }
#activities_dt { margin-top: 0 !important; }
#activities_dt .task-item-v3[class] { border-left: 0 !important; background: #ffffff !important; }
#activities_dt .task-item-v3:hover { background: #fafbfd !important; }
.task-title-v3 { font-weight: 600; }
.task-title-v3.is-empty { color: #475569; font-style: normal; font-weight: 600; }
.task-wait-v3 { display: inline-block; margin-right: 8px; padding: 1px 8px; border-radius: 999px; background: #eef2ff; font-size: 0.72rem; font-weight: 700; color: #4338ca; vertical-align: 1px; }
.task-group-v3 { padding: 22px 18px 8px; font-size: 1.02rem; font-weight: 700; letter-spacing: -0.01em; text-transform: none; border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important; }
.task-group-v3 > i { font-size: 0.9rem; }
.task-group-count-v3 { padding: 0; background: none; font-size: 0.9rem; font-weight: 600; color: #94a3b8; }
#activities_dt tbody > tr.task-group-tr-v3:first-child .task-group-v3 { padding-top: 10px; }
.task-check-v3 { width: 22px; height: 22px; border-width: 1.5px; border-color: #c4cbd6; }
.task-item-v3[data-bucket="overdue"] .task-check-v3:not(.is-checked) { border-color: #f1a7a7; }
.task-due-v3 { font-weight: 600; }
.task-due-v3 i { display: none; }
@media (max-width: 991px) {
    .acc-header-v3.task-row-v3 { grid-template-columns: 26px auto minmax(0, 1fr) auto; grid-template-areas: "check main main main" "check due owner chevron"; }
}
.task-check-v3:not(.is-checked) i { opacity: 0; transition: opacity 0.12s; }
button.task-check-v3:hover i, button.task-check-v3:focus-visible i { opacity: 1; }
/* Attività: il colore torna dove dice qualcosa — il gruppo, una linea sottile a sinistra della riga e l'anello della spunta nel colore del gruppo, il tipo in un quadratino tinto */
.task-group-v3.is-overdue .task-group-count-v3 { color: #dc2626; }
.task-group-v3.is-today .task-group-count-v3 { color: #d97706; }
.task-group-v3.is-tomorrow .task-group-count-v3 { color: #2563eb; }
.task-group-v3.is-week .task-group-count-v3 { color: #0284c7; }
.task-group-v3.is-done .task-group-count-v3 { color: #16a34a; }
#activities_dt .task-item-v3 { --tk: #94a3b8; position: relative; }
#activities_dt .task-item-v3[data-bucket="overdue"] { --tk: #ef4444; }
#activities_dt .task-item-v3[data-bucket="today"] { --tk: #f59e0b; }
#activities_dt .task-item-v3[data-bucket="tomorrow"] { --tk: #3b82f6; }
#activities_dt .task-item-v3[data-bucket="week"] { --tk: #0ea5e9; }
#activities_dt .task-item-v3[data-bucket="done"] { --tk: #22c55e; }
#activities_dt .task-item-v3::before { content: ''; position: absolute; top: 10px; bottom: 10px; left: 0; width: 3px; border-radius: 0 3px 3px 0; background: var(--tk); opacity: 0.85; }
#activities_dt .task-item-v3[data-bucket="overdue"] { background: linear-gradient(90deg, rgba(239, 68, 68, 0.05), #ffffff 40%) !important; }
.task-item-v3 .task-check-v3:not(.is-checked) { border-color: color-mix(in srgb, var(--tk, #c4cbd6) 60%, #ffffff); }
button.task-check-v3:hover { border-color: var(--tk, #16a34a) !important; color: var(--tk, #16a34a); background: color-mix(in srgb, var(--tk, #16a34a) 10%, #ffffff); }
.task-typecol-v3 i { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: #eef2ff; color: #4f46e5; font-size: 0.78rem; }
.task-typecol-v3.is-call i { background: #e0ecff; color: #2563eb; }
.task-typecol-v3.is-wa i { background: #dcfce7; color: #16a34a; }
.task-typecol-v3.is-mail i { background: #fef3c7; color: #b45309; }
.task-typecol-v3.is-visit i { background: #ccfbf1; color: #0f766e; }
.task-typecol-v3.is-doc i { background: #fce7f3; color: #be185d; }
.task-typecol-v3.is-other i { background: #f1f5f9; color: #475569; }
.task-typecol-sub-v3 { margin-left: 33px; }
/* (il tema nasconde i ::before delle righe e colora le spunte: valori espliciti) */
#activities_dt .task-item-v3::before { display: block !important; z-index: 1; }
#activities_dt .task-item-v3 .task-check-v3:not(.is-checked) { border-color: color-mix(in srgb, var(--tk) 55%, #ffffff) !important; }
/* Spunta: cerchio pieno verde con la spunta bianca (il tema colora le <i>), al passaggio la spunta nel colore del gruppo */
.task-check-v3.is-checked { border-color: #16a34a !important; background: #16a34a !important; }
.task-check-v3.is-checked i, .task-check-v3.is-checked i::before { color: #ffffff !important; }
button.task-check-v3:hover i, button.task-check-v3:hover i::before, button.task-check-v3:focus-visible i::before { color: var(--tk, #16a34a) !important; }
/* Gruppi delle Attività allineati alle viste in alto: stessa icona, stesso tono (.qv-tone-*), niente cerchio pieno;
   la linea della riga e l'anello della spunta prendono lo stesso tono */
.task-group-v3 > i { font-size: 1rem; }
.task-group-v3 > i::before { color: inherit !important; }
.task-group-v3.is-overdue, .task-group-v3.is-overdue .task-group-count-v3 { color: #e2445c !important; }
.task-group-v3.is-today, .task-group-v3.is-today .task-group-count-v3 { color: #f59e0b !important; }
.task-group-v3.is-tomorrow, .task-group-v3.is-tomorrow .task-group-count-v3 { color: #3b82f6 !important; }
.task-group-v3.is-week, .task-group-v3.is-week .task-group-count-v3 { color: #0ea5e9 !important; }
.task-group-v3.is-done, .task-group-v3.is-done .task-group-count-v3 { color: #16a34a !important; }
.task-group-v3.is-later, .task-group-v3.is-nodate { color: #64748b !important; }
.task-group-v3 > i { color: inherit !important; }
#activities_dt .task-item-v3[data-bucket="overdue"] { --tk: #e2445c; }
#activities_dt .task-item-v3[data-bucket="today"] { --tk: #f59e0b; }
#activities_dt .task-item-v3[data-bucket="tomorrow"] { --tk: #3b82f6; }
#activities_dt .task-item-v3[data-bucket="week"] { --tk: #0ea5e9; }
#activities_dt .task-item-v3[data-bucket="done"] { --tk: #16a34a; }
.task-due-v3.is-overdue { color: #e2445c; }
.task-due-v3.is-today { color: #d97706; }
/* Scheda v3 aperta dalla lista Attività (#act-ID): l'attività resta segnata finché non tocchi la pagina */
.c3-item.is-target { border-radius: 12px; background: color-mix(in srgb, var(--primary, #582679) 7%, #ffffff); box-shadow: inset 3px 0 0 var(--primary, #582679), 0 0 0 1px color-mix(in srgb, var(--primary, #582679) 18%, transparent); }
/* ── Richieste v3, revisione "Apple" (views/richieste_v3.php, .rq-*): la persona apre la riga, sotto telefono · codice;
   immobile come testo; stato = pallino + testo (contrasto pieno, niente pillola satura); "Attesa" è l'unico punto
   forte (ambra oltre la soglia BI_SLOW_BUYERLEADS_ALERT_HOURS, rosso oltre 24 h, solo per le richieste da contattare).
   Niente riquadri dentro la riga né separatori verticali; il colore dello stato è una linea sottile a sinistra */
#buyerleads_dt .rq-item-v3.monday-style { position: relative; border-left: 0 !important; background: #ffffff !important; }
#buyerleads_dt .rq-item-v3.monday-style:hover { background: #fafbfd !important; }
#buyerleads_dt .rq-item-v3::before { content: ''; position: absolute; z-index: 1; top: 12px; bottom: 12px; left: 0; width: 3px; border-radius: 0 3px 3px 0; background: var(--row-tone, #cbd5e1); }
.acc-header-v3.richieste-header-grid.rq-row-v3 > div { border-right: 0 !important; padding-right: 0 !important; min-width: 0; }
@media (min-width: 992px) {
    .acc-header-v3.richieste-header-grid.rq-row-v3 { grid-template-columns: minmax(0, 2.4fr) minmax(0, 2fr) minmax(0, 1.35fr) minmax(0, 1.25fr) 72px 36px 28px !important; gap: 16px !important; padding: 12px 18px 12px 20px !important; }
    .richieste-header-bar-v3.rq-row-v3 > div { font-size: 0.72rem; }
}
.rq-col-who { display: flex !important; align-items: center; gap: 12px; }
.rq-col-who .client-avatar-v3 { flex: 0 0 auto; }
.rq-who-v3 { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rq-who-v3 .entity-name-v3 { overflow: hidden; font-size: 0.95rem !important; font-weight: 700 !important; color: #0f172a !important; white-space: nowrap; text-overflow: ellipsis; }
.rq-who-v3 .entity-link-v3 { font-size: 0.72rem; opacity: 0.45; }
.rq-sub-v3 { display: flex; align-items: center; min-width: 0; font-size: 0.8rem; color: #64748b; white-space: nowrap; }
.rq-sub-v3 > i { margin: 0 6px; font-style: normal; color: #cbd5e1; }
.rq-phone-v3 { color: #475569; font-variant-numeric: tabular-nums; }
.rq-buy-v3 { color: #64748b !important; font-variant-numeric: tabular-nums; text-decoration: none !important; }
.rq-buy-v3:hover { color: var(--primary, #582679) !important; text-decoration: underline !important; }
.rq-prop-v3 { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; max-width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.rq-prop-v3 b { font-size: 0.86rem; font-weight: 600; color: #1e293b; }
.rq-prop-v3 b i { margin-right: 3px; font-size: 0.75rem; color: var(--primary, #582679); }
.rq-prop-v3 span { max-width: 100%; overflow: hidden; font-size: 0.78rem; color: #64748b; white-space: nowrap; text-overflow: ellipsis; }
.rq-prop-v3:hover b, .rq-prop-v3:focus-visible b { color: var(--primary, #582679); }
.rq-none-v3 { font-size: 0.82rem; color: #94a3b8; }
.rq-col-agent .consulente-pill-v3 { max-width: 100%; padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; }
.rq-col-agent .consulente-pill-v3.consulente-none-v3 { color: #b91c1c !important; font-weight: 600; }
.rq-status-v3 { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: 0.86rem; font-weight: 600; color: #1e293b; }
.rq-status-v3 > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rq-dot-v3 { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--row-tone, #94a3b8); }
.rq-status-v3.is-urgent .rq-dot-v3 { box-shadow: 0 0 0 0 var(--row-tone); animation: rq-ping 1.8s ease-out infinite; }
@keyframes rq-ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--row-tone, #f97316) 55%, transparent); } 100% { box-shadow: 0 0 0 7px transparent; } }
@media (prefers-reduced-motion: reduce) { .rq-status-v3.is-urgent .rq-dot-v3 { animation: none; } }
.rq-wait-v3 { display: inline-flex; padding: 3px 9px; border-radius: 999px; font-size: 0.84rem; font-weight: 600; color: #64748b; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rq-wait-v3.is-fresh { color: #1e293b; }
.rq-wait-v3.is-slow { background: #fef3c7; color: #92400e; }
.rq-wait-v3.is-late { background: #fee2e2; color: #b91c1c; }
@media (max-width: 991px) {
    #buyerleads_dt .rq-item-v3.monday-style { border-left-width: 1px !important; }
    .acc-header-v3.richieste-header-grid.rq-row-v3 {
        grid-template-columns: minmax(0, 1fr) auto auto !important;
        grid-template-areas: "who wait chevron" "prop prop prop" "agent status notif" !important;
        gap: 8px 10px !important;
    }
    .rq-row-v3 .rq-col-who { grid-area: who; }
    .rq-row-v3 .rq-col-wait { grid-area: wait; justify-self: end; }
    .rq-row-v3 .grid-col-chevron { grid-area: chevron !important; }
    .rq-row-v3 .rq-col-prop { grid-area: prop; padding-left: 50px; }
    .rq-row-v3 .rq-col-agent { grid-area: agent; padding-left: 50px; }
    .rq-row-v3 .rq-col-status { grid-area: status; justify-self: end; }
    .rq-row-v3 .rq-col-notif { grid-area: notif; justify-self: end; }
}
#buyerleads_dt .rq-item-v3::before { display: block !important; }
.rq-status-v3 > span { color: #1e293b !important; }
@media (min-width: 992px) {
    .acc-header-v3.richieste-header-grid.rq-row-v3 { grid-template-columns: minmax(0, 2.3fr) minmax(0, 1.8fr) minmax(0, 1.3fr) minmax(0, 1.65fr) 72px 36px 28px !important; }
}
#buyerleads_dt .rq-item-v3::before { background: var(--row-tone, #cbd5e1) !important; opacity: 1 !important; } /* il tema nasconde e sbianca i ::before delle righe */
@media (max-width: 991px) {
    .acc-header-v3.richieste-header-grid.rq-row-v3 { grid-template-areas: "who wait chevron" "prop prop prop" "agent agent agent" "status status notif" !important; }
    .rq-row-v3 .rq-col-status { justify-self: start; padding-left: 50px; }
    .rq-who-v3 .entity-name-v3 { white-space: normal; }
}
.rq-wait-v3.is-date { padding-inline: 0; font-weight: 500; color: #64748b; }
/* Richieste: tornano il riquadro del cliente, il riquadro dell'immobile e il collegamento » tra i due */
@media (min-width: 992px) {
    .acc-header-v3.richieste-header-grid.rq-row-v3 { grid-template-columns: minmax(0, 2.3fr) 44px minmax(0, 1.8fr) minmax(0, 1.25fr) minmax(0, 1.6fr) 72px 36px 28px !important; gap: 12px !important; }
}
.rq-col-link { display: flex; align-items: center; justify-content: center; }
.rq-client-v3 { display: flex; align-items: center; gap: 12px; max-width: 100%; }
.rq-col-prop .mini-property-card-v3 { max-width: 100%; }
@media (max-width: 991px) { .rq-row-v3 .rq-col-link { display: none; } }
.rq-client-v3 { width: 100%; min-width: 0; overflow: hidden; }
.rq-client-v3 .rq-who-v3 { flex: 1 1 auto; }
.rq-sub-v3 { overflow: hidden; text-overflow: ellipsis; }
.rq-sub-v3 .rq-buy-v3 { flex: 0 0 auto; }
.rq-sub-v3 .rq-phone-v3 { overflow: hidden; text-overflow: ellipsis; }
.rq-client-v3.mini-client-card-v3 { max-width: none !important; width: 100% !important; }
.rq-sub-v3 .rq-phone-v3 { flex: 0 0 auto; overflow: visible; }
.rq-sub-v3 .rq-buy-v3 { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 992px) {
    .acc-header-v3.richieste-header-grid.rq-row-v3 { grid-template-columns: minmax(0, 2.7fr) 32px minmax(0, 1.6fr) minmax(0, 1.1fr) minmax(0, 1.6fr) 64px 36px 28px !important; gap: 10px !important; }
}
/* Richieste: lo stato nella riga è lo stesso badge della scheda (.c3-status-btn), più compatto, con il menu degli esiti */
.rq-st { min-width: 0; max-width: 100%; }
.rq-st .rq-st-btn { flex: 0 1 auto; max-width: 100%; min-height: 32px; padding: 0 10px; gap: 7px; border-radius: 9px; font-size: 0.7rem; }
.rq-st .rq-st-btn > span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #ffffff !important; }
.rq-st .rq-st-btn > .fa-chevron-down { font-size: 0.6rem; opacity: 0.85; }
.rq-st .rq-st-btn > .fa-chevron-down::before { color: #ffffff !important; }
.rq-st-ring { flex: 0 0 auto; width: 13px; height: 13px; border-radius: 50%; background: radial-gradient(circle, #ffffff 0 3px, transparent 3.5px), rgba(255, 255, 255, 0.35); }
.c3-status-menu .rq-st-ring { background: radial-gradient(circle, var(--st) 0 3px, transparent 3.5px), color-mix(in srgb, var(--st) 22%, #ffffff); }
.rq-st .c3-status-menu { min-width: 240px; max-height: 360px; overflow-y: auto; }
.rq-st .c3-status-item { color: #1e293b !important; text-decoration: none !important; }
.rq-st .c3-status-item:hover { background: color-mix(in srgb, var(--st) 8%, #ffffff); }
.rq-st-ring { display: inline-block; }
.rq-st .c3-status-item span { color: #1e293b !important; }
.c3-status-menu .rq-st-ring { margin-right: 8px; }
/* Richieste: leggero sfondo nel colore dell'esito (la riga resta leggibile: 5%, 8% al passaggio) */
#buyerleads_dt .rq-item-v3.monday-style[class*="status-border-"]:not(.status-border-default) { background: color-mix(in srgb, var(--row-tone) 5%, #ffffff) !important; }
#buyerleads_dt .rq-item-v3.monday-style[class*="status-border-"]:not(.status-border-default):hover { background: color-mix(in srgb, var(--row-tone) 8%, #ffffff) !important; }
/* Richieste: tinta più delicata e riquadri cliente / immobile bianchi pieni, così si staccano dallo sfondo colorato */
#buyerleads_dt .rq-item-v3.monday-style[class*="status-border-"]:not(.status-border-default) { background: color-mix(in srgb, var(--row-tone) 3%, #ffffff) !important; }
#buyerleads_dt .rq-item-v3.monday-style[class*="status-border-"]:not(.status-border-default):hover { background: color-mix(in srgb, var(--row-tone) 6%, #ffffff) !important; }
#buyerleads_dt .rq-item-v3 .mini-client-card-v3,
#buyerleads_dt .rq-item-v3 .mini-property-card-v3 { background: #ffffff !important; border-color: rgba(15, 23, 42, 0.08) !important; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 4px 12px -8px rgba(15, 23, 42, 0.18) !important; }
/* Richieste: il riquadro del cliente è largo quanto il suo contenuto; nel dettaglio i contatti hanno due colonne di
   spazio e non si tagliano */
.rq-client-v3.mini-client-card-v3 { width: auto !important; max-width: 100% !important; }
.rq-col-who { justify-content: flex-start; }
.rq-detail-contacts { grid-column: span 2; min-width: 0; }
.rq-detail-contacts .contact-line-v3 { overflow: visible !important; white-space: normal !important; text-overflow: clip !important; word-break: break-all; }
/* Richieste: colonna Cliente al massimo 300px e riquadro che la riempie — larghezze uguali, » vicino al riquadro */
@media (min-width: 992px) {
    .acc-header-v3.richieste-header-grid.rq-row-v3 { grid-template-columns: minmax(200px, 300px) 32px minmax(0, 2fr) minmax(0, 1.2fr) minmax(0, 1.7fr) 64px 36px 28px !important; }
}
.rq-client-v3.mini-client-card-v3 { width: 100% !important; }
@media (min-width: 992px) {
    .acc-header-v3.richieste-header-grid.rq-row-v3 { grid-template-columns: minmax(200px, 300px) 32px minmax(180px, 340px) minmax(0, 1fr) minmax(0, 1.3fr) 64px 36px 28px !important; }
}
/* ── Liste v3 (MYB.TableList), regole della riga Richieste estese a tutte (DESIGN.md §27): linea sottile e tinta
   leggera nel colore dello stato, riquadri bianchi, consulente senza cornice, niente separatori verticali, stato
   come il badge della scheda (qui solo da leggere) */
table.dataTable .rq-item-v3.monday-style { position: relative; border-left: 0 !important; background: #ffffff !important; }
table.dataTable .rq-item-v3.monday-style:hover { background: #fafbfd !important; }
table.dataTable .rq-item-v3::before { content: ''; position: absolute; z-index: 1; top: 12px; bottom: 12px; left: 0; width: 3px; border-radius: 0 3px 3px 0; display: block !important; opacity: 1 !important; background: var(--row-tone, #cbd5e1) !important; }
table.dataTable .rq-item-v3.monday-style[class*="status-border-"]:not(.status-border-default) { background: color-mix(in srgb, var(--row-tone) 3%, #ffffff) !important; }
table.dataTable .rq-item-v3.monday-style[class*="status-border-"]:not(.status-border-default):hover { background: color-mix(in srgb, var(--row-tone) 6%, #ffffff) !important; }
table.dataTable .rq-item-v3 .mini-client-card-v3,
table.dataTable .rq-item-v3 .mini-property-card-v3 { background: #ffffff !important; border-color: rgba(15, 23, 42, 0.08) !important; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 4px 12px -8px rgba(15, 23, 42, 0.18) !important; }
.rq-item-v3 .richieste-header-grid > div { border-right: 0 !important; }
.rq-item-v3 .grid-col-agent .consulente-pill-v3 { padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; }
.rq-st-btn.is-static { display: inline-flex; flex: 0 1 auto; max-width: 100%; min-height: 30px; padding: 0 10px; gap: 7px; border-radius: 9px; font-size: 0.7rem; cursor: default; }
.rq-st-btn.is-static > span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #ffffff !important; }
.rq-st-btn.is-static:hover { filter: none; }
.results-panel-v3 table.dataTable { margin-top: 0 !important; } /* niente fascia vuota tra intestazione e prima riga */
.richieste-header-bar-v3 > div { border-right: 0 !important; } /* niente separatori verticali neanche nelle intestazioni */
/* Codice sotto il nome (BUY…, POT…, CON…): etichetta tenue ma leggibile, viola come il marchio, con l'icona "apri" */
.rq-sub-v3 { margin-top: 2px; }
.rq-buy-v3 { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 7px; background: color-mix(in srgb, var(--primary, #582679) 9%, #ffffff); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.01em; color: var(--primary, #582679) !important; text-decoration: none !important; }
.rq-buy-v3::after { content: '\2197'; font-size: 0.7rem; opacity: 0.6; }
.rq-buy-v3:hover { background: color-mix(in srgb, var(--primary, #582679) 16%, #ffffff); color: var(--primary, #582679) !important; text-decoration: none !important; }
.rq-buy-v3 { padding: 2px 9px; font-size: 0.86rem; }
/* Codice del record sul collegamento tra i due riquadri (la richiesta / pratica è il legame tra cliente e contesto);
   sotto il nome solo il codice del contatto (CON…), in grigio */
@media (min-width: 992px) {
    .acc-header-v3.richieste-header-grid.rq-row-v3 { grid-template-columns: minmax(190px, 280px) minmax(118px, auto) minmax(180px, 320px) minmax(0, 1fr) minmax(0, 1.3fr) 64px 36px 28px !important; gap: 0 12px !important; }
}
.rq-col-link { display: flex; align-items: center; justify-content: center; align-self: stretch; }
.rq-bridge-v3 { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; }
.rq-bridge-v3.has-link::before { content: ''; position: absolute; top: 50%; left: -12px; right: -12px; border-top: 1.5px dashed color-mix(in srgb, var(--primary, #582679) 30%, #ffffff); }
.rq-bridge-v3 .rq-buy-v3 { position: relative; z-index: 1; box-shadow: 0 0 0 3px #ffffff; white-space: nowrap; }
.rq-con-v3 { font-size: 0.78rem; font-weight: 500; color: #64748b; font-variant-numeric: tabular-nums; }
@media (max-width: 991px) {
    .rq-row-v3 .rq-col-link { display: flex !important; grid-area: link; justify-self: start; padding-left: 50px; }
    .acc-header-v3.richieste-header-grid.rq-row-v3 { grid-template-areas: "who wait chevron" "link link link" "prop prop prop" "agent agent agent" "status status notif" !important; }
    .rq-bridge-v3 { width: auto; }
    .rq-bridge-v3.has-link::before { display: none; }
}
.richieste-header-bar-v3.rq-row-v3 .rq-col-link { justify-content: center; }
/* (tolto il codice sul collegamento) Codice del record in una colonna sua, all'inizio della riga; poi cliente » contesto */
@media (min-width: 992px) {
    .acc-header-v3.richieste-header-grid.rq-row-v3 { grid-template-columns: minmax(104px, max-content) minmax(190px, 280px) 32px minmax(180px, 320px) minmax(0, 1fr) minmax(0, 1.3fr) 64px 36px 28px !important; gap: 0 12px !important; }
}
.rq-col-id { display: flex; align-items: center; min-width: 0; }
.rq-col-link { align-self: center; }
@media (max-width: 991px) {
    .rq-row-v3 .rq-col-link { display: none !important; }
    .rq-row-v3 .rq-col-id { grid-area: id; }
    .acc-header-v3.richieste-header-grid.rq-row-v3 { grid-template-columns: minmax(0, 1fr) auto auto !important; grid-template-areas: "id wait chevron" "who who who" "prop prop prop" "agent agent agent" "status status notif" !important; }
}
/* ── Azioni di massa (MYB.Bulk, Richieste v3): casella a inizio riga (desktop), riga selezionata, barra scura in basso
   come la barra di selezione di iOS; i menu si aprono verso l'alto */
.bk-sel { display: none; }
@media (min-width: 992px) {
    .bk-on .acc-header-v3.richieste-header-grid.rq-row-v3 { grid-template-columns: 22px minmax(104px, max-content) minmax(190px, 280px) 32px minmax(180px, 320px) minmax(0, 1fr) minmax(0, 1.3fr) 64px 36px 28px !important; }
    .bk-sel { display: flex; align-items: center; justify-content: center; margin: 0; cursor: pointer; }
    .bk-sel input { width: 17px; height: 17px; margin: 0; accent-color: var(--primary, #582679); cursor: pointer; }
}
table.dataTable .rq-item-v3.is-selected { background: color-mix(in srgb, var(--primary, #582679) 7%, #ffffff) !important; }
.bk-bar { position: fixed; z-index: 1040; left: 50%; bottom: 22px; display: flex; align-items: center; gap: 6px; max-width: calc(100vw - 32px); padding: 8px 8px 8px 18px; border-radius: 16px;
    background: #1e1b2e; box-shadow: 0 18px 40px -12px rgba(15, 23, 42, 0.55); transform: translateX(-50%); color: #ffffff; animation: bk-in 0.18s ease-out; }
.bk-bar[hidden] { display: none; }
.bk-bar.is-busy { opacity: 0.7; pointer-events: none; }
@keyframes bk-in { from { opacity: 0; transform: translate(-50%, 8px); } }
@media (prefers-reduced-motion: reduce) { .bk-bar { animation: none; } }
.bk-count { font-size: 0.9rem; white-space: nowrap; }
.bk-count b { font-weight: 800; }
.bk-link { padding: 4px 8px; border: 0; border-radius: 8px; background: none; font-size: 0.84rem; font-weight: 600; color: #c4b5fd; cursor: pointer; white-space: nowrap; }
.bk-link:hover { background: rgba(255, 255, 255, 0.08); }
.bk-sep { width: 1px; height: 22px; margin: 0 4px; background: rgba(255, 255, 255, 0.18); }
.bk-btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, 0.08); font-size: 0.86rem; font-weight: 600; color: #ffffff; cursor: pointer; white-space: nowrap; }
.bk-btn:hover, .bk-btn[aria-expanded="true"] { background: rgba(255, 255, 255, 0.16); }
.bk-btn i, .bk-btn i::before { color: #ffffff !important; }
.bk-btn .fa-whatsapp, .bk-btn .fa-whatsapp::before { color: #4ade80 !important; }
.bk-x { width: 36px; height: 36px; border: 0; border-radius: 10px; background: none; color: #cbd5e1; cursor: pointer; }
.bk-x:hover { background: rgba(255, 255, 255, 0.1); color: #ffffff; }
.bk-x i::before { color: inherit !important; }
.bk-menu { min-width: 260px; max-width: 320px; margin-bottom: 10px !important; padding: 8px; border: 0; border-radius: 14px; box-shadow: 0 18px 40px -10px rgba(15, 23, 42, 0.35); }
.bk-menu-k { margin: 2px 6px 8px; font-size: 0.76rem; line-height: 1.35; color: #64748b; }
.bk-menu .dropdown-item { border-radius: 8px; font-size: 0.88rem; font-weight: 600; }
/* Commento / Attività (barra di massa e pulsanti rapidi della riga): un foglietto bianco, campi pieni grigi come la scheda */
.bk-form { width: 320px; max-width: calc(100vw - 24px); padding: 14px !important; background: #ffffff; }
.bk-form.bk-pop { position: fixed; z-index: 1060; display: block; border-radius: 16px; box-shadow: 0 18px 44px -12px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(15, 23, 42, 0.05); animation: bk-pop-in 0.14s ease-out; }
.bk-form.is-busy { opacity: 0.7; pointer-events: none; }
@keyframes bk-pop-in { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
@media (prefers-reduced-motion: reduce) { .bk-form.bk-pop { animation: none; } }
.bk-form-h { display: flex; align-items: center; gap: 9px; margin: 0 0 10px; font-size: 0.9rem; line-height: 1.25; color: #0f172a; }
.bk-form-h b { font-weight: 700; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bk-form-ico { flex: 0 0 auto; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: color-mix(in srgb, var(--primary, #582679) 10%, #ffffff); }
.bk-form-ico i, .bk-form-ico i::before { font-size: 0.8rem; color: var(--primary, #582679) !important; }
.bk-form .form-control { width: 100%; margin-bottom: 8px; border: 1px solid transparent !important; border-radius: 10px !important; background: #f3f4f7 !important; box-shadow: none !important; font-size: 0.88rem; color: #0f172a; }
.bk-form .form-control:focus { border-color: color-mix(in srgb, var(--primary, #582679) 45%, transparent) !important; background: #ffffff !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #582679) 14%, transparent) !important; }
.bk-form textarea.form-control { min-height: 76px; padding: 10px 12px; line-height: 1.4; resize: vertical; }
.bk-form select.form-control, .bk-form input[type="date"].form-control { height: 34px; padding: 0 10px; }
.bk-due { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.bk-due button { height: 28px; padding: 0 10px; border: 0; border-radius: 999px; background: #f3f4f7; font-size: 0.78rem; font-weight: 600; color: #334155; cursor: pointer; }
.bk-due button:hover { background: #e9eaf0; }
.bk-due button.is-on { background: var(--primary, #582679); color: #ffffff; }
.bk-due input[type="date"].form-control { flex: 1 1 120px; width: auto; height: 28px; margin: 0; border-radius: 999px !important; font-size: 0.78rem; }
.bk-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 2px; }
.bk-form-foot small { font-size: 0.74rem; color: #64748b; }
.bk-go { height: 34px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--primary, #582679); font-size: 0.86rem; font-weight: 700; color: #ffffff; cursor: pointer; }
.bk-go:hover { filter: brightness(1.08); }
.bk-go:focus-visible, .bk-due button:focus-visible { outline: 2px solid var(--primary, #582679); outline-offset: 2px; }
.bk-btn.is-icon { width: 36px; padding: 0; justify-content: center; }
/* su telefono la barra va a capo invece di uscire dallo schermo */
@media (max-width: 767.98px) { .bk-bar { left: 12px; right: 12px; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); flex-wrap: wrap; justify-content: center; max-width: none; padding: 8px; transform: none; animation: none; } .bk-count { flex: 1 0 100%; text-align: center; } .bk-sep { display: none; } }
.bk-tag-q { height: 34px; margin-bottom: 6px; font-size: 0.86rem; }
.bk-tag-list { max-height: 240px; margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.bk-tag-list li { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 8px; font-size: 0.86rem; color: #1e293b; }
.bk-tag-list li:hover { background: #f5f3fa; }
.bk-tag-list li > span { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bk-tag-list li button { flex: 0 0 auto; padding: 2px 8px; border: 1px solid rgba(15, 23, 42, 0.1); border-radius: 7px; background: #ffffff; font-size: 0.74rem; font-weight: 700; color: var(--primary, #582679); cursor: pointer; }
.bk-tag-list li button[data-op="untag"] { color: #64748b; }
.bk-tag-list li.is-new button { width: 100%; padding: 6px 8px; text-align: left; border-style: dashed; }
.bk-tag-list li.is-empty { color: #94a3b8; }
table.dataTable .rq-item-v3.monday-style.is-selected, table.dataTable .rq-item-v3.monday-style.is-selected[class*="status-border-"] { background: color-mix(in srgb, var(--primary, #582679) 8%, #ffffff) !important; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary, #582679) 22%, transparent); }
/* Selezione come in Mail / Foto: caselle e colonna solo in modalità selezione (.bk-mode, pulsante "Seleziona") */
@media (min-width: 992px) {
    .bk-on:not(.bk-mode) .bk-sel { display: none; }
    .bk-on:not(.bk-mode) .acc-header-v3.richieste-header-grid.rq-row-v3 { grid-template-columns: minmax(104px, max-content) minmax(190px, 280px) 32px minmax(180px, 320px) minmax(0, 1fr) minmax(0, 1.3fr) 64px 36px 28px !important; }
    .bk-mode .bk-sel input { width: 19px; height: 19px; border-radius: 50%; }
    .bk-mode .acc-header-v3 { cursor: pointer; }
}
.bk-toggle[aria-pressed="true"] { color: var(--primary, #582679) !important; font-weight: 700; }
.bk-btn:disabled { opacity: 0.4; cursor: default; }
/* Selezione: cerchi come in Mail / Foto (pieni col segno di spunta), riga selezionata ben visibile, pulsante senza bordo */
.bk-sel input { appearance: none; -webkit-appearance: none; display: inline-grid; place-items: center; width: 20px !important; height: 20px !important; border: 1.5px solid #b8bfcc; border-radius: 50%; background: #ffffff; transition: background 0.12s, border-color 0.12s; }
.bk-sel input:checked { border-color: var(--primary, #582679); background: var(--primary, #582679); }
.bk-sel input:checked::after { content: ''; width: 9px; height: 5px; margin-top: -2px; border: 2px solid #ffffff; border-top: 0; border-right: 0; transform: rotate(-45deg); }
.bk-sel input:indeterminate { border-color: var(--primary, #582679); background: var(--primary, #582679); }
.bk-sel input:indeterminate::after { content: ''; width: 9px; height: 2px; background: #ffffff; }
.bk-sel input:focus-visible { outline: 2px solid var(--primary, #582679); outline-offset: 2px; }
#buyerleads_dt .rq-item-v3.monday-style.is-selected, #buyerleads_dt .rq-item-v3.monday-style.is-selected[class*="status-border-"] { background: color-mix(in srgb, var(--primary, #582679) 8%, #ffffff) !important; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary, #582679) 25%, transparent); }
.bk-toggle { border: 0 !important; background: none !important; box-shadow: none !important; cursor: pointer; }
.richieste-header-bar-v3 .bk-sel, .richieste-header-bar-v3 .bk-sel input { pointer-events: auto !important; } /* il tema rende l'intestazione non cliccabile */
.bk-over { display: block; font-size: 0.72rem; font-weight: 600; color: #fbbf24; }
.bk-btn.is-danger { background: rgba(248, 113, 113, 0.14); color: #fecaca; }
.bk-btn.is-danger:hover { background: rgba(248, 113, 113, 0.26); }
.bk-btn.is-danger i, .bk-btn.is-danger i::before { color: #fca5a5 !important; }
/* Richieste: etichette della richiesta — icona con il numero accanto al codice (nomi al passaggio), chip nel dettaglio */
.rq-col-id { gap: 6px; }
.rq-tags-v3 { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border: 1px solid rgba(15, 23, 42, 0.1); border-radius: 999px; background: #ffffff; font-size: 0.74rem; font-weight: 700; color: #475569; cursor: default; }
.rq-tags-v3 i, .rq-tags-v3 i::before { font-size: 0.68rem; color: var(--primary, #582679) !important; }
.rq-tags-v3:hover, .rq-tags-v3:focus-visible { border-color: color-mix(in srgb, var(--primary, #582679) 35%, transparent); outline: none; }
.rq-tag-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rq-tag-chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--primary, #582679) 8%, #ffffff); font-size: 0.8rem; font-weight: 600; color: var(--primary, #582679); }
/* Richieste: l'icona etichette sta tra gli indicatori di fine riga, prima della campanella */
@media (min-width: 992px) {
    .bk-on:not(.bk-mode) .acc-header-v3.richieste-header-grid.rq-row-v3 { grid-template-columns: minmax(104px, max-content) minmax(190px, 280px) 32px minmax(180px, 320px) minmax(0, 1fr) minmax(0, 1.3fr) 64px minmax(36px, max-content) 28px !important; }
    .bk-on.bk-mode .acc-header-v3.richieste-header-grid.rq-row-v3 { grid-template-columns: 22px minmax(104px, max-content) minmax(190px, 280px) 32px minmax(180px, 320px) minmax(0, 1fr) minmax(0, 1.3fr) 64px minmax(36px, max-content) 28px !important; }
}
.rq-col-notif { display: flex !important; align-items: center; justify-content: flex-end; gap: 6px; }
@media (min-width: 992px) {
    .bk-on:not(.bk-mode) .acc-header-v3.richieste-header-grid.rq-row-v3 { grid-template-columns: minmax(104px, max-content) minmax(150px, 1.4fr) 32px minmax(140px, 1.3fr) minmax(0, 1fr) minmax(0, 1.3fr) 64px 84px 28px !important; }
    .bk-on.bk-mode .acc-header-v3.richieste-header-grid.rq-row-v3 { grid-template-columns: 22px minmax(104px, max-content) minmax(150px, 1.4fr) 32px minmax(140px, 1.3fr) minmax(0, 1fr) minmax(0, 1.3fr) 64px 84px 28px !important; }
}
/* Contatti: in modalità selezione la colonna del cerchio entra in testa alla griglia propria della lista */
@media (min-width: 992px) {
    .bk-on.bk-mode .contacts-grid-v3, .bk-on.bk-mode #contacts_dt .richieste-header-grid { grid-template-columns: 22px 120px minmax(0, 1.2fr) minmax(0, 1.4fr) auto 150px auto !important; }
}
/* Campagne Broadcast: colonne proprie come i Contatti. Canale ed etichetta sono corti, "Creata da" è una foto, lo stato e
   la data stanno interi (con quelle di Richieste, sotto i 1600px lo stato restava un cerchio senza nome) */
@media (min-width: 992px) {
    .results-panel-v3 .acc-header-v3.richieste-header-grid.rq-row-v3.broadcasts-grid-v3, #broadcaststable .acc-header-v3.richieste-header-grid.rq-row-v3 {
        grid-template-columns: minmax(104px, max-content) minmax(140px, 1.5fr) 32px minmax(120px, 1fr) 130px minmax(150px, max-content) 92px 36px 28px !important; }
}
/* sotto i 1500px lo spazio va al nome della campagna: "Creata da" è solo la foto (il nome nel suggerimento) e spariscono
   la » e la colonna delle notifiche, che questa lista lascia vuota */
@media (min-width: 992px) and (max-width: 1499px) {
    .results-panel-v3 .acc-header-v3.richieste-header-grid.rq-row-v3.broadcasts-grid-v3, #broadcaststable .acc-header-v3.richieste-header-grid.rq-row-v3 {
        grid-template-columns: minmax(104px, max-content) minmax(160px, 1.5fr) minmax(120px, 1fr) 48px minmax(150px, max-content) 92px 28px !important; }
    .broadcasts-grid-v3 > .rq-col-link, .broadcasts-grid-v3 > .rq-col-notif, #broadcaststable .rq-row-v3 > .rq-col-link, #broadcaststable .rq-row-v3 > .rq-col-notif { display: none !important; }
    #broadcaststable .rq-col-agent .consulente-name-v3 { display: none; }
}

/* Contatti v3: pulsanti rapidi nella riga (nuova attività, commento, opportunità, richiesta), tondi e leggeri */
.ct-quick-v3 { display: inline-flex; gap: 4px; }
.ct-quick-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 10px; background: #f3f4f7; color: #475569; cursor: pointer; transition: background 0.12s, color 0.12s; }
.ct-quick-btn i, .ct-quick-btn i::before { font-size: 0.82rem; color: inherit !important; }
.ct-quick-btn:hover, .ct-quick-btn:focus-visible { background: color-mix(in srgb, var(--primary, #582679) 12%, #ffffff); color: var(--primary, #582679); }
.ct-quick-btn:focus-visible { outline: 2px solid var(--primary, #582679); outline-offset: 2px; }
#contacts_dt .grid-col-agent { display: flex; justify-content: flex-end; }
.ct-quick-btn .fa-whatsapp, .ct-quick-btn .fa-whatsapp::before { color: #16a34a !important; }
/* Contatti v3 sul telefono: scheda a flex e non a griglia. Con la griglia di §27 i cinque pulsanti rapidi
   (riga in fondo) davano la larghezza alle colonne e il nome, nella prima riga, restava di una lettera */
@media (max-width: 767px) {
    #contacts_dt .acc-header-v3.richieste-header-grid { display: flex !important; flex-wrap: wrap; column-gap: 8px !important; }
    #contacts_dt .richieste-header-grid > .grid-col-id { order: 1; flex: 1 1 0; min-width: 0; }
    #contacts_dt .richieste-header-grid > .grid-col-status { order: 2; flex: 0 1 auto; max-width: 45%; }
    #contacts_dt .richieste-header-grid > .grid-col-property { order: 3; flex: 1 0 100%; }
    #contacts_dt .richieste-header-grid > .grid-col-buyid { order: 4; }
    #contacts_dt .richieste-header-grid > .grid-col-agent { order: 5; flex: 1 1 0; min-width: 0; }
    #contacts_dt .richieste-header-grid > .grid-col-chevron { order: 6; }
    /* con codici lunghi e schermi da 360px i pulsanti si stringono (min 26px) invece di mandare a capo la freccia */
    #contacts_dt .ct-quick-v3 { min-width: 0; }
    #contacts_dt .ct-quick-btn { flex: 0 1 32px; min-width: 26px; }
}

/* Richieste v3: le colonne cliente / immobile crescono in proporzione (griglia .bk-on sopra), non fino a un massimo fisso:
   con 280/320px la griglia riempiva prima quelle e a ~1400px col pannello aperto Consulente e Stato restavano a zero.
   Il limite resta sui riquadri; l'esito lungo si accorcia con i puntini */
@media (min-width: 992px) {
    .rq-row-v3 .rq-col-who .mini-client-card-v3 { max-width: 300px; }
    .rq-row-v3 .rq-col-prop .mini-property-card-v3 { max-width: 340px; }
    .rq-row-v3 .rq-col-status .c3-status-btn { max-width: 100%; }
    .rq-row-v3 .rq-col-status .c3-status-btn > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* Attività v3 in modalità selezione (MYB.Bulk): il cerchio di selezione prende il posto della spunta "fatta" */
@media (min-width: 992px) {
    .bk-on.bk-mode .acc-header-v3.task-row-v3 > .task-col-check { display: none; }
}

/* ── Scheda Ticket v3 (views/TicketsV2_Card_v3.php, DESIGN.md §42): testata bianca come le schede v3 (codice, titolo,
   chi e quando, stato col suo menu) con la richiesta dentro; sotto la conversazione nella cartella azzurra e gli allegati
   nella menta, come "Commento o attività" e "Allegati" delle schede */
.tk3 { --tk-line: #e9edf3; --c3-line: #e9edf3; --tk-ink: #1c2434; --tk-mute: #64748b; display: flex; flex-direction: column; gap: 22px; max-width: 1280px; padding-top: 8px; }
.tk3-head { padding: 22px 24px 24px; border: 1px solid var(--tk-line); border-radius: 20px; background: #ffffff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); }
.tk3-head-top { display: flex; align-items: flex-start; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--tk-line); }
.tk3-head-main { flex: 1 1 auto; min-width: 0; }
.tk3-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 0.82rem; font-weight: 600; color: var(--tk-mute); }
.tk3-code { padding: 2px 9px; border-radius: 7px; background: #f1f5f9; font-size: 0.8rem; font-weight: 700; color: #475569; font-variant-numeric: tabular-nums; }
.tk3-sep { margin: 0 4px; font-size: 0.6rem; opacity: 0.6; }
.tk3-title { margin: 0; font-size: 1.5rem; font-weight: 800; line-height: 1.2; letter-spacing: -0.015em; color: var(--tk-ink); text-transform: none; overflow-wrap: anywhere; }
.tk3-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 10px 0 0; font-size: 0.86rem; color: var(--tk-mute); }
.tk3-meta b { font-weight: 700; color: var(--tk-ink); }
.tk3-dot { color: #cbd5e1; }
.tk3-status { flex: 0 0 auto; }
.tk3-status .c3-status-btn { flex: 0 0 auto; }
.tk3-desc { margin-top: 18px; max-width: 80ch; font-size: 0.98rem; line-height: 1.6; color: #334155; overflow-wrap: anywhere; }
.tk3-muted { color: #94a3b8; }
.tk3-av { flex: 0 0 auto; width: 34px; height: 34px; font-size: 0.72rem; }
.tk3-av.is-sm { width: 22px; height: 22px; font-size: 0.56rem; }
.tk3-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.tk3-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.7); font-size: 0.74rem; font-weight: 800; }
/* conversazione: come Messaggi, in ordine di tempo, la risposta in fondo; le proprie con un fondo appena più chiaro */
.tk3-thread { display: flex; flex-direction: column; gap: 10px; max-height: 560px; margin: 0 0 14px; padding: 0; overflow-y: auto; list-style: none; }
.tk3-msg { display: flex; align-items: flex-start; gap: 10px; }
.tk3-msg-body { min-width: 0; padding: 10px 14px 12px; border-radius: 4px 16px 16px 16px; background: #ffffff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05); }
.tk3-msg.is-mine { flex-direction: row-reverse; }
.tk3-msg.is-mine .tk3-msg-body { border-radius: 16px 4px 16px 16px; background: color-mix(in srgb, var(--primary, #582679) 9%, #ffffff); }
.tk3-msg.is-mine .tk3-msg-head { justify-content: flex-end; }
.tk3-msg-head { display: flex; align-items: baseline; gap: 8px; margin: 0 0 3px; font-size: 0.8rem; color: var(--tk-mute); }
.tk3-msg-head b { font-weight: 700; color: var(--tk-ink); }
.tk3-msg-text { font-size: 0.92rem; line-height: 1.5; color: #1f2937; overflow-wrap: anywhere; }
.tk3-empty { margin: 0 0 14px; font-size: 0.88rem; color: var(--f-ink, #1e3a8a); opacity: 0.85; }
.tk3-compose { display: flex; align-items: flex-end; gap: 10px; }
.tk3-compose-box { display: flex; flex: 1 1 auto; align-items: flex-end; gap: 6px; min-width: 0; padding: 6px 6px 6px 6px; border: 1px solid transparent; border-radius: 22px; background: #ffffff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06); transition: border-color 0.15s, box-shadow 0.15s; }
.tk3-compose-box:focus-within { border-color: color-mix(in srgb, var(--primary, #582679) 40%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #582679) 12%, transparent); }
.tk3-compose textarea { flex: 1 1 auto; min-width: 0; min-height: 34px; max-height: 260px; padding: 7px 0; border: 0; background: transparent; font-size: 0.92rem; line-height: 1.45; color: var(--tk-ink); resize: none; outline: none; }
.tk3-clip { flex: 0 0 auto; display: grid; place-items: center; width: 34px; height: 34px; margin: 0; border-radius: 50%; color: #64748b; cursor: pointer; }
.tk3-clip:hover { background: #f1f5f9; color: var(--tk-ink); }
.tk3-clip i::before { color: inherit !important; }
.tk3-send { flex: 0 0 auto; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: var(--primary, #582679); color: #ffffff; cursor: pointer; transition: opacity 0.15s, transform 0.15s; }
.tk3-send i, .tk3-send i::before { color: #ffffff !important; }
.tk3-send:disabled { opacity: 0.35; cursor: default; }
.tk3-send:not(:disabled):hover { transform: scale(1.06); }
.tk3-send:focus-visible { outline: 2px solid var(--primary, #582679); outline-offset: 2px; }
.tk3-hint { margin: 8px 0 0 14px; font-size: 0.76rem; color: var(--f-ink, #1e3a8a); opacity: 0.75; }
/* allegati: righe bianche con l'icona tinta del tipo; aggiungere è una riga tratteggiata leggera, non un'area enorme */
.tk3-files { display: flex; flex-direction: column; gap: 6px; margin: 0 0 10px; padding: 0; list-style: none; }
.tk3-file { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border-radius: 12px; background: #ffffff; }
/* --tk-ft, non --ft: quella è registrata dal menu (@property, lunghezza) e un colore lì dentro diventa 0px */
.tk3-file-ico { position: relative; flex: 0 0 auto; display: grid; place-items: center; width: 38px; height: 38px; overflow: hidden; border-radius: 9px; background: color-mix(in srgb, var(--tk-ft) 12%, #ffffff); }
.tk3-file-ico i, .tk3-file-ico i::before { color: var(--tk-ft) !important; }
.tk3-file-ico img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #ffffff; }
.tk3-file-ico.is-thumb { box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08); }
.tk3-file-main { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; color: inherit !important; text-decoration: none !important; }
.tk3-file-main b { overflow: hidden; font-size: 0.86rem; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; color: var(--tk-ink); }
.tk3-file-main small { font-size: 0.74rem; color: var(--tk-mute); }
.tk3-file-main:hover b { text-decoration: underline; }
.tk3-icon-btn { flex: 0 0 auto; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #64748b !important; cursor: pointer; }
.tk3-icon-btn i::before { color: inherit !important; }
.tk3-icon-btn:hover { background: #f1f5f9; color: var(--tk-ink) !important; }
.tk3-icon-btn.is-danger:hover { background: #fee2e2; color: #b91c1c !important; }
.tk3-drop .file-upload-label { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin: 0; padding: 12px; border: 1.5px dashed color-mix(in srgb, var(--f-ink, #14532d) 30%, transparent); border-radius: 12px; background: rgba(255, 255, 255, 0.55); font-size: 0.84rem; color: var(--f-ink, #14532d); cursor: pointer; transition: background 0.15s; }
.tk3-drop .file-upload-label:hover, .tk3-drop .file-upload-label.drag-over { background: #ffffff; }
.tk3-drop .file-upload-label b { font-weight: 700; }
.tk3-drop .file-input-hidden { display: block; position: absolute; width: 1px; height: 1px; opacity: 0; }
.tk3-drop .file-input-hidden:focus-visible + .file-upload-label { outline: 2px solid var(--f-ink, #14532d); outline-offset: 2px; }
.tk3-upl .file-item { margin-top: 6px; border: 0 !important; border-radius: 10px !important; background: #ffffff; font-size: 0.8rem; }
.tk3-note { margin: 10px 2px 0; font-size: 0.74rem; line-height: 1.4; color: var(--f-ink, #14532d); opacity: 0.75; }
.tk3-classic { display: inline-block; margin: 12px 4px 0; font-size: 0.78rem; color: #94a3b8 !important; }
@media (max-width: 991.98px) {
    .tk3-grid { grid-template-columns: minmax(0, 1fr); }
    .tk3-head { padding: 18px; }
    .tk3-head-top { flex-direction: column; }
    .tk3-status, .tk3-status .c3-status-btn { width: 100%; }
    .tk3-title { font-size: 1.3rem; }
}

/* ── Scheda Campagna Broadcast v3 (views/broadcasts_card_v3.php, DESIGN.md §49): la testata è quella del Ticket v3
   (classi tk3-) con i numeri e l'azione del momento in fondo; sotto il messaggio (cartella azzurra) e i destinatari (lilla) */
.bc3-status { flex: 0 0 auto; }
.bc3-start { font-weight: 700; color: var(--tk-ink) !important; border-bottom: 1px dashed currentColor; text-decoration: none !important; }
.bc3-note { display: flex; align-items: flex-start; gap: 10px; margin: 16px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--tone-bg); font-size: 0.86rem; line-height: 1.45; color: var(--tone-fg); }
.bc3-note i { margin-top: 3px; }
.bc3-note i::before { color: inherit !important; }
.bc3-note a { font-weight: 700; color: inherit !important; text-decoration: underline; }
.bc3-sum { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin-top: 18px; }
.bc3-nums { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; }
.bc3-num dt { font-size: 0.76rem; font-weight: 600; color: var(--tk-mute); }
.bc3-num dd { margin: 0; font-size: 1.5rem; font-weight: 800; line-height: 1.15; color: var(--tk-ink); font-variant-numeric: tabular-nums; }
.bc3-num.is-ok dd { color: #15803d; }
.bc3-num.is-bad dd { color: #dc2626; }
.bc3-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.bc3-bar { display: flex; height: 6px; margin-top: 14px; overflow: hidden; border-radius: 999px; background: #eef1f6; }
.bc3-bar .is-ok { background: #22c55e; }
.bc3-bar .is-bad { background: #ef4444; }
.bc3-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.bc3-form .form-group label { font-size: 0.8rem; font-weight: 600; color: var(--f-ink, #1e3a8a); }
.bc3-form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 14px; }
.bc3-hint { margin: 0; font-size: 0.78rem; color: var(--f-ink, #1e3a8a); opacity: 0.8; }
.bc3-media { margin: 12px 0 0; }
.bc3-name { margin: 0 -4px; padding: 0 4px; border-radius: 8px; outline: none; cursor: text; transition: background 0.15s, box-shadow 0.15s; }
.bc3-name:hover { background: rgba(15, 23, 42, 0.05); }
.bc3-name:focus { background: #ffffff; box-shadow: 0 0 0 2px var(--primary, #582679); }
/* destinatari: filtri per stato e ricerca, poi righe bianche (chi, codice e recapito, stato, l'unica azione possibile) */
.bc3-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.bc3-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.bc3-filter { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.6); font-size: 0.8rem; font-weight: 600; color: var(--f-ink, #4c1d95); cursor: pointer; transition: background 0.15s; }
.bc3-filter span { font-weight: 800; font-variant-numeric: tabular-nums; opacity: 0.7; }
.bc3-filter:hover { background: #ffffff; }
.bc3-filter.is-on { background: var(--f-ink, #4c1d95); color: #ffffff; }
.bc3-filter:focus-visible { outline: 2px solid var(--f-ink, #4c1d95); outline-offset: 2px; }
.bc3-search { display: flex; flex: 1 1 180px; align-items: center; gap: 8px; min-height: 36px; margin: 0; padding: 0 12px; border-radius: 999px; background: #ffffff; color: var(--tk-mute); }
.bc3-search:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #582679) 14%, transparent); }
.bc3-search input { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; font-size: 0.86rem; color: var(--tk-ink); outline: none; }
.bc3-list { display: flex; flex-direction: column; gap: 6px; max-height: 620px; margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.bc3-row { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border-radius: 12px; background: #ffffff; }
.bc3-row[hidden] { display: none; }
.bc3-row.is-off .bc3-who { opacity: 0.55; }
.bc3-who { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; color: inherit !important; text-decoration: none !important; }
.bc3-who b { overflow: hidden; font-size: 0.88rem; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; color: var(--tk-ink); }
.bc3-who small { overflow: hidden; font-size: 0.76rem; white-space: nowrap; text-overflow: ellipsis; color: var(--tk-mute); font-variant-numeric: tabular-nums; }
.bc3-who:hover b { text-decoration: underline; }
.bc3-row .pill-v3 { flex: 0 0 auto; }
.bc3-btn-gap { flex: 0 0 30px; }
.bc3-empty { margin: 0; font-size: 0.88rem; color: var(--f-ink, #4c1d95); }
@media (max-width: 1199.98px) { .bc3-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 991.98px) {
    .bc3-list { max-height: none; }
    .bc3-acts { width: 100%; }
    .bc3-acts .btn-primary-v3 { flex: 1 1 auto; }
}

/* ── Scheda Incarico v3 (views/property_v3.php, MYB.PropertyCard.js, DESIGN.md §43) ──
   Testata bianca: foto, codice · contratto · categoria, l'indirizzo come titolo, i numeri dell'immobile, prezzo e
   valutazione modificabili, chi lo segue e la scadenza; le azioni frequenti in vista. Sotto: il lavoro a sinistra,
   l'incarico a destra (note gialle, proprietario, cartella lilla dell'incarico, ribassi e rinnovi, automazioni) */
.pr3 { --tk-line: #e9edf3; --tk-ink: #1c2434; --tk-mute: #64748b; display: flex; flex-direction: column; gap: 20px; max-width: 1360px; padding-top: 8px; }
.pr3-head { display: flex; align-items: flex-start; gap: 22px; padding: 20px; border: 1px solid var(--tk-line); border-radius: 22px; background: #ffffff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); }
.pr3-cover { position: relative; flex: 0 0 auto; display: grid; place-items: center; width: 200px; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 16px; background: linear-gradient(135deg, #f1f5f9, #e2e8f0); }
.pr3-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pr3-cover i, .pr3-cover i::before { font-size: 2rem; color: #cbd5e1 !important; }
.pr3-head-main { flex: 1 1 auto; min-width: 0; }
.pr3-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 0.82rem; font-weight: 600; color: var(--tk-mute); }
.pr3-title { margin: 0; font-size: 1.55rem; font-weight: 800; line-height: 1.2; letter-spacing: -0.015em; color: var(--tk-ink); text-transform: none; overflow-wrap: anywhere; }
.pr3-title span { font-weight: 600; color: var(--tk-mute); }
.pr3-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 6px 0 0; font-size: 0.9rem; color: #334155; }
.pr3-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin: 12px 0 0; }
.pr3-price > b, .pr3-price > b.editable-input-with-pencil { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.01em; color: var(--tk-ink); font-variant-numeric: tabular-nums; }
.pr3-val { display: inline-flex; align-items: baseline; gap: 6px; font-size: 0.86rem; color: var(--tk-mute); }
.pr3-val b { font-weight: 700; color: #334155; }
.pr3-delta { padding: 1px 8px; border-radius: 999px; font-size: 0.74rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.pr3-delta.is-ok { background: var(--st-ok-soft, #dcfce7); color: var(--st-ok-ink, #14532d); }
.pr3-delta.is-high { background: var(--st-pending-soft, #fef3c7); color: var(--st-pending-ink, #92400e); }
.pr3-delta.is-low { background: var(--st-follow-soft, #e0f2fe); color: var(--st-follow-ink, #075985); }
.pr3-pen { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-left: 2px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: #64748b; cursor: pointer; vertical-align: 2px; }
.pr3-pen:hover, .pr3-pen:focus-visible { background: #f1f5f9; color: var(--primary, #582679); }
.pr3-pen i { font-size: 0.76rem; }
.pr3-pen i::before { color: inherit !important; }
.pr3-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 10px 0 0; font-size: 0.86rem; color: var(--tk-mute); }
.pr3-meta b { font-weight: 700; color: var(--tk-ink); }
.pr3-av { width: 24px; height: 24px; font-size: 0.6rem; }
.pr3-exp { font-weight: 600; }
.pr3-exp.is-soon { color: var(--st-pending-dark, #d97706); }
.pr3-exp.is-late { padding: 1px 8px; border-radius: 999px; background: var(--st-lost-soft, #fee2e2); color: var(--st-lost-ink, #7f1d1d); }
.pr3-status { flex: 0 0 auto !important; min-height: 36px !important; cursor: default !important; }
.pr3-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pr3-btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border: 1px solid var(--tk-line); border-radius: 10px; background: #ffffff; font-size: 0.86rem; font-weight: 600; color: var(--tk-ink) !important; text-decoration: none !important; white-space: nowrap; cursor: pointer; transition: background 0.12s, border-color 0.12s; }
.pr3-btn:hover { background: #f8fafc; border-color: #d5dbe5; }
.pr3-btn i, .pr3-btn i::before { color: inherit !important; }
.pr3-btn.is-primary { border-color: transparent; background: var(--primary, #582679); color: #ffffff !important; }
.pr3-btn.is-primary:hover { filter: brightness(1.08); }
.pr3-btn.is-icon { width: 36px; padding: 0; justify-content: center; }
.pr3-btn.is-small { height: 30px; padding: 0 11px; border-radius: 9px; font-size: 0.8rem; }
.pr3-btn.is-wa { color: #15803d !important; }
.pr3-btn:focus-visible, .pr3-seg-btn:focus-visible, .pr3-tick:focus-visible { outline: 2px solid var(--primary, #582679); outline-offset: 2px; }
.pr3-menu { padding: 6px; border: 0; border-radius: 14px; box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16); }
.pr3-menu .dropdown-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 0.86rem; font-weight: 600; }
.pr3-menu .dropdown-item i { width: 16px; text-align: center; color: #64748b; }
.pr3-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.pr3-main, .pr3-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.pr3-card { padding: 18px 20px; border: 1px solid var(--tk-line); border-radius: 20px; background-color: #ffffff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); }
.pr3-card.is-saving, .pr3-side .c3-folder.is-saving { opacity: 0.7; }
.pr3-label { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; font-size: 1rem; font-weight: 800; letter-spacing: -0.005em; color: var(--tk-ink); text-transform: none; }
.pr3-label.is-sub { margin: 14px 0 8px; font-size: 0.78rem; font-weight: 700; color: var(--tk-mute); }
.pr3-empty { margin: 4px 0; font-size: 0.86rem; color: #94a3b8; }
.pr3-foot { margin: 10px 0 0; font-size: 0.78rem; color: var(--tk-mute); }
.pr3-link { padding: 0; border: 0; background: none; font-size: 0.84rem; font-weight: 700; color: var(--primary, #582679) !important; cursor: pointer; }
/* andamento: numeri grandi, 0 attenuato (non "-") */
.pr3-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.pr3-kpi { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; background: #f7f8fb; }
.pr3-kpi b { font-size: 1.6rem; font-weight: 800; line-height: 1.1; color: var(--tk-ink); font-variant-numeric: tabular-nums; }
.pr3-kpi span { font-size: 0.8rem; font-weight: 600; color: #475569; }
.pr3-kpi small { font-size: 0.72rem; color: var(--tk-mute); }
.pr3-kpi.is-zero b { color: #cbd5e1; }
/* lavorazione: una barra segmentata e una lista */
.pr3-work-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.pr3-work-head .pr3-label { margin: 0; }
.pr3-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 12px; background: #f1f3f7; }
.pr3-seg-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; font-size: 0.84rem; font-weight: 600; color: #475569; cursor: pointer; }
.pr3-seg-btn.is-on { background: #ffffff; color: var(--tk-ink); box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12); }
.pr3-seg-n { font-size: 0.74rem; font-weight: 800; color: #94a3b8; font-variant-numeric: tabular-nums; }
.pr3-seg-n:empty { display: none; }
.pr3-work-tools, .pr3-row-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.pr3-search { display: flex; flex: 1 1 220px; align-items: center; gap: 8px; height: 34px; margin: 0; padding: 0 12px; border-radius: 10px; background: #f3f4f7; }
.pr3-search i { font-size: 0.8rem; color: #94a3b8; }
.pr3-search input { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; font-size: 0.86rem; outline: none; }
.pr3-search:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #582679) 14%, transparent); background: #ffffff; }
.pr3-toggle { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 0.82rem; font-weight: 600; color: #475569; cursor: pointer; }
.pr3-toggle input { width: 16px; height: 16px; accent-color: var(--primary, #582679); }
.pr3-list { display: flex; flex-direction: column; }
.pr3-row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 6px; border-top: 1px solid var(--tk-line); color: inherit !important; text-decoration: none !important; }
.pr3-list > .pr3-row:first-child { border-top: 0; }
a.pr3-row:hover { background: #f8fafc; border-radius: 12px; }
.pr3-row.is-off { opacity: 0.6; }
.pr3-row-main { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; }
.pr3-row-main b { overflow: hidden; font-size: 0.9rem; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; color: var(--tk-ink); }
.pr3-row-main small { overflow: hidden; font-size: 0.78rem; white-space: nowrap; text-overflow: ellipsis; color: var(--tk-mute); }
.pr3-when { flex: 0 0 auto; min-width: 64px; font-size: 0.8rem; color: var(--tk-mute); text-align: right; font-variant-numeric: tabular-nums; }
.pr3-chev { font-size: 0.7rem; color: #cbd5e1; }
.pr3-pill { flex: 0 0 auto; max-width: 190px; overflow: hidden; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--st) 14%, #ffffff); font-size: 0.74rem; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; color: color-mix(in srgb, var(--st) 70%, #0f172a); }
.pr3-date { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: #f1f5f9; line-height: 1; }
.pr3-date b { font-size: 1.05rem; font-weight: 800; color: var(--tk-ink); }
.pr3-date small { margin-top: 2px; font-size: 0.66rem; font-weight: 700; text-transform: uppercase; color: var(--st-lost, #dc2626); }
.pr3-tick { flex: 0 0 auto; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 1.5px solid #cbd5e1; border-radius: 50%; background: #ffffff; color: transparent; cursor: pointer; }
.pr3-tick i::before { color: inherit !important; }
.pr3-tick:hover { border-color: var(--st-ok, #16a34a); color: var(--st-ok, #16a34a); }
.pr3-row.is-done .pr3-tick { border-color: var(--st-ok, #16a34a); background: var(--st-ok, #16a34a); color: #ffffff; cursor: default; }
.pr3-row.is-done .pr3-row-main b { color: var(--tk-mute); text-decoration: line-through; }
.pr3-lock { margin-right: 6px; font-size: 0.72rem; color: #94a3b8; }
.pr3-comment { margin-top: 4px; padding: 4px 10px; border-radius: 10px; background: #f7f8fb; font-size: 0.8rem; color: #334155; }
.pr3-more { margin: 10px auto 0; padding: 6px 14px; border: 0; border-radius: 999px; background: #f1f3f7; font-size: 0.82rem; font-weight: 700; color: #475569; cursor: pointer; }
.pr3-skel { height: 48px; margin: 6px 0; border-radius: 12px; background: linear-gradient(90deg, #f1f5f9 25%, #f8fafc 50%, #f1f5f9 75%); background-size: 200% 100%; animation: pr3-sk 1.2s linear infinite; }
@keyframes pr3-sk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .pr3-skel { animation: none; } }
/* istruttoria e marketing: gruppi per livello, riga con nome, annotazione e stato */
.pr3-group { margin: 14px 0 4px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #94a3b8; }
.pr3-group:first-child { margin-top: 0; }
.pr3-check { display: flex; align-items: center; gap: 12px; padding: 8px 6px; border-top: 1px solid var(--tk-line); }
.pr3-check.is-saving { opacity: 0.6; }
.pr3-check-main { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; }
.pr3-check-main b { font-size: 0.88rem; font-weight: 700; color: var(--tk-ink); }
.pr3-note-ed { align-self: flex-start; font-size: 0.8rem; color: var(--tk-mute) !important; border-bottom: 1px dashed #cbd5e1 !important; text-decoration: none !important; }
.pr3-select { flex: 0 0 auto; max-width: 210px; height: 32px; padding: 0 10px; border: 1px solid var(--tk-line); border-radius: 9px; background: #ffffff; font-size: 0.8rem; font-weight: 600; color: var(--tk-ink); }
.pr3-report { margin-top: 12px; padding-top: 4px; border-top: 1px solid var(--tk-line); }
.pr3-area, .pr3-input { border: 1px solid transparent !important; border-radius: 10px !important; background: #f3f4f7 !important; box-shadow: none !important; font-size: 0.88rem; }
.pr3-area:focus, .pr3-input:focus { background: #ffffff !important; border-color: color-mix(in srgb, var(--primary, #582679) 40%, transparent) !important; }
.pr3-report .pr3-btn { margin-top: 8px; }
/* descrizione, scheda tecnica, foto, portali */
.pr3-desc { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 4; -webkit-box-orient: vertical; max-width: 80ch; font-size: 0.95rem; line-height: 1.6; color: #334155; }
.pr3-desc.is-open { display: block; -webkit-line-clamp: unset; }
.pr3-fold > summary { display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; }
.pr3-fold > summary::-webkit-details-marker { display: none; }
.pr3-fold > summary::after { content: '\f078'; margin-left: auto; font-family: 'Font Awesome 6 Free'; font-size: 0.72rem; font-weight: 900; color: #94a3b8; transition: transform 0.15s; }
.pr3-fold[open] > summary::after { transform: rotate(180deg); }
.pr3-fold > summary .pr3-label { margin: 0; }
.pr3-fold[open] > summary { margin-bottom: 12px; }
.pr3-fold-n { font-size: 0.76rem; font-weight: 800; color: #94a3b8; }
.pr3-tech { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 18px; margin: 0; }
.pr3-tech dt { font-size: 0.74rem; font-weight: 600; color: var(--tk-mute); }
.pr3-tech dd { margin: 0; font-size: 0.88rem; font-weight: 600; color: var(--tk-ink); }
.pr3-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.pr3-chips span { padding: 3px 10px; border-radius: 999px; background: #f1f5f9; font-size: 0.8rem; color: #334155; }
.pr3-photos { display: flex; gap: 8px; margin-bottom: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.pr3-photos a { flex: 0 0 auto; scroll-snap-align: start; }
.pr3-photos img { display: block; width: 180px; height: 128px; border-radius: 12px; object-fit: cover; background: #f1f5f9; }
.pr3-table { overflow-x: auto; }
.pr3-table table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.pr3-table th { padding: 6px 8px; font-size: 0.72rem; font-weight: 700; color: var(--tk-mute); text-align: left; white-space: nowrap; }
.pr3-table td { padding: 8px; border-top: 1px solid var(--tk-line); vertical-align: top; }
.pr3-table td small { display: block; font-size: 0.7rem; color: var(--tk-mute); }
/* colonna destra */
.pr3-side .c3-folder-body { padding: 14px 16px; }
.pr3-note { width: 100%; min-height: 96px; border: 0 !important; background: rgba(255, 255, 255, 0.6) !important; border-radius: 12px !important; font-size: 0.9rem; line-height: 1.5; color: #3b3423; resize: vertical; box-shadow: none !important; }
.pr3-owner { display: flex; align-items: center; gap: 12px; padding: 8px; margin: -4px -8px 8px; border-radius: 14px; color: inherit !important; text-decoration: none !important; }
a.pr3-owner:hover { background: #f8fafc; }
.pr3-owner > span:nth-child(2) { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; }
.pr3-owner b { font-size: 0.95rem; font-weight: 700; color: var(--tk-ink); }
.pr3-owner small { overflow: hidden; font-size: 0.8rem; white-space: nowrap; text-overflow: ellipsis; color: var(--tk-mute); }
.pr3-owner > i { font-size: 0.7rem; color: #cbd5e1; }
.pr3-owner-av { flex: 0 0 auto; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: color-mix(in srgb, var(--primary, #582679) 12%, #ffffff); font-size: 0.8rem; font-weight: 800; color: var(--primary, #582679); }
.pr3-owner-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.pr3-inline { margin-top: 10px; }
.pr3-inline > summary { font-size: 0.8rem; font-weight: 700; color: var(--primary, #582679); cursor: pointer; }
.pr3-inline[open] > summary { margin-bottom: 8px; }
.pr3-facts-list { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.pr3-fact { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; }
.pr3-fact dt { font-size: 0.8rem; font-weight: 600; color: color-mix(in srgb, var(--f-ink, #4c1d95) 75%, #64748b); }
.pr3-fact dd { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 0.88rem; font-weight: 700; color: var(--tk-ink); }
.pr3-fact.is-wide { flex-direction: column; align-items: stretch; }
/* Accesso proprietario (DESIGN.md §52): chi è e i pulsanti del link, o l'email per crearlo */
.pr3-sacc { flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.pr3-sacc.is-saving { opacity: 0.6; pointer-events: none; }
.pr3-sacc-new { display: flex; flex: 1 1 100%; gap: 6px; margin: 0; }
.pr3-sacc-new input { flex: 1 1 auto; min-width: 0; }
.pr3-sacc-hint, .pr3-sacc-who small, .pr3-sacc-acts small { font-size: 0.78rem; font-weight: 500; color: var(--tk-mute); }
.pr3-sacc-who { display: flex; flex-direction: column; min-width: 0; }
.pr3-sacc-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.pr3-owner-sacc { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--tk-line); border-radius: 0; transition: box-shadow 0.3s ease; }
.pr3-owner-sacc h4 { margin: 0 0 8px; font-size: 0.8rem; font-weight: 700; color: var(--tk-ink); }
.pr3-owner-sacc .pr3-sacc { display: flex; }
/* appena collegato il contatto: l'accesso proposto, evidenziato */
.pr3-owner-sacc.is-ask { margin: 12px -8px 0; padding: 12px 8px 10px; border-top-color: transparent; border-radius: 12px; box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary, #582679) 35%, transparent); }
.pr3-fact dt small { font-weight: 500; color: var(--tk-mute); }
.pr3-fact.is-wide dd { display: block; }
.pr3-fact .select2-container .select2-selection { border-radius: 10px !important; background: rgba(255, 255, 255, 0.75) !important; }
.pr3-mini-seg { display: inline-flex; padding: 2px; border-radius: 8px; background: rgba(255, 255, 255, 0.6); }
.pr3-mini-seg label { margin: 0; padding: 1px 8px; border-radius: 6px; font-size: 0.74rem; font-weight: 800; color: #64748b; cursor: pointer; }
.pr3-mini-seg label.is-on { background: #ffffff; color: var(--f-ink, #4c1d95); box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1); }
.pr3-mini-seg input { position: absolute; opacity: 0; pointer-events: none; }
.pr3-keys { flex-wrap: wrap; justify-content: flex-end; }
.pr3-keys .pr3-input { width: 110px; height: 30px; background: rgba(255, 255, 255, 0.75) !important; }
.pr3-fact.is-wide .pr3-input { height: 32px; background: rgba(255, 255, 255, 0.75) !important; }
.pr3-hist, .pr3-autos { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.pr3-hist li, .pr3-autos li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--tk-line); font-size: 0.86rem; }
.pr3-hist li:first-child, .pr3-autos li:first-child { border-top: 0; }
.pr3-price-chg { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.pr3-price-chg s { color: #94a3b8; }
.pr3-price-chg i { font-size: 0.66rem; color: #94a3b8; }
.pr3-autos li > span { display: flex; flex-direction: column; min-width: 0; }
.pr3-autos b { font-size: 0.84rem; font-weight: 700; color: var(--tk-ink); }
.pr3-autos small { font-size: 0.74rem; color: var(--tk-mute); }
@media (max-width: 1199.98px) { .pr3-grid { grid-template-columns: minmax(0, 1fr) 330px; } }
@media (max-width: 991.98px) {
    .pr3-grid { grid-template-columns: minmax(0, 1fr); }
    .pr3-head { position: relative; flex-direction: column; }
    .pr3-cover { width: 100%; aspect-ratio: 16 / 9; }
    .pr3-status { position: absolute; top: 30px; right: 30px; box-shadow: 0 6px 16px rgba(15, 23, 42, 0.2); }
    .pr3-title { font-size: 1.3rem; }
    .pr3-when { display: none; }
}
.pr3 .editable-empty, .pr3 .editable-empty:hover { color: #94a3b8 !important; font-style: normal !important; font-weight: 600; }
.pr3-check[data-tone="1"] .pr3-select { border-color: color-mix(in srgb, var(--st-ok) 40%, transparent); background: var(--st-ok-soft, #dcfce7); }
/* Incarico v3: collegare il proprietario (ricerca per nome, cellulare, email; righe leggibili, mai l'ID nudo) */
.pr3-cpick-wrap { margin-top: 10px; }
.pr3-cpick { margin-top: 10px; }
.pr3-cpick .pr3-search { flex: none; }
.pr3-cpick-list { display: flex; flex-direction: column; gap: 2px; max-height: 300px; margin: 8px 0 0; padding: 0; overflow-y: auto; list-style: none; }
.pr3-cpick-list button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: 0; border-radius: 12px; background: transparent; text-align: left; cursor: pointer; }
.pr3-cpick-list button:hover, .pr3-cpick-list button:focus-visible { background: #f5f3fa; outline: none; }
.pr3-cpick-list button:disabled { cursor: default; opacity: 0.75; }
.pr3-cpick-list .pr3-owner-av { width: 34px; height: 34px; font-size: 0.72rem; }
.pr3-cpick-txt { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; }
.pr3-cpick-txt b { overflow: hidden; font-size: 0.88rem; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; color: var(--tk-ink); }
.pr3-cpick-txt small { overflow: hidden; font-size: 0.76rem; white-space: nowrap; text-overflow: ellipsis; color: var(--tk-mute); }
.pr3-cpick-go { flex: 0 0 auto; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--primary, #582679) 10%, #ffffff); font-size: 0.74rem; font-weight: 800; color: var(--primary, #582679); }
.pr3-cpick-cur { flex: 0 0 auto; font-size: 0.74rem; font-weight: 700; color: var(--st-ok, #16a34a); }
.pr3-cpick-hint { padding: 8px; font-size: 0.82rem; color: #94a3b8; }
.pr3-cpick-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--tk-line); }
.pr3-cpick-foot .pr3-link { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; }
.pr3-link.is-danger { color: var(--st-lost, #dc2626) !important; }

/* Incarico v3, disposizione della classica (richiesta dell'utente: stessa struttura di prima, aspetto nuovo):
   striscia in alto · foto + numeri + azioni rapide a sinistra (1/3) · riquadro a schede a destra (2/3) ·
   scheda tecnica + galleria · dati associati */
.pr3-band { display: flex; align-items: flex-start; gap: 16px; padding: 18px 22px; border: 1px solid var(--tk-line); border-radius: 20px; background: #ffffff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); }
.pr3-band-main { flex: 1 1 auto; min-width: 0; }
.pr3-band .pr3-title { font-size: 1.4rem; }
.pr3-band .pr3-meta { margin-top: 8px; }
.pr3-layout { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr); gap: 20px; align-items: start; }
.pr3-layout.is-info { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
.pr3-left, .pr3-right, .pr3-info-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.pr3-photo-card { padding: 0; overflow: hidden; }
.pr3-photo-card .pr3-cover { width: 100%; aspect-ratio: 4 / 3; border-radius: 0; }
.pr3-icons { display: grid; grid-template-columns: repeat(4, 1fr); padding: 14px 10px 16px; text-align: center; }
.pr3-icons > div { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pr3-icons i { margin-bottom: 4px; font-size: 1.05rem; color: #94a3b8; }
.pr3-icons i::before { color: inherit !important; }
.pr3-icons b { font-size: 1rem; font-weight: 800; color: var(--tk-ink); font-variant-numeric: tabular-nums; }
.pr3-icons span { font-size: 0.74rem; color: var(--tk-mute); }
.pr3-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pr3-quick > .pr3-btn, .pr3-quick > .dropdown > .pr3-btn { width: 100%; justify-content: center; white-space: normal; text-align: center; height: auto; min-height: 38px; line-height: 1.2; padding: 6px 10px; }
.pr3-quick > .pr3-btn.is-primary { grid-column: 1 / -1; }
.pr3-btn.is-out { border-style: dashed; color: var(--primary, #582679) !important; }
.pr3-tabs { padding-top: 14px; }
.pr3-seg.is-wide { display: flex; flex-wrap: wrap; width: 100%; margin-bottom: 16px; }
.pr3-seg.is-wide .pr3-seg-btn { flex: 1 1 auto; justify-content: center; }
.pr3-pane[hidden] { display: none; }
.pr3-kpis.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 16px; }
.pr3-kpi.is-price b, .pr3-kpi.is-price b.editable-input-with-pencil { font-size: 1.45rem; }
.pr3-kpi.is-price > b { display: flex; align-items: baseline; gap: 2px; }
.pr3-kpi.is-val .pr3-val { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; font-size: inherit; }
.pr3-kpi.is-val .pr3-val > b { font-size: 1.45rem; font-weight: 800; color: var(--tk-ink); }
.pr3-kpi.is-val .pr3-val-label { flex: 1 0 100%; font-size: 0.8rem; font-weight: 600; color: #475569; order: 3; }
.pr3-kpi.is-val .pr3-delta { order: 2; }
.pr3-pane-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.pr3-pane-grid.is-2-1 { grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr); }
.pr3-sub-card { padding: 14px 16px; border-radius: 16px; background: #f7f8fb; }
.pr3-sub-card > .pr3-label.is-sub:first-child { margin-top: 0; }
.pr3-sub-card.is-lilac { --f-ink: #4c1d95; background: #f3effc; }
.pr3-pane-grid .c3-folder-tab { height: 38px; padding: 0 16px; font-size: 0.86rem; }
.pr3-pane-grid .c3-folder-tab::after { width: 28px; clip-path: path('M0 0 C 12 0 12 38 28 38 L 0 38 Z'); }
.pr3-pane-grid .c3-folder-body { padding: 12px 14px; }
.pr3-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 12px; }
.pr3-gallery a { position: relative; display: block; overflow: hidden; border-radius: 12px; aspect-ratio: 4 / 3; background: #f1f5f9; }
.pr3-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.2s; }
.pr3-gallery a:hover img { transform: scale(1.03); }
.pr3-gallery-more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(15, 23, 42, 0.45); font-size: 1.2rem; font-weight: 800; color: #ffffff; }
@media (prefers-reduced-motion: reduce) { .pr3-gallery img { transition: none; } }
@media (max-width: 1199.98px) { .pr3-kpis.is-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pr3-pane-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 991.98px) {
    .pr3-layout, .pr3-layout.is-info { grid-template-columns: minmax(0, 1fr); }
    .pr3-band { position: relative; flex-direction: column; }
    .pr3-band .pr3-status { position: static; box-shadow: none; }
    .pr3-photo-card .pr3-cover { aspect-ratio: 16 / 9; }
}
.pr3-tech:not(.is-all) > div:nth-child(n+9) { display: none; }
.pr3-tech + .pr3-link { margin: 10px 0 4px; }

/* Incarico v3, Dati associati: Attività, Istruttoria e Marketing con il disegno della lista Attività v3 del CRM
   (gruppi task-group-v3, linea colorata a sinistra, spunta task-check-v3, tipo task-typecol-v3, scadenza
   task-due-v3, consulente con foto) e lo stato col badge della scheda (c3-status-btn rq-st-btn + menu) */
.pr3-tgroup { margin: 0; padding: 18px 6px 8px; font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; text-transform: none; border-bottom: 1px solid var(--tk-line) !important; }
.pr3-list > .pr3-tgroup:first-child { padding-top: 4px; }
.pr3-tgroup.is-level { color: #475569; }
.pr3-task { --tk: #94a3b8; position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr) minmax(120px, 170px) 92px minmax(120px, 170px) auto; align-items: center; gap: 14px; min-height: 58px; padding: 9px 8px 9px 16px; border-bottom: 1px solid var(--tk-line); }
.pr3-task::before { content: ''; position: absolute; top: 10px; bottom: 10px; left: 0; width: 3px; border-radius: 0 3px 3px 0; background: var(--tk); opacity: 0.85; }
.pr3-task:hover { background: #fafbfd; }
.pr3-task.is-saving { opacity: 0.6; }
.pr3-task-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pr3-task-main .task-title-v3 { overflow: hidden; font-size: 0.9rem; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; color: var(--tk-ink); }
.pr3-task-main small { overflow: hidden; font-size: 0.76rem; white-space: nowrap; text-overflow: ellipsis; color: var(--tk-mute); }
.pr3-task.is-done .task-title-v3 { color: #94a3b8; text-decoration: line-through; text-decoration-color: #cbd5e1; }
.pr3-task .task-check-v3:not(.is-checked) { border-color: color-mix(in srgb, var(--tk) 60%, #ffffff); }
.pr3-task .task-check-v3 i::before { color: inherit !important; }
.pr3-task .task-typecol-v3 i { flex: 0 0 auto; }
.pr3-task .task-typecol-v3 > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pr3-task-due { white-space: nowrap; }
.pr3-person { min-width: 0; max-width: 100%; }
.pr3-person .consulente-name-v3 { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pr3-person.is-none { color: #cbd5e1; }
.pr3-task-acts { display: inline-flex; gap: 2px; }
/* istruttoria e marketing: nome + annotazione, badge di stato a destra */
.pr3-task.is-check { grid-template-columns: minmax(0, 1fr) auto; }
.pr3-task.is-check .rq-st-btn { min-width: 150px; max-width: 220px; }
.pr3-task .pr3-note-ed { font-weight: 500; }
@media (max-width: 991.98px) {
    .pr3-task { grid-template-columns: 22px minmax(0, 1fr) auto; }
    .pr3-task .task-typecol-v3, .pr3-task .pr3-person, .pr3-task-acts { display: none; }
    .pr3-task.is-check { grid-template-columns: minmax(0, 1fr); }
    .pr3-task.is-check .rq-st { justify-self: start; }
}

/* Incarico v3, coerenza: una card a sinistra (foto, numeri, azioni rapide), pulsanti secondari tutti uguali,
   note gialle con la stessa forma della descrizione, le due barre di schede identiche (a tutta larghezza, in testa) */
.pr3-quick-wrap { padding: 4px 16px 16px; border-top: 1px solid var(--tk-line); }
.pr3-quick-wrap .pr3-label.is-sub { margin: 12px 0 10px; }
.pr3-quick { grid-template-columns: 1fr 1fr; }
.pr3-quick > .pr3-quick-more { grid-column: 1 / -1; }
.pr3-quick > .pr3-quick-more > .pr3-btn { border-color: transparent; background: #f3f4f7; color: #475569 !important; }
.pr3-quick > .pr3-quick-more > .pr3-btn:hover { background: #e9ebf0; }
.pr3-quick > .pr3-quick-more .pr3-menu { width: 100%; }
.pr3-sub-card.is-yellow { background: #fef9c3; }
.pr3-sub-card.is-yellow .pr3-label.is-sub { display: flex; align-items: center; gap: 6px; color: #854d0e; }
.pr3-sub-card.is-yellow .pr3-note { min-height: 110px; margin: 0; background: rgba(255, 255, 255, 0.65) !important; }
.pr3-work.pr3-tabs .pr3-seg.is-wide { margin-bottom: 14px; }
.pr3-work .pr3-work-tools { margin-bottom: 6px; }
/* stessa altezza per la colonna della foto e il riquadro a schede (niente buco sotto le schede) */
@media (min-width: 992px) {
    .pr3-layout:not(.is-info) { align-items: stretch; }
    .pr3-layout:not(.is-info) > .pr3-right > .pr3-tabs { flex: 1 1 auto; }
    .pr3-photo-card .pr3-cover { aspect-ratio: 16 / 10; }
}
/* Incarico v3: due colonne indipendenti (immobile a sinistra, lavoro a destra), nessuna altezza forzata */
.pr3 { max-width: 1600px; }
@media (min-width: 992px) {
    .pr3-layout:not(.is-info) { align-items: start; grid-template-columns: minmax(300px, 1fr) minmax(0, 2.2fr); }
    .pr3-layout:not(.is-info) > .pr3-right > .pr3-tabs { flex: none; }
}
.pr3-left .pr3-tech { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.pr3-left .pr3-fold > summary .pr3-label, .pr3-left #prPhotos .pr3-label { font-size: 0.95rem; }
/* telefono: foto e azioni, poi il lavoro (schede e lavorazione), in fondo scheda tecnica e galleria */
@media (max-width: 991.98px) {
    .pr3-layout:not(.is-info) > .pr3-left { display: contents; }
    .pr3-left > .pr3-photo-card { order: 1; }
    .pr3-layout:not(.is-info) > .pr3-right { order: 2; }
    .pr3-left > .pr3-fold, .pr3-left > #prPhotos { order: 3; }
}

/* ── Incarico v3, struttura definitiva (come Contatto e Richiesta v3): colonna principale = testata + lavorazione +
   l'immobile + sezioni piegate; colonna laterale (360px) = azioni rapide e cartelle (note gialla, incarico lilla,
   proprietario grigia, ribassi e rinnovi azzurra, automazioni menta). Una sola barra di schede nella pagina ── */
.pr3-grid { grid-template-columns: minmax(0, 1fr) 360px; }
.pr3-hero { padding: 18px; }
.pr3-hero-top { display: flex; align-items: flex-start; gap: 20px; }
.pr3-hero .pr3-cover { width: 230px; aspect-ratio: 4 / 3; border-radius: 14px; }
.pr3-hero-main { flex: 1 1 auto; min-width: 0; }
.pr3-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pr3-kicker-end { margin-left: auto; }
.pr3-kicker-end .pr3-status { min-height: 30px !important; padding: 0 12px; font-size: 0.72rem; }
.pr3-hero .pr3-title { font-size: 1.45rem; }
.pr3-hero .pr3-price { margin-top: 10px; }
.pr3-hero .pr3-price > b, .pr3-hero .pr3-price > b.editable-input-with-pencil { font-size: 1.35rem; }
.pr3-hero .pr3-val .pr3-val-label { order: -1; }
.pr3-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--tk-line); }
.pr3-stat { display: flex; flex-direction: column; gap: 1px; padding: 0 14px; border-left: 1px solid var(--tk-line); }
.pr3-stat:first-child { padding-left: 2px; border-left: 0; }
.pr3-stat b { font-size: 1.35rem; font-weight: 800; line-height: 1.15; color: var(--tk-ink); font-variant-numeric: tabular-nums; }
.pr3-stat span { font-size: 0.8rem; font-weight: 600; color: #475569; }
.pr3-stat small { font-size: 0.72rem; color: var(--tk-mute); }
.pr3-stat.is-zero b { color: #cbd5e1; }
/* azioni rapide in cima alla colonna laterale */
.pr3-quick-card { padding: 14px; }
.pr3-quick-card .pr3-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pr3-quick-card .pr3-btn { width: 100%; justify-content: center; }
.pr3-quick-card .pr3-btn.is-primary, .pr3-quick-card .pr3-quick-more { grid-column: 1 / -1; }
/* l'immobile: foto che scorrono, descrizione, scheda tecnica, accessori */
.pr3-prop .pr3-photos img { width: 168px; height: 118px; }
.pr3-prop .pr3-desc { margin-bottom: 4px; }
.pr3-prop .pr3-tech { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
/* cartelle laterali */
.pr3-side { gap: 16px; }
.pr3-side .c3-folder-tab { height: 40px; padding: 0 18px; font-size: 0.88rem; }
.pr3-side .c3-folder-tab::after { width: 30px; clip-path: path('M0 0 C 13 0 13 40 30 40 L 0 40 Z'); }
.pr3-side .c3-folder-tab .tk3-count { background: rgba(255, 255, 255, 0.7); }
.pr3-side .c3-folder.tone-grey a.pr3-owner:hover { background: rgba(255, 255, 255, 0.7); }
.pr3-side .c3-folder.tone-grey .pr3-search, .pr3-side .c3-folder.tone-lilac .pr3-input { background: rgba(255, 255, 255, 0.8) !important; }
.pr3-side .pr3-hist li { border-top-color: rgba(15, 23, 42, 0.08); }
.pr3-side .pr3-label.is-sub { margin-top: 4px; }
@media (max-width: 1199.98px) { .pr3-grid { grid-template-columns: minmax(0, 1fr) 320px; } .pr3-hero .pr3-cover { width: 180px; } }
@media (max-width: 991.98px) {
    .pr3-grid { grid-template-columns: minmax(0, 1fr); }
    .pr3-hero-top { flex-direction: column; }
    .pr3-hero .pr3-cover { width: 100%; aspect-ratio: 16 / 9; }
    .pr3-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 12px; }
    .pr3-stat:nth-child(3) { padding-left: 2px; border-left: 0; }
}

/* ── Avanzamento incarichi v3 (views/properties_progress_v3.php, MYB.PropertiesProgress.js, DESIGN.md §44) ──
   È una lista v3 (TableListShell + MYB.TableList): qui solo ciò che è suo — le barrette di avanzamento nella colonna
   "Avanzamento", l'elenco "Da guardare" del dettaglio, l'indicatore delle attività in ritardo e la matrice del
   Dettaglio. Ogni stato ha colore E simbolo (mai il solo colore): ✓ fatto · ✕ da fare · ! da controllare ·
   ? da verificare · ‖ in attesa · vuoto non iniziato · tratteggiato non necessario */
.pp3-bars { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pp3-bar { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 0.8rem; color: #334155 !important; text-decoration: none !important; }
.pp3-bar-l { flex: 0 0 72px; font-size: 0.72rem; font-weight: 700; color: #64748b; }
.pp3-bar:hover .pp3-bar-l { color: var(--primary, #582679); }
.pp3-track { display: flex; flex: 1 1 auto; gap: 1px; min-width: 50px; max-width: 140px; height: 7px; overflow: hidden; border-radius: 999px; background: #eef1f5; }
.pp3-track i { display: block; min-width: 3px; }
.pp3-bar-n { flex: 0 0 auto; font-size: 0.78rem; color: #64748b; font-variant-numeric: tabular-nums; }
.pp3-bar-n b { color: #1c2434; }
.pp3-chip { flex: 0 1 auto; min-width: 0; overflow: hidden; display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--c) 12%, #ffffff); font-size: 0.7rem; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; color: color-mix(in srgb, var(--c) 75%, #0f172a); }
.pp3-chip::before { content: ''; flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.pp3-late-ind { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px; border-radius: 8px; background: var(--st-lost-soft, #fee2e2); font-size: 0.74rem; font-weight: 800; color: var(--st-lost-ink, #7f1d1d); }
.pp3-late-ind i, .pp3-late-ind i::before { font-size: 0.7rem; color: inherit !important; }
.pp3-muted { color: #94a3b8; }
.pp3-watch { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 6px 18px; margin: 2px 0 0; padding: 0; list-style: none; }
.pp3-watch li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; font-size: 0.84rem; }
.pp3-watch li small { flex: 1 0 100%; padding-left: 22px; font-size: 0.78rem; color: #475569; }
.pp3-sym { flex: 0 0 auto; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--c); font-size: 0.62rem; font-weight: 800; font-style: normal; line-height: 1; color: #ffffff; }
/* Dettaglio (matrice): stesse righe filtrate e ordinate dell'Elenco */
.pp3-matrix { display: flex; flex-direction: column; gap: 10px; }
.pp3-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; font-size: 0.78rem; color: #64748b; }
.pp3-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.pp3-grid-wrap { max-height: 75vh; overflow: auto; border: 1px solid #e9edf3; border-radius: 18px; background: #ffffff; }
.pp3-grid { border-collapse: separate; border-spacing: 0; font-size: 0.8rem; }
.pp3-grid th, .pp3-grid td { padding: 0; border-bottom: 1px solid #e9edf3; background: #ffffff; }
.pp3-grid thead th { position: sticky; z-index: 2; }
.pp3-grid thead tr:first-child th { top: 0; }
.pp3-grid thead tr:nth-child(2) th { top: 34px; }
.pp3-g-grp { height: 34px; padding: 0 10px !important; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; text-align: left; }
.pp3-g-grp.is-dd { color: var(--primary, #582679); box-shadow: inset 0 -3px 0 var(--primary, #582679); }
.pp3-g-grp.is-mk { color: #0369a1; box-shadow: inset 0 -3px 0 #0ea5e9; }
.pp3-g-col { height: 170px; width: 36px; min-width: 36px; vertical-align: bottom; }
.pp3-g-col span { display: block; width: 36px; max-height: 160px; padding: 8px 0; overflow: hidden; font-size: 0.72rem; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; color: #475569; writing-mode: vertical-rl; transform: rotate(180deg); }
.pp3-g-first { position: sticky; left: 0; z-index: 1; min-width: 240px; max-width: 300px; padding: 8px 12px !important; text-align: left; font-weight: 600; box-shadow: inset -1px 0 0 #e9edf3; }
.pp3-grid thead .pp3-g-first { z-index: 3; vertical-align: bottom; font-size: 0.72rem; font-weight: 800; color: #64748b; }
.pp3-g-first a { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #1c2434 !important; text-decoration: none !important; }
.pp3-g-first .rq-buy-v3 { margin-right: 4px; padding: 1px 6px; font-size: 0.72rem; }
.pp3-grid tbody tr:hover th, .pp3-grid tbody tr:hover td { background: #f8fafc; }
.pp3-grid td { text-align: center; }
.pp3-hit { display: grid; place-items: center; width: 36px; height: 36px; text-decoration: none !important; }
.pp3-hit:focus-visible { outline: 2px solid var(--primary, #582679); outline-offset: -3px; border-radius: 8px; }
.pp3-cell { position: relative; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--c); font-size: 0.64rem; font-weight: 800; font-style: normal; line-height: 1; color: #ffffff; }
.pp3-cell.is-none { color: transparent; }
.pp3-cell.is-na { border: 1.5px dashed #cbd5e1; background: transparent; }
.pp3-hit:hover .pp3-cell { transform: scale(1.15); }
.pp3-cell-note { position: absolute; top: -3px; right: -3px; width: 8px; height: 8px; border: 2px solid #ffffff; border-radius: 50%; background: #334155; }
.pp3-empty { margin: 0; padding: 30px; border: 1px dashed #e9edf3; border-radius: 18px; background: #ffffff; text-align: center; color: #64748b; }
@media (prefers-reduced-motion: reduce) { .pp3-hit:hover .pp3-cell { transform: none; } }
@media (max-width: 767.98px) { .pp3-switch { display: none !important; } .pp3-track { max-width: none; } }

/* Incarico v3: valutazione generale di istruttoria e marketing (semaforo facoltativo + commento), in testa alla lista */
.pr3-eval { margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; background: #f7f8fb; }
.pr3-eval-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin-bottom: 8px; }
.pr3-eval-head .pr3-label.is-sub { margin: 0; }
.pr3-eval .pr3-area { background: #ffffff !important; }
.pr3-eval .pr3-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 0.8rem; }
.pr3-light { display: inline-flex; gap: 4px; padding: 3px; border-radius: 12px; background: #ffffff; box-shadow: inset 0 0 0 1px #e9edf3; }
.pr3-light-btn { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; font-size: 0.78rem; font-weight: 700; color: #475569; cursor: pointer; }
.pr3-light-btn i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); opacity: 0.35; }
.pr3-light-btn:hover i { opacity: 0.7; }
.pr3-light-btn.is-on { background: color-mix(in srgb, var(--c) 14%, #ffffff); color: color-mix(in srgb, var(--c) 70%, #0f172a); }
.pr3-light-btn.is-on i { opacity: 1; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 25%, transparent); }
.pr3-light-btn:focus-visible { outline: 2px solid var(--c); outline-offset: 1px; }
/* Avanzamento incarichi: semaforo davanti a Istruttoria / Marketing nella colonna Avanzamento */
.pp3-light { display: inline-block; flex: 0 0 auto; width: 10px; height: 10px; margin-right: 6px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 25%, transparent); vertical-align: 0; }
.pp3-bar-l { flex-basis: 88px; }
/* Dettaglio più grande (richiesta dell'utente): celle da 46px, pallini da 26px, nomi e righe leggibili */
.pp3-legend { gap: 8px 20px; font-size: 0.86rem; }
.pp3-legend .pp3-cell { width: 22px; height: 22px; font-size: 0.72rem; }
.pp3-grid { font-size: 0.9rem; }
.pp3-grid-wrap { max-height: calc(100vh - 260px); }
.pp3-g-grp { height: 40px; font-size: 0.78rem; }
.pp3-grid thead tr:nth-child(2) th { top: 40px; }
.pp3-g-col { height: 200px; width: 46px; min-width: 46px; }
.pp3-g-col span { width: 46px; max-height: 190px; padding: 10px 0; font-size: 0.8rem; font-weight: 600; color: #334155; }
.pp3-g-first { min-width: 300px; max-width: 360px; padding: 10px 16px !important; font-size: 0.9rem; }
.pp3-g-first .rq-buy-v3 { font-size: 0.8rem; }
.pp3-hit { width: 46px; height: 46px; }
.pp3-cell { width: 26px; height: 26px; font-size: 0.82rem; }
.pp3-cell-note { width: 10px; height: 10px; }

/* ── Checklist incarichi (profilo v3, MYB.Checklists.js, DESIGN.md §45): stesse card ed editor dei Workflow ── */
.pf3-panel-ico.is-checklist { background: #dcfce7; color: #15803d; }
.ck3-card .wf3-card-head h3 { display: flex; align-items: center; gap: 8px; }
.ck3-default { grid-column: 1; justify-self: start; padding: 1px 8px; border-radius: 999px; background: #ede9fe; font-size: 0.7rem; font-weight: 800; color: #5b21b6; }
.ck3-groups { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.ck3-groups span { padding: 3px 9px; border-radius: 999px; background: #faf8ff; font-size: 0.76rem; color: #475569; }
.ck3-groups b { color: var(--c3-ink); }
.ck3-item { align-items: center; gap: 8px; padding: 6px 8px; border-radius: 12px; }
.wf3-steps:has(.ck3-item) { gap: 6px; }
.ck3-item .wf3-step-n { width: 22px; height: 22px; font-size: 0.7rem; }
.ck3-item .wf3-step-acts { flex-direction: row; }
.ck3-item-body { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 4px 8px; }
.ck3-item .wf3-step-title, .ck3-item .ck3-tag { padding: 6px 10px; border-radius: 10px; font-size: 0.86rem; }
.ck3-item-body .wf3-step-hint { grid-column: 1 / -1; color: var(--c3-mute); }
.ck3-tag { border: 1.5px solid var(--c3-line); font: inherit; color: var(--c3-ink); outline: none; }
.ck3-tag:focus { border-color: color-mix(in srgb, var(--primary, #6366f1) 45%, #ffffff); }
.ck3-tag::-webkit-calendar-picker-indicator { display: none !important; }
.ck3-cols { display: grid; grid-template-columns: minmax(0, 1fr) 170px 92px; gap: 8px; padding: 0 8px 0 46px; font-size: 0.7rem; font-weight: 700; color: var(--c3-mute); }
@media (max-width: 600px) { .ck3-cols { display: none; } }
.ck3-rules { align-items: flex-start; }
.ck3-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ck3-add select { height: 34px; max-width: 100%; padding: 0 10px; border: 1.5px dashed #c4b5fd; border-radius: 10px; background: #faf8ff; font: inherit; font-size: 0.84rem; font-weight: 600; color: #5b21b6; }
@media (max-width: 600px) { .ck3-item-body { grid-template-columns: minmax(0, 1fr); } }
/* matrice di Avanzamento: controllo non previsto dalla checklist di quell'incarico */
.pp3-matrix td.is-off { background: repeating-linear-gradient(135deg, #f8fafc 0 6px, #f1f5f9 6px 12px); }
/* scheda Incarico: la checklist in uso, sopra istruttoria e marketing */
.pr3-cl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 10px; font-size: 0.8rem; color: var(--c3-mute); }
.pr3-cl select { height: 30px; max-width: 280px; padding: 0 8px; border: 1.5px solid var(--c3-line); border-radius: 10px; background: #ffffff; font: inherit; font-size: 0.8rem; font-weight: 600; color: var(--c3-ink); }
/* Checklist: il Modello standard (sola lettura) si distingue da quelle dell'agenzia */
.ck3-card.is-template { border: 1.5px dashed #d8d2f0; background: #fbfaff; box-shadow: none; }
.ck3-card.is-template .wf3-scope { color: #64748b; }
.ck3-empty { grid-column: auto; justify-content: center; }
/* Scheda Incarico: menu stato delle checklist a gruppi (da avviare, in corso, chiusi), con la spiegazione dello stato */
.rq-st .c3-status-item .pr3-st-txt { display: flex; flex-direction: column; gap: 1px; white-space: normal; }
.rq-st .c3-status-item .pr3-st-txt small { font-size: 0.74rem; font-weight: 500; color: #64748b; }
.rq-st .c3-status-menu { min-width: 280px; }
.rq-st .c3-status-menu .c3-status-group:not(:first-child) { margin-top: 4px; border-top: 1px solid #f1f5f9; padding-top: 10px; }
/* Scheda Incarico: provvigioni raggruppate nella cartella Incarico */
.pr3-comm-box { margin: 12px 0; padding: 10px 12px 12px; border: 1px solid color-mix(in srgb, var(--f-ink, #4c1d95) 16%, transparent); border-radius: 14px; background: rgba(255, 255, 255, 0.45); }
.pr3-comm-title { margin: 0 0 8px; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: color-mix(in srgb, var(--f-ink, #4c1d95) 70%, #64748b); }
.pr3-comm-box .pr3-fact.is-total { padding-top: 8px; border-top: 1px dashed color-mix(in srgb, var(--f-ink, #4c1d95) 18%, transparent); }
/* «Nascondi Non necessario» subito sopra i controlli */
.pr3-list-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin: 0 0 6px; }
.pr3-list-tools > .pr3-toggle { margin-left: auto; }
.pr3-list-tools .pr3-cl { margin: 0; font-size: 0.82rem; font-weight: 700; color: #475569; }
.pr3-list-tools .pr3-cl label { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.pr3-list-tools .pr3-cl b { color: #1c2434; }
.pr3-list-tools .pr3-cl .pr3-link { font-size: 0.8rem; }
/* Relazione documentale: un documento, con la sua barra di formattazione */
.pr3-report { margin-top: 12px; border: 1px solid #e6e9f0; border-radius: 14px; background: #ffffff; overflow: hidden; }
.pr3-report-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 12px 8px 14px; }
.pr3-report-title { display: inline-flex; align-items: center; gap: 8px; margin: 0 auto 0 0; font-size: 0.95rem; font-weight: 800; color: #1c2434; }
.pr3-report-title i { color: var(--primary, #582679); }
.pr3-report-state { font-size: 0.76rem; color: #64748b; }
.pr3-rt-bar { display: flex; gap: 2px; padding: 4px 8px; border-top: 1px solid #f1f5f9; border-bottom: 1px solid #f1f5f9; background: #fafbfd; }
.pr3-rt-bar button { display: grid; place-items: center; width: 32px; height: 30px; border: 0; border-radius: 8px; background: transparent; font-size: 0.82rem; color: #475569; }
.pr3-rt-bar button:hover { background: #eef1f6; }
.pr3-rt-bar button[aria-pressed="true"] { background: color-mix(in srgb, var(--primary, #582679) 12%, #ffffff); color: var(--primary, #582679); }
.pr3-rt-bar button:focus-visible { outline: 2px solid var(--myb-cyan, #0ea5e9); outline-offset: 1px; }
.pr3-rt-bar button:nth-child(3) { margin-right: 8px; }
.pr3-rt { min-height: 160px; max-height: 480px; overflow-y: auto; padding: 14px 16px; font-size: 0.92rem; line-height: 1.6; color: #1c2434; outline: none; }
.pr3-rt:focus { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--primary, #582679) 25%, transparent); }
.pr3-rt:empty::before { content: attr(data-placeholder); color: #94a3b8; pointer-events: none; }
.pr3-rt ul, .pr3-rt ol { margin: 4px 0 8px; padding-left: 22px; }
.pr3-rt p { margin: 0 0 8px; }
/* Scheda Incarico: azioni come il riquadro Azioni delle schede CRM (c3-act); «Nuova attività» è la tessera azzurra */
.pr3-actions { --c3-line: #e9edf3; --c3-ink: #1c2434; --c3-mute: #64748b; }
.c3-act.is-todo.is-tile { background: #e3eefc; color: #1e3a8a !important; }
.c3-act.is-todo.is-tile > i { color: #2563eb; }
.pr3-actions .c3-act-grid > .c3-act:not(.is-tile) { min-height: 42px; }
/* Note in evidenza nella testata: il foglietto delle schede CRM, alto quanto il testo */
.pr3-hero-note { margin: 12px 0 0; }
.pr3-hero-note .c3-sticky-head { margin: 0 0 4px; cursor: text; }
.pr3-hero-note .pr3-note { min-height: 0; padding: 4px 8px; background: transparent !important; font-size: 0.88rem; field-sizing: content; max-height: 220px; resize: none; }
.pr3-hero-note .pr3-note:focus { background: rgba(255, 255, 255, 0.7) !important; }
/* «Avvia workflow» accanto a «+ Attività», come nelle schede CRM */
.pr3-work-tools .c3-wf-btn { color: #ffffff !important; text-decoration: none !important; }
.pr3-work-tools .c3-wf-btn[hidden] { display: none; }
/* Editor checklist a sezioni (MYB.Checklists): ogni sezione è un blocco col nome in testa e i controlli dentro, come
   i gruppi della scheda Incarico */
.ck3-secs { display: flex; flex-direction: column; gap: 12px; }
.ck3-sec { border: 1px solid #e6e9f0; border-radius: 14px; background: #ffffff; overflow: hidden; }
.ck3-sec-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 14px; border-bottom: 1px solid #eef1f6; background: #faf8ff; }
.ck3-sec-head > i { color: #6d28d9; }
.ck3-sec-name { flex: 1 1 auto; min-width: 0; padding: 6px 8px; border: 1.5px solid transparent; border-radius: 10px; background: transparent; font: inherit; font-size: 0.98rem; font-weight: 800; color: #1c2434; outline: none; }
.ck3-sec-name:hover { border-color: #e6e1f5; }
.ck3-sec-name:focus { border-color: color-mix(in srgb, var(--primary, #6366f1) 45%, #ffffff); background: #ffffff; }
.ck3-sec-name::-webkit-calendar-picker-indicator { display: none !important; }
.ck3-sec-n { flex: 0 0 auto; font-size: 0.76rem; font-weight: 700; color: #64748b; }
.ck3-sec-head .c3-tl-del:disabled, .ck3-item-acts .c3-tl-del:disabled { opacity: 0.3; cursor: default; }
.ck3-sec-items { margin: 0; padding: 4px 0; list-style: none; }
.ck3-sec-empty { margin: 0; padding: 12px 16px; font-size: 0.84rem; color: #94a3b8; }
.ck3-sec .ck3-item { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 4px 10px 4px 14px; border: 0; border-radius: 0; }
.ck3-sec .ck3-item + .ck3-item { border-top: 1px solid #f3f4f7; }
.ck3-item-n { font-size: 0.74rem; font-weight: 800; color: #94a3b8; text-align: right; }
.ck3-sec .ck3-item-body { display: flex; flex-direction: column; gap: 2px; }
.ck3-item-name { width: 100%; padding: 6px 8px; border: 1.5px solid transparent; border-radius: 10px; font: inherit; font-size: 0.88rem; font-weight: 600; color: #1c2434; outline: none; }
.ck3-item-name:hover { border-color: #eef1f6; }
.ck3-item-name:focus { border-color: color-mix(in srgb, var(--primary, #6366f1) 45%, #ffffff); }
.ck3-sec .ck3-item-body .wf3-step-hint { padding-left: 8px; color: #64748b; }
.ck3-item-acts { display: flex; gap: 2px; }
/* area proprietario (§52): l'occhio «Visibile al proprietario»; non è un'azione distruttiva, niente rosso al passaggio */
.ck3-item-acts .ck3-seller { color: var(--primary, #582679); }
.ck3-item-acts .ck3-seller[aria-pressed="false"] { color: #94a3b8; }
.ck3-item-acts .ck3-seller:hover { color: var(--primary, #582679); }
.ck3-item-body .ck3-hidden-hint { display: inline-flex; align-items: center; gap: 5px; }
/* senza Area proprietario: l'occhio col lucchetto, il clic chiede il modulo (MYB.Locked) */
.ck3-item-acts .ck3-seller.is-locked { position: relative; color: #94a3b8; }
.ck3-item-acts .ck3-seller.is-locked:hover { color: var(--primary, #582679); }
.ck3-seller-lock { position: absolute; right: 2px; bottom: 2px; font-size: 0.55rem; }
.ck3-sec .ck3-add { padding: 8px 14px 12px; border-top: 1px dashed #eef1f6; }
.ck3-sec-new { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 14px; border: 1.5px dashed #c4b5fd; border-radius: 12px; background: #faf8ff; font-size: 0.86rem; font-weight: 700; color: #5b21b6; cursor: pointer; }
.ck3-sec-new:hover { background: #f3efff; }
/* Scheda Incarico: indicazioni per Klaila AI Voice Agent, sezione piegata in fondo alla colonna principale (come Sito) */
.pr3-voice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pr3-voice-lead { margin: 0 0 12px; font-size: 0.84rem; color: #64748b; }
.pr3-voice .pr3-label.is-sub { margin: 0 0 8px; color: var(--tk-ink); }
.pr3-voice .pr3-label.is-sub i { color: #7c3aed; }
.pr3-voice .pr3-area { min-height: 104px; resize: vertical; background: #ffffff !important; }
.pr3-voice-hint { display: block; margin-top: 6px; font-size: 0.74rem; line-height: 1.4; color: #64748b; }
.pr3-voice-logo { display: block; height: 16px; width: auto; }
.pr3-voice-state { margin-left: 4px; padding: 2px 9px; border-radius: 999px; background: #dcfce7; font-size: 0.7rem; font-weight: 700; color: #166534; }
@media (max-width: 767.98px) { .pr3-voice { grid-template-columns: minmax(0, 1fr); } }
/* Scheda Incarico: disponibilità per le visite (finestre con data e ora) */
.pr3-avail-list { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; padding: 0; list-style: none; }
.pr3-avail-list li { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px; background: #f3faf6; font-size: 0.88rem; font-weight: 600; color: #14532d; }
.pr3-avail-list li > i { color: #16a34a; }
.pr3-avail-list li > span { flex: 1 1 auto; }
.pr3-avail-list li.pr3-empty { background: transparent; padding-left: 0; font-weight: 500; color: #64748b; }
/* Klaila AI Scheduler: popup di creazione e di una finestra (stile del popover dell'agenda v3, .agv3-pop) */
.pr3-avail-row > div { flex: 1; min-width: 0; }
.pr3-avail-row .evf-chips { margin-top: 6px; }
.pr3-avail-row .evf-input { height: 36px; padding: 0 10px; font-size: 0.84rem; }
.pr3-avail-row .evf-when { gap: 6px; margin-top: 6px; }
.pr3-avail-row .evf-date { flex: 1 1 100%; }
.pr3-avail-row .evf-time { flex: 1 1 0; }
.pr3-avail-until { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; font-size: 0.76rem; font-weight: 700; color: #64748b; }
.pr3-avail-until[hidden] { display: none; }
.pr3-avail-until .evf-input { flex: 1 1 auto; min-width: 0; height: 34px; }
.pr3-avail-until small { font-weight: 500; white-space: nowrap; }
.pr3-avail-err { margin: 10px 16px 0; }
.pr3-avail-pop .agv3-pop-head, .pr3-avail-sheet .agv3-pop-head { transition: background 0.15s; }
.bks-ag-bar [data-pr-avail-new] { margin-left: 4px; }
/* Klaila AI Scheduler: agenda settimanale (pelle di .agv3-cal / .bks-ag-cal) con le finestre in verde */
.pr3-avail-cal { max-height: 520px; margin-bottom: 8px; }
.pr3-avail-cal .fc-event { cursor: default; }
.pr3-avail[data-edit] .pr3-avail-cal .fc-event { cursor: pointer; }
.pr3-avail-ev { --ev: #16a34a; gap: 1px; padding: 6px 8px; font-size: 0.76rem; }
.pr3-avail-ev small { font-size: 0.68rem; font-weight: 600; opacity: 0.85; }
/* Open House: stessa finestra, nel viola Klaila */
.pr3-avail-ev.is-oh { --ev: #c52a92; }
.pr3-avail-list li.is-oh { background: #fdf2f8; color: #831843; }
.pr3-avail-list li.is-oh > i { color: #c52a92; }
.pr3-avail > .pr3-voice-hint { margin: 0 0 10px; }
/* posti per slot dell'open house e link della prenotazione pubblica (ENABLE_SCHEDULER) */
.pr3-avail-row .pr3-avail-cap { width: 96px; margin-top: 6px; }
.pr3-avail-cap-hint { display: block; margin-top: 4px; font-size: 0.74rem; color: #64748b; }
.pr3-avail-links { margin-top: 18px; padding-top: 14px; border-top: 1px dashed #e6e9f0; }
.pr3-avail-links .pr3-voice-hint { margin: 0 0 10px; }
.pr3-links-new { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.pr3-links-new .evf-chips { margin-top: 0; }
.pr3-links { display: flex; flex-direction: column; gap: 4px; margin: 12px 0 0; padding: 0; list-style: none; }
.pr3-links li { display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 12px; border-radius: 10px; background: #f7f8fb; }
.pr3-links li > span { flex: 1 1 auto; min-width: 0; }
.pr3-links li b { display: block; font-size: 0.84rem; }
.pr3-links li small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 0.74rem; color: #64748b; }
.pr3-links li.pr3-empty { background: transparent; padding-left: 0; font-size: 0.84rem; color: #64748b; }
/* Fogli dal basso: al tocco il focus va sul foglio (nessuna voce sembra già scelta); la X tocca a 44px */
.myb-sheet:focus { outline: none; }
.myb-sheet__close::after { content: ''; position: absolute; inset: -6px; }
/* Modalità app: la campanella sta nella barra in alto (non più in basso); il numero in alto a destra dell'icona */
html.myb-app .page-header li.myb-notif-item { position: relative; }
html.myb-app .page-header #notifBadge { position: absolute; top: -2px; right: -4px; left: auto; width: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    background: #dc2626; font-size: 11px; font-weight: 700; line-height: 18px; box-shadow: 0 0 0 2px #fff; pointer-events: none; }

/* ── Moduli non attivi (menu_locked() in include/functions.php, MYB.Locked.js): la voce resta nel menu, attenuata e col
   lucchetto; il clic apre "Attiva …" con la richiesta di contatto */
a[href^="#myb-locked:"] { opacity: 0.6; }
a[href^="#myb-locked:"]:hover, a[href^="#myb-locked:"]:focus-visible { opacity: 0.92; }
.accordion-menu .myb-lock { margin-left: auto; font-size: 15px !important; }
.myb-rail a[href^="#myb-locked:"]::after, .myb-ctx a[href^="#myb-locked:"]::after { content: "\f023"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 10px; line-height: 1; }
.myb-rail a.myb-rail-item[href^="#myb-locked:"] { position: relative; }
.myb-rail a.myb-rail-item[href^="#myb-locked:"]::after { position: absolute; right: 9px; bottom: 9px; }
.myb-rail a.myb-w-item[href^="#myb-locked:"]::after, .myb-ctx a[href^="#myb-locked:"]::after { margin-left: auto; padding-left: 8px; }
.myb-locked-modal { border: 0; border-radius: 24px; overflow: hidden; }
.myb-locked-modal .modal-body { padding: 34px 30px 26px; text-align: center; }
.myb-locked-modal .close { position: absolute; top: 14px; right: 16px; }
.myb-locked-ico { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; margin-bottom: 14px; border-radius: 18px;
    background: color-mix(in srgb, var(--primary, #582679) 10%, #ffffff); font-size: 1.3rem; color: var(--primary, #582679); }
.myb-locked-modal h5 { margin: 0 0 10px; font-size: 1.25rem; font-weight: 800; color: #0f172a; }
.myb-locked-text { margin: 0 auto 20px; max-width: 360px; font-size: 0.95rem; line-height: 1.55; color: #475569; }
.myb-locked-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.myb-locked-actions[hidden], .myb-locked-done[hidden], .myb-locked-actions [hidden] { display: none; }
.myb-locked-done { margin: 0; font-weight: 700; color: #15803d; }
.pr3-locked { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 14px; border: 1px dashed #cbd5e1; border-radius: 12px; background: #f8fafc; }
.pr3-locked > i { color: #94a3b8; }
.pr3-locked p { margin: 0; font-size: 0.86rem; line-height: 1.45; color: #475569; }
.pr3-seg-btn.is-locked { opacity: 0.6; }
.pr3-seg-btn.is-locked i { margin-right: 4px; font-size: 0.75em; }
.pr3-owner-name { margin: 0 0 8px; }
.myb-locked-actions .btn-acc-action { gap: 8px; }

/* ── Questionari post visita (views/surveys_forms_v3.php, MYB.SurveyForms.js, DESIGN.md §46): sopra le classi di Gestione
   checklist (ck3/wf3); le impostazioni dell'agenzia in testa, l'editor con le domande una sotto l'altra ── */
/* Gestione questionari (DESIGN.md §46): in testa le tipologie divise in due gruppi (da mandare / moduli pubblici), sotto a
   cosa serve, l'avviso Formaloo e cosa aprono i miei link; poi la lista v3 (MYB.TableList) con una riga per questionario */
.sq3-types { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 0 0 14px; }
.sq3-tgroup-label { display: block; margin: 0 0 6px 4px; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #94a3b8; }
.sq3-tgroup-items { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(15, 23, 42, 0.05); }
.sq3-tab { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 10px; font-size: 0.84rem; font-weight: 700; color: #475569; text-decoration: none !important; white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease; }
.sq3-tab i { font-size: 0.8rem; color: #94a3b8; }
.sq3-tab:hover { background: rgba(255, 255, 255, 0.7); color: #1c2434; }
.sq3-tab.is-on { background: #ffffff; color: #1c2434; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1), 0 6px 14px -8px rgba(15, 23, 42, 0.25); }
.sq3-tab.is-on i { color: var(--primary, #582679); }
.sq3-tab:focus-visible { outline: 2px solid var(--primary, #582679); outline-offset: 2px; }
.sq3-help { max-width: 72ch; margin: 0 0 12px 4px; font-size: 0.88rem; line-height: 1.5; color: #475569; }
.sq3-banner { display: flex; gap: 12px; margin: 0 0 14px; padding: 14px 16px; border: 1px solid #fde68a; border-radius: 16px; background: #fffbeb; color: #78350f; }
.sq3-banner[hidden] { display: none; }
.sq3-banner > i { margin-top: 3px; color: #d97706; }
.sq3-banner b { display: block; font-size: 0.9rem; }
.sq3-banner span { display: block; margin-top: 2px; font-size: 0.82rem; line-height: 1.45; }
.sq3-banner-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.sq3-usage { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 14px 4px; font-size: 0.84rem; color: #475569; }
.sq3-usage[hidden] { display: none; }
.sq3-usage i { color: #94a3b8; }
.sq3-usage b { color: #1c2434; }
.sq3-scope { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; background: #f1f5f9; font-size: 0.7rem; font-weight: 800; color: #475569; white-space: nowrap; }
.sq3-scope.is-agency { background: #ede9fe; color: #5b21b6; }
.sq3-scope.is-mine { background: #dcfce7; color: #166534; }
.sq3-row-name { min-width: 0; }
.sq3-row-name b { display: block; overflow: hidden; font-size: 0.95rem; font-weight: 800; color: #1c2434; white-space: nowrap; text-overflow: ellipsis; }
.sq3-row-name small { display: block; font-size: 0.76rem; color: #64748b; }
.sq3-badge { display: inline-flex; align-items: center; height: 22px; margin: 2px 4px 2px 0; padding: 0 8px; border-radius: 999px; font-size: 0.7rem; font-weight: 800; white-space: nowrap; }
.sq3-badge.is-agency { background: #ede9fe; color: #5b21b6; }
.sq3-badge.is-mine { background: #dcfce7; color: #166534; }
.sq3-badge.is-warn { background: #fef3c7; color: #92400e; }
.sq3-recv { font-size: 0.84rem; font-weight: 700; color: #1c2434; }
.sq3-muted { font-size: 0.78rem; color: #94a3b8; }
.sq3-ans-link { min-height: 32px; padding: 0; border: 0; background: none; font-size: 0.84rem; font-weight: 800; color: var(--primary, #582679); cursor: pointer; }
.sq3-ans-link.is-zero { font-weight: 600; color: #94a3b8; }
.sq3-quick { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid #e2e8f0; border-radius: 10px; background: #ffffff; font-size: 0.78rem; font-weight: 800; color: #1c2434; white-space: nowrap; cursor: pointer; transition: border-color 0.15s ease, background-color 0.15s ease; }
.sq3-quick:hover { border-color: color-mix(in srgb, var(--primary, #582679) 40%, #ffffff); background: color-mix(in srgb, var(--primary, #582679) 4%, #ffffff); }
.sq3-quick:focus-visible, .sq3-ans-link:focus-visible { outline: 2px solid var(--primary, #582679); outline-offset: 2px; }
.sq3-qlist { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.sq3-qlist li { display: flex; align-items: baseline; gap: 8px; font-size: 0.84rem; line-height: 1.4; color: #1c2434; }
.sq3-qlist li > span { flex: 0 0 auto; min-width: 18px; font-size: 0.72rem; font-weight: 800; color: #94a3b8; }
.sq3-qlist li small { color: #94a3b8; }
.sq3-qlist .sq3-qstep { margin-top: 6px; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #94a3b8; }
.sq3-link-val { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.78rem; word-break: break-all; }
.sq3-privacy-label { display: block; margin: 16px 0 6px; }
.sq3-privacy { width: 100%; padding: 10px 12px; border: 1.5px solid #e2e8f0; border-radius: 12px; font-size: 0.88rem; line-height: 1.5; color: #1c2434; resize: vertical; }
.sq3-privacy:focus { outline: none; border-color: color-mix(in srgb, var(--primary, #582679) 55%, #ffffff); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #582679) 12%, transparent); }
#sqPrivacy .c3-sheet-foot, #sqSend .c3-sheet-foot { display: flex; justify-content: flex-end; align-items: center; gap: 14px; margin-top: 16px; }
#sqNew.is-disabled { opacity: 0.5; pointer-events: none; }
@media (max-width: 767.98px) {
    .sq3-types { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 14px; padding: 0 16px 2px; scrollbar-width: none; }
    .sq3-types::-webkit-scrollbar { display: none; }
    .sq3-tgroup { flex: 0 0 auto; }
    .sq3-quick span { display: none; }
    .sq3-quick { width: 40px; height: 40px; justify-content: center; padding: 0; }
}
.ck3-default.is-mine { background: #dcfce7; color: #166534; }
/* Condividi (link pubblico ed embed) e Risposte di un questionario */
.sq3-sheet .modal-body { padding: 22px 22px 20px; }
.sq3-sheet .modal-header { align-items: flex-start; padding: 20px 22px 12px; border-bottom: 1px solid #eef1f6; }
.sq3-sheet .close { float: right; margin: -6px -6px 0 0; }
.sq3-sheet .c3-sheet-title { margin: 0 32px 2px 0; font-size: 1.1rem; font-weight: 800; color: #1c2434; }
.sq3-sheet-sub { margin: 0; font-size: 0.8rem; color: #64748b; }
.sq3-share-block { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 18px; }
.sq3-share-hint { margin: -2px 0 2px; font-size: 0.76rem; color: #64748b; }
.sq3-share-row { display: flex; align-items: center; gap: 10px; width: 100%; }
.sq3-share-block input, .sq3-share-block textarea { width: 100%; min-width: 0; padding: 9px 12px; border: 1.5px solid #e2e8f0; border-radius: 12px; background: #f8fafc; font-size: 0.82rem; color: #1c2434; }
.sq3-share-block textarea { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.72rem; line-height: 1.5; resize: vertical; }
.sq3-share-to { display: flex; gap: 10px; margin: 18px 0 0; padding: 10px 12px; border-radius: 12px; background: #f4f6f9; font-size: 0.8rem; color: #334155; }
.sq3-share-to i { margin-top: 3px; color: #64748b; }
.sq3-ans { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sq3-ans details { border: 1px solid #eef1f6; border-radius: 14px; background: #ffffff; }
.sq3-ans summary { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none; }
.sq3-ans summary::-webkit-details-marker { display: none; }
.sq3-ans summary > i { margin-left: auto; font-size: 0.75rem; color: #94a3b8; transition: transform 0.15s ease; }
.sq3-ans details[open] summary > i { transform: rotate(180deg); }
.sq3-ans-who b { display: block; font-size: 0.9rem; color: #1c2434; }
.sq3-ans-who small { display: block; font-size: 0.74rem; color: #64748b; }
.sq3-ans dl { margin: 0; padding: 0 14px 6px; }
.sq3-ans dt { margin-top: 10px; font-size: 0.76rem; font-weight: 800; color: #475569; }
.sq3-ans dd { margin: 2px 0 0; font-size: 0.86rem; line-height: 1.45; color: #1c2434; white-space: pre-line; }
.sq3-ans details > .c3-link { display: inline-flex; gap: 6px; align-items: center; margin: 6px 14px 14px; }
/* "Usa un altro questionario…" (scheda Richiesta v3): l'elenco dei questionari da scegliere */
#ModalSurveyPick .modal-body, #sqSend .modal-body { padding: 22px 22px 18px; }
#ModalSurveyPick .c3-sheet-title, #sqSend .c3-sheet-title { margin: 0 32px 2px 0; font-size: 1.1rem; font-weight: 800; color: #1c2434; }
#ModalSurveyPick .c3-tiles, #sqSend .c3-tiles { grid-template-columns: minmax(0, 1fr); margin: 14px 0 16px; }
#ModalSurveyPick .c3-tile input, #sqSend .c3-tile input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary, #582679); }
#ModalSurveyPick .c3-tile b, #sqSend .c3-tile b { display: block; font-size: 0.9rem; color: #1c2434; }
#ModalSurveyPick .c3-tile small, #sqSend .c3-tile small { display: block; font-size: 0.76rem; color: var(--c3-mute); }
#ModalSurveyPick .c3-tile.is-on, #sqSend .c3-tile.is-on { border-color: var(--primary, #582679); box-shadow: inset 0 0 0 1px var(--primary, #582679); }
#ModalSurveyPick .c3-sheet-foot { display: flex; justify-content: flex-end; align-items: center; gap: 14px; }
.dropdown-item.c3-muted-item { font-size: 0.82rem; color: #64748b; }

/* ── Editor dei questionari (DESIGN.md §46, MYB.SurveyForms.js): a tutto schermo come quello di Typeform. Le domande a sinistra,
   l'anteprima dal vivo al centro (la pagina vera del cliente in due iframe che si scambiano), le impostazioni a destra ── */
body.sqb-open { overflow: hidden; }
.sqb { --sqb-ink: #1c2434; --sqb-mute: #64748b; --sqb-faint: #94a3b8; --sqb-line: #e7eaf0; --sqb-soft: #f4f6f9; --sqb-acc: var(--primary, #582679);
    position: fixed; inset: 0; z-index: 1065; display: flex; flex-direction: column; background: #ffffff; color: var(--sqb-ink); animation: sqb-in 0.2s cubic-bezier(0.2, 0.8, 0.2, 1); }
.sqb[hidden] { display: none; }
@keyframes sqb-in { from { opacity: 0; transform: scale(0.985); } to { opacity: 1; transform: none; } }
.sqb button { font-family: inherit; }
.sqb-top { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 16px; border-bottom: 1px solid var(--sqb-line); }
.sqb-icon-btn { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--sqb-soft); color: var(--sqb-ink); cursor: pointer; transition: background 0.15s ease; }
.sqb-icon-btn:hover { background: #e9edf2; }
.sqb-title { flex: 1 1 auto; min-width: 0; }
.sqb-title input { display: block; width: 100%; max-width: 520px; height: 30px; padding: 0 8px; margin-left: -8px; border: 1.5px solid transparent; border-radius: 9px; background: transparent; font-size: 1.05rem; font-weight: 800; color: var(--sqb-ink); outline: none; transition: border-color 0.15s ease, background 0.15s ease; }
.sqb-title input:hover { background: var(--sqb-soft); }
.sqb-title input:focus { border-color: color-mix(in srgb, var(--sqb-acc) 45%, #ffffff); background: #ffffff; }
.sqb-title input::placeholder { color: var(--sqb-faint); }
.sqb-scope { margin-top: 2px; font-size: 0.76rem; font-weight: 700; color: var(--sqb-mute); }
.sqb-scope { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.sqb-owner i { margin-right: 4px; }
.sqb-owner.is-type { color: var(--sqb-faint); }
.sqb-seg, .sqb-views, .sqb-device { display: inline-flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--sqb-soft); }
.sqb-seg button, .sqb-views button, .sqb-device button { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; font-size: 0.74rem; font-weight: 700; color: var(--sqb-mute); cursor: pointer; transition: background 0.15s ease, color 0.15s ease; }
.sqb-device button { width: 36px; height: 32px; justify-content: center; padding: 0; font-size: 0.9rem; }
.sqb-seg button[aria-pressed="true"], .sqb-views button[aria-pressed="true"], .sqb-device button[aria-pressed="true"] { background: #ffffff; color: var(--sqb-ink); box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1); }
.sqb-views { display: none; }
.sqb-state { font-size: 0.78rem; font-weight: 600; color: var(--sqb-mute); white-space: nowrap; }
.sqb-save { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; height: 40px; padding: 0 20px; box-shadow: none; }
.sqb-save.is-dirty { box-shadow: 0 8px 20px color-mix(in srgb, var(--sqb-acc) 30%, transparent); }
.sqb-save:disabled { opacity: 0.7; cursor: default; transform: none; }

.sqb-body { display: grid; grid-template-columns: 300px minmax(0, 1fr) 340px; flex: 1 1 auto; min-height: 0; }
.sqb-outline, .sqb-inspector { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.sqb-outline { padding: 14px 12px 28px; border-right: 1px solid var(--sqb-line); }
.sqb-inspector { border-left: 1px solid var(--sqb-line); }

/* elenco */
.sqb-ol-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 2px 8px 10px; }
.sqb-ol-head b { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--sqb-mute); }
.sqb-ol-head span { font-size: 0.74rem; color: var(--sqb-faint); }
.sqb-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; border-radius: 12px; background: transparent; text-align: left; cursor: pointer; transition: background 0.12s ease, box-shadow 0.12s ease; }
.sqb-item:hover { background: var(--sqb-soft); }
.sqb-item.is-sel { background: color-mix(in srgb, var(--sqb-acc) 7%, #ffffff); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--sqb-acc) 40%, #ffffff); }
.sqb-item-txt { display: block; min-width: 0; flex: 1 1 auto; }
.sqb-item-txt b { display: block; overflow: hidden; font-size: 0.84rem; font-weight: 700; line-height: 1.3; color: var(--sqb-ink); white-space: nowrap; text-overflow: ellipsis; }
.sqb-item-txt small { display: block; overflow: hidden; font-size: 0.72rem; line-height: 1.35; color: var(--sqb-mute); white-space: nowrap; text-overflow: ellipsis; }
.sqb-untitled { font-weight: 600; color: var(--sqb-faint); }
.sqb-ico { display: inline-flex; align-items: center; justify-content: center; gap: 5px; flex: 0 0 auto; min-width: 32px; height: 32px; padding: 0 8px; border-radius: 9px; background: #eef1f6; color: #475569; font-size: 0.8rem; }
.sqb-ico em { font-style: normal; font-size: 0.72rem; font-weight: 800; }
.sqb-ico.t-rating { background: #fef3c7; color: #b45309; }
.sqb-ico.t-short_text, .sqb-types .t-short_text i { background: #e0e7ff; color: #4338ca; }
.sqb-ico.t-long_text, .sqb-types .t-long_text i { background: #e0f2fe; color: #0369a1; }
.sqb-ico.t-number, .sqb-types .t-number i { background: #dcfce7; color: #15803d; }
.sqb-ico.t-choice, .sqb-types .t-choice i { background: #f3e8ff; color: #7e22ce; }
.sqb-ico.t-dropdown, .sqb-types .t-dropdown i { background: #ffe4e6; color: #be123c; }
.sqb-types .t-rating i { background: #fef3c7; color: #b45309; }
.sqb-ico.t-phone, .sqb-types .t-phone i { background: #ccfbf1; color: #0f766e; }
.sqb-ico.t-email, .sqb-types .t-email i { background: #fae8ff; color: #a21caf; }
.sqb-select { width: 100%; height: 42px; padding: 0 10px; border: 1.5px solid #e2e8f0; border-radius: 12px; background: #ffffff; font: inherit; font-size: 0.88rem; color: var(--sqb-ink); }
.sqb-select:focus { outline: none; border-color: color-mix(in srgb, var(--sqb-acc) 55%, #ffffff); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sqb-acc) 12%, transparent); }
.sqb-switch-row:has(input:disabled) { cursor: default; opacity: 0.7; }
.sqb-step { margin: 6px 0 0; }
.sqb-step.is-many { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--sqb-line); }
.sqb-step-head { display: flex; align-items: center; gap: 2px; padding: 0 4px 6px 8px; }
.sqb-step-head span { flex: 1 1 auto; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--sqb-faint); }
.sqb-qs { display: flex; flex-direction: column; gap: 2px; min-height: 8px; margin: 0; padding: 0; list-style: none; }
.sqb-qs li.is-ghost { opacity: 0.35; }
.sqb-qs li.is-chosen .sqb-item { background: #ffffff; box-shadow: 0 10px 24px -8px rgba(15, 23, 42, 0.3); }
.sqb-step-empty { margin: 4px 8px; font-size: 0.76rem; color: var(--sqb-faint); }
.sqb-add-wrap { padding: 4px 0 0; }
.sqb-add { display: inline-flex; align-items: center; gap: 8px; width: 100%; height: 36px; padding: 0 10px; border: 1.5px dashed #dbe1ea; border-radius: 11px; background: transparent; font-size: 0.8rem; font-weight: 700; color: var(--sqb-mute); cursor: pointer; transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease; }
.sqb-add:hover, .sqb-add[aria-expanded="true"] { border-color: color-mix(in srgb, var(--sqb-acc) 45%, #ffffff); background: color-mix(in srgb, var(--sqb-acc) 4%, #ffffff); color: var(--sqb-acc); }
.sqb-picker { margin: 6px 0 4px; padding: 6px; border: 1px solid var(--sqb-line); border-radius: 14px; background: #ffffff; box-shadow: 0 16px 36px -14px rgba(15, 23, 42, 0.28); animation: sqb-drop 0.16s ease; }
@keyframes sqb-drop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.sqb-picker button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: 0; border-radius: 10px; background: transparent; text-align: left; cursor: pointer; }
.sqb-picker button:hover, .sqb-picker button:focus-visible { background: var(--sqb-soft); outline: none; }
.sqb-newstep { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 12px; padding: 8px; border: 0; border-radius: 12px; background: transparent; text-align: left; color: var(--sqb-mute); cursor: pointer; }
.sqb-newstep > i { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; font-size: 1rem; }
.sqb-newstep:hover { background: var(--sqb-soft); }
.sqb-newstep b { display: block; font-size: 0.82rem; font-weight: 700; color: var(--sqb-ink); }
.sqb-newstep small { display: block; font-size: 0.72rem; }
.sqb-newstep:disabled { opacity: 0.5; cursor: default; }
.sqb-ol-end { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--sqb-line); }
.sqb-mini { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 30px; height: 30px; border: 0; border-radius: 9px; background: transparent; font-size: 0.78rem; color: var(--sqb-mute); cursor: pointer; transition: background 0.12s ease, color 0.12s ease; }
.sqb-mini:hover:not(:disabled) { background: var(--sqb-soft); color: var(--sqb-ink); }
.sqb-mini.is-danger:hover:not(:disabled) { background: #fee2e2; color: #dc2626; }
.sqb-mini:disabled { opacity: 0.35; cursor: default; }

/* anteprima */
.sqb-stage { display: flex; align-items: center; justify-content: center; min-height: 0; padding: 24px; background: #eceff4; }
.sqb-frame { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 16px; background: #ffffff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 24px 48px -28px rgba(15, 23, 42, 0.35); transition: width 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), border-radius 0.3s ease; }
.sqb[data-device="mobile"] .sqb-frame { width: 390px; max-height: 820px; border: 10px solid #16141a; border-radius: 46px; }
.sqb-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; pointer-events: none; transition: opacity 0.15s ease; }
.sqb-frame iframe.is-on { opacity: 1; pointer-events: auto; }
.sqb-loading { position: absolute; top: 0; left: 0; z-index: 2; width: 100%; height: 3px; background: var(--sqb-acc); opacity: 0; transform: scaleX(0); transform-origin: left; }
.sqb-loading.is-on { opacity: 0.8; animation: sqb-load 1.2s ease-out forwards; }
@keyframes sqb-load { from { transform: scaleX(0); } to { transform: scaleX(0.85); } }

/* impostazioni */
.sqb-insp { display: flex; flex-direction: column; gap: 16px; padding: 18px 18px 28px; animation: sqb-drop 0.16s ease; }
.sqb-insp-head { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--sqb-line); }
.sqb-insp-head b { display: block; font-size: 0.95rem; font-weight: 800; }
.sqb-insp-head small { display: block; font-size: 0.74rem; color: var(--sqb-mute); }
.sqb-field { display: flex; flex-direction: column; gap: 6px; }
.sqb-label { margin: 0; font-size: 0.78rem; font-weight: 800; color: #334155; }
.sqb-label small { font-weight: 600; color: var(--sqb-faint); }
.sqb-field textarea, .sqb-field input[type=text] { width: 100%; padding: 9px 12px; border: 1.5px solid #e2e8f0; border-radius: 12px; background: #ffffff; font: inherit; font-size: 0.88rem; line-height: 1.45; color: var(--sqb-ink); outline: none; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.sqb-field textarea { resize: vertical; }
.sqb-field textarea:focus, .sqb-field input[type=text]:focus { border-color: color-mix(in srgb, var(--sqb-acc) 55%, #ffffff); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sqb-acc) 12%, transparent); }
.sqb-field textarea::placeholder, .sqb-field input::placeholder { color: var(--sqb-faint); }
.sqb-hint { margin: 0; font-size: 0.74rem; line-height: 1.45; color: var(--sqb-mute); }
.sqb-types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.sqb-types button { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 5px 8px; border: 1.5px solid var(--sqb-line); border-radius: 11px; background: #ffffff; text-align: left; font-size: 0.76rem; font-weight: 700; line-height: 1.2; color: #334155; cursor: pointer; transition: border-color 0.12s ease, box-shadow 0.12s ease; }
.sqb-types button i { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 26px; height: 26px; border-radius: 7px; font-size: 0.74rem; }
.sqb-types button:hover { border-color: #cbd5e1; }
.sqb-types button[aria-pressed="true"] { border-color: var(--sqb-acc); box-shadow: inset 0 0 0 1px var(--sqb-acc); color: var(--sqb-ink); }
.sqb-sys { display: flex; gap: 10px; margin: 0; padding: 10px 12px; border-radius: 12px; background: #fffbeb; font-size: 0.78rem; line-height: 1.45; color: #78350f; }
.sqb-sys i { margin-top: 2px; color: #d97706; }
.sqb-sys b { display: block; }
.sqb-opts { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; counter-reset: sqb-opt; }
.sqb-opts li { display: flex; align-items: center; gap: 6px; counter-increment: sqb-opt; }
.sqb-opts li::before { content: counter(sqb-opt, upper-alpha); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 24px; height: 24px; border: 1.5px solid var(--sqb-line); border-radius: 7px; font-size: 0.7rem; font-weight: 800; color: var(--sqb-mute); }
.sqb-link { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 4px 2px; border: 0; background: none; font-size: 0.8rem; font-weight: 800; color: var(--sqb-acc); cursor: pointer; }
.sqb-link.is-danger { color: #dc2626; }
.sqb-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 12px 0 0; border-top: 1px solid var(--sqb-line); cursor: pointer; }
.sqb-switch-row b { display: block; font-size: 0.84rem; }
.sqb-switch-row small { display: block; font-size: 0.74rem; color: var(--sqb-mute); }
.sqb-err { margin: 0; padding: 8px 12px; border-radius: 10px; background: #fee2e2; font-size: 0.8rem; font-weight: 700; color: #b91c1c; }
.sqb-insp-foot { display: flex; align-items: center; gap: 4px; padding-top: 12px; border-top: 1px solid var(--sqb-line); }
.sqb-insp-foot .sqb-link { margin-left: 8px; }
.sqb-insp-foot .sqb-link.is-danger { margin-left: auto; }
.sqb-quote { margin: 0; padding: 12px 14px; border-left: 3px solid var(--sqb-line); border-radius: 0 12px 12px 0; background: var(--sqb-soft); font-size: 0.84rem; line-height: 1.5; }
.sqb :focus-visible { outline: 2px solid var(--sqb-acc); outline-offset: 2px; }

/* sotto i 992px: una parte alla volta (Domande, Modifica, Anteprima), l'anteprima a tutta larghezza */
@media (max-width: 991.98px) {
    .sqb-top { flex-wrap: wrap; gap: 8px 10px; padding: 8px 12px; }
    .sqb-views { display: inline-flex; order: 5; width: 100%; }
    .sqb-views button { flex: 1 1 0; justify-content: center; height: 32px; }
    .sqb-device, .sqb-state { display: none; }
    .sqb-save { padding: 0 14px; }
    .sqb-body { display: block; position: relative; }
    .sqb-outline, .sqb-inspector, .sqb-stage { position: absolute; inset: 0; display: none; border: 0; }
    .sqb[data-view="list"] .sqb-outline, .sqb[data-view="edit"] .sqb-inspector { display: block; }
    .sqb[data-view="preview"] .sqb-stage { display: flex; padding: 0; }
    .sqb-stage .sqb-frame, .sqb[data-device="mobile"] .sqb-frame { width: 100%; max-height: none; border: 0; border-radius: 0; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
    .sqb, .sqb-picker, .sqb-insp, .sqb-loading.is-on { animation: none; }
    .sqb-frame, .sqb-frame iframe { transition: none; }
}

/* ── Automazioni avanzate (views/automations_flow_v3.php, assets/js/MYB.FlowBuilder.js) ─────────────────── */
.af3 { position: relative; gap: 12px; }
.af3-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--c3-line); border-radius: 16px; background: #ffffff; }
.af3-back { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--c3-ink); }
.af3-back:hover { background: #f1f5f9; }
.af3-name { flex: 1 1 220px; min-width: 0; padding: 4px 8px; border: 1.5px solid transparent; border-radius: 10px; font-size: 1.1rem; font-weight: 800; color: var(--c3-ink); background: transparent; outline: none; }
.af3-name:hover, .af3-name:focus { border-color: var(--c3-line); }
.af3-dirty { font-size: 0.75rem; font-weight: 700; color: #d97706; }
.af3-bar-acts { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.af3-paused { padding: 10px 14px; border-radius: 12px; background: rgba(251, 191, 36, 0.15); font-size: 0.84rem; font-weight: 700; color: #92400e; }
.af3-tabs { align-self: flex-start; }
.af3-main { display: grid; grid-template-columns: 210px minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.af3-palette { position: sticky; top: 80px; padding: 12px; border: 1px solid var(--c3-line); border-radius: 16px; background: #ffffff; }
.af3-palette h6, .af3-menu h6 { margin: 10px 0 6px; font-size: 0.64rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c3-mute); }
.af3-palette h6:first-child { margin-top: 0; }
.af3-pal { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; padding: 8px 10px; border: 1px solid var(--c3-line); border-radius: 10px; background: #ffffff; font-size: 0.82rem; font-weight: 700; color: var(--c3-ink); cursor: grab; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.af3-pal:hover { border-color: color-mix(in srgb, var(--primary, #6366f1) 45%, #ffffff); box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06); }
.af3-pal:active { cursor: grabbing; }
.af3-pal i { width: 16px; text-align: center; color: #4f46e5; }
.af3-hint { margin: 10px 0 0; font-size: 0.74rem; color: var(--c3-mute); }
.af3-canvas-wrap { position: relative; min-height: calc(100vh - 280px); overflow: auto; padding: 28px 16px 48px; border: 1px solid var(--c3-line); border-radius: 16px; background: #f8fafc radial-gradient(#dbe1ea 1px, transparent 1px) 0 0 / 18px 18px; }
.af3-zoom { position: absolute; bottom: 10px; right: 10px; z-index: 2; display: flex; gap: 4px; }
.af3-zoom button { width: 30px; height: 30px; border: 1px solid var(--c3-line); border-radius: 8px; background: #ffffff; font-size: 0.75rem; color: #475569; }
.af3-flow { display: flex; flex-direction: column; align-items: center; width: max-content; min-width: 100%; margin: 0 auto; transform-origin: top center; transition: transform 0.15s ease; }
.af3-list { display: flex; flex-direction: column; align-items: center; }
.af3-node { display: flex; align-items: center; gap: 10px; width: 260px; padding: 10px 12px; border: 1.5px solid var(--c3-line); border-radius: 14px; background: #ffffff; box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05); text-align: left; cursor: pointer; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.af3-node:hover { border-color: #c7d2fe; }
.af3-node.is-sel { border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18); }
.af3-node.is-bad { border-style: dashed; border-color: #dc2626; }
.af3-node.is-hit.is-ok { box-shadow: 0 0 0 3px #dcfce7; border-color: #15803d; }
.af3-node.is-hit.is-skip { box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.3); border-color: #d97706; }
.af3-node.is-hit.is-error { box-shadow: 0 0 0 3px #fee2e2; border-color: #dc2626; }
.af3-node-ico { flex: 0 0 32px; display: grid; place-items: center; height: 32px; border-radius: 50%; background: rgba(99, 102, 241, 0.1); font-size: 0.85rem; color: #4f46e5; }
.af3-node-txt { display: flex; flex-direction: column; min-width: 0; }
.af3-node-txt b { font-size: 0.86rem; font-weight: 800; color: var(--c3-ink); }
.af3-node-txt small { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 0.74rem; color: var(--c3-mute); }
.af3-node.is-trigger { border-color: #fbbf24; }
.af3-node.is-trigger .af3-node-ico { background: rgba(251, 191, 36, 0.18); color: #d97706; }
.af3-node.is-send-wa .af3-node-ico { background: #dcfce7; color: #15803d; }
.af3-node.is-send-email .af3-node-ico { background: #e0f2fe; color: #0369a1; }
.af3-node.is-wait .af3-node-ico { background: #f1f5f9; color: #475569; }
.af3-node.is-if .af3-node-ico { background: #ede9fe; color: #6d28d9; }
.af3-node.is-end .af3-node-ico { background: #1e293b; color: #ffffff; }
.af3-node.is-tag-add .af3-node-ico, .af3-node.is-tag-remove .af3-node-ico { background: #fce7f3; color: #be185d; }
.af3-node.is-status .af3-node-ico { background: rgba(251, 191, 36, 0.18); color: #d97706; }
.af3-slot { position: relative; display: flex; align-items: center; justify-content: center; height: 44px; }
.af3-slot::before { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: #cbd5e1; }
.af3-plus { position: relative; z-index: 1; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 1.5px solid #cbd5e1; border-radius: 50%; background: #ffffff; font-size: 0.65rem; color: #64748b; transition: all 0.15s ease; }
.af3-plus:hover, .af3-slot.is-over .af3-plus { border-color: #4f46e5; background: #4f46e5; color: #ffffff; transform: scale(1.15); }
.af3.is-dragging .af3-slot { height: 56px; }
.af3.is-dragging .af3-plus { border-style: dashed; border-color: #4f46e5; color: #4f46e5; }
.af3-if { display: flex; flex-direction: column; align-items: center; }
.af3-branches { display: flex; align-items: flex-start; gap: 24px; margin-top: 14px; }
.af3-branch { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 284px; padding: 18px 12px 8px; border: 1.5px dashed #e2e8f0; border-radius: 16px; background: rgba(255, 255, 255, 0.6); }
.af3-branch.is-yes { border-color: #bbf7d0; }
.af3-branch.is-no { border-color: #fecaca; }
.af3-branch-label { position: absolute; top: -11px; padding: 2px 10px; border-radius: 20px; font-size: 0.7rem; font-weight: 800; }
.af3-branch.is-yes .af3-branch-label { background: #dcfce7; color: #15803d; }
.af3-branch.is-no .af3-branch-label { background: #fee2e2; color: #dc2626; }
.af3-endcap { padding: 3px 12px; border-radius: 20px; background: #e2e8f0; font-size: 0.7rem; font-weight: 800; color: #475569; }
.af3-drawer { position: sticky; top: 80px; width: 340px; max-height: calc(100vh - 110px); overflow: auto; padding: 16px; border: 1px solid var(--c3-line); border-radius: 16px; background: #ffffff; }
.af3-drawer h4 { margin: 0 28px 14px 0; font-size: 1rem; font-weight: 800; color: var(--c3-ink); }
.af3-drawer h4 i { margin-right: 6px; color: #4f46e5; }
.af3-drawer .wf3-field { margin-bottom: 12px; }
.af3-drawer-close { position: absolute; top: 12px; right: 12px; }
.af3-drawer-foot { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--c3-line); }
.af3-row { display: flex; gap: 8px; }
.af3-conds { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.af3-conds > p { font-size: 0.82rem; }
.af3-msg { max-height: 160px; overflow: auto; padding: 10px 12px; border-radius: 10px; background: #f0fdf4; font-size: 0.84rem; white-space: pre-wrap; color: var(--c3-ink); }
.af3-check { display: flex; align-items: center; gap: 8px; margin: 8px 0 2px; font-size: 0.84rem; font-weight: 700; color: var(--c3-ink); }
.af3-menu { position: absolute; z-index: 1050; width: 240px; max-height: 380px; overflow: auto; padding: 6px; border: 1px solid var(--c3-line); border-radius: 14px; background: #ffffff; box-shadow: 0 18px 40px -12px rgba(15, 23, 42, 0.3); }
.af3-menu h6 { margin: 8px 8px 4px; }
.af3-menu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 10px; border: 0; border-radius: 8px; background: none; font-size: 0.84rem; font-weight: 700; color: var(--c3-ink); text-align: left; }
.af3-menu button:hover, .af3-menu button:focus { background: #f1f5f9; outline: none; }
.af3-menu button i { width: 16px; text-align: center; color: #4f46e5; }
.af3-steps { margin: 8px 0; padding: 0; list-style: none; }
.af3-steps li { display: flex; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--c3-line); font-size: 0.82rem; color: #334155; }
.af3-steps li i { flex: 0 0 16px; margin-top: 3px; color: #15803d; }
.af3-steps li.is-skip i { color: #d97706; }
.af3-steps li.is-error, .af3-steps li.is-error i { color: #dc2626; }
.af3-runs { display: flex; flex-direction: column; gap: 8px; }
.af3-run { padding: 10px 14px; border: 1px solid var(--c3-line); border-radius: 14px; background: #ffffff; }
.af3-run summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; cursor: pointer; font-size: 0.86rem; font-weight: 700; }
.af3-node:focus-visible, .af3-pal:focus-visible, .af3-plus:focus-visible, .af3-zoom button:focus-visible { outline: 2px solid var(--myb-cyan); outline-offset: 2px; }
@media (max-width: 991px) {
    .af3-main { grid-template-columns: minmax(0, 1fr); }
    .af3-palette { display: none; }
    .af3-drawer { position: fixed; right: 0; bottom: 0; left: 0; top: auto; z-index: 1040; width: auto; max-height: 70vh; border-radius: 18px 18px 0 0; box-shadow: 0 -12px 32px rgba(15, 23, 42, 0.18); }
    .af3-bar-acts { width: 100%; margin-left: 0; }
}
.af3-drawer p, .af3-drawer .c3-muted { font-size: 0.8rem; }
.af3-drawer .form-control-v3:not(textarea) { height: 38px; padding-top: 0; padding-bottom: 0; }
.af3-drawer-foot i { margin-right: 4px; }
/* Condizioni come una frase: [cosa controllo] ✕ / [come] [valore]; "e" fra una e l'altra */
.af3-cond { display: grid; grid-template-columns: minmax(84px, auto) minmax(0, 1fr) 28px; gap: 6px; width: 100%; padding: 8px; border: 1px solid var(--c3-line); border-radius: 12px; background: #f8fafc; }
.af3-cond select, .af3-cond input { height: 34px; min-width: 0; padding: 0 10px; border: 1px solid var(--c3-line); border-radius: 10px; background-color: #ffffff; font-size: 0.84rem; color: var(--c3-ink); outline: none; }
.af3-cond select:focus, .af3-cond input:focus { border-color: color-mix(in srgb, var(--primary, #6366f1) 45%, #ffffff); }
.af3-cond-what { grid-column: 1 / 3; font-weight: 800; }
.af3-cond-del { display: grid; place-items: center; width: 28px; height: 34px; padding: 0; border: 0; border-radius: 8px; background: none; color: #94a3b8; }
.af3-cond-del:hover, .af3-cond-del:focus-visible { background: #fee2e2; color: #dc2626; }
.af3-cond-op { font-weight: 700; color: #4f46e5 !important; }
.af3-cond-val { grid-column: 2 / 4; }
.af3-cond-and { align-self: center; padding: 0 8px; border-radius: 20px; background: #ede9fe; font-size: 0.72rem; font-weight: 800; color: #6d28d9; }
.af3-pick { display: flex; flex-direction: column; gap: 2px; max-height: 220px; overflow: auto; padding: 4px 10px; border: 1px solid var(--c3-line); border-radius: 12px; }
.af3-pick .af3-check { margin: 4px 0; font-weight: 600; }
/* Selettore a livelli (MYB.FlowBuilder picker): pulsante con gruppo e voce, pannello sotto il campo, nel flusso del pannello */
.af3-pk { position: relative; width: 100%; }
.af3-pk-btn { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 6px 12px; border: 1px solid var(--c3-line); border-radius: 12px; background: #ffffff; text-align: left; color: var(--c3-ink); transition: border-color 0.15s ease; }
.af3-pk-btn:hover, .af3-pk-btn[aria-expanded="true"] { border-color: color-mix(in srgb, var(--primary, #6366f1) 45%, #ffffff); }
.af3-pk-btn > i:first-child { flex: 0 0 28px; display: grid; place-items: center; height: 28px; border-radius: 8px; background: rgba(99, 102, 241, 0.1); font-size: 0.8rem; color: #4f46e5; }
.af3-pk-btn span { display: flex; flex-direction: column; flex: 1; min-width: 0; font-size: 0.86rem; font-weight: 800; line-height: 1.2; }
.af3-pk-btn span small { font-size: 0.68rem; font-weight: 700; color: var(--c3-mute); }
.af3-pk-btn .af3-pk-ph { font-weight: 600; color: var(--c3-mute); }
.af3-pk-caret { font-size: 0.7rem; color: #94a3b8; }
.af3-pk-panel { margin-top: 6px; padding: 8px; border: 1px solid var(--c3-line); border-radius: 12px; background: #ffffff; box-shadow: 0 12px 28px -12px rgba(15, 23, 42, 0.25); }
.af3-pk-search { width: 100%; height: 34px; margin-bottom: 6px; padding: 0 10px; border: 1px solid var(--c3-line); border-radius: 10px; font-size: 0.84rem; outline: none; }
.af3-pk-search:focus { border-color: color-mix(in srgb, var(--primary, #6366f1) 45%, #ffffff); }
.af3-pk-list { max-height: 280px; overflow: auto; }
.af3-pk-list h6 { margin: 8px 6px 4px; font-size: 0.64rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c3-mute); }
.af3-pk-group, .af3-pk-item, .af3-pk-back { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; font-size: 0.84rem; font-weight: 700; color: var(--c3-ink); text-align: left; }
.af3-pk-group:hover, .af3-pk-item:hover, .af3-pk-back:hover, .af3-pk-group:focus-visible, .af3-pk-item:focus-visible { background: #f1f5f9; outline: none; }
.af3-pk-group > i:first-child { width: 18px; text-align: center; color: #4f46e5; }
.af3-pk-group span { flex: 1; }
.af3-pk-group small { min-width: 22px; padding: 1px 6px; border-radius: 20px; background: #f1f5f9; font-size: 0.68rem; text-align: center; color: #475569; }
.af3-pk-group > i:last-child { font-size: 0.65rem; color: #94a3b8; }
.af3-pk-item { flex-direction: column; align-items: flex-start; gap: 0; font-weight: 600; }
.af3-pk-item small { font-size: 0.66rem; font-weight: 700; color: var(--c3-mute); }
.af3-pk-back { margin-bottom: 4px; border-bottom: 1px solid var(--c3-line); border-radius: 8px 8px 0 0; font-weight: 800; color: #4f46e5; }
.af3-pk-none { margin: 8px; font-size: 0.82rem; color: var(--c3-mute); }
.af3-cond .af3-pk { grid-column: 1 / 3; }
.af3-cond .af3-pk-btn { min-height: 34px; padding: 3px 10px; border-radius: 10px; }
.af3-cond .af3-pk-btn > i:first-child { flex-basis: 22px; height: 22px; font-size: 0.7rem; }
.af3-drawer .tox-tinymce { border-radius: 12px !important; border-color: var(--c3-line) !important; }
.af3-drawer textarea[data-rich][aria-hidden="true"] { display: none !important; } /* il bersaglio di TinyMCE: .form-control-v3 lo rimetterebbe in vista */
.af3-pk-item.is-on { background: rgba(99, 102, 241, 0.1); color: #4f46e5; font-weight: 800; }
/* Più eventi di partenza: in fila, "oppure" fra l'uno e l'altro, "+ Aggiungi trigger" tratteggiato; uniti al primo passo */
.af3-triggers { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; max-width: 900px; }
.af3-triggers .af3-node { width: 240px; }
.af3-or { padding: 2px 10px; border-radius: 20px; background: rgba(251, 191, 36, 0.18); font-size: 0.7rem; font-weight: 800; color: #b45309; }
.af3-add-trigger { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border: 1.5px dashed #fbbf24; border-radius: 14px; background: rgba(255, 255, 255, 0.7); font-size: 0.8rem; font-weight: 800; color: #b45309; transition: all 0.15s ease; }
.af3-add-trigger:hover, .af3-add-trigger:focus-visible { background: rgba(251, 191, 36, 0.12); outline: none; }
.af3-sub { margin: 16px 0 4px; padding-top: 12px; border-top: 1px solid var(--c3-line); font-size: 0.66rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c3-mute); }
/* Elenco automazioni avanzate: "Porta qui le automazioni di sempre" (modelli pronti) */
.af3-import { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; padding: 12px 14px; border: 1.5px dashed #ddd6fe; border-radius: 16px; background: #faf8ff; font-size: 0.84rem; color: #475569; }
.af3-import i { color: #7c3aed; }
.af3-import b { color: var(--c3-ink); }
.af3-import-acts { display: flex; flex-wrap: wrap; gap: 8px; }
/* "Invia WhatsApp": testo scritto qui o modello del mittente (segmentato, come le pillole delle viste) */
.af3-seg { display: flex; gap: 4px; margin: 4px 0 12px; padding: 3px; border-radius: 12px; background: #f1f5f9; }
.af3-seg button { flex: 1; height: 32px; border: 0; border-radius: 9px; background: none; font-size: 0.8rem; font-weight: 800; color: #475569; }
.af3-seg button.is-on { background: #ffffff; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12); color: #4f46e5; }
.af3-seg button:focus-visible { outline: 2px solid var(--myb-cyan); outline-offset: 1px; }
/* ── Automazioni v3, una pagina (views/automations_index_v3.php): base, sequenze, avanzate ──────────────── */
.au3-head { position: relative; }
.au3-tabs { margin: 4px 0 16px; }
.au3-summary { margin: 0 0 12px; font-size: 0.84rem; font-weight: 700; color: var(--c3-mute); }
.au3-group { margin-bottom: 18px; }
.au3-group h3 { margin: 0 0 8px; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c3-mute); }
.au3-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--c3-line); border-radius: 16px; background: #ffffff; overflow: hidden; }
.au3-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 12px 14px; }
.au3-row + .au3-row { border-top: 1px solid var(--c3-line); }
.au3-row.is-replaced { background: #f8fafc; }
.au3-ch { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #dcfce7; color: #15803d; }
.au3-ch.is-mail { background: #e0f2fe; color: #0369a1; }
.au3-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.au3-txt b { font-size: 0.9rem; font-weight: 800; color: var(--c3-ink); }
.au3-txt small { overflow: hidden; font-size: 0.78rem; color: #475569; text-overflow: ellipsis; white-space: nowrap; }
.au3-preview { overflow: hidden; font-size: 0.78rem; font-style: italic; color: #334155; text-overflow: ellipsis; white-space: nowrap; }
.au3-replaced { font-size: 0.76rem; font-weight: 700; color: #4f46e5; }
.au3-row .c3-chip { min-height: 34px; }
.af3-del-flow { margin-right: 6px; font-size: 0.8rem; }
@media (max-width: 767px) {
    .au3-row { grid-template-columns: 34px minmax(0, 1fr); }
    .au3-row .pill-v3 { grid-column: 2; justify-self: start; }
    .au3-row .c3-chip { grid-column: 2; justify-self: start; }
}
/* Dentro la pagina Automazioni i filtri delle avanzate sono un controllo a segmenti, non altre schede: si distinguono dalla navigazione */
.au3 .af3-filter { gap: 2px; padding: 3px; border-radius: 12px; background: #f1f5f9; }
.au3 .af3-filter .tab-pill-v3 { height: 30px; padding: 0 12px; border: 0; border-radius: 9px; background: none; box-shadow: none; font-size: 0.78rem; color: #475569; }
.au3 .af3-filter .tab-pill-v3.active { background: #ffffff; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12); color: #4f46e5; }
.au3 .af3-filter .tab-pill-count-v3 { background: transparent; color: inherit; }
/* Automazioni v3: Coda invio sotto lo stato WhatsApp (in programma, partiti, falliti, prossimi invii) */
.au3-q { margin-bottom: 16px; padding: 16px; border: 1px solid #e9edf3; border-radius: 20px; background: #ffffff; }
.au3-q header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.au3-q header h3 { flex: 1; margin: 0; font-size: 1rem; font-weight: 800; color: #1c2434; }
.au3-q-ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: rgba(99, 102, 241, 0.1); color: #4f46e5; }
.au3-q-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.au3-q-stats a { display: flex; flex-direction: column; gap: 2px; padding: 10px; border-radius: 14px; background: #f8fafc; text-decoration: none !important; transition: background-color 0.15s ease; }
.au3-q-stats a:hover, .au3-q-stats a:focus-visible { background: #eef2ff; }
.au3-q-stats b { font-size: 1.4rem; font-weight: 800; line-height: 1.1; color: #1c2434; }
.au3-q-stats span { font-size: 0.72rem; font-weight: 700; line-height: 1.25; color: #475569; }
.au3-q-stats a.is-bad { background: #fee2e2; }
.au3-q-stats a.is-bad b, .au3-q-stats a.is-bad span { color: #b91c1c; }
.au3-q h4 { margin: 14px 0 6px; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #64748b; }
.au3-q-next { margin: 0; padding: 0; list-style: none; }
.au3-q-next li { display: grid; grid-template-columns: 74px 16px minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid #f1f5f9; font-size: 0.8rem; color: #334155; }
.au3-q-next li:last-child { border-bottom: 0; }
.au3-q-next time { font-weight: 800; color: #1c2434; font-variant-numeric: tabular-nums; }
.au3-q-next i { color: #15803d; }
.au3-q-next span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.au3-q-next small { color: #64748b; }
.au3-q-empty { margin: 12px 0 0; font-size: 0.8rem; color: #64748b; }
.au3-q-alert { margin: 12px 0 0; padding: 8px 10px; border-radius: 10px; background: #fee2e2; font-size: 0.78rem; font-weight: 700; color: #b91c1c; }
.au3-seq { margin-bottom: 12px; }
/* Automazioni v3: blocco WhatsApp (GenerateWASTATUS_CARD_V3), stessa forma della Coda invio; verde solo per lo stato */
.au3-wa-ico { background: #dcfce7; color: #15803d; font-size: 1.05rem; }
.au3-wa header .pill-v3 { display: inline-flex; align-items: center; gap: 6px; }
.au3-wa-acct { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.au3-wa-acct img { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #f1f5f9; }
.au3-wa-acct div { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.au3-wa-acct b { overflow: hidden; font-size: 0.9rem; font-weight: 800; color: #1c2434; text-overflow: ellipsis; white-space: nowrap; }
.au3-wa-acct small { overflow: hidden; font-size: 0.76rem; color: #64748b; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.au3-wa-refresh { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; padding: 0; border: 1px solid #e9edf3; border-radius: 10px; background: #ffffff; color: #475569; }
.au3-wa-refresh:hover, .au3-wa-refresh:focus-visible { background: #f1f5f9; outline: none; }
.au3-wa .au3-q-stats > div { display: flex; flex-direction: column; gap: 2px; padding: 10px; border-radius: 14px; background: #f8fafc; }
.au3-wa-acts.card-body { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding: 0; flex-wrap: wrap; }
.au3-wa-acts .wa-phone-form { flex-basis: 100%; }
.au3-wa.is-off { border-color: #fecaca; }
.au3-wa-off { margin: 0 0 12px; font-size: 0.84rem; line-height: 1.45; color: #334155; }
.au3-wa-cta { width: 100%; justify-content: center; }

/* Popup WhatsApp (MYB.WASender): sezioni più vicine, etichette come "Quando inviarlo"; quando sotto i pulsanti c'è
   altro da scorrere il footer prende un filo e un'ombra (is-more, MYB.WASender) */
#waInviteModal .modal-body > .form-group { margin-bottom: 12px; }
#waInviteModal .modal-body > .form-group > label { margin-bottom: 4px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: #64748b; }
#waInviteModal .modal-body { overscroll-behavior: contain; }
#waInviteModal .modal-footer { position: relative; transition: box-shadow 0.2s; }
#waInviteModal .modal-footer.is-more { border-top: 1px solid #eef1f5 !important; box-shadow: 0 -8px 16px -12px rgba(15, 23, 42, 0.35); }

/* "Quando inviarlo", Subito / Più tardi; con Più tardi orari rapidi, giorno e ora, e il
   riepilogo di quando partirà (rosso se l'orario non va) */
.wa-sched { --c3-line: #e9edf3; --c3-ink: #1c2434; --c3-mute: #64748b; margin-top: 14px; padding-top: 14px; border-top: 1px solid #eef1f5; }
.wa-sched-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.wa-sched-label { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: #64748b; }
.wa-sched .tab-pill-v3 { padding: 6px 12px; }
.wa-sched .tab-pill-v3:not(.active) { background: #f8fafc; }
.wa-sched .tab-pill-v3:focus-visible, .wa-sched .c3-chip:focus-visible { outline: 2px solid var(--primary, #6366f1); outline-offset: 2px; }
.wa-sched-box { margin-top: 12px; padding: 14px; border-radius: 14px; background: color-mix(in srgb, var(--primary, #6366f1) 5%, #ffffff); border: 1px solid color-mix(in srgb, var(--primary, #6366f1) 14%, #ffffff); }
.wa-sched-box[hidden] { display: none; }
.wa-sched-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.wa-sched-pick { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 10px; margin-top: 12px; }
.wa-sched-pick label { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.wa-sched-pick label > span { font-size: 0.72rem; font-weight: 700; color: #64748b; }
.wa-sched-pick .form-control { height: 38px; border-radius: 10px; border-color: #e2e8f0; background: #ffffff; font-size: 0.88rem; }
.wa-sched-sum { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; font-size: 0.86rem; color: #1c2434; }
.wa-sched-sum > i { color: var(--primary, #6366f1); }
.wa-sched-sum.is-bad { color: #b91c1c; }
.wa-sched-sum.is-bad > i { color: #b91c1c; }
.wa-sched-note { display: block; margin-top: 6px; font-size: 0.76rem; line-height: 1.45; color: #64748b; }

/* Titoletti dentro un sottomenu del menu classico (CRM: AgentFlow, Recruiting), come i titoli dei gruppi */
.accordion-menu li ul li.sub-menu-title { padding: 10px 20px 2px 48px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.45; }

/* ── Marketplace (views/marketplace.php, DESIGN.md §50) ──
   Elenco: una scheda per prodotto. Pagina: prodotto, scelta dell'opzione, un solo pulsante d'acquisto con il prezzo
   accanto, poi "Come funziona" e la descrizione. */
.mk3 [hidden] { display: none !important; }
.mk3-account { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 16px; margin-bottom: 32px; }
/* icona e saldo in alto, il link sotto al saldo: tre riquadri stanno in una riga senza andare a capo */
.mk3-acc { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px 16px; padding: 18px 22px; border-radius: 24px; color: inherit; text-decoration: none !important; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.mk3-acc:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -18px rgba(15, 23, 42, 0.35); }
.mk3-acc:focus-visible { outline: 2px solid var(--secondary); outline-offset: 2px; }
.mk3-acc__icon { display: inline-flex; flex: 0 0 48px; grid-row: span 2; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 16px; background: linear-gradient(135deg, var(--secondary), var(--primary)); font-size: 1.15rem; color: #ffffff; }
.mk3-acc__text { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; }
.mk3-acc__text small { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #64748b; }
.mk3-acc__text b { font-size: 1.35rem; font-weight: 800; line-height: 1.25; color: #0f172a; }
.mk3-acc__text em { font-size: 0.82rem; font-style: normal; color: #475569; }
.mk3-acc__go { grid-column: 2; font-size: 0.82rem; font-weight: 700; color: #334155; white-space: nowrap; }
.mk3-acc__go i { margin-left: 4px; font-size: 0.7rem; }
.mk3-cats { flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.mk3-cats .tab-pill-v3 { min-height: 44px; padding: 8px 16px; font-size: 0.88rem; }
.mk3-cats .tab-pill-v3 > i { font-size: 0.85rem; }
.mk3-shelf { margin-bottom: 44px; }
.mk3-shelf__head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid rgba(15, 23, 42, 0.08); }
.mk3-shelf__icon { display: inline-flex; flex: 0 0 48px; align-items: center; justify-content: center; height: 48px; border-radius: 16px; background: linear-gradient(135deg, var(--secondary), var(--primary)); font-size: 1.15rem; color: #ffffff; box-shadow: 0 8px 18px -10px rgba(15, 23, 42, 0.45); }
.mk3-shelf h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.5rem; font-weight: 800; line-height: 1.2; color: #0f172a; }
.mk3-shelf h2 span { padding: 2px 10px; border-radius: 20px; background: rgba(15, 23, 42, 0.06); font-size: 0.8rem; font-weight: 700; color: #475569; }
.mk3-shelf__head p { margin: 2px 0 0; font-size: 0.9rem; color: #64748b; }
.mk3-card { position: relative; }
.mk3-owned-badge { position: absolute; z-index: 1; top: 12px; left: 12px; padding: 4px 10px; border-radius: 20px; background: #dcfce7; box-shadow: 0 4px 12px -6px rgba(15, 23, 42, 0.3); font-size: 0.75rem; font-weight: 700; color: #15803d; }
.mk3-owned { margin: 0; padding: 10px 12px; border-radius: 12px; background: #dcfce7; font-size: 0.85rem; font-weight: 600; color: #15803d; }
@media (max-width: 767px) {
    .mk3-account { gap: 10px; margin-bottom: 24px; }
    .mk3-cats { flex-wrap: nowrap; margin: 0 -16px 24px; padding: 0 16px 4px; overflow-x: auto; scrollbar-width: none; }
    .mk3-cats .tab-pill-v3 { flex: 0 0 auto; white-space: nowrap; }
    .mk3-shelf__icon { flex-basis: 40px; height: 40px; border-radius: 12px; font-size: 1rem; }
    .mk3-shelf h2 { font-size: 1.2rem; }
    .mk3-acc { display: flex; gap: 12px; padding: 12px 14px; border-radius: 18px; }
    .mk3-acc__icon { flex-basis: 40px; width: 40px; height: 40px; border-radius: 12px; font-size: 1rem; }
    .mk3-acc__text b { font-size: 1.1rem; }
    .mk3-acc__text em { font-size: 0.78rem; }
    /* tutto il riquadro è il link: sul telefono basta la freccia */
    .mk3-acc__go { font-size: 0; }
    .mk3-acc__go i { margin: 0; font-size: 0.85rem; color: #64748b; }
}
.mk3-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr)); gap: 20px; }
.mk3-card { display: flex; flex-direction: column; overflow: hidden; border-radius: 24px; color: inherit; text-decoration: none !important; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.mk3-card:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -18px rgba(15, 23, 42, 0.35); }
.mk3-card:focus-visible { outline: 2px solid var(--secondary); outline-offset: 2px; }
.mk3-card__cover { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #eef2f7; }
.mk3-cover--empty { display: flex; align-items: center; justify-content: center; font-size: 1.8rem; color: #94a3b8; }
.mk3-card__body { display: flex; flex: 1 1 auto; flex-direction: column; gap: 8px; padding: 20px 22px 22px; }
.mk3-provider { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #64748b; }
.mk3-card__title { margin: 0; font-size: 1.2rem; font-weight: 800; line-height: 1.3; color: #0f172a; }
.mk3-card__desc { display: -webkit-box; margin: 0; overflow: hidden; font-size: 0.95rem; line-height: 1.5; color: #475569; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.mk3-card__foot { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; }
.mk3-price { font-size: 1.3rem; font-weight: 800; color: #0f172a; }
.mk3-price small { font-size: 0.82rem; font-weight: 600; color: #64748b; }
.mk3-was { display: block; margin-top: 2px; font-size: 0.95rem; font-weight: 700; color: #dc2626; text-decoration: line-through 2px; }
.mk3-card__vars { font-size: 0.82rem; font-weight: 600; color: #64748b; }
.mk3-empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 40px 20px; border-radius: 20px; text-align: center; color: #475569; }
.mk3-empty > i { font-size: 2rem; color: #94a3b8; }
.mk3-empty p { margin: 0; }

.mk3-page { max-width: 1240px; }
.mk3-back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-bottom: 8px; font-size: 0.86rem; font-weight: 700; color: #475569; }
.myb-app .mk3-back { display: none; } /* nell'app c'è già la freccia indietro nella barra in alto */
/* Media e informazioni a sinistra, acquisto a destra fisso mentre si scorre; sotto i 992px una colonna:
   immagine, acquisto, come funziona, dettagli */
.mk3-product { display: grid; grid-template-columns: minmax(0, 1fr) 420px; grid-template-areas: "media panel" "info panel"; gap: 0 28px; align-items: start; }
.mk3-product__media { grid-area: media; }
.mk3-product__info { grid-area: info; }
.mk3-panel { grid-area: panel; position: sticky; top: 100px; display: flex; flex-direction: column; gap: 14px; padding: 24px 28px 28px; border-radius: 28px; box-shadow: 0 24px 48px -28px rgba(15, 23, 42, 0.35); }
.mk3-gallery { overflow: hidden; margin-bottom: 24px; border-radius: 28px; }
.mk3-gallery__img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #ffffff; }
.mk3-title { margin: 0; font-size: 2rem; font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; color: #0f172a; }
.mk3-lead { margin: 0; font-size: 0.98rem; line-height: 1.55; color: #475569; }
.mk3-opts { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 0; padding: 0; border: 0; }
.mk3-opts legend { margin-bottom: 8px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #64748b; }
.mk3-opt { position: relative; display: block; margin: 0; cursor: pointer; }
.mk3-opt input { position: absolute; opacity: 0; }
.mk3-opt__box { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 9px 14px 9px 44px; border: 1.5px solid rgba(15, 23, 42, 0.1); border-radius: 16px; background: rgba(255, 255, 255, 0.75); transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease; }
.mk3-opt__box::before { content: ''; position: absolute; top: 50%; left: 16px; width: 18px; height: 18px; margin-top: -9px; border: 2px solid #cbd5e1; border-radius: 50%; background: #ffffff; transition: all 0.15s ease; }
.mk3-opt:hover .mk3-opt__box { border-color: rgba(15, 23, 42, 0.22); }
.mk3-opt input:checked + .mk3-opt__box { border-color: var(--secondary); background: #ffffff; box-shadow: 0 8px 20px -12px rgba(15, 23, 42, 0.35); }
.mk3-opt input:checked + .mk3-opt__box::before { border: 5px solid var(--secondary); }
.mk3-opt input:focus-visible + .mk3-opt__box { outline: 2px solid var(--secondary); outline-offset: 2px; }
.mk3-opt__main { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; min-width: 0; }
.mk3-opt__main b { font-size: 0.95rem; color: #0f172a; }
.mk3-opt__main small { flex-basis: 100%; font-size: 0.78rem; color: #64748b; }
.mk3-opt__price { flex: 0 0 auto; font-size: 0.95rem; font-weight: 800; text-align: right; color: #0f172a; }
.mk3-opt__price small { display: block; font-size: 0.75rem; font-weight: 600; color: #64748b; }
.mk3-tag { padding: 2px 8px; border-radius: 20px; background: #dcfce7; font-size: 0.7rem; font-style: normal; font-weight: 700; color: #15803d; }
.mk3-buy { display: flex; flex-direction: column; gap: 12px; padding-top: 16px; border-top: 1px solid rgba(15, 23, 42, 0.08); }
.mk3-price-big { font-size: 2.25rem; font-weight: 800; line-height: 1; letter-spacing: -0.02em; color: #0f172a; }
.mk3-price-big span { font-size: 0.95rem; font-weight: 600; letter-spacing: 0; color: #64748b; }
.mk3-save { margin-top: -4px; font-size: 0.85rem; color: #64748b; }
.mk3-save s { font-size: 1.05rem; font-weight: 700; color: #dc2626; text-decoration: line-through 2px; }
.mk3-vat { margin-top: -6px; font-size: 0.85rem; font-weight: 600; color: #64748b; }
.mk3-save em { margin-left: 6px; padding: 2px 8px; border-radius: 20px; background: #dcfce7; font-style: normal; font-weight: 700; color: #15803d; }
.mk3-cta { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; font-size: 1rem; color: #ffffff !important; text-decoration: none !important; }
.mk3-cta:disabled, .mk3-cta[aria-disabled="true"] { opacity: 0.5; transform: none; box-shadow: none; cursor: not-allowed; }
.mk3-note { margin: 0; font-size: 0.85rem; color: #64748b; }
.mk3-trust { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 0.82rem; color: #475569; }
.mk3-trust li { display: flex; align-items: baseline; gap: 10px; }
.mk3-trust i { flex: 0 0 16px; text-align: center; color: #64748b; }
.mk3-trust a { font-weight: 700; }
.mk3-credit { font-size: 0.88rem; color: #334155; }
.mk3-credit.is-short { color: #b45309; }
.mk3-terms { font-size: 0.82rem; }
.mk3-msg { margin: 0; font-size: 0.88rem; font-weight: 600; }
.mk3-msg:empty { display: none; }
.mk3-msg.is-ok { color: #15803d; }
.mk3-msg.is-error { color: #dc2626; }
.mk3-section { margin-bottom: 24px; padding: 28px; border-radius: 28px; }
.mk3-section h2, .mk3-related h2 { margin: 0 0 18px; font-size: 1.25rem; font-weight: 800; color: #0f172a; }
.mk3-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: mk3-step; }
.mk3-steps li { position: relative; padding: 18px; border-radius: 18px; background: rgba(248, 250, 252, 0.9); counter-increment: mk3-step; }
.mk3-steps li::after { content: counter(mk3-step); position: absolute; top: 14px; right: 16px; font-size: 0.8rem; font-weight: 800; color: #94a3b8; }
.mk3-step__icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-bottom: 12px; border-radius: 12px; background: #ffffff; box-shadow: 0 4px 12px -6px rgba(15, 23, 42, 0.25); color: var(--secondary); }
.mk3-steps b { display: block; margin-bottom: 4px; font-size: 0.95rem; color: #0f172a; }
.mk3-steps p { margin: 0; font-size: 0.85rem; line-height: 1.5; color: #475569; }
.mk3-desc { font-size: 0.95rem; line-height: 1.65; color: #334155; }
.mk3-desc img { max-width: 100%; border-radius: 12px; }
.mk3-desc h3 { margin: 22px 0 8px; font-size: 1.05rem; font-weight: 800; color: #0f172a; }
.mk3-desc h2 + h3 { margin-top: 0; }
.mk3-desc ul { margin: 0 0 12px; padding-left: 20px; }
.mk3-desc li { margin-bottom: 4px; }
.mk3-desc > :last-child { margin-bottom: 0; }
.mk3-related { margin-top: 16px; }
/* Schede piccole: suggerimenti, non il contenuto della pagina */
.mk3-related h2 { font-size: 1.05rem; }
.mk3-related .mk3-grid { grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 14px; }
.mk3-related .mk3-card { border-radius: 18px; }
.mk3-related .mk3-card__body { gap: 4px; padding: 12px 14px 14px; }
.mk3-related .mk3-card__title { font-size: 0.92rem; }
.mk3-related .mk3-card__desc { font-size: 0.8rem; -webkit-line-clamp: 2; }
.mk3-related .mk3-price { font-size: 0.98rem; }
.mk3-related .mk3-provider { font-size: 0.66rem; }
/* .page-container ha overflow auto ma non scorre (scorre la pagina): senza questo il pannello non resta a vista, come .c3-side */
@media (min-width: 992px) { .page-container:has(.mk3-product) { overflow: visible; } }
@media (max-width: 991px) {
    .mk3-product { grid-template-columns: minmax(0, 1fr); grid-template-areas: "media" "panel" "info"; }
    .mk3-panel { position: static; margin-bottom: 24px; padding: 20px; }
    .mk3-gallery { margin-bottom: 16px; }
    .mk3-title { font-size: 1.6rem; }
    .mk3-section { padding: 20px; }
    .mk3-steps li { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; padding: 14px 36px 14px 14px; }
    .mk3-step__icon { grid-row: span 2; margin: 0; }
}

/* ── Help Center (views/helpcenter.php): ricerca, schede, guide per categoria, release note, webinar ── */
.hc3 [hidden] { display: none !important; }
.hc3-search { display: flex; align-items: center; gap: 12px; min-height: 56px; margin-bottom: 18px; padding: 0 20px; border-radius: 18px; }
.hc3-search i { font-size: 1rem; color: #94a3b8; }
.hc3-search:focus-within i { color: var(--secondary); }
.hc3-search input { flex: 1; min-width: 0; height: 54px; border: 0; background: transparent; font-size: 1rem; color: #0f172a; outline: none; }
.hc3-tabs { flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.hc3-tabs .tab-pill-v3 { min-height: 44px; padding: 8px 16px; font-size: 0.88rem; }
.hc3-group { margin-bottom: 28px; }
.hc3-group__head { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 1.1rem; font-weight: 800; color: #0f172a; }
.hc3-group__icon { display: inline-flex; flex: 0 0 36px; align-items: center; justify-content: center; height: 36px; border-radius: 12px; background: linear-gradient(135deg, var(--secondary), var(--primary)); font-size: 0.9rem; color: #ffffff; }
.hc3-group__count { padding: 2px 9px; border-radius: 20px; background: rgba(15, 23, 42, 0.06); font-size: 0.75rem; font-weight: 700; color: #475569; }
.hc3-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 12px; }
.hc3-rows { display: grid; gap: 10px; }
.hc3-item { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 12px 16px; border-radius: 16px; color: #0f172a !important; text-decoration: none !important; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.hc3-item:hover, .hc3-webinar:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -18px rgba(15, 23, 42, 0.4); }
.hc3-item:focus-visible, .hc3-webinar:focus-visible { outline: 2px solid var(--secondary); outline-offset: 2px; }
.hc3-item__icon { display: inline-flex; flex: 0 0 36px; align-items: center; justify-content: center; height: 36px; border-radius: 12px; background: rgba(15, 23, 42, 0.05); font-size: 0.95rem; color: var(--secondary); }
.hc3-item__title { flex: 1; min-width: 0; font-size: 0.92rem; font-weight: 600; line-height: 1.35; }
.hc3-item__date { flex: 0 0 auto; font-size: 0.8rem; color: #64748b; }
.hc3-item__go { flex: 0 0 auto; font-size: 0.72rem; color: #94a3b8; }
.hc3-version { flex: 0 0 auto; padding: 4px 10px; border-radius: 20px; background: rgba(15, 23, 42, 0.06); font-size: 0.75rem; font-weight: 800; color: #334155; white-space: nowrap; }
.hc3-webinar { display: flex; flex-direction: column; overflow: hidden; border-radius: 20px; color: #0f172a !important; text-decoration: none !important; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.hc3-webinar__play { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--secondary), var(--primary)) center / cover no-repeat; }
.hc3-webinar__play i { display: inline-flex; align-items: center; justify-content: center; width: 60px; height: 60px; padding-left: 4px; border-radius: 50%; background: rgba(15, 23, 42, 0.55); box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.6); font-size: 1.3rem; color: #ffffff; transition: transform 0.15s ease; }
.hc3-webinar:hover .hc3-webinar__play i { transform: scale(1.08); }
.hc3-webinar__body { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px 16px; }
.hc3-webinar__body b { font-size: 1rem; font-weight: 800; line-height: 1.3; }
.hc3-webinar__body small { font-size: 0.8rem; color: #64748b; }
.hc3-empty { margin: 0; padding: 28px 16px; text-align: center; font-size: 0.9rem; color: #64748b; }
.hc3-side { margin-bottom: 16px; padding: 20px; border-radius: 24px; }
.hc3-side p { font-size: 0.88rem; color: #334155; }
.hc3-ticket { overflow: hidden; padding: 0; }
.hc3-side__head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.hc3-side__head h2 { margin: 0; font-size: 1.1rem; font-weight: 800; color: #0f172a; }
.hc3-side__icon { display: inline-flex; flex: 0 0 44px; align-items: center; justify-content: center; height: 44px; border-radius: 14px; font-size: 1.1rem; }
.hc3-side__icon.is-red { background: #fee2e2; color: #dc2626; }
.hc3-live { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 700; color: #15803d; }
.hc3-live span { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
.hc3-sos-call { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; border-radius: 14px; background: #dc2626; font-size: 1.25rem; font-weight: 800; color: #ffffff !important; text-decoration: none !important; }
.hc3-sos-call:hover { background: #b91c1c; }
.hc3-sos-warn { margin: 8px 0 14px; text-align: center; font-size: 0.8rem !important; font-weight: 700; color: #dc2626 !important; }
.hc3-code { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: 14px; background: rgba(15, 23, 42, 0.04); }
.hc3-code small { font-size: 0.78rem; color: #64748b; }
.hc3-code b { font-size: 1.4rem; font-weight: 800; letter-spacing: 0.04em; color: #0f172a; }
.hc3-side .hc3-small { margin: 12px 0 0; font-size: 0.78rem; color: #64748b; }
@media (max-width: 767px) {
    /* sul telefono le schede scorrono di lato invece di andare a capo */
    .hc3-tabs { flex-wrap: nowrap; margin: 0 -16px 20px; padding: 0 16px 4px; overflow-x: auto; scrollbar-width: none; }
    .hc3-tabs .tab-pill-v3 { flex: 0 0 auto; white-space: nowrap; }
    .hc3-item { min-height: 56px; padding: 10px 14px; }
}

/* ── Area proprietario (views/Seller__Portal_Index.php, Seller__Property_Card.php, MYB.SellerPortal.js, DESIGN.md §52) ──
   Per il cliente, non per l'agenzia: la foto grande con lo stato in una frase, quattro numeri, la cosa da fare (i
   documenti richiesti) in evidenza, poi una barra di schede. Stessa famiglia dell'Incarico v3 (pr3-card, pr3-btn,
   bordi da 1px); il colore dell'agenzia (--primary) solo per l'azione principale e per quello che va fatto */
.sp3 { --tk-line: #e9edf3; --tk-ink: #1c2434; --tk-mute: #64748b; display: flex; flex-direction: column; gap: 24px; max-width: 1280px; padding-top: 8px; }
.sp3-preview { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 14px; border: 1px dashed color-mix(in srgb, var(--primary, #582679) 40%, transparent); border-radius: 14px; background: color-mix(in srgb, var(--primary, #582679) 5%, #ffffff); font-size: 0.86rem; color: #334155; }
.sp3-preview > span { flex: 1 1 260px; }
.sp3-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; margin-bottom: -12px; font-size: 0.86rem; font-weight: 700; color: var(--tk-mute) !important; text-decoration: none !important; }
.sp3-back:hover { color: var(--tk-ink) !important; }
/* testata: la foto a tutta larghezza, il testo bianco su una sfumatura scura in basso */
.sp3-hero { position: relative; display: flex; align-items: flex-end; min-height: 340px; overflow: hidden; border-radius: 24px; background: #1c2434; color: #ffffff; isolation: isolate; }
.sp3-hero-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.sp3-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(15, 23, 42, 0) 30%, rgba(15, 23, 42, 0.55) 62%, rgba(15, 23, 42, 0.88) 100%); }
.sp3-hero.is-empty { min-height: 220px; background: linear-gradient(135deg, var(--primary, #582679), color-mix(in srgb, var(--primary, #582679) 55%, #0f172a)); }
.sp3-hero.is-empty::before { display: none; }
.sp3-hero-body { width: 100%; padding: 28px 32px; }
.sp3-hero-ad { position: absolute; top: 18px; right: 18px; z-index: 2; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.92); font-size: 0.84rem; font-weight: 700; color: #0f172a; text-decoration: none; box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18); }
.sp3-hero-ad:hover { background: #fff; color: var(--primary, #582679); text-decoration: none; }
.sp3-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.sp3-pick a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid #e2e8f0; border-radius: 999px; background: #fff; font-size: 0.86rem; font-weight: 700; color: #334155; text-decoration: none; }
.sp3-pick a.is-on { border-color: var(--primary, #582679); background: color-mix(in srgb, var(--primary, #582679) 8%, #fff); color: var(--primary, #582679); }
.sp3-pick em { min-width: 20px; padding: 0 6px; border-radius: 999px; background: #dc2626; font-size: 0.72rem; font-style: normal; line-height: 20px; text-align: center; color: #fff; }
.sp3-docs-page { padding: 24px; }
.sp3-docs-page .sp3-docs-head { margin-bottom: 22px; }
.sp3-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 10px; font-size: 0.82rem; font-weight: 600; color: rgba(255, 255, 255, 0.85); }
.sp3-rif { font-variant-numeric: tabular-nums; opacity: 0.75; }
.sp3-live { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: 0.8rem; font-weight: 700; color: #ffffff; }
.sp3-live i { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; }
.sp3-live.is-live i { background: #4ade80; box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.28); }
.sp3-live.is-sold i { background: #facc15; }
.sp3-title { display: flex; flex-direction: column; margin: 0; font-size: 2.2rem; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; color: #ffffff; text-transform: none; overflow-wrap: anywhere; }
.sp3-title span { margin-top: 4px; font-size: 1.05rem; font-weight: 600; letter-spacing: 0; color: rgba(255, 255, 255, 0.8); }
.sp3-hero-foot { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 24px; margin-top: 18px; }
.sp3-price { display: flex; flex-direction: column; margin: 0; }
.sp3-price b { font-size: 1.9rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.sp3-price small { font-size: 0.78rem; color: rgba(255, 255, 255, 0.75); }
.sp3-facts { margin: 0; font-size: 0.95rem; font-weight: 600; color: rgba(255, 255, 255, 0.9); }
.sp3-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.sp3-main, .sp3-side { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
/* i numeri: toccandoli si va alla scheda che li spiega */
.sp3-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.sp3-kpi { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 16px 16px 14px; border: 1px solid var(--tk-line); border-radius: 18px; background: #ffffff; text-align: left; color: inherit; font: inherit; }
button.sp3-kpi { cursor: pointer; transition: border-color 0.15s, transform 0.15s; }
button.sp3-kpi:hover { border-color: color-mix(in srgb, var(--primary, #582679) 35%, var(--tk-line)); transform: translateY(-1px); }
button.sp3-kpi:focus-visible, .sp3-tab:focus-visible, .sp3-todo:focus-visible { outline: 2px solid var(--primary, #582679); outline-offset: 2px; }
.sp3-kpi > i { position: absolute; top: 14px; right: 14px; font-size: 0.9rem; color: #cbd5e1; }
.sp3-kpi b { font-size: 2rem; font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; color: var(--tk-ink); font-variant-numeric: tabular-nums; }
.sp3-kpi span { font-size: 0.84rem; font-weight: 700; color: #334155; }
.sp3-kpi small { margin-top: 4px; font-size: 0.74rem; color: var(--tk-mute); }
.sp3-kpi small.is-up { font-weight: 700; color: var(--st-ok-dark, #15803d); }
.sp3-kpi.is-zero b { color: #cbd5e1; }
/* la cosa da fare */
.sp3-todo { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 18px; border: 1px solid color-mix(in srgb, var(--primary, #582679) 30%, transparent); border-radius: 18px; background: color-mix(in srgb, var(--primary, #582679) 6%, #ffffff); text-align: left; font: inherit; cursor: pointer; }
a.sp3-todo { color: inherit; text-decoration: none; }
.sp3-todo:hover { background: color-mix(in srgb, var(--primary, #582679) 10%, #ffffff); }
.sp3-todo-ico { flex: 0 0 auto; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--primary, #582679); color: #ffffff; }
.sp3-todo-ico i::before { color: #ffffff !important; }
.sp3-todo > span:nth-child(2) { display: flex; flex: 1 1 auto; flex-direction: column; }
.sp3-todo b { font-size: 0.98rem; font-weight: 800; color: var(--tk-ink); }
.sp3-todo small { font-size: 0.82rem; color: var(--tk-mute); }
.sp3-todo-go { flex: 0 0 auto; font-size: 0.86rem; font-weight: 800; color: var(--primary, #582679); }
/* schede */
.sp3-work { padding: 8px 24px 24px; }
.sp3-tabs { display: flex; gap: 4px; margin: 0 -24px 22px; padding: 0 18px; border-bottom: 1px solid var(--tk-line); overflow-x: auto; scrollbar-width: none; }
.sp3-tabs::-webkit-scrollbar { display: none; }
.sp3-tab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 12px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; font-size: 0.9rem; font-weight: 700; color: var(--tk-mute); white-space: nowrap; cursor: pointer; }
.sp3-tab i { font-size: 0.85rem; }
.sp3-tab:hover { color: var(--tk-ink); }
.sp3-tab.is-on { border-bottom-color: var(--tk-ink); color: var(--tk-ink); }
.sp3-tab-n { min-width: 20px; padding: 1px 7px; border-radius: 999px; background: var(--primary, #582679); font-size: 0.72rem; font-style: normal; font-weight: 800; color: #ffffff; text-align: center; }
.sp3-tab-n:empty { display: none; }
.sp3-pane { display: flex; flex-direction: column; gap: 28px; }
.sp3-block-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 12px; }
.sp3-block-head h3 { margin: 0; font-size: 1rem; font-weight: 800; color: var(--tk-ink); text-transform: none; }
.sp3-block-head span { font-size: 0.8rem; color: var(--tk-mute); }
.sp3-empty { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 14px 16px; border-radius: 14px; background: #f7f8fb; font-size: 0.88rem; line-height: 1.5; color: #475569; }
.sp3-empty i { margin-top: 3px; color: #94a3b8; }
.sp3-foot { margin: 10px 0 0; font-size: 0.78rem; color: var(--tk-mute); }
/* interesse per settimana: colonne in CSS, il numero sopra */
.sp3-chart { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; height: 190px; margin: 0; padding: 0; list-style: none; }
.sp3-chart li { display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; min-width: 0; }
.sp3-bar { position: relative; display: block; height: max(var(--v), 4px); border-radius: 8px 8px 4px 4px; background: color-mix(in srgb, var(--primary, #582679) 78%, #ffffff); }
.sp3-chart li:last-child .sp3-bar { background: var(--primary, #582679); }
.sp3-chart li.is-zero .sp3-bar { background: #eef1f5; }
.sp3-bar b { position: absolute; bottom: 100%; left: 0; right: 0; margin-bottom: 3px; font-size: 0.74rem; font-weight: 800; color: var(--tk-ink); text-align: center; font-variant-numeric: tabular-nums; }
.sp3-chart small { overflow: hidden; font-size: 0.66rem; color: var(--tk-mute); text-align: center; white-space: nowrap; text-overflow: ellipsis; }
.sp3-hbars { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.sp3-hbars li { display: grid; grid-template-columns: minmax(0, 170px) minmax(0, 1fr) 36px; align-items: center; gap: 12px; font-size: 0.86rem; }
.sp3-hbars span { overflow: hidden; font-weight: 600; color: #334155; white-space: nowrap; text-overflow: ellipsis; }
.sp3-hbars i { display: block; width: max(var(--v), 3px); height: 10px; border-radius: 999px; background: color-mix(in srgb, var(--primary, #582679) 70%, #ffffff); }
.sp3-hbars b { font-weight: 800; color: var(--tk-ink); text-align: right; font-variant-numeric: tabular-nums; }
.sp3-portals { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.sp3-portal { padding: 14px 16px; border: 1px solid var(--tk-line); border-radius: 16px; }
.sp3-portal > b { display: block; font-size: 0.92rem; font-weight: 800; color: var(--tk-ink); }
.sp3-portal > small { font-size: 0.74rem; color: var(--tk-mute); }
.sp3-portal dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 0; }
.sp3-portal dt { font-size: 0.7rem; font-weight: 600; color: var(--tk-mute); }
.sp3-portal dd { margin: 0; font-size: 1.15rem; font-weight: 800; color: var(--tk-ink); font-variant-numeric: tabular-nums; }
.sp3-list { margin: 0; padding: 0; list-style: none; }
/* Prezzo nel tempo (Seller__Property_Card): linea a gradini in SVG, prezzi e date in HTML per non deformarli */
.sp3-ptl { position: relative; height: 90px; margin: 30px 8px 0; }
.sp3-ptl svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sp3-ptl path { fill: none; stroke: var(--primary, #582679); stroke-width: 3; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.sp3-ptl-pt { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border: 3px solid var(--primary, #582679); border-radius: 50%; background: #fff; }
.sp3-ptl-pt b, .sp3-ptl-pt small { position: absolute; left: 12px; white-space: nowrap; }
.sp3-ptl-pt b { bottom: 8px; font-size: 0.86rem; font-weight: 800; color: #0f172a; font-variant-numeric: tabular-nums; }
.sp3-ptl-pt small { top: 10px; font-size: 0.72rem; color: var(--tk-mute); }
.sp3-ptl-pt.is-cut { border-color: #dc2626; }
.sp3-ptl-axis { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 8px; border-top: 1px dashed #e2e8f0; font-size: 0.72rem; color: var(--tk-mute); }
.sp3-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--tk-line); font-size: 0.88rem; }
.sp3-list li:first-child { border-top: 0; }
.sp3-list s { color: var(--tk-mute); }
/* Le richieste (Andamento): chi a sinistra, quando e da dove a destra */
.sp3-reqs li { justify-content: flex-start; }
.sp3-req .sp3-visit-main { flex: 1 1 auto; min-width: 0; }
.sp3-req .sp3-visit-main small, .sp3-req-when b { font-variant-numeric: tabular-nums; }
.sp3-req-when { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.sp3-req-when b { font-size: 0.85rem; font-weight: 700; color: var(--tk-ink); }
.sp3-req-when small { font-size: 0.78rem; color: var(--tk-mute); }
/* visite e feedback */
.sp3-visits { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.sp3-visit { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--tk-line); border-radius: 14px; }
.sp3-visit.is-oh .pr3-date { background: color-mix(in srgb, var(--primary, #582679) 10%, #ffffff); }
.sp3-visit-main { display: flex; flex-direction: column; }
.sp3-visit-main b { font-size: 0.9rem; font-weight: 700; color: var(--tk-ink); }
.sp3-visit-main small { font-size: 0.78rem; color: var(--tk-mute); }
.sp3-fbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.sp3-fb { padding: 16px; border: 1px solid var(--tk-line); border-radius: 16px; }
.sp3-fb header { display: flex; align-items: center; gap: 10px; }
.sp3-fb header > span:nth-child(2) { display: flex; flex: 1 1 auto; flex-direction: column; }
.sp3-fb header b { font-size: 0.9rem; font-weight: 700; color: var(--tk-ink); }
.sp3-fb header small { font-size: 0.74rem; color: var(--tk-mute); }
.sp3-fb-av { flex: 0 0 auto; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #f1f5f9; font-size: 0.8rem; font-weight: 800; color: #475569; }
.sp3-stars { flex: 0 0 auto; font-size: 1rem; letter-spacing: 1px; color: #e2e8f0; }
.sp3-stars b { font-weight: 400; color: #f59e0b; }
.sp3-dfold > summary { display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; }
.sp3-dfold > summary::-webkit-details-marker { display: none; }
.sp3-dfold > summary h4 { margin: 0; }
.sp3-dfold > summary small { margin-left: auto; font-size: 0.8rem; font-weight: 700; color: var(--primary, #582679); }
.sp3-dfold[open] > summary { margin-bottom: 8px; }
.sp3-dfold[open] > summary small { display: none; }
.sp3-fb dl { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--tk-line); }
.sp3-fb dt { font-size: 0.74rem; font-weight: 600; color: var(--tk-mute); }
.sp3-fb dd { margin: 0; font-size: 0.88rem; line-height: 1.45; color: #1e293b; }
/* documenti: l'anello con gli approvati, poi le voci per gruppo, il caricamento sulla riga */
.sp3-docs-head { display: flex; align-items: center; gap: 18px; }
.sp3-docs-head h3 { margin: 0 0 4px; font-size: 1.05rem; font-weight: 800; color: var(--tk-ink); text-transform: none; }
.sp3-docs-head p { margin: 0; max-width: 62ch; font-size: 0.86rem; line-height: 1.5; color: var(--tk-mute); }
.sp3-ring { position: relative; flex: 0 0 auto; width: 76px; height: 76px; }
.sp3-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.sp3-ring circle { fill: none; stroke-width: 3.4; }
.sp3-ring-bg { stroke: #eef1f5; }
.sp3-ring-v { stroke: var(--st-ok, #16a34a); stroke-dasharray: 0 100; stroke-linecap: round; transition: stroke-dasharray 0.4s ease; }
.sp3-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 0.95rem; font-weight: 800; color: var(--tk-ink); font-variant-numeric: tabular-nums; }
.sp3-docs { display: flex; flex-direction: column; gap: 22px; }
.sp3-dgroup h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 0.76rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--tk-mute); }
.sp3-dgroup h4 span { padding: 0 7px; border-radius: 999px; background: #f1f5f9; letter-spacing: 0; color: #475569; }
.sp3-dgroup.is-todo h4 { color: var(--primary, #582679); }
.sp3-doc { display: flex; align-items: flex-start; gap: 14px; padding: 14px; border: 1px solid var(--tk-line); border-radius: 16px; background: #ffffff; transition: border-color 0.15s, background 0.15s; }
.sp3-doc + .sp3-doc { margin-top: 8px; }
.sp3-doc.is-todo { border-color: color-mix(in srgb, var(--primary, #582679) 28%, transparent); }
.sp3-doc.is-drop { border-style: dashed; border-color: var(--primary, #582679); background: color-mix(in srgb, var(--primary, #582679) 5%, #ffffff); }
.sp3-doc.is-busy .sp3-up { pointer-events: none; opacity: 0.5; }
.sp3-doc-ico { flex: 0 0 auto; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #f1f5f9; font-size: 1.05rem; }
.sp3-doc-ico i, .sp3-doc-ico i::before { color: #94a3b8 !important; }
.sp3-doc.is-todo .sp3-doc-ico { background: color-mix(in srgb, var(--primary, #582679) 10%, #ffffff); }
.sp3-doc.is-todo .sp3-doc-ico i, .sp3-doc.is-todo .sp3-doc-ico i::before { color: var(--primary, #582679) !important; }
.sp3-doc.is-review .sp3-doc-ico { background: var(--st-follow-soft, #e0f2fe); }
.sp3-doc.is-review .sp3-doc-ico i, .sp3-doc.is-review .sp3-doc-ico i::before { color: var(--st-follow-dark, #0369a1) !important; }
.sp3-doc.is-ok .sp3-doc-ico { background: var(--st-ok-soft, #dcfce7); }
.sp3-doc.is-ok .sp3-doc-ico i, .sp3-doc.is-ok .sp3-doc-ico i::before { color: var(--st-ok-dark, #15803d) !important; }
.sp3-doc-main { flex: 1 1 auto; min-width: 0; }
.sp3-doc-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.sp3-doc-top b { font-size: 0.95rem; font-weight: 700; color: var(--tk-ink); }
.sp3-doc-st { padding: 2px 9px; border-radius: 999px; background: #f1f5f9; font-size: 0.72rem; font-weight: 700; color: #475569; }
.sp3-doc.is-todo .sp3-doc-st { background: color-mix(in srgb, var(--primary, #582679) 12%, #ffffff); color: var(--primary, #582679); }
.sp3-doc.is-review .sp3-doc-st { background: var(--st-follow-soft, #e0f2fe); color: var(--st-follow-ink, #075985); }
.sp3-doc.is-ok .sp3-doc-st { background: var(--st-ok-soft, #dcfce7); color: var(--st-ok-ink, #14532d); }
.sp3-doc-hint { margin: 2px 0 0; font-size: 0.8rem; color: var(--tk-mute); }
.sp3-doc-note { display: flex; gap: 8px; margin: 8px 0 0; padding: 8px 12px; border-radius: 4px 12px 12px 12px; background: var(--st-pending-soft, #fef3c7); font-size: 0.84rem; line-height: 1.45; color: var(--st-pending-ink, #92400e); }
.sp3-doc-note i { margin-top: 3px; }
.sp3-files { display: flex; flex-direction: column; gap: 4px; margin: 10px 0 0; padding: 0; list-style: none; }
.sp3-files li { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 4px 6px 4px 10px; border-radius: 10px; background: #f7f8fb; font-size: 0.84rem; }
.sp3-files a { display: inline-flex; flex: 1 1 auto; align-items: center; gap: 8px; min-width: 0; font-weight: 600; color: var(--tk-ink) !important; text-decoration: none !important; }
.sp3-files a span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sp3-files a:hover span { text-decoration: underline; }
.sp3-files a i { color: #64748b; }
.sp3-files small { flex: 0 0 auto; font-size: 0.74rem; color: var(--tk-mute); }
.sp3-file-del { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 32px; height: 30px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; font-size: 0.78rem; font-weight: 700; color: #64748b; cursor: pointer; }
.sp3-file-del span { display: none; }
.sp3-file-del:hover { background: #ffffff; color: var(--st-lost, #dc2626); }
.sp3-file-del.is-ask { background: var(--st-lost-soft, #fee2e2); color: var(--st-lost-ink, #7f1d1d); }
.sp3-file-del.is-ask span { display: inline; }
.sp3-file-del i::before { color: inherit !important; }
.sp3-up { position: relative; flex: 0 0 auto; margin: 4px 0 0; cursor: pointer; }
.sp3-up input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; font-size: 0; }
.sp3-up:focus-within { outline: 2px solid var(--primary, #582679); outline-offset: 2px; }
.sp3-prog { position: relative; margin-top: 10px; height: 26px; overflow: hidden; border-radius: 8px; background: #f1f5f9; }
.sp3-prog i { position: absolute; inset: 0 auto 0 0; width: 0; background: color-mix(in srgb, var(--primary, #582679) 18%, #ffffff); transition: width 0.15s; }
.sp3-prog span { position: relative; display: block; overflow: hidden; padding: 0 10px; font-size: 0.76rem; font-weight: 600; line-height: 26px; color: #334155; white-space: nowrap; text-overflow: ellipsis; }
.sp3-doc-err { margin: 8px 0 0; font-size: 0.82rem; font-weight: 600; color: var(--st-lost-dark, #b91c1c); }
/* marketing */
.sp3-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.sp3-mk { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.sp3-mk li { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--tk-line); border-radius: 14px; font-size: 0.88rem; font-weight: 600; color: var(--tk-ink); }
.sp3-mk li span { flex: 1 1 auto; }
.sp3-mk li small { font-size: 0.74rem; font-weight: 700; color: var(--tk-mute); }
.sp3-mk li.is-done i, .sp3-mk li.is-done i::before { color: var(--st-ok, #16a34a) !important; }
.sp3-mk li.is-doing i, .sp3-mk li.is-doing i::before { color: var(--st-pending, #f59e0b) !important; }
/* colonna laterale */
.sp3-agent-who { display: flex; align-items: center; gap: 14px; }
.sp3-agent-who > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.sp3-agent-who small { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--tk-mute); }
.sp3-agent-who b { font-size: 1.1rem; font-weight: 800; color: var(--tk-ink); }
.sp3-agent-who a { overflow: hidden; font-size: 0.82rem; color: var(--tk-mute) !important; white-space: nowrap; text-overflow: ellipsis; }
.sp3-agent-av { flex: 0 0 auto; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: color-mix(in srgb, var(--primary, #582679) 12%, #ffffff); font-size: 1.05rem; font-weight: 800; color: var(--primary, #582679); }
.sp3-agent-acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; margin-top: 16px; }
.sp3-agent-acts .pr3-btn { justify-content: center; height: 42px; }
.sp3-refer h2 { margin: 0 0 6px; font-size: 1rem; font-weight: 800; color: var(--tk-ink); }
.sp3-refer p { margin: 0 0 14px; font-size: 0.86rem; line-height: 1.5; color: var(--tk-mute); }
.sp3-refer .pr3-btn { width: 100%; justify-content: center; }
.sp3-path ol { margin: 0; padding: 0; list-style: none; }
.sp3-path li { position: relative; display: flex; gap: 12px; padding-bottom: 16px; }
.sp3-path li:last-child { padding-bottom: 0; }
.sp3-path li::before { content: ''; position: absolute; top: 18px; bottom: -2px; left: 7px; width: 2px; background: var(--tk-line); }
.sp3-path li:last-child::before { display: none; }
.sp3-path li.is-done::before { background: var(--st-ok, #16a34a); }
.sp3-path li > i { position: relative; flex: 0 0 auto; width: 16px; height: 16px; margin-top: 2px; border: 2px solid #cbd5e1; border-radius: 50%; background: #ffffff; }
.sp3-path li.is-done > i { border-color: var(--st-ok, #16a34a); background: var(--st-ok, #16a34a); box-shadow: inset 0 0 0 3px #ffffff; }
.sp3-path li.is-next > i { border-color: var(--primary, #582679); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary, #582679) 15%, transparent); }
.sp3-path li > span { display: flex; flex-direction: column; }
.sp3-path b { font-size: 0.88rem; font-weight: 700; color: var(--tk-ink); }
.sp3-path li:not(.is-done) b { color: var(--tk-mute); }
.sp3-path li.is-next b { color: var(--tk-ink); }
.sp3-path small { font-size: 0.76rem; color: var(--tk-mute); }
/* home con più immobili e pagine vuote */
.sp3-hello h1 { margin: 0; font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; color: var(--tk-ink); text-transform: none; }
.sp3-hello p { margin: 6px 0 0; font-size: 0.95rem; color: var(--tk-mute); }
.sp3-lgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.sp3-lcard { display: flex; flex-direction: column; padding: 0; overflow: hidden; color: inherit !important; text-decoration: none !important; transition: transform 0.15s, box-shadow 0.15s; }
.sp3-lcard:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08); }
.sp3-lcard:focus-visible { outline: 2px solid var(--primary, #582679); outline-offset: 3px; }
.sp3-lcard-img { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; background: linear-gradient(135deg, #f1f5f9, #e2e8f0); }
.sp3-lcard-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sp3-lcard-img > i { font-size: 2rem; color: #cbd5e1; }
.sp3-lcard-img .sp3-live { position: absolute; top: 12px; left: 12px; background: rgba(15, 23, 42, 0.55); }
.sp3-lcard-body { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px 18px; }
.sp3-lcard-body > b { font-size: 1.05rem; font-weight: 800; color: var(--tk-ink); }
.sp3-lcard-body > small { font-size: 0.82rem; color: var(--tk-mute); }
.sp3-lcard-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 10px; font-size: 0.82rem; color: var(--tk-mute); }
.sp3-lcard-foot em { font-size: 1.1rem; font-style: normal; font-weight: 800; color: var(--tk-ink); font-variant-numeric: tabular-nums; }
.sp3-lcard-todo { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--primary, #582679) 10%, #ffffff); font-size: 0.78rem; font-weight: 700; color: var(--primary, #582679); }
.sp3-empty-page { display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 560px; margin: 40px auto; padding: 40px 32px; text-align: center; }
.sp3-empty-page > i { font-size: 2.4rem; color: #cbd5e1; }
.sp3-empty-page h1 { margin: 0; font-size: 1.5rem; font-weight: 800; color: var(--tk-ink); text-transform: none; }
.sp3-empty-page p { margin: 0 0 8px; font-size: 0.92rem; line-height: 1.55; color: var(--tk-mute); }
@media (max-width: 1100px) {
    /* una colonna: il consulente subito sotto i numeri, le tappe e il report in fondo */
    .sp3-grid { display: flex; flex-direction: column; }
    .sp3-main, .sp3-side { display: contents; }
    .sp3-kpis { order: 1; }
    .sp3-agent { order: 2; }
    .sp3-todo { order: 3; }
    .sp3-work { order: 4; }
    .sp3-path { order: 5; }
    .sp3-main > *, .sp3-side > * { width: 100%; min-width: 0; }
}
@media (max-width: 767px) {
    .sp3 { gap: 16px; }
    .sp3-hero { min-height: 300px; border-radius: 20px; }
    .sp3-hero-body { padding: 20px; }
    .sp3-title { font-size: 1.6rem; }
    .sp3-price b { font-size: 1.5rem; }
    .sp3-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .sp3-kpi b { font-size: 1.6rem; }
    .sp3-work { padding: 4px 16px 18px; }
    .sp3-tabs { margin: 0 -16px 18px; padding: 0 10px; }
    .sp3-tab { height: 48px; padding: 0 10px; font-size: 0.86rem; }
    .sp3-chart { gap: 3px; height: 150px; }
    .sp3-chart li:nth-child(odd) small { visibility: hidden; }
    .sp3-hbars li { grid-template-columns: minmax(0, 110px) minmax(0, 1fr) 30px; }
    .sp3-doc { flex-wrap: wrap; padding: 12px; }
    .sp3-doc-main { flex-basis: calc(100% - 54px); }
    .sp3-up { width: 100%; justify-content: center; height: 40px !important; }
    .sp3-docs-head { align-items: flex-start; }
    .sp3-ring { width: 60px; height: 60px; }
    .sp3-todo-go { display: none; }
}
@media (prefers-reduced-motion: reduce) { .sp3-kpi, .sp3-lcard, .sp3-ring-v { transition: none; } }
/* Incarico v3, Documentale: i file e il messaggio dell'area proprietario sotto la voce (MYB.PropertyCard.js, DESIGN.md §52) */
.pr3-sfiles { display: flex; flex-direction: column; gap: 4px; margin: 6px 0 0; padding: 0; list-style: none; }
.pr3-sfiles li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 5px 10px; border-radius: 9px; background: #f7f8fb; font-size: 0.8rem; }
.pr3-sfiles a { display: inline-flex; align-items: center; gap: 7px; min-width: 0; font-weight: 600; color: var(--tk-ink) !important; }
.pr3-sfiles a span { overflow: hidden; max-width: 320px; white-space: nowrap; text-overflow: ellipsis; }
.pr3-sfiles small { font-size: 0.72rem; color: var(--tk-mute); }
.pr3-sfiles small b { font-weight: 700; color: var(--st-new-dark, #c2410c); }
/* Incarico, voce di checklist: il file dell'agenzia e la richiesta al proprietario (stato ⏸), in una riga */
.pr3-sacts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; }
.pr3-sacts > * { margin-top: 0 !important; }
.pr3-sup { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 4px 10px; border: 1px solid #e2e8f0; border-radius: 999px; background: #fff; font-size: 0.76rem; font-weight: 700; color: #334155; cursor: pointer; }
.pr3-sup:hover { border-color: #cbd5e1; background: #f8fafc; }
.pr3-sup:focus-within { outline: 2px solid var(--primary, #582679); outline-offset: 2px; }
.pr3-sup.is-busy { opacity: 0.6; pointer-events: none; }
.pr3-sask { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 4px 10px; border: 1px solid color-mix(in srgb, var(--primary, #582679) 35%, transparent); border-radius: 999px; background: #fff; font-size: 0.76rem; font-weight: 700; color: var(--primary, #582679); cursor: pointer; }
.pr3-sask:hover { background: color-mix(in srgb, var(--primary, #582679) 8%, #fff); }
.pr3-sask:disabled { opacity: 0.6; cursor: default; }
.pr3-sundo { padding: 0; border: 0; background: none; font: inherit; font-weight: 700; color: var(--primary, #582679); text-decoration: underline; cursor: pointer; }
.pr3-sundo:disabled { opacity: 0.6; cursor: default; }
.pr3-sasked { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 0.74rem; font-weight: 600; color: var(--st-follow, #64748b); }
.pr3-snote { margin-top: 6px; }
/* le due note della voce si distinguono solo per il colore: interna in blu, per il proprietario nel colore dell'agenzia */
.pr3-task.is-check .pr3-note-ed { color: var(--st-follow-dark, #0369a1) !important; border-bottom-color: color-mix(in srgb, var(--st-follow-dark, #0369a1) 45%, transparent) !important; }
.pr3-snote > summary { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--primary, #582679); border-bottom: 1px dashed color-mix(in srgb, var(--primary, #582679) 45%, transparent); cursor: pointer; list-style: none; }
.pr3-snote > summary::-webkit-details-marker { display: none; }
.pr3-snote[open] > summary { margin-bottom: 6px; }
.pr3-snote .pr3-area { width: 100%; resize: vertical; }
/* l'occhio del proprietario sulla voce dell'incarico: viola se la vede, grigio se no; il puntino = scelta solo di questo incarico */
.pr3-seye { position: relative; flex: 0 0 auto; color: var(--primary, #582679); }
.pr3-seye.is-off { color: #94a3b8; }
.pr3-seye.is-own::after { content: ''; position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: #f59e0b; }
.pr3-shidden { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 0.74rem; color: var(--tk-mute, #64748b); }
.pr3-snote-state { display: block; margin-top: 4px; font-size: 0.72rem; color: var(--tk-mute); }
.pr3-sbanner { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: var(--st-new-soft, #ffedd5); font-size: 0.84rem; font-weight: 600; color: var(--st-new-ink, #9a3412); }

/* Area proprietario (DESIGN.md §52): niente menu né binario; in alto il logo dell'agenzia, alla pari della capsula, e sotto
   la tela con la linguetta del titolo, centrata. myb-nav-rail resta per la tela, MYB.NavRail.js non costruisce il binario */
.myb-owner-bar { display: none; }
html.myb-owner:not(.myb-app) .page-sidebar,
html.myb-owner:not(.myb-app) .page-header .small-screens-sidebar-link { display: none !important; }
html.myb-owner:not(.myb-app) .page-container { margin-left: 0 !important; }
html.myb-owner .myb-owner-bar { display: flex; align-items: center; gap: 28px; }
html.myb-owner:not(.myb-app) .myb-owner-bar { height: 72px; padding: 0 8px; }
.myb-owner-logo { display: flex; }
.myb-owner-logo img { max-width: 220px; max-height: 44px; object-fit: contain; }
/* le due aree (Il mio immobile, Documenti): pillole su vetro come la capsula; sul telefono la barra in basso */
.myb-owner-nav { display: flex; gap: 4px; padding: 4px; border: 1px solid rgba(255, 255, 255, 0.9); border-radius: 999px; background: rgba(255, 255, 255, 0.78); box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08); backdrop-filter: blur(12px) saturate(180%); -webkit-backdrop-filter: blur(12px) saturate(180%); }
.myb-owner-nav a { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; font-size: 0.88rem; font-weight: 700; color: #334155; text-decoration: none; white-space: nowrap; }
.myb-owner-nav a:hover { background: rgba(15, 23, 42, 0.05); color: #0f172a; }
.myb-owner-nav a.is-on { background: var(--primary, #582679); color: #fff; }
.myb-owner-nav a:focus-visible { outline: 2px solid var(--primary, #582679); outline-offset: 2px; }
.myb-owner-nav em { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #dc2626; font-size: 0.72rem; font-style: normal; color: #fff; }
/* Sul telefono niente tab bar dell'agenzia né ricerca (Richieste, Agenda, Azioni rapide): al loro posto le due aree */
html.myb-app.myb-owner { --side-w: 0px; --tabbar-h: 52px; }
html.myb-app.myb-owner .myb-owner-logo { display: none; }
html.myb-app.myb-owner .myb-owner-nav { position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 1030; transform: translateX(-50%); box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16); }
html.myb-app.myb-owner .myb-owner-nav a { height: 46px; padding: 0 18px; }
html.myb-owner .myb-tabbar, html.myb-owner .page-header .myb-appbar-search { display: none !important; }
/* il logo dell'agenzia su ogni pagina, anche accanto alla freccia indietro nella scheda dell'immobile */
html.myb-app.myb-owner .myb-appbar-home { display: flex; width: auto; max-width: 160px; border-radius: 0; box-shadow: none; }
@media (min-width: 992px) {
    html.myb-nav-rail.myb-owner:not(.myb-app) .page-container { width: 100%; max-width: 1280px; margin: 0 auto !important; padding: 0 var(--nav-gap) !important; }
    html.myb-nav-rail.myb-owner:not(.myb-app) .page-header { top: 10px !important; right: var(--nav-gap); }
}
