/* MacroVoIP × Velzon theme — brand blues from portal palette */
html {
    /* Keep rem-based Velzon UI stable if a legacy stylesheet sets html to 10px. */
    font-size: 16px !important;
}
:root,
[data-bs-theme="light"] {
    --vz-primary: #00388d;
    --vz-primary-rgb: 0, 56, 141;
    --vz-primary-text-emphasis: #00245c;
    --vz-primary-bg-subtle: #e8eef8;
    --vz-primary-border-subtle: #b8c7e6;

    --vz-info: #3c8dbc;
    --vz-info-rgb: 60, 141, 188;
    --vz-info-bg-subtle: #e8f4fa;
    --vz-info-border-subtle: #b5d6e8;

    --vz-success: #008d4c;
    --vz-success-rgb: 0, 141, 76;
    --vz-success-bg-subtle: #e6f5ee;

    --vz-warning: #f39c12;
    --vz-warning-rgb: 243, 156, 18;
    --vz-warning-bg-subtle: #fef5e6;

    --vz-danger: #dd4b39;
    --vz-danger-rgb: 221, 75, 57;
    --vz-danger-bg-subtle: #fbecea;

    --vz-secondary: #619aab;
    --vz-link-color: #00388d;
    --vz-link-hover-color: #002a6b;

    --vz-body-bg: #f1f4f9;
    --vz-body-color: #1a2332;
    --vz-vertical-menu-bg: #162a47;
    --vz-vertical-menu-border: #121f36;
    --vz-vertical-menu-item-color: #a9b8d0;
    --vz-vertical-menu-item-hover-color: #ffffff;
    --vz-vertical-menu-item-hover-bg: rgba(255, 255, 255, 0.06);
    --vz-vertical-menu-item-active-color: #ffffff;
    --vz-vertical-menu-item-active-bg: rgba(60, 141, 188, 0.22);
    --vz-vertical-menu-title-color: #6d7f9c;
    --vz-topbar-bg: #00388d;
    --vz-topbar-item-color: #ffffff;
    --vz-topbar-search-bg: rgba(255, 255, 255, 0.12);

    --vz-vertical-menu-width: 270px;
    --vz-font-sans-serif: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --vz-body-font-family: var(--vz-font-sans-serif);
    --vz-body-font-size: .9375rem;
}

:root[data-sidebar="dark"] {
    --vz-vertical-menu-bg: #162a47;
    --vz-vertical-menu-border: #121f36;
    --vz-vertical-menu-item-color: #a9b8d0;
    --vz-vertical-menu-item-hover-color: #ffffff;
    --vz-vertical-menu-item-hover-bg: rgba(255, 255, 255, 0.06);
    --vz-vertical-menu-item-active-color: #ffffff;
    --vz-vertical-menu-item-active-bg: rgba(60, 141, 188, 0.22);
    --vz-vertical-menu-title-color: #6d7f9c;
    --vz-vertical-menu-box-shadow: 2px 0 20px rgba(15, 34, 58, 0.14);
}

[data-topbar="dark"] #page-topbar,
[data-topbar="dark"] .navbar-header {
    background-color: #00388d !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 8px rgba(15, 34, 58, 0.1);
}

body {
    background-color: #f1f4f9 !important;
    font-size: 15px !important;
    font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: auto;
    -moz-osx-font-smoothing: auto;
    text-rendering: auto;
}
.main-content {
    background: #f1f4f9;
    min-width: 0;
    max-width: 100%;
}
.page-content,
.page-content > .container-fluid,
.box,
.box-body {
    max-width: 100%;
    min-width: 0;
}
/* Wide grids scroll inside the page instead of stretching the layout and the sidebar. */
.kv-grid-container,
.grid-view,
.table-responsive {
    max-width: 100%;
    overflow-x: auto;
}
.main-content .btn,
.main-content .form-control,
.main-content .form-select,
.main-content label,
.main-content .dropdown-menu,
.main-content .select2-container .select2-selection__rendered,
.main-content .select2-results__option {
    font-size: 15px;
}
.select2-container .select2-selection--single {
    position: relative;
    padding-right: 64px !important;
}
.select2-container .select2-selection--single .select2-selection__clear {
    position: absolute;
    right: 40px !important;
    top: 50% !important;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    margin: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    float: none !important;
    z-index: 2;
    cursor: pointer;
}
.main-content .table,
.main-content .table td,
.page-content table,
.page-content table td {
    font-size: .82rem;
}
.main-content .table th,
.page-content table th {
    font-size: .75rem;
}
.app-menu.navbar-menu {
    z-index: 1005;
}
.app-menu .container-fluid,
.navbar-menu #scrollbar .container-fluid,
.navbar-menu #scrollbar > .container-fluid {
    padding-left: 0 !important;
    padding-right: 0 !important;
}
.app-menu .navbar-nav .nav-link {
    font-size: 14.5px !important;
    padding-top: .42rem;
    padding-bottom: .42rem;
}
.app-menu .navbar-nav .nav-sm .nav-link {
    font-size: 14px !important;
    padding-top: .32rem !important;
    padding-bottom: .32rem !important;
}
.app-menu .navbar-nav .nav-sm .nav-link:before {
    content: none !important;
}
html[data-sidebar="dark"] .app-menu .navbar-nav .menu-dropdown,
html[data-sidebar="dark"] .app-menu .navbar-nav .menu-dropdown > .nav-sm {
    background: #203856 !important;
}
html[data-sidebar="dark"][data-sidebar-size="sm"] .app-menu .navbar-nav .nav-item:hover > .menu-dropdown,
html.mv-sidebar-sm[data-sidebar="dark"] .app-menu .navbar-nav .nav-item:hover > .menu-dropdown {
    background: #203856 !important;
}
.app-menu .navbar-nav .nav-link.mv-submenu-toggle {
    position: relative;
}
.app-menu .navbar-nav .nav-link.mv-submenu-toggle:after {
    display: block;
    content: "\f0142";
    font-family: "Material Design Icons";
    margin-left: auto;
    font-size: 1.05rem;
    position: absolute;
    right: 18px;
    color: inherit;
    transform: rotate(0deg);
    transition: transform .32s cubic-bezier(.4, 0, .2, 1);
}
.app-menu .navbar-nav .nav-link.mv-submenu-toggle[aria-expanded="true"] {
    color: var(--vz-vertical-menu-item-active-color);
}
.app-menu .navbar-nav .nav-link.mv-submenu-toggle[aria-expanded="true"]:after {
    transform: rotate(90deg);
    color: var(--vz-vertical-menu-item-active-color);
}
html:not([data-sidebar-size="sm"]):not([data-sidebar-size="sm-hover"]):not([data-sidebar-size="sm-hover-active"]):not(.mv-sidebar-sm) .app-menu .navbar-nav .menu-dropdown.collapse {
    display: block !important;
    height: auto !important;
    max-height: 0 !important;
    overflow: hidden !important;
    transition: none !important;
}
html.mv-menu-ready:not([data-sidebar-size="sm"]):not([data-sidebar-size="sm-hover"]):not([data-sidebar-size="sm-hover-active"]):not(.mv-sidebar-sm) .app-menu .navbar-nav .menu-dropdown.collapse {
    transition: max-height .5s cubic-bezier(.4, 0, .2, 1) !important;
}
html:not([data-sidebar-size="sm"]):not([data-sidebar-size="sm-hover"]):not([data-sidebar-size="sm-hover-active"]):not(.mv-sidebar-sm) .app-menu .navbar-nav .menu-dropdown.collapse.show {
    max-height: var(--mv-submenu-h, 1200px) !important;
}
html:not([data-sidebar-size="sm"]):not([data-sidebar-size="sm-hover"]):not([data-sidebar-size="sm-hover-active"]):not(.mv-sidebar-sm) .app-menu .navbar-nav .menu-dropdown.collapse.mv-submenu-free {
    max-height: none !important;
}
html[data-sidebar-size="sm"] .app-menu .navbar-nav .menu-dropdown.collapse,
html[data-sidebar-size="sm-hover"] .app-menu .navbar-nav .menu-dropdown.collapse,
html[data-sidebar-size="sm-hover-active"] .app-menu .navbar-nav .menu-dropdown.collapse,
html.mv-sidebar-sm .app-menu .navbar-nav .menu-dropdown.collapse {
    display: none !important;
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    transition: none !important;
}
html[data-sidebar-size="sm"] .app-menu .navbar-nav .nav-item:hover > .menu-dropdown.collapse,
html[data-sidebar-size="sm-hover"] .app-menu .navbar-nav .nav-item:hover > .menu-dropdown.collapse,
html.mv-sidebar-sm .app-menu .navbar-nav .nav-item:hover > .menu-dropdown.collapse {
    display: block !important;
}
.page-content {
    /* Topbar is position:fixed (70px). Keep a small gap so the title is not under it. */
    margin-top: 0 !important;
    padding-top: 86px !important;
    padding-bottom: 1.25rem !important;
}
.page-title-box {
    margin-top: 0 !important;
    margin-bottom: .75rem !important;
    padding: .85rem 1.25rem !important;
    min-height: 0 !important;
}
.page-title-box h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1a2332;
}
.page-title-box .breadcrumb {
    margin-bottom: 0 !important;
}
.page-title-box .breadcrumb-item,
.page-title-box .breadcrumb-item a {
    font-size: .8rem;
}

.mv-dash-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin: 0 0 .85rem;
    padding: .65rem 2.5rem .65rem 1rem;
    border: 0;
    border-left: 4px solid #dd4b39;
    border-radius: .4rem;
    background: #fdecea;
    color: #7a2418;
    box-shadow: none;
}
.mv-dash-alert .alert-link {
    font-weight: 600;
    color: #c0392b;
    text-decoration: underline;
}
.mv-dash-alert .btn-close {
    position: static;
    padding: .25rem;
    margin-left: auto;
}

/* Kartik/BS3 alerts use .fade.in; Bootstrap 5 keeps .fade at opacity 0 until .show */
.alert.fade.in,
.kv-alert.fade.in,
.kv-alert.fade:not(.show) {
    opacity: 1 !important;
}

/* Sidebar uses the stock Velzon menu. Only badge layout is adjusted. */
.app-menu .menu-notification-label {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    flex: 1 1 auto;
    min-width: 0;
}
.app-menu .menu-notification-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.app-menu .badge,
.app-menu .menu-notification-label .badge,
.app-menu .label.bg-red,
.app-menu small.label {
    font-size: .65rem;
    font-weight: 700;
    border-radius: 999px;
    padding: .2rem .45rem;
    margin-left: auto;
}
.mv-menu-leaf {
    position: relative;
}
.mv-menu-leaf > .nav-link {
    padding-right: 1rem !important;
}
.app-menu .mv-menu-leaf .badge,
.app-menu .mv-menu-leaf .label,
.app-menu .mv-menu-leaf .pull-right {
    margin-right: .2rem;
}
.mv-fav-star {
    position: absolute;
    right: .55rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: #8aa0bb;
    line-height: 1;
    cursor: pointer;
}
.mv-fav-star:hover,
.mv-fav-star.is-on {
    color: #f0b429;
}
html[data-sidebar-size="sm"] .mv-fav-star,
html.mv-sidebar-sm .mv-fav-star {
    display: none;
}
.mv-fav-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin: 0 0 .85rem;
}
.mv-fav-bar.is-empty {
    display: none;
}
.mv-fav-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    max-width: 16rem;
    padding: .32rem .7rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #d7e0ea;
    color: #1a2332;
    font-size: .84rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
}
.mv-fav-chip i {
    color: #00388d;
    font-size: 1rem;
}
.mv-fav-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mv-fav-chip:hover {
    background: #e8eef8;
    border-color: #b8c7e6;
    color: #00388d;
}

/* Brand logo: fill the sidebar brand box when expanded, MP mark when collapsed */
.navbar-brand-box .logo {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}
html[data-layout="vertical"] .app-menu .navbar-brand-box .logo {
    flex: 1 1 auto;
    height: 100%;
    max-width: calc(100% - 2.25rem);
}
html[data-layout="vertical"]:not([data-sidebar-size="sm"]):not([data-sidebar-size="sm-hover"]) .app-menu .navbar-brand-box .logo-lg {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
}
.navbar-brand-box .logo img.mv-logo-img,
.navbar-brand-box .logo .mv-logo-img {
    display: block;
    width: 100% !important;
    height: auto !important;
    max-width: 100%;
    max-height: 58px !important;
    object-fit: contain;
    object-position: left center;
}
.mv-logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(145deg, #3c8dbc 0%, #00388d 100%);
    color: #fff !important;
    font-weight: 800;
    font-size: .82rem;
    letter-spacing: .02em;
    line-height: 1;
    box-shadow: 0 4px 12px rgba(0, 56, 141, 0.35);
    vertical-align: middle;
}
[data-sidebar="dark"] .mv-logo-mark,
.app-menu .mv-logo-mark {
    background: linear-gradient(145deg, #5bb4d9 0%, #2a6bb8 100%);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
}

/* Collapsed sidebar: MP mark + visible Remix icons. Do not touch SimpleBar boxes. */
html[data-sidebar-size="sm"] .navbar-menu,
html.mv-sidebar-sm .navbar-menu {
    padding-top: 70px !important;
}
html[data-sidebar-size="sm"] .navbar-menu .navbar-brand-box,
html.mv-sidebar-sm .navbar-menu .navbar-brand-box,
html[data-sidebar-size="sm-hover"] .navbar-menu:not(:hover) .navbar-brand-box {
    padding-left: 0 !important;
    padding-right: 0 !important;
    justify-content: center !important;
}
html[data-sidebar-size="sm"] .app-menu .navbar-brand-box .logo,
html.mv-sidebar-sm .app-menu .navbar-brand-box .logo,
html[data-sidebar-size="sm-hover"] .navbar-menu:not(:hover) .navbar-brand-box .logo {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    height: auto;
    justify-content: center;
}
html[data-sidebar-size="sm"] .app-menu .navbar-brand-box .logo-lg,
html.mv-sidebar-sm .app-menu .navbar-brand-box .logo-lg,
html[data-sidebar-size="sm-hover"] .navbar-menu:not(:hover) .navbar-brand-box .logo-lg {
    display: none !important;
}
html[data-sidebar-size="sm"] .app-menu .navbar-brand-box .logo-sm,
html.mv-sidebar-sm .app-menu .navbar-brand-box .logo-sm,
html[data-sidebar-size="sm-hover"] .navbar-menu:not(:hover) .navbar-brand-box .logo-sm {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
}
html[data-sidebar-size="sm"] .navbar-menu .navbar-brand-box #vertical-hover,
html.mv-sidebar-sm .navbar-menu .navbar-brand-box #vertical-hover,
html[data-sidebar-size="sm-hover"] .navbar-menu:not(:hover) .navbar-brand-box #vertical-hover {
    display: none !important;
}
html[data-sidebar-size="sm"] .navbar-menu .container-fluid,
html.mv-sidebar-sm .navbar-menu .container-fluid,
html[data-sidebar-size="sm-hover"] .navbar-menu:not(:hover) .container-fluid {
    padding-left: 0 !important;
    padding-right: 0 !important;
}
html[data-sidebar-size="sm"] .app-menu .navbar-nav > .nav-item > .nav-link.menu-link,
html.mv-sidebar-sm .app-menu .navbar-nav > .nav-item > .nav-link.menu-link {
    justify-content: center !important;
    align-items: center !important;
    gap: 0 !important;
    padding: 12px 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}
html[data-sidebar-size="sm"] .app-menu .nav-link.menu-link::after,
html.mv-sidebar-sm .app-menu .nav-link.menu-link::after {
    display: none !important;
}
html[data-sidebar-size="sm"] .app-menu .navbar-nav > .nav-item > .nav-link > span,
html.mv-sidebar-sm .app-menu .navbar-nav > .nav-item > .nav-link > span {
    display: none !important;
}
html[data-sidebar-size="sm"] .app-menu .navbar-nav > .nav-item > .nav-link i,
html.mv-sidebar-sm .app-menu .navbar-nav > .nav-item > .nav-link i {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
    min-width: 1.75rem !important;
    height: auto !important;
    margin: 0 auto !important;
    padding: 0 !important;
    font-size: 22px !important;
    line-height: 1 !important;
    text-align: center !important;
}
html[data-sidebar-size="sm"] .app-menu .navbar-nav .nav-item:hover > a.menu-link,
html.mv-sidebar-sm .app-menu .navbar-nav .nav-item:hover > a.menu-link {
    justify-content: flex-start !important;
    padding: .62rem .85rem !important;
    gap: .65rem !important;
}
html[data-sidebar-size="sm"] .app-menu .navbar-nav .nav-item:hover > a.menu-link > span,
html.mv-sidebar-sm .app-menu .navbar-nav .nav-item:hover > a.menu-link > span {
    display: inline-flex !important;
}

.btn-primary {
    --vz-btn-bg: #00388d;
    --vz-btn-border-color: #00388d;
    --vz-btn-hover-bg: #002a6b;
    --vz-btn-hover-border-color: #002a6b;
    --vz-btn-active-bg: #00245c;
    --vz-btn-active-border-color: #00245c;
}

.bg-primary { background-color: #00388d !important; }
.text-primary { color: #00388d !important; }
.border-primary { border-color: #00388d !important; }
.bg-primary-subtle { background-color: #e8eef8 !important; }
.text-info { color: #3c8dbc !important; }
.bg-info { background-color: #3c8dbc !important; }
.bg-info-subtle { background-color: #e8f4fa !important; }

/* Auth */
.auth-page-wrapper {
    min-height: 100vh;
    background:
        radial-gradient(1200px 500px at 10% -10%, rgba(60, 141, 188, 0.35), transparent 55%),
        radial-gradient(900px 480px at 90% 0%, rgba(0, 56, 141, 0.45), transparent 50%),
        linear-gradient(160deg, #001f52 0%, #00388d 42%, #3c8dbc 100%);
}
.auth-page-wrapper .auth-page-content {
    padding: 2.5rem 0 4rem;
}
.auth-page-wrapper .login-card {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 20, 60, 0.28);
    overflow: hidden;
}
.auth-page-wrapper .login-card .card-body {
    padding: 2rem 1.75rem !important;
}
.auth-brand-mark img {
    max-height: 72px;
    width: auto;
}
.auth-page-wrapper .footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    height: auto;
    padding: 0.85rem 1rem;
}
.auth-page-wrapper .footer .text-muted {
    color: rgba(255, 255, 255, 0.75) !important;
}

/* Dashboard */
.mv-stat-card {
    border: 0;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(15, 34, 58, 0.06);
    transition: transform .18s ease, box-shadow .18s ease;
    overflow: hidden;
}
.mv-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(15, 34, 58, 0.12);
}
.mv-stat-card .stat-label {
    letter-spacing: .04em;
    font-size: .72rem;
    font-weight: 600;
}
.mv-stat-card .stat-value {
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.mv-stat-card .stat-footer {
    display: block;
    padding: .65rem 1.25rem;
    font-size: .8rem;
    font-weight: 600;
    text-decoration: none;
    border-top: 1px solid rgba(0, 0, 0, .04);
}
.mv-stat-card.stat-users { border-top: 3px solid #3c8dbc; }
.mv-stat-card.stat-balance { border-top: 3px solid #008d4c; }
.mv-stat-card.stat-voip { border-top: 3px solid #f39c12; }
.mv-stat-card.stat-tickets { border-top: 3px solid #dd4b39; }

.mv-hero-panel {
    background: linear-gradient(135deg, #00388d 0%, #3c8dbc 100%);
    color: #fff;
    border: 0;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
}
.mv-hero-panel::after {
    content: "";
    position: absolute;
    right: -40px;
    top: -40px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}
.mv-hero-panel .card-body {
    position: relative;
    z-index: 1;
}
.mv-hero-panel a { color: #fff; text-decoration: underline; }
.mv-hero-panel a:hover { color: #e8f4fa; }
.mv-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.mv-hero-panel .mv-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .42rem .85rem;
    border-radius: 999px;
    background: #fff;
    color: #00388d !important;
    font-size: .8rem;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none !important;
    border: 0;
    box-shadow: 0 2px 10px rgba(15, 34, 58, .12);
    transition: background-color .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.mv-hero-panel .mv-hero-btn i {
    font-size: .95rem;
    line-height: 1;
}
.mv-hero-panel .mv-hero-btn:hover {
    background: #e8eef8;
    color: #002a6b !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(15, 34, 58, .16);
}

.mv-section-card {
    border: 0;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(15, 34, 58, 0.06);
}
.mv-section-card .card-header {
    background: transparent;
    border-bottom: 1px solid #eef2f7;
    padding: 1rem 1.25rem;
}
.mv-section-card .card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #00388d;
}

.navbar-brand-box .logo img {
    max-height: none;
}
.navbar-header .user-name-text {
    color: #fff;
}

/* Topbar VoIP CTA — readable on dark header */
.mv-topbar-voip {
    align-items: center;
    gap: .45rem;
    height: 36px;
    padding: 0 1rem;
    border-radius: 999px;
    border: 0;
    background: #ffffff;
    color: #00388d !important;
    font-size: .84rem;
    font-weight: 700;
    letter-spacing: .01em;
    line-height: 1;
    text-decoration: none !important;
    white-space: nowrap;
    box-shadow: 0 1px 4px rgba(0, 20, 60, 0.28);
    transition: background .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.mv-topbar-voip i {
    font-size: 1.05rem;
    color: #00388d;
    line-height: 1;
}
.mv-topbar-voip span {
    color: #00388d;
}
.mv-topbar-voip:hover,
.mv-topbar-voip:focus {
    background: #f39c12;
    color: #1a2332 !important;
    box-shadow: 0 2px 8px rgba(0, 20, 60, 0.32);
    transform: translateY(-1px);
}
.mv-topbar-voip:hover i,
.mv-topbar-voip:hover span,
.mv-topbar-voip:focus i,
.mv-topbar-voip:focus span {
    color: #1a2332;
}
.mv-topbar-voip:active {
    transform: translateY(0);
}

.topbar-saldo {
    color: #fff;
    font-size: .85rem;
    padding: .35rem .75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    white-space: nowrap;
}
.topbar-saldo.is-debt {
    background: rgba(221, 75, 57, 0.9);
}
.topbar-saldo strong { font-weight: 700; }

#loader {
    position: fixed;
    inset: 0;
    background: rgba(0, 31, 82, 0.62);
    z-index: 20000;
    display: none;
    pointer-events: all;
    cursor: wait;
}
body.loading {
    overflow: hidden;
}
body.loading #loader { display: block; }
.mv-form-loader-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
}
.mv-form-loader-text {
    margin-top: 14px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Soft status pills used in dashboard */
.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    width: 100%;
    padding: .35rem .75rem;
    border-radius: .4rem;
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.status-pill.ok { background: #008d4c; }
.status-pill.ko { background: #dd4b39; }
.status-pill.warn { background: #f39c12; }

.charCircle-admin { background: #008d4c; }
.charCircle-reseller { background: #dd4b39; }
.charCircle-user { background: #286090; }
.charCircle-partner { background: #f0ad4e; }
.charCircle-Macrotel { background: #00388d; }
.charCircle-Rigenera { background: #619aab; }

/* Segmented option group (replaces radioButtonGroup) */
.mv-option-group {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
    padding: 3px;
    background: #f3f6f9;
    border: 1px solid #e9ebec;
    border-radius: 999px;
}
.mv-option-group .mv-option-item {
    display: inline-flex;
    margin: 0;
}
.mv-option-group .mv-option-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}
.mv-option-group .mv-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: .4rem .95rem;
    border-radius: 999px;
    font-size: .8125rem;
    font-weight: 600;
    line-height: 1.2;
    color: #495057;
    background: transparent;
    border: 0;
    cursor: pointer;
    user-select: none;
    transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.mv-option-group .mv-option:hover {
    color: #00388d;
    background: rgba(0, 56, 141, .06);
}
.mv-option-group .mv-option-input:checked + .mv-option {
    background: #00388d;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(0, 56, 141, .28);
}
.mv-option-group .mv-option-input:focus-visible + .mv-option {
    outline: 2px solid rgba(0, 56, 141, .35);
    outline-offset: 1px;
}

/* Professional switches */
.form-check.form-switch .form-check-input {
    width: 2.2em;
    height: 1.15em;
    cursor: pointer;
    border-color: #ced4da;
    background-color: #e9ebec;
}
.form-check.form-switch .form-check-input:checked {
    background-color: #00388d;
    border-color: #00388d;
}
.form-check.form-switch.form-switch-success .form-check-input:checked {
    background-color: #008d4c;
    border-color: #008d4c;
}
.form-check.form-switch .form-check-label {
    font-size: .875rem;
    color: #495057;
    cursor: pointer;
}

/* Safety: legacy Kartik radioButtonGroup active state */
.btn-group[data-toggle="buttons"] > .btn.btn-primary,
.btn-group[data-bs-toggle="buttons"] > .btn.btn-primary {
    color: #00388d !important;
    background: #fff !important;
    border-color: #dbe0e6 !important;
}
.btn-group[data-toggle="buttons"] > .btn.btn-primary.active,
.btn-group[data-toggle="buttons"] > .btn.btn-primary:active,
.btn-group[data-bs-toggle="buttons"] > .btn.btn-primary.active,
.btn-group[data-bs-toggle="buttons"] > .btn.btn-primary:active {
    color: #fff !important;
    background: #00388d !important;
    border-color: #00388d !important;
    box-shadow: none !important;
}

/* List header toolbar — stats + actions in box headers */
.box-header.list-toolbar,
.list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem 1rem;
    width: 100%;
}
.list-toolbar .box-title,
.list-toolbar .panel-titleintestazione {
    margin: 0;
    flex: 1 1 auto;
    min-width: 140px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #00388d;
}
.list-toolbar-actions {
    display: inline-flex !important;
    visibility: visible !important;
    align-items: center;
    flex-wrap: wrap;
    gap: .45rem;
    margin-left: auto;
    flex: 0 0 auto;
    max-width: 100%;
}
.stat-chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .38rem .75rem .38rem .65rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none !important;
    border: 1px solid transparent;
    transition: background-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease;
    white-space: nowrap;
}
.stat-chip i {
    font-size: .95rem;
    line-height: 1;
}
.stat-chip .stat-chip-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.45rem;
    height: 1.3rem;
    padding: 0 .4rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    background: rgba(255, 255, 255, .65);
}
.stat-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 34, 58, .08);
}
.stat-chip-success {
    background: #e6f5ee;
    color: #008d4c !important;
    border-color: rgba(0, 141, 76, .12);
}
.stat-chip-success:hover,
.stat-chip-success.active {
    background: #008d4c;
    color: #fff !important;
    border-color: #008d4c;
}
.stat-chip-success:hover .stat-chip-count,
.stat-chip-success.active .stat-chip-count {
    background: rgba(255, 255, 255, .22);
    color: #fff;
}
.stat-chip-danger {
    background: #fbecea;
    color: #dd4b39 !important;
    border-color: rgba(221, 75, 57, .12);
}
.stat-chip-danger:hover,
.stat-chip-danger.active {
    background: #dd4b39;
    color: #fff !important;
    border-color: #dd4b39;
}
.stat-chip-danger:hover .stat-chip-count,
.stat-chip-danger.active .stat-chip-count {
    background: rgba(255, 255, 255, .22);
    color: #fff;
}
.stat-chip-warning {
    background: #fef5e6;
    color: #b9770e !important;
    border-color: rgba(243, 156, 18, .18);
}
.stat-chip-warning:hover,
.stat-chip-warning.active {
    background: #f39c12;
    color: #fff !important;
    border-color: #f39c12;
}
.stat-chip-warning:hover .stat-chip-count,
.stat-chip-warning.active .stat-chip-count {
    background: rgba(255, 255, 255, .22);
    color: #fff;
}
.stat-chip-info,
.stat-chip-primary {
    background: #e8eef8;
    color: #00388d !important;
    border-color: rgba(0, 56, 141, .12);
}
.stat-chip-info:hover,
.stat-chip-info.active,
.stat-chip-primary:hover,
.stat-chip-primary.active {
    background: #00388d;
    color: #fff !important;
    border-color: #00388d;
}
.stat-chip-info:hover .stat-chip-count,
.stat-chip-info.active .stat-chip-count,
.stat-chip-primary:hover .stat-chip-count,
.stat-chip-primary.active .stat-chip-count {
    background: rgba(255, 255, 255, .22);
    color: #fff;
}
.list-toolbar-actions .btn-toolbar-action {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-items: center;
    gap: .35rem;
    padding: .42rem .9rem;
    font-size: .8rem;
    font-weight: 600;
    border-radius: 999px;
    line-height: 1.2;
    box-shadow: none !important;
    white-space: nowrap;
}
.list-toolbar-actions .btn-toolbar-action.btn-primary,
.list-toolbar-actions .btn-toolbar-action.btn-soft-primary {
    color: #fff !important;
    background: #00388d !important;
    border: 1px solid #00388d !important;
}
.list-toolbar-actions .btn-toolbar-action.btn-primary:hover,
.list-toolbar-actions .btn-toolbar-action.btn-soft-primary:hover {
    color: #fff !important;
    background: #002a6b !important;
    border-color: #002a6b !important;
}
.list-toolbar-actions .btn-toolbar-action.btn-outline-primary {
    color: #00388d !important;
    background: #fff !important;
    border: 1px solid rgba(0, 56, 141, .35) !important;
}
.list-toolbar-actions .btn-toolbar-action.btn-outline-primary:hover {
    color: #fff !important;
    background: #00388d !important;
    border-color: #00388d !important;
}
.list-toolbar-actions .btn-toolbar-action.btn-danger {
    color: #dd4b39 !important;
    background: #fbecea !important;
    border: 1px solid rgba(221, 75, 57, .12) !important;
}
.list-toolbar-actions .btn-toolbar-action.btn-danger:hover {
    color: #fff !important;
    background: #dd4b39 !important;
}
.list-toolbar-actions .btn-toolbar-action.btn-warning {
    color: #fff !important;
    background: #f39c12 !important;
    border: 1px solid #f39c12 !important;
}
.list-toolbar-actions .btn-toolbar-action.btn-warning:hover {
    color: #fff !important;
    background: #d68910 !important;
    border-color: #d68910 !important;
}
.list-toolbar-actions .btn-toolbar-action.is-bulk-hidden {
    display: none !important;
}
.list-toolbar-actions .btn-toolbar-action i {
    font-size: .95rem;
}

/* ExportMenu + advanced search toolbar */
.list-toolbar-actions .mv-export-wrap,
.list-toolbar-actions .mv-export-group,
.list-toolbar-actions .btn-group {
    display: inline-flex !important;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem;
    visibility: visible !important;
}
.list-toolbar-actions .mv-export-wrap .btn,
.list-toolbar-actions .mv-export-group > .btn,
.list-toolbar-actions .btn-group > .btn,
.list-toolbar-actions .export-full-menu,
.list-toolbar-actions .btn.dropdown-toggle {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-items: center;
    gap: .35rem;
    padding: .42rem .9rem !important;
    font-size: .8rem !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    border-radius: 999px !important;
    box-shadow: none !important;
    color: #00388d !important;
    background: #fff !important;
    border: 1px solid rgba(0, 56, 141, .35) !important;
}
.list-toolbar-actions .mv-export-wrap .btn:hover,
.list-toolbar-actions .mv-export-group > .btn:hover,
.list-toolbar-actions .btn-group > .btn:hover,
.list-toolbar-actions .btn.dropdown-toggle:hover,
.list-toolbar-actions .mv-export-wrap .btn:focus,
.list-toolbar-actions .btn-group > .btn:focus,
.list-toolbar-actions .btn.dropdown-toggle:focus,
.list-toolbar-actions .btn-group.open > .btn {
    color: #fff !important;
    background: #00388d !important;
    border-color: #00388d !important;
}
.list-toolbar-actions .mv-export-wrap .dropdown-menu,
.list-toolbar-actions .mv-export-group .dropdown-menu,
.list-toolbar-actions .btn-group .dropdown-menu {
    min-width: 12rem;
    padding: .35rem;
    border: 1px solid #cfd8e6;
    border-radius: .5rem;
    box-shadow: 0 10px 28px rgba(15, 34, 58, .16);
    font-size: .8125rem;
    z-index: 1050;
}
.list-toolbar-actions .mv-export-wrap .dropdown-menu > li > a,
.list-toolbar-actions .btn-group .dropdown-menu > li > a,
.list-toolbar-actions .mv-export-wrap .dropdown-menu .dropdown-item,
.list-toolbar-actions .btn-group .dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .45rem .7rem;
    border-radius: .35rem;
    color: #495057;
    text-decoration: none;
}
.list-toolbar-actions .mv-export-wrap .dropdown-menu > li > a:hover,
.list-toolbar-actions .btn-group .dropdown-menu > li > a:hover,
.list-toolbar-actions .mv-export-wrap .dropdown-menu .dropdown-item:hover,
.list-toolbar-actions .btn-group .dropdown-menu .dropdown-item:hover {
    background: #e8eef8;
    color: #00388d;
}

.mv-advanced-search {
    margin: 0 1.25rem 1rem;
    padding: 1rem 1.15rem 1.1rem;
    background: linear-gradient(180deg, #f8fafc 0%, #f3f6f9 100%);
    border: 1px solid #e9ebec;
    border-radius: .65rem;
}
.mv-advanced-search-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .35rem .75rem;
    margin-bottom: .85rem;
    padding-bottom: .65rem;
    border-bottom: 1px solid #e9ebec;
}
.mv-advanced-search-title {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .9rem;
    font-weight: 700;
    color: #00388d;
}
.mv-advanced-search-title i {
    font-size: 1rem;
}
.mv-advanced-search-hint {
    font-size: .75rem;
    color: #878a99;
}
.mv-advanced-search .control-label {
    font-size: .78rem;
    font-weight: 600;
    color: #495057;
}
.mv-advanced-search .mv-search-submit,
.mv-advanced-search .btn.mv-search-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    min-width: 140px;
    padding: .5rem 1.1rem;
    border-radius: 999px;
    font-size: .8125rem;
    font-weight: 600;
    background: #00388d;
    border-color: #00388d;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 56, 141, .2);
}
.mv-advanced-search .mv-search-submit:hover {
    background: #002d71;
    border-color: #002d71;
    color: #fff;
}

/* Legacy: soften solid header filter buttons inside box-header pull-right */
.box-header > .pull-right {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem;
}
.box-header > .pull-right > .btn:not(.dropdown-toggle),
.box-header h2 > .pull-right.btn,
.box-header h2 .btn.pull-right,
.box-header h3 .pull-right > .btn {
    border-radius: 999px !important;
    font-size: .78rem !important;
    font-weight: 600 !important;
    padding: .38rem .8rem !important;
    line-height: 1.2 !important;
    box-shadow: none !important;
}
.box-header > .pull-right > .btn-success,
.box-header h2 .btn-success.pull-right,
.box-header h3 .pull-right > .btn-success {
    color: #008d4c !important;
    background: #e6f5ee !important;
    border-color: rgba(0, 141, 76, .12) !important;
}
.box-header > .pull-right > .btn-success:hover,
.box-header h2 .btn-success.pull-right:hover,
.box-header h3 .pull-right > .btn-success:hover {
    color: #fff !important;
    background: #008d4c !important;
}
.box-header > .pull-right > .btn-danger,
.box-header h2 .btn-danger.pull-right,
.box-header h3 .pull-right > .btn-danger {
    color: #dd4b39 !important;
    background: #fbecea !important;
    border-color: rgba(221, 75, 57, .12) !important;
}
.box-header > .pull-right > .btn-danger:hover,
.box-header h2 .btn-danger.pull-right:hover,
.box-header h3 .pull-right > .btn-danger:hover {
    color: #fff !important;
    background: #dd4b39 !important;
}
.box-header > .pull-right > .btn-warning,
.box-header h2 .btn-warning.pull-right {
    color: #b9770e !important;
    background: #fef5e6 !important;
    border-color: rgba(243, 156, 18, .18) !important;
}
.box-header > .pull-right > .btn-warning:hover,
.box-header h2 .btn-warning.pull-right:hover {
    color: #fff !important;
    background: #f39c12 !important;
}
.box-header > .pull-right > .btn-primary,
.box-header h3 .pull-right > .btn-primary {
    color: #00388d !important;
    background: #e8eef8 !important;
    border-color: rgba(0, 56, 141, .1) !important;
}
.box-header > .pull-right > .btn-primary:hover,
.box-header h3 .pull-right > .btn-primary:hover {
    color: #fff !important;
    background: #00388d !important;
}

/* Provvigioni agenti — side-by-side panels */
.mv-provv-agenti-grid {
    width: 100%;
    margin: 0;
    align-items: flex-start;
}
.mv-provv-agenti-grid > [class*="col-"] {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    align-self: flex-start;
}
.mv-provv-panel {
    background: #fff;
    border: 1px solid #d7e0ec;
    border-radius: .65rem;
    padding: .35rem;
    box-shadow: 0 2px 10px rgba(15, 34, 58, .06);
    height: auto;
    overflow: visible;
}
.mv-provv-panel .grid-view,
.mv-provv-panel .kv-grid-container,
.mv-provv-panel .table {
    margin-bottom: 0;
}
.mv-provv-panel .table > thead > tr > th {
    background: #eef3f9;
    color: #00388d;
    font-size: .8rem;
    font-weight: 700;
    white-space: nowrap;
}
.list-toolbar-actions .btn-toolbar-action.btn-warning {
    color: #b9770e !important;
    background: #fef5e6 !important;
    border: 1px solid rgba(243, 156, 18, .22) !important;
}
.list-toolbar-actions .btn-toolbar-action.btn-warning:hover {
    color: #fff !important;
    background: #f39c12 !important;
    border-color: #f39c12 !important;
}

/* DIDS-MOR — Configura action */
.mv-config-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .3rem;
    padding: .38rem .85rem .38rem .7rem;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .01em;
    line-height: 1.2;
    text-decoration: none !important;
    white-space: nowrap;
    color: #00388d !important;
    background: #e8eef8;
    border: 1px solid rgba(0, 56, 141, .14);
    box-shadow: 0 2px 8px rgba(0, 56, 141, .08);
    transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.mv-config-btn i {
    font-size: .95rem;
    line-height: 1;
}
.mv-config-btn i:last-child {
    font-size: 1.05rem;
    margin-left: -.1rem;
    opacity: .75;
    transition: transform .15s ease, opacity .15s ease;
}
.mv-config-btn:hover {
    color: #fff !important;
    background: #00388d;
    border-color: #00388d;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 56, 141, .22);
}
.mv-config-btn:hover i:last-child {
    opacity: 1;
    transform: translateX(2px);
}
.mv-config-btn:focus-visible {
    outline: 2px solid rgba(0, 56, 141, .35);
    outline-offset: 2px;
}

/* Row action pills (dids-closed-requests, etc.) */
.mv-row-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: .35rem;
}
.mv-row-actions-cell {
    vertical-align: middle !important;
}
.mv-row-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .28rem;
    padding: .32rem .7rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.mv-row-btn i {
    font-size: .95rem;
    line-height: 1;
}
.mv-row-btn:hover {
    transform: translateY(-1px);
}
.mv-row-btn--danger {
    color: #dd4b39 !important;
    background: #fbecea;
    border-color: rgba(221, 75, 57, .18);
    box-shadow: 0 2px 8px rgba(221, 75, 57, .1);
}
.mv-row-btn--danger:hover {
    color: #fff !important;
    background: #dd4b39;
    border-color: #dd4b39;
    box-shadow: 0 4px 12px rgba(221, 75, 57, .22);
}
.mv-row-btn--warning {
    color: #b9770e !important;
    background: #fef5e6;
    border-color: rgba(243, 156, 18, .22);
    box-shadow: 0 2px 8px rgba(243, 156, 18, .1);
}
.mv-row-btn--warning:hover {
    color: #fff !important;
    background: #f39c12;
    border-color: #f39c12;
    box-shadow: 0 4px 12px rgba(243, 156, 18, .22);
}
.mv-row-btn--muted {
    color: #495057 !important;
    background: #f3f6f9;
    border-color: rgba(73, 80, 87, .12);
}
.mv-row-btn--muted:hover {
    color: #fff !important;
    background: #495057;
    border-color: #495057;
}
.mv-row-btn--primary {
    color: #00388d !important;
    background: #e8eef8;
    border-color: rgba(0, 56, 141, .14);
    box-shadow: 0 2px 8px rgba(0, 56, 141, .08);
}
.mv-row-btn--primary:hover {
    color: #fff !important;
    background: #00388d;
    border-color: #00388d;
    box-shadow: 0 4px 12px rgba(0, 56, 141, .22);
}
.mv-row-btn--success {
    color: #008d4c !important;
    background: #e6f5ee;
    border-color: rgba(0, 141, 76, .18);
    box-shadow: 0 2px 8px rgba(0, 141, 76, .1);
}
.mv-row-btn--success:hover {
    color: #fff !important;
    background: #008d4c;
    border-color: #008d4c;
    box-shadow: 0 4px 12px rgba(0, 141, 76, .22);
}
.mv-row-btn--download {
    color: #00388d !important;
    background: linear-gradient(180deg, #eef4fc 0%, #e0ebf8 100%);
    border-color: rgba(0, 56, 141, .2);
    box-shadow: 0 2px 10px rgba(0, 56, 141, .12);
    padding: .38rem .9rem;
    font-size: .74rem;
}
.mv-row-btn--download:hover {
    color: #fff !important;
    background: #00388d;
    border-color: #00388d;
    box-shadow: 0 4px 14px rgba(0, 56, 141, .25);
}

.ec-invoice-link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none !important;
    color: inherit;
    white-space: nowrap;
    vertical-align: middle;
}
.ec-doc-num {
    font-weight: 700;
    font-size: .82rem;
    color: #1f2d3d;
    font-variant-numeric: tabular-nums;
}
.ec-doc-action {
    display: inline-flex;
    align-items: center;
    gap: .22rem;
    padding: .22rem .55rem;
    border-radius: 999px;
    background: #f8ecea;
    color: #b03a2e;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .04em;
    border: 1px solid rgba(176, 58, 46, .16);
    line-height: 1;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.ec-doc-action i {
    font-size: .9rem;
    line-height: 1;
}
.billing-payment-index .table td,
.billing-payment-index .ec-doc-num,
.billing-payment-index .ec-doc-action {
    font-size: .82rem;
}
.billing-payment-index .table th {
    font-size: .75rem;
}
.billing-payment-index .ec-doc-action i {
    font-size: 1.05rem;
}
.billing-payment-index .ec-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: .45rem;
    clear: both;
}
.billing-payment-index .ec-actions .btn {
    float: none !important;
    margin: 0 !important;
}
.billing-payment-index .box-header > .ec-actions {
    margin-left: auto;
}
.billing-payment-index .ec-actions > .ec-pay-btn {
    color: #fff !important;
    background: #00388d !important;
    border-color: #00388d !important;
    font-weight: 700;
}
.billing-payment-index .ec-actions > .ec-pay-btn:hover {
    color: #fff !important;
    background: #002d71 !important;
    border-color: #002d71 !important;
}

.events-index .cal-nav-week,
.events-index .cal-nav-day {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem;
}
.events-index .cal-nav-day {
    display: none;
}
.events-index .cal-day-label {
    flex: 1 1 9rem;
    min-width: 8rem;
    text-align: center;
    font-weight: 700;
    color: #00388d;
    font-size: 1rem;
    line-height: 1.2;
}
@media (max-width: 767px) {
    .events-index .cal-nav-week {
        display: none !important;
    }
    .events-index .cal-nav-day {
        display: flex;
        width: 100%;
    }
    .events-index .box-body .pull-left,
    .events-index .box-body .pull-right {
        float: none !important;
        width: 100%;
        max-width: 100%;
        margin-bottom: .65rem;
    }
    .events-index .box-body .pull-right.col-lg-3 {
        padding-left: 0;
        padding-right: 0;
    }
    .events-index .fc-time-grid-event .fc-content,
    .events-index .fc-time-grid-event .fc-title,
    .events-index .fc-time-grid-event .fc-title div {
        white-space: normal;
        overflow: visible;
        font-size: 13px;
        line-height: 1.3;
    }
    .events-index .fc-time-grid .fc-slats td {
        height: 2.5em;
    }
    .events-index .fc-axis,
    .events-index .fc-time {
        font-size: 12px;
    }
    .events-index .fc-day-header {
        font-size: 14px;
        font-weight: 700;
    }
}

.payments-index {
    width: 100%;
    max-width: 100%;
}
.payments-index .box,
.payments-index .box-body {
    overflow: visible;
    max-width: 100%;
}
.payments-index .kv-grid-container {
    overflow-x: auto;
    max-width: 100%;
}
.payments-index table.table td,
.payments-index .mail-tpl-name,
.payments-index .orders-total {
    font-size: .82rem;
}
.payments-index table.table th {
    font-size: .75rem;
}
.payments-index table.table td {
    padding: .55rem .75rem;
    vertical-align: middle;
}
.payments-index table.table th {
    font-weight: 700;
    letter-spacing: .01em;
    white-space: nowrap;
}
.payments-index .mv-dt {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
    white-space: nowrap;
}
.payments-index .mv-dt-date {
    font-weight: 600;
}
.payments-index .mv-row-actions {
    align-items: center;
    justify-content: center;
}
.payments-index .pay-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
    margin-top: .28rem;
}
.payments-index .pay-type {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .16rem .55rem;
    border-radius: 999px;
    background: #eef3f9;
    color: #1a2332;
    font-weight: 650;
    white-space: nowrap;
}
.payments-index .pay-type i {
    color: #00388d;
    font-size: 1rem;
    line-height: 1;
}
.payments-index .pay-file {
    display: flex;
    align-items: center;
    gap: .28rem;
    color: #00388d;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
.payments-index .pay-file + .pay-file {
    margin-top: .2rem;
}
.payments-index .orders-bulk-bar .select2-container {
    min-width: 240px;
    width: 240px !important;
}
.payments-index .mv-advanced-search {
    background: #fff;
    border: 1px solid #e6ebf2;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 34, 58, .04);
}
.payments-search .form-group {
    margin-bottom: 0;
}
.payments-search-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 0.8fr 0.8fr;
    gap: 0 1rem;
}
.payments-search-extra {
    grid-template-columns: 1fr 1fr;
    margin-top: .85rem;
}
.payments-search-rimesso {
    margin-top: .9rem;
}
.payments-search-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: .55rem;
    margin-top: 1rem;
    padding-top: .9rem;
    border-top: 1px solid #e8eef5;
}
.reparto-index .reparto-lookup .form-group {
    margin-bottom: 0;
}
.reparto-index .reparto-lookup-row {
    display: flex;
    align-items: flex-end;
    gap: .75rem 1rem;
}
.reparto-index .reparto-lookup-row .ticket-reply-section {
    flex: 1 1 280px;
}
.reparto-index .reparto-lookup-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding-bottom: .15rem;
}
.reparto-index .reparto-name {
    font-weight: 700;
    color: #212529;
}
.reparto-index .reparto-meta {
    margin-top: .15rem;
    font-size: .84rem;
    color: #878a99;
}
@media (max-width: 767px) {
    .reparto-index .reparto-lookup-row {
        flex-direction: column;
        align-items: stretch;
    }
}

.profile-index .profile-lookup {
    margin-bottom: .25rem;
}
.profile-index .profile-lookup .form-group {
    margin-bottom: .25rem;
}
.profile-index .profile-lookup-hint {
    margin: .35rem 0 0;
    font-size: .78rem;
    color: #878a99;
}
.profile-lookup-dropdown .select2-results__option {
    white-space: normal;
    line-height: 1.35;
}
.profile-index .profile-user {
    display: flex;
    flex-direction: column;
    gap: .28rem;
    min-width: 8rem;
}
.profile-index .profile-user-code {
    font-weight: 700;
    color: #00388d;
    text-decoration: none;
}
a.profile-user-code:hover {
    text-decoration: underline;
}
.profile-index .profile-flags {
    display: flex;
    flex-wrap: wrap;
    gap: .2rem;
}
.profile-index .profile-flags i {
    float: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    margin: 0 !important;
    border-radius: 999px;
    background: #f4f7fb;
    font-size: .72rem;
}
.profile-index .profile-phones {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    font-size: .84rem;
    color: #495057;
}
.profile-index .profile-phones span {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    white-space: nowrap;
}
.profile-index .profile-phones i {
    color: #878a99;
}
.profile-index .profile-balance {
    font-weight: 700;
    color: #00388d;
    white-space: nowrap;
}
.profile-index .mv-row-actions {
    justify-content: flex-end;
}
.profile-index .label {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: .2rem .55rem;
    font-size: .72rem;
    font-weight: 700;
}
.profiles-search .form-group {
    margin-bottom: 0;
}
.profiles-search-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .85rem 1rem;
}
.profiles-search-span-2 {
    grid-column: span 2;
}
.profiles-search-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: .55rem;
    margin-top: 1rem;
    padding-top: .9rem;
    border-top: 1px solid #e8eef5;
}
.profiles-search .ticket-reply-section-label,
.profiles-search .form-control,
.profiles-search .select2-container .select2-selection__rendered,
.profile-index .profile-lookup .form-control,
.profile-index .profile-lookup .select2-container .select2-selection__rendered {
    font-size: .9375rem;
}
@media (max-width: 991px) {
    .profiles-search-grid {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 767px) {
    .profiles-search-grid,
    .profiles-search-span-2 {
        grid-template-columns: 1fr;
        grid-column: auto;
    }
}

.payments-search .ticket-reply-section-label,
.payments-search .form-control,
.payments-search .select2-container .select2-selection__rendered,
.payments-search .btn,
.payments-search .mv-advanced-search-hint {
    font-size: .9375rem;
}
@media (max-width: 1199px) {
    .payments-search-grid,
    .payments-search-extra {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 767px) {
    .payments-search-grid,
    .payments-search-extra {
        grid-template-columns: 1fr;
    }
}
.ec-invoice-link:hover .ec-doc-num {
    color: #00388d;
}
.ec-invoice-link:hover .ec-doc-action {
    background: #b03a2e;
    color: #fff;
    border-color: #b03a2e;
    box-shadow: 0 3px 10px rgba(176, 58, 46, .22);
}
.mv-row-actions--secondary {
    margin-top: .4rem;
    justify-content: center;
}

/* Connectivity orders — avoid status overlapping download */
.mv-status-cell {
    white-space: nowrap;
    vertical-align: middle !important;
    position: relative;
    z-index: 1;
    padding-right: .75rem !important;
}
.mv-connectivity-actions-cell {
    white-space: normal !important;
    vertical-align: middle !important;
    min-width: 9.5rem;
    max-width: 12rem;
    position: relative;
    z-index: 2;
    overflow: visible;
}
.mv-connectivity-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .4rem;
    width: 100%;
}
.mv-connectivity-actions .mv-row-actions {
    justify-content: center;
    flex-wrap: wrap;
    max-width: 100%;
}
.mv-connectivity-actions .mv-row-actions--secondary {
    margin-top: 0;
    width: 100%;
}
.mv-connectivity-actions .mv-row-btn--download {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Ordine — firma digitale actions */
.mv-sign-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: .35rem .75rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: background-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.mv-sign-btn i {
    font-size: .95rem;
    line-height: 1;
}
.mv-sign-btn--send {
    color: #008d4c !important;
    background: #e6f5ee;
    border-color: rgba(0, 141, 76, .18);
    box-shadow: 0 2px 8px rgba(0, 141, 76, .12);
}
.mv-sign-btn--send:hover {
    color: #fff !important;
    background: #008d4c;
    border-color: #008d4c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 141, 76, .22);
}
.mv-sign-btn--done {
    color: #00388d !important;
    background: #e8eef8;
    border-color: rgba(0, 56, 141, .14);
}
.mv-sign-btn--done:hover {
    color: #fff !important;
    background: #00388d;
    border-color: #00388d;
}

/* Provvigioni create — centered vertical form */
.mv-provv-create-card .box-header.list-toolbar {
    align-items: flex-start;
}
.mv-provv-create-subtitle {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    margin-top: .15rem;
}
.mv-provv-create-user {
    font-size: .95rem;
    font-weight: 600;
    color: #1a2332;
}
.mv-provv-create-company {
    font-size: .8rem;
    color: #6c757d;
}
.mv-provv-create-intro {
    margin-bottom: 1.25rem;
    padding: .85rem 1rem;
    background: #eef3f9;
    border: 1px solid #d7e0ec;
    border-radius: .55rem;
}
.mv-provv-create-intro p {
    margin: 0;
    font-size: .875rem;
    color: #495057;
    line-height: 1.45;
}
.mv-provv-create-form .form-group > label,
.mv-provv-create-form .control-label {
    display: block;
    margin-bottom: .4rem;
    font-size: .8rem;
    font-weight: 700;
    color: #00388d;
    text-align: left !important;
}
.mv-provv-create-form .form-control,
.mv-provv-create-form .select2-container .select2-selection--single {
    min-height: 44px;
    border-radius: .5rem !important;
    border-color: #c5d0e0;
}
.mv-provv-create-form .select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 42px !important;
    padding-left: .85rem;
}
.mv-provv-create-form .select2-container .select2-selection--single .select2-selection__arrow {
    height: 42px !important;
}
.mv-provv-create-submit {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 48px;
    border-radius: 999px !important;
    font-weight: 700;
    background: #008d4c !important;
    border-color: #008d4c !important;
    box-shadow: 0 6px 16px rgba(0, 141, 76, .22);
}
.mv-provv-create-submit:hover {
    background: #007a42 !important;
    border-color: #007a42 !important;
}
.mv-provv-create-actions {
    margin-top: .25rem;
}

/* Shared centered vertical forms (create / report) */
.mv-centered-form-card .box-header.list-toolbar {
    align-items: flex-start;
}
.mv-centered-form-subtitle {
    margin-top: .2rem;
    font-size: .8rem;
    color: #6c757d;
}
.mv-centered-form-intro {
    margin-bottom: 1.25rem;
    padding: .85rem 1rem;
    background: #eef3f9;
    border: 1px solid #d7e0ec;
    border-radius: .55rem;
}
.mv-centered-form-intro p {
    margin: 0;
    font-size: .875rem;
    color: #495057;
    line-height: 1.45;
}
.mv-centered-form .form-group > label,
.mv-centered-form .control-label,
.mv-provv-create-form .form-group > label {
    display: block;
    margin-bottom: .4rem;
    font-size: .8rem;
    font-weight: 700;
    color: #00388d;
    text-align: left !important;
}
.mv-centered-form .form-control,
.mv-centered-form .select2-container .select2-selection--single,
.mv-provv-create-form .form-control,
.mv-provv-create-form .select2-container .select2-selection--single {
    min-height: 44px;
    border-radius: .5rem !important;
    border-color: #c5d0e0;
}
.mv-centered-form .select2-container .select2-selection--single .select2-selection__rendered,
.mv-provv-create-form .select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 42px !important;
    padding-left: .85rem;
}
.mv-centered-form .select2-container .select2-selection--single .select2-selection__arrow,
.mv-provv-create-form .select2-container .select2-selection--single .select2-selection__arrow {
    height: 42px !important;
}
.mv-centered-form-submit,
.mv-provv-create-submit {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 48px;
    border-radius: 999px !important;
    font-weight: 700;
    background: #008d4c !important;
    border-color: #008d4c !important;
    box-shadow: 0 6px 16px rgba(0, 141, 76, .22);
}
.mv-centered-form-submit:hover,
.mv-provv-create-submit:hover {
    background: #007a42 !important;
    border-color: #007a42 !important;
}
.mv-centered-form-actions {
    margin-top: .25rem;
}

/* ADSL copertura — centered form + aligned dual actions */
.mv-copertura-actions {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: .75rem;
    flex-wrap: wrap;
}
.mv-copertura-actions > .btn,
.mv-copertura-actions > a.btn {
    flex: 1 1 0;
    min-width: 12rem;
    margin: 0 !important;
    width: auto !important;
}
.mv-centered-form-submit--secondary {
    background: #f39c12 !important;
    border-color: #f39c12 !important;
    box-shadow: 0 6px 16px rgba(243, 156, 18, .22);
}
.mv-centered-form-submit--secondary:hover {
    background: #e08e0b !important;
    border-color: #e08e0b !important;
    color: #fff !important;
}
.mv-copertura-form .select2-container {
    width: 100% !important;
}

/* ADSL activation wizard */
.mv-wizard-card {
    overflow: hidden;
}
.mv-wizard-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}
.mv-wizard-header-sub {
    margin-top: .2rem;
    font-size: .82rem;
    color: #6c757d;
}
.mv-wizard-steps {
    margin: 0 0 1.35rem;
    padding: 1rem 1rem .35rem;
    background: linear-gradient(180deg, #f5f8fc 0%, #eef3f9 100%);
    border: 1px solid #d7e0ec;
    border-radius: .75rem;
}
.mv-wizard-steps-list {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .35rem;
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-x: auto;
}
.mv-wizard-step {
    position: relative;
    flex: 1 1 0;
    min-width: 5.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: .35rem .25rem .85rem;
    color: #7a8699;
}
.mv-wizard-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 1.15rem;
    left: calc(50% + 1.15rem);
    width: calc(100% - 2.3rem);
    height: 2px;
    background: #cfd8e6;
    z-index: 0;
}
.mv-wizard-step--done:not(:last-child)::after,
.mv-wizard-step--current:not(:last-child)::after {
    background: linear-gradient(90deg, #008d4c 0%, #3c8dbc 100%);
}
.mv-wizard-step-index {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 800;
    background: #fff;
    border: 2px solid #cfd8e6;
    color: #6c757d;
    margin-bottom: .45rem;
}
.mv-wizard-step--done .mv-wizard-step-index {
    background: #008d4c;
    border-color: #008d4c;
    color: #fff;
}
.mv-wizard-step--current .mv-wizard-step-index {
    background: #00388d;
    border-color: #00388d;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(0, 56, 141, .14);
}
.mv-wizard-step-icon {
    font-size: 1.05rem;
    line-height: 1;
    margin-bottom: .25rem;
    opacity: .7;
}
.mv-wizard-step--current .mv-wizard-step-icon,
.mv-wizard-step--done .mv-wizard-step-icon {
    opacity: 1;
    color: #00388d;
}
.mv-wizard-step--done .mv-wizard-step-icon {
    color: #008d4c;
}
.mv-wizard-step-label {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .01em;
    line-height: 1.2;
}
.mv-wizard-step--current .mv-wizard-step-label {
    color: #00388d;
}
.mv-wizard-step--done .mv-wizard-step-label {
    color: #008d4c;
}
.mv-wizard-body {
    max-width: 860px;
    margin: 0 auto;
}
.mv-wizard-body:has(.mv-wizard-packages) {
    max-width: 1100px;
}
.mv-wizard-form .select2-container {
    width: 100% !important;
}
.mv-wizard-section {
    margin-bottom: 1.15rem;
    border: 1px solid #d7e0ec;
    border-radius: .75rem;
    background: #fff;
    overflow: hidden;
}
.mv-wizard-section-title {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .85rem 1rem;
    background: #f5f8fc;
    border-bottom: 1px solid #e3ebf5;
}
.mv-wizard-section-title strong {
    display: block;
    color: #00388d;
    font-size: .92rem;
}
.mv-wizard-section-title small {
    display: block;
    color: #6c757d;
    font-size: .76rem;
    margin-top: .1rem;
}
.mv-wizard-section-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 999px;
    background: #00388d;
    color: #fff;
    font-size: .75rem;
    font-weight: 800;
    flex: 0 0 auto;
}
.mv-wizard-section-body {
    padding: 1rem 1.05rem 1.05rem;
}
.mv-wizard-field-with-action {
    display: flex;
    align-items: flex-end;
    gap: .65rem;
}
.mv-wizard-side-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    white-space: nowrap;
    min-height: 44px;
    border-radius: .5rem !important;
    font-weight: 700;
    flex: 0 0 auto;
}
.mv-wizard-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: .5rem;
}
.mv-wizard-next {
    min-width: 12rem;
}
@media (max-width: 767.98px) {
    .mv-wizard-step-icon {
        display: none;
    }
    .mv-wizard-field-with-action {
        flex-direction: column;
        align-items: stretch;
    }
    .mv-wizard-actions {
        justify-content: stretch;
    }
    .mv-wizard-next {
        width: 100%;
    }
}

/* Wizard package selection (step 3) */
.mv-wizard-service-chip {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin-top: .75rem;
    padding: .4rem .75rem;
    border-radius: 999px;
    background: #e8eef8;
    color: #00388d;
    font-size: .82rem;
}
.mv-wizard-service-chip i {
    font-size: 1rem;
}
.mv-wizard-packages .mv-wizard-body,
.mv-wizard-packages {
    max-width: none;
}
.mv-wizard-packages-layout {
    align-items: flex-start;
}
.mv-package-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 .15rem .55rem;
    margin-bottom: .35rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #7a8699;
    border-bottom: 1px solid #e8eef5;
}
.mv-package-list {
    display: flex;
    flex-direction: column;
    gap: .55rem;
}
.mv-package-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 0;
    padding: .85rem 1rem;
    border: 1px solid #d7e0ec;
    border-radius: .7rem;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease, transform .15s ease;
}
.mv-package-card:hover {
    border-color: #9eb6d8;
    box-shadow: 0 4px 14px rgba(15, 34, 58, .08);
}
.mv-package-card.is-selected {
    border-color: #00388d;
    background: linear-gradient(180deg, #f3f7fc 0%, #eaf1fa 100%);
    box-shadow: 0 6px 16px rgba(0, 56, 141, .12);
}
.mv-package-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.mv-package-card-body {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-width: 0;
    width: 100%;
}
.mv-package-name {
    font-size: .92rem;
    font-weight: 700;
    color: #1a2332;
    line-height: 1.3;
}
.mv-package-prices {
    display: flex;
    align-items: stretch;
    gap: .65rem;
    flex: 0 0 auto;
}
.mv-package-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 5.5rem;
    padding: .35rem .55rem;
    border-radius: .45rem;
    background: rgba(255, 255, 255, .85);
    border: 1px solid #e3ebf5;
}
.mv-package-price small {
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: #7a8699;
}
.mv-package-price strong {
    font-size: .88rem;
    color: #00388d;
}
.mv-package-check {
    color: #c5d0e0;
    font-size: 1.25rem;
    line-height: 1;
    flex: 0 0 auto;
}
.mv-package-card.is-selected .mv-package-check {
    color: #008d4c;
}
.mv-wizard-summary {
    position: sticky;
    top: 90px;
    padding: 1rem 1.05rem;
    border: 1px solid #d7e0ec;
    border-radius: .75rem;
    background: linear-gradient(180deg, #ffffff 0%, #f5f8fc 100%);
    box-shadow: 0 8px 20px rgba(15, 34, 58, .06);
}
.mv-wizard-summary-title {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: .85rem;
    font-size: .92rem;
    font-weight: 800;
    color: #00388d;
}
.mv-wizard-summary-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.mv-wizard-summary-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .65rem 0;
    border-bottom: 1px solid #e8eef5;
    font-size: .86rem;
    color: #495057;
}
.mv-wizard-summary-list li strong {
    color: #1a2332;
    white-space: nowrap;
}
.mv-wizard-summary-list li.is-total {
    border-bottom: 0;
    padding-top: .85rem;
    font-size: .95rem;
    font-weight: 700;
}
.mv-wizard-summary-list li.is-total strong {
    color: #008d4c;
    font-size: 1.05rem;
}
.mv-wizard-summary-note {
    margin: .35rem 0 0;
    font-size: .75rem;
    color: #7a8699;
    line-height: 1.35;
}
.mv-wizard-actions--split {
    justify-content: space-between;
    gap: .75rem;
    margin-top: 1rem;
}
.mv-wizard-back {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    min-height: 48px;
    min-width: 10rem;
    border-radius: 999px !important;
    font-weight: 700;
    border: 1px solid #d7e0ec !important;
    background: #fff !important;
    color: #495057 !important;
}
.mv-wizard-back:hover {
    background: #f5f8fc !important;
    color: #00388d !important;
}
@media (max-width: 991.98px) {
    .mv-wizard-summary {
        position: static;
        margin-bottom: .5rem;
    }
    .mv-package-card-body {
        flex-direction: column;
        align-items: flex-start;
    }
    .mv-package-prices {
        width: 100%;
    }
    .mv-package-price {
        flex: 1 1 0;
        align-items: flex-start;
    }
}
@media (max-width: 767.98px) {
    .mv-wizard-actions--split {
        flex-direction: column-reverse;
    }
    .mv-wizard-back,
    .mv-wizard-next {
        width: 100%;
    }
}

/* Wizard extras (step 4) */
.mv-wizard-service-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-top: .75rem;
}
.mv-wizard-service-chips .mv-wizard-service-chip {
    margin-top: 0;
}
.mv-wizard-info {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    margin-bottom: .85rem;
    padding: .75rem .9rem;
    border-radius: .55rem;
    background: #eef3f9;
    border: 1px solid #d7e0ec;
    color: #495057;
}
.mv-wizard-info i {
    color: #00388d;
    font-size: 1.1rem;
    line-height: 1.3;
    margin-top: .05rem;
}
.mv-wizard-info p {
    margin: 0;
    font-size: .84rem;
    line-height: 1.4;
}
.mv-package-card--extra .mv-package-card-body--stack {
    flex-direction: column;
    align-items: stretch;
    gap: .45rem;
}
.mv-package-note {
    display: block;
    font-size: .78rem;
    font-style: italic;
    color: #6c757d;
    line-height: 1.35;
}
.mv-package-prices--extra {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
}
.mv-package-price--wide {
    min-width: 10rem;
    align-items: flex-start;
}
.mv-package-price--wide strong {
    font-size: .78rem;
    font-weight: 700;
    text-align: left;
    white-space: normal;
}
.mv-wizard-free-block {
    margin-top: 1rem;
    padding: .9rem 1rem;
    border: 1px dashed #c5d0e0;
    border-radius: .65rem;
    background: #fafcfe;
}
.mv-wizard-free-title {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: .75rem;
    font-size: .86rem;
    font-weight: 800;
    color: #00388d;
}
.mv-wizard-body:has(.mv-wizard-extras) {
    max-width: 980px;
}

/* Wizard referenti / fatturazione (step 5) */
.mv-wizard-body:has(.mv-wizard-referenti) {
    max-width: 920px;
}
.mv-wizard-toggle-row {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: .9rem;
    padding: .85rem 1rem;
    border: 1px solid #e3ebf5;
    border-radius: .65rem;
    background: #fafcfe;
}
.mv-wizard-toggle-row--muted {
    opacity: .72;
}
.mv-wizard-toggle-item {
    flex: 1 1 16rem;
    min-width: 14rem;
}
.mv-wizard-toggle-field {
    flex: 1 1 18rem;
    min-width: 14rem;
}
.mv-wizard-address-block {
    margin: .25rem 0 1rem;
    padding: .9rem 1rem;
    border: 1px dashed #c5d0e0;
    border-radius: .65rem;
    background: #f5f8fc;
}
.mv-wizard-privacy {
    margin-top: 1rem;
    padding-top: .85rem;
    border-top: 1px solid #e8eef5;
}
.mv-wizard-privacy > p {
    margin: 0 0 .75rem;
    font-size: .86rem;
    color: #495057;
    line-height: 1.4;
}
.mv-wizard-privacy-switches {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
}

/* Wizard riepilogo (step 6) */
.mv-wizard-body:has(.mv-wizard-riepilogo) {
    max-width: 1100px;
}
.mv-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem 1rem;
}
.mv-summary-item {
    padding: .7rem .8rem;
    border: 1px solid #e3ebf5;
    border-radius: .55rem;
    background: #fafcfe;
}
.mv-summary-item--wide {
    grid-column: 1 / -1;
}
.mv-summary-item span {
    display: block;
    margin-bottom: .2rem;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #7a8699;
}
.mv-summary-item strong {
    display: block;
    font-size: .9rem;
    font-weight: 700;
    color: #1a2332;
    line-height: 1.35;
    word-break: break-word;
}
.mv-summary-table {
    font-size: .84rem;
}
.mv-summary-table thead th {
    background: #f5f8fc;
    border-bottom: 1px solid #d7e0ec;
    color: #00388d;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
    white-space: nowrap;
    padding: .75rem .9rem;
}
.mv-summary-table td,
.mv-summary-table tfoot th {
    padding: .7rem .9rem;
    vertical-align: middle;
    border-color: #e8eef5;
}
.mv-summary-table-label {
    font-weight: 700;
    color: #00388d;
    white-space: nowrap;
}
.mv-summary-subtotal th {
    background: #e6f5ee;
    color: #1a2332;
    font-weight: 800;
}
.mv-wizard-section-body.p-0 {
    padding: 0 !important;
}
@media (max-width: 767.98px) {
    .mv-summary-grid {
        grid-template-columns: 1fr;
    }
    .mv-summary-table-label {
        white-space: normal;
    }
}

/* Ticket list — compact columns for notebooks */
.ticket-index .ticket-grid th,
.ticket-index .ticket-grid td {
    padding: .45rem .5rem !important;
    line-height: 1.35;
    vertical-align: middle;
}
.ticket-index .ticket-grid td {
    font-size: .82rem;
}
.ticket-index .ticket-grid th {
    font-size: .75rem;
}
.ticket-index .mv-dt {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
    white-space: nowrap;
}
.ticket-index .mv-dt-date {
    font-weight: 600;
}
.ticket-index .mv-dt-time {
    color: #6c757d;
    font-size: .8125rem;
}
.ticket-index .ticket-col-code {
    white-space: nowrap;
}
.ticket-index .ticket-new-badge {
    display: inline-block;
    margin-left: .3rem;
    vertical-align: middle;
}
.ticket-index .ticket-col-name {
    max-width: 160px;
    white-space: normal;
    line-height: 1.25;
    word-break: break-word;
}
.ticket-index .ticket-name {
    display: block;
}
.ticket-index .ticket-ditta {
    display: block;
    margin-top: .1rem;
    color: #6c757d;
    font-size: .8125rem;
    line-height: 1.25;
}
.ticket-index .ticket-col-oggetto {
    min-width: 140px;
    max-width: 240px;
    white-space: normal;
}
.ticket-index .ticket-oggetto {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.25;
}
.ticket-index .ticket-col-cat {
    max-width: 110px;
    white-space: normal;
    line-height: 1.25;
}
.ticket-index .ticket-col-impianto {
    white-space: nowrap;
}
.ticket-index .ticket-col-dt {
    white-space: nowrap;
}
.ticket-index .ticket-col-app {
    white-space: nowrap;
}
.ticket-index .ticket-app-label {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: .2rem .4rem;
    line-height: 1.2;
    white-space: nowrap;
    font-size: .8125rem;
}
.ticket-index .ticket-col-actions {
    width: 1%;
    white-space: nowrap;
}

/* Ticket view — professional conversation */
.ticket-view-kicker {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #6c7a8a;
    margin-bottom: .15rem;
}
.ticket-view-kicker.is-rigenera {
    color: #2a8a96;
}
.ticket-view-status {
    margin-left: .5rem;
    vertical-align: middle;
    font-size: .72rem;
    font-weight: 700;
    padding: .28em .7em;
    border-radius: 999px;
}
.ticket-view-subject {
    font-size: .95rem;
    color: #3d4d5c;
    font-weight: 500;
    max-width: 52rem;
    line-height: 1.4;
}
.ticket-view-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .85rem;
    margin-bottom: 1.1rem;
}
.ticket-meta-card {
    background: #fff;
    border: 1px solid #d7e0ec;
    border-radius: 12px;
    padding: .95rem 1.05rem 1rem;
    box-shadow: 0 2px 10px rgba(15, 34, 58, .04);
    min-width: 0;
}
.ticket-meta-label {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #7a8896;
    margin-bottom: .4rem;
}
.ticket-meta-label i {
    font-size: .95rem;
    color: #00388d;
}
.ticket-meta-title {
    font-size: .95rem;
    font-weight: 700;
    color: #1a2332;
    margin-bottom: .35rem;
    line-height: 1.3;
}
.ticket-meta-title a {
    color: #00388d;
    text-decoration: none;
}
.ticket-meta-title a:hover {
    text-decoration: underline;
}
.ticket-meta-ext {
    margin-left: .25rem;
    color: #00388d;
    font-size: .95rem;
    vertical-align: middle;
}
.ticket-meta-voip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.55rem;
    height: 1.55rem;
    margin-left: .4rem;
    border-radius: 999px;
    background: #e8eef8;
    color: #00388d !important;
    font-size: .85rem;
    line-height: 1;
    text-decoration: none !important;
    vertical-align: middle;
}
.ticket-meta-voip:hover,
.ticket-meta-voip:focus {
    background: #00388d;
    color: #fff !important;
}
.ticket-meta-lines {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    font-size: .78rem;
    color: #4b5b6a;
    line-height: 1.35;
}
.ticket-meta-lines a {
    color: #3d4d5c;
    text-decoration: none;
}
.ticket-meta-lines a:hover {
    color: #00388d;
}
.ticket-meta-lines i {
    margin-right: .2rem;
    color: #8a97a6;
}
.ticket-meta-link {
    display: inline-block;
    margin-top: .55rem;
    font-size: .75rem;
    font-weight: 600;
    color: #00388d;
    text-decoration: none;
}
.ticket-meta-link:hover {
    text-decoration: underline;
}
.ticket-view {
    margin-bottom: 3rem;
}
.ticket-thread-box {
    overflow: hidden;
}
.ticket-view-reply-bar {
    display: flex;
    justify-content: flex-end;
    background: #fff;
    border-top: 1px solid #e6ebf2;
    padding: .85rem 1rem 1rem;
}
.ticket-thread-box .box-title {
    display: flex;
    align-items: center;
    gap: .45rem;
}
.ticket-thread-box .box-title i {
    color: #00388d;
}
.ticket-thread-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4rem;
    height: 1.3rem;
    padding: 0 .4rem;
    border-radius: 999px;
    background: #e8eef8;
    color: #00388d;
    font-size: .72rem;
    font-weight: 700;
}
.ticket-thread {
    position: relative;
    padding: 1.1rem 1.25rem 1.5rem 1.35rem;
    background: linear-gradient(180deg, #f7f9fc 0%, #fff 140px);
}
.ticket-thread-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #7a8896;
}
.ticket-thread-empty i {
    font-size: 2rem;
    color: #c5d0e0;
    display: block;
    margin-bottom: .5rem;
}
.ticket-day-sep {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: .35rem 0 1rem;
}
.ticket-day-sep span {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #6c7a8a;
    background: #eef3f8;
    border: 1px solid #dbe3ee;
    border-radius: 999px;
    padding: .28rem .85rem;
}
.ticket-msg {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    margin-bottom: 1rem;
    position: relative;
}
.ticket-msg-avatar {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .02em;
    color: #fff;
    box-shadow: 0 2px 8px rgba(15, 34, 58, .12);
}
.ticket-msg.is-client .ticket-msg-avatar {
    background: linear-gradient(145deg, #64748b, #475569);
}
.ticket-msg.is-staff .ticket-msg-avatar {
    background: linear-gradient(145deg, #2a6bb8, #00388d);
}
.ticket-msg-card {
    flex: 1 1 auto;
    min-width: 0;
    background: #fff;
    border: 1px solid #d7e0ec;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(15, 34, 58, .05);
    overflow: hidden;
}
.ticket-msg.is-staff .ticket-msg-card {
    border-left: 3px solid #00388d;
}
.ticket-msg.is-client .ticket-msg-card {
    border-left: 3px solid #94a3b8;
}
.ticket-msg.is-first .ticket-msg-card {
    box-shadow: 0 4px 16px rgba(0, 56, 141, .08);
}
.ticket-msg-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
    padding: .7rem .95rem .55rem;
    background: #f8fafc;
    border-bottom: 1px solid #eef2f7;
}
.ticket-msg.is-staff .ticket-msg-head {
    background: #f3f7fc;
}
.ticket-msg-who {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .4rem;
    min-width: 0;
}
.ticket-msg-who strong {
    font-size: .88rem;
    color: #1a2332;
}
.ticket-msg-role,
.ticket-msg-flag {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: .15rem .5rem;
}
.ticket-msg-role {
    background: #eef2f6;
    color: #5b6b7a;
}
.ticket-msg.is-staff .ticket-msg-role {
    background: #e8eef8;
    color: #00388d;
}
.ticket-msg-flag {
    background: #e6f5ee;
    color: #008d4c;
}
.ticket-msg-meta {
    display: flex;
    align-items: center;
    gap: .65rem;
    color: #7a8896;
    font-size: .78rem;
    white-space: nowrap;
}
.ticket-msg-edit {
    font-size: .75rem;
    font-weight: 600;
    color: #00388d;
    text-decoration: none;
}
.ticket-msg-edit:hover {
    text-decoration: underline;
}
.ticket-msg-body {
    padding: .9rem 1rem 1rem;
    font-size: .9rem;
    line-height: 1.55;
    color: #243040;
    word-wrap: break-word;
}
.ticket-msg-body p {
    margin: 0 0 .65rem;
}
.ticket-msg-body p:last-child {
    margin-bottom: 0;
}
.ticket-msg-body ul,
.ticket-msg-body ol {
    margin: 0 0 .65rem;
    padding-left: 1.25rem;
}
.ticket-msg-body a {
    color: #00388d !important;
}
.ticket-msg-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}
.ticket-msg-files {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    padding: 0 1rem 1rem;
}
.ticket-file {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    max-width: 100%;
    padding: .28rem .65rem;
    border-radius: 999px;
    background: #f3f6f9;
    border: 1px solid #dbe3ee;
    color: #1a2332 !important;
    font-size: .75rem;
    font-weight: 600;
    text-decoration: none !important;
}
.ticket-file:hover {
    background: #e8eef8;
    border-color: #c5d4ea;
    color: #00388d !important;
}
.ticket-file i {
    color: #00388d;
}
.ticket-file span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 16rem;
}
@media (max-width: 1199.98px) {
    .ticket-view-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 767.98px) {
    .ticket-view-meta {
        grid-template-columns: 1fr;
    }
    .ticket-msg-head {
        align-items: flex-start;
    }
}

/* Ticket reply modal */
@media (min-width: 1200px) {
    #modal .modal-dialog.modal-xl {
        max-width: 1100px;
        width: calc(100% - 2.5rem);
    }
}
#modal .modal-dialog.modal-xl .modal-content {
    border: 0;
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(15, 34, 58, .18);
}
#modal .modal-dialog.modal-xl .modal-header {
    padding: 1rem 1.35rem;
    border-bottom: 1px solid #e8eef5;
}
#modal .modal-dialog.modal-xl .modal-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #00388d;
}
#modal .modal-dialog.modal-xl .modal-body {
    padding: 1.15rem 1.35rem 1.25rem;
}
.ticket-reply-form,
.ticket-template-form {
    padding: 0;
}
.ticket-reply-form .form-group,
.ticket-template-form .form-group {
    margin-bottom: 0;
}
.ticket-reply-form .mce-tinymce,
.ticket-template-form .mce-tinymce,
.mail-form .mce-tinymce,
.mail-sended-form .mce-tinymce {
    border-radius: 8px !important;
    overflow: hidden;
    border: 1px solid #d7e0ec !important;
    box-shadow: none !important;
}
.ticket-reply-form .file-input,
.ticket-template-form .file-input {
    margin-bottom: 0;
}
.ticket-reply-lead {
    margin: 0 0 1.15rem;
    padding: .75rem .95rem;
    background: #f3f7fc;
    border: 1px solid #d7e4f4;
    border-radius: 10px;
    color: #3d4d5c;
    font-size: .86rem;
    line-height: 1.45;
}
.ticket-reply-section {
    margin-bottom: 1.15rem;
}
.ticket-reply-section-label {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: #00388d;
    margin-bottom: .35rem;
}
.ticket-reply-section-label i {
    font-size: 1rem;
}
.ticket-reply-hint {
    margin: 0 0 .45rem;
    font-size: .78rem;
    color: #7a8896;
}
.ticket-reply-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: .55rem;
    margin-top: .35rem;
    padding-top: 1rem;
    border-top: 1px solid #e8eef5;
}
.ticket-reply-footer .btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    min-width: 8.5rem;
    justify-content: center;
    font-weight: 600;
    border-radius: 8px;
    padding: .5rem 1.05rem;
}

/* Mail template form */
.mail-page-subtitle {
    margin: .2rem 0 0;
    font-size: .82rem;
    color: #6b7c8d;
    font-weight: 500;
}
.mail-form-block {
    margin-bottom: 1.35rem;
    padding: 1rem 1.1rem 1.05rem;
    background: #fff;
    border: 1px solid #e8eef5;
    border-radius: 12px;
}
.mail-form-block-title {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin: 0 0 .85rem;
    padding-bottom: .65rem;
    border-bottom: 1px solid #eef3f8;
    font-size: .92rem;
    font-weight: 700;
    color: #0f223a;
}
.mail-form-block-title i {
    color: #00388d;
    font-size: 1.1rem;
}
.mail-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1.1rem;
}
.mail-form-grid-3 {
    grid-template-columns: 1fr 1fr 1.2fr;
}
.mail-form .ticket-reply-section {
    margin-bottom: .85rem;
}
.ticket-form {
    padding-bottom: 5rem;
}
.ticket-form .ticket-reply-footer {
    position: fixed;
    z-index: 1005;
    left: var(--vz-vertical-menu-width, 270px);
    right: 0;
    bottom: 0;
    margin: 0;
    padding: .85rem 1.5rem;
    background: #fff;
    border-top: 1px solid #e8eef5;
    border-radius: 0;
    box-shadow: 0 -6px 18px rgba(15, 34, 58, .08);
}
html[data-sidebar-size="sm"] .ticket-form .ticket-reply-footer,
html[data-sidebar-size="sm-hover"] .ticket-form .ticket-reply-footer {
    left: var(--vz-vertical-menu-width-sm, 70px);
}
@media (max-width: 767.98px) {
    .ticket-form .ticket-reply-footer {
        left: 0;
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
.ticket-form.mail-form .form-group {
    margin-bottom: 0;
}
.ticket-form.mail-form .mce-tinymce {
    border-radius: 8px !important;
    overflow: hidden;
    border: 1px solid #d7e0ec !important;
    box-shadow: none !important;
}
.mail-placeholder-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin: 0 0 .7rem;
    padding: .65rem .7rem;
    background: #f6f9fc;
    border: 1px dashed #d5e1ef;
    border-radius: 10px;
}
.mail-placeholder-chip {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(0, 56, 141, .16);
    background: #fff;
    color: #00388d;
    border-radius: 999px;
    padding: .22rem .7rem;
    font-size: .74rem;
    font-weight: 650;
    line-height: 1.3;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.mail-placeholder-chip:hover {
    background: #00388d;
    color: #fff;
    border-color: #00388d;
    box-shadow: 0 3px 10px rgba(0, 56, 141, .18);
}
@media (max-width: 991px) {
    .mail-form-grid,
    .mail-form-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* DID config form */
.dids-mor-form .form-group,
.dids-mor-form .mb-3,
.dids-mor-form .mb-0 {
    margin-bottom: 0 !important;
}
.dids-mor-form .help-block,
.dids-mor-form .invalid-feedback {
    margin-top: .25rem;
}
.did-config-note {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin: 0 0 1rem;
    padding: .65rem .85rem;
    background: #fff8e8;
    border: 1px solid #f3e0b5;
    border-radius: 8px;
    color: #8a6d1b;
    font-size: .84rem;
}
.did-config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .95rem 1.35rem;
    align-items: start;
}
.did-config-field {
    min-width: 0;
}
.did-config-label {
    display: block;
    margin-bottom: .35rem;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: #00388d;
}
.did-config-help {
    margin-top: .3rem;
    font-size: .75rem;
    color: #7a8896;
}
.did-config-span {
    grid-column: 1 / -1;
}
.did-field-with-actions {
    display: flex;
    align-items: center;
    gap: .45rem;
}
.did-field-with-actions-input {
    flex: 1 1 auto;
    min-width: 0;
}
.did-field-with-actions-input .select2-container {
    width: 100% !important;
}
.did-field-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 8px;
}
.did-field-action i {
    font-size: 1.05rem;
    margin: 0;
}
.did-copy-group .form-control,
.dids-mor-form .form-control {
    min-height: 38px;
}
.did-copy-group .btn {
    width: 38px;
    min-height: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.dids-mor-form .select2-container .select2-selection--single {
    min-height: 38px !important;
    border-radius: 8px !important;
    border-color: #c5d0e0;
}
.dids-mor-form .select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 36px !important;
    padding-left: .75rem;
}
.dids-mor-form .select2-container .select2-selection--single .select2-selection__arrow {
    height: 36px !important;
}
.did-readonly-value {
    min-height: 38px;
    display: flex;
    align-items: center;
    padding: 0 .75rem;
    background: #f6f9fc;
    border: 1px solid #e8eef5;
    border-radius: 8px;
    font-weight: 700;
    color: #0f223a;
}
.did-dbu-pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    min-height: 32px;
    padding: .2rem .75rem;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 700;
}
.did-dbu-pill.is-ok {
    background: #e6f5ee;
    color: #008d4c;
}
.did-dbu-pill.is-ko {
    background: #fbecea;
    color: #dd4b39;
}
.did-config-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: .55rem;
    margin-top: 1.15rem;
    padding-top: 1rem;
    border-top: 1px solid #e8eef5;
}
.did-config-footer .btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    min-width: 7.5rem;
    justify-content: center;
    font-weight: 600;
    border-radius: 8px;
    padding: .5rem 1.05rem;
}
.dids-mor-update .list-toolbar .box-title {
    font-family: inherit;
}
@media (max-width: 991px) {
    .did-config-grid {
        grid-template-columns: 1fr;
    }
}

/* Mail template index */
.mail-index table.table td,
.sms-template-index table.table td {
    padding: .42rem .7rem;
    vertical-align: middle;
    font-size: .82rem;
}
.mail-index table.table th,
.sms-template-index table.table th {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
}
.mail-tpl-name {
    font-weight: 700;
    color: #0f223a;
    line-height: 1.3;
}
.mail-tpl-subject {
    margin-top: .12rem;
    font-size: .76rem;
    color: #6b7c8d;
    line-height: 1.35;
    max-width: 38rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mail-cat-badge {
    display: inline-flex;
    align-items: center;
    padding: .18rem .55rem;
    border-radius: 999px;
    background: #eef3fa;
    color: #00388d;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1.3;
}
.mail-sends-count {
    display: inline-flex;
    min-width: 1.7rem;
    justify-content: center;
    padding: .12rem .45rem;
    border-radius: 999px;
    background: #f3f6f9;
    color: #0f223a !important;
    font-weight: 700;
    font-size: .78rem;
    text-decoration: none !important;
}
.mail-sends-count:hover {
    background: #00388d;
    color: #fff !important;
}
.mail-nc-toggle {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    padding: .16rem .5rem;
    border-radius: 999px;
    background: #f3f6f9;
    color: #7a8896 !important;
    font-size: .7rem;
    font-weight: 700;
    text-decoration: none !important;
    white-space: nowrap;
}
.mail-nc-toggle i {
    font-size: .95rem;
}
.mail-nc-toggle.is-on {
    background: #e6f5ee;
    color: #008d4c !important;
}
.mail-nc-toggle:hover {
    background: #00388d;
    color: #fff !important;
}

.mail-options-index table.table td {
    padding: .42rem .7rem;
    vertical-align: middle;
    font-size: .82rem;
}
.mail-options-index table.table th {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
}

/* Mail sended index + preview modal */
.mail-sended-index table.table td {
    padding: .42rem .7rem;
    vertical-align: middle;
    font-size: .82rem;
}
.mail-sended-index table.table th {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
}
.mail-sended-index .mv-dt,
.sms-template-index .mv-dt {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
    white-space: nowrap;
}
.mail-sended-index .mv-dt-date,
.sms-template-index .mv-dt-date {
    font-weight: 600;
}
.mail-sended-index .mv-dt-time,
.sms-template-index .mv-dt-time {
    color: #6c757d;
    font-size: .7rem;
}
.mail-sended-open {
    display: block;
    color: inherit !important;
    text-decoration: none !important;
}
.mail-sended-open:hover .mail-tpl-name {
    color: #00388d;
}
.mail-status-badge {
    display: inline-flex;
    align-items: center;
    padding: .16rem .55rem;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
}
.mail-status-badge.is-queue {
    background: #fef5e6;
    color: #b9770e;
}
.mail-status-badge.is-sent {
    background: #e6f5ee;
    color: #008d4c;
}
.mail-status-badge.is-error {
    background: #fbecea;
    color: #dd4b39;
}
.mail-status-badge.is-pending {
    background: #e8eef8;
    color: #00388d;
}
.mail-status-when,
.mail-sended-meta-hint {
    margin-top: .15rem;
    font-size: .7rem;
    color: #7a8896;
}
.mail-error-text {
    color: #dd4b39;
    font-size: .76rem;
}
.mail-sended-view-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}
.mail-sended-view-kicker {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #6c7a8a;
    margin-bottom: .2rem;
}
.mail-sended-view-subject {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f223a;
    line-height: 1.35;
}
.mail-sended-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
    margin-bottom: 1rem;
}
.mail-sended-meta-item {
    background: #f6f9fc;
    border: 1px solid #e8eef5;
    border-radius: 10px;
    padding: .7rem .8rem;
    min-width: 0;
}
.mail-sended-meta-label {
    display: flex;
    align-items: center;
    gap: .3rem;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #7a8896;
    margin-bottom: .3rem;
}
.mail-sended-meta-label i {
    color: #00388d;
    font-size: .95rem;
}
.mail-sended-meta-value {
    font-size: .84rem;
    color: #0f223a;
    line-height: 1.35;
    word-break: break-word;
}
.mail-sended-error {
    display: flex;
    align-items: flex-start;
    gap: .45rem;
    margin-bottom: .9rem;
    padding: .7rem .85rem;
    background: #fdf2f0;
    border: 1px solid #f5d0cb;
    border-radius: 10px;
    color: #c0392b;
    font-size: .82rem;
}
.mail-sended-attach {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .9rem;
    padding: .65rem .8rem;
    background: #f6f9fc;
    border: 1px dashed #d5e1ef;
    border-radius: 10px;
}
.mail-sended-attach-name {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-weight: 600;
    color: #0f223a;
}
.mail-sended-attach-actions {
    display: inline-flex;
    gap: .35rem;
}
.mail-sended-preview {
    max-height: 420px;
    overflow: auto;
    padding: 1rem 1.1rem;
    background: #fff;
    border: 1px solid #e8eef5;
    border-radius: 12px;
    font-size: .88rem;
    line-height: 1.5;
}
.sms-sended-preview {
    font-size: .9rem;
}
@media (max-width: 991px) {
    .mail-sended-meta {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 767px) {
    .mail-sended-meta,
    .mail-sended-view-head {
        grid-template-columns: 1fr;
        flex-direction: column;
    }
}

/* Contatti index */
.contatti-index .btn-toolbar-action.is-filtered {
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55);
}
.contatti-index table.table td {
    padding: .18rem .4rem;
    vertical-align: middle;
    font-size: .82rem;
    line-height: 1.2;
}
.contatti-index table.table th {
    padding: .28rem .4rem;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
}
.contatti-inline {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .1rem .35rem;
    line-height: 1.2;
}
.contatti-sep {
    color: #c5ced6;
    font-weight: 400;
}
.contatti-ellipsis {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}
.contatti-col-main { max-width: 220px; }
.contatti-col-recapiti { max-width: 280px; }
.contatti-col-addr { max-width: 200px; }
.contatti-col-note { max-width: 180px; }
.contatti-col-dates { max-width: 210px; white-space: nowrap; }
.contatti-col-stato { white-space: nowrap; }
.contatti-name {
    font-weight: 700;
    color: #0f223a;
}
.contatti-company {
    font-size: .72rem;
    color: #6b7c8d;
}
.contatti-cat {
    font-size: .68rem;
    color: #4f6b86;
    background: #eef3f8;
    border-radius: 999px;
    padding: .05rem .4rem;
}
.contatti-inline i {
    font-size: .78rem;
    margin-right: .08rem;
    color: #7b8b9a;
}
.contatti-status-badge {
    display: inline-flex;
    align-items: center;
    padding: .08rem .4rem;
    border-radius: 999px;
    color: #fff;
    font-size: .66rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}
.contatti-type-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 999px;
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    line-height: 1;
}
.contatti-index .mv-row-btn {
    width: 1.45rem;
    height: 1.45rem;
    padding: 0;
    gap: 0;
}
.contatti-index .mv-row-btn i {
    font-size: .82rem;
}
.contatti-index .mv-row-actions {
    gap: .18rem;
    flex-wrap: nowrap;
}

/* Homepage new-ticket alert modal */
#newTicketModal .mv-ticket-alert {
    border: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 22px 56px rgba(15, 34, 58, .2);
}
#newTicketModal .modal-header {
    align-items: center;
    padding: 1.15rem 1.35rem .95rem;
    border-bottom: 1px solid #e8eef5;
}
#newTicketModal .modal-title {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 700;
    color: #0f223a;
    line-height: 1.3;
}
#newTicketModal .modal-body {
    padding: 1.15rem 1.35rem 1.05rem;
}
#newTicketModal .modal-footer {
    padding: .9rem 1.35rem 1.15rem;
    border-top: 1px solid #e8eef5;
    gap: .5rem;
}
.mv-ticket-alert-head {
    display: flex;
    align-items: center;
    gap: .85rem;
}
.mv-ticket-alert-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 12px;
    background: #e8eef8;
    color: #00388d;
    flex: 0 0 auto;
}
.mv-ticket-alert-icon i {
    font-size: 1.35rem;
    line-height: 1;
}
.mv-ticket-alert-kicker {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #00388d;
    margin-bottom: .12rem;
}
.mv-ticket-alert-text {
    margin: 0 0 .45rem;
    font-size: .95rem;
    color: #0f223a;
    line-height: 1.45;
}
.mv-ticket-alert-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.7rem;
    padding: .05rem .45rem;
    margin: 0 .15rem;
    border-radius: 999px;
    background: #00388d;
    color: #fff;
    font-weight: 700;
    font-size: .88rem;
    line-height: 1.4;
}
.mv-ticket-alert-hint {
    font-size: .84rem;
    color: #6b7c8d;
    line-height: 1.4;
}
#newTicketModal .modal-footer .btn-primary i {
    margin-right: .3rem;
}

/* Orders index */
.orders-index table.table td {
    padding: .42rem .7rem;
    vertical-align: middle;
    font-size: .82rem;
}
.orders-index table.table th {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
}
.orders-index .mv-dt {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
    white-space: nowrap;
}
.orders-index .mv-dt-date {
    font-weight: 600;
}
.orders-code-link {
    display: inline-flex;
    align-items: center;
    gap: .15rem;
    font-weight: 700;
    color: #00388d !important;
    text-decoration: none !important;
    white-space: nowrap;
}
.orders-code-link:hover {
    color: #002a6b !important;
}
.orders-code-link i {
    font-size: 1rem;
    line-height: 1;
}
.orders-desc {
    max-width: 28rem;
    line-height: 1.35;
    color: #0f223a;
}
.orders-total {
    font-weight: 700;
    color: #0f223a;
    white-space: nowrap;
}
.orders-type-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.55rem;
    padding: .1rem .4rem;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 700;
    line-height: 1.2;
}
.orders-type-pill.is-ut {
    background: #e8eef8;
    color: #00388d;
}
.orders-type-pill.is-canone {
    background: #fef5e6;
    color: #b9770e;
}
.orders-status-links {
    margin-top: .35rem;
    justify-content: flex-start;
}
.orders-bulk-bar {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}
.orders-bulk-bar.is-bulk-hidden {
    display: none !important;
}
.orders-bulk-select {
    min-width: 220px;
    height: 32px;
    padding: .2rem .6rem;
    border: 1px solid #d7e0ec;
    border-radius: 8px;
    font-size: .78rem;
    color: #0f223a;
    background: #fff;
}

/* Insoluti index */
.insoluti-index {
    width: 100%;
    max-width: 100%;
}
.insoluti-index .box,
.insoluti-index .box-body {
    overflow: visible;
    max-width: 100%;
}
.insoluti-index .kv-grid-container,
.insoluti-grid-wrap {
    overflow-x: auto !important;
    width: 100%;
    max-width: 100%;
}
.insoluti-index table.table {
    width: 100%;
    margin-bottom: 0;
}
.insoluti-index table.table td {
    padding: .42rem .7rem;
    vertical-align: middle;
    font-size: .82rem;
}
.insoluti-index table.table th {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
}
.insoluti-index .orders-bulk-select {
    min-width: 260px;
    max-width: 340px;
}
.insoluti-user {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    white-space: nowrap;
}
.insoluti-flag {
    font-size: .95rem;
    line-height: 1;
}
.insoluti-flag.is-on { color: #008d4c; }
.insoluti-flag.is-off { color: #dd4b39; }
.insoluti-flag.is-muted { color: #c5ced6; }
.insoluti-balance {
    font-weight: 700;
    white-space: nowrap;
    color: #0f223a;
}
.insoluti-balance.is-neg {
    color: #dd4b39;
}
.insoluti-index .charCircle {
    width: 1.55rem;
    height: 1.55rem;
    padding: 0;
    font-size: .72rem;
    line-height: 1.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Gestione RID */
.rid-index {
    width: 100%;
    max-width: 100%;
}
.rid-index .box,
.rid-index .box-body {
    overflow: visible;
    max-width: 100%;
}
.rid-index table.table td {
    padding: .42rem .7rem;
    vertical-align: middle;
    font-size: .82rem;
}
.rid-index table.table th {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
}
.rid-index .mv-dt {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
    white-space: nowrap;
}
.rid-index .mv-dt-date {
    font-weight: 600;
}

/* Fatture index */
.invoices-index {
    width: 100%;
    max-width: 100%;
}
.invoices-index .box,
.invoices-index .box-body {
    overflow: visible;
    max-width: 100%;
}
.invoices-index table.table td,
.invoices-index .orders-code-link,
.invoices-index .orders-total,
.invoices-index .mail-tpl-name {
    font-size: .82rem;
}
.invoices-index table.table th {
    font-size: .75rem;
}
.invoices-index table.table td {
    padding: .55rem .75rem;
    vertical-align: middle;
}
.invoices-index table.table th {
    font-weight: 700;
    letter-spacing: .01em;
    white-space: nowrap;
}
.invoices-index .mv-dt {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
    white-space: nowrap;
}
.invoices-index .mv-dt-date {
    font-weight: 600;
}
.invoices-index .orders-bulk-bar .select2-container {
    min-width: 240px;
    width: 240px !important;
}
.invoices-index .mv-row-actions {
    align-items: center;
}
.invoices-index .ec-invoice-link {
    gap: .55rem;
    padding: .15rem 0;
}
.invoices-index .ec-doc-num,
.invoices-index .ec-doc-meta {
    font-size: .82rem;
    font-weight: 600;
    color: #1a2332;
}
.invoices-index .ec-doc-meta {
    font-weight: 500;
    color: #5c6b7a;
}
.invoices-index .ec-doc-action {
    font-size: .8125rem;
    letter-spacing: .03em;
    padding: .28rem .6rem;
}
.invoices-index .mv-advanced-search {
    background: #fff;
    border: 1px solid #e6ebf2;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 34, 58, .04);
}
.invoices-search .form-group {
    margin-bottom: 0;
}
.invoices-search-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 0 1rem;
}
.invoices-search-client {
    margin-top: .85rem;
}
.invoices-search .ticket-reply-section-label,
.invoices-search .form-control,
.invoices-search .select2-container .select2-selection__rendered,
.invoices-search .btn,
.invoices-search .mv-advanced-search-hint {
    font-size: .9375rem;
}
.invoices-search-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: .55rem;
    margin-top: 1rem;
    padding-top: .9rem;
    border-top: 1px solid #e8eef5;
}
.invoices-search-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    min-width: 7.5rem;
    justify-content: center;
    font-weight: 600;
    border-radius: 8px;
}
@media (max-width: 767.98px) {
    .invoices-search-grid {
        grid-template-columns: 1fr;
    }
}

/* Contratti index */
.contracts-index {
    width: 100%;
    max-width: 100%;
}
.contracts-index .box,
.contracts-index .box-body {
    overflow: visible;
    max-width: 100%;
}
.contracts-index table.table td,
.contracts-index .orders-code-link,
.contracts-index .mail-tpl-name {
    font-size: .82rem;
}
.contracts-index table.table th {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .01em;
    white-space: nowrap;
}
.contracts-index table.table td {
    padding: .5rem .7rem;
    vertical-align: middle;
}
.contracts-index .mv-dt {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
    white-space: nowrap;
}
.contracts-index .mv-dt-date {
    font-weight: 600;
}
.contracts-index .mv-row-actions {
    flex-wrap: nowrap;
    justify-content: flex-end;
}
.contracts-index .mv-row-actions .mv-row-btn {
    width: 1.85rem;
    height: 1.85rem;
    padding: 0;
    flex: 0 0 auto;
}
.contracts-index .orders-bulk-bar .select2-container {
    min-width: 220px;
    width: 220px !important;
}
.contracts-search .form-group {
    margin-bottom: 0;
}
.contracts-search-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1rem;
}
.contracts-search-wide {
    margin-top: .85rem;
}
.contracts-search .ticket-reply-section-label,
.contracts-search .form-control,
.contracts-search .select2-container .select2-selection__rendered,
.contracts-search .btn,
.contracts-search .mv-advanced-search-hint {
    font-size: .9375rem;
}
.contracts-search-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: .55rem;
    margin-top: 1rem;
    padding-top: .9rem;
    border-top: 1px solid #e8eef5;
}
.contracts-search-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    min-width: 7.5rem;
    justify-content: center;
    font-weight: 600;
    border-radius: 8px;
}
.contracts-index .mv-advanced-search {
    background: #fff;
    border: 1px solid #e6ebf2;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 34, 58, .04);
}
@media (max-width: 767.98px) {
    .contracts-search-grid {
        grid-template-columns: 1fr;
    }
}

/* Bollettini index */
.bollettini-index {
    width: 100%;
    max-width: 100%;
}
.bollettini-index .box,
.bollettini-index .box-body {
    overflow: visible;
    max-width: 100%;
}
.bollettini-index table.table td {
    padding: .42rem .7rem;
    vertical-align: middle;
    font-size: .82rem;
}
.bollettini-index table.table th {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
}
.bollettini-index .mv-dt {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
    white-space: nowrap;
}
.bollettini-index .mv-dt-date {
    font-weight: 600;
}
.bollettini-index .orders-bulk-bar .select2-container {
    min-width: 260px;
    width: 260px !important;
}
.bollettini-index .mv-row-actions {
    flex-wrap: nowrap;
    justify-content: center;
    white-space: nowrap;
}
.bollettini-index .mv-row-actions .mv-row-btn {
    width: 1.85rem;
    height: 1.85rem;
    padding: 0;
    flex: 0 0 auto;
}
.bollettini-index .bollettini-mail-sent,
.invoices-index .bollettini-mail-sent {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 999px;
    color: #008d4c;
    background: #e6f5ee;
    border: 1px solid rgba(0, 141, 76, .18);
    font-size: .95rem;
    cursor: default;
    flex-shrink: 0;
}

/* Remind / note utenti */
.profile-note-remind {
    width: 100%;
    max-width: 100%;
}
.profile-note-remind .box,
.profile-note-remind .box-body {
    overflow: visible;
    max-width: 100%;
}
.profile-note-remind table.table td {
    padding: .5rem .75rem;
    vertical-align: top;
    font-size: .82rem;
}
.profile-note-remind table.table th {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
    vertical-align: middle;
}
.profile-note-remind .mv-dt {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
    white-space: nowrap;
    margin-top: .2rem;
}
.profile-note-remind .mv-dt-date {
    font-weight: 600;
}
.profile-note-remind .mv-dt-time {
    color: #6c757d;
    font-size: .7rem;
}
.profile-note-remind .remind-note-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    color: #3d4d5c;
    max-width: 28rem;
    white-space: normal;
}
.profile-note-remind .remind-phone {
    display: flex;
    align-items: center;
    gap: .28rem;
    color: #00388d;
    font-weight: 600;
    font-size: .78rem;
    text-decoration: none !important;
    white-space: nowrap;
    line-height: 1.45;
}
.profile-note-remind .remind-phone + .remind-phone {
    margin-top: .12rem;
}
.profile-note-remind .remind-phone:hover {
    color: #002a6b;
}
.profile-note-remind .remind-phone i {
    font-size: .9rem;
}
.profile-note-remind .remind-row-overdue > td {
    background: #fff8f7;
}
.profile-note-remind .mail-status-badge + .mv-dt {
    margin-top: .28rem;
}

/* Promemoria create/update modal */
.promemoria-form-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
    margin: 0 0 1.15rem;
    padding: .85rem .95rem;
    background: #f6f9fc;
    border: 1px solid #e8eef5;
    border-radius: 12px;
}
.promemoria-form-meta-label {
    display: block;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #6c7a8a;
    margin-bottom: .28rem;
}
.promemoria-form-chip {
    display: inline-flex;
    align-items: center;
    padding: .16rem .6rem;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 700;
    color: #fff;
    background: var(--chip-color, #00388d);
}
.promemoria-priorita-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
    gap: .55rem;
}
.promemoria-priorita-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: .18rem;
    margin: 0;
    padding: .8rem .85rem .75rem;
    border: 1px solid #e8eef5;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.promemoria-priorita-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.promemoria-priorita-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(15, 34, 58, .08);
}
.promemoria-priorita-card.is-selected,
.promemoria-priorita-card:has(input:checked) {
    border-color: var(--prio-color, #00388d);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--prio-color, #00388d) 22%, transparent);
    background: #fbfcfe;
}
.promemoria-priorita-dot {
    width: .7rem;
    height: .7rem;
    border-radius: 50%;
    background: var(--prio-color, #00388d);
    margin-bottom: .15rem;
}
.promemoria-priorita-name {
    font-size: .86rem;
    font-weight: 700;
    color: #0f223a;
    line-height: 1.25;
}
.promemoria-priorita-time {
    font-size: .74rem;
    color: #6b7c8d;
    font-weight: 500;
}
.promemoria-scadenza-preview {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin: .7rem 0 0;
    padding: .55rem .75rem;
    background: #e8eef8;
    border-radius: 8px;
    color: #00388d;
    font-size: .8rem;
    font-weight: 600;
}
.promemoria-scadenza-preview[hidden] {
    display: none !important;
}
.promemoria-scadenza-preview i {
    font-size: 1rem;
}
@media (max-width: 575px) {
    .promemoria-form-meta,
    .promemoria-priorita-grid {
        grid-template-columns: 1fr;
    }
}

/* Event version history */
.event-superseded-alert {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem .7rem;
    margin: 0;
    padding: .45rem .7rem;
    background: #fef5e6;
    border: 1px solid rgba(243, 156, 18, .25);
    border-radius: 8px;
    color: #7a5b12;
    font-size: .78rem;
}
.event-superseded-alert a {
    font-weight: 700;
    color: #00388d;
}
.event-version-history {
    margin: .45rem 0 0;
    padding: .5rem .65rem;
    background: #f6f9fc;
    border: 1px solid #e8eef5;
    border-radius: 8px;
}
.event-version-history-title {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: #00388d;
    margin-bottom: .35rem;
}
.event-version-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .25rem;
}
.event-version-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .3rem .65rem;
    padding: .32rem .5rem;
    background: #fff;
    border: 1px solid #e8eef5;
    border-radius: 8px;
}
.event-version-item.is-open {
    box-shadow: 0 0 0 2px rgba(0, 56, 141, .12);
}
.event-version-meta {
    display: flex;
    align-items: center;
    gap: .4rem;
}
.event-version-id {
    font-weight: 700;
    color: #0f223a;
}
.event-version-badge {
    display: inline-flex;
    padding: .12rem .5rem;
    border-radius: 999px;
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
}
.event-version-replaced,
.event-list-replaced {
    display: inline-flex;
    padding: .12rem .5rem;
    border-radius: 999px;
    background: #fef5e6;
    color: #b9770e;
    font-size: .7rem;
    font-weight: 700;
}
.event-version-head {
    display: inline-flex;
    padding: .12rem .5rem;
    border-radius: 999px;
    background: #e6f5ee;
    color: #008d4c;
    font-size: .7rem;
    font-weight: 700;
}
.event-version-when {
    font-size: .8rem;
    color: #3d4d5c;
}
.event-version-open,
.event-list-next {
    margin-left: auto;
    font-size: .76rem;
    font-weight: 700;
    color: #00388d !important;
    text-decoration: none !important;
}
.event-version-open.is-here {
    color: #6c7a8a !important;
    font-weight: 600;
}

/* Event update page */
.events-update > .box {
    margin-bottom: .7rem;
}
.events-update .box-header.list-toolbar {
    padding: .55rem .85rem;
    gap: .45rem;
}
.events-update .event-update-extra {
    padding: .55rem .85rem .65rem;
}
.events-update .event-update-title-wrap {
    flex: 1 1 auto;
    min-width: 180px;
}
.events-update .event-update-title-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
    margin-top: .25rem;
}
.events-update .list-toolbar-actions .btn-toolbar-action {
    padding: .28rem .65rem;
    font-size: .74rem;
}
.event-update-status {
    display: inline-flex;
    align-items: center;
    padding: .16rem .6rem;
    border-radius: 999px;
    color: #fff;
    background: var(--status-color, #00388d);
    font-size: .72rem;
    font-weight: 700;
}
.event-update-chip {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .16rem .55rem;
    border-radius: 999px;
    background: #e8eef8;
    color: #00388d;
    font-size: .72rem;
    font-weight: 700;
}
.event-update-chip.is-muted {
    background: #f3f6f9;
    color: #5d6b78;
}
.event-update-chip.is-urgent {
    background: #fbecea;
    color: #dd4b39;
}
.event-update-chip.is-replaced {
    background: #fef5e6;
    color: #b9770e;
}
.events-form .form-group {
    margin-bottom: 0;
}
.events-form.mail-form .mail-form-block {
    margin-bottom: .7rem;
    padding: .65rem .8rem .55rem;
    border-radius: 10px;
}
.events-form.mail-form .mail-form-block-title {
    margin: 0 0 .45rem;
    padding-bottom: .35rem;
    font-size: .82rem;
}
.events-form.mail-form .ticket-reply-section {
    margin-bottom: .55rem;
}
.events-form.mail-form .ticket-reply-section-label {
    margin-bottom: .18rem;
    font-size: .7rem;
}
.events-form.mail-form .ticket-reply-hint {
    margin: 0 0 .35rem;
    font-size: .72rem;
}
.events-form.mail-form .select2-container .select2-selection--single {
    min-height: 32px;
}
.events-form.mail-form textarea.form-control {
    min-height: 4.2rem;
}
.event-mail-sent {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin: 0 0 .55rem;
    padding: .35rem .6rem;
    background: #e6f5ee;
    border-radius: 8px;
    color: #008d4c;
    font-size: .76rem;
    font-weight: 600;
}
.event-client-contacts {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    margin: 0 0 .55rem;
}
.event-contact-phones {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}
.event-contact-phone,
.event-map-link {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .2rem .55rem;
    border-radius: 999px;
    background: #f3f7fc;
    border: 1px solid #d7e4f4;
    color: #00388d !important;
    font-size: .8rem;
    font-weight: 600;
    text-decoration: none !important;
}
.event-contact-phone:hover,
.event-map-link:hover {
    background: #00388d;
    color: #fff !important;
    border-color: #00388d;
}
.event-inline-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: .45rem;
}
.event-inline-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    border-radius: 8px;
    font-weight: 600;
}
.event-resource-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .65rem;
}
.event-resource-panel {
    border: 1px solid #e8eef5;
    border-radius: 12px;
    background: #fbfcfe;
    overflow: hidden;
}
.event-resource-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .4rem .65rem;
    background: #fff;
    border-bottom: 1px solid #eef3f8;
    font-size: .8rem;
    font-weight: 700;
    color: #0f223a;
}
.event-resource-list {
    padding: .3rem .4rem .45rem;
    max-height: 14rem;
    overflow: auto;
}
.event-resource-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .22rem .4rem;
    border-radius: 8px;
    font-size: .82rem;
}
.event-resource-row:hover {
    background: #fff;
}
.event-resource-row.is-dept {
    font-weight: 700;
    margin-top: .35rem;
}
.event-resource-row.is-nested {
    padding-left: 1rem;
    color: #3d4d5c;
}
.event-resource-empty {
    padding: .7rem .5rem;
    color: #7a8896;
    font-size: .8rem;
}
.event-resource-mini {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.6rem;
    height: 1.6rem;
    padding: 0 .45rem;
    border-radius: 999px;
    background: #e8eef8;
    color: #00388d !important;
    font-size: .72rem;
    font-weight: 700;
    text-decoration: none !important;
    gap: .2rem;
}
.event-resource-mini.is-dept {
    background: #fef5e6;
    color: #b9770e !important;
}
.event-resource-mini.is-remove {
    background: #fbecea;
    color: #dd4b39 !important;
}
.events-form .event-form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: .4rem;
    padding: .5rem .7rem;
    background: #fff;
    border: 1px solid #e8eef5;
    border-radius: 10px;
}
.events-form .event-form-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .3rem;
    min-width: 7.2rem;
    font-weight: 600;
    border-radius: 8px;
    padding: .38rem .8rem;
    font-size: .8rem;
}
.events-form .event-form-actions--sticky {
    position: sticky;
    bottom: .5rem;
    z-index: 40;
    margin-top: .7rem;
    box-shadow: 0 8px 28px rgba(15, 34, 58, .12);
}
@media (max-width: 991px) {
    .event-resource-cols {
        grid-template-columns: 1fr;
    }
}

/* Preventivo / ordine */
.ordine-form .ordine-card {
    margin-bottom: 1rem;
}
.ordine-form .ordine-card .card-header.list-toolbar {
    align-items: flex-start;
}
.ordine-card-subtitle {
    margin-top: .15rem;
    font-size: .8rem;
    color: #6d7f9c;
}
.ordine-head-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .9rem 1rem;
}
.ordine-field--wide {
    grid-column: span 2;
}
.ordine-code-input {
    font-weight: 700;
    letter-spacing: .04em;
    background: #f3f6f9 !important;
}
.ordine-lines-table {
    font-size: .86rem;
}
.ordine-lines-table .ordine-col-code {
    font-weight: 600;
    white-space: nowrap;
}
.ordine-totals {
    max-width: 28rem;
    margin-left: auto;
}
.ordine-totals-row {
    display: flex;
    justify-content: space-between;
    padding: .4rem 0;
    border-bottom: 1px solid #eef2f7;
    color: #495057;
}
.ordine-totals-row--total {
    border-bottom: 0;
    margin-top: .25rem;
    padding-top: .7rem;
    font-size: 1.05rem;
    color: #00388d;
}
.ordine-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-top: 1.1rem;
    justify-content: flex-end;
}
.ordine-form-actions .btn {
    min-width: 10rem;
    font-weight: 600;
}
.ordine-items-form .ordine-items-lead {
    color: #6d7f9c;
    font-size: .86rem;
    margin-bottom: 1rem;
}
.ordine-items-section {
    margin-bottom: 1rem;
}
.ordine-items-section-label {
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #00388d;
    margin-bottom: .55rem;
    display: flex;
    align-items: center;
    gap: .35rem;
}
.ordine-items-grid,
.ordine-items-type-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem 1rem;
    margin-bottom: 1rem;
}
.ordine-items-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
    margin-top: 1.1rem;
    padding-top: .9rem;
    border-top: 1px solid #eef2f7;
}
#modal .ordine-items-form .select2-container {
    width: 100% !important;
}
.ecom-riga-form .form-control,
.ecom-riga-form .select2-container .select2-selection--single {
    min-height: 40px;
    border-radius: 8px !important;
    border-color: #c5d0e0;
}
.ecom-riga-form .select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 38px !important;
    padding-left: .75rem;
}
.ecom-riga-form .select2-container .select2-selection--single .select2-selection__arrow {
    height: 38px !important;
}
.ecom-riga-form .form-label,
.ecom-riga-form .control-label {
    font-weight: 600;
    color: #24344d;
    margin-bottom: .3rem;
}
.ecom-riga-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 1.25rem;
    padding: .85rem 1rem;
    background: #f4f7fb;
    border: 1px solid #e6edf5;
    border-radius: 10px;
}
.ecom-riga-footer .form-check {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0;
    min-height: 0;
}
.ecom-riga-footer .form-check-input {
    margin: 0;
    float: none;
}
.ecom-riga-totals {
    display: flex;
    gap: 1.25rem;
    margin-left: auto;
}
.ecom-riga-totals > div {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.2;
}
.ecom-riga-totals span {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #6d7f9c;
}
.ecom-riga-totals strong {
    color: #00388d;
    font-size: 1.05rem;
}
#modal .select2-container--open .select2-search__field {
    pointer-events: auto;
}
@media (max-width: 991px) {
    .ordine-head-grid,
    .ordine-items-grid,
    .ordine-items-type-row {
        grid-template-columns: 1fr;
    }
    .ordine-field--wide {
        grid-column: auto;
    }
}

.profile-update .profile-form > .row {
    --bs-gutter-x: 1rem;
}
.profile-update .profile-form .box.box-primary,
.profile-update .profile-form .box.box-success,
.profile-update .profile-form .box.box-danger,
.profile-update .profile-form .box.box-warning,
.profile-update .profile-form .box {
    border: 1px solid #e6ebf2;
    border-top: 1px solid #e6ebf2;
    box-shadow: 0 1px 2px rgba(15, 34, 58, .04);
    margin-bottom: .9rem;
}
.profile-update .profile-form .box-header {
    background: #fff;
    padding: .8rem 1.05rem .65rem;
    border-bottom: 1px solid #eef2f7;
}
.profile-update .profile-form .box-title {
    font-size: .92rem;
    font-weight: 700;
    color: #00388d;
}
.profile-update .profile-form .box-body {
    padding: .75rem 1.05rem .9rem;
}
.profile-update .profile-form .box-body > .row {
    align-items: center;
    margin-bottom: .15rem;
}
.profile-update .profile-form .control-label {
    font-size: .78rem;
    font-weight: 600;
    color: #3d4d5c;
    text-align: right;
    margin-bottom: 0;
    padding-top: .4rem;
}
.profile-update .profile-form .form-group {
    margin-bottom: .4rem;
}
.profile-update .profile-form .form-control,
.profile-update .profile-form textarea.form-control {
    border-radius: .45rem;
    border-color: #d7e0ec;
}
.profile-update .profile-form .input-group .btn {
    font-size: .78rem;
    font-weight: 600;
}
.profile-update .nav-tabs-custom {
    background: #fff;
    border: 1px solid #e6ebf2;
    border-radius: 12px;
    margin-bottom: .9rem;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 34, 58, .04);
}
.profile-update .nav-tabs-custom > .nav-tabs {
    display: flex;
    margin: 0;
    border-bottom: 1px solid #e6ebf2;
    background: #f7f9fc;
}
.profile-update .nav-tabs-custom > .nav-tabs > li {
    float: none;
    width: auto !important;
    flex: 1 1 0;
    margin: 0;
}
.profile-update .nav-tabs-custom > .nav-tabs > li > a {
    display: block;
    margin: 0;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent;
    text-align: center;
    color: #5c6b7a;
}
.profile-update .nav-tabs-custom > .nav-tabs > li > a h5 {
    margin: 0;
    font-size: .8rem;
    font-weight: 700;
}
.profile-update .nav-tabs-custom > .nav-tabs > li.active > a,
.profile-update .nav-tabs-custom > .nav-tabs > li.active > a:hover,
.profile-update .nav-tabs-custom > .nav-tabs > li.active > a:focus {
    color: #00388d;
    background: #fff;
    box-shadow: inset 0 -2px 0 #00388d;
}
.profile-update .nav-tabs-custom > .tab-content {
    padding: .85rem 1rem .35rem;
}
.profile-update .badge.bg-blue {
    background: #e8eef8 !important;
    color: #00388d !important;
    font-weight: 600;
    border-radius: 999px;
    padding: .3rem .6rem;
}
@media (max-width: 991px) {
    .profile-update .profile-form .control-label {
        text-align: left;
        padding-top: 0;
    }
}

.docs-index .doc-type-name {
    font-weight: 650;
    color: #0f223a;
}
.docs-index .doc-file {
    padding: .45rem 0;
    border-bottom: 1px solid #eef2f7;
}
.docs-index .doc-file:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}
.docs-index .doc-file:first-child {
    padding-top: 0;
}
.docs-index .doc-file-main {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem .45rem;
}
.docs-index .doc-file-name {
    font-weight: 650;
    color: #00388d;
    text-decoration: none;
}
.docs-index .doc-file-name:hover {
    text-decoration: underline;
}
.docs-index .doc-file-remove {
    color: #dd4b39;
    line-height: 1;
}
.docs-index .doc-file-note {
    margin-top: .2rem;
    color: #dd4b39;
    font-size: .78rem;
}
.docs-index .doc-file-meta,
.docs-index .doc-file-empty {
    margin-top: .15rem;
    color: #5c6b7a;
    font-size: .78rem;
}
.docs-index .doc-file-empty .btn {
    margin-left: .35rem;
}

.disdette-index .disdette-search-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem 1rem;
}
.disdette-index .disdette-search-actions {
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
    margin-top: .35rem;
}
.disdette-index .disdette-id {
    font-weight: 700;
    color: #00388d;
    text-decoration: none;
}
.disdette-index .disdette-cats {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
}
.disdette-index .disdette-services-title {
    margin-bottom: .35rem;
    font-size: .78rem;
    font-weight: 700;
    color: #00388d;
}
.disdette-index .disdette-state,
.disdette-index .disdette-appt {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .1rem;
    padding: .28rem .55rem;
    border-radius: .55rem;
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    line-height: 1.25;
}
.disdette-index .disdette-progress {
    height: 4px;
    margin-top: .35rem;
    border-radius: 999px;
    background: #e6ebf2;
    overflow: hidden;
}
.disdette-index .disdette-progress > span {
    display: block;
    height: 100%;
    border-radius: 999px;
}
.disdette-index .disdette-progress > span.is-low { background: #dd4b39; }
.disdette-index .disdette-progress > span.is-mid { background: #f39c12; }
.disdette-index .disdette-progress > span.is-done { background: #008d4c; }
.disdette-index .disdette-mails {
    display: inline-flex;
    gap: .35rem;
}
.disdette-index .disdette-mail {
    font-size: 1.05rem;
}
.disdette-index .disdette-mail.is-sent { color: #008d4c; }
.disdette-index .disdette-mail.is-wait { color: #dd4b39; }
@media (max-width: 991px) {
    .disdette-index .disdette-search-grid {
        grid-template-columns: 1fr;
    }
}
.profile-form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: .6rem;
    margin-top: 1rem;
    padding: .85rem 1rem;
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 10px;
}
.profile-form-actions .btn {
    min-width: 8rem;
    font-weight: 600;
}
.profile-form-actions--sticky {
    position: sticky;
    bottom: .6rem;
    z-index: 40;
    box-shadow: 0 8px 28px rgba(15, 34, 58, .12);
}

.portability-status-form .portability-status-lead {
    color: #6d7f9c;
    font-size: .86rem;
    margin: 0 0 1rem;
}
.portability-status-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: .75rem 1rem;
    margin-bottom: 1rem;
    padding: .85rem 1rem;
    background: #f3f6f9;
    border-radius: 10px;
}
.portability-status-meta-label {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #6d7f9c;
    margin-bottom: .15rem;
}
.portability-status-meta-value {
    font-weight: 600;
    color: #1a2332;
    word-break: break-word;
}
.portability-status-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
    margin-top: 1.15rem;
    padding-top: .9rem;
    border-top: 1px solid #eef2f7;
}
.portability-status-form-actions .btn {
    min-width: 7.5rem;
    font-weight: 600;
}
#modal .portability-status-form .select2-container {
    width: 100% !important;
}

/* Attività commerciale modal form */
.attivita-commerciale-form .mail-form-block {
    margin-bottom: 1rem;
    padding: .9rem 1rem .8rem;
}
.attivita-commerciale-form .mail-form-block-title {
    margin-bottom: .75rem;
    padding-bottom: .5rem;
    font-size: .86rem;
}
.attivita-commerciale-form .mail-form-block .ticket-reply-section {
    margin-bottom: .75rem;
}
.attivita-commerciale-form .mail-form-block .ticket-reply-section:last-child {
    margin-bottom: 0;
}
.attivita-commerciale-form .form-control,
.attivita-commerciale-form .select2-container .select2-selection--single {
    min-height: 40px;
    border-radius: 8px !important;
    border-color: #c5d0e0;
}
.attivita-commerciale-form textarea.form-control {
    min-height: 6.5rem;
    resize: vertical;
}
.attivita-commerciale-form .select2-container {
    width: 100% !important;
}
#modal .modal-content .select2-dropdown,
#modal .modal-content .select2-container--open {
    z-index: 2060 !important;
}
.attivita-commerciale-form .select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 38px !important;
    padding-left: .75rem;
}
.attivita-commerciale-form .select2-container .select2-selection--single .select2-selection__arrow {
    height: 38px !important;
}
.attivita-commerciale-form .has-error .form-control,
.attivita-commerciale-form .has-error .select2-container .select2-selection--single {
    border-color: #dc3545;
}
.ac-req {
    color: #c0392b;
    font-weight: 700;
}
.ac-tipo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: .5rem;
    margin-bottom: .35rem;
}
.ac-tipo-card {
    display: block;
    margin: 0;
    cursor: pointer;
}
.ac-tipo-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.ac-tipo-card-body {
    display: flex;
    align-items: center;
    gap: .4rem;
    min-height: 2.55rem;
    padding: .45rem .7rem;
    border: 1px solid #d7e0ec;
    border-radius: 10px;
    background: #fff;
    color: #2c3a4a;
    font-size: .82rem;
    font-weight: 600;
    line-height: 1.25;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease, color .15s ease;
}
.ac-tipo-card-body i {
    font-size: 1.05rem;
    color: #8aa0b8;
}
.ac-tipo-card-body .ac-tipo-on {
    display: none;
}
.ac-tipo-card:hover .ac-tipo-card-body {
    border-color: #9bb6d8;
    background: #f6f9fc;
}
.ac-tipo-card:has(input:checked) .ac-tipo-card-body,
.ac-tipo-card input:checked + .ac-tipo-card-body {
    border-color: #00388d;
    background: #eef4fb;
    color: #00388d;
    box-shadow: 0 0 0 3px rgba(0, 56, 141, .08);
}
.ac-tipo-card:has(input:checked) .ac-tipo-off,
.ac-tipo-card input:checked + .ac-tipo-card-body .ac-tipo-off {
    display: none;
}
.ac-tipo-card:has(input:checked) .ac-tipo-on,
.ac-tipo-card input:checked + .ac-tipo-card-body .ac-tipo-on {
    display: inline-block;
    color: #00388d;
}
.ac-tipo-error:empty {
    display: none;
}
.ac-file-box {
    display: flex;
    align-items: center;
    gap: .45rem;
    min-height: 2.55rem;
    padding: .45rem .8rem;
    border: 1px dashed #c5d4e6;
    border-radius: 10px;
    background: #f7fafc;
    color: #00388d;
    font-size: .84rem;
    font-weight: 600;
    cursor: pointer;
    margin: 0;
}
.ac-file-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ac-file-box input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.ac-file-box:hover {
    border-color: #00388d;
    background: #eef4fb;
}
.ac-file-list {
    list-style: none;
    margin: .55rem 0 0;
    padding: 0;
}
.ac-file-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .3rem 0;
    font-size: .82rem;
}
.ac-file-list a {
    color: #00388d;
}
.ac-file-del {
    color: #c0392b;
    padding: .15rem;
}
@media (max-width: 767px) {
    .ac-tipo-grid {
        grid-template-columns: 1fr;
    }
}

/* Attività commerciale index */
.attivita-commerciale-index table.table td {
    padding: .45rem .7rem;
    vertical-align: middle;
    font-size: .82rem;
}
.attivita-commerciale-index table.table th {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
}
.attivita-commerciale-index .mv-dt {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
    white-space: nowrap;
}
.attivita-commerciale-index .mv-dt-date {
    font-weight: 600;
}
.ac-next-action {
    margin-top: .2rem;
    color: #00388d;
    font-size: .7rem;
    font-weight: 600;
    white-space: nowrap;
}
.ac-open {
    color: inherit !important;
    text-decoration: none !important;
}
.ac-open:hover .ac-oggetto,
.ac-open:hover .ac-cell-name {
    color: #00388d;
}
.ac-oggetto,
.ac-cell-name {
    font-weight: 600;
    color: #1a2332;
    line-height: 1.3;
}
.ac-cell-meta {
    margin-top: .12rem;
    color: #6b7c8d;
    font-size: .74rem;
}
.ac-cell-contact {
    margin-top: .15rem;
    font-size: .74rem;
    color: #00388d;
}
.ac-cell-contact a {
    color: #00388d;
    text-decoration: none;
}
.ac-cell-contact a:hover {
    text-decoration: underline;
}
.ac-cell-contact i {
    margin-right: .15rem;
}
.ac-tipo-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
}
.ac-tipo-chip {
    display: inline-flex;
    align-items: center;
    padding: .12rem .45rem;
    border-radius: 999px;
    background: #eef4fb;
    color: #00388d;
    font-size: .7rem;
    font-weight: 600;
    line-height: 1.3;
}
.ac-status-badge {
    display: inline-flex;
    align-items: center;
    padding: .16rem .55rem;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
}
.ac-status-badge.is-done {
    background: #e6f5ee;
    color: #008d4c;
}
.ac-status-badge.is-draft {
    background: #fef5e6;
    color: #b9770e;
}
.attivita-commerciale-index .ac-actions .btn {
    min-width: 1.7rem;
}

/* Contatti update form */
.contatti-update .contatti-update-title-wrap,
.contatti-create .list-toolbar > div:first-child {
    flex: 1 1 auto;
    min-width: 180px;
}
.contatti-update-title-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
    margin-top: .25rem;
}
.contatti-update-status {
    display: inline-flex;
    align-items: center;
    padding: .16rem .6rem;
    border-radius: 999px;
    color: #fff;
    background: var(--status-color, #00388d);
    font-size: .72rem;
    font-weight: 700;
}
.contatti-update-chip {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .16rem .55rem;
    border-radius: 999px;
    background: #e8eef8;
    color: #00388d;
    font-size: .72rem;
    font-weight: 700;
}
.contatti-update-chip.is-muted {
    background: #f3f6f9;
    color: #5d6b78;
}
.contatti-note-form.mail-form .mail-form-block {
    margin-bottom: 0;
}
.contatti-note-form .ticket-reply-footer .btn {
    min-width: 8.5rem;
}
.contatti-view-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: 1rem;
}
.contatti-view-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .65rem 1.1rem;
}
.contatti-kv {
    min-width: 0;
}
.contatti-kv.is-wide {
    grid-column: 1 / -1;
}
.contatti-kv > span {
    display: block;
    margin-bottom: .15rem;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: #7a8896;
}
.contatti-kv > strong {
    display: block;
    font-size: .9rem;
    font-weight: 650;
    color: #0f223a;
    word-break: break-word;
}
.contatti-view-note {
    margin: 0;
    font-size: .88rem;
    line-height: 1.45;
    color: #2c3a48;
    white-space: pre-wrap;
}
.contatti-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, .9fr);
    gap: 1.1rem;
    align-items: start;
}
.contatti-form:not(.is-update) .contatti-form-layout {
    grid-template-columns: 1fr;
}
.contatti-form.mail-form .mail-form-block {
    margin-bottom: .85rem;
    padding: .8rem .9rem .75rem;
}
.contatti-form.mail-form .mail-form-block-title {
    margin-bottom: .65rem;
    padding-bottom: .45rem;
    font-size: .86rem;
}
.contatti-form.mail-form .ticket-reply-section {
    margin-bottom: .7rem;
}
.contatti-status-row {
    display: flex;
    align-items: center;
    gap: .45rem;
}
.contatti-status-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-weight: 650;
}
.contatti-status-dot {
    width: .55rem;
    height: .55rem;
    border-radius: 50%;
    display: inline-block;
}
.contatti-input-action {
    display: flex;
    align-items: flex-start;
    gap: .4rem;
}
.contatti-input-action .form-group {
    flex: 1 1 auto;
    min-width: 0;
}
.contatti-call-btn {
    margin-top: 1px;
    min-width: 2.1rem;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}
.contatti-crm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.1rem;
}
.contatti-crm-add {
    display: flex;
    align-items: flex-start;
    gap: .45rem;
    margin-bottom: .7rem;
}
.contatti-crm-add .form-group {
    flex: 1 1 auto;
    min-width: 0;
    margin-bottom: 0;
}
.contatti-crm-add .btn {
    white-space: nowrap;
    margin-top: 1px;
}
.contatti-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}
.contatti-chip {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .18rem .5rem .18rem .65rem;
    border-radius: 999px;
    background: #eef4fb;
    color: #00388d;
    font-size: .74rem;
    font-weight: 650;
}
.contatti-chip-remove {
    display: inline-flex;
    color: #8a96a3;
    line-height: 1;
    text-decoration: none !important;
}
.contatti-chip-remove:hover {
    color: #dd4b39;
}
.contatti-empty {
    margin: 0;
    font-size: .8rem;
    color: #7a8896;
}
.contatti-form-side {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    position: sticky;
    top: .75rem;
}
.contatti-history-block .mail-form-block-title {
    display: flex;
    align-items: center;
    gap: .4rem;
}
.contatti-history-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.2rem;
    padding: 0 .35rem;
    border-radius: 999px;
    background: #e8eef8;
    color: #00388d;
    font-size: .68rem;
    font-weight: 700;
}
.contatti-history-add {
    margin-left: auto;
    font-size: .74rem;
    font-weight: 650;
    color: #00388d;
    text-decoration: none !important;
}
.contatti-history-add:hover {
    color: #00245c;
}
.contatti-timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: .65rem;
    padding-left: .35rem;
    max-height: 28rem;
    overflow: auto;
}
.contatti-timeline::before {
    content: "";
    position: absolute;
    left: .52rem;
    top: .35rem;
    bottom: .35rem;
    width: 2px;
    background: #e4ebf3;
}
.contatti-tl-item {
    position: relative;
    display: grid;
    grid-template-columns: 1.1rem 1fr;
    gap: .55rem;
    align-items: start;
}
.contatti-tl-dot {
    width: .68rem;
    height: .68rem;
    margin-top: .45rem;
    border-radius: 50%;
    background: var(--dot, #00388d);
    box-shadow: 0 0 0 3px #fff;
    z-index: 1;
}
.contatti-tl-card {
    padding: .55rem .65rem .5rem;
    background: #f7fafd;
    border: 1px solid #e8eef5;
    border-radius: 10px;
}
.contatti-tl-item.is-current .contatti-tl-card {
    background: #fff;
    border-color: #c9d8ec;
    box-shadow: 0 2px 8px rgba(0, 56, 141, .06);
}
.contatti-tl-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .3rem;
}
.contatti-tl-status {
    display: inline-flex;
    align-items: center;
    padding: .12rem .5rem;
    border-radius: 999px;
    color: #fff;
    background: var(--status-color, #00388d);
    font-size: .68rem;
    font-weight: 700;
}
.contatti-tl-now {
    font-size: .66rem;
    font-weight: 700;
    color: #008d4c;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.contatti-tl-chip {
    display: inline-flex;
    padding: .1rem .45rem;
    border-radius: 999px;
    background: #e8eef8;
    color: #00388d;
    font-size: .66rem;
    font-weight: 700;
}
.contatti-tl-chip.is-muted {
    background: #eef2f6;
    color: #5d6b78;
}
.contatti-tl-chip.is-urgent {
    background: #fbecea;
    color: #dd4b39;
}
.contatti-tl-actions {
    margin-left: auto;
    display: inline-flex;
    gap: .2rem;
}
.contatti-tl-actions .btn {
    min-width: 1.65rem;
    padding: .12rem .3rem;
    font-size: .78rem;
    line-height: 1;
}
.contatti-tl-text {
    margin: .4rem 0 .15rem;
    font-size: .8rem;
    line-height: 1.4;
    color: #2c3a48;
}
.contatti-tl-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .15rem .7rem;
    margin-top: .3rem;
    font-size: .71rem;
    color: #6b7c8d;
}
.contatti-tl-meta i {
    margin-right: .15rem;
}
@media (max-width: 1199px) {
    .contatti-form-layout,
    .contatti-crm-grid,
    .contatti-view-grid {
        grid-template-columns: 1fr;
    }
    .contatti-form-side {
        position: static;
    }
}
