﻿/* CSS CUSTOM PROPERTIES (Design Tokens) */
:root {
    --cb-accent:        #E34824;
    --cb-accent-hover:  #c93d1e;
    --cb-dark:          #151515;
    --cb-light:         #EEEFF0;
    --cb-white:         #FFFFFF;
    --cb-gray:          #6b7280;
    --cb-muted:         #9ca3af;
    --cb-border:        #e0e1e3;
    --cb-green:         #059669;
    --cb-green-hover:   #047857;
    --cb-cyan:          #0891b2;
    --cb-amber:         #d97706;
    --cb-amber-hover:   #b45309;
    --cb-danger:        #dc2626;
    --cb-danger-hover:  #b91c1c;
    --topbar-height:    56px;
    --sidebar-width:    260px;
    --sidebar-collapsed-width: 64px;
    --sidebar-collapsed: 0px;
}

/*
   CB UTILITIES —— classi condivise globali
   Usate da TUTTE le view per ridurre duplicazione CSS.
   Le view-specifiche mantengono prefisso (g-, l-, pri-, ...) solo
   per regole uniche di layout / posizionamento.
   IMPORTANT: i tab partials AJAX (DS ——6.10) NON usano queste classi
   —— devono restare isolati con prefisso proprio.
*/

/* —— DS Enforcement: shape uniforme btn/card/alert/badge/input ——
   Forza sharp corners + font-weight/transition consistente su tutti btn. */
[class*="-btn"]:not([class*="btn-close"]):not([class*="-btn-icon"]) {
    border-radius: 0 !important;
}
a[class*="-btn"], button[class*="-btn"], .btn {
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}
a[class*="-btn"]:hover, button[class*="-btn"]:hover { text-decoration: none; color: inherit; }
a[class*="-btn-outline"]:hover { color: inherit; }

/* —— DS Enforcement: sharp corners globali ——
   Forza border-radius:0 su tutti componenti UI. Le forme circolari
   intenzionali (.50%) restano se dichiarate dopo. */
.btn,
button:not(.btn-close),
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
select,
textarea,
.form-control,
.form-select,
.form-check-input,
.input-group-text,
.card,
.alert,
.badge,
.dropdown-menu,
.modal-content,
.modal-header,
.modal-footer,
.list-group-item,
.nav-tabs .nav-link,
.nav-pills .nav-link,
.pagination .page-link,
.toast,
.popover,
.tooltip-inner,
.progress,
.progress-bar,
table,
thead,
tbody,
th,
td {
    border-radius: 0 !important;
}

/* —— Field utility —— */
.cb-field {
    display: flex; flex-direction: column;
    padding: 0.5rem 0; border-bottom: 1px solid #EEEFF0;
    margin-bottom: 0;
}
.cb-field:last-child { border-bottom: none; }
.cb-field--full { grid-column: 1 / -1; }
.cb-field--inline { flex-direction: row; align-items: baseline; gap: 0.75rem; }
.cb-field--inline .cb-field-label { width: 140px; flex-shrink: 0; margin-bottom: 0; }
.cb-field-label {
    font-size: 0.68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.04em;
    color: #6b7280; margin-bottom: 0.25rem;
}
.cb-field-value {
    font-size: 0.88rem; color: #151515; font-weight: 500;
}
.cb-field-empty {
    font-size: 0.85rem; color: #9ca3af; font-style: italic;
}
.cb-field-sub {
    font-size: 0.75rem; color: #6b7280; margin-top: 0.15rem;
}
.cb-fields-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.5rem;
}
.cb-fields-grid--1 { grid-template-columns: 1fr; }
.cb-fields-grid--3 { grid-template-columns: 1fr 1fr 1fr; gap: 0 1.5rem; }
@media (max-width: 767.98px) {
    .cb-fields-grid, .cb-fields-grid--3 { grid-template-columns: 1fr; }
}

/* —— File item pattern (upload/document tables) —— */
.cb-file-icon {
    font-size: 1.2rem; color: #6b7280;
    flex-shrink: 0; line-height: 1;
}
.cb-file-icon-lg {
    font-size: 2.8rem; line-height: 1; flex-shrink: 0; color: #6b7280;
}
.cb-file-name {
    font-size: 0.85rem; font-weight: 600;
    color: #151515; margin: 0;
    overflow: hidden; text-overflow: ellipsis;
}
.cb-file-size {
    font-size: 0.72rem; color: #9ca3af;
}
.cb-file-desc {
    font-size: 0.72rem; color: #9ca3af;
    font-style: italic;
}
.cb-file-note {
    font-size: 0.72rem; color: #9ca3af;
    margin-top: 0.15rem;
}
.cb-file-box {
    display: flex; align-items: center; gap: 0.65rem;
    padding: 0.65rem 1rem;
    border: 1px solid #e0e1e3; background: #fafbfc;
}
.cb-file-list { list-style: none; padding: 0; margin: 0; }
.cb-file-item {
    display: flex; align-items: center; justify-content: space-between;
    gap: 0.5rem; padding: 0.65rem 1rem;
    border-bottom: 1px solid #EEEFF0;
    font-size: 0.82rem;
    transition: background 0.15s ease;
}
.cb-file-item:last-child { border-bottom: none; }
.cb-file-item:hover { background: rgba(227,72,36,0.02); }

/* —— Audit / Sistema info utility —— */
.cb-sys-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
.cb-sys-field, .cb-sys-item { margin-bottom: 0.7rem; }
.cb-sys-field:last-child, .cb-sys-item:last-child { margin-bottom: 0; }
.cb-sys-label {
    font-size: 0.68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.04em;
    color: #6b7280; margin-bottom: 0.15rem;
    display: block;
}
.cb-sys-value {
    font-size: 0.82rem; color: #151515; font-weight: 500;
}
.cb-sys-sub {
    font-size: 0.72rem; color: #9ca3af; margin-top: 0.1rem;
}

/* —— Divider / Note box —— */
.cb-divider, .cb-sep-line {
    border: none; border-top: 1px solid #EEEFF0;
    margin: 1.25rem 0;
}
.cb-divider--sm { margin: 0.75rem 0; }
.cb-divider--lg { margin: 1.75rem 0; }
.cb-note-box {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    background: rgba(8,145,178,0.04);
    border-left: 3px solid #0891b2;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: #151515;
}
.cb-note-box i { color: #0891b2; flex-shrink: 0; margin-top: 0.1rem; }
.cb-note-box span { flex: 1; }
.cb-note-box--accent { background: rgba(227,72,36,0.04); border-left-color: #E34824; }
.cb-note-box--amber  { background: rgba(217,119,6,0.04); border-left-color: #d97706; }
.cb-note-box--danger { background: rgba(220,38,38,0.04); border-left-color: #dc2626; }
.cb-note-box--green  { background: rgba(5,150,105,0.04); border-left-color: #059669; }

/* —— Actions grid (sidebar btn column) —— */
.cb-actions-grid {
    display: flex; flex-direction: column; gap: 0.5rem;
}

/* —— Table row actions (inline icon btns) —— */
.cb-actions {
    display: inline-flex; align-items: center;
    justify-content: flex-end; gap: 0.25rem;
}

/* —— Info row pattern (sidebar/detail panels) —— */
.cb-info-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.55rem 1.25rem;
    border-bottom: 1px solid #EEEFF0;
    font-size: 0.82rem;
}
.cb-info-row:last-child { border-bottom: none; }
.cb-info-label {
    color: #6b7280; font-size: 0.72rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.04em;
    flex-shrink: 0;
}
.cb-info-value {
    font-size: 0.85rem; color: #151515; font-weight: 500;
    text-align: right; max-width: 60%;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cb-info-value code {
    background: #EEEFF0; padding: 0.1rem 0.4rem;
    font-size: 0.75rem; color: #151515;
}
.cb-info-item {
    display: flex; flex-direction: column; gap: 0.2rem;
    padding: 0.5rem 0;
}

/* —— Check wrap (filtri rapidi inline) —— */
.cb-check-wrap {
    display: inline-flex; align-items: center; gap: 0.4rem;
    font-size: 0.82rem; color: #151515; cursor: pointer;
}
.cb-check-wrap input[type="checkbox"],
.cb-check-wrap input[type="radio"] {
    width: 15px; height: 15px;
    border-radius: 0; accent-color: #E34824;
    cursor: pointer; flex-shrink: 0;
}
.cb-check-icon { font-size: 0.9rem; flex-shrink: 0; }
.cb-check-icon--accent  { color: #E34824; }
.cb-check-icon--green   { color: #059669; }
.cb-check-icon--warn,
.cb-check-icon--amber   { color: #d97706; }
.cb-check-icon--danger  { color: #dc2626; }
.cb-check-icon--cyan    { color: #0891b2; }

/* —— Empty state —— */
.cb-empty-state {
    text-align: center; padding: 4rem 2rem;
}
.cb-empty-state svg { color: #e0e1e3; margin-bottom: 1rem; }
.cb-empty-state i {
    font-size: 3rem; color: #e0e1e3;
    margin-bottom: 0.75rem; display: block;
}
.cb-empty-state h4 {
    font-size: 1.1rem; font-weight: 700; color: #151515; margin-bottom: 0.5rem;
}
.cb-empty-state p { font-size: 0.85rem; color: #6b7280; margin: 0 0 1rem; }
.cb-empty-icon {
    font-size: 2.5rem; color: #9ca3af; opacity: 0.55;
    display: block; margin-bottom: 0.65rem; line-height: 1;
}
.cb-empty-text {
    font-size: 0.85rem; color: #6b7280; margin: 0 0 0.85rem;
}
.cb-empty-title {
    font-size: 1rem; font-weight: 700;
    color: #151515; margin: 0.75rem 0 0.4rem;
}

/* —— Spinner —— */
.cb-spinner {
    width: 28px; height: 28px;
    border: 3px solid rgba(227,72,36,0.15);
    border-top-color: #E34824;
    border-radius: 50%;
    animation: cb-spin 0.7s linear infinite;
    display: inline-block;
}
.cb-spinner-sm {
    width: 14px; height: 14px;
    border-width: 2px;
}
@keyframes cb-spin {
    to { transform: rotate(360deg); }
}

/* —— Page wrapper —— */
.cb-page { padding: 2rem; }
@media (max-width: 991.98px) {
    .cb-page { padding: 1.25rem; }
}
@media (max-width: 575.98px) {
    .cb-page { padding: 0.85rem; }
}

/* —— Text color helpers (cluster ricorrenti) —— */
.cb-text-required { color: #dc2626; font-weight: 700; }
.cb-text-danger   { color: #dc2626; }
.cb-text-success  { color: #059669; }
.cb-text-muted    { color: #9ca3af; }
.cb-text-gray     { color: #6b7280; }
.cb-text-accent   { color: #E34824; }
.cb-text-amber    { color: #d97706; }
.cb-text-cyan     { color: #0891b2; }
.cb-text-blue     { color: #2563eb; }
/* text utility multi-prop (consolida ~100 regole testo per-prefisso, B16) */
.cb-text-label       { font-size: 0.85rem; font-weight: 600; color: #151515; }
.cb-text-xs-muted    { font-size: 0.72rem; color: #9ca3af; }
.cb-text-sub         { font-size: 0.72rem; color: #9ca3af; margin-top: 0.1rem; }
.cb-text-sm-gray     { font-size: 0.75rem; color: #6b7280; margin: 0; }
.cb-text-md          { font-size: 0.82rem; color: #151515; font-weight: 500; }
.cb-text-base-strong { font-size: 0.85rem; color: #151515; font-weight: 500; }
.cb-label-up         { display: block; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: #151515; margin-bottom: 0.35rem; }
.cb-list-reset       { list-style: none; padding: 0; margin: 0; }
.cb-flex-1           { flex: 1; min-width: 0; }
/* bg utility atomiche (consolida ~30 regole 1-prop background per-prefisso) */
.cb-bg-accent  { background: #E34824; }
.cb-bg-success { background: #059669; }
.cb-bg-danger  { background: #dc2626; }
.cb-bg-amber   { background: #d97706; }
.cb-bg-cyan    { background: #0891b2; }
.cb-bg-gray    { background: #6b7280; }
.cb-bg-muted   { background: #9ca3af; }
.cb-bg-light   { background: var(--cb-light); }
.cb-val-plan      { color: #E34824; font-weight: 600; }
.cb-val-eff       { color: #059669; font-weight: 700; }
.cb-empty-val     { color: #9ca3af; font-style: italic; }
.cb-link-accent   { color: #E34824; text-decoration: none; font-weight: 600; }
.cb-link-accent:hover { color: #c93d1e; text-decoration: underline; }

/* —— DS Mobile responsive globali —— */
@media (max-width: 767.98px) {
    /* Page header stack verticale */
    .cb-page-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
    }
    .cb-page-actions {
        width: 100%;
        flex-wrap: wrap;
        gap: 0.5rem !important;
    }
    .cb-page-actions > a,
    .cb-page-actions > button,
    .cb-page-actions > form,
    .cb-page-actions > .cb-btn {
        flex: 1 1 auto;
    }
    /* Tutti btn full-width within page-actions/footer/header-actions */
    .cb-page-actions .cb-btn,
    .cb-page-actions [class*="-btn"]:not([class*="-btn-icon"]):not(.btn-close),
    [class*="-header-actions"] .cb-btn,
    [class*="-header-actions"] [class*="-btn"]:not([class*="-btn-icon"]):not(.btn-close),
    [class*="-footer"] .cb-btn,
    [class*="-footer"] [class*="-btn"]:not([class*="-btn-icon"]):not(.btn-close) {
        width: 100%;
        justify-content: center;
    }
    /* Page title size mobile */
    .cb-page-title { font-size: 1.25rem !important; }
    .cb-page-subtitle { font-size: 0.85rem !important; }
    .cb-page-title-area { gap: 0.75rem !important; }
    .cb-icon-box-lg { width: 40px; height: 40px; font-size: 1.15rem; }

    /* Card stack vertical */
    .cb-card { margin-bottom: 1rem; }
    .cb-card-body { padding: 1rem !important; }
    .cb-card-header { padding: 0.75rem 1rem !important; }

    /* Table scroll horizontal su tutti cb-table wrap-less */
    .cb-table { font-size: 0.78rem; }
    .cb-table th, .cb-table td { padding: 0.5rem 0.65rem !important; }
}

@media (max-width: 575.98px) {
    /* Stack page actions completo */
    .cb-page-actions { flex-direction: column !important; }
    .cb-page-actions > a,
    .cb-page-actions > button,
    .cb-page-actions > form,
    .cb-page-actions > form > button {
        width: 100%;
    }
    /* Bottoni header view-specifici full-width */
    [class*="-header"] [class*="-btn"]:not([class*="-btn-icon"]):not(.btn-close),
    [class*="-actions"] [class*="-btn"]:not([class*="-btn-icon"]):not(.btn-close) {
        width: 100%;
        justify-content: center;
    }
    /* Header view-specifici stack */
    [class*="-header"]:not(.cb-card-header):not(.modal-header):not(.fc-header-toolbar) {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.75rem !important;
    }
    [class*="-header-actions"],
    [class*="-header-right"] {
        width: 100%;
        flex-wrap: wrap;
    }
    /* Breadcrumb wrap */
    .cb-breadcrumb { font-size: 0.75rem; gap: 0.3rem !important; }
    /* Hide intermediate breadcrumb items se troppi */
    .cb-breadcrumb a:not(:first-child):not(:last-of-type),
    .cb-breadcrumb .cb-breadcrumb-sep:nth-of-type(n+3) {
        display: inline-flex;
    }
}

/* —— Breadcrumb (SVG chevron inline nelle view) —— */
.cb-breadcrumb {
    display: flex; align-items: center; gap: 0.4rem;
    font-size: 0.8rem; flex-wrap: wrap; margin-bottom: 1rem;
}
.cb-breadcrumb a,
.cb-breadcrumb a:link,
.cb-breadcrumb a:visited,
.cb-breadcrumb-link,
.cb-breadcrumb-link:link,
.cb-breadcrumb-link:visited {
    color: #E34824 !important; text-decoration: none; font-weight: 500 !important;
    display: inline-flex; align-items: center; gap: 0.25rem;
}
.cb-breadcrumb a:hover,
.cb-breadcrumb a:focus,
.cb-breadcrumb a:active,
.cb-breadcrumb-link:hover,
.cb-breadcrumb-link:focus,
.cb-breadcrumb-link:active { color: #c93d1e !important; text-decoration: underline !important; }
.cb-breadcrumb .cb-sep,
.cb-breadcrumb .cb-breadcrumb-sep,
.cb-breadcrumb [class$="-sep"],
.cb-breadcrumb-sep,
.cb-sep { color: #6b7280 !important; display: inline-flex; align-items: center; }
.cb-breadcrumb .cb-sep svg,
.cb-breadcrumb .cb-breadcrumb-sep svg,
.cb-breadcrumb [class$="-sep"] svg,
.cb-breadcrumb-sep svg,
.cb-sep svg { width: 12px; height: 12px; fill: currentColor; opacity: 1 !important; }
.cb-breadcrumb .cb-current,
.cb-breadcrumb .cb-breadcrumb-current,
.cb-breadcrumb [class$="-current"],
.cb-breadcrumb-current,
.cb-current { color: #6b7280 !important; font-weight: 500 !important; }

/* —— Page header —— */
.cb-page-header {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem;
    padding-bottom: 1rem; border-bottom: 1px solid #e0e1e3;
}
.cb-page-title-area { display: flex; align-items: center; gap: 1rem; }
.cb-page-title {
    font-size: 1.4rem; font-weight: 700; margin: 0;
    color: #151515; letter-spacing: -0.025em;
    display: flex; align-items: center; gap: 0.5rem;
}
.cb-page-title svg { color: #E34824; flex-shrink: 0; }
.cb-page-subtitle { font-size: 0.85rem; color: #6b7280; margin: 0; }
.cb-page-title + .cb-page-subtitle,
.cb-page-title-area + .cb-page-subtitle { margin-bottom: 1.5rem; }
.cb-page-header .cb-page-subtitle { margin-bottom: 0; }
.cb-page-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* —— Icon box (header pagina + card header) —— */
.cb-icon-box-lg {
    width: 48px; height: 48px;
    background: rgba(227,72,36,0.08);
    border: 1px solid rgba(227,72,36,0.15);
    color: #E34824;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
}
.cb-icon-box {
    width: 34px; height: 34px;
    background: rgba(227,72,36,0.08);
    border: 1px solid rgba(227,72,36,0.15);
    color: #E34824;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
/* Wildcard: ogni .xx-card-header-icon eredita dimensione+flex base */
[class$="-card-header-icon"], [class*="-card-header-icon "] {
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.cb-icon-box--green,
.cb-icon-box--success  { background: rgba(5,150,105,0.08);  border-color: rgba(5,150,105,0.15);  color: #059669; }
.cb-icon-box--amber,
.cb-icon-box--warn,
.cb-icon-box--warning,
.cb-icon-box--orange   { background: rgba(217,119,6,0.08);  border-color: rgba(217,119,6,0.15);  color: #d97706; }
.cb-icon-box--danger,
.cb-icon-box--red      { background: rgba(220,38,38,0.08);  border-color: rgba(220,38,38,0.15);  color: #dc2626; }
.cb-icon-box--info,
.cb-icon-box--cyan,
.cb-icon-box--blue     { background: rgba(8,145,178,0.08);  border-color: rgba(8,145,178,0.15);  color: #0891b2; }
.cb-icon-box--secondary,
.cb-icon-box--gray,
.cb-icon-box--neutral  { background: rgba(107,114,128,0.08);border-color: rgba(107,114,128,0.15);color: #6b7280; }
.cb-icon-box--light    { background: rgba(224,225,227,0.3); border-color: #e0e1e3; color: #6b7280; }
.cb-icon-box--accent,
.cb-icon-box--primary  { background: rgba(227,72,36,0.08);  border-color: rgba(227,72,36,0.15);  color: #E34824; }
.cb-icon-box--dark     { background: rgba(21,21,21,0.06);   border-color: rgba(21,21,21,0.15);   color: #151515; }

/* —— Card —— */
.cb-card {
    background: #fff; border: 1px solid #e0e1e3; border-radius: 0;
    margin-bottom: 1.5rem; position: relative;
}
.cb-card-header {
    position: relative; padding: 1rem 1.5rem;
    border-bottom: 1px solid #e0e1e3;
    display: flex; align-items: center; gap: 0.75rem;
}
/* Card header right area: spinge a destra */
.cb-card-header [class*="-header-right"],
.cb-card-header [class*="-card-actions"],
.cb-card-header [class*="header-actions"]:not(.cb-page-header [class*="header-actions"]) {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
/* Bottoni/link diretti dentro cb-card-header: spingere ultimo a destra */
.cb-card-header > a:last-child,
.cb-card-header > button:last-child,
.cb-card-header > form:last-child,
.cb-card-header > .cb-btn:last-child,
.cb-card-header > [class*="-btn"]:last-child {
    margin-left: auto;
}
/* Card title area: flex-grow per riempire spazio */
.cb-card-header [class*="-header-left"],
.cb-card-header [class*="-card-header-inner"] {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.cb-card-header::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0;
    width: 4px; background: #E34824;
}
.cb-card--green   .cb-card-header::before,
.cb-card--success .cb-card-header::before { background: #059669; }
.cb-card--amber   .cb-card-header::before,
.cb-card--warn    .cb-card-header::before { background: #d97706; }
.cb-card--danger  .cb-card-header::before { background: #dc2626; }
.cb-card--info    .cb-card-header::before,
.cb-card--cyan    .cb-card-header::before { background: #0891b2; }
.cb-card--secondary .cb-card-header::before { background: #6b7280; }
.cb-card--neutral .cb-card-header::before { background: #e0e1e3; }

/* Direct card-header color modifiers (no parent required) */
/* Accent bar 4px (::before) */
.cb-card-header--accent::before,
.cb-card-header--orange::before,
.cb-card-header--primary::before { background: #E34824 !important; }
.cb-card-header--green::before,
.cb-card-header--success::before { background: #059669 !important; }
.cb-card-header--amber::before,
.cb-card-header--warn::before,
.cb-card-header--warning::before { background: #d97706 !important; }
.cb-card-header--danger::before,
.cb-card-header--red::before { background: #dc2626 !important; }
.cb-card-header--info::before,
.cb-card-header--cyan::before,
.cb-card-header--blue::before { background: #0891b2 !important; }
.cb-card-header--secondary::before,
.cb-card-header--gray::before { background: #6b7280 !important; }
.cb-card-header--neutral::before,
.cb-card-header--light::before { background: #e0e1e3 !important; }
.cb-card-header--dark::before { background: #151515 !important; }

/* Background tint */
.cb-card-header--accent,
.cb-card-header--orange,
.cb-card-header--primary { background: rgba(227,72,36,0.04); }
.cb-card-header--green,
.cb-card-header--success { background: rgba(5,150,105,0.04); }
.cb-card-header--amber,
.cb-card-header--warn,
.cb-card-header--warning { background: rgba(217,119,6,0.04); }
.cb-card-header--danger,
.cb-card-header--red { background: rgba(220,38,38,0.04); }
.cb-card-header--info,
.cb-card-header--cyan,
.cb-card-header--blue { background: rgba(8,145,178,0.04); }
.cb-card-header--secondary,
.cb-card-header--gray { background: rgba(107,114,128,0.04); }
.cb-card-header--neutral,
.cb-card-header--light { background: rgba(224,225,227,0.25); }
.cb-card-header--dark { background: rgba(21,21,21,0.04); }
.cb-card-header--dark [class*="-icon"]:not(svg):not(i) {
    width: 34px; height: 34px;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    background: rgba(21,21,21,0.08); border: 1px solid rgba(21,21,21,0.15); color: #151515;
}

/* Icon box dentro card-header colorato: applica tint dello stesso colore */
.cb-card-header--accent [class*="-icon"]:not(svg):not(i),
.cb-card-header--orange [class*="-icon"]:not(svg):not(i),
.cb-card-header--primary [class*="-icon"]:not(svg):not(i) {
    width: 34px; height: 34px;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    background: rgba(227,72,36,0.08); border: 1px solid rgba(227,72,36,0.15); color: #E34824;
}
.cb-card-header--green [class*="-icon"]:not(svg):not(i),
.cb-card-header--success [class*="-icon"]:not(svg):not(i) {
    width: 34px; height: 34px;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    background: rgba(5,150,105,0.08); border: 1px solid rgba(5,150,105,0.15); color: #059669;
}
.cb-card-header--amber [class*="-icon"]:not(svg):not(i),
.cb-card-header--warn [class*="-icon"]:not(svg):not(i),
.cb-card-header--warning [class*="-icon"]:not(svg):not(i) {
    width: 34px; height: 34px;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    background: rgba(217,119,6,0.08); border: 1px solid rgba(217,119,6,0.15); color: #d97706;
}
.cb-card-header--danger [class*="-icon"]:not(svg):not(i),
.cb-card-header--red [class*="-icon"]:not(svg):not(i) {
    width: 34px; height: 34px;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    background: rgba(220,38,38,0.08); border: 1px solid rgba(220,38,38,0.15); color: #dc2626;
}
.cb-card-header--info [class*="-icon"]:not(svg):not(i),
.cb-card-header--cyan [class*="-icon"]:not(svg):not(i),
.cb-card-header--blue [class*="-icon"]:not(svg):not(i) {
    width: 34px; height: 34px;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    background: rgba(8,145,178,0.08); border: 1px solid rgba(8,145,178,0.15); color: #0891b2;
}
.cb-card-header--secondary [class*="-icon"]:not(svg):not(i),
.cb-card-header--gray [class*="-icon"]:not(svg):not(i) {
    width: 34px; height: 34px;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    background: rgba(107,114,128,0.08); border: 1px solid rgba(107,114,128,0.15); color: #6b7280;
}
.cb-card-header--neutral [class*="-icon"]:not(svg):not(i),
.cb-card-header--light [class*="-icon"]:not(svg):not(i) {
    width: 34px; height: 34px;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    background: rgba(224,225,227,0.4); border: 1px solid #e0e1e3; color: #6b7280;
}

.cb-card-title { font-size: 0.9rem; font-weight: 700; color: #151515; margin: 0; }
.cb-card-header h2, .cb-card-header h3 { font-size: 0.9rem; font-weight: 700; color: #151515; margin: 0; display: flex; align-items: center; gap: 0.5rem; }
.cb-section-title { font-size: 0.82rem; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.4rem; }
.cb-section-title i, .cb-section-title svg { color: #E34824; }
.cb-card-body { padding: 1.5rem; }
.cb-card-header-left {
    display: flex; align-items: center; gap: 0.75rem;
    min-width: 0;
}
.cb-card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e0e1e3;
    display: flex; justify-content: flex-end;
    gap: 0.5rem; flex-wrap: wrap;
}
.cb-card-footer:has(nav) {
    justify-content: space-between;
    align-items: center;
}
.cb-card-footer > nav {
    margin: 0 auto;
}
@media (max-width: 575.98px) {
    .cb-card-footer { flex-direction: column; }
    .cb-card-footer > * { width: 100%; }
}
.cb-card--accent { position: relative; }
.cb-card--accent::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0;
    width: 4px; background: #E34824;
}
.cb-card--accent.cb-card--green::before,
.cb-card--accent.cb-card--success::before  { background: #059669; }
.cb-card--accent.cb-card--amber::before,
.cb-card--accent.cb-card--warn::before     { background: #d97706; }
.cb-card--accent.cb-card--danger::before { background: #dc2626; }
.cb-card--accent.cb-card--info::before,
.cb-card--accent.cb-card--cyan::before     { background: #0891b2; }
.cb-card--accent.cb-card--secondary::before { background: #6b7280; }

/* —— Bottoni —— */
.cb-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
    padding: 0.55rem 1.5rem; font-size: 0.85rem; font-weight: 600;
    border-radius: 0; border: 2px solid transparent; cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.cb-btn:hover, .cb-btn:focus, .cb-btn:active { text-decoration: none; }
/* Fallback color for cb-btn without explicit color variant */
.cb-btn {
    background: #E34824; color: #fff; border-color: #E34824;
}
a.cb-btn, a.cb-btn:visited { color: #fff; }
.cb-btn:hover, a.cb-btn:hover { background: #ec6a4a; border-color: #ec6a4a; color: #fff; }
.cb-btn-primary,   a.cb-btn-primary,   a.cb-btn-primary:visited   { background: #E34824; color: #fff; border-color: #E34824; }
.cb-btn-primary:hover, a.cb-btn-primary:hover, a.cb-btn-primary:focus   { background: #ec6a4a; border-color: #ec6a4a; color: #fff; box-shadow: 0 2px 8px rgba(227,72,36,0.2); }
.cb-btn-success,   a.cb-btn-success,   a.cb-btn-success:visited   { background: #059669; color: #fff; border-color: #059669; }
.cb-btn-success:hover, a.cb-btn-success:hover, a.cb-btn-success:focus   { background: #10b981; border-color: #10b981; color: #fff; }
.cb-btn-amber,     a.cb-btn-amber,     a.cb-btn-amber:visited     { background: #d97706; color: #fff; border-color: #d97706; }
.cb-btn-amber:hover, a.cb-btn-amber:hover, a.cb-btn-amber:focus     { background: #f59e0b; border-color: #f59e0b; color: #fff; }
.cb-btn-danger,    a.cb-btn-danger,    a.cb-btn-danger:visited    { background: #dc2626; color: #fff; border-color: #dc2626; }
.cb-btn-danger:hover, a.cb-btn-danger:hover, a.cb-btn-danger:focus    { background: #ef4444; border-color: #ef4444; color: #fff; }
.cb-btn-secondary, a.cb-btn-secondary, a.cb-btn-secondary:visited { background: transparent; color: #6b7280; border-color: #e0e1e3; }
.cb-btn-secondary:hover, a.cb-btn-secondary:hover, a.cb-btn-secondary:focus { background: #f3f4f6; border-color: #e0e1e3; color: #6b7280; }

/* Normalizzazione globale hover: schiarisce bottoni legacy (mac-btn, msca-btn, smp-btn, mdd-btn, mm-btn, t-btn, ts-btn, ecc.) */
[class*="-btn-accent"]:not(.cb-btn-secondary):not([class*="outline"]):not([class*="-act-"]):not([class*="action"]):hover,
[class*="-btn-primary"]:not(.cb-btn-secondary):not([class*="outline"]):not([class*="-act-"]):not([class*="action"]):hover,
[class*="-btn-success"]:not(.cb-btn-secondary):not([class*="outline"]):not([class*="-act-"]):not([class*="action"]):hover,
[class*="-btn-amber"]:not(.cb-btn-secondary):not([class*="outline"]):not([class*="-act-"]):not([class*="action"]):hover,
[class*="-btn-danger"]:not(.cb-btn-secondary):not([class*="outline"]):not([class*="-act-"]):not([class*="action"]):hover,
[class*="-btn-green"]:not(.cb-btn-secondary):not([class*="outline"]):not([class*="-act-"]):not([class*="action"]):hover,
[class*="-btn-cta"]:not([class*="outline"]):hover,
[class*="-btn-lg"]:not([class*="outline"]):hover {
    filter: brightness(1.12);
}
.cb-btn-sm { padding: 0.35rem 0.75rem; font-size: 0.78rem; border-width: 1px; }
.cb-btn-icon {
    width: 32px; height: 32px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid rgba(227,72,36,0.2);
    background: transparent;
    color: #6b7280;
    border-radius: 0;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    line-height: 1;
    font-size: 0.9rem;
}
.cb-btn-icon:hover {
    background: rgba(227,72,36,0.06);
    border-color: #E34824;
    color: #E34824;
}
.cb-btn-icon > i, .cb-btn-icon > svg { display: inline-flex; line-height: 1; }

/* Outline piccoli */
.cb-btn-outline-primary, a.cb-btn-outline-primary, a.cb-btn-outline-primary:visited { background: transparent; color: #E34824; border-color: rgba(227,72,36,0.2); }
.cb-btn-outline-primary:hover, a.cb-btn-outline-primary:hover, a.cb-btn-outline-primary:focus { background: rgba(227,72,36,0.04); border-color: #E34824; color: #E34824; }
.cb-btn-outline-success, a.cb-btn-outline-success, a.cb-btn-outline-success:visited { background: transparent; color: #059669; border-color: rgba(5,150,105,0.2); }
.cb-btn-outline-success:hover, a.cb-btn-outline-success:hover, a.cb-btn-outline-success:focus { background: rgba(5,150,105,0.04); border-color: #059669; color: #059669; }
.cb-btn-outline-danger, a.cb-btn-outline-danger, a.cb-btn-outline-danger:visited { background: transparent; color: #dc2626; border-color: rgba(220,38,38,0.2); }
.cb-btn-outline-danger:hover, a.cb-btn-outline-danger:hover, a.cb-btn-outline-danger:focus { background: rgba(220,38,38,0.04); border-color: #dc2626; color: #dc2626; }
.cb-btn-outline-amber, a.cb-btn-outline-amber, a.cb-btn-outline-amber:visited { background: transparent; color: #d97706; border-color: rgba(217,119,6,0.2); }
.cb-btn-outline-amber:hover, a.cb-btn-outline-amber:hover, a.cb-btn-outline-amber:focus { background: rgba(217,119,6,0.04); border-color: #d97706; color: #d97706; }
.cb-btn-outline-cyan, .cb-btn-outline-info,
a.cb-btn-outline-cyan, a.cb-btn-outline-info,
a.cb-btn-outline-cyan:visited, a.cb-btn-outline-info:visited { background: transparent; color: #0891b2; border-color: rgba(8,145,178,0.2); }
.cb-btn-outline-cyan:hover, .cb-btn-outline-info:hover,
a.cb-btn-outline-cyan:hover, a.cb-btn-outline-info:hover,
.cb-btn-outline-cyan:focus, .cb-btn-outline-info:focus { background: rgba(8,145,178,0.04); border-color: #0891b2; color: #0891b2; }
.cb-btn-outline-gray, .cb-btn-outline-secondary,
a.cb-btn-outline-gray, a.cb-btn-outline-secondary,
a.cb-btn-outline-gray:visited, a.cb-btn-outline-secondary:visited { background: transparent; color: #6b7280; border-color: rgba(107,114,128,0.2); }
.cb-btn-outline-gray:hover, .cb-btn-outline-secondary:hover,
a.cb-btn-outline-gray:hover, a.cb-btn-outline-secondary:hover,
.cb-btn-outline-gray:focus, .cb-btn-outline-secondary:focus { background: rgba(107,114,128,0.04); border-color: #6b7280; color: #6b7280; }
.cb-btn-outline-accent { background: transparent; color: #E34824; border-color: rgba(227,72,36,0.2); }
.cb-btn-outline-accent:hover { background: rgba(227,72,36,0.04); border-color: #E34824; color: #E34824; }
.cb-btn-outline-green { background: transparent; color: #059669; border-color: rgba(5,150,105,0.2); }
.cb-btn-outline-green:hover { background: rgba(5,150,105,0.04); border-color: #059669; color: #059669; }

/* —— Badge —— */
.cb-badge {
    display: inline-flex; align-items: center; gap: 0.25rem;
    padding: 0.25rem 0.65rem; font-size: 0.68rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.03em;
    border-radius: 0; border: 1px solid transparent;
}
.cb-badge--success   { background: rgba(5,150,105,0.06);   color: #059669; border-color: rgba(5,150,105,0.2); }
.cb-badge--danger    { background: rgba(220,38,38,0.06);   color: #dc2626; border-color: rgba(220,38,38,0.2); }
.cb-badge--warn,
.cb-badge--amber     { background: rgba(217,119,6,0.06);   color: #d97706; border-color: rgba(217,119,6,0.2); }
.cb-badge--accent    { background: rgba(227,72,36,0.06);   color: #E34824; border-color: rgba(227,72,36,0.2); }
.cb-badge--info      { background: rgba(8,145,178,0.06);   color: #0891b2; border-color: rgba(8,145,178,0.2); }
.cb-badge--primary   { background: rgba(227,72,36,0.06);   color: #E34824; border-color: rgba(227,72,36,0.2); }
.cb-badge--secondary { background: rgba(107,114,128,0.06); color: #6b7280; border-color: rgba(107,114,128,0.2); }
.cb-badge--dark      { background: rgba(21,21,21,0.06);    color: #151515; border-color: rgba(21,21,21,0.2); }
.cb-badge--cyan,
.cb-badge--info-cyan { background: rgba(8,145,178,0.06);    color: #0891b2; border-color: rgba(8,145,178,0.2); }
.cb-badge--green     { background: rgba(5,150,105,0.06);    color: #059669; border-color: rgba(5,150,105,0.2); }
.cb-badge--gray      { background: rgba(107,114,128,0.06);  color: #6b7280; border-color: rgba(107,114,128,0.2); }
.cb-badge--warning   { background: rgba(217,119,6,0.06);    color: #d97706; border-color: rgba(217,119,6,0.2); }

/* —— Alert —— */
.cb-alert {
    border-radius: 0; border: 1px solid #e0e1e3;
    padding: 0.85rem 1.25rem; font-size: 0.85rem;
    display: flex; align-items: flex-start; gap: 0.5rem;
    border-left-width: 4px; margin-bottom: 1rem;
}
.cb-alert--success { border-left-color: #059669; background: rgba(5,150,105,0.05);  color: #065f46; }
.cb-alert--success > i { color: #059669; }
.cb-alert--danger  { border-left-color: #dc2626; background: rgba(220,38,38,0.04);  color: #7f1d1d; }
.cb-alert--danger > i  { color: #dc2626; }
.cb-alert--warning,
.cb-alert--warn,
.cb-alert--amber   { border-left-color: #d97706; background: rgba(217,119,6,0.04);  color: #92400e; }
.cb-alert--warning > i,
.cb-alert--warn > i,
.cb-alert--amber > i { color: #d97706; }
.cb-alert--info    { border-left-color: #0891b2; background: rgba(8,145,178,0.04);  color: #155e75; }
.cb-alert--info > i    { color: #0891b2; }
.cb-alert--muted   { border-left-color: #6b7280; background: #EEEFF0; color: #6b7280; }
.cb-alert--muted > i   { color: #6b7280; }
/* close button alert (consolida ~80 def .X-alert-close per-prefisso) */
.cb-alert-close {
    margin-left: auto; background: none; border: none; cursor: pointer;
    color: #6b7280; font-size: 1rem; line-height: 1; padding: 0; flex-shrink: 0;
}
.cb-alert-close:hover { color: #151515; }

/* —— Validation toast: lista errori cliccabili dentro notification-toast.toast-danger —— */
.cb-vb-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.2rem; }
.cb-vb-item {
    display: flex; align-items: center; gap: 0.3rem;
    width: 100%; background: transparent; border: 0;
    border-left: 2px solid transparent;
    padding: 0.3rem 0.4rem; color: #7f1d1d;
    font-size: 0.82rem; cursor: pointer; text-align: left;
    transition: background 0.15s, border-color 0.15s;
}
.cb-vb-item:hover { background: rgba(220, 38, 38, 0.08); border-left-color: #dc2626; }
.cb-vb-section { opacity: 0.7; font-weight: 500; }
.cb-vb-sep { opacity: 0.5; }
.cb-vb-field { font-weight: 600; }

/* —— Filter card pattern —— */
.cb-filter-card {
    background: #fff; border: 1px solid #e0e1e3; border-radius: 0;
    margin-bottom: 1rem; position: relative;
}
.cb-filter-header {
    position: relative; padding: 0.85rem 1.25rem;
    border-bottom: 1px solid #e0e1e3;
    display: flex; align-items: center; justify-content: space-between;
    gap: 0.5rem;
}
.cb-filter-header::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0;
    width: 4px; background: #6b7280;
}
.cb-filter-title {
    font-size: 0.82rem; font-weight: 600; color: #6b7280;
    text-transform: uppercase; letter-spacing: 0.03em;
    display: flex; align-items: center; gap: 0.4rem; margin: 0;
}
.cb-filter-title i { color: #E34824; }
.cb-filter-toggle {
    background: none; border: none; color: #9ca3af;
    cursor: pointer; padding: 0; font-size: 0.9rem;
    transition: transform 0.2s;
}
.cb-filter-toggle.collapsed { transform: rotate(-90deg); }
.cb-filter-body { padding: 1.25rem; }
.cb-filter-body.closed { display: none; }
.cb-filter-body.cb-filter-body--collapsed:not(.open) { display: none; }
.cb-filter-body.cb-filter-body--collapsed.open { display: block; }
.cb-filter-body .form-label {
    font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.04em; color: #151515; margin-bottom: 0.3rem;
}
.cb-filter-body .form-control,
.cb-filter-body .form-select {
    border-radius: 0; border: 1px solid #e0e1e3; font-size: 0.85rem;
}
.cb-filter-body .form-control:focus,
.cb-filter-body .form-select:focus {
    border-color: #E34824;
    box-shadow: 0 0 0 0.2rem rgba(227,72,36,0.12);
}
.cb-filter-grid {
    display: grid; gap: 0.85rem; align-items: end;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.cb-filter-actions {
    padding-top: 1rem; border-top: 1px solid #EEEFF0;
    margin-top: 0.5rem; display: flex; justify-content: flex-end;
    gap: 0.5rem;
}
@media (max-width: 767.98px) {
    .cb-filter-grid { grid-template-columns: 1fr; }
    .cb-filter-actions { flex-direction: column; }
    .cb-filter-actions > * { width: 100%; }
}

/* —— Stats card pattern —— */
.cb-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.cb-stat-card {
    background: #fff;
    border: 1px solid #e0e1e3;
    padding: 1.15rem 1.25rem;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
}
a.cb-stat-card, a.cb-stat-card:hover, a.cb-stat-card:visited, a.cb-stat-card:focus {
    text-decoration: none;
    color: inherit;
}
.cb-stat-card::before {
    content: ''; position: absolute;
    left: 0; top: 0; bottom: 0; width: 4px;
    background: #6b7280;
}
.cb-stat-card--accent::before  { background: #E34824; }
.cb-stat-card--green::before   { background: #059669; }
.cb-stat-card--danger::before  { background: #dc2626; }
.cb-stat-card--amber::before   { background: #d97706; }
.cb-stat-card--info::before    { background: #0891b2; }
.cb-stat-card--muted::before   { background: #6b7280; }
.cb-stat {
    text-align: center; padding: 1.25rem 1rem;
    border: 1px solid #e0e1e3; background: #fff;
}
.cb-stat-icon {
    font-size: 0.95rem;
    color: #6b7280;
}
.cb-stat-num {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    color: #151515;
}
.cb-stat-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    margin-top: 0.25rem;
}
@media (max-width: 575.98px) {
    .cb-stats { grid-template-columns: 1fr 1fr; }
}

/* —— Form controls —— */
.cb-form-group, .cb-field-group { margin-bottom: 1rem; }
.cb-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    align-items: end;
}
.cb-form-label, .cb-required-label {
    font-size: 0.72rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.04em;
    color: #151515;
    display: block; margin-bottom: 0.35rem;
}
.cb-required { color: #dc2626; margin-left: 0.2rem; }
.cb-required-note { display: flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; color: var(--cb-muted); }
.cb-required-dot { color: var(--cb-danger); font-weight: 700; font-size: 1rem; line-height: 1; }
.cb-form-control, .cb-form-select {
    border: 1px solid #e0e1e3; border-radius: 0;
    font-size: 0.85rem; color: #151515;
    padding: 0.5rem 0.75rem; width: 100%; background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.cb-form-control:focus, .cb-form-select:focus {
    border-color: #E34824;
    box-shadow: 0 0 0 0.2rem rgba(227,72,36,0.12);
}
.cb-form-control[readonly], .cb-form-control[disabled] { background: #EEEFF0; }
.cb-form-control::placeholder { color: #9ca3af; }
textarea.cb-form-control { resize: vertical; min-height: 80px; }
.cb-form-text { font-size: 0.72rem; color: #9ca3af; margin-top: 0.25rem; }
.cb-field-error, .cb-form-error {
    font-size: 0.72rem; color: #dc2626;
    margin-top: 0.25rem; display: block;
}
.cb-form-check {
    display: flex; align-items: center; gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.cb-form-check input[type="checkbox"], .cb-form-check input[type="radio"] {
    width: 16px; height: 16px;
    border: 1px solid #e0e1e3; border-radius: 0;
    flex-shrink: 0; cursor: pointer;
    accent-color: #E34824;
}
.cb-form-check label {
    font-size: 0.82rem; color: #151515;
    cursor: pointer; margin: 0;
}

/* —— Wrapper form Bootstrap-native (rosso/accent) —— */
.cb-form .form-label { font-size: 0.8rem; font-weight: 600; color: #151515; margin-bottom: 0.3rem; }
.cb-form .form-label .text-danger { color: #dc2626 !important; }
.cb-form--accent .form-label .text-danger { color: #E34824 !important; font-weight: 700; }
.cb-form .form-control, .cb-form .form-select {
    border-radius: 0; border: 1px solid #e0e1e3;
    font-size: 0.85rem; padding: 0.55rem 0.8rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.cb-form .form-control:focus, .cb-form .form-select:focus {
    border-color: #E34824;
    box-shadow: 0 0 0 0.2rem rgba(227,72,36,0.12);
}
.cb-form textarea.form-control { resize: vertical; }
.cb-form .text-danger { font-size: 0.72rem; }
.cb-form small, .cb-form .form-text { font-size: 0.72rem; color: #9ca3af; }
.cb-form .input-group-text {
    border-radius: 0; border: 1px solid #e0e1e3;
    background: #EEEFF0; font-size: 0.85rem;
    font-weight: 600; color: #151515;
}
.cb-form .form-check-input { border-radius: 0; border: 1px solid #e0e1e3; }
.cb-form .form-check-input:checked { background-color: #E34824; border-color: #E34824; }
.cb-form .form-check-input:focus { box-shadow: 0 0 0 0.2rem rgba(227,72,36,0.12); border-color: #E34824; }
.cb-form--amber-check .form-check-input:checked { background-color: #d97706; border-color: #d97706; }
.cb-form--green-check .form-check-input:checked { background-color: #059669; border-color: #059669; }
.cb-form .form-check-label { font-size: 0.85rem; color: #151515; }
.cb-form .alert-danger {
    border-radius: 0; border: 1px solid #e0e1e3;
    border-left: 4px solid #dc2626;
    background: rgba(220,38,38,0.04);
    font-size: 0.85rem;
}
.cb-form--accent .alert-danger {
    border-left-color: #E34824;
    background: rgba(227,72,36,0.04);
}

/* —— Progress bar pattern —— */
.cb-progress-wrap { margin-top: 0.35rem; }
.cb-progress {
    height: 8px; background: #EEEFF0;
    overflow: hidden; border-radius: 0;
}
.cb-progress--lg { height: 20px; }
.cb-progress-bar {
    height: 100%;
    transition: width 0.3s ease;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.72rem; font-weight: 700; color: #fff;
}
.cb-progress-bar--accent { background: #E34824; }
.cb-progress-bar--green  { background: #059669; }
.cb-progress-bar--amber  { background: #d97706; }
.cb-progress-bar--danger { background: #dc2626; }
.cb-progress-bar--info   { background: #0891b2; }
.cb-progress-bar--gray   { background: #6b7280; }
.cb-progress-note {
    font-size: 0.68rem; color: #9ca3af; margin-top: 0.2rem;
}

/* —— Header bar utilities —— */
.cb-header-actions {
    display: flex; align-items: center;
    gap: 0.5rem; flex-wrap: wrap;
}
.cb-header-badges {
    display: flex; align-items: center;
    gap: 0.5rem; flex-wrap: wrap;
}
.cb-header-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 22px; height: 22px; padding: 0 0.4rem;
    font-size: 0.7rem; font-weight: 700;
    background: rgba(107,114,128,0.1); color: #6b7280;
    border-radius: 0;
}
.cb-header-count--accent { background: rgba(227,72,36,0.1);  color: #E34824; }
.cb-header-count--green  { background: rgba(5,150,105,0.1);  color: #059669; }
.cb-header-count--danger { background: rgba(220,38,38,0.1);  color: #dc2626; }
.cb-header-count--amber  { background: rgba(217,119,6,0.1);  color: #d97706; }
.cb-header-count--cyan   { background: rgba(8,145,178,0.1);  color: #0891b2; }
.cb-header-left {
    display: flex; align-items: flex-start;
    gap: 0.85rem; min-width: 0; flex: 1;
}
.cb-header-right {
    display: flex; align-items: center;
    gap: 0.5rem; flex-wrap: wrap; flex-shrink: 0;
}
.cb-header-text {
    display: flex; flex-direction: column;
    min-width: 0;
}
.cb-header-inner {
    display: flex; align-items: center;
    gap: 0.75rem; min-width: 0;
}
@media (max-width: 575.98px) {
    .cb-header-actions { width: 100%; }
    .cb-header-actions > * { flex: 1 1 auto; }
}

/* —— Sidebar sticky (right column on detail pages) —— */
.cb-sidebar-sticky {
    position: sticky;
    top: 72px;
    z-index: 10;
}
@media (max-width: 991.98px) {
    .cb-sidebar-sticky { position: static; }
}
.cb-sidebar-sticky .cb-btn {
    width: 100%;
    justify-content: center;
    margin-bottom: 0.5rem;
}
.cb-sidebar-sticky .cb-btn:last-child { margin-bottom: 0; }

/* —— Modal custom pattern (not Bootstrap) —— */
.cb-modal-content {
    border-radius: 0 !important;
    border: 1px solid #e0e1e3;
    background: #fff;
}
.cb-modal-header {
    position: relative;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e0e1e3;
    display: flex; align-items: center; justify-content: space-between;
    gap: 0.5rem;
}
.cb-modal-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #151515;
    margin: 0;
    display: flex; align-items: center; gap: 0.5rem;
}
.cb-modal-body {
    padding: 1.5rem;
    font-size: 0.85rem;
    color: #151515;
}
.cb-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e0e1e3;
    display: flex; justify-content: flex-end; gap: 0.5rem;
}
.cb-modal-close {
    background: none; border: none;
    color: #9ca3af; cursor: pointer;
    font-size: 1.1rem; line-height: 1; padding: 0;
    transition: color 0.15s;
}
.cb-modal-close:hover { color: #151515; }
.cb-modal-note {
    font-size: 0.78rem;
    color: #6b7280;
    margin-top: 0.5rem;
}
.cb-modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.4);
    display: none;
    align-items: center; justify-content: center;
    z-index: 1050;
}
.cb-modal-backdrop.active { display: flex; }
@media (max-width: 575.98px) {
    .cb-modal-footer { flex-direction: column; }
    .cb-modal-footer > * { width: 100%; }
}

/* —— Input group + search —— */
.cb-input-group {
    display: flex; align-items: stretch; width: 100%;
}
.cb-input-group-text {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 0.75rem;
    background: #EEEFF0;
    border: 1px solid #e0e1e3;
    border-right: none;
    color: #6b7280; font-size: 0.85rem;
}
.cb-input-group .cb-form-control,
.cb-input-group input,
.cb-input-group select {
    flex: 1 1 auto; min-width: 0;
    border-radius: 0;
}
.cb-search-wrap {
    position: relative;
    width: 100%;
}
.cb-search-icon {
    position: absolute; left: 0.65rem; top: 50%;
    transform: translateY(-50%);
    color: #9ca3af; pointer-events: none;
    font-size: 0.82rem;
}
.cb-search-input {
    padding: 0.5rem 0.75rem 0.5rem 2rem !important;
    border: 1px solid #e0e1e3 !important;
    border-radius: 0 !important;
    width: 100%;
    font-size: 0.85rem;
    color: #151515;
    background: #fff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.cb-search-input:focus {
    border-color: #E34824 !important;
    box-shadow: 0 0 0 0.2rem rgba(227,72,36,0.12);
}

/* —— Toolbar utility —— */
.cb-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem;
}
.cb-toolbar-left {
    display: flex; align-items: center; gap: 0.65rem;
}
.cb-toolbar-right {
    display: flex; align-items: center; gap: 0.5rem; margin-left: auto;
}
.cb-toolbar-title {
    font-size: 1rem; font-weight: 700; color: #151515; margin: 0;
    display: flex; align-items: center; gap: 0.5rem;
}

/* —— Pagination footer —— */
.cb-pagination-footer {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap;
    padding: 0.85rem 1.25rem;
    border-top: 1px solid #e0e1e3;
    background: #fafbfc;
}
.cb-pagination-info {
    font-size: 0.78rem; color: #6b7280;
}
@media (max-width: 575.98px) {
    .cb-pagination-footer { flex-direction: column; align-items: stretch; }
}

/* —— Pagination links —— */
.cb-page-link {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 34px; height: 34px; padding: 0 0.5rem;
    font-size: 0.82rem; font-weight: 500; color: #151515;
    border: 1px solid #e0e1e3; background: #fff;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.cb-page-link:not(:last-child) { border-right: none; }
.cb-page-link:hover:not(.disabled):not(.active) {
    background: rgba(227,72,36,0.06);
    color: #E34824;
}
.cb-page-link.active {
    background: #E34824; color: #fff; border-color: #E34824;
}
.cb-page-link.active + .cb-page-link { border-left-color: #E34824; }
.cb-page-link.disabled {
    color: #9ca3af; pointer-events: none; opacity: 0.5;
}
.cb-page-item {
    display: inline-flex; align-items: center;
}
.cb-pagination {
    display: flex; align-items: center; justify-content: center;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
}
.cb-pagination .page-item { list-style: none; }
.cb-pagination .page-link {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 34px; height: 34px; padding: 0 0.6rem;
    font-size: 0.82rem; font-weight: 500; color: #151515;
    border: 1px solid #e0e1e3; background: #fff;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.cb-pagination .page-item:not(:last-child) .page-link { border-right: none; }
.cb-pagination .page-item:not(.disabled):not(.active) .page-link:hover {
    background: rgba(227,72,36,0.06);
    color: #E34824;
}
.cb-pagination .page-item.active .page-link {
    background: #E34824; color: #fff; border-color: #E34824;
}
.cb-pagination .page-item.disabled .page-link {
    color: #9ca3af; pointer-events: none; opacity: 0.5;
}
.pg-info {
    text-align: center;
    font-size: 0.78rem; color: #6b7280;
    margin-top: 0.5rem;
}

/* —— Tabelle —— */
.cb-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.cb-table thead th {
    background: #151515; color: #fff;
    padding: 0.85rem 1rem; font-weight: 600; font-size: 0.75rem;
    text-transform: uppercase; letter-spacing: 0.03em;
    text-align: left; border: none; white-space: nowrap;
}
.cb-table tbody td {
    padding: 0.85rem 1rem; border-bottom: 1px solid #EEEFF0;
    vertical-align: middle; color: #151515;
}
.cb-table tbody tr:last-child td { border-bottom: none; }
.cb-table tbody tr:hover { background: rgba(227,72,36,0.03); }
.cb-table-actions { display: inline-flex; gap: 0.25rem; }

/* —— Empty state —— */

/* —— ID code (codice monospace inline) —— */
.cb-id-code {
    font-size: 0.8rem; font-family: monospace;
    background: #EEEFF0; color: #E34824;
    padding: 0.15rem 0.4rem; border-radius: 0;
}

/* —— Link cella nome (tabella) —— */
.cb-td-nome { font-weight: 600; color: #151515; }
.cb-link { color: #E34824; text-decoration: none; font-weight: 600; }
.cb-link:hover { color: #c93d1e; text-decoration: underline; }

/* FINE CB UTILITIES */

/* BOOTSTRAP FORM-SWITCH OVERRIDE */
.form-switch .form-check-input {
    border-radius: 0 !important;
    border: 1px solid var(--cb-border);
    background-color: var(--cb-border);
    width: 44px; height: 24px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}
.form-switch .form-check-input:checked { background-color: var(--cb-green); border-color: var(--cb-green); }
.form-switch .form-check-input:focus { box-shadow: 0 0 0 0.2rem rgba(227,72,36,0.12); border-color: var(--cb-accent); }
.form-switch .form-check-label { font-size: 0.82rem; color: var(--cb-gray); }
/* FULLCALENDAR OVERRIDES */
.fc-event { border-radius: 0 !important; cursor: pointer; font-size: 0.8rem; padding: 2px 5px; }
.fc-event:hover { opacity: 0.88; }
.fc .fc-button { border-radius: 0 !important; font-size: 0.82rem; font-weight: 600; }
.fc .fc-button-primary { background-color: var(--cb-accent); border-color: var(--cb-accent); }
.fc .fc-button-primary:hover { background-color: var(--cb-accent-hover); border-color: var(--cb-accent-hover); }
.fc .fc-button-primary:not(:disabled).fc-button-active { background-color: var(--cb-dark); border-color: var(--cb-dark); }
.fc .fc-daygrid-day.fc-day-today { background: rgba(227,72,36,0.04) !important; }
.fc .fc-toolbar-title { font-size: 1.2rem; font-weight: 700; color: var(--cb-dark); }
.fc .fc-daygrid-day-number { font-size: 0.78rem; color: var(--cb-gray); text-decoration: none; }
.fc .fc-daygrid-day.fc-day-today .fc-daygrid-day-number { color: var(--cb-accent); font-weight: 700; }

/* INDEX PAGE STYLES */

/* ---------- Hero ---------- */
.t-hero {
    background: #151515;
    padding: 4rem 2rem;
    position: relative;
    overflow: hidden;
}
.t-hero::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -80px;
    width: 500px;
    height: 500px;
    background: rgba(227, 72, 36, 0.06);
    transform: rotate(45deg);
}
.t-hero::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -60px;
    width: 360px;
    height: 360px;
    background: rgba(227, 72, 36, 0.04);
    transform: rotate(25deg);
}
.t-hero__badge {
    display: inline-block;
    background: rgba(227, 72, 36, 0.15);
    color: #E34824;
    border: 1px solid rgba(227, 72, 36, 0.3);
    padding: 0.25rem 0.85rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 0;
    margin-bottom: 1rem;
}
.t-hero__title {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: #FFFFFF;
    margin-bottom: 1rem;
    line-height: 1.15;
}
.t-hero__subtitle {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.65);
    max-width: 540px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

/* Buttons */
.t-btn-primary {
    background: #E34824;
    color: #FFFFFF;
    border: 2px solid #E34824;
    padding: 0.7rem 1.75rem;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 0;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}
.t-btn-primary:hover {
    background: #c93d1e;
    border-color: #c93d1e;
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(227, 72, 36, 0.3);
}
.t-btn-outline {
    background: transparent;
    color: #FFFFFF;
    border: 2px solid rgba(255, 255, 255, 0.35);
    padding: 0.7rem 1.75rem;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 0;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}
.t-btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.6);
    color: #FFFFFF;
    transform: translateY(-1px);
}

/* ---------- Features ---------- */
.t-features {
    padding: 3rem 2rem;
    background: #FFFFFF;
}
.t-feature-card {
    background: #FFFFFF;
    border: 1px solid #EEEFF0;
    border-radius: 0;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.25s ease;
    height: 100%;
}
.t-feature-card:hover {
    border-color: #E34824;
    box-shadow: 0 4px 20px rgba(227, 72, 36, 0.08);
    transform: translateY(-3px);
}
.t-feature-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    background: rgba(227, 72, 36, 0.08);
    border: 1px solid rgba(227, 72, 36, 0.15);
    border-radius: 0;
}
.t-feature-icon svg { color: #E34824; }
.t-feature-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #151515;
    margin-bottom: 0.6rem;
}
.t-feature-card p {
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

/* ---------- Quick Actions ---------- */
.t-quick-actions {
    background: #EEEFF0;
    padding: 3rem 2rem;
    border-top: 1px solid #e0e1e3;
}
.t-section-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #151515;
    margin-bottom: 0.6rem;
    text-align: center;
}
.t-action-card {
    background: #FFFFFF;
    border: 1px solid #e0e1e3;
    border-radius: 0;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all 0.25s ease;
    text-decoration: none;
    display: block;
    height: 100%;
}
.t-action-card:hover {
    border-color: #E34824;
    box-shadow: 0 4px 14px rgba(227, 72, 36, 0.08);
    transform: translateY(-2px);
    text-decoration: none;
}
.t-action-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    background: rgba(227, 72, 36, 0.08);
    border: 1px solid rgba(227, 72, 36, 0.15);
    border-radius: 0;
}
.t-action-icon svg { color: #E34824; }
.t-action-card h6 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #151515;
    margin: 0;
}

/* ---------- CTA ---------- */
.t-cta {
    padding: 3.5rem 2rem;
    background: #FFFFFF;
}
.t-cta h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #151515;
    margin-bottom: 0.6rem;
}
.t-cta p {
    color: #6b7280;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}
.t-btn-cta {
    background: #E34824;
    color: #FFFFFF;
    border: 2px solid #E34824;
    padding: 0.7rem 2rem;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 0;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}
.t-btn-cta:hover {
    background: #c93d1e;
    border-color: #c93d1e;
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(227, 72, 36, 0.3);
}

/* Accent line */
.t-accent-line {
    width: 48px;
    height: 3px;
    background: #E34824;
    margin: 0 auto 1.25rem;
    border-radius: 0;
}

/* DASHBOARD —— prefisso db- */

/* --- Hero benvenuto --- */
.db-hero {
    background: linear-gradient(135deg, #fff 0%, rgba(227,72,36,0.02) 100%);
    border: 1px solid #e0e1e3;
    position: relative;
    overflow: hidden;
    padding: 1.5rem 1.5rem 1.5rem 1.75rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.db-hero::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 6px;
    background: linear-gradient(180deg, #E34824, #c93d1e);
}
.db-hero-info { flex: 1; }
.db-hero-roles { display: flex; gap: 0.35rem; flex-wrap: wrap; flex-shrink: 0; }
.db-hero-avatar {
    width: 52px; height: 52px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; font-weight: 700; letter-spacing: 0.02em;
    background: rgba(227,72,36,0.1); color: #E34824;
    border: 1px solid rgba(227,72,36,0.2);
    flex-shrink: 0;
}
.db-hero-name {
    font-size: 1.4rem; font-weight: 700; color: #151515;
    letter-spacing: -0.025em; margin: 0;
}
.db-hero-date {
    font-size: 0.82rem; color: #6b7280; font-weight: 400;
}

/* --- Stat cards grid (——6.11) --- */
.db-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
    grid-column: 1 / -1;
}
.db-stat {
    background: #fff;
    border: 1px solid #e0e1e3;
    padding: 1.15rem 1.25rem;
    transition: transform 0.2s ease, border-color 0.25s ease;
    position: relative;
    overflow: hidden;
}
.db-stat:hover {
    transform: translateY(-2px);
    border-color: #E34824;
}
.db-stat::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.db-stat--green::before { background: #059669; }
.db-stat--danger::before { background: #dc2626; }
.db-stat--accent::before { background: #E34824; }
.db-stat--muted::before { background: #6b7280; }
.db-stat--green .db-stat-num { color: #059669; }
.db-stat--danger .db-stat-num { color: #dc2626; }
.db-stat--accent .db-stat-num { color: #E34824; }
.db-stat--muted .db-stat-num { color: #6b7280; }
.db-stat--green .db-stat-icon { color: #059669; }
.db-stat--danger .db-stat-icon { color: #dc2626; }
.db-stat--accent .db-stat-icon { color: #E34824; }
.db-stat--muted .db-stat-icon { color: #6b7280; }
.db-stat-top {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}
.db-stat-icon {
    font-size: 0.95rem;
    opacity: 0.6;
}
.db-stat-num {
    font-size: 2rem; font-weight: 800; line-height: 1;
}
.db-stat-label {
    font-size: 0.68rem; font-weight: 600; color: #6b7280;
    text-transform: uppercase; letter-spacing: 0.03em;
}

/* --- Content area: flex wrap --- */
.db-content {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}
/* Card half-width (2 per riga) */
.db-content > .db-card {
    flex: 1 1 calc(50% - 0.625rem);
    min-width: 300px;
    margin-bottom: 0;
}
/* Full-width elements */
.db-content > .db-card--full,
.db-content > .db-stats,
.db-content > .db-row-2,
.db-content > .db-cal-card {
    flex: 0 0 100%;
    margin-bottom: 0;
}

/* --- Light card header (label style, no border, no icon-box) --- */
.db-card-header--light {
    padding: 0.85rem 1.15rem;
}
.db-card-header--light .db-card-title {
    font-size: 0.82rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.db-card-header--light .db-icon-box { display: none; }

/* --- Calendar full-width inside content --- */
.db-content > .db-cal-card {
    grid-column: 1 / -1;
}

/* --- Header count badge --- */
.db-header-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 22px; height: 22px;
    padding: 0 0.4rem;
    font-size: 0.7rem; font-weight: 700;
    margin-left: 0.35rem;
}
.db-header-count--green { background: rgba(5,150,105,0.1); color: #059669; }
.db-header-count--danger { background: rgba(220,38,38,0.1); color: #dc2626; }
.db-header-count--amber { background: rgba(217,119,6,0.1); color: #d97706; }
.db-header-count--accent { background: rgba(227,72,36,0.1); color: #E34824; }
.db-header-count--cyan { background: rgba(8,145,178,0.1); color: #0891b2; }

/* --- Card (——6.2) --- */
.db-card {
    background: #fff;
    border: 1px solid #e0e1e3;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.db-card-header-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.db-card-body--list { padding: 0.5rem 1.5rem; }

/* Accent bar variants */
.db-card-header--accent::before  { background: #E34824; }

/* Icon box (——6.2) */
.db-icon-box {
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid;
    flex-shrink: 0;
    font-size: 0.85rem;
}

/* --- Outline button (——6.1 outline piccoli) --- */
.db-btn-outline {
    background: transparent;
    font-size: 0.82rem; font-weight: 600;
    padding: 0.4rem 0.8rem;
    border: 1px solid;
    text-decoration: none;
    display: inline-flex; align-items: center; gap: 0.3rem;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    cursor: pointer;
}
.db-btn-outline--accent {
    color: #E34824; border-color: rgba(227,72,36,0.2);
}
.db-btn-outline--accent:hover {
    background: rgba(227,72,36,0.04); border-color: #E34824; color: #E34824; text-decoration: none;
}
.db-btn-outline--green {
    color: #059669; border-color: rgba(5,150,105,0.2);
}
.db-btn-outline--green:hover {
    background: rgba(5,150,105,0.04); border-color: #059669; color: #059669; text-decoration: none;
}
.db-btn-outline--cyan {
    color: #0891b2; border-color: rgba(8,145,178,0.2);
}
.db-btn-outline--cyan:hover {
    background: rgba(8,145,178,0.04); border-color: #0891b2; color: #0891b2; text-decoration: none;
}
.db-btn-outline--amber {
    color: #d97706; border-color: rgba(217,119,6,0.2);
}
.db-btn-outline--amber:hover {
    background: rgba(217,119,6,0.04); border-color: #d97706; color: #d97706; text-decoration: none;
}
.db-btn-outline--danger {
    color: #dc2626; border-color: rgba(220,38,38,0.2);
}
.db-btn-outline--danger:hover {
    background: rgba(220,38,38,0.04); border-color: #dc2626; color: #dc2626; text-decoration: none;
}

/* --- Badges (——6.3) --- */

/* --- List items (scadenze, assegnazioni, contratti) --- */
.db-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #EEEFF0;
    gap: 0.75rem;
}
.db-list-item:last-child { border-bottom: none; }
.db-list-item-sub {
    font-size: 0.75rem; color: #6b7280; margin-top: 0.1rem;
}
.db-list-item-meta {
    font-size: 0.78rem; color: #6b7280; font-weight: 500;
    display: flex; align-items: center; gap: 0.25rem;
    white-space: nowrap; flex-shrink: 0;
}
.db-list-item:hover { background: rgba(227,72,36,0.03); }

/* --- Inline stat row (parco mezzi) --- */
.db-inline-stats {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
}
.db-inline-stat {
    text-align: center;
    padding: 0.75rem 0.5rem;
}
.db-inline-stat-num {
    font-size: 1.5rem; font-weight: 700; line-height: 1.1;
}
.db-inline-stat-label {
    font-size: 0.68rem; font-weight: 600; color: #6b7280;
    text-transform: uppercase; letter-spacing: 0.03em;
    margin-top: 0.2rem;
}
.db-inline-stat-footer {
    display: flex; gap: 1.5rem; padding-top: 0.75rem;
    border-top: 1px solid #EEEFF0; margin-top: 0.75rem;
}
.db-inline-stat-footer span {
    font-size: 0.82rem; color: #6b7280;
}
.db-inline-stat-footer strong {
    color: #151515; font-weight: 600;
}

/* --- Table (——6.9) --- */

.db-table thead th {
    background: #151515; color: #fff;
    font-size: 0.75rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.03em;
    padding: 0.65rem 1rem;
    text-align: left;
}
.db-table tbody td {
    font-size: 0.85rem; color: #151515;
    padding: 0.65rem 1rem;
    border-bottom: 1px solid #EEEFF0;
}
.db-table tbody tr:hover {
    background: rgba(227,72,36,0.03);
}
.db-table-action {
    width: 32px; height: 32px;
    border: 1px solid rgba(107,114,128,0.15);
    background: transparent;
    display: inline-flex; align-items: center; justify-content: center;
    color: #6b7280;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.db-table-action:hover {
    border-color: #E34824; color: #E34824;
    background: rgba(227,72,36,0.04);
}

/* --- Gare per stato grid --- */
.db-gare-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
}
.db-gare-stat {
    border: 1px solid #e0e1e3;
    padding: 0.85rem 0.6rem;
    text-align: center;
    transition: border-color 0.2s ease;
}
.db-gare-stat:hover { border-color: #E34824; }
.db-gare-stat-num {
    font-size: 1.35rem; font-weight: 700; color: #E34824;
}
.db-gare-stat-label {
    font-size: 0.68rem; font-weight: 600; color: #6b7280;
    text-transform: uppercase; letter-spacing: 0.02em;
    margin-top: 0.2rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- Calendar card --- */
.db-cal-card {
    background: #fff;
    border: 1px solid #e0e1e3;
    overflow: hidden;
}
.db-cal-body { padding: 1rem 1.25rem; }

/* --- Legend --- */
.db-legend {
    display: flex; flex-wrap: wrap; gap: 0.35rem 1rem;
}
.db-legend-item {
    display: flex; align-items: center; gap: 0.3rem;
    font-size: 0.75rem; color: #6b7280; font-weight: 500;
}
.db-legend-dot {
    width: 10px; height: 10px; flex-shrink: 0;
}

/* --- FullCalendar overrides --- */
.db-cal-body .fc-event { border-radius: 0 !important; font-size: 0.78rem; }
.db-cal-body .fc .fc-button { border-radius: 0 !important; }
.db-cal-body .fc .fc-button-primary {
    background-color: #E34824; border-color: #E34824;
}
.db-cal-body .fc .fc-button-primary:hover {
    background-color: #c93d1e;
}
.db-cal-body .fc .fc-button-primary:not(:disabled).fc-button-active {
    background-color: #151515;
}
.db-cal-body .fc .fc-daygrid-day.fc-day-today {
    background: rgba(227,72,36,0.04);
}
.db-cal-body .fc .fc-toolbar-title {
    font-size: 1.1rem; font-weight: 700; color: #151515;
}

/* --- Targa badge inline --- */
.db-targa {
    display: inline-flex;
    padding: 0.15rem 0.5rem;
    font-size: 0.72rem; font-weight: 700;
    background: rgba(21,21,21,0.06);
    border: 1px solid rgba(21,21,21,0.15);
    color: #151515;
    letter-spacing: 0.02em;
    margin-right: 0.35rem;
}

/* RESPONSIVE */
@media (max-width: 991.98px) {
    .db-content > .db-card {
        flex: 0 0 100%;
    }
    .db-row-2 {
        flex-direction: column;
    }
    .db-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .db-inline-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    .db-gare-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 575.98px) {
    .db-stats {
        grid-template-columns: 1fr 1fr;
    }
    .db-inline-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .db-gare-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .db-hero {
        flex-direction: column;
        align-items: flex-start;
    }
    .db-hero-name {
        font-size: 1.15rem;
    }
    .db-hero-roles { width: 100%; }
}

/* MEZZI INDEX PAGE STYLES */

/* —— Variabili —— */

.mi-toggle-btn {
    background: none; border: none; padding: 0; cursor: pointer;
    color: var(--cb-gray); display: flex; align-items: center; gap: 0.35rem;
    font-size: 0.8rem; font-weight: 600; margin-left: auto;
}
.mi-toggle-btn i { transition: transform 0.2s ease; }
.mi-toggle-btn.collapsed i { transform: rotate(-90deg); }
.mi-toggle-btn:hover { color: var(--cb-dark); }

.mi-btn-filter {
    padding: 0.45rem 1.1rem; font-weight: 600; font-size: 0.82rem;
    border-radius: 0; display: inline-flex; align-items: center;
    gap: 0.4rem; cursor: pointer; border: 2px solid;
    background: var(--cb-accent); color: #fff; border-color: var(--cb-accent);
    transition: background 0.2s;
}
.mi-btn-filter:hover { background: var(--cb-accent-hover); border-color: var(--cb-accent-hover); }

/* —— Tabella —— */
.mi-table-wrap {
    background: var(--cb-white); border: 1px solid var(--cb-border); overflow-x: auto;
}

/* Targa */
.mi-targa {
    font-weight: 700; font-size: 0.88rem; color: var(--cb-dark);
    font-family: monospace; letter-spacing: 0.05em;
}
/* Veicolo */

/* Info secondaria sotto badge */
.mi-sub { font-size: 0.72rem; color: var(--cb-muted); margin-top: 0.2rem; display: block; }
.mi-sub-info { font-size: 0.72rem; color: var(--cb-cyan); margin-top: 0.2rem; display: block; }

/* KM */
.mi-km { font-size: 0.82rem; color: var(--cb-dark); font-variant-numeric: tabular-nums; }
.mi-km-empty { font-size: 0.82rem; color: var(--cb-muted); font-style: italic; }

/* Alert icone colonna —— */
.mi-alerts { display: flex; align-items: center; gap: 0.35rem; }
.mi-alert-icon { font-size: 1rem; }

/* —— Badge —— */

.mi-action-btn {
    width: 32px; height: 32px; border: 1px solid; background: transparent;
    display: inline-flex; align-items: center; justify-content: center;
    text-decoration: none; transition: background 0.15s, border-color 0.15s;
    font-size: 0.85rem; border-radius: 0; cursor: pointer;
}
.mi-action-btn--green  { border-color: rgba(5,150,105,0.2);  color: var(--cb-green); }
.mi-action-btn--green:hover  { background: rgba(5,150,105,0.08);  border-color: var(--cb-green); }
.mi-action-btn--cyan   { border-color: rgba(8,145,178,0.2);   color: var(--cb-cyan); }
.mi-action-btn--cyan:hover   { background: rgba(8,145,178,0.08);   border-color: var(--cb-cyan); }
.mi-action-btn--amber  { border-color: rgba(217,119,6,0.2);   color: var(--cb-amber); }
.mi-action-btn--amber:hover  { background: rgba(217,119,6,0.08);   border-color: var(--cb-amber); }
.mi-action-btn--danger { border-color: rgba(220,38,38,0.2);   color: var(--cb-danger); }
.mi-action-btn--danger:hover { background: rgba(220,38,38,0.08);   border-color: var(--cb-danger); }

/* —— Empty state —— */
.mi-empty {
    padding: 3rem 2rem; text-align: center;
    background: var(--cb-white); border: 1px solid var(--cb-border);
}

/* —— Responsive —— */
@media (max-width: 991.98px) {
    .mi-form-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 575.98px) {
    .mi-form-row { grid-template-columns: 1fr; }
    .mi-header    { flex-direction: column; }
}

/* MEZZI CREATE PAGE STYLES */

/* —— Card header (locale: variant accent/cyan/amber/green/gray/neutral) —— */

/* —— Titoli sezione form —— */
.mc-section-title {
    font-size: 0.82rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.03em; color: var(--cb-gray);
    display: flex; align-items: center; gap: 0.4rem;
    margin-bottom: 0.75rem;
}
.mc-section-title i { color: var(--cb-accent); }

/* Textarea */
.mc-textarea {
    border: 1px solid var(--cb-border); font-size: 0.85rem;
    border-radius: 0; padding: 0.55rem 0.75rem;
    width: 100%; background: #fff; color: var(--cb-dark);
    resize: vertical; transition: border-color 0.2s, box-shadow 0.2s;
}
.mc-textarea:focus {
    outline: none; border-color: var(--cb-accent);
    box-shadow: 0 0 0 0.2rem rgba(227,72,36,0.12);
}

.mc-form-row-2 { grid-template-columns: repeat(2, 1fr); }
.mc-form-row-3 { grid-template-columns: repeat(3, 1fr); }

/* —— Barra azioni bottom —— */
.mc-actions-card {
    background: var(--cb-white); border: 1px solid var(--cb-border);
    border-radius: 0; padding: 1rem 1.5rem;
    display: flex; align-items: center;
    justify-content: space-between; gap: 1rem;
    flex-wrap: wrap; margin-top: 0.5rem;
}

/* —— Responsive —— */
@media (max-width: 767.98px) {
    .mc-form-row-2 { grid-template-columns: 1fr; }
    .mc-form-row-3 { grid-template-columns: 1fr; }
}

/* MEZZI DETAILS PAGE STYLES */

/* —— Variabili —— */

/* —— Alert scadenze —— */

.md-alert-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 0.1rem; }
.md-alert-title { font-size: 0.85rem; font-weight: 700; margin-bottom: 0.35rem; }
.md-alert-list { list-style: none; padding: 0; margin: 0; font-size: 0.82rem; display: flex; flex-direction: column; gap: 0.2rem; }

/* —— Campi dettaglio —— */

.md-field-value--lg { font-size: 1.1rem; font-weight: 700; font-family: monospace; letter-spacing: 0.05em; }

/* —— Badge —— */

/* —— Box info prenotazione —— */
.md-info-box {
    background: rgba(8,145,178,0.04); border-left: 3px solid var(--cb-cyan);
    padding: 0.65rem 0.85rem; font-size: 0.82rem; margin-bottom: 1rem;
}
.md-info-box i { color: var(--cb-cyan); margin-right: 0.3rem; }

/* —— Assegnazioni storico —— */
.md-assegnazione-item {
    padding: 0.75rem 0; border-bottom: 1px solid var(--cb-light);
    display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
}
.md-assegnazione-item:last-child { border-bottom: none; }
.md-assegnazione-nome { font-size: 0.85rem; font-weight: 600; color: var(--cb-dark); margin-bottom: 0.25rem; }
.md-assegnazione-meta { font-size: 0.72rem; color: var(--cb-muted); }
.md-assegnazione-meta-green { font-size: 0.72rem; color: var(--cb-green); }
.md-assegnazione-meta-accent { font-size: 0.72rem; color: var(--cb-accent); }

/* —— Disponibile card —— */
.md-disponibile {
    background: var(--cb-white); border: 1px solid var(--cb-border);
    border-left: 4px solid var(--cb-green);
    padding: 1.5rem; text-align: center; margin-bottom: 1rem;
}
.md-disponibile-icon { font-size: 2rem; color: var(--cb-green); margin-bottom: 0.5rem; }
.md-disponibile-title { font-size: 0.95rem; font-weight: 700; color: var(--cb-green); margin-bottom: 1rem; }

/* —— Note box —— */

/* —— Sidebar sticky —— */
.md-sidebar { position: sticky; top: 72px; z-index: 10; align-self: flex-start; }

/* —— Audit fields (vertical) —— */

.md-sys-row   { padding: 0.5rem 0; border-bottom: 1px solid var(--cb-light); }
.md-sys-row:last-child { border-bottom: none; }

/* Outline piccoli sidebar */
.md-btn-outline {
    background: transparent; font-weight: 600; font-size: 0.82rem;
    border-radius: 0; display: inline-flex; align-items: center; gap: 0.35rem;
    text-decoration: none; cursor: pointer; width: 100%; justify-content: center;
    padding: 0.4rem 0.9rem; transition: background 0.15s, border-color 0.15s;
    border: 1px solid;
}

/* —— Responsive —— */
@media (max-width: 991.98px) {
    .md-fields-grid { grid-template-columns: 1fr; }
    .md-field--full { grid-column: 1; }
    .md-sidebar { position: static; }
}
@media (max-width: 575.98px) {
    .md-header { flex-direction: column; }
}

/* MEZZI EDIT PAGE STYLES */

/* —— Variabili —— */

/* Hint sotto field: posizione assoluta per non alterare altezza riga e mantenere allineamento field */
.me-form-row > div { position: relative; }
.me-form-row > div > .me-form-text {
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 0.2rem;
    font-size: 0.7rem;
    line-height: 1.2;
    white-space: nowrap;
}
@media (max-width: 767.98px) {
    .me-form-row > div > .me-form-text {
        position: static;
        white-space: normal;
    }
}

/* Textarea */
.me-textarea {
    border: 1px solid var(--cb-border); font-size: 0.85rem;
    border-radius: 0; padding: 0.55rem 0.75rem;
    width: 100%; background: #fff; color: var(--cb-dark);
    resize: vertical; transition: border-color 0.2s, box-shadow 0.2s;
}
.me-textarea:focus {
    outline: none; border-color: var(--cb-accent);
    box-shadow: 0 0 0 0.2rem rgba(227,72,36,0.12);
}

.me-form-row-2 { grid-template-columns: repeat(2, 1fr); }
.me-form-row-3 { grid-template-columns: repeat(3, 1fr); }

/* —— Barra azioni bottom —— */
.me-actions-card {
    background: var(--cb-white); border: 1px solid var(--cb-border);
    border-radius: 0; padding: 1rem 1.5rem;
    display: flex; align-items: center;
    justify-content: space-between; gap: 1rem;
    flex-wrap: wrap; margin-top: 0.5rem;
}
/* —— Responsive —— */
@media (max-width: 767.98px) {
    .me-form-row-2 { grid-template-columns: 1fr; }
    .me-form-row-3 { grid-template-columns: 1fr; }
}

/* MEZZI DELETE PAGE STYLES */

/* —— mdel- prefix: Mezzi Delete —— */

.mdel-alert-warning-title { font-size: 0.85rem; font-weight: 700; color: #d97706; margin-bottom: 0.25rem; }
.mdel-alert-warning-text { font-size: 0.85rem; color: #151515; margin: 0; }

/* Fields grid */

/* Separatore */
.mdel-sep-section { border-top: 1px solid #EEEFF0; margin: 1rem 0; }

/* Badge */

/* Targa highlight */
.mdel-targa { font-size: 1rem; font-weight: 700; color: #151515; letter-spacing: 0.04em; }

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

/* Responsive */
@media (max-width: 991.98px) {
    .mdel-fields-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 575.98px) {
    .mdel-page { padding: 1rem; }
    .mdel-fields-grid { grid-template-columns: 1fr; }
    .mdel-actions { flex-direction: column-reverse; }
    .mdel-btn { width: 100%; justify-content: center; }
}

/* MEZZI > DOCUMENTO DETAILS PAGE STYLES */

/* —— mdd- prefix: Mezzi DocumentoDetails —— */

/* Preview area */
.mdd-preview-pdf { width: 100%; height: 600px; display: block; border: none; }
.mdd-preview-img-wrap { text-align: center; padding: 1.5rem; background: #EEEFF0; }
.mdd-preview-img { max-height: 600px; max-width: 100%; cursor: zoom-in; }
.mdd-preview-img-hint { font-size: 0.72rem; color: #9ca3af; margin: 0.5rem 0 0 0; }
.mdd-preview-text iframe { width: 100%; min-height: 400px; border: none; display: block; }
.mdd-no-preview { text-align: center; padding: 3rem 1.5rem; }
.mdd-no-preview-icon { font-size: 4rem; color: #9ca3af; line-height: 1; margin-bottom: 1rem; opacity: 0.6; }
.mdd-no-preview-title { font-size: 1rem; font-weight: 600; color: #6b7280; margin-bottom: 0.5rem; }
.mdd-no-preview-text { font-size: 0.85rem; color: #9ca3af; margin-bottom: 1.5rem; }

/* Descrizione */
.mdd-desc-text { font-size: 0.85rem; color: #151515; margin: 0; }
.mdd-desc-empty { font-size: 0.85rem; color: #9ca3af; font-style: italic; margin: 0; }

/* Badge */

/* Scadenza countdown */
.mdd-scadenza-date { font-size: 1.5rem; font-weight: 700; color: #151515; text-align: center; margin-bottom: 0.5rem; }
.mdd-scadenza-nota { font-size: 0.72rem; color: #9ca3af; text-align: center; margin-top: 0.75rem; }

/* Entit—— correlata (Mezzo) */
.mdd-entity { display: flex; justify-content: space-between; align-items: center; padding: 0.85rem 1rem; border: 1px solid #EEEFF0; }
.mdd-entity:hover { background: rgba(227,72,36,0.02); }
.mdd-entity-label { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7280; }

/* Audit */
.mdd-audit-row { padding: 0.6rem 1.25rem; border-bottom: 1px solid #EEEFF0; }
.mdd-audit-row:last-child { border-bottom: none; }
.mdd-audit-label { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7280; display: block; margin-bottom: 0.15rem; }
.mdd-audit-value { font-size: 0.82rem; color: #151515; }

.mdd-btn-sm-accent    { border-color: rgba(227,72,36,0.2);   color: #E34824;  background: transparent; }
.mdd-btn-sm-accent:hover { background: rgba(227,72,36,0.04); border-color: #E34824; color: #E34824; text-decoration: none; }
.mdd-btn-sm-gray      { border-color: rgba(107,114,128,0.2); color: #6b7280;  background: transparent; }
.mdd-btn-sm-gray:hover { background: rgba(107,114,128,0.04); border-color: #6b7280; color: #151515; text-decoration: none; }
.mdd-btn-sm-amber     { border-color: rgba(217,119,6,0.2);   color: #d97706;  background: transparent; }
.mdd-btn-sm-amber:hover { background: rgba(217,119,6,0.04);  border-color: #d97706; color: #d97706; text-decoration: none; }
.mdd-sidebar-actions { display: flex; flex-direction: column; gap: 0.4rem; }

/* Preview header btn-group */
.mdd-preview-actions { display: flex; gap: 0.4rem; }

/* Sticky sidebar */
@media (max-width: 575.98px) { .mdd-page { padding: 1rem; } }

/* MAP PAGE STYLES */

/* —— Variabili —— */

/* —— Layout pagina —— */

/* —— Bottone refresh —— */
.mm-btn-accent {
    background: var(--cb-accent); color: #fff; border: 2px solid var(--cb-accent);
    padding: 0.5rem 1.1rem; font-weight: 600; font-size: 0.82rem;
    border-radius: 0; display: inline-flex; align-items: center; gap: 0.4rem;
    cursor: pointer; transition: background 0.2s, box-shadow 0.2s;
}
.mm-btn-accent:hover {
    background: var(--cb-accent-hover); border-color: var(--cb-accent-hover);
    box-shadow: 0 2px 8px rgba(227,72,36,0.2);
}

/* —— Card control panel —— */
.mm-control {
    background: var(--cb-white); border: 1px solid var(--cb-border);
    border-radius: 0; overflow: hidden; margin-bottom: 1rem;
}
.mm-control-header {
    position: relative; padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--cb-border);
    display: flex; align-items: center; gap: 0.75rem;
    flex-wrap: wrap;
}
.mm-control-header::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0;
    width: 4px; background: var(--cb-accent);
}
.mm-control-body { padding: 1rem 1.25rem; }

.mm-stat-badge {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.3rem 0.75rem; font-size: 0.75rem; font-weight: 600;
    border: 1px solid; border-radius: 0; text-transform: uppercase; letter-spacing: 0.03em;
}
.mm-stat-badge strong { font-size: 0.88rem; }
.mm-stat-badge--accent  { background: rgba(227,72,36,0.06);  color: var(--cb-accent);  border-color: rgba(227,72,36,0.2); }
.mm-stat-badge--cyan    { background: rgba(8,145,178,0.06);  color: var(--cb-cyan);    border-color: rgba(8,145,178,0.2); }
.mm-stat-badge--green   { background: rgba(5,150,105,0.06);  color: var(--cb-green);   border-color: rgba(5,150,105,0.2); }

/* —— Legenda —— */
.mm-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; margin-top: 0.75rem; }
.mm-legend-label {
    font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.04em; color: var(--cb-gray); margin-right: 0.25rem;
}
.mm-legend-item { display: flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; color: var(--cb-dark); }
.mm-legend-dot { width: 10px; height: 10px; flex-shrink: 0; }

/* —— Map container —— */
#map-container {
    position: relative;
    height: calc(100vh - 220px);
    min-height: 500px;
    border: 1px solid var(--cb-border);
    overflow: hidden;
}
#map { height: 100%; width: 100%; z-index: 1; }

/* —— Loading overlay —— */
#loading-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.92);
    display: flex; align-items: center; justify-content: center; z-index: 2000;
}
#loading-overlay.hidden { display: none; }
@keyframes mm-spin { to { transform: rotate(360deg); } }
.mm-loading-text { font-size: 0.85rem; color: var(--cb-gray); margin-top: 0.75rem; }

/* —— Sidebar lista mezzi —— */
#sidebar {
    position: absolute; top: 0; right: 0;
    width: 320px; height: 100%;
    background: var(--cb-white);
    border-left: 1px solid var(--cb-border);
    box-shadow: -4px 0 16px rgba(21,21,21,0.08);
    z-index: 1000; overflow-y: auto;
    transition: transform 0.3s ease;
}
#sidebar.collapsed { transform: translateX(100%); }

/* Toggle button */
#sidebar-toggle {
    position: absolute; top: 10px; left: -38px;
    width: 38px; height: 38px;
    background: var(--cb-white); border: 1px solid var(--cb-border);
    border-right: none; cursor: pointer; z-index: 1001;
    display: flex; align-items: center; justify-content: center;
    color: var(--cb-gray); font-size: 1rem; border-radius: 0;
    transition: background 0.15s, color 0.15s;
}
#sidebar-toggle:hover { background: var(--cb-light); color: var(--cb-dark); }

/* Sidebar header */
.mm-sidebar-header {
    position: relative; padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--cb-border);
    display: flex; align-items: center; gap: 0.65rem;
}
.mm-sidebar-header::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0;
    width: 4px; background: var(--cb-cyan);
}
.mm-sidebar-header-icon {
    width: 30px; height: 30px; flex-shrink: 0;
    background: rgba(8,145,178,0.08); border: 1px solid rgba(8,145,178,0.15);
    display: flex; align-items: center; justify-content: center;
}
.mm-sidebar-header-icon i { color: var(--cb-cyan); font-size: 0.9rem; }
.mm-sidebar-title { font-size: 0.85rem; font-weight: 700; color: var(--cb-dark); margin: 0; }
.mm-sidebar-body { padding: 1rem; }

/* Vehicle items */
.mm-vehicle-item {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--cb-light);
    transition: background 0.15s;
    border-left: 3px solid transparent;
}
.mm-vehicle-item:hover { background: rgba(227,72,36,0.03); }
.mm-vehicle-item.has-position {
    cursor: pointer; border-left-color: var(--cb-accent);
}
.mm-vehicle-item.has-position:hover { border-left-color: var(--cb-accent-hover); }
.mm-vehicle-item.no-position { opacity: 0.6; border-left-color: var(--cb-border); }
.mm-vehicle-targa { font-size: 0.85rem; font-weight: 700; color: var(--cb-dark); font-family: monospace; letter-spacing: 0.05em; }

/* Status dots */
.mm-status-dot {
    width: 9px; height: 9px; flex-shrink: 0;
    margin-right: 6px; margin-top: 3px;
}

/* Leaflet popup override */
.leaflet-popup-content { margin: 10px; line-height: 1.6; }
.leaflet-popup-content h6 { margin-bottom: 6px; color: var(--cb-accent); font-weight: 700; font-size: 0.9rem; }
.leaflet-popup-content small { font-size: 0.78rem; }
.leaflet-popup-content hr { border-color: var(--cb-light); margin: 6px 0; }
.leaflet-popup-content .popup-warn { color: var(--cb-amber); font-size: 0.78rem; }
.leaflet-popup-content .popup-danger { color: var(--cb-danger); font-size: 0.78rem; }
.leaflet-popup-content .popup-label { font-weight: 600; color: var(--cb-gray); text-transform: uppercase; font-size: 0.65rem; letter-spacing: 0.04em; }

/* —— Responsive —— */
@media (max-width: 991.98px) {
    .mm-header { flex-direction: column; }
}

@media (max-width: 768px) {
    #map-container {
        height: auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }
    #map {
        height: calc(100vh - 280px);
        min-height: 300px;
        width: 100%;
        order: 2;
    }
    #sidebar {
        position: relative;
        top: auto; right: auto;
        width: 100%;
        height: auto;
        max-height: 240px;
        box-shadow: none;
        border-left: none;
        border-bottom: 1px solid var(--cb-border);
        transform: none;
        order: 1;
        padding-bottom: 1em;
    }
    #sidebar.collapsed {
        transform: none;
        display: none;
    }
    #sidebar-toggle {
        position: fixed;
        bottom: 1rem; right: 1rem;
        left: auto; top: auto;
        width: 44px; height: 44px;
        background: var(--cb-white);
        border: 1px solid var(--cb-border);
        box-shadow: 0 2px 8px rgba(21,21,21,0.12);
        z-index: 1001;
        font-size: 1.1rem;
    }
    #loading-overlay { order: 2; }
    .mm-sidebar-body {
        max-height: 160px;
        overflow-y: auto;
    }
}

@media (max-width: 575.98px) {
    .mm-page { padding: 1rem; }
    #map {
        height: calc(100vh - 300px);
        min-height: 250px;
    }
    .mm-stats { flex-wrap: nowrap; }
    .mm-stat-badge { padding: 0.25rem 0.45rem; font-size: 0.68rem; gap: 0.2rem; }
    .mm-stat-badge strong { font-size: 0.78rem; }
    .mm-legend { gap: 0.5rem; }
}

/* STORICO ASSEGNAZIONI MEZZI PAGE STYLES */

/* —— msa- prefix: Mezzi StoricoAssegnazioni —— */

/* Info mezzo box */
.msa-mezzo-box {
    background: #fff; border: 1px solid #e0e1e3; border-left: 4px solid #0891b2;
    padding: 0.85rem 1.25rem;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.msa-mezzo-name { font-size: 0.92rem; font-weight: 600; color: #151515; }
.msa-mezzo-sub  { font-size: 0.78rem; color: #6b7280; margin-top: 0.1rem; }

/* Tabella */

.msa-table tbody tr.msa-row-active { background: rgba(5,150,105,0.03); }
.msa-table tbody tr.msa-row-active:hover { background: rgba(5,150,105,0.05); }

/* Badge */

/* Testo cella */
.msa-cell-main { font-size: 0.85rem; color: #151515; font-weight: 600; }
.msa-cell-muted { color: #9ca3af; font-size: 0.82rem; }
.msa-cell-date  { font-size: 0.82rem; color: #151515; white-space: nowrap; }
.msa-cell-dur-active { font-size: 0.82rem; color: #E34824; font-weight: 600; }
.msa-cell-km { font-size: 0.82rem; color: #059669; font-weight: 700; }

/* Mezzo link in tabella */

/* Bottone note tooltip */
.msa-note-btn {
    width: 32px; height: 32px; border-radius: 0;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.85rem; cursor: pointer; background: transparent;
    border: 1px solid rgba(8,145,178,0.15); color: #0891b2;
    transition: background 0.15s, border-color 0.15s;
}
.msa-note-btn:hover { background: rgba(8,145,178,0.06); border-color: #0891b2; }

/* Empty state */

.msa-empty-sub { font-size: 0.85rem; color: #9ca3af; margin: 0; }

/* Responsive */
@media (max-width: 991.98px) { .msa-stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575.98px) {
    .msa-page { padding: 1rem; }
    .msa-stats { grid-template-columns: 1fr 1fr; }
    .msa-page-header { flex-direction: column; }
}

/* ASSEGNAZIONI > ASSEGNA PAGE STYLES */

/* Info mezzo box */
.mac-mezzo-box {
    background: #fff; border: 1px solid #e0e1e3; border-left: 4px solid #0891b2;
    padding: 0.85rem 1.25rem; margin-bottom: 1.5rem;
    display: flex; align-items: center; gap: 0.6rem;
}
.mac-mezzo-box i { color: #0891b2; font-size: 1.1rem; flex-shrink: 0; }
.mac-mezzo-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7280; }
.mac-mezzo-name  { font-size: 0.9rem; font-weight: 600; color: #151515; }

/* Alerts calendario */

.mac-alert i { flex-shrink: 0; margin-top: 0.1rem; }

/* Alert tipo assegnazione (dinamico) */
.mac-tipo-alert {
    border: 1px solid #e0e1e3; border-radius: 0;
    padding: 0.75rem 1rem; font-size: 0.82rem;
    display: none; align-items: flex-start; gap: 0.5rem;
    margin-bottom: 1rem;
}
.mac-tipo-alert.visible { display: flex; }
.mac-tipo-alert--indeterminato { border-left: 4px solid #d97706; background: rgba(217,119,6,0.04); color: #151515; }
.mac-tipo-alert--indeterminato i { color: #d97706; }
.mac-tipo-alert--temporanea { border-left: 4px solid #0891b2; background: rgba(8,145,178,0.04); color: #151515; }
.mac-tipo-alert--temporanea i { color: #0891b2; }

/* Validation summary */
.mac-validation {
    border: 1px solid #e0e1e3; border-left: 4px solid #dc2626;
    background: rgba(220,38,38,0.04); padding: 0.85rem 1.25rem;
    font-size: 0.85rem; margin-bottom: 1.5rem;
}
.mac-validation ul { margin: 0; padding-left: 1.25rem; }

/* Legenda */
.mac-legenda { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 0.75rem; }
.mac-legenda-item { display: flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; color: #6b7280; }
.mac-legenda-color { width: 14px; height: 14px; flex-shrink: 0; }
.mac-legenda-sep { border-top: 1px solid #EEEFF0; margin-top: 1rem; padding-top: 0.85rem; }
.mac-legenda-title { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7280; margin-bottom: 0.5rem; }

/* FullCalendar override */
#mac-calendario { max-height: 500px; margin-bottom: 1rem; }
#mac-calendario .fc-event { cursor: pointer; border-radius: 0 !important; font-size: 0.8rem; }
#mac-calendario .fc .fc-button { border-radius: 0 !important; }
#mac-calendario .fc .fc-button-primary { background-color: #E34824; border-color: #E34824; }
#mac-calendario .fc .fc-button-primary:hover { background-color: #c93d1e; }
#mac-calendario .fc .fc-button-primary:not(:disabled).fc-button-active { background-color: #151515; }
#mac-calendario .fc .fc-daygrid-day.fc-day-today { background: rgba(227,72,36,0.04); }
#mac-calendario .fc .fc-toolbar-title { font-size: 1rem; font-weight: 700; color: #151515; }

/* Form sezioni */
.mac-form-section-title {
    font-size: 0.82rem; font-weight: 600; color: #6b7280;
    text-transform: uppercase; letter-spacing: 0.03em;
    display: flex; align-items: center; gap: 0.4rem;
    margin-bottom: 0.75rem; padding-bottom: 0.5rem;
    border-bottom: 1px solid #EEEFF0;
}
.mac-form-section-title i { color: #E34824; }

textarea.mac-form-control { resize: vertical; }

/* DataEntry note box */
.mac-dataentry-note {
    background: rgba(217,119,6,0.04); border-left: 3px solid #d97706;
    padding: 0.5rem 0.75rem; font-size: 0.72rem; color: #d97706;
    margin-top: 0.25rem;
}

/* Sticky sidebar */
@media (max-width: 575.98px) { .mac-page { padding: 1rem; } }

/* SCADENZE MEZZI PAGE STYLES */

/* —— msci- prefix: Mezzi ScadenzaCreate Index —— */

/* Alert close (icon only) */

.msci-btn-filter-submit {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.3rem;
    padding: 0.45rem 1rem; font-size: 0.82rem; font-weight: 600;
    background: #E34824; color: #fff; border: 2px solid #E34824; border-radius: 0; cursor: pointer;
    transition: background 0.2s; white-space: nowrap;
}
.msci-btn-filter-submit:hover { background: #c93d1e; border-color: #c93d1e; }
.msci-btn-filter-reset {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.45rem 0.7rem; font-size: 0.82rem; font-weight: 600;
    background: transparent; color: #6b7280; border: 2px solid #e0e1e3; border-radius: 0;
    text-decoration: none; transition: border-color 0.2s, color 0.2s;
}
.msci-btn-filter-reset:hover { background: #f3f4f6; border-color: #e0e1e3; color: #6b7280; }

/* Tabella - allineamenti specifici per cb-table */
.cb-table thead th.th-right { text-align: right; }
.cb-table thead th.th-center { text-align: center; }
.cb-table tbody td.td-right,
.cb-table tfoot td.td-right { text-align: right; }
.cb-table tbody td.td-center,
.cb-table tfoot td.td-center { text-align: center; }

/* Badge */

/* Mezzo link */
.msci-mezzo-link { color: #E34824; text-decoration: none; font-weight: 600; font-size: 0.85rem; }
.msci-mezzo-link:hover { color: #c93d1e; text-decoration: underline; }

/* Categoria + tipo nome */
.msci-tipo-nome { font-size: 0.82rem; color: #6b7280; }

/* Giorni remaining */
.msci-gg-note { font-size: 0.68rem; color: #9ca3af; }

.msci-action-btn {
    width: 32px; height: 32px; border-radius: 0;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.85rem; cursor: pointer; background: transparent;
    transition: background 0.15s, border-color 0.15s; text-decoration: none; border: 1px solid;
}
.msci-action-btn-cyan  { border-color: rgba(8,145,178,0.15);  color: #0891b2; }
.msci-action-btn-cyan:hover { background: rgba(8,145,178,0.06); border-color: #0891b2; }
.msci-action-btn-amber { border-color: rgba(217,119,6,0.15);  color: #d97706; }
.msci-action-btn-amber:hover { background: rgba(217,119,6,0.06); border-color: #d97706; }

/* Empty state (overrides locali per icona/titolo) */
.cb-empty-state .msci-empty-sub { font-size: 0.85rem; color: #9ca3af; margin-bottom: 1.25rem; }

/* Responsive */
@media (max-width: 1199.98px) { .msci-filter-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 767.98px)  { .msci-filter-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575.98px)  { .msci-filter-grid { grid-template-columns: 1fr; } }

/* SCADENZE MEZZI > DETAILS PAGE STYLES */

/* —— mscd- prefix: Mezzi ScadenzaDetails —— */

/* Alerts */

/* Page header hero */
.mscd-hero { background: #fff; border: 1px solid #e0e1e3; border-radius: 0; position: relative; overflow: hidden; padding: 1.5rem; margin-bottom: 1.5rem; }
.mscd-hero::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--mscd-hero-color, #E34824); }
.mscd-hero-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.mscd-hero-title { font-size: 1.25rem; font-weight: 700; color: #151515; margin: 0 0 0.25rem 0; }
.mscd-hero-meta { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.35rem; }
.mscd-hero-desc { font-size: 0.85rem; color: #6b7280; margin: 0; }
.mscd-hero-mezzo { font-size: 0.85rem; color: #E34824; text-decoration: none; font-weight: 500; display: inline-flex; align-items: center; gap: 0.3rem; }
.mscd-hero-mezzo:hover { color: #c93d1e; text-decoration: underline; }

/* Fields grid */

.mscd-field-value--lg { font-size: 1.1rem; font-weight: 700; }
.mscd-field-value--muted { color: #9ca3af; font-style: italic; }
.mscd-field-sub--warn   { color: #d97706; font-weight: 600; }
.mscd-field-sub--danger { color: #dc2626; font-weight: 600; }

/* Sep */

/* Badge */

/* Note box */

/* Link catena rinnovo */
.mscd-chain-note { font-size: 0.78rem; color: #9ca3af; display: flex; align-items: center; gap: 0.4rem; }

/* Audit rows */
.mscd-audit-row { font-size: 0.78rem; color: #9ca3af; padding: 0.35rem 0; border-bottom: 1px solid #EEEFF0; display: flex; gap: 0.4rem; flex-wrap: wrap; }
.mscd-audit-row:last-child { border-bottom: none; }
.mscd-audit-label { font-weight: 700; color: #6b7280; text-transform: uppercase; font-size: 0.68rem; letter-spacing: 0.04em; min-width: 70px; }

/* Sidebar buttons */
.mscd-sidebar-btn {
    display: flex; align-items: center; justify-content: center; gap: 0.4rem;
    width: 100%; padding: 0.55rem 1rem; font-size: 0.85rem; font-weight: 600;
    border: 2px solid; border-radius: 0; cursor: pointer;
    text-decoration: none; transition: background 0.2s, border-color 0.2s, color 0.2s;
    margin-bottom: 0.5rem;
}
.mscd-sidebar-btn:last-child { margin-bottom: 0; }
.mscd-sidebar-btn-amber   { background: transparent; color: #d97706; border-color: rgba(217,119,6,0.3); }
.mscd-sidebar-btn-amber:hover { background: rgba(217,119,6,0.06); border-color: #d97706; color: #d97706; }
.mscd-sidebar-btn-cyan    { background: transparent; color: #0891b2; border-color: rgba(8,145,178,0.3); }
.mscd-sidebar-btn-cyan:hover { background: rgba(8,145,178,0.06); border-color: #0891b2; color: #0891b2; }
.mscd-sidebar-btn-secondary { background: transparent; color: #6b7280; border-color: #e0e1e3; }
.mscd-sidebar-btn-secondary:hover { background: #f3f4f6; border-color: #e0e1e3; color: #6b7280; text-decoration: none; }

/* Documento entity box */
.mscd-entity { display: flex; justify-content: space-between; align-items: center; padding: 0.85rem 1rem; border: 1px solid #EEEFF0; }
.mscd-entity:hover { background: rgba(227,72,36,0.02); }
.mscd-entity-label { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7280; }
.mscd-entity-value { font-size: 0.85rem; color: #151515; font-weight: 500; margin-top: 0.1rem; }
.mscd-entity-go { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.78rem; font-weight: 600; color: #0891b2; text-decoration: none; border: 1px solid rgba(8,145,178,0.2); padding: 0.3rem 0.65rem; transition: background 0.15s; border-radius: 0; }
.mscd-entity-go:hover { background: rgba(8,145,178,0.06); border-color: #0891b2; }

/* Sticky sidebar */
@media (max-width: 991.98px) { .mscd-fields-grid { grid-template-columns: 1fr 1fr; } .mscd-fields-grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 575.98px) { .mscd-page { padding: 1rem; } .mscd-fields-grid { grid-template-columns: 1fr; } }

/* SCADENZE MEZZI > EDIT PAGE STYLES */

/* —— msce- prefix: Mezzi ScadenzaEdit —— */

/* Validation */
.msce-validation { border: 1px solid #e0e1e3; border-left: 4px solid #dc2626; background: rgba(220,38,38,0.04); padding: 0.85rem 1.25rem; font-size: 0.85rem; margin-bottom: 1.5rem; border-radius: 0; }
.msce-validation ul { margin: 0; padding-left: 1.25rem; }

/* Form */
.msce-form-section-title { font-size: 0.82rem; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: 0.03em; display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.75rem; padding-bottom: 0.5rem; border-bottom: 1px solid #EEEFF0; }
.msce-form-section-title i { color: #E34824; }

textarea.msce-form-control { resize: vertical; }

.msce-input-addon { display: flex; align-items: center; padding: 0.5rem 0.75rem; background: #EEEFF0; border: 1px solid #e0e1e3; border-left: none; font-size: 0.82rem; color: #6b7280; white-space: nowrap; }
.msce-input-addon--left { border-left: 1px solid #e0e1e3; border-right: none; }

/* Campi KM card */
.msce-km-card { background: rgba(8,145,178,0.03); border: 1px solid rgba(8,145,178,0.15); border-radius: 0; padding: 1.25rem; margin-bottom: 1rem; }
.msce-km-card-title { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #0891b2; display: flex; align-items: center; gap: 0.4rem; margin-bottom: 1rem; }

/* Toggle switch */
.msce-switch-row { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 0; }
/* Doc link hint */
.msce-doc-hint { font-size: 0.72rem; color: #9ca3af; margin-top: 0.35rem; }

@media (max-width: 575.98px) { .msce-actions { flex-direction: column-reverse; } }

/* CALENDARIO SCADENZE MEZZI PAGE STYLES */

/* —— msca- prefix: Mezzi ScadenzaCalendario —— */

.msca-btn-reset {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.45rem 0.9rem; font-size: 0.82rem; font-weight: 600;
    background: transparent; color: #6b7280; border: 1px solid #e0e1e3; border-radius: 0;
    cursor: pointer; transition: border-color 0.15s, color 0.15s; width: 100%;
    justify-content: center;
}
.msca-btn-reset:hover { background: #f3f4f6; border-color: #e0e1e3; color: #6b7280; }

/* Legenda */
.msca-legenda { display: flex; align-items: center; flex-wrap: wrap; gap: 0.85rem; padding-top: 1rem; border-top: 1px solid #EEEFF0; margin-top: 1rem; }
.msca-legenda-item { display: flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; color: #6b7280; font-weight: 500; }
.msca-legenda-color { width: 14px; height: 14px; flex-shrink: 0; }

/* Card calendario */
.msca-cal-card { background: #fff; border: 1px solid #e0e1e3; border-radius: 0; overflow: hidden; }
.msca-cal-header { position: relative; padding: 1rem 1.5rem; border-bottom: 1px solid #e0e1e3; display: flex; align-items: center; gap: 0.75rem; }
.msca-cal-header::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #0891b2; }
.msca-cal-icon { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; background: rgba(8,145,178,0.08); border: 1px solid rgba(8,145,178,0.15); color: #0891b2; font-size: 1rem; }
.msca-cal-title { font-size: 0.9rem; font-weight: 700; color: #151515; margin: 0; }
.msca-cal-body { padding: 1.5rem; }

/* FullCalendar overrides */
#calendar { min-height: 550px; }

/* Modal */
.msca-modal .modal-content { border-radius: 0; border: 1px solid #e0e1e3; }
.msca-modal .modal-header { position: relative; padding: 1rem 1.5rem; border-bottom: 1px solid #e0e1e3; }
.msca-modal .modal-header::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #0891b2; }
.msca-modal .modal-title { font-size: 0.95rem; font-weight: 700; color: #151515; }
.msca-modal .modal-close { background: none; border: none; color: #9ca3af; font-size: 1.1rem; cursor: pointer; padding: 0; line-height: 1; margin-left: auto; }
.msca-modal .modal-close:hover { color: #151515; }
.msca-modal .modal-body { padding: 1.25rem 1.5rem; }
.msca-modal .modal-footer { padding: 0.85rem 1.5rem; border-top: 1px solid #EEEFF0; display: flex; justify-content: flex-end; gap: 0.5rem; }

/* Modal fields */
.msca-modal-field { margin-bottom: 0.85rem; }
.msca-modal-field-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7280; margin-bottom: 0.2rem; }
.msca-modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.5rem; }

/* Badge modal */

@media (max-width: 991.98px) { .msca-filter-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 575.98px) { .msca-page { padding: 1rem; } .msca-filter-grid { grid-template-columns: 1fr; } .msca-page-header { flex-direction: column; } .msca-modal-grid { grid-template-columns: 1fr; } }

/* SCADENZE MEZZI > CREATE PAGE STYLES */

/* —— mscc- prefix: Mezzi ScadenzaCreate Create —— */

/* Card header (locale: variant green/cyan/amber/gray) */

/* Validation */
.mscc-validation { border: 1px solid #e0e1e3; border-left: 4px solid #dc2626; background: rgba(220,38,38,0.04); padding: 0.85rem 1.25rem; font-size: 0.85rem; margin-bottom: 1.5rem; border-radius: 0; }
.mscc-validation ul { margin: 0; padding-left: 1.25rem; }

/* Form */
.mscc-form-section-title {
    font-size: 0.82rem; font-weight: 600; color: #6b7280;
    text-transform: uppercase; letter-spacing: 0.03em;
    display: flex; align-items: center; gap: 0.4rem;
    margin-bottom: 0.75rem; padding-bottom: 0.5rem;
    border-bottom: 1px solid #EEEFF0;
}
.mscc-form-section-title i { color: #E34824; }

textarea.mscc-form-control { resize: vertical; }

.mscc-input-addon {
    display: flex; align-items: center; padding: 0.5rem 0.75rem;
    background: #EEEFF0; border: 1px solid #e0e1e3; border-left: none;
    font-size: 0.82rem; color: #6b7280; white-space: nowrap;
}
.mscc-input-addon--left { border-left: 1px solid #e0e1e3; border-right: none; }

/* Campi KM card */
.mscc-km-card { background: rgba(8,145,178,0.03); border: 1px solid rgba(8,145,178,0.15); border-radius: 0; padding: 1.25rem; margin-bottom: 1rem; }
.mscc-km-card-title { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #0891b2; display: flex; align-items: center; gap: 0.4rem; margin-bottom: 1rem; }

/* Toggle switch */
.mscc-switch-row { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 0; }
/* Note documento link */
.mscc-doc-hint { font-size: 0.72rem; color: #9ca3af; margin-top: 0.35rem; }

@media (max-width: 575.98px) { .mscc-page { padding: 1rem; } .mscc-actions { flex-direction: column-reverse; } .mscc-btn { width: 100%; justify-content: center; } }

/* SCADENZE MEZZI > _SCADENZEMEZZOPARTIAL PAGE STYLES */

/* —— smp- prefix: ScadenzeMezzo Partial —— */
.smp-header { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; padding: 0.85rem 1rem; border-bottom: 1px solid #EEEFF0; }

/* Badge */

/* Footer actions */
.smp-footer { display: flex; align-items: center; justify-content: flex-end; gap: 0.5rem; padding: 0.75rem 1rem; border-top: 1px solid #EEEFF0; flex-wrap: wrap; }

/* Azione 32——32 */
.smp-action-btn {
    width: 32px; height: 32px; border-radius: 0;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.82rem; background: transparent; text-decoration: none;
    border: 1px solid rgba(8,145,178,0.15); color: #0891b2;
    transition: background 0.15s, border-color 0.15s;
}
.smp-action-btn:hover { background: rgba(8,145,178,0.06); border-color: #0891b2; color: #0891b2; }

/* Tabella */

.smp-table thead th.th-center { text-align: center; }
.smp-table thead th.th-right  { text-align: right; }
.smp-table tbody tr.smp-row-muted { opacity: 0.65; }
.smp-table tbody td.td-center { text-align: center; }
.smp-table tbody td.td-right  { text-align: right; }

/* Tipologia cell */
.smp-cat-abbr { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; margin-right: 0.3rem; padding: 0.15rem 0.4rem; display: inline-block; }
.smp-tipo-nome { font-size: 0.82rem; }

/* Scadenza cell */
.smp-date { font-size: 0.82rem; font-weight: 500; color: #151515; }
.smp-gg-note { font-size: 0.68rem; color: #9ca3af; }
.smp-date-solo-km { font-size: 0.72rem; color: #9ca3af; font-style: italic; }

/* Empty state */

/* GARE INDEX PAGE STYLES */

/* PAGE / HEADER / BUTTONS / CARD —— migrati a .cb-* utilities */

/* ========== FILTER SECTION ========== */
.g-filter-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #fff;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s;
}
.g-filter-toggle:hover { background: rgba(227,72,36,0.03); }
.g-filter-toggle h3 {
    font-size: 0.85rem;
    font-weight: 700;
    color: #151515;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.g-filter-toggle h3 svg { color: #E34824; }
.g-filter-toggle .g-chevron {
    transition: transform 0.25s ease;
    color: #6b7280;
}
.g-filter-toggle[aria-expanded="true"] .g-chevron { transform: rotate(180deg); }
.g-filter-body {
    padding: 0 1.5rem 1.5rem;
    border-top: 1px solid #EEEFF0;
}
.g-filter-body .form-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #151515;
    margin-bottom: 0.3rem;
}
.g-filter-body .form-control,
.g-filter-body .form-select {
    border-radius: 0;
    border: 1px solid #e0e1e3;
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
}
.g-filter-body .form-control:focus,
.g-filter-body .form-select:focus {
    border-color: #E34824;
    box-shadow: 0 0 0 0.2rem rgba(227,72,36,0.12);
}
.g-filter-body small { font-size: 0.72rem; color: #9ca3af; }
.g-filter-body .form-check-input:checked {
    background-color: #E34824;
    border-color: #E34824;
}
.g-filter-body .form-check-input { border-radius: 0; }
.g-filter-actions {
    padding-top: 1rem;
    border-top: 1px solid #EEEFF0;
    margin-top: 0.5rem;
}

/* ========== RESULTS BAR ========== */
.g-results-bar p {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0;
}
.g-results-bar strong { color: #151515; }
.g-badge-filter {
    background: rgba(227,72,36,0.08);
    color: #E34824;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border: 1px solid rgba(227,72,36,0.15);
    border-radius: 0;
}

/* ========== TABLE ========== */
.g-table-wrap { overflow-x: auto; }
/* .g-table —— migrato a .cb-table */

/* Table elements */
.g-code { font-weight: 600; color: #151515; }
.g-title-cell {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.g-ente-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Badges */
.g-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 0;
    letter-spacing: 0.02em;
}
.g-badge-tipo {
    background: #EEEFF0;
    color: #151515;
    border: 1px solid #e0e1e3;
}
.g-badge-lotti {
    background: #E34824;
    color: #fff;
    min-width: 26px;
    text-align: center;
    font-size: 0.72rem;
}
.g-badge-lotti-zero {
    background: #EEEFF0;
    color: #6b7280;
    border: 1px solid #e0e1e3;
    min-width: 26px;
    text-align: center;
    font-size: 0.72rem;
}
.g-badge-bozza      { background: #EEEFF0; color: #6b7280; border: 1px solid #e0e1e3; }
.g-badge-lavorazione { background: rgba(227,72,36,0.08); color: #E34824; border: 1px solid rgba(227,72,36,0.15); }
.g-badge-conclusa    { background: rgba(5,150,105,0.08); color: #059669; border: 1px solid rgba(5,150,105,0.15); }
.g-badge-chiusa      { background: #151515; color: #fff; }

/* Scadenza */
.g-scad-expired { font-size: 0.72rem; color: #dc2626; font-weight: 600; }
.g-scad-warning { font-size: 0.72rem; color: #d97706; font-weight: 600; }

/* Action buttons */
.g-actions { display: flex; gap: 2px; justify-content: flex-end; }
.g-act-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e1e3;
    background: #fff;
    color: #6b7280;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 0.85rem;
    text-decoration: none;
    padding: 0;
}
.g-act-btn:hover {
    border-color: #E34824;
    color: #E34824;
    background: rgba(227,72,36,0.04);
}
.g-act-btn-danger:hover {
    border-color: #dc2626;
    color: #dc2626;
    background: rgba(220,38,38,0.04);
}

/* ========== EMPTY STATE —— migrato a .cb-empty-state ========== */

/* ========== PAGINATION INFO ========== */
.g-pag-bar p {
    font-size: 0.8rem;
    color: #6b7280;
    margin: 0;
}

/* ========== MODAL ========== */
.g-modal .modal-content {
    border-radius: 0;
    border: 1px solid #e0e1e3;
}
.g-modal .modal-header {
    background: #151515;
    color: #fff;
    border-radius: 0;
    padding: 1rem 1.25rem;
    border-bottom: 2px solid #E34824;
}
.g-modal .modal-header .modal-title {
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.g-modal .modal-header .modal-title svg { color: #E34824; }
.g-modal .modal-header .btn-close {
    filter: invert(1);
}
.g-modal .modal-body {
    padding: 1.5rem;
    font-size: 0.9rem;
    color: #151515;
}
.g-modal .modal-body .text-muted { font-size: 0.8rem; color: #6b7280; }
.g-modal .modal-footer {
    border-top: 1px solid #EEEFF0;
    padding: 1rem 1.25rem;
}
.g-modal .modal-footer .btn-secondary,
.g-modal .modal-footer .g-btn-cancel {
    background: transparent;
    color: #6b7280;
    border: 2px solid #e0e1e3;
    border-radius: 0;
    padding: 0.45rem 1.25rem;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s;
}
.g-modal .modal-footer .btn-secondary:hover,
.g-modal .modal-footer .g-btn-cancel:hover {
    border-color: #151515;
    color: #151515;
}
.g-modal .modal-footer .btn-danger,
.g-modal .modal-footer .g-btn-danger {
    background: #dc2626;
    color: #fff;
    border: 2px solid #dc2626;
    border-radius: 0;
    padding: 0.45rem 1.25rem;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s;
}
.g-modal .modal-footer .btn-danger:hover,
.g-modal .modal-footer .g-btn-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

/* ========== ALERTS —— migrati a .cb-alert--success/--danger ========== */

@media (max-width: 767.98px) {
    .g-filter-body .row > [class*="col-"] { margin-bottom: 0.75rem; }
}

/* LOTTI INDEX PAGE STYLES */

/* PAGE / BREADCRUMB / HEADER / BUTTONS (primary+secondary) / CARD —— migrati a .cb-* utilities */

/* ========== BUTTON DISABLED (locale) ========== */
.l-btn-disabled { background: transparent; color: #9ca3af; border: 2px solid #e0e1e3; padding: 0.55rem 1.5rem; font-weight: 600; font-size: 0.85rem; border-radius: 0; display: inline-flex; align-items: center; gap: 0.4rem; cursor: not-allowed; opacity: 0.6; }

/* ========== FILTER ========== */
.l-filter-toggle { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; background: #fff; border: none; width: 100%; text-align: left; cursor: pointer; transition: background 0.15s; }
.l-filter-toggle:hover { background: rgba(227,72,36,0.03); }
.l-filter-toggle h3 { font-size: 0.85rem; font-weight: 700; color: #151515; margin: 0; display: flex; align-items: center; gap: 0.5rem; }
.l-filter-toggle h3 svg { color: #E34824; }
.l-filter-toggle .l-chevron { transition: transform 0.25s ease; color: #6b7280; }
.l-filter-toggle[aria-expanded="true"] .l-chevron { transform: rotate(180deg); }
.l-badge-active { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 0.2rem 0.5rem; background: rgba(227,72,36,0.08); color: #E34824; border: 1px solid rgba(227,72,36,0.15); border-radius: 0; }
.l-filter-body { padding: 0 1.5rem 1.5rem; border-top: 1px solid #EEEFF0; }
.l-filter-body .form-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: #151515; margin-bottom: 0.3rem; }
.l-filter-body .form-control, .l-filter-body .form-select { border-radius: 0; border: 1px solid #e0e1e3; font-size: 0.85rem; padding: 0.5rem 0.75rem; }
.l-filter-body .form-control:focus, .l-filter-body .form-select:focus { border-color: #E34824; box-shadow: 0 0 0 0.2rem rgba(227,72,36,0.12); }
.l-filter-body small, .l-filter-body .form-text { font-size: 0.72rem; color: #9ca3af; }
.l-filter-body .form-check-input { border-radius: 0; }
.l-filter-body .form-check-input:checked { background-color: #E34824; border-color: #E34824; }
.l-filter-body .form-check-label { font-size: 0.85rem; }
.l-filter-actions { padding-top: 1rem; border-top: 1px solid #EEEFF0; margin-top: 0.5rem; }

/* ALERTS / TABLE —— migrati a .cb-alert--* / .cb-table */

.l-table-wrap { overflow-x: auto; }
.l-code { font-weight: 600; color: #151515; }
.l-link { color: #E34824; text-decoration: none; font-weight: 500; transition: color 0.15s; }
.l-link:hover { color: #c93d1e; text-decoration: underline; }

/* Badges */
.l-badge { display: inline-block; padding: 0.25rem 0.6rem; font-size: 0.7rem; font-weight: 600; border-radius: 0; letter-spacing: 0.02em; }
.l-badge-tipo { background: #EEEFF0; color: #151515; border: 1px solid #e0e1e3; }
.l-badge-secondary { background: #EEEFF0; color: #6b7280; border: 1px solid #e0e1e3; }
.l-badge-info    { background: rgba(8,145,178,0.08); color: #0891b2; border: 1px solid rgba(8,145,178,0.15); }
.l-badge-success { background: rgba(5,150,105,0.08); color: #059669; border: 1px solid rgba(5,150,105,0.15); }
.l-badge-danger  { background: rgba(220,38,38,0.08); color: #dc2626; border: 1px solid rgba(220,38,38,0.15); }
.l-badge-warn    { background: rgba(217,119,6,0.08); color: #d97706; border: 1px solid rgba(217,119,6,0.15); }
.l-badge-primary { background: rgba(227,72,36,0.08); color: #E34824; border: 1px solid rgba(227,72,36,0.15); }
.l-badge-dark    { background: #151515; color: #fff; }
.l-badge-integ   { background: rgba(217,119,6,0.08); color: #d97706; border: 1px solid rgba(217,119,6,0.15); font-size: 0.65rem; margin-top: 0.25rem; }

/* Action buttons */
.l-actions { display: flex; gap: 2px; justify-content: center; }
.l-act-btn { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #e0e1e3; background: #fff; color: #6b7280; border-radius: 0; cursor: pointer; transition: all 0.15s; font-size: 0.85rem; text-decoration: none; padding: 0; }
.l-act-btn:hover { border-color: #E34824; color: #E34824; background: rgba(227,72,36,0.04); }
.l-act-btn-danger:hover { border-color: #dc2626; color: #dc2626; background: rgba(220,38,38,0.04); }

/* ========== FOOTER / PAGINATION ========== */
.l-card-footer { padding: 1rem 1.5rem; border-top: 1px solid #EEEFF0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.l-card-footer p { font-size: 0.8rem; color: #6b7280; margin: 0; }
.l-card-footer strong { color: #151515; }

/* EMPTY STATE —— migrato a .cb-empty-state */

/* DOCUMENTI GARA PAGE STYLES */

/* PAGE / BREADCRUMB / HEADER / BUTTONS / ALERTS / CARD / CARD-HEADER —— migrati a .cb-* utilities */
.dg-hdr-right { margin-left: auto; display: flex; gap: 0.3rem; flex-wrap: wrap; }
.dg-act-btn { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #e0e1e3; background: #fff; color: #6b7280; text-decoration: none; transition: all 0.15s; font-size: 0.85rem; padding: 0; }
.dg-act-btn:hover { border-color: #E34824; color: #E34824; background: rgba(227,72,36,0.04); }
.dg-act-btn-danger:hover { border-color: #dc2626; color: #dc2626; background: rgba(220,38,38,0.04); }
.dg-act-btn-info:hover { border-color: #0891b2; color: #0891b2; }
.dg-act-btn-warn:hover { border-color: #d97706; color: #d97706; }
.dg-icon-file { font-size: 1.3rem; }
@media (max-width: 767.98px) { .dg-header { flex-direction: column; } }

/* PREVENTIVI PAGE STYLES */

/* PAGE / BREADCRUMB / HEADER / BUTTONS / ALERTS / CARD / CARD-HEADER —— migrati a .cb-* utilities */
.pv-hdr-right { margin-left: auto; font-size: 0.8rem; color: #6b7280; }
.cb-table tbody tr.pv-row-selected:hover { background: rgba(217,119,6,0.1); }

.pv-act-btn { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #e0e1e3; background: #fff; color: #6b7280; text-decoration: none; transition: all 0.15s; font-size: 0.85rem; padding: 0; }
.pv-act-btn:hover { border-color: #E34824; color: #E34824; background: rgba(227,72,36,0.04); }
.pv-act-btn-danger:hover { border-color: #dc2626; color: #dc2626; background: rgba(220,38,38,0.04); }
.pv-act-btn-info:hover { border-color: #0891b2; color: #0891b2; }
.pv-act-btn-warn:hover { border-color: #d97706; color: #d97706; }
.pv-checkbox { border-radius: 0 !important; border-color: #e0e1e3; width: 16px; height: 16px; cursor: pointer; }
.pv-checkbox:checked { background-color: #d97706; border-color: #d97706; }
@media (max-width: 767.98px) { .pv-header { flex-direction: column; } }

/* SCADENZE PAGE STYLES */

.sc-stat:hover { transform: translateY(-2px); }

.sc-btn-sm-outline { background: transparent; color: #6b7280; border-color: #e0e1e3; }
.sc-btn-sm-outline:hover { background: #f3f4f6; border-color: #e0e1e3; color: #6b7280; }

.sc-card-header h2 { font-size: 0.85rem; font-weight: 700; color: #151515; margin: 0; display: flex; align-items: center; gap: 0.4rem; }

/* —— Filters —— */
.sc-filter .form-label { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: #151515; margin-bottom: 0.25rem; }
.sc-filter .form-select, .sc-filter .form-control { border-radius: 0; border: 1px solid #e0e1e3; font-size: 0.82rem; }
.sc-filter .form-select:focus { border-color: #E34824; box-shadow: 0 0 0 0.15rem rgba(227,72,36,0.12); }
.sc-filter .form-check-input { border-radius: 0; border-color: #e0e1e3; }
.sc-filter .form-check-input:checked { background-color: #E34824; border-color: #E34824; }
.sc-filter .form-check-label { font-size: 0.82rem; }

/* —— Legenda —— */
.sc-legenda-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; color: #151515; }
.sc-legenda-color { width: 14px; height: 14px; flex-shrink: 0; }

/* —— Scadenza items sidebar —— */
.sc-scad-list { max-height: 220px; overflow-y: auto; }
.sc-scad-item { display: flex; justify-content: space-between; align-items: flex-start; padding: 0.6rem 1rem 0.6rem calc(1rem + 4px); border-bottom: 1px solid #EEEFF0; text-decoration: none; color: #151515; transition: background 0.15s; border-left: 4px solid transparent; }
.sc-scad-item:hover { background: rgba(227,72,36,0.03); color: #151515; }
.sc-scad-item:last-child { border-bottom: none; }
.sc-scad-item--red { border-left-color: #dc2626; }
.sc-scad-item--amber { border-left-color: #d97706; }
.sc-scad-item--cyan { border-left-color: #0891b2; }
.sc-scad-item strong { font-size: 0.82rem; display: block; margin-bottom: 0.1rem; }
.sc-scad-item small { font-size: 0.72rem; color: #9ca3af; }
.sc-scad-complete-btn { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(5,150,105,0.3); background: transparent; color: #059669; font-size: 0.75rem; flex-shrink: 0; cursor: pointer; transition: all 0.15s; }
.sc-scad-complete-btn:hover { background: rgba(5,150,105,0.08); border-color: #059669; }
.sc-scad-empty { text-align: center; padding: 1.5rem; }
.sc-scad-empty i { color: #e0e1e3; font-size: 1.8rem; display: block; margin-bottom: 0.3rem; }
.sc-scad-empty p { font-size: 0.82rem; color: #6b7280; margin: 0; }
@media (max-width: 991.98px) { .sc-stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575.98px) { .sc-stats { grid-template-columns: 1fr; } }

/* SCADENZE > CREATE PAGE STYLES */

/* Form */

/* Sidebar */
.scc-info-list { font-size: 0.82rem; color: #151515; padding-left: 1.2rem; margin: 0; }
.scc-info-list li { margin-bottom: 0.35rem; }
.scc-info-list li strong { color: #E34824; }
.scc-info-text { font-size: 0.82rem; color: #6b7280; margin: 0; }
.scc-info-title { font-size: 0.82rem; font-weight: 700; color: #151515; margin: 0 0 0.35rem; }

/* Suggerimenti card */
.scc-sugg-card { display: none; }
.scc-sugg-title { font-size: 0.82rem; font-weight: 700; color: #d97706; margin: 0 0 0.25rem; }
.scc-sugg-text { font-size: 0.82rem; color: #6b7280; margin: 0; }

/* SCADENZE > DETAILS PAGE STYLES */

/* Header */
.sd-header h1 { font-size: 1.4rem; font-weight: 700; color: #151515; margin: 0 0 0.5rem; display: flex; align-items: center; gap: 0.5rem; }
.sd-header h1 svg { color: #E34824; flex-shrink: 0; }
.sd-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.sd-btn-outline { background: transparent; font-size: 0.82rem; padding: 0.4rem 0.8rem; border: 1px solid; border-radius: 0; text-decoration: none; display: inline-flex; align-items: center; gap: 0.3rem; transition: all 0.15s; font-weight: 600; }

/* Alerts */

.sd-date-display { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.1rem; }

/* Entit—— correlate */
.sd-entity { display: flex; justify-content: space-between; align-items: center; padding: 0.85rem 1rem; border: 1px solid #EEEFF0; margin-bottom: 0.6rem; transition: background 0.15s; }
.sd-entity:last-child { margin-bottom: 0; }
.sd-entity:hover { background: rgba(227,72,36,0.02); }
.sd-entity-label { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; color: #6b7280; margin-bottom: 0.15rem; display: flex; align-items: center; gap: 0.3rem; }
.sd-entity-value { font-size: 0.85rem; color: #151515; }

/* Countdown */
.sd-countdown { text-align: center; padding: 1.5rem 1rem; }
.sd-countdown-icon { font-size: 3rem; margin-bottom: 0.5rem; }
.sd-countdown-num { font-size: 3.5rem; font-weight: 800; line-height: 1; margin-bottom: 0.2rem; }
.sd-countdown h3 { font-size: 1.1rem; font-weight: 700; margin: 0.5rem 0 0.2rem; }
.sd-countdown p { font-size: 0.82rem; color: #6b7280; margin: 0; }

/* Sidebar */

.sd-sys-field:last-child { margin-bottom: 0; }

@media (max-width: 991.98px) {
    .sd-header { flex-direction: column; }
    .sd-field { flex-direction: column; }
    .sd-field-label { width: auto; margin-bottom: 0.15rem; }
}

/* SCADENZE > EDIT PAGE STYLES */

.cb-form .form-control.bg-light { background: #EEEFF0 !important; }

.se-btn-outline { background: transparent; font-size: 0.82rem; padding: 0.4rem 0.8rem; border: 1px solid; border-radius: 0; text-decoration: none; display: inline-flex; align-items: center; gap: 0.3rem; transition: all 0.15s; font-weight: 600; }
.se-completamento-box { border: 1px solid #e0e1e3; padding: 1rem 1.25rem; transition: all 0.2s; }
.se-completamento-box--active { border-color: rgba(5,150,105,0.3); background: rgba(5,150,105,0.03); }
.se-stato-display { text-align: center; padding: 1rem; }
.se-stato-display h3 { font-size: 1rem; font-weight: 700; margin: 0 0 0.2rem; display: flex; align-items: center; justify-content: center; gap: 0.4rem; }
.se-stato-display p { font-size: 0.82rem; color: #6b7280; margin: 0; }

/* SCADENZE > DELETE PAGE STYLES */

/* sdd- prefix = Scadenze Delete page */

/* Alert */

.sdd-alert strong { font-weight: 600; }

.sdd-icon-box--warning i { color: var(--cb-amber); }
.sdd-icon-box--audit i { color: var(--cb-gray); }
.sdd-icon-box--info i { color: var(--cb-cyan); }

.sdd-card-body--padleft {
    padding-left: calc(1.5rem + 4px);
}

/* Section divider */

/* Section label */
.sdd-section-label {
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--cb-gray);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.sdd-section-label i { color: var(--cb-accent); }

/* Badges */

/* Note box */

/* Consequences list */
.sdd-consequences {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sdd-consequences li {
    font-size: 0.82rem;
    color: var(--cb-dark);
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--cb-light);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}
.sdd-consequences li:last-child { border-bottom: none; }
.sdd-consequences li::before {
    content: '';
    width: 5px;
    height: 5px;
    background: var(--cb-amber);
    flex-shrink: 0;
    margin-top: 6px;
}

/* Audit fields */
.sdd-audit-field { margin-bottom: 0.75rem; }
.sdd-audit-field:last-child { margin-bottom: 0; }

/* Outline small buttons (sidebar alternatives) */
.sdd-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 0;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    width: 100%;
    justify-content: center;
    border: 1px solid;
    background: transparent;
}
.sdd-alt-desc {
    font-size: 0.82rem;
    color: var(--cb-gray);
    margin-bottom: 0.75rem;
}

/* Automatic block (full page) */
.sdd-auto-block {
    max-width: 640px;
    margin: 0 auto;
    padding: 2rem 0;
}
.sdd-auto-card {
    background: var(--cb-white);
    border: 1px solid var(--cb-border);
    border-radius: 0;
    overflow: hidden;
}
.sdd-auto-card-header {
    position: relative;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--cb-border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.sdd-auto-card-header::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: var(--cb-amber);
}
.sdd-auto-card-body {
    padding: 1.5rem;
}
.sdd-auto-card-body p {
    font-size: 0.85rem;
    color: var(--cb-dark);
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 991.98px) {
    .sdd-sidebar-sticky { position: static; }
    .sdd-field { flex-direction: column; }
    .sdd-field-label { width: auto; }
}
@media (max-width: 575.98px) {
    .sdd-page-header { flex-direction: column; gap: 1rem; }
}

/* REGISTRO CONTRATTI INDEX PAGE STYLES */

/* ----- Wrapper pagina ----- */
/* PAGE / BREADCRUMB —— migrati a .cb-page / .cb-breadcrumb */

.rc-title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}
.rc-title-icon {
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    background: rgba(227,72,36,0.08);
    border: 1px solid rgba(227,72,36,0.15);
    color: var(--cb-accent);
}

/* BOTTONI —— migrati a .cb-btn cb-btn-success/primary/secondary/danger */

.rc-btn-icon--secondary {
    border: 1px solid rgba(107,114,128,0.20); color: var(--cb-gray);
}
.rc-btn-icon--secondary:hover {
    background: rgba(107,114,128,0.06); border-color: var(--cb-gray); color: var(--cb-gray);
}
.rc-btn-icon--amber {
    border: 1px solid rgba(217,119,6,0.20); color: var(--cb-amber);
}
.rc-btn-icon--amber:hover {
    background: rgba(217,119,6,0.06); border-color: var(--cb-amber); color: var(--cb-amber);
}

/* ALERT —— migrato a .cb-alert--success/--danger */

.rc-stat {
    text-align: center;
    padding: 1.25rem 1rem;
    background: var(--cb-white);
    border: 1px solid var(--cb-border);
    border-radius: 0;
    transition: transform 0.15s, border-color 0.15s;
    text-decoration: none;
    display: block;
}
.rc-stat:hover { transform: translateY(-2px); border-color: var(--cb-muted); }
.rc-stat--warn   { border-color: rgba(217,119,6,0.30); }
.rc-stat--warn:hover { border-color: var(--cb-amber); }
.rc-stat--danger { border-color: rgba(220,38,38,0.30); }
.rc-stat--danger:hover { border-color: var(--cb-danger); }
.rc-stat-num--dark    { font-size: 1.1rem; color: var(--cb-dark); }

/* ----- Card —— migrato a .cb-card; resta header con barra grigia (no accent) ----- */

.rc-card-header::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: var(--cb-gray);
}

.rc-card-meta { font-size: 0.82rem; color: var(--cb-gray); }

/* ----- Tabella ----- */

.rc-table thead th:first-child { padding-left: 1.5rem; }
.rc-table thead th:last-child  { padding-right: 1.5rem; }
.rc-table tbody td:first-child { padding-left: 1.5rem; }
.rc-table tbody td:last-child  { padding-right: 1.5rem; }
.rc-table tbody tr.rc-row--scaduto   { background: rgba(220,38,38,0.03); }
.rc-table tbody tr.rc-row--scaduto:hover  { background: rgba(220,38,38,0.06); }
.rc-table tbody tr.rc-row--warning   { background: rgba(217,119,6,0.03); }
.rc-table tbody tr.rc-row--warning:hover  { background: rgba(217,119,6,0.06); }

/* ----- Badge ----- */

/* ----- Row link ----- */
.rc-row-link {
    color: var(--cb-dark); font-weight: 600; font-size: 0.85rem;
    text-decoration: none; transition: color 0.15s;
}
.rc-row-link:hover { color: var(--cb-accent); }
.rc-row-sub {
    font-size: 0.75rem; color: var(--cb-gray); margin-top: 0.15rem;
    display: flex; align-items: center; gap: 0.25rem;
}

/* ----- Code tag ----- */
.rc-code {
    font-size: 0.78rem; color: var(--cb-gray);
    font-family: monospace; background: var(--cb-light);
    padding: 0.1rem 0.35rem;
}

/* ----- Dropdown toggle ----- */
.rc-dropdown-toggle {
    width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid rgba(107,114,128,0.20); color: var(--cb-gray);
    background: transparent; cursor: pointer; border-radius: 0;
    transition: background 0.15s;
}
.rc-dropdown-toggle:hover  { background: rgba(107,114,128,0.06); border-color: var(--cb-gray); }
.rc-dropdown-toggle.is-open { background: rgba(107,114,128,0.08); border-color: var(--cb-gray); }

/* ----- Floating menu ----- */
.rc-floating-menu {
    display: none;
    position: fixed;
    z-index: 9999;
    background: var(--cb-white);
    border: 1px solid var(--cb-border);
    border-radius: 0;
    box-shadow: 0 8px 24px rgba(21,21,21,0.14);
    min-width: 190px;
}
.rc-floating-menu.is-open { display: block; }
.rc-dropdown-item {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.55rem 1rem; font-size: 0.82rem; color: var(--cb-dark);
    text-decoration: none; cursor: pointer; background: none; border: none;
    width: 100%; text-align: left;
    transition: background 0.15s, color 0.15s;
}
.rc-dropdown-item:hover { background: rgba(227,72,36,0.06); color: var(--cb-accent); }
.rc-dropdown-item--danger { color: var(--cb-danger); }
.rc-dropdown-item--danger:hover { background: rgba(220,38,38,0.06); color: var(--cb-danger); }
.rc-dropdown-divider { border: 0; border-top: 1px solid var(--cb-light); margin: 0.25rem 0; }

/* ----- Empty state ----- */

/* ----- Scadenza info ----- */
.rc-scad-warning { font-size: 0.75rem; color: var(--cb-amber); display: flex; align-items: center; gap: 0.25rem; margin-top: 0.15rem; }
.rc-scad-danger  { font-size: 0.75rem; color: var(--cb-danger); display: flex; align-items: center; gap: 0.25rem; margin-top: 0.15rem; }
.rc-scad-muted   { font-size: 0.75rem; color: var(--cb-muted); margin-top: 0.15rem; }

.rc-modal {
    background: var(--cb-white); border: 1px solid var(--cb-border);
    border-radius: 0; width: 100%; max-width: 480px;
    box-shadow: 0 16px 48px rgba(21,21,21,0.20);
}
.rc-modal-icon-box {
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(220,38,38,0.08); border: 1px solid rgba(220,38,38,0.15);
}
.rc-modal-icon-box i { color: var(--cb-danger); font-size: 1rem; }

/* ----- Responsive ----- */
@media (max-width: 1199.98px) { .rc-stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 767.98px)  {
    .rc-stats { grid-template-columns: repeat(2, 1fr); }
    .rc-table { font-size: 0.8rem; }
}
@media (max-width: 575.98px)  {
    .rc-stats { grid-template-columns: 1fr; }
    .rc-page-header { flex-direction: column; align-items: flex-start; }
    .rc-header-actions { width: 100%; flex-wrap: wrap; }
    .rc-btn { font-size: 0.8rem; padding: 0.5rem 1rem; }
}

/* REGISTRO CONTRATTI > CREATE PAGE STYLES */

/* rcc- prefix = RegistroContratti Create */

/* Card header (locale: variant accent/cyan/green/amber/gray) */

.rcc-card-title-sub { font-size: 0.78rem; font-weight: 400; color: var(--cb-muted); margin-left: 0.4rem; }

/* Section labels inside card */
.rcc-section-label {
    font-size: 0.82rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.03em; color: var(--cb-gray);
    margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.4rem;
}
.rcc-section-label i { color: var(--cb-accent); }

/* Divider */

/* Form elements */

.rcc-check-input {
    width: 1rem; height: 1rem; border: 1px solid var(--cb-border);
    border-radius: 0; accent-color: var(--cb-accent); cursor: pointer; flex-shrink: 0;
}
.rcc-check-label { font-size: 0.85rem; font-weight: 500; color: var(--cb-dark); cursor: pointer; }

/* Validation */
.rcc-proto-msg  { font-size: 0.72rem; margin-top: 0.25rem; display: block; }

/* Note box */

/* Durata calcolata */
.rcc-durata { font-size: 0.85rem; padding: 0.5rem 0; }

/* Riepilogo card */
.rcc-riepilogo-list { list-style: none; padding: 0; margin: 0 0 1.25rem 0; }
.rcc-riepilogo-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.6rem 0; border-bottom: 1px solid var(--cb-light);
    font-size: 0.82rem;
}
.rcc-riepilogo-item:last-child { border-bottom: none; }
.rcc-riepilogo-val  { color: var(--cb-dark); font-weight: 500; text-align: right; max-width: 55%; }
.rcc-riepilogo-canone { font-weight: 700; font-size: 0.92rem; color: var(--cb-dark); }

/* Badges riepilogo */

/* Sidebar action btn full width + spacing */
#registroForm .col-lg-4 .cb-btn { width: 100%; justify-content: center; }
#registroForm .col-lg-4 .cb-btn + .cb-btn { margin-top: 0.5rem; }

/* Rinnovo alert in sidebar */
.rcc-sidebar-note {
    background: rgba(8,145,178,0.04); border-left: 3px solid var(--cb-cyan);
    padding: 0.6rem 0.85rem; font-size: 0.78rem; color: var(--cb-dark);
    margin-bottom: 1rem;
}

/* —— Responsive —— */
@media (max-width: 576px) {
    .ts-wrapper.single .ts-control,
    .ts-wrapper.multi .ts-control {
        padding: 0.45rem 0.6rem;
        font-size: 0.82rem;
    }
    .ts-dropdown .option {
        padding: 0.55rem 0.6rem;
        font-size: 0.82rem;
    }
}

/* Responsive */
@media (max-width: 991.98px) {
    .rcc-sidebar-sticky { position: static; }
}
@media (max-width: 575.98px) {
    .rcc-page-title { font-size: 1.2rem; }
}

/* REGISTRO CONTRATTI > DETAILS PAGE STYLES */

/* rd- prefix = RegistroContratti Details */

/* Breadcrumb */
/* (rd-breadcrumb rimosso, usa cb-breadcrumb) */

/* Alerts */

#rd-dynamic-alerts .rd-alert { margin-bottom: 1.5rem; }

/* Badges */

.rd-field-value--muted { color: var(--cb-muted); font-style: italic; font-weight: 400; }

/* Code */
.rd-code { font-size: 0.78rem; color: var(--cb-gray); font-family: monospace; background: var(--cb-light); padding: 0.1rem 0.35rem; }

/* Note box */

/* Divider */

/* Section label */
.rd-section-label {
    font-size: 0.82rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.03em; color: var(--cb-gray);
    margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.4rem;
}
.rd-section-label i { color: var(--cb-accent); }

/* Amount highlight */
.rd-amount { font-size: 1.1rem; font-weight: 700; color: var(--cb-accent); }

/* Table inside card */

.rd-table thead th {
    background: var(--cb-dark); color: #fff;
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
    padding: 0.65rem 1rem; border: none; white-space: nowrap;
}
.rd-table thead th:first-child { padding-left: 1.5rem; }
.rd-table thead th:last-child  { padding-right: 1.5rem; }
.rd-table tbody td {
    padding: 0.7rem 1rem; font-size: 0.82rem; color: var(--cb-dark);
    border-bottom: 1px solid var(--cb-light); vertical-align: middle;
}
.rd-table tbody td:first-child { padding-left: 1.5rem; }
.rd-table tbody td:last-child  { padding-right: 1.5rem; }
.rd-table tbody tr { transition: background 0.15s ease; }
.rd-table tbody tr:hover { background: rgba(227,72,36,0.03); }
.rd-table tbody tr.rd-row--completed { opacity: 0.55; }
.rd-table-link { color: var(--cb-dark); font-weight: 600; text-decoration: none; }
.rd-table-link:hover { color: var(--cb-accent); }

.rd-btn-icon--secondary { border: 1px solid rgba(107,114,128,0.2); color: var(--cb-gray); }
.rd-btn-icon--secondary:hover { background: rgba(107,114,128,0.06); border-color: var(--cb-gray); color: var(--cb-gray); }
.rd-btn-icon--accent    { border: 1px solid rgba(227,72,36,0.2);   color: var(--cb-accent); }
.rd-btn-icon--accent:hover { background: rgba(227,72,36,0.06); border-color: var(--cb-accent); color: var(--cb-accent); }
.rd-btn-icon--info      { border: 1px solid rgba(8,145,178,0.2);   color: var(--cb-cyan); }
.rd-btn-icon--info:hover { background: rgba(8,145,178,0.06); border-color: var(--cb-cyan); color: var(--cb-cyan); }
.rd-btn-icon--danger    { border: 1px solid rgba(220,38,38,0.2);   color: var(--cb-danger); background: transparent; border-radius: 0; cursor: pointer; }
.rd-btn-icon--danger:hover { background: rgba(220,38,38,0.06); border-color: var(--cb-danger); color: var(--cb-danger); }

/* Versioni list */
.rd-version-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.75rem 1rem; border-bottom: 1px solid var(--cb-light);
    text-decoration: none; transition: background 0.15s ease;
}
.rd-version-item:last-child { border-bottom: none; }
.rd-version-item:hover { background: rgba(227,72,36,0.03); }
.rd-version-sub   { font-size: 0.75rem; color: var(--cb-muted); margin-top: 0.1rem; }
.rd-sys-by    { font-size: 0.75rem; color: var(--cb-muted); }

/* Empty state */

/* Riepilogo list */
.rd-summary-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.6rem 0; border-bottom: 1px solid var(--cb-light); font-size: 0.82rem;
}
.rd-summary-item:last-child { border-bottom: none; }
.rd-summary-val  { color: var(--cb-dark); font-weight: 500; text-align: right; }
.rd-summary-val--accent { color: var(--cb-accent); font-weight: 700; }
.rd-summary-val--danger { color: var(--cb-danger); font-weight: 600; }
.rd-summary-val--warn   { color: var(--cb-amber);  font-weight: 600; }

/* Sidebar hr */
.rd-sidebar-hr { border: 0; border-top: 1px solid var(--cb-light); margin: 0.75rem 0; }

.rd-modal { background: var(--cb-white); border: 1px solid var(--cb-border); border-radius: 0; width: 100%; max-width: 480px; box-shadow: 0 16px 48px rgba(21,21,21,0.2); }
.rd-modal-header--danger::before  { background: var(--cb-danger); }
.rd-modal-header--accent::before  { background: var(--cb-accent); }
.rd-modal-icon-box { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; }
.rd-modal-btn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.5rem 1.25rem; font-size: 0.85rem; font-weight: 600; border-radius: 0; border: 2px solid; cursor: pointer; transition: background 0.2s, border-color 0.2s, color 0.2s; }
.rd-modal-btn--secondary { background: transparent; color: var(--cb-gray); border-color: var(--cb-border); }
.rd-modal-btn--secondary:hover { border-color: var(--cb-dark); color: var(--cb-dark); }
.rd-modal-btn--danger { background: var(--cb-danger); color: #fff; border-color: var(--cb-danger); }
.rd-modal-btn--danger:hover { background: var(--cb-danger-hover); border-color: var(--cb-danger-hover); }
.rd-modal-btn--accent { background: var(--cb-accent); color: #fff; border-color: var(--cb-accent); }
.rd-modal-btn--accent:hover { background: var(--cb-accent-hover); border-color: var(--cb-accent-hover); }

/* Responsive */
@media (max-width: 991.98px) {
    .rd-sidebar-sticky { position: static; }
    .rd-field { flex-direction: column; }
    .rd-field-label { width: auto; }
    .rd-page-header { flex-direction: column; }
    .rd-header-actions { width: 100%; }
}

/* REGISTRO CONTRATTI > EDIT PAGE STYLES */

/* re- prefix = RegistroContratti Edit */

/* Badges */

/* Alerts */

.re-card-title-sub { font-size: 0.78rem; font-weight: 400; color: var(--cb-muted); margin-left: 0.4rem; }

/* Section label */
.re-section-label { font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: var(--cb-gray); margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.4rem; }
.re-section-label i { color: var(--cb-accent); }

/* Divider */

/* Form elements */

/* Plaintext read-only field */
.re-plaintext { font-size: 0.85rem; color: var(--cb-dark); padding: 0.5rem 0; font-weight: 500; display: flex; align-items: center; gap: 0.4rem; }
.re-plaintext-sub { font-size: 0.72rem; color: var(--cb-muted); display: block; margin-top: 0.1rem; }

.re-check-input { width: 1rem; height: 1rem; border: 1px solid var(--cb-border); border-radius: 0; accent-color: var(--cb-accent); cursor: pointer; flex-shrink: 0; }
.re-check-label { font-size: 0.85rem; font-weight: 500; color: var(--cb-dark); cursor: pointer; }

/* Validation & helpers */
.re-proto-msg  { font-size: 0.72rem; margin-top: 0.25rem; display: block; }
.re-durata     { font-size: 0.85rem; padding: 0.5rem 0; }

/* Sidebar info fields */

.re-sys-value:last-child { margin-bottom: 0; }
.re-sys-note  { font-size: 0.72rem; color: var(--cb-muted); margin-top: 0.15rem; }

/* Sidebar divider */
.re-sidebar-hr { border: 0; border-top: 1px solid var(--cb-light); margin: 1rem 0; }

/* Quick actions stack */
.re-quick-stack { display: flex; flex-direction: column; gap: 0.4rem; }

/* Responsive */
@media (max-width: 991.98px) {
    .re-sidebar-sticky { position: static; }
    .re-page-header { flex-direction: column; }
}
@media (max-width: 575.98px) { .re-page-title { font-size: 1.2rem; } }

/* SCADENZE REGISTRO INDEX PAGE STYLES */

.sri-page {
    padding: 2rem;
}

@media (max-width: 575.98px) {
    .sri-page { padding: 1rem; }
}

/* Header pagina */
.sri-title {
    font-size: 1.4rem; font-weight: 700; color: #151515;
    letter-spacing: -0.025em; margin: 0;
}
.sri-subtitle { font-size: 0.85rem; color: #6b7280; margin: 0.2rem 0 0; }

/* Bottoni view toggle */
.sri-view-toggle { display: flex; }
.sri-view-btn {
    padding: 0.5rem 1rem; font-size: 0.82rem; font-weight: 600;
    border: 1px solid #e0e1e3; background: transparent; color: #6b7280;
    cursor: pointer; transition: background 0.15s, color 0.15s;
    display: flex; align-items: center; gap: 0.35rem;
}
.sri-view-btn:first-child { border-right: none; }
.sri-view-btn:hover { background: #EEEFF0; color: #151515; }
.sri-view-btn.active { background: #E34824; color: #fff; border-color: #E34824; }

.sri-btn-cyan { background: transparent; color: #0891b2; border-color: rgba(8,145,178,0.3); }
.sri-btn-cyan:hover { background: rgba(8,145,178,0.06); border-color: #0891b2; color: #0891b2; }

/* Alert */

@media (max-width: 991.98px) { .sri-stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 575.98px) { .sri-stats { grid-template-columns: repeat(2, 1fr); } }

.sri-card-header::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
    background: #E34824;
}
.sri-card-header-cyan::before  { background: #0891b2; }

/* Filtro attivo */
.sri-filter-active {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 0.5rem;
    padding: 0.6rem 1rem; margin-bottom: 1rem;
    background: rgba(8,145,178,0.04); border-left: 4px solid #0891b2;
    font-size: 0.85rem; color: #151515;
}
.sri-filter-remove {
    padding: 0.25rem 0.65rem; font-size: 0.75rem; font-weight: 600;
    border: 1px solid rgba(8,145,178,0.3); background: transparent;
    color: #0891b2; text-decoration: none; display: inline-flex; align-items: center; gap: 0.25rem;
}
.sri-filter-remove:hover { background: rgba(8,145,178,0.08); color: #0891b2; }

/* Tabella */
.sri-table thead th:first-child { width: 40px; text-align: center; }
.sri-table tbody tr.completed { background: #EEEFF0; color: #9ca3af; }
.sri-table tbody tr.completed:hover { background: #e5e6e8; }
.sri-table tbody td:first-child { text-align: center; }

.sri-desc-link {
    color: #151515; text-decoration: none; font-weight: 600; font-size: 0.85rem;
}
.sri-desc-link:hover { color: #E34824; }
.sri-reg-link { color: #0891b2; text-decoration: none; font-size: 0.78rem; }
.sri-reg-link:hover { color: #0891b2; text-decoration: underline; }

.sri-date-main { font-size: 0.85rem; color: #151515; white-space: nowrap; }
.sri-date-sub  { font-size: 0.72rem; display: block; }
.sri-date-sub.danger  { color: #dc2626; }
.sri-date-sub.warning { color: #d97706; }
.sri-date-sub.muted   { color: #9ca3af; }

/* Badge */

/* Badge allegati */
.sri-attach-badge {
    display: inline-flex; padding: 0.15rem 0.45rem;
    font-size: 0.68rem; font-weight: 600;
    background: rgba(107,114,128,0.08); color: #6b7280;
    border: 1px solid rgba(107,114,128,0.2);
}

.sri-action-btn {
    width: 32px; height: 32px; border: 1px solid; background: transparent;
    display: inline-flex; align-items: center; justify-content: center;
    text-decoration: none; font-size: 0.85rem; transition: background 0.15s;
    cursor: pointer;
}
.sri-action-view  { color: #E34824; border-color: rgba(227,72,36,0.2); }
.sri-action-view:hover  { background: rgba(227,72,36,0.08); color: #E34824; }
.sri-action-edit  { color: #6b7280; border-color: rgba(107,114,128,0.2); }
.sri-action-edit:hover  { background: rgba(107,114,128,0.08); color: #151515; }

/* Empty state */

/* Calendario - toggles */
.sri-cal-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 0.75rem; padding: 0.85rem 1.25rem;
    border-bottom: 1px solid #e0e1e3;
}
.sri-cal-legend { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.sri-legend-item { display: flex; align-items: center; gap: 0.35rem; font-size: 0.78rem; color: #6b7280; }
.sri-legend-dot { width: 10px; height: 10px; flex-shrink: 0; }

/* Modal custom */
.sri-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(21,21,21,0.5); z-index: 1060;
    align-items: center; justify-content: center;
}
.sri-modal-overlay.open { display: flex; }
.sri-modal {
    background: #fff; border: 1px solid #e0e1e3;
    width: 100%; max-width: 480px; margin: 1rem; overflow: hidden;
}
.sri-modal-field { display: flex; flex-direction: column; margin-bottom: 0.85rem; }
.sri-modal-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7280; margin-bottom: 0.2rem; }

/* REGISTRO CONTRATTI > STATISTICHE PAGE STYLES */

/* KPI Grid */
.rs-kpi-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; margin-bottom: 1.5rem; }

/* KPI Stat card (clickable) */
.rs-kpi { text-decoration: none; display: block; }
.rs-kpi-card {
    background: var(--cb-white); border: 1px solid var(--cb-border); border-radius: 0;
    padding: 1.25rem 1rem; display: flex; justify-content: space-between; align-items: flex-start;
    gap: 0.75rem; height: 100%;
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.rs-kpi:hover .rs-kpi-card { border-color: var(--cb-accent); transform: translateY(-2px); }
.rs-kpi-card--warn   { border-left: 4px solid var(--cb-amber); }
.rs-kpi-card--danger { border-left: 4px solid var(--cb-danger); }
.rs-kpi-card--success { border-left: 4px solid var(--cb-green); }
.rs-kpi-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--cb-gray); margin-bottom: 0.3rem; }
.rs-kpi-num { font-size: 1.75rem; font-weight: 700; line-height: 1; color: var(--cb-dark); }
.rs-kpi-num--success { color: var(--cb-green); font-size: 1.3rem; }
.rs-kpi-sub { font-size: 0.68rem; color: var(--cb-muted); margin-top: 0.15rem; }
.rs-kpi-icon-box { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* Stat mini blocks */
.rs-stat-block { border: 1px solid var(--cb-border); padding: 1.25rem 1rem; text-align: center; }
.rs-stat-block--success { border-color: rgba(5,150,105,0.25); }
.rs-stat-block--warn    { border-color: rgba(217,119,6,0.25); }
.rs-stat-block--danger  { border-color: rgba(220,38,38,0.25); }
.rs-stat-block--gray    { border-color: rgba(107,114,128,0.2); }
.rs-stat-block--cyan    { border-color: rgba(8,145,178,0.2); }

/* Summary row */
.rs-summary-row { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 0; border-bottom: 1px solid var(--cb-light); font-size: 0.85rem; }
.rs-summary-row:last-child { border-bottom: none; }
.rs-summary-key { color: var(--cb-gray); display: flex; align-items: center; gap: 0.4rem; }
.rs-summary-val { font-weight: 700; font-size: 1rem; }

/* Divider */

/* Total row inline */
.rs-total-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; color: var(--cb-gray); }
.rs-total-val { font-size: 1.2rem; font-weight: 700; color: var(--cb-dark); }

/* Action buttons grid */
.rs-action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.rs-action-btn {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 1.25rem 0.75rem; text-decoration: none; font-size: 0.8rem; font-weight: 600;
    border-radius: 0; border: 2px solid; gap: 0.4rem;
    transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
    text-align: center;
}
.rs-action-btn i { font-size: 1.5rem; }
.rs-action-btn--cyan    { background: transparent; color: var(--cb-cyan);   border-color: rgba(8,145,178,0.3); }
.rs-action-btn--cyan:hover    { background: rgba(8,145,178,0.06);   border-color: var(--cb-cyan);   color: var(--cb-cyan); }
.rs-action-btn--warn    { background: transparent; color: var(--cb-amber);  border-color: rgba(217,119,6,0.3); }
.rs-action-btn--warn:hover    { background: rgba(217,119,6,0.06);   border-color: var(--cb-amber);  color: var(--cb-amber); }
.rs-action-btn--danger  { background: transparent; color: var(--cb-danger); border-color: rgba(220,38,38,0.3); }
.rs-action-btn--danger:hover  { background: rgba(220,38,38,0.06);   border-color: var(--cb-danger); color: var(--cb-danger); }

/* Quick links stack */
.rs-quick-stack { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 1.25rem; }
.rs-quick-link { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.75rem; font-size: 0.82rem; font-weight: 600; border-radius: 0; border: 1px solid rgba(107,114,128,0.2); color: var(--cb-gray); text-decoration: none; transition: background 0.2s, border-color 0.2s; }
.rs-quick-link:hover { background: rgba(107,114,128,0.06); border-color: var(--cb-gray); color: var(--cb-gray); }

/* Responsive */
@media (max-width: 1199.98px) { .rs-kpi-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 767.98px)  { .rs-kpi-grid { grid-template-columns: repeat(2, 1fr); } .rs-action-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 575.98px)  { .rs-kpi-grid { grid-template-columns: 1fr 1fr; } }

/* USER PAGE STYLES */

/* ALERTS / PAGE HEADER —— migrati a .cb-* utilities */

/* Main card —— migrato a .cb-card; resta header con accent */

/* Avatar */
.ui-avatar { width: 38px; height: 38px; border-radius: 0; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; background: rgba(227,72,36,0.1); color: var(--cb-accent); border: 1px solid rgba(227,72,36,0.2); flex-shrink: 0; letter-spacing: 0.02em; }
.ui-user-cell { display: flex; align-items: center; gap: 0.75rem; }

/* Badges */

.ui-btn-icon--accent   { border-color: rgba(227,72,36,0.2);  color: var(--cb-accent); }
.ui-btn-icon--accent:hover   { background: rgba(227,72,36,0.08);  border-color: var(--cb-accent);  color: var(--cb-accent); }
.ui-btn-icon--green    { border-color: rgba(5,150,105,0.2);  color: var(--cb-green); }
.ui-btn-icon--green:hover    { background: rgba(5,150,105,0.08);  border-color: var(--cb-green);   color: var(--cb-green); }
.ui-btn-icon--secondary{ border-color: rgba(107,114,128,0.2); color: var(--cb-gray); }
.ui-btn-icon--secondary:hover{ background: rgba(107,114,128,0.08); border-color: var(--cb-gray);   color: var(--cb-gray); }

/* Empty state —— migrato a .cb-empty-state */
/* Button primary —— migrato a .cb-btn cb-btn-success */

/* Responsive */
@media (max-width: 767.98px) {
    .ui-search-input { width: 100%; }
    .ui-toolbar { flex-direction: column; align-items: stretch; }
    .ui-search-wrap { width: 100%; }
}

/* SOGGETTI PAGE STYLES */

/* —— Variabili —— */

/* PAGE / HEADER / BUTTONS / ALERTS —— migrati a .cb-* utilities */

/* —— Card —— migrato a .cb-card; resta header con modifiers locali (gray default + accent/cyan) —— */

.si-card-header::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: var(--cb-gray);
}
.si-icon-box--gray   i { color: var(--cb-gray); }

.si-toggle-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--cb-gray);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: auto;
}
.si-toggle-btn i { transition: transform 0.2s ease; }
.si-toggle-btn.collapsed i { transform: rotate(-90deg); }
.si-toggle-btn:hover { color: var(--cb-dark); }

.si-input-group-dual { display: flex; gap: 0; align-items: stretch; }
.si-input-group-dual > select:first-child { flex: 1 1 auto; min-width: 0; border-right: none; }

.si-results-info {
    font-size: 0.82rem;
    color: var(--cb-gray);
    margin: 0;
}
.si-results-info strong { color: var(--cb-dark); }

/* —— Badge risultati —— */

/* —— Tabella —— */
.si-table-wrap {
    background: var(--cb-white);
    border: 1px solid var(--cb-border);
    overflow-x: auto;
}
.si-table-link {
    color: var(--cb-gray);
    text-decoration: none;
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: color 0.15s;
}
.si-table-link:hover { color: var(--cb-accent); }
.si-table-muted { color: var(--cb-muted); font-style: italic; font-size: 0.82rem; }

.si-action-btn {
    width: 32px; height: 32px;
    border: 1px solid;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
    font-size: 0.85rem;
    border-radius: 0;
    cursor: pointer;
}
.si-action-btn--cyan   { border-color: rgba(8,145,178,0.2);   color: var(--cb-cyan); }
.si-action-btn--cyan:hover   { background: rgba(8,145,178,0.08);   border-color: var(--cb-cyan); }
.si-action-btn--amber  { border-color: rgba(217,119,6,0.2);   color: var(--cb-amber); }
.si-action-btn--amber:hover  { background: rgba(217,119,6,0.08);   border-color: var(--cb-amber); }
.si-action-btn--danger { border-color: rgba(220,38,38,0.2);   color: var(--cb-danger); }
.si-action-btn--danger:hover { background: rgba(220,38,38,0.08);   border-color: var(--cb-danger); }

/* —— Empty state —— */
.si-empty {
    padding: 3rem 2rem;
    text-align: center;
    background: var(--cb-white);
    border: 1px solid var(--cb-border);
}

/* —— Footer paginazione —— */

/* —— Responsive —— */
@media (max-width: 991.98px) {
    .si-form-row   { grid-template-columns: repeat(2, 1fr); }
    .si-form-row-2 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 575.98px) {
    .si-form-row   { grid-template-columns: 1fr; }
    .si-form-row-2 { grid-template-columns: 1fr; }
    .si-header { flex-direction: column; }
}

/* NOTIFICHE CONFIG PAGE STYLES */

/* PAGE / HEADER / ALERTS —— migrati a .cb-* utilities */

/* —— Module Card —— migrato a .cb-card; resta header con accent grigio —— */
.cb-card .nci-card-header {
    position: relative;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--cb-border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.cb-card .nci-card-header::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: var(--cb-gray);
}

/* —— Table —— migrato a .cb-table; restano override allineamenti NCI —— */
.cb-card .cb-table th.nci-th-center { text-align: center; }
.cb-card .cb-table td.nci-td-center { text-align: center; }

/* —— Toggle button —— */
.nci-toggle-btn {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* —— Description link —— */
.nci-desc-link {
    color: var(--cb-dark);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s;
}
.nci-desc-link:hover { color: var(--cb-accent); text-decoration: none; }

/* —— Code —— */
.nci-code {
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--cb-gray);
    background: var(--cb-light);
    padding: 0.15rem 0.4rem;
    border: 1px solid var(--cb-border);
}

/* —— Badges —— */

.nci-action-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 0;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}
.nci-action-btn-cyan  { border: 1px solid rgba(8,145,178,0.15);  color: var(--cb-cyan); }
.nci-action-btn-cyan:hover  { background: rgba(8,145,178,0.08);  border-color: var(--cb-cyan);  color: var(--cb-cyan); }
.nci-action-btn-amber { border: 1px solid rgba(217,119,6,0.15);  color: var(--cb-amber); }
.nci-action-btn-amber:hover { background: rgba(217,119,6,0.08);  border-color: var(--cb-amber); color: var(--cb-amber); }
.nci-action-btn-green { border: 1px solid rgba(5,150,105,0.15);  color: var(--cb-green); }
.nci-action-btn-green:hover { background: rgba(5,150,105,0.08);  border-color: var(--cb-green); color: var(--cb-green); }

/* —— Empty state —— migrato a .cb-empty-state —— */

/* —— Responsive —— */
@media (max-width: 767.98px) {
    .nci-stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 575.98px) {
    .nci-page { padding: 1rem; }
    .nci-stats { grid-template-columns: 1fr; }
}

/* REPARTI PAGE STYLES */

/* PAGE / HEADER / BTN-GREEN / ALERTS —— migrati a .cb-* utilities */

.rpi-toolbar {
    display: flex; align-items: flex-end;
    gap: 0.75rem; flex-wrap: wrap;
    background: #fff;
    border: 1px solid #e0e1e3;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}
.rpi-toolbar-field { display: flex; flex-direction: column; gap: 0.3rem; }
.rpi-toolbar-label { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--cb-gray); }

.rpi-select {
    border: 1px solid var(--cb-border); font-size: 0.82rem; border-radius: 0;
    padding: 0.4rem 2rem 0.4rem 0.65rem; min-width: 140px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 0.65rem center;
    appearance: none; -webkit-appearance: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.rpi-select:focus { outline: none; border-color: var(--cb-accent); box-shadow: 0 0 0 0.2rem rgba(227,72,36,0.12); }

/* BTN-ACCENT / BTN-SECONDARY —— migrati a .cb-btn cb-btn-primary/secondary */

/* —— Results card —— migrato a .cb-card; resta header con accent grigio —— */

.rpi-count { font-size: 0.72rem; font-weight: 600; color: var(--cb-gray); }

/* —— Table —— migrato a .cb-table; restano allineamenti —— */
.cb-table th.rpi-th-center { text-align: center; }
.cb-table th.rpi-th-right  { text-align: right; width: 130px; }
.cb-table td.rpi-td-center { text-align: center; }
.cb-table td.rpi-td-right  { text-align: right; }

.rpi-name-link { color: var(--cb-dark); font-weight: 600; font-size: 0.85rem; text-decoration: none; transition: color 0.2s; }
.rpi-name-link:hover { color: var(--cb-accent); text-decoration: none; }

.rpi-email-link { color: var(--cb-cyan); font-size: 0.82rem; text-decoration: none; display: inline-flex; align-items: center; gap: 0.3rem; transition: color 0.2s; }
.rpi-email-link:hover { color: var(--cb-accent); text-decoration: none; }

.rpi-desc { color: var(--cb-gray); font-size: 0.82rem; }
.rpi-date { color: var(--cb-muted); font-size: 0.78rem; }

.rpi-action-btn {
    width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
    background: transparent; border-radius: 0; text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}
.rpi-action-btn-cyan   { border: 1px solid rgba(8,145,178,0.15);  color: var(--cb-cyan); }
.rpi-action-btn-cyan:hover   { background: rgba(8,145,178,0.08);  border-color: var(--cb-cyan);  color: var(--cb-cyan);  text-decoration: none; }
.rpi-action-btn-amber  { border: 1px solid rgba(217,119,6,0.15);  color: var(--cb-amber); }
.rpi-action-btn-amber:hover  { background: rgba(217,119,6,0.08);  border-color: var(--cb-amber); color: var(--cb-amber); text-decoration: none; }
.rpi-action-btn-danger { border: 1px solid rgba(220,38,38,0.15);  color: var(--cb-danger); }
.rpi-action-btn-danger:hover { background: rgba(220,38,38,0.08);  border-color: var(--cb-danger); color: var(--cb-danger); text-decoration: none; }

/* —— Pagination —— */

/* —— Empty state —— migrato a .cb-empty-state —— */

/* —— Responsive —— */
@media (max-width: 767.98px) {
    .rpi-search-input { width: 100%; }
    .rpi-toolbar { flex-direction: column; align-items: stretch; }
    .rpi-toolbar-actions { margin-left: 0; }
}
@media (max-width: 575.98px) {
    .rpi-page { padding: 1rem; }
}

/* TIPI DOCUMENTO PAGE STYLES */

/* PAGE / BREADCRUMB / ALERTS / HEADER / BTN-GREEN —— migrati a .cb-* utilities */

/* —— Layout —— */
.tdi-layout { display: grid; grid-template-columns: 240px 1fr; gap: 1.5rem; align-items: start; }

/* —— Sidebar —— */
.tdi-sidebar { position: sticky; top: 72px; display: flex; flex-direction: column; gap: 1rem; }

/* —— Sidebar cards —— */
.tdi-side-card { background: var(--cb-white); border: 1px solid var(--cb-border); overflow: hidden; }
.tdi-side-header {
    position: relative; padding: 0.75rem 1rem; border-bottom: 1px solid var(--cb-border);
    display: flex; align-items: center; gap: 0.6rem;
}
.tdi-side-header::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.tdi-side-header--accent::before  { background: var(--cb-accent); }
.tdi-side-header--gray::before    { background: var(--cb-gray); }
.tdi-side-icon { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tdi-side-icon--accent { background: rgba(227,72,36,0.08); border: 1px solid rgba(227,72,36,0.15); }
.tdi-side-icon--gray   { background: rgba(107,114,128,0.08); border: 1px solid rgba(107,114,128,0.15); }
.tdi-side-title { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--cb-dark); margin: 0; }

/* —— Stats list —— */
.tdi-stat-list { padding: 0.75rem 1rem; }
.tdi-stat-row { display: flex; justify-content: space-between; align-items: center; padding: 0.35rem 0; border-bottom: 1px solid var(--cb-light); }
.tdi-stat-row:last-child { border-bottom: none; }

/* —— Filter nav —— */
.tdi-filter-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.55rem 1rem; font-size: 0.82rem; font-weight: 500; color: var(--cb-gray);
    text-decoration: none; border-bottom: 1px solid var(--cb-light);
    transition: background 0.15s, color 0.15s; gap: 0.5rem;
}
.tdi-filter-item:last-child { border-bottom: none; }
.tdi-filter-item:hover { background: rgba(227,72,36,0.04); color: var(--cb-accent); text-decoration: none; }
.tdi-filter-item.tdi-active { background: rgba(227,72,36,0.08); color: var(--cb-accent); font-weight: 600; border-left: 3px solid var(--cb-accent); padding-left: calc(1rem - 3px); }
.tdi-filter-left { display: flex; align-items: center; gap: 0.4rem; }
.tdi-filter-badge {
    display: inline-flex; align-items: center; padding: 0.1rem 0.45rem;
    font-size: 0.65rem; font-weight: 600; border-radius: 0;
    background: rgba(107,114,128,0.08); color: var(--cb-gray); border: 1px solid rgba(107,114,128,0.2);
    flex-shrink: 0;
}
.tdi-filter-item.tdi-active .tdi-filter-badge { background: rgba(227,72,36,0.1); color: var(--cb-accent); border-color: rgba(227,72,36,0.2); }

/* —— Gruppo Area card —— */
.tdi-area-card { background: var(--cb-white); border: 1px solid var(--cb-border); overflow: hidden; margin-bottom: 1.5rem; }
.tdi-area-card:last-child { margin-bottom: 0; }
.tdi-area-header {
    position: relative; padding: 0.85rem 1.25rem; border-bottom: 1px solid var(--cb-border);
    display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
}
.tdi-area-header::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--cb-accent); }
.tdi-area-title-wrap { display: flex; align-items: center; gap: 0.6rem; }
.tdi-area-title { font-size: 0.88rem; font-weight: 700; color: var(--cb-dark); margin: 0; }
.tdi-area-count {
    display: inline-flex; padding: 0.15rem 0.5rem;
    font-size: 0.65rem; font-weight: 600; border-radius: 0;
    background: rgba(107,114,128,0.08); color: var(--cb-gray); border: 1px solid rgba(107,114,128,0.2);
}

/* —— Table —— migrato a .cb-table; restano allineamenti centrati —— */
.tdi-area-card .cb-table th.tdi-th-center { text-align: center; }
.tdi-area-card .cb-table td.tdi-td-center { text-align: center; }

.tdi-nome { font-weight: 600; font-size: 0.85rem; color: var(--cb-dark); }
.tdi-desc { font-size: 0.78rem; color: var(--cb-muted); }
.tdi-desc-empty { font-size: 0.78rem; color: var(--cb-muted); font-style: italic; }

/* —— Badges —— */

.tdi-doc-count       { font-size: 0.82rem; color: var(--cb-muted); }

.tdi-action-btn {
    width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
    background: transparent; border-radius: 0; text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}
.tdi-action-btn-cyan   { border: 1px solid rgba(8,145,178,0.15);  color: var(--cb-cyan); }
.tdi-action-btn-cyan:hover   { background: rgba(8,145,178,0.08);  border-color: var(--cb-cyan);  color: var(--cb-cyan);  text-decoration: none; }
.tdi-action-btn-amber  { border: 1px solid rgba(217,119,6,0.15);  color: var(--cb-amber); }
.tdi-action-btn-amber:hover  { background: rgba(217,119,6,0.08);  border-color: var(--cb-amber); color: var(--cb-amber); text-decoration: none; }
.tdi-action-btn-danger { border: 1px solid rgba(220,38,38,0.15);  color: var(--cb-danger); }
.tdi-action-btn-danger:hover { background: rgba(220,38,38,0.08);  border-color: var(--cb-danger); color: var(--cb-danger); text-decoration: none; }

/* —— Empty state —— migrato a .cb-empty-state —— */
.cb-empty-state a { /* color: var(--cb-accent); */ font-weight: 600; text-decoration: none; }
.cb-empty-state a:hover { text-decoration: underline; }

/* —— Responsive —— */
@media (max-width: 991.98px) {
    .tdi-layout { grid-template-columns: 1fr; }
    .tdi-sidebar { position: static; }
}
@media (max-width: 575.98px) {
    .tdi-page { padding: 1rem; }
}

/* CATEGORIE CONTRATTO PAGE STYLES */

/* PAGE / BREADCRUMB / HEADER / ALERTS —— migrati a .cb-* utilities */

.cci-stat--total .cci-stat-num   { color: #E34824; }
.cci-stat--active .cci-stat-num  { color: #059669; }
.cci-stat--inactive .cci-stat-num { color: #6b7280; }

/* BOTTONI —— migrati a .cb-btn cb-btn-success/secondary/danger */

/* Action icon buttons */
.cci-action-btn {
    width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 0; cursor: pointer; font-size: 0.85rem;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    text-decoration: none;
}
.cci-action-btn--edit {
    border: 1px solid rgba(217,119,6,0.2); color: #d97706; background: transparent;
}
.cci-action-btn--edit:hover { background: rgba(217,119,6,0.06); border-color: #d97706; color: #d97706; }
.cci-action-btn--pause {
    border: 1px solid rgba(217,119,6,0.2); color: #d97706; background: transparent;
}
.cci-action-btn--pause:hover { background: rgba(217,119,6,0.06); border-color: #d97706; color: #d97706; }
.cci-action-btn--play {
    border: 1px solid rgba(5,150,105,0.2); color: #059669; background: transparent;
}
.cci-action-btn--play:hover { background: rgba(5,150,105,0.06); border-color: #059669; color: #059669; }
.cci-action-btn--delete {
    border: 1px solid rgba(220,38,38,0.2); color: #dc2626; background: transparent;
}
.cci-action-btn--delete:hover { background: rgba(220,38,38,0.06); border-color: #dc2626; color: #dc2626; }

/* CARD / TABLE —— migrati a .cb-card / .cb-table; restano override allineamenti CCI */
.cb-card .cb-table th.center { text-align: center; }
.cb-card .cb-table td.center { text-align: center; }
.cb-card .cb-table td.right  { text-align: right; }

/* Row link */
.cci-row-link {
    color: #151515; text-decoration: none; font-weight: 600;
    transition: color 0.15s;
}
.cci-row-link:hover { color: #E34824; }

/* Ordine badge */
.cci-ordine {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 28px; height: 22px; padding: 0 0.5rem;
    background: rgba(107,114,128,0.08); border: 1px solid rgba(107,114,128,0.2);
    font-size: 0.72rem; font-weight: 700; color: #6b7280;
}

/* Badge semantici */

/* Utilizzi count */
.cci-utilizzi { font-size: 0.85rem; font-weight: 700; color: #0891b2; }
.cci-utilizzi-zero { font-size: 0.85rem; color: #9ca3af; }

/* Descrizione troncata */
.cci-desc { color: #6b7280; font-size: 0.82rem; }

/* Actions group */

/* Empty state —— migrato a .cb-empty-state */

/* Modal */
.cci-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(21,21,21,0.5); z-index: 1060;
    align-items: center; justify-content: center;
}
.cci-modal-overlay.open { display: flex; }
.cci-modal {
    background: #fff; border: 1px solid #e0e1e3;
    border-radius: 0; width: 100%; max-width: 440px;
    margin: 1rem; overflow: hidden;
}

/* Responsive */
@media (max-width: 991.98px) {
    .cci-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 575.98px) {
    .cci-page { padding: 1rem; }
    .cci-stats { grid-template-columns: 1fr; }
    .cci-header { flex-direction: column; align-items: flex-start; }
    .cci-btn { width: 100%; justify-content: center; }
    .cci-table thead th.hide-xs,
    .cci-table tbody td.hide-xs { display: none; }
}

/* TIPI SCADENZA MEZZO PAGE STYLES */

/* PAGE / HEADER / BUTTONS / ALERTS —— migrati a .cb-* utilities */

.tsmi-stat {
    background: #fff;
    border: 1px solid #e0e1e3;
    border-radius: 0;
    text-align: center;
    padding: 1.25rem 1rem;
    position: relative;
    overflow: hidden;
}

.tsmi-stat::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.tsmi-stat--total::before  { background: #6b7280; }
.tsmi-stat--amm::before    { background: #0891b2; }
.tsmi-stat--man::before    { background: #d97706; }

.tsmi-stat--total  .tsmi-stat-num { color: #151515; }
.tsmi-stat--amm    .tsmi-stat-num { color: #0891b2; }
.tsmi-stat--man    .tsmi-stat-num { color: #d97706; }

@media (max-width: 575.98px) {
    .tsmi-stats { grid-template-columns: 1fr; }
}

@media (min-width: 576px) and (max-width: 991.98px) {
    .tsmi-stats { grid-template-columns: repeat(3, 1fr); }
}

/* Card sezione —— migrato a .cb-card; resta header con accent cyan/amber */

/* Modal custom */
.tsmi-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(21, 21, 21, 0.5);
    z-index: 1060;
    align-items: center;
    justify-content: center;
}

.tsmi-modal-overlay.open { display: flex; }

.tsmi-modal {
    background: #fff;
    border: 1px solid #e0e1e3;
    border-radius: 0;
    width: 100%;
    max-width: 440px;
    margin: 1rem;
    overflow: hidden;
}

.tsmi-modal-nome {
    font-weight: 700;
    font-size: 0.9rem;
    color: #151515;
    margin-top: 0.25rem;
}

/* ACCOUNT LOGIN PAGE STYLES */

.lg-wrapper {
    min-height: calc(100vh - var(--topbar-height));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--cb-light);
}

.lg-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid var(--cb-border);
    background: rgba(227,72,36,0.04);
}

.lg-card-body {
    padding: 1.5rem 1.25rem;
}

.lg-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--cb-dark);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.lg-alert {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.85rem;
    font-size: 0.82rem;
    margin-bottom: 1rem;
}

/* Accent bar sinistra */
.lg-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: var(--cb-accent);
}

/* Card header */

/* Card body */

/* Alert */

/* Labels */

/* Inputs */
.lg-input {
    border: 1px solid var(--cb-border);
    border-radius: 0 !important;
    font-size: 0.85rem;
    padding: 0.55rem 0.85rem;
    width: 100%;
    color: var(--cb-dark);
    background: var(--cb-white);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.lg-input:focus {
    border-color: var(--cb-accent);
    box-shadow: 0 0 0 0.2rem rgba(227,72,36,0.12);
}

.lg-input::placeholder {
    color: #9ca3af;
}

.lg-btn {
    background: #E34824; color: #fff;
    border: 2px solid #E34824; border-radius: 0;
    padding: 0.6rem 1.5rem;
    font-weight: 600; font-size: 0.85rem;
    width: 100%;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    display: flex; align-items: center; justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.lg-btn:hover, .lg-btn:focus {
    background: #c93d1e; border-color: #c93d1e; color: #fff;
    box-shadow: 0 2px 8px rgba(227,72,36,0.2);
}

/* Checkbox */
.lg-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.lg-check input[type="checkbox"] {
    width: 15px;
    height: 15px;
    border: 1px solid var(--cb-border);
    border-radius: 0 !important;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--cb-accent);
}

.lg-check label {
    font-size: 0.82rem;
    color: var(--cb-gray);
    cursor: pointer;
    margin: 0;
}

/* Divider */

.lg-footer-text {
    font-size: 0.82rem;
    color: #9ca3af;
    text-align: center;
}

@media (max-width: 575.98px) {
    .lg-wrapper {
        padding: 1.25rem;
    }
}

/* ACCOUNT REGISTER PAGE STYLES */

.rg-wrapper {
    min-height: calc(100vh - var(--topbar-height));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--cb-light);
}

/* Accent bar sinistra */
.rg-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: var(--cb-accent);
}

/* Card header */

/* Card body */

/* Section title */
.rg-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--cb-gray);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.85rem;
}

.rg-section-title svg { color: var(--cb-accent); }

/* Labels */

/* Inputs & Selects */
.rg-input,
.rg-select {
    border: 1px solid var(--cb-border);
    border-radius: 0 !important;
    font-size: 0.85rem;
    padding: 0.55rem 0.85rem;
    width: 100%;
    color: var(--cb-dark);
    background: var(--cb-white);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.rg-input:focus,
.rg-select:focus {
    border-color: var(--cb-accent);
    box-shadow: 0 0 0 0.2rem rgba(227,72,36,0.12);
}

.rg-input::placeholder { color: #9ca3af; }

.rg-btn {
    background: #E34824; color: #fff;
    border: 2px solid #E34824; border-radius: 0;
    padding: 0.6rem 1.5rem;
    font-weight: 600; font-size: 0.85rem;
    width: 100%;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    display: flex; align-items: center; justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.rg-btn:hover, .rg-btn:focus {
    background: #c93d1e; border-color: #c93d1e; color: #fff;
    box-shadow: 0 2px 8px rgba(227,72,36,0.2);
}

.rg-select {
    appearance: auto;
}

.rg-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

/* Password hint */
.rg-hint {
    font-size: 0.72rem;
    color: var(--cb-gray);
    margin-top: 0.25rem;
    background: rgba(8,145,178,0.04);
    border-left: 3px solid #0891b2;
    padding: 0.35rem 0.65rem;
}

.rg-footer-text {
    font-size: 0.82rem;
    color: #9ca3af;
    text-align: center;
}

@media (max-width: 575.98px) {
    .rg-wrapper { padding: 1.25rem; }
    .rg-row { grid-template-columns: 1fr; }
}

/* ACCOUNT FORGOT PASSWORD PAGE STYLES */

.fp-wrapper {
    min-height: calc(100vh - var(--topbar-height));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--cb-light);
}

.fp-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: #0891b2;
}

/* Info box */
.fp-info {
    font-size: 0.82rem;
    color: var(--cb-gray);
    background: rgba(8,145,178,0.04);
    border-left: 3px solid #0891b2;
    padding: 0.6rem 0.85rem;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

/* Label */

/* Input */
.fp-input {
    border: 1px solid var(--cb-border);
    border-radius: 0 !important;
    font-size: 0.85rem;
    padding: 0.55rem 0.85rem;
    width: 100%;
    color: var(--cb-dark);
    background: var(--cb-white);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.fp-input:focus {
    border-color: var(--cb-accent);
    box-shadow: 0 0 0 0.2rem rgba(227,72,36,0.12);
}

.fp-input::placeholder { color: #9ca3af; }

.fp-btn {
    background: #E34824; color: #fff;
    border: 2px solid #E34824; border-radius: 0;
    padding: 0.6rem 1.5rem;
    font-weight: 600; font-size: 0.85rem;
    width: 100%;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    display: flex; align-items: center; justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.fp-btn:hover, .fp-btn:focus {
    background: #c93d1e; border-color: #c93d1e; color: #fff;
    box-shadow: 0 2px 8px rgba(227,72,36,0.2);
}

@media (max-width: 575.98px) {
    .fp-wrapper { padding: 1.25rem; }
}

/* ACCOUNT FORGOT PASSWORD CONFIRMATION PAGE STYLES */

.fpc-wrapper {
    min-height: calc(100vh - var(--topbar-height));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--cb-light);
}

.fpc-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: #059669;
}

/* Icona centrale */
.fpc-icon-center {
    width: 56px;
    height: 56px;
    background: rgba(5,150,105,0.08);
    border: 1px solid rgba(5,150,105,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}

.fpc-icon-center svg { color: #059669; }

.fpc-heading {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--cb-dark);
    text-align: center;
    margin-bottom: 0.5rem;
}

.fpc-body-text {
    font-size: 0.82rem;
    color: var(--cb-gray);
    text-align: center;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

/* Info box */
.fpc-info {
    font-size: 0.82rem;
    color: var(--cb-gray);
    background: rgba(8,145,178,0.04);
    border-left: 3px solid #0891b2;
    padding: 0.6rem 0.85rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.fpc-info strong { color: var(--cb-dark); }

@media (max-width: 575.98px) {
    .fpc-wrapper { padding: 1.25rem; }
}

/* ACCOUNT ACCESS DENIED PAGE STYLES */

.ad-wrapper {
    min-height: calc(100vh - var(--topbar-height));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--cb-light);
}

.ad-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #dc2626;
}

.ad-info-box {
    background: rgba(8, 145, 178, 0.04);
    border-left: 3px solid #0891b2;
    padding: 0.75rem 0.9rem;
    font-size: 0.82rem;
    color: var(--cb-gray);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.ad-info-box svg {
    flex-shrink: 0;
    color: #0891b2;
    margin-top: 1px;
}

/* ACCOUNT RESET PASSWORD PAGE STYLES */

.rp-wrapper {
    min-height: calc(100vh - var(--topbar-height));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--cb-light);
}

.rp-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: var(--cb-accent);
}

/* Section title */
.rp-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--cb-gray);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.85rem;
}

.rp-section-title svg { color: var(--cb-accent); }

/* Label */

/* Input */
.rp-input {
    border: 1px solid var(--cb-border);
    border-radius: 0 !important;
    font-size: 0.85rem;
    padding: 0.55rem 0.85rem;
    width: 100%;
    color: var(--cb-dark);
    background: var(--cb-white);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.rp-input:focus {
    border-color: var(--cb-accent);
    box-shadow: 0 0 0 0.2rem rgba(227,72,36,0.12);
}

.rp-input::placeholder { color: #9ca3af; }

.rp-input[readonly] {
    background: var(--cb-light);
    color: var(--cb-gray);
    cursor: default;
}

.rp-btn {
    background: #E34824; color: #fff;
    border: 2px solid #E34824; border-radius: 0;
    padding: 0.6rem 1.5rem;
    font-weight: 600; font-size: 0.85rem;
    width: 100%;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    display: flex; align-items: center; justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.rp-btn:hover, .rp-btn:focus {
    background: #c93d1e; border-color: #c93d1e; color: #fff;
    box-shadow: 0 2px 8px rgba(227,72,36,0.2);
}

.rp-toggle-btn {
    background: var(--cb-light);
    border: 1px solid var(--cb-border);
    border-left: none;
    border-radius: 0 !important;
    padding: 0 0.75rem;
    color: var(--cb-gray);
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.rp-toggle-btn:hover {
    color: var(--cb-accent);
    background: rgba(227,72,36,0.04);
}

/* Password hint */
.rp-hint {
    font-size: 0.72rem;
    color: var(--cb-gray);
    margin-top: 0.35rem;
    background: rgba(8,145,178,0.04);
    border-left: 3px solid #0891b2;
    padding: 0.4rem 0.65rem;
    line-height: 1.6;
}

@media (max-width: 575.98px) {
    .rp-wrapper { padding: 1.25rem; }
}

/* ACCOUNT RESET PASSWORD CONFIRMATION PAGE STYLES */

.rpc-wrapper {
    min-height: calc(100vh - var(--topbar-height));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--cb-light);
}

.rpc-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: #059669;
}

/* Icona centrale */
.rpc-icon-center {
    width: 56px;
    height: 56px;
    background: rgba(5,150,105,0.08);
    border: 1px solid rgba(5,150,105,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.rpc-icon-center svg { color: #059669; }

.rpc-heading {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--cb-dark);
    margin-bottom: 0.5rem;
}

.rpc-body-text {
    font-size: 0.82rem;
    color: var(--cb-gray);
    line-height: 1.6;
    margin-bottom: 1.75rem;
    max-width: 320px;
}

@media (max-width: 575.98px) {
    .rpc-wrapper { padding: 1.25rem; }
}

/* ASSEGNAZIONI > RICONSEGNA PAGE STYLES */

/* —— mrc- prefix: Mezzi RiconsegnaCreate —— */

/* Riepilogo campi */

/* Badge */

/* Info box giorni */
.mrc-info-box {
    background: rgba(8,145,178,0.04); border-left: 3px solid #0891b2;
    padding: 0.65rem 1rem; font-size: 0.85rem; color: #151515;
    display: flex; align-items: center; gap: 0.5rem; margin-top: 1rem;
}
.mrc-info-box i { color: #0891b2; flex-shrink: 0; }

/* Separatore */

/* Form */
.mrc-form-section-title {
    font-size: 0.82rem; font-weight: 600; color: #6b7280;
    text-transform: uppercase; letter-spacing: 0.03em;
    display: flex; align-items: center; gap: 0.4rem;
    margin-bottom: 0.75rem; padding-bottom: 0.5rem;
    border-bottom: 1px solid #EEEFF0;
}
.mrc-form-section-title i { color: #E34824; }

textarea.mrc-form-control { resize: vertical; }

/* Validation */
.mrc-validation { border: 1px solid #e0e1e3; border-left: 4px solid #dc2626; background: rgba(220,38,38,0.04); padding: 0.85rem 1.25rem; font-size: 0.85rem; margin-bottom: 1.5rem; }
.mrc-validation ul { margin: 0; padding-left: 1.25rem; }

/* Km percorsi info (dinamico) */
.mrc-km-info {
    background: rgba(5,150,105,0.04); border-left: 3px solid #059669;
    padding: 0.65rem 1rem; font-size: 0.85rem; color: #151515;
    display: none; align-items: center; gap: 0.5rem; margin-top: 0.5rem;
}
.mrc-km-info.visible { display: flex; }
.mrc-km-info i { color: #059669; flex-shrink: 0; }
.mrc-km-info strong { color: #059669; }

/* Riepilogo durata box */
.mrc-durata-box {
    background: #EEEFF0; border: 1px solid #e0e1e3;
    padding: 0.85rem 1.25rem; margin-top: 0.75rem;
}
.mrc-durata-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 1.5rem; }
.mrc-durata-item-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7280; }

/* Responsive */
@media (max-width: 991.98px) { .mrc-fields-grid { grid-template-columns: 1fr; } .mrc-durata-grid { grid-template-columns: 1fr; } }
@media (max-width: 575.98px) { .mrc-page { padding: 1rem; } .mrc-actions { flex-direction: column-reverse; } .mrc-btn { width: 100%; justify-content: center; } }

/* ASSEGNAZIONI > STORICO UTENTE PAGE STYLES */

/* —— msu- prefix: Mezzi StoricoAssegnazioniUtente —— */

/* Avatar utente */
.msu-avatar {
    width: 52px; height: 52px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; font-weight: 700; letter-spacing: 0.02em;
    background: rgba(227,72,36,0.1); color: #E34824;
    border: 1px solid rgba(227,72,36,0.2);
}

/* Info utente box */
.msu-utente-box {
    background: #fff; border: 1px solid #e0e1e3; border-left: 4px solid #0891b2;
    padding: 1rem 1.25rem; margin-bottom: 1.5rem;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.msu-utente-inner { display: flex; align-items: center; gap: 0.85rem; }
.msu-utente-name { font-size: 0.95rem; font-weight: 700; color: #151515; display: flex; align-items: center; gap: 0.5rem; }
.msu-utente-email { font-size: 0.78rem; color: #9ca3af; margin-top: 0.1rem; }
.msu-utente-reparto { font-size: 0.78rem; color: #6b7280; margin-top: 0.1rem; }

/* Badge */

.msu-tab {
    padding: 0.4rem 0.9rem; font-size: 0.78rem; font-weight: 600;
    border: 1px solid #e0e1e3; background: transparent; color: #6b7280;
    cursor: pointer; transition: background 0.15s, color 0.15s;
}
.msu-tab:not(:last-child) { border-right: none; }
.msu-tab:hover { background: #EEEFF0; color: #151515; }
.msu-tab.active { background: #E34824; color: #fff; border-color: #E34824; }

/* Tabella */

.msu-table thead th:last-child { text-align: right; width: 100px; }
.msu-table tbody tr.msu-row-attiva { background: rgba(5,150,105,0.03); }
.msu-table tbody tr.msu-row-attiva:hover { background: rgba(5,150,105,0.05); }
.msu-table tbody td:last-child { text-align: right; }

/* Celle */
.msu-mezzo-targa { font-size: 0.85rem; font-weight: 700; color: #151515; }
.msu-cell-date   { font-size: 0.82rem; color: #151515; white-space: nowrap; }
.msu-cell-muted  { color: #9ca3af; font-size: 0.82rem; }
.msu-cell-dur-active { font-size: 0.82rem; color: #E34824; font-weight: 600; }
.msu-cell-km     { font-size: 0.82rem; color: #059669; font-weight: 700; }

.msu-action-btn {
    width: 32px; height: 32px; border-radius: 0;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.85rem; cursor: pointer; background: transparent;
    transition: background 0.15s, border-color 0.15s; text-decoration: none; border: 1px solid;
}
.msu-action-btn-accent { border-color: rgba(227,72,36,0.15);   color: #E34824; }
.msu-action-btn-accent:hover { background: rgba(227,72,36,0.06); border-color: #E34824; color: #E34824; }
.msu-action-btn-green  { border-color: rgba(5,150,105,0.15);   color: #059669; }
.msu-action-btn-green:hover { background: rgba(5,150,105,0.06); border-color: #059669; color: #059669; }
.msu-action-btn-danger { border-color: rgba(220,38,38,0.15);   color: #dc2626; }
.msu-action-btn-danger:hover { background: rgba(220,38,38,0.06); border-color: #dc2626; color: #dc2626; }

/* Empty state */

/* Responsive */
@media (max-width: 1199.98px) { .msu-stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 991.98px)  { .msu-stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575.98px)  { .msu-page { padding: 1rem; } .msu-stats { grid-template-columns: 1fr 1fr; } .msu-page-header { flex-direction: column; } }

/* CATEGORIE CONTRATTO > CREATE PAGE STYLES */

/* Card header (locale: variant green) */

.ccc-card-header::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0;
    width: 4px; background: #059669;
}

textarea.ccc-form-control { resize: vertical; }

.ccc-validation {
    display: block; font-size: 0.72rem; color: #dc2626; margin-top: 0.25rem;
}

/* Validation summary */
.ccc-validation-summary {
    display: flex; align-items: flex-start; gap: 0.5rem;
    padding: 0.85rem 1.25rem; margin-bottom: 1.25rem;
    border: 1px solid rgba(220,38,38,0.2);
    border-left: 4px solid #dc2626;
    background: rgba(220,38,38,0.04);
    font-size: 0.85rem; color: #151515; border-radius: 0;
}
.ccc-validation-summary i { color: #dc2626; flex-shrink: 0; margin-top: 0.1rem; }
.ccc-validation-summary ul { margin: 0; padding-left: 1.2rem; }

/* Two-col row */
.ccc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }

/* Toggle status row */
.ccc-toggle-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.75rem 0;
}

/* Separator */

/* Form footer */
/* Responsive */
@media (max-width: 991.98px) {
    .ccc-row { grid-template-columns: 1fr; }
}
@media (max-width: 575.98px) {
    .ccc-form-footer { flex-direction: column-reverse; }
    .ccc-form-footer .cb-btn { width: 100%; justify-content: center; }
}

/* CATEGORIE CONTRATTO > DETAILS PAGE STYLES */

/* Alerts */

/* Sidebar outline buttons */
.ccd-btn-outline-sm {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.4rem 0.8rem; font-size: 0.82rem; font-weight: 600;
    border-radius: 0; text-decoration: none; cursor: pointer;
    background: transparent; width: 100%; justify-content: flex-start;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.ccd-btn-outline-sm-amber  { border: 1px solid rgba(217,119,6,0.2);   color: #d97706; }
.ccd-btn-outline-sm-amber:hover  { background: rgba(217,119,6,0.04);  border-color: #d97706; color: #d97706; }
.ccd-btn-outline-sm-green  { border: 1px solid rgba(5,150,105,0.2);   color: #059669; }
.ccd-btn-outline-sm-green:hover  { background: rgba(5,150,105,0.04);  border-color: #059669; color: #059669; }
.ccd-btn-outline-sm-warn   { border: 1px solid rgba(217,119,6,0.2);   color: #d97706; }
.ccd-btn-outline-sm-warn:hover   { background: rgba(217,119,6,0.04);  border-color: #d97706; color: #d97706; }
.ccd-btn-outline-sm-danger { border: 1px solid rgba(220,38,38,0.2);   color: #dc2626; }
.ccd-btn-outline-sm-danger:hover { background: rgba(220,38,38,0.04);  border-color: #dc2626; color: #dc2626; }
.ccd-btn-outline-sm-gray   { border: 1px solid rgba(107,114,128,0.2); color: #6b7280; }
.ccd-btn-outline-sm-gray:hover   { background: rgba(107,114,128,0.04); border-color: #6b7280; color: #151515; }
.ccd-btn-outline-sm-cyan   { border: 1px solid rgba(8,145,178,0.2);   color: #0891b2; }
.ccd-btn-outline-sm-cyan:hover   { background: rgba(8,145,178,0.04);  border-color: #0891b2; color: #0891b2; }
.ccd-btn-outline-sm[disabled], .ccd-btn-outline-sm:disabled {
    opacity: 0.45; cursor: not-allowed; pointer-events: none;
}

.ccd-card-body--sm { padding: 1rem 1.25rem 1rem 1.5rem; }

/* Fields grid */

/* Badge */

/* Utilizzo stat */
.ccd-utilizzo-wrap { text-align: center; padding: 1.25rem 1rem; }
.ccd-utilizzo-num  { font-size: 3rem; font-weight: 800; line-height: 1; color: #E34824; margin-bottom: 0.25rem; }
.ccd-utilizzo-label { font-size: 0.78rem; color: #6b7280; }

/* Info non eliminabile */
.ccd-info-box {
    background: rgba(8,145,178,0.04);
    border-left: 3px solid #0891b2;
    padding: 0.6rem 0.85rem;
    font-size: 0.78rem; color: #6b7280;
    display: flex; align-items: flex-start; gap: 0.4rem;
    margin-top: 0.5rem;
}
.ccd-info-box i { color: #0891b2; flex-shrink: 0; margin-top: 0.1rem; }

/* Audit rows */
.ccd-audit-row {
    display: flex; flex-direction: column;
    padding: 0.6rem 0; border-bottom: 1px solid #EEEFF0;
}
.ccd-audit-row:last-child { border-bottom: none; }
.ccd-audit-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7280; margin-bottom: 0.15rem; }

/* Sidebar action list */

/* Sidebar sticky */

/* Modal */
.ccd-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(21,21,21,0.5); z-index: 1060;
    align-items: center; justify-content: center;
}
.ccd-modal-overlay.open { display: flex; }
.ccd-modal {
    background: #fff; border: 1px solid #e0e1e3;
    border-radius: 0; width: 100%; max-width: 440px;
    margin: 1rem; overflow: hidden;
}

/* Responsive */
@media (max-width: 991.98px) {
    .ccd-sidebar { position: static; }
    .ccd-fields-grid { grid-template-columns: 1fr; }
    .ccd-field--full { grid-column: 1; }
}
@media (max-width: 575.98px) {
    .ccd-page { padding: 1rem; }
    .ccd-header { flex-direction: column; align-items: flex-start; }
    .ccd-actions { width: 100%; }
    .ccd-btn { width: 100%; justify-content: center; }
}

/* CATEGORIE CONTRATTO > EDIT PAGE STYLES */

/* Card header (locale: variant amber/cyan/gray) */

.cce-card-body--sm { padding: 1rem 1.25rem 1rem 1.5rem; }

textarea.cce-form-control { resize: vertical; }

.cce-validation {
    display: block; font-size: 0.72rem; color: #dc2626; margin-top: 0.25rem;
}

/* Validation summary */
.cce-validation-summary {
    display: flex; align-items: flex-start; gap: 0.5rem;
    padding: 0.85rem 1.25rem; margin-bottom: 1.25rem;
    border: 1px solid rgba(220,38,38,0.2);
    border-left: 4px solid #dc2626;
    background: rgba(220,38,38,0.04);
    font-size: 0.85rem; color: #151515; border-radius: 0;
}
.cce-validation-summary i { color: #dc2626; flex-shrink: 0; margin-top: 0.1rem; }
.cce-validation-summary ul { margin: 0; padding-left: 1.2rem; }

/* Toggle status row */
.cce-toggle-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.75rem 0;
}

/* Two-col field row */
.cce-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }

/* Separator */

/* Form footer */
/* Sidebar outline buttons */
.cce-btn-outline-sm {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.4rem 0.8rem; font-size: 0.82rem; font-weight: 600;
    border-radius: 0; text-decoration: none; width: 100%;
    background: transparent;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.cce-btn-outline-sm-gray { border: 1px solid rgba(107,114,128,0.2); color: #6b7280; }
.cce-btn-outline-sm-gray:hover { background: rgba(107,114,128,0.04); border-color: #6b7280; color: #151515; }
.cce-btn-outline-sm-cyan { border: 1px solid rgba(8,145,178,0.2); color: #0891b2; }
.cce-btn-outline-sm-cyan:hover { background: rgba(8,145,178,0.04); border-color: #0891b2; color: #0891b2; }

/* Info note box */

/* Utilizzi count */
.cce-utilizzi-num { font-size: 1.25rem; font-weight: 700; color: #0891b2; }

/* Action list */

/* Sidebar sticky */

/* Responsive */
@media (max-width: 991.98px) {
    .cce-sidebar { position: static; }
    .cce-row { grid-template-columns: 1fr; }
}
@media (max-width: 575.98px) {
    .cce-page { padding: 1rem; }
    .cce-form-footer { flex-direction: column-reverse; }
    .cce-btn { width: 100%; justify-content: center; }
}

/* DOCUMENTI GARA > DETAILS PAGE STYLES */

.dd-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 2rem; gap: 1rem; flex-wrap: wrap; }
.dd-header h1 { font-size: 1.5rem; font-weight: 700; color: #151515; margin: 0 0 0.35rem; display: flex; align-items: center; gap: 0.5rem; }

.dd-code { font-family: monospace; font-size: 0.75rem; background: #EEEFF0; padding: 0.2rem 0.5rem; border: 1px solid #e0e1e3; }

.dd-assoc { margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid #EEEFF0; }
.dd-assoc:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
.dd-assoc h3 { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7280; margin-bottom: 0.3rem; display: flex; align-items: center; gap: 0.3rem; }
.dd-assoc p { font-size: 0.82rem; color: #6b7280; margin: 0; }
.dd-icon-file { font-size: 1.5rem; }
.dd-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid #EEEFF0; flex-wrap: wrap; gap: 0.5rem; }
@media (max-width: 991.98px) { .dd-sticky { position: static; } .dd-header { flex-direction: column; } }
@media (max-width: 767.98px) {
    .dd-header h1 { font-size: 1.1rem; word-break: break-word; }
    .dd-header-actions { width: 100%; }
    .dd-header-actions .cb-btn { width: 100%; justify-content: center; }
    .dd-footer { flex-direction: column; align-items: stretch; }
    .dd-footer > a, .dd-footer > div { width: 100%; }
    .dd-footer > div { flex-direction: column; }
    .dd-footer > div > a, .dd-footer > div > button { width: 100%; }
}

/* DOCUMENTI GARA > EDIT PAGE STYLES */

.de-sys-field:last-child { margin-bottom: 0; }

@media (max-width: 991.98px) { .de-sticky { position: static; } }

/* DOCUMENTI GARA > UPLOAD PAGE STYLES */

.du-tabs.nav-tabs { border-bottom: 2px solid #EEEFF0; margin-bottom: 1.5rem; gap: 0; }
.du-tabs .nav-item { margin-bottom: -2px; }
.du-tab-btn.nav-link { padding: 0.8rem 1.5rem; border: none; border-radius: 0; background: transparent; font-size: 0.85rem; font-weight: 600; color: #6b7280; cursor: pointer; position: relative; display: flex; align-items: center; gap: 0.35rem; transition: color 0.15s; }
.du-tab-btn.nav-link:hover { color: #E34824; border-color: transparent; }
.du-tab-btn.nav-link.active { color: #E34824; background: transparent; border-color: transparent; }
.du-tab-btn.nav-link.active::after { content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 2px; background: #E34824; }

.du-btn-outline { background: transparent; color: #E34824; border-color: rgba(227,72,36,0.3); }
.du-btn-outline:hover { border-color: #E34824; background: rgba(227,72,36,0.04); }
.du-dropzone { border: 2px dashed #e0e1e3; padding: 3rem; text-align: center; cursor: pointer; background: #EEEFF0; transition: all 0.2s; }
.du-dropzone:hover, .du-dropzone.active { border-color: #E34824; background: rgba(227,72,36,0.03); }
.du-dropzone i { font-size: 3rem; color: #9ca3af; display: block; margin-bottom: 0.5rem; }
.du-dropzone h3 { font-size: 1rem; font-weight: 600; color: #151515; margin: 0 0 0.25rem; }
.du-dropzone p { font-size: 0.85rem; color: #6b7280; margin: 0 0 0.75rem; }
.du-preview-table { width: 100%; border-collapse: collapse; }
.du-preview-table thead th { background: #151515; color: #fff; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; padding: 0.6rem 0.8rem; border: none; }
.du-preview-table tbody td { padding: 0.6rem 0.8rem; font-size: 0.85rem; color: #151515; border-bottom: 1px solid #EEEFF0; vertical-align: middle; }
.du-preview-table tbody tr:last-child td { border-bottom: none; }
.du-remove-btn { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #e0e1e3; background: #fff; color: #dc2626; cursor: pointer; transition: all 0.15s; font-size: 0.8rem; padding: 0; }
.du-remove-btn:hover { border-color: #dc2626; background: rgba(220,38,38,0.04); }

/* ELABORAZIONE > AVVIA PAGE STYLES */

.ea-page {
    padding: 2rem;
}

@media (max-width: 575.98px) {
    .ea-page { padding: 1rem; }
}

/* Header */
.ea-header { margin-bottom: 1.5rem; }
.ea-title {
    display: flex; align-items: center; gap: 0.75rem;
    font-size: 1.4rem; font-weight: 700; color: #151515;
    letter-spacing: -0.025em; margin: 0;
}
.ea-title-icon {
    width: 38px; height: 38px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(5,150,105,0.08); border: 1px solid rgba(5,150,105,0.15);
}

/* Centred wrapper */
.ea-center {
    max-width: 640px;
    margin: 0 auto;
}

.ea-card-header::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0;
    width: 4px; background: #059669;
}

/* Info lotto box */
.ea-lotto-box {
    background: rgba(8,145,178,0.04);
    border: 1px solid #e0e1e3;
    border-left: 4px solid #0891b2;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}
.ea-lotto-box-title {
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.05em; color: #0891b2;
    display: flex; align-items: center; gap: 0.4rem;
    margin-bottom: 0.75rem;
}
.ea-fields-list { display: flex; flex-direction: column; gap: 0; }

/* Warning box */
.ea-warning-box {
    background: rgba(217,119,6,0.04);
    border: 1px solid #e0e1e3;
    border-left: 4px solid #d97706;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}
.ea-warning-title {
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.05em; color: #d97706;
    display: flex; align-items: center; gap: 0.4rem;
    margin-bottom: 0.6rem;
}
.ea-warning-intro {
    font-size: 0.85rem; color: #151515; margin-bottom: 0.5rem;
}
.ea-list {
    margin: 0; padding: 0; list-style: none;
    display: flex; flex-direction: column; gap: 0.35rem;
}
.ea-list li {
    display: flex; align-items: flex-start; gap: 0.5rem;
    font-size: 0.82rem; color: #6b7280;
}
.ea-list li::before {
    content: ''; display: block; width: 5px; height: 5px;
    border-radius: 50%; background: #d97706;
    flex-shrink: 0; margin-top: 0.45rem;
}
.ea-list li strong { color: #151515; }

/* Steps box */
.ea-steps-box {
    background: rgba(107,114,128,0.03);
    border: 1px solid #e0e1e3;
    border-left: 4px solid #6b7280;
    padding: 1rem 1.25rem;
    margin-bottom: 0;
}
.ea-steps-title {
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.05em; color: #6b7280;
    display: flex; align-items: center; gap: 0.4rem;
    margin-bottom: 0.6rem;
}
.ea-steps-intro {
    font-size: 0.85rem; color: #151515; margin-bottom: 0.6rem;
}
.ea-steps-list {
    margin: 0; padding: 0; list-style: none;
    display: flex; flex-direction: column; gap: 0.4rem; counter-reset: ea-step;
}
.ea-steps-list li {
    display: flex; align-items: flex-start; gap: 0.65rem;
    font-size: 0.82rem; color: #6b7280;
    counter-increment: ea-step;
}
.ea-steps-list li::before {
    content: counter(ea-step);
    display: flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; flex-shrink: 0;
    background: rgba(227,72,36,0.08); border: 1px solid rgba(227,72,36,0.2);
    color: #E34824; font-size: 0.65rem; font-weight: 700;
    margin-top: 0.1rem;
}
.ea-steps-list li strong { color: #151515; }

.ea-btn--secondary {
    background: transparent; color: #6b7280; border-color: #e0e1e3;
}
.ea-btn--secondary:hover {
    border-color: #151515; color: #151515; text-decoration: none;
}

@media (max-width: 575.98px) {
    .ea-card-footer { flex-direction: column; }
    .ea-btn { width: 100%; justify-content: center; }
    .ea-field-label { width: 90px; }
}

/* ELABORAZIONE > DETAILS PAGE STYLES */

@media (max-width: 575.98px) {
    .ed-page { padding: 1rem; }
}

/* Header */
.ed-header { margin-bottom: 1.5rem; }
.ed-title {
    display: flex; align-items: center; gap: 0.75rem;
    font-size: 1.4rem; font-weight: 700; color: #151515;
    letter-spacing: -0.025em; margin: 0 0 0.3rem 0;
}
.ed-title-icon {
    width: 38px; height: 38px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(227,72,36,0.08); border: 1px solid rgba(227,72,36,0.15);
}
.ed-subtitle { font-size: 0.85rem; color: #6b7280; margin: 0; }

/* Layout grid */
.ed-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    align-items: start;
}
.ed-sidebar { position: sticky; top: 72px; }

.ed-card--accent .ed-card-header::before { background: #E34824; }
.ed-card--green  .ed-card-header::before { background: #059669; }
.ed-card--cyan   .ed-card-header::before { background: #0891b2; }
.ed-card--amber  .ed-card-header::before { background: #d97706; }
.ed-card--gray   .ed-card-header::before { background: #6b7280; }
.ed-card--blue   .ed-card-header::before { background: #2563eb; }

.ed-card-count {
    font-size: 0.72rem;
    font-weight: 700;
    background: #151515;
    color: #fff;
    padding: 2px 7px;
    letter-spacing: .03em;
}

/* Fields grid */
.ed-fields { display: grid; grid-template-columns: 160px 1fr; gap: 0; }

/* Badges */

/* Price cards */
.ed-price-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
.ed-price-card {
    border: 1px solid #e0e1e3;
    padding: 1rem;
}
.ed-price-card-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6b7280;
    margin-bottom: 0.4rem;
}
.ed-price-card-value { font-size: 1.3rem; font-weight: 700; }
.ed-price-card-value--muted  { font-size: 0.82rem; color: #9ca3af; font-style: italic; font-weight: 400; }
.ed-price-card--desiderato { border-top: 3px solid #0891b2; }
.ed-price-card--reale      { border-top: 3px solid #059669; background: #EEEFF0; }

/* Scostamento */
.ed-scost-divider { border: none; border-top: 1px solid #e0e1e3; margin: 1rem 0; }
.ed-scost-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.78rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .04em;
    color: #151515; margin-bottom: 0.75rem;
}
.ed-scost-title i { color: #E34824; }
.ed-scost-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.ed-scost-row { display: flex; flex-direction: column; gap: 2px; }
.ed-scost-row-label {
    font-size: 0.68rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .04em; color: #6b7280;
}
.ed-scost-row-value { font-size: 0.88rem; font-weight: 700; color: #151515; }

/* Confronto preventivi */
.ed-confronto-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.ed-confronto-cell {
    text-align: center; padding: 0.75rem 0.5rem;
    background: #EEEFF0; border: 1px solid #e0e1e3;
}
.ed-confronto-cell-label {
    font-size: 0.65rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .04em;
    color: #6b7280; display: block; margin-bottom: 4px;
}
.ed-confronto-cell-value { font-size: 0.88rem; font-weight: 700; }

/* Note / Motivazione */
.ed-note-section + .ed-note-section { border-top: 1px solid #e0e1e3; padding-top: 0.75rem; margin-top: 0.75rem; }
.ed-note-label {
    font-size: 0.68rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .05em;
    color: #6b7280; margin-bottom: 0.3rem;
}
.ed-note-text { font-size: 0.85rem; color: #151515; margin: 0; }

/* Table */
.ed-table thead tr { background: #151515; }
.ed-table thead th {
    padding: 9px 12px; font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .05em;
    color: #e0e1e3; border: none;
}
.ed-table thead th.text-end    { text-align: right; }
.ed-table thead th.text-center { text-align: center; }
.ed-table tbody tr { border-bottom: 1px solid #e0e1e3; }
.ed-table tbody tr:last-child { border-bottom: none; }
.ed-table tbody tr:hover { background: rgba(227,72,36,0.03); }
.ed-table td { padding: 9px 12px; color: #151515; vertical-align: middle; }
.ed-table td.text-end    { text-align: right; }
.ed-table td.text-center { text-align: center; }
.ed-table-muted  { color: #6b7280; font-size: 0.8rem; }
.ed-table-amount { font-weight: 700; color: #0891b2; }

.ed-gg-badge {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: 0.68rem; font-weight: 600;
    background: rgba(8,145,178,0.06);
    border: 1px solid rgba(8,145,178,0.20);
    color: #0891b2; padding: 0.15rem 0.5rem;
    text-transform: uppercase; letter-spacing: .03em;
}

/* Stats row */
.ed-stat-cell { text-align: center; }

/* Document list */
.ed-doc-item {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.65rem 0; border-bottom: 1px solid #EEEFF0;
}
.ed-doc-item:last-child { border-bottom: none; }
.ed-doc-icon {
    width: 34px; height: 34px; flex-shrink: 0;
    background: rgba(220,38,38,0.06);
    border: 1px solid rgba(220,38,38,0.15);
    display: flex; align-items: center; justify-content: center;
}
.ed-doc-icon i { font-size: 1rem; color: #dc2626; }
.ed-doc-name { font-size: 0.83rem; font-weight: 700; color: #151515; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-doc-meta { font-size: 0.72rem; color: #6b7280; margin-top: 2px; }
.ed-doc-actions { display: flex; gap: 6px; flex-shrink: 0; }
.ed-doc-more { padding: 0.5rem 0 0; font-size: 0.78rem; color: #6b7280; text-align: center; }
.ed-doc-more a { color: #0891b2; text-decoration: none; }
.ed-doc-more a:hover { text-decoration: underline; }

/* Audit trail */

.ed-sys-icon {
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    background: #EEEFF0; border: 1px solid #e0e1e3; flex-shrink: 0;
}
.ed-sys-icon i { font-size: 0.85rem; color: #6b7280; }

.ed-sys-val   { font-size: 0.82rem; color: #151515; margin: 0; }

.ed-sys-divider { grid-column: 1 / -1; border: none; border-top: 1px solid #e0e1e3; margin: 0.5rem 0; }

.ed-btn + .ed-btn { margin-top: 0.5rem; }

/* Responsive */
@media (max-width: 991.98px) {
    .ed-layout { grid-template-columns: 1fr; }
    .ed-sidebar { position: static; }
    .ed-price-grid { grid-template-columns: 1fr 1fr; }
    .ed-confronto-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 575.98px) {
    .ed-price-grid { grid-template-columns: 1fr; }
    .ed-scost-rows { grid-template-columns: 1fr; }
    .ed-confronto-grid { grid-template-columns: 1fr; }
    .ed-fields { grid-template-columns: 1fr; }
    .ed-field-label,
    .ed-field-value { border-bottom: none; padding: 0.15rem 0; }
    .ed-field-label { padding-top: 0.5rem; }
    .ed-sys-grid { grid-template-columns: 1fr; }
    .ed-sys-icon { display: none; }
}

/* ELABORAZIONE > EDIT PAGE STYLES */

/* Title icon (variante amber 38x38 nel header) */
.ee-title-icon {
    width: 38px; height: 38px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(217,119,6,0.08); border: 1px solid rgba(217,119,6,0.15);
    margin-right: 0.5rem;
}

/* TempData alerts */

.ee-alert i { flex-shrink: 0; margin-top: 0.1rem; }

/* Layout 2 colonne */
.ee-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 1.5rem;
    align-items: start;
}
@media (max-width: 991.98px) {
    .ee-grid { grid-template-columns: 1fr; }
}

/* Sidebar sticky */
.ee-sidebar {
    position: sticky; top: 72px; z-index: 10;
}
@media (max-width: 991.98px) {
    .ee-sidebar { position: static; }
}

/* Badge contatore in header */
.ee-count-badge {
    display: inline-flex; align-items: center;
    padding: 0.15rem 0.5rem; font-size: 0.65rem; font-weight: 700;
    border-radius: 0; border: 1px solid rgba(107,114,128,0.2);
    background: rgba(107,114,128,0.06); color: #6b7280;
    text-transform: uppercase; letter-spacing: 0.03em;
}

/* Badge stato lotto */

/* Fields lotto */
.ee-fields { display: flex; flex-direction: column; }

@media (max-width: 575.98px) {
    .ee-field { flex-direction: column; gap: 0.1rem; }
    .ee-field-label { width: auto; }
}

.ee-stat {
    text-align: center; padding: 0.85rem 0.5rem;
    border-right: 1px solid #EEEFF0;
}
.ee-stat:last-child { border-right: none; }

/* Tabella preventivi */

.ee-table thead th:last-child { text-align: center; }
.ee-table .td-right { text-align: right; }
.ee-table .td-center { text-align: center; }
.ee-table .td-fornitore strong { font-size: 0.85rem; }
.ee-table .td-fornitore small { font-size: 0.72rem; color: #9ca3af; display: block; margin-top: 0.1rem; }
.ee-table .td-importo { font-weight: 700; color: #E34824; }
.ee-table .td-nd { color: #9ca3af; font-style: italic; font-size: 0.78rem; }

/* Giorni badge */
.ee-gg-badge {
    display: inline-flex; align-items: center;
    padding: 0.15rem 0.5rem; font-size: 0.68rem; font-weight: 600;
    border-radius: 0; border: 1px solid rgba(8,145,178,0.2);
    background: rgba(8,145,178,0.06); color: #0891b2;
}

.ee-btn-icon--green { border-color: rgba(5,150,105,0.2); color: #059669; }
.ee-btn-icon--green:hover { background: rgba(5,150,105,0.08); border-color: #059669; color: #059669; }

/* Alert inline */
.ee-inline-alert {
    display: flex; align-items: flex-start; gap: 0.5rem;
    padding: 0.75rem 1rem; font-size: 0.82rem;
    border: 1px solid #e0e1e3; border-radius: 0;
}
.ee-inline-alert i { flex-shrink: 0; margin-top: 0.1rem; }
.ee-inline-alert--warning { background: rgba(217,119,6,0.04); border-left: 4px solid #d97706; }
.ee-inline-alert--warning i { color: #d97706; }
.ee-inline-alert a { color: #E34824; font-weight: 500; }
.ee-inline-alert a:hover { color: #c93d1e; }

/* Lista documenti */
.ee-doc-item {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.65rem 0; border-bottom: 1px solid #EEEFF0;
}
.ee-doc-item:last-child { border-bottom: none; }
.ee-doc-icon { color: #dc2626; flex-shrink: 0; font-size: 1.1rem; }
.ee-doc-name { font-size: 0.82rem; font-weight: 600; color: #151515; }
.ee-doc-meta { font-size: 0.68rem; color: #9ca3af; margin-top: 0.1rem; }

/* More docs link */
.ee-more-link { font-size: 0.72rem; color: #E34824; text-decoration: none; font-weight: 500; }
.ee-more-link:hover { color: #c93d1e; text-decoration: underline; }

/* Bottone outline pieno larghezza */
.ee-btn-outline-full {
    display: flex; align-items: center; justify-content: center; gap: 0.4rem;
    padding: 0.5rem 1rem; width: 100%; font-size: 0.82rem; font-weight: 600;
    border: 1px solid rgba(8,145,178,0.2); color: #0891b2;
    background: transparent; border-radius: 0; text-decoration: none;
    transition: background 0.15s, border-color 0.15s; margin-top: 0.75rem;
}
.ee-btn-outline-full:hover { background: rgba(8,145,178,0.06); border-color: #0891b2; color: #0891b2; }

.ee-validation { color: #dc2626; font-size: 0.7rem; margin-top: 0.2rem; display: block; }

/* Suggerimento box */
.ee-suggest-box {
    background: rgba(8,145,178,0.04); border-left: 3px solid #0891b2;
    padding: 0.6rem 0.85rem; font-size: 0.8rem; color: #151515;
    margin-bottom: 1rem;
}
.ee-suggest-box i { color: #0891b2; }
.ee-suggest-sub { font-size: 0.72rem; color: #6b7280; margin-top: 0.15rem; }

/* Riepilogo calcoli */
.ee-riepilogo {
    background: rgba(107,114,128,0.03); border: 1px solid #EEEFF0;
    padding: 0.85rem 1rem; margin-top: 0.5rem;
}
.ee-riepilogo-title {
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.04em; color: #6b7280;
    display: flex; align-items: center; gap: 0.35rem; margin-bottom: 0.6rem;
}
.ee-riepilogo-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.3rem 0; border-bottom: 1px solid #EEEFF0; font-size: 0.78rem;
}
.ee-riepilogo-row:last-child { border-bottom: none; }

/* Legenda azioni */
.ee-legend {
    background: rgba(107,114,128,0.03); border: 1px solid #EEEFF0;
    padding: 0.75rem 0.9rem; margin-top: 0.75rem;
}
.ee-legend-row { font-size: 0.72rem; color: #6b7280; line-height: 1.6; }
.ee-legend-row strong { color: #151515; }

/* —— Modal Annulla —— */
.ee-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(21,21,21,0.5); z-index: 1060;
    align-items: center; justify-content: center;
}
.ee-modal-overlay.open { display: flex; }
.ee-modal {
    background: #fff; border: 1px solid #e0e1e3;
    border-radius: 0; width: 100%; max-width: 460px;
    margin: 1rem; overflow: hidden;
}
.ee-modal-danger { font-size: 0.82rem; color: #dc2626; font-weight: 600; }
.ee-modal-btn {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.5rem 1.25rem; font-size: 0.82rem; font-weight: 600;
    border-radius: 0; border: 2px solid; cursor: pointer;
    text-decoration: none; transition: background 0.2s, border-color 0.2s;
}
.ee-modal-btn--secondary { background: transparent; color: #6b7280; border-color: #e0e1e3; }
.ee-modal-btn--secondary:hover { background: #f3f4f6; border-color: #e0e1e3; color: #6b7280; }
.ee-modal-btn--amber { background: #d97706; color: #fff; border-color: #d97706; }
.ee-modal-btn--amber:hover { background: #b45309; border-color: #b45309; }

@media (max-width: 575.98px) {
    .ee-modal-footer { flex-direction: column-reverse; }
    .ee-modal-btn { width: 100%; justify-content: center; }
}

/* GARE > CREATE PAGE STYLES */

/* ========== BTN LARGE (locale: full-width per submit) ========== */
.gc-btn-lg {
    padding: 0.75rem 2rem;
    font-size: 0.95rem;
    width: 100%;
    justify-content: center;
}

/* ========== CARD HEADER (locale: variant primary/info/secondary/warning/success) ========== */

/* Color variants for accent bar */
.gc-card-header--primary::before   { background: #E34824; }

/* ========== INFO BOX ========== */
.gc-info-box {
    background: rgba(8,145,178,0.04);
    border: 1px solid rgba(8,145,178,0.12);
    border-left: 4px solid #0891b2;
    border-radius: 0;
    padding: 1rem 1.25rem;
    font-size: 0.8rem;
    color: #151515;
}
.gc-info-box strong { font-weight: 700; }
.gc-info-box ul {
    margin: 0.5rem 0 0;
    padding-left: 1.1rem;
    color: #6b7280;
}
.gc-info-box li { margin-bottom: 0.15rem; }
.gc-info-box .text-danger { color: #E34824 !important; font-size: 0.8rem; }

/* Sticky sidebar */

/* Separator */

/* Actions grid */

@media (max-width: 991.98px) {
    .gc-sticky { position: static; }
    .gc-header { flex-direction: column; }
}

/* GARE > DETAILS PAGE STYLES */

/* ========== BADGES container ========== */
.gd-badges { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.4rem; }

/* ========== BADGES ========== */

.gd-badge-white-on-dark { background: #fff; color: #E34824; font-weight: 700; padding: 0.15rem 0.5rem; }

.gd-btn-warn {
    background: #d97706; color: #fff; border: 2px solid #d97706;
    padding: 0.55rem 1.5rem; font-weight: 600; font-size: 0.85rem;
    border-radius: 0; text-decoration: none; display: inline-flex;
    align-items: center; gap: 0.4rem; transition: all 0.2s; cursor: pointer;
    width: 100%; justify-content: center;
}
.gd-btn-warn:hover { background: #b45309; border-color: #b45309; color: #fff; }
.gd-btn-info {
    background: #0891b2; color: #fff; border: 2px solid #0891b2;
    padding: 0.55rem 1.5rem; font-weight: 600; font-size: 0.85rem;
    border-radius: 0; text-decoration: none; display: inline-flex;
    align-items: center; gap: 0.4rem; transition: all 0.2s; cursor: pointer;
    width: 100%; justify-content: center;
}
.gd-btn-info:hover { background: #0e7490; border-color: #0e7490; color: #fff; }

/* gd-card-header::before / --X icon colors / h2 flex
   —— consolidati in .cb-card-header* (companion gia presente nel markup) */

/* ========== FIELD ROWS (read-only) ========== */
.gd-fields { display: flex; flex-wrap: wrap; gap: 0; padding: 1rem 1.5rem; }

/* ========== TABLE ========== */
/* .gd-table —— consolidata in .cb-table (companion gia presente nel markup) */
.gd-title-cell { max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ========== ALERTS ========== */

.gd-stat-box {
    background: #EEEFF0; padding: 1rem; text-align: center;
    border: 1px solid #e0e1e3;
}

/* ========== CHECKLIST ITEMS ========== */
.gd-checklist-item {
    display: flex; align-items: flex-start; gap: 0.75rem;
    padding: 0.75rem; border: 1px solid #e0e1e3;
    margin-bottom: 0.5rem; transition: border-color 0.2s;
}
.gd-checklist-item--ok { border-left: 3px solid #059669; background: rgba(5,150,105,0.03); }
.gd-checklist-item--miss { border-left: 3px solid #e0e1e3; }
.gd-checklist-icon { flex-shrink: 0; margin-top: 0.1rem; }
.gd-checklist-text { flex: 1; min-width: 0; }
.gd-checklist-text strong { font-size: 0.85rem; color: #151515; }
.gd-checklist-text small { font-size: 0.72rem; color: #9ca3af; display: block; }
.gd-checklist-text .gd-miss-label { font-size: 0.72rem; color: #dc2626; font-weight: 600; }

/* ========== EMPTY STATE ========== */

/* ========== SYSTEM INFO ========== */

.gd-sys-item:last-child { margin-bottom: 0; }

/* ========== ACTION BUTTONS (sidebar) ========== */

/* Small action btn */
.gd-act-btn {
    width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid #e0e1e3; background: #fff; color: #6b7280;
    border-radius: 0; cursor: pointer; transition: all 0.15s;
    font-size: 0.85rem; text-decoration: none; padding: 0;
}
.gd-act-btn:hover { border-color: #E34824; color: #E34824; background: rgba(227,72,36,0.04); }

/* Sticky sidebar */

@media (max-width: 991.98px) {
    .gd-header { flex-direction: column; }
    .gd-sticky { position: static; }
    .gd-stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 575.98px) {
    .gd-field { width: 100% !important; }
}

/* GARE > EDIT PAGE STYLES */

/* Alert / Info */
.ge-info-box { background: rgba(8,145,178,0.04); border: 1px solid rgba(8,145,178,0.12); border-left: 4px solid #0891b2; border-radius: 0; padding: 1rem 1.25rem; font-size: 0.8rem; color: #151515; }
.ge-info-box strong { font-weight: 700; }
.ge-info-box ul { margin: 0.5rem 0 0; padding-left: 1.1rem; color: #6b7280; }
.ge-info-box li { margin-bottom: 0.15rem; }
.ge-info-box .text-danger { color: #E34824 !important; font-size: 0.8rem; }
.ge-info-box .text-warning { color: #d97706 !important; }

/* System info */

.ge-sys-item:last-child { margin-bottom: 0; }

/* Sticky + actions */

@media (max-width: 991.98px) {
    .ge-sticky { position: static; }
    .ge-header { flex-direction: column; }
}

/* LOTTI > CREATE PAGE STYLES */

/* Card header (locale: variant primary/secondary/light/warning/info/success) */

/* Gara preimpostata info */
.lc-gara-info { background: rgba(8,145,178,0.04); border: 1px solid rgba(8,145,178,0.12); border-left: 4px solid #0891b2; border-radius: 0; padding: 1rem 1.25rem; font-size: 0.85rem; color: #151515; }
.lc-gara-info i { color: #0891b2; }
.lc-gara-info .lc-gara-title { font-size: 1rem; font-weight: 600; margin-top: 0.25rem; display: block; }

/* Alert muted (locale) */

/* Btn lg + sidebar full width */
.lc-btn-lg { padding: 0.75rem 2rem; font-size: 0.95rem; width: 100%; justify-content: center; }

/* Info box */
.lc-info-box { background: rgba(8,145,178,0.04); border: 1px solid rgba(8,145,178,0.12); border-left: 4px solid #0891b2; border-radius: 0; padding: 1rem 1.25rem; font-size: 0.8rem; color: #151515; }
.lc-info-box ul { margin: 0.5rem 0 0; padding-left: 0; list-style: none; }
.lc-info-box li { margin-bottom: 0.35rem; font-size: 0.8rem; color: #6b7280; display: flex; align-items: flex-start; gap: 0.4rem; }
.lc-info-box li i { flex-shrink: 0; margin-top: 0.1rem; }
.lc-info-box li strong { color: #151515; }

/* Required fields list */
.lc-req-list { margin: 0; padding: 0; list-style: none; }
.lc-req-list li { font-size: 0.8rem; color: #6b7280; padding: 0.25rem 0; display: flex; align-items: center; gap: 0.35rem; }
.lc-req-list li i { color: #E34824; font-size: 0.7rem; }

/* Sticky */
@media (max-width: 991.98px) { .lc-sticky { position: static; } }

/* LOTTI > DETAILS PAGE STYLES */

/* ========== PAGE ========== */
/* ========== ALERTS ========== */

.ld-field-value--lg { font-size: 1.1rem; }
.ld-field-value--muted { color: #9ca3af; font-weight: 400; }

/* Badges */

.ld-btn-outline { background: transparent; color: #6b7280; border-color: #e0e1e3; }
.ld-btn-outline:hover { background: #f3f4f6; border-color: #e0e1e3; color: #6b7280; }

/* Gara link button */
.ld-gara-btn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.8rem; border: 1px solid rgba(227,72,36,0.2); color: #E34824; font-size: 0.85rem; font-weight: 500; text-decoration: none; transition: all 0.15s; }
.ld-gara-btn:hover { background: rgba(227,72,36,0.04); border-color: #E34824; color: #c93d1e; }
.ld-platform-btn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.8rem; border: 1px solid #e0e1e3; color: #6b7280; font-size: 0.85rem; font-weight: 500; text-decoration: none; transition: all 0.15s; }
.ld-platform-btn:hover { background: #f3f4f6; border-color: #e0e1e3; color: #6b7280; }

/* ========== WORKFLOW TIMELINE ========== */
.ld-timeline { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 0; }
.ld-tl-step { display: flex; flex-direction: column; align-items: center; flex: 1; position: relative; }
.ld-tl-step:not(:last-child)::after { content: ''; position: absolute; top: 15px; left: 50%; width: 100%; height: 2px; background: #e0e1e3; z-index: 0; }
.ld-tl-step.completed::after { background: #059669; }
.ld-tl-circle { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; z-index: 1; background: #fff; border: 2px solid #e0e1e3; cursor: default; transition: all 0.3s; border-radius: 50%; font-size: 0.7rem; }
.ld-tl-step.completed .ld-tl-circle { background: #059669; border-color: #059669; color: #fff; }
.ld-tl-step.active .ld-tl-circle { background: #E34824; border-color: #E34824; color: #fff; transform: scale(1.2); box-shadow: 0 0 0 4px rgba(227,72,36,0.15); }
.ld-tl-step.future .ld-tl-circle { background: #fff; border-color: #e0e1e3; color: #9ca3af; }
.ld-tl-step.active.failed .ld-tl-circle { background: #dc2626; border-color: #dc2626; }
.ld-tl-label { margin-top: 8px; font-size: 0.68rem; text-align: center; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: 0.03em; }
.ld-tl-step.active .ld-tl-label { color: #E34824; }
.ld-tl-step.active.failed .ld-tl-label { color: #dc2626; }
.ld-tl-step.completed .ld-tl-label { color: #059669; }

/* ========== CHECKLIST ========== */
.ld-checklist-section { margin-bottom: 1.5rem; }
.ld-checklist-section:last-child { margin-bottom: 0; }
.ld-checklist-hdr { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.ld-checklist-hdr h3 { font-size: 0.85rem; font-weight: 700; color: #151515; margin: 0; display: flex; align-items: center; gap: 0.4rem; }
.ld-doc-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.65rem 0.8rem; border: 1px solid #e0e1e3; margin-bottom: 0.5rem; transition: border-color 0.15s; }
.ld-doc-item--ok { border-left: 4px solid #059669; }
.ld-doc-item--missing { border-left: 4px solid #e0e1e3; }
.ld-doc-icon { flex-shrink: 0; font-size: 1.1rem; }
.ld-doc-info { flex: 1; min-width: 0; }
.ld-doc-info strong { font-size: 0.85rem; color: #151515; display: block; }
.ld-doc-info small { font-size: 0.72rem; color: #9ca3af; }
.ld-doc-info .text-danger { color: #dc2626 !important; }
.ld-doc-view { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border: 1px solid #e0e1e3; background: #fff; color: #6b7280; text-decoration: none; flex-shrink: 0; transition: all 0.15s; }
.ld-doc-view:hover { border-color: #E34824; color: #E34824; }

/* ========== VALUTAZIONI / ELABORAZIONE ========== */
.ld-val-section { padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid #EEEFF0; }
.ld-val-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.ld-val-section h3 { font-size: 0.85rem; font-weight: 700; color: #151515; margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.4rem; }
.ld-val-section h3 i { font-size: 0.9rem; }

/* ========== STATS GRID ========== */
.ld-stat-box { text-align: center; padding: 1rem; border: 1px solid #e0e1e3; }

/* ========== TABS ========== */
.ld-tabs-header { padding: 0; border-bottom: 2px solid #EEEFF0; }
.ld-tabs-nav { display: flex; gap: 0; overflow-x: auto; }
.ld-tab-btn { padding: 0.85rem 1.25rem; border: none; background: transparent; font-size: 0.8rem; font-weight: 600; color: #6b7280; cursor: pointer; position: relative; white-space: nowrap; display: flex; align-items: center; gap: 0.35rem; transition: color 0.15s; }
.ld-tab-btn:hover { color: #E34824; }
.ld-tab-btn.active { color: #E34824; }
.ld-tab-btn.active::after { content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 2px; background: #E34824; }
.ld-tab-btn .badge { font-size: 0.6rem; padding: 0.15rem 0.4rem; border-radius: 0; }
.ld-tab-content { padding: 1.5rem; padding-left: calc(1.5rem + 4px); }
.ld-tab-pane { display: block; }
@keyframes ld-spin { to { transform: rotate(360deg); } }

/* ========== SIDEBAR ========== */

.ld-sys-field:last-child { margin-bottom: 0; }

/* Dropdown */
.ld-dropdown { position: relative; width: 100%; }
.ld-dropdown-toggle { background: transparent; color: #6b7280; border: 2px solid #e0e1e3; padding: 0.55rem 1.5rem; font-weight: 600; font-size: 0.85rem; border-radius: 0; width: 100%; display: flex; align-items: center; justify-content: center; gap: 0.4rem; cursor: pointer; transition: all 0.2s; }
.ld-dropdown-toggle:hover { border-color: #151515; color: #151515; }
.ld-dropdown-menu { border-radius: 0; border: 1px solid #e0e1e3; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.ld-dropdown-menu .dropdown-item { font-size: 0.85rem; padding: 0.5rem 1rem; }
.ld-dropdown-menu .dropdown-item:hover { background: rgba(227,72,36,0.04); color: #E34824; }

/* ========== RESPONSIVE ========== */
@media (max-width: 991.98px) { .ld-sticky { position: static; } }
@media (max-width: 767.98px) {
    .ld-header { flex-direction: column; }
    .ld-timeline { flex-direction: column; align-items: flex-start; }
    .ld-tl-step { flex-direction: row; width: 100%; margin-bottom: 1rem; }
    .ld-tl-step::after { display: none !important; }
    .ld-tl-label { margin-top: 0; margin-left: 10px; text-align: left; }
}

/* LOTTI > EDIT PAGE STYLES */

/* Alerts */

/* Gara info */
.le-gara-info { background: rgba(8,145,178,0.04); border: 1px solid rgba(8,145,178,0.12); border-left: 4px solid #0891b2; border-radius: 0; padding: 1rem 1.25rem; font-size: 0.85rem; color: #151515; }
.le-gara-info i { color: #0891b2; }
.le-gara-info .le-gara-title { font-size: 1rem; font-weight: 600; margin-top: 0.25rem; display: block; }
.le-gara-info small { color: #9ca3af; }

/* Buttons */

/* Sidebar info */

.le-sys-field:last-child { margin-bottom: 0; }

.le-req-list { margin: 0; padding: 0; list-style: none; }
.le-req-list li { font-size: 0.8rem; color: #6b7280; padding: 0.25rem 0; display: flex; align-items: center; gap: 0.35rem; }
.le-req-list li i { color: #E34824; font-size: 0.7rem; }
.le-req-list li i.text-danger { color: #dc2626 !important; }

/* Sticky */
@media (max-width: 991.98px) { .le-sticky { position: static; } }

/* LOTTI > _ValutazioniPartial PAGE STYLES */

.tab-val .tv-alert { border-radius: 0; border: 1px solid #e0e1e3; padding: 0.85rem 1.25rem; font-size: 0.85rem; display: flex; align-items: flex-start; gap: 0.5rem; }
.tab-val .tv-alert-info { background: rgba(8,145,178,0.04); border-left: 4px solid #0891b2; }
.tab-val .tv-alert-info i { color: #0891b2; }
.tab-val .tv-alert-secondary { background: #EEEFF0; border: 1px solid #e0e1e3; border-left: 4px solid #6b7280; }
.tab-val .tv-alert-secondary i { color: #6b7280; }
.tab-val .tv-alert-danger { background: rgba(220,38,38,0.04); border-left: 4px solid #dc2626; border: 1px solid #e0e1e3; }
.tab-val .tv-alert-danger i { color: #dc2626; }
.tab-val .tv-btn { padding: 0.55rem 1.5rem; font-weight: 600; font-size: 0.85rem; border-radius: 0; text-decoration: none; display: inline-flex; align-items: center; gap: 0.4rem; transition: all 0.2s; cursor: pointer; width: 100%; justify-content: center; border: 2px solid; }
.tab-val .tv-btn-primary { background: #E34824; color: #fff; border-color: #E34824; }
.tab-val .tv-btn-primary:hover { background: #c93d1e; border-color: #c93d1e; color: #fff; }
.tab-val .tv-card { border: 1px solid #e0e1e3; margin-bottom: 1rem; overflow: hidden; }
.tab-val .tv-card-header { padding: 0.8rem 1rem; border-bottom: 1px solid #e0e1e3; display: flex; align-items: center; gap: 0.5rem; position: relative; }
.tab-val .tv-card-header::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.tab-val .tv-card-header--orange::before { background: #E34824; }
.tab-val .tv-card-header--green::before { background: #059669; }
.tab-val .tv-card-header h3 { font-size: 0.85rem; font-weight: 700; color: #151515; margin: 0; display: flex; align-items: center; gap: 0.4rem; }
.tab-val .tv-card-body { padding: 1rem; padding-left: calc(1rem + 4px); }
.tab-val .tv-field { margin-bottom: 0.6rem; }
.tab-val .tv-field:last-child { margin-bottom: 0; }
.tab-val .tv-label { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7280; margin-bottom: 0.1rem; }
.tab-val .tv-value { font-size: 0.85rem; color: #151515; }
.tab-val .tv-value--muted { color: #9ca3af; }
.tab-val .tv-badge { display: inline-block; padding: 0.2rem 0.5rem; font-size: 0.68rem; font-weight: 600; border-radius: 0; }
.tab-val .tv-badge-success { background: rgba(5,150,105,0.08); color: #059669; border: 1px solid rgba(5,150,105,0.15); }
.tab-val .tv-badge-danger { background: rgba(220,38,38,0.08); color: #dc2626; border: 1px solid rgba(220,38,38,0.15); }
.tab-val .tv-badge-warn { background: rgba(217,119,6,0.08); color: #d97706; border: 1px solid rgba(217,119,6,0.15); }
.tab-val .tv-doc-card { background: #EEEFF0; border: 1px solid #e0e1e3; padding: 1rem; margin-bottom: 1rem; }
.tab-val .tv-doc-card h4 { font-size: 0.85rem; font-weight: 700; color: #151515; margin: 0 0 0.5rem; display: flex; align-items: center; gap: 0.4rem; }
.tab-val .tv-doc-card h4 i { color: #E34824; }
.tab-val .tv-doc-card p { font-size: 0.82rem; color: #6b7280; margin: 0 0 0.5rem; }
.tab-val .tv-doc-link { color: #E34824; text-decoration: none; font-weight: 600; font-size: 0.82rem; display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.35rem 0.7rem; border: 1px solid rgba(227,72,36,0.2); transition: all 0.15s; }
.tab-val .tv-doc-link:hover { background: rgba(227,72,36,0.04); border-color: #E34824; }
.tab-val .tv-prev-card { background: #EEEFF0; border: 1px solid #e0e1e3; padding: 1rem; }
.tab-val .tv-prev-card h4 { font-size: 0.85rem; font-weight: 700; color: #151515; margin: 0 0 0.5rem; display: flex; align-items: center; gap: 0.4rem; }

/* LOTTI > _ScadenzePartial PAGE STYLES */

.tab-scad .ts-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; gap: 0.5rem; }
.tab-scad .ts-header h3 { font-size: 0.85rem; font-weight: 700; color: #151515; margin: 0; display: flex; align-items: center; gap: 0.4rem; }
.tab-scad .ts-header h3 i { color: #E34824; }
.tab-scad .ts-header-actions { display: flex; gap: 0.4rem; }
.tab-scad .ts-btn-sm { padding: 0.35rem 0.8rem; font-size: 0.78rem; font-weight: 600; border-radius: 0; text-decoration: none; display: inline-flex; align-items: center; gap: 0.3rem; transition: all 0.15s; border: 1px solid; }
.tab-scad .ts-btn-primary { background: #E34824; color: #fff; border-color: #E34824; }
.tab-scad .ts-btn-primary:hover { background: #c93d1e; border-color: #c93d1e; color: #fff; }
.tab-scad .ts-btn-outline { background: transparent; color: #6b7280; border-color: #e0e1e3; }
.tab-scad .ts-btn-outline:hover { background: #f3f4f6; border-color: #e0e1e3; color: #6b7280; }
.tab-scad .ts-alert { border-radius: 0; border: 1px solid #e0e1e3; padding: 0.7rem 1rem; font-size: 0.82rem; display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.tab-scad .ts-alert-danger { background: rgba(220,38,38,0.04); border-left: 4px solid #dc2626; }
.tab-scad .ts-alert-danger i { color: #dc2626; }
.tab-scad .ts-alert-warning { background: rgba(217,119,6,0.04); border-left: 4px solid #d97706; }
.tab-scad .ts-alert-warning i { color: #d97706; }
.tab-scad .ts-alert-info { background: rgba(8,145,178,0.04); border-left: 4px solid #0891b2; }
.tab-scad .ts-alert-info i { color: #0891b2; }
.tab-scad .ts-badge-row { display: flex; gap: 0.5rem; justify-content: center; margin-bottom: 1rem; flex-wrap: wrap; }
.tab-scad .ts-badge { font-size: 0.68rem; font-weight: 600; border-radius: 0; }
.tab-scad .ts-badge-danger { background: rgba(220,38,38,0.08); color: #dc2626; border: 1px solid rgba(220,38,38,0.15); }
.tab-scad .ts-badge-warn { background: rgba(217,119,6,0.08); color: #d97706; border: 1px solid rgba(217,119,6,0.15); }
.tab-scad .ts-badge-primary { background: rgba(227,72,36,0.08); color: #E34824; border: 1px solid rgba(227,72,36,0.15); }
.tab-scad .ts-badge-success { background: rgba(5,150,105,0.08); color: #059669; border: 1px solid rgba(5,150,105,0.15); }
.tab-scad .ts-badge-secondary { background: #EEEFF0; color: #6b7280; border: 1px solid #e0e1e3; }
.tab-scad .ts-table { width: 100%; border-collapse: collapse; }
.tab-scad .ts-table thead th { background: #151515; color: #fff; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.7rem 0.8rem; border: none; white-space: nowrap; }
.tab-scad .ts-table tbody td { padding: 0.7rem 0.8rem; font-size: 0.85rem; color: #151515; border-bottom: 1px solid #EEEFF0; vertical-align: middle; }
.tab-scad .ts-table tbody tr { transition: background 0.15s; }
.tab-scad .ts-table tbody tr:hover { background: rgba(227,72,36,0.03); }
.tab-scad .ts-table tbody tr:last-child td { border-bottom: none; }
.tab-scad .ts-row-danger { background: rgba(220,38,38,0.04); }
.tab-scad .ts-row-warning { background: rgba(217,119,6,0.04); }
.tab-scad .ts-row-success { background: rgba(5,150,105,0.04); opacity: 0.8; }
.tab-scad .ts-act-btn { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #e0e1e3; background: #fff; color: #6b7280; text-decoration: none; transition: all 0.15s; font-size: 0.8rem; padding: 0; }
.tab-scad .ts-act-btn:hover { border-color: #E34824; color: #E34824; }
.tab-scad .ts-act-btn--success:hover { border-color: #059669; color: #059669; }
.tab-scad .ts-act-btn--warning:hover { border-color: #d97706; color: #d97706; }
.tab-scad .ts-link { color: #E34824; text-decoration: none; font-weight: 500; }
.tab-scad .ts-link:hover { text-decoration: underline; color: #c93d1e; }

/* LOTTI > _RichiesteIntegrazionePartial PAGE STYLES */

.tab-rich .tr-alert { border-radius: 0; border: 1px solid #e0e1e3; padding: 0.85rem 1.25rem; font-size: 0.85rem; display: flex; align-items: flex-start; gap: 0.5rem; }
.tab-rich .tr-alert-info { background: rgba(8,145,178,0.04); border-left: 4px solid #0891b2; }
.tab-rich .tr-alert-info i { color: #0891b2; }
.tab-rich .tr-alert-warning { background: rgba(217,119,6,0.04); border-left: 4px solid #d97706; }
.tab-rich .tr-alert-warning i { color: #d97706; }
.tab-rich .tr-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-bottom: 1rem; }
.tab-rich .tr-stat { text-align: center; padding: 1rem; border: 1px solid #e0e1e3; }
.tab-rich .tr-stat-num { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.1rem; }
.tab-rich .tr-stat-label { font-size: 0.68rem; text-transform: uppercase; font-weight: 600; letter-spacing: 0.03em; color: #6b7280; }
.tab-rich .tr-table { width: 100%; border-collapse: collapse; }
.tab-rich .tr-table thead th { background: #151515; color: #fff; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.7rem 0.8rem; border: none; white-space: nowrap; }
.tab-rich .tr-table tbody td { padding: 0.7rem 0.8rem; font-size: 0.85rem; color: #151515; border-bottom: 1px solid #EEEFF0; vertical-align: middle; }
.tab-rich .tr-table tbody tr { transition: background 0.15s; }
.tab-rich .tr-table tbody tr:hover { background: rgba(227,72,36,0.03); }
.tab-rich .tr-table tbody tr:last-child td { border-bottom: none; }
.tab-rich .tr-badge { display: inline-block; padding: 0.2rem 0.5rem; font-size: 0.68rem; font-weight: 600; border-radius: 0; }
.tab-rich .tr-badge-success { background: rgba(5,150,105,0.08); color: #059669; border: 1px solid rgba(5,150,105,0.15); }
.tab-rich .tr-badge-info { background: rgba(8,145,178,0.08); color: #0891b2; border: 1px solid rgba(8,145,178,0.15); }
.tab-rich .tr-badge-warn { background: rgba(217,119,6,0.08); color: #d97706; border: 1px solid rgba(217,119,6,0.15); }
.tab-rich .tr-act-btn { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #e0e1e3; background: #fff; color: #6b7280; text-decoration: none; transition: all 0.15s; font-size: 0.8rem; padding: 0; }
.tab-rich .tr-act-btn:hover { border-color: #E34824; color: #E34824; background: rgba(227,72,36,0.04); }
.tab-rich .tr-act-btn--success:hover { border-color: #059669; color: #059669; background: rgba(5,150,105,0.04); }
.tab-rich .tr-footer { padding: 0.75rem 0.8rem; border-top: 1px solid #EEEFF0; text-align: right; }
.tab-rich .tr-footer a { color: #E34824; text-decoration: none; font-weight: 600; font-size: 0.85rem; display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.4rem 0.8rem; border: 1px solid rgba(227,72,36,0.2); transition: all 0.15s; }
.tab-rich .tr-footer a:hover { background: rgba(227,72,36,0.04); border-color: #E34824; }
.tab-rich .tr-empty { text-align: center; padding: 2rem; }
.tab-rich .tr-empty i { color: #e0e1e3; font-size: 2rem; display: block; margin-bottom: 0.5rem; }
.tab-rich .tr-empty p { font-size: 0.85rem; color: #6b7280; margin: 0; }
@media (max-width: 767.98px) { .tab-rich .tr-stats { grid-template-columns: 1fr; } }

/* LOTTI > _ElaborazioniPartial PAGE STYLES */

.tab-elab .te-alert { border-radius: 0; border: 1px solid #e0e1e3; padding: 0.85rem 1.25rem; font-size: 0.85rem; display: flex; align-items: flex-start; gap: 0.5rem; }
.tab-elab .te-alert-info { background: rgba(8,145,178,0.04); border-left: 4px solid #0891b2; }
.tab-elab .te-alert-info i { color: #0891b2; margin-top: 0.1rem; }
.tab-elab .te-alert-warning { background: rgba(217,119,6,0.04); border-left: 4px solid #d97706; }
.tab-elab .te-alert-warning i { color: #d97706; margin-top: 0.1rem; }
.tab-elab .te-section { margin-bottom: 1.5rem; }
.tab-elab .te-section:last-child { margin-bottom: 0; }
.tab-elab .te-section-title { font-size: 0.85rem; font-weight: 700; color: #151515; margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.4rem; padding-bottom: 0.5rem; border-bottom: 1px solid #EEEFF0; }
.tab-elab .te-section-title i { font-size: 0.9rem; }
.tab-elab .te-field { margin-bottom: 0.75rem; }
.tab-elab .te-field:last-child { margin-bottom: 0; }
.tab-elab .te-label { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7280; margin-bottom: 0.1rem; }
.tab-elab .te-value { font-size: 0.9rem; color: #151515; font-weight: 500; }
.tab-elab .te-value--lg { font-size: 1.1rem; }
.tab-elab .te-value--muted { color: #9ca3af; font-weight: 400; }
.tab-elab .te-badge { display: inline-block; padding: 0.25rem 0.6rem; font-size: 0.7rem; font-weight: 600; border-radius: 0; }
.tab-elab .te-badge-success { background: rgba(5,150,105,0.08); color: #059669; border: 1px solid rgba(5,150,105,0.15); }
.tab-elab .te-badge-danger { background: rgba(220,38,38,0.08); color: #dc2626; border: 1px solid rgba(220,38,38,0.15); }
.tab-elab .te-badge-secondary { background: #EEEFF0; color: #6b7280; border: 1px solid #e0e1e3; }
.tab-elab .te-badge-warn { background: rgba(217,119,6,0.08); color: #d97706; border: 1px solid rgba(217,119,6,0.15); }
.tab-elab .te-sep { border: none; border-top: 1px solid #EEEFF0; margin: 1rem 0; }
.tab-elab .te-empty { text-align: center; padding: 2rem; }
.tab-elab .te-empty i { color: #e0e1e3; font-size: 2.5rem; display: block; margin-bottom: 0.5rem; }
.tab-elab .te-empty p { font-size: 0.85rem; color: #6b7280; margin: 0; }

/* MEZZI > UploadDocumento PAGE STYLES */

/* —— Variabili —— */

/* —— Layout —— */

/* —— Header —— */
.mud-header { margin-bottom: 1.5rem; }
.mud-header h1 {
    font-size: 1.45rem; font-weight: 700; color: var(--cb-dark);
    letter-spacing: -0.025em; margin: 0;
    display: flex; align-items: center; gap: 0.5rem;
}
.mud-header h1 svg { color: var(--cb-accent); flex-shrink: 0; }

/* —— Info mezzo banner —— */
.mud-mezzo-banner {
    background: var(--cb-white); border: 1px solid var(--cb-border);
    border-left: 4px solid var(--cb-cyan);
    padding: 0.85rem 1.25rem; margin-bottom: 1.5rem;
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap;
}
.mud-mezzo-name { font-size: 0.88rem; font-weight: 600; color: var(--cb-dark); }
.mud-mezzo-targa {
    font-size: 0.72rem; color: var(--cb-muted); margin-top: 0.2rem;
    font-family: monospace; letter-spacing: 0.05em;
}

/* —— Dropzone —— */
.mud-dropzone {
    border: 2px dashed var(--cb-border);
    background: var(--cb-light);
    padding: 2rem; text-align: center;
    cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.mud-dropzone:hover,
.mud-dropzone.dragover {
    border-color: var(--cb-accent);
    background: rgba(227,72,36,0.03);
}
.mud-dropzone.has-file {
    border-color: var(--cb-green);
    background: rgba(5,150,105,0.04);
}
.mud-dropzone-icon { font-size: 2.25rem; color: var(--cb-muted); }
.mud-dropzone-text { font-size: 0.85rem; color: var(--cb-dark); margin: 0.6rem 0 0.25rem; }
.mud-dropzone-link { color: var(--cb-accent); text-decoration: none; font-weight: 600; cursor: pointer; }
.mud-dropzone-link:hover { color: var(--cb-accent-hover); }

.mud-textarea {
    border: 1px solid var(--cb-border); font-size: 0.85rem;
    border-radius: 0; padding: 0.55rem 0.75rem;
    width: 100%; background: #fff; color: var(--cb-dark);
    resize: vertical; transition: border-color 0.2s, box-shadow 0.2s;
}
.mud-textarea:focus {
    outline: none; border-color: var(--cb-accent);
    box-shadow: 0 0 0 0.2rem rgba(227,72,36,0.12);
}

.mud-form-row-2 { grid-template-columns: repeat(2, 1fr); }

.mud-btn-accent:disabled {
    background: var(--cb-muted); border-color: var(--cb-muted); cursor: not-allowed;
}
.mud-btn-remove {
    background: transparent; border: 1px solid rgba(220,38,38,0.2);
    color: var(--cb-danger); font-size: 0.78rem; font-weight: 600;
    padding: 0.3rem 0.75rem; cursor: pointer; border-radius: 0;
    display: inline-flex; align-items: center; gap: 0.3rem;
    margin-top: 0.5rem; transition: background 0.15s, border-color 0.15s;
}
.mud-btn-remove:hover { background: rgba(220,38,38,0.06); border-color: var(--cb-danger); }

.mud-btn-outline-sm {
    background: transparent; border: 1px solid rgba(107,114,128,0.2);
    color: var(--cb-gray); font-size: 0.78rem; font-weight: 600;
    padding: 0.3rem 0.75rem; cursor: pointer; border-radius: 0;
    text-decoration: none; display: inline-flex; align-items: center; gap: 0.3rem;
    transition: background 0.15s, border-color 0.15s;
}
.mud-btn-outline-sm:hover { background: var(--cb-light); border-color: var(--cb-gray); color: var(--cb-dark); }

/* —— Sidebar sticky —— */

/* Tipi documento list */
.mud-doc-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.mud-doc-list li { font-size: 0.82rem; color: var(--cb-dark); display: flex; align-items: center; gap: 0.4rem; }
.mud-doc-list li i { flex-shrink: 0; }

/* —— Responsive —— */
@media (max-width: 991.98px) {
    .mud-sidebar { position: static; }
    .mud-form-row-2 { grid-template-columns: 1fr; }
}

/* MEZZI > EditDocumento PAGE STYLES */

/* Info mezzo box */
.med-mezzo-box {
    background: #fff;
    border: 1px solid #e0e1e3;
    border-left: 4px solid #0891b2;
    padding: 0.85rem 1.25rem;
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.med-mezzo-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7280; margin-bottom: 0.15rem; }
.med-mezzo-name { font-size: 0.9rem; font-weight: 600; color: #151515; display: flex; align-items: center; gap: 0.4rem; }
.med-mezzo-targa { font-size: 0.78rem; color: #6b7280; }
.med-mezzo-targa code { background: #EEEFF0; padding: 0.1rem 0.4rem; font-size: 0.78rem; color: #151515; font-weight: 600; }

/* Form */
.med-form-section-title {
    font-size: 0.82rem; font-weight: 600; color: #6b7280;
    text-transform: uppercase; letter-spacing: 0.03em;
    display: flex; align-items: center; gap: 0.4rem;
    margin-bottom: 0.75rem; padding-bottom: 0.5rem;
    border-bottom: 1px solid #EEEFF0;
}
.med-form-section-title i { color: #E34824; }

textarea.med-form-control { resize: vertical; }

/* Validation */
.med-validation-summary {
    border: 1px solid #e0e1e3; border-left: 4px solid #dc2626;
    background: rgba(220,38,38,0.04);
    padding: 0.85rem 1.25rem; font-size: 0.85rem;
    margin-bottom: 1.5rem;
}
.med-validation-summary ul { margin: 0; padding-left: 1.25rem; }

/* Separatore sezione */
.med-sep-section { border-top: 1px solid #EEEFF0; margin: 1.5rem 0; }

/* Sidebar info */
.med-info-box {
    background: rgba(8,145,178,0.04);
    border-left: 3px solid #0891b2;
    padding: 0.75rem 1rem; font-size: 0.85rem; color: #6b7280;
    margin-bottom: 1rem;
}

/* Sticky sidebar */
@media (max-width: 991.98px) {
    .med-sidebar-sticky { position: static; }
}
@media (max-width: 575.98px) {
    .med-page { padding: 1rem; }
    .med-page-header { flex-direction: column; }
}

/* MEZZI > _DocumentiMezzoPartial PAGE STYLES */

/* Badge */

/* Bottone upload */
.mdp-btn-upload {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.4rem 0.9rem; font-size: 0.82rem; font-weight: 600;
    background: #059669; color: #fff; border: 2px solid #059669;
    border-radius: 0; text-decoration: none; cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.mdp-btn-upload:hover { background: #047857; border-color: #047857; color: #fff; text-decoration: none; }

/* Empty state */

/* Tabella */

.mdp-table thead th:first-child { width: 44px; text-align: center; }
.mdp-table thead th:last-child  { width: 130px; text-align: right; }
.mdp-table tbody td:first-child { text-align: center; }
.mdp-table tbody td:last-child  { text-align: right; }

/* Scadenza cella */

/* Data caricamento */
.mdp-upload-date { font-size: 0.78rem; color: #151515; }

.mdp-action-btn {
    width: 32px; height: 32px; border-radius: 0;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.85rem; cursor: pointer; background: transparent;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    text-decoration: none; border: 1px solid;
}
.mdp-action-btn-cyan   { border-color: rgba(8,145,178,0.15);   color: #0891b2; }
.mdp-action-btn-cyan:hover { background: rgba(8,145,178,0.06); border-color: #0891b2; color: #0891b2; }
.mdp-action-btn-accent { border-color: rgba(227,72,36,0.15);   color: #E34824; }
.mdp-action-btn-accent:hover { background: rgba(227,72,36,0.06); border-color: #E34824; color: #E34824; }
.mdp-action-btn-amber  { border-color: rgba(217,119,6,0.15);   color: #d97706; }
.mdp-action-btn-amber:hover { background: rgba(217,119,6,0.06); border-color: #d97706; color: #d97706; }
.mdp-action-btn-danger { border-color: rgba(220,38,38,0.15);   color: #dc2626; }
.mdp-action-btn-danger:hover { background: rgba(220,38,38,0.06); border-color: #dc2626; color: #dc2626; }

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

/* Empty state btn outline */
.mdp-btn-upload-outline {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.4rem 0.9rem; font-size: 0.82rem; font-weight: 600;
    background: transparent; color: #059669;
    border: 1px solid rgba(5,150,105,0.2);
    border-radius: 0; text-decoration: none; cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.mdp-btn-upload-outline:hover { background: rgba(5,150,105,0.06); border-color: #059669; color: #059669; text-decoration: none; }

/* NotificheConfig > EDIT PAGE STYLES */

/* —— Page Icon —— */
.nce-page-icon {
    width: 42px; height: 42px; flex-shrink: 0;
    background: rgba(217,119,6,0.08);
    border: 1px solid rgba(217,119,6,0.15);
    display: flex; align-items: center; justify-content: center;
    margin-right: 0.5rem;
}

/* —— Layout —— */
.nce-layout { display: grid; grid-template-columns: 1fr 320px; gap: 1.5rem; align-items: start; }

/* —— Card —— */

.nce-card-header::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0;
    width: 4px; background: var(--cb-amber);
}
.nce-card-header-icon {
    background: rgba(217,119,6,0.08);
    border: 1px solid rgba(217,119,6,0.15);
}

/* —— Info card (sidebar) —— */
.nce-info-card {
    position: sticky;
    top: 72px;
}
.nce-info-header {
    position: relative;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--cb-border);
    display: flex; align-items: center; gap: 0.75rem;
}
.nce-info-header::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0;
    width: 4px; background: var(--cb-cyan);
}
.nce-info-header-icon {
    width: 34px; height: 34px;
    background: rgba(8,145,178,0.08);
    border: 1px solid rgba(8,145,178,0.15);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.nce-info-header-title { font-size: 0.9rem; font-weight: 700; color: var(--cb-dark); margin: 0; }
.nce-info-body { padding: 1.25rem 1.5rem 1.25rem 1.75rem; }

.nce-info-box {
    background: rgba(8,145,178,0.04);
    border-left: 3px solid var(--cb-cyan);
    padding: 0.6rem 0.85rem;
    font-size: 0.82rem;
    color: var(--cb-gray);
    margin-bottom: 1rem;
}

.nce-section-label {
    font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--cb-gray); margin-bottom: 0.6rem;
}
.nce-placeholder-list { list-style: none; padding: 0; margin: 0; }
.nce-placeholder-list li { font-size: 0.8rem; color: var(--cb-gray); padding: 0.25rem 0; border-bottom: 1px solid var(--cb-light); }
.nce-placeholder-list li:last-child { border-bottom: none; }
.nce-placeholder-list code {
    font-size: 0.72rem; color: var(--cb-accent);
    background: rgba(227,72,36,0.06);
    border: 1px solid rgba(227,72,36,0.15);
    padding: 0.1rem 0.35rem;
    display: inline-block; margin-bottom: 0.1rem;
}

/* —— Validation summary —— */
.nce-validation {
    border-radius: 0; border: 1px solid var(--cb-border);
    border-left: 4px solid var(--cb-danger);
    background: rgba(220,38,38,0.04);
    padding: 0.85rem 1.25rem; font-size: 0.85rem;
    margin-bottom: 1.25rem; color: var(--cb-danger);
}

.nce-form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; margin-bottom: 0.85rem; }
.nce-form-row { margin-bottom: 0.85rem; }

.nce-input, .nce-textarea {
    width: 100%; border: 1px solid var(--cb-border);
    font-size: 0.85rem; color: var(--cb-dark);
    padding: 0.5rem 0.75rem; border-radius: 0;
    background: var(--cb-white); transition: border-color 0.2s, box-shadow 0.2s;
}
.nce-input:focus, .nce-textarea:focus {
    outline: none;
    border-color: var(--cb-accent);
    box-shadow: 0 0 0 0.2rem rgba(227,72,36,0.12);
}
.nce-input[readonly], .nce-input:disabled {
    background: var(--cb-light); color: var(--cb-gray); cursor: not-allowed;
}
.nce-textarea { resize: vertical; min-height: 80px; }

/* —— Toggle switch override —— */
.nce-switch-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.75rem 0; border-top: 1px solid var(--cb-light);
    border-bottom: 1px solid var(--cb-light); margin: 0.85rem 0;
}
.nce-switch-sub { font-size: 0.72rem; color: var(--cb-muted); margin-top: 0.15rem; }

/* —— Buttons —— */

/* —— Responsive —— */
@media (max-width: 991.98px) {
    .nce-layout { grid-template-columns: 1fr; }
    .nce-info-card { position: static; }
}
@media (max-width: 575.98px) {
    .nce-form-2col { grid-template-columns: 1fr; }
}

/* NotificheConfig > DETAILS PAGE STYLES */

/* —— Page —— */

/* —— Alerts —— */

/* —— Layout —— */
.ncd-layout { display: grid; grid-template-columns: 1fr 300px; gap: 1.5rem; align-items: start; }

.ncd-btn-outline {
    padding: 0.4rem 0.9rem; font-size: 0.82rem; font-weight: 600;
    background: transparent; border-radius: 0; text-decoration: none;
    display: inline-flex; align-items: center; gap: 0.35rem;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.ncd-toggle-form { display: inline-flex; }
.ncd-toggle-btn {
    padding: 0.4rem 0.9rem; font-size: 0.82rem; font-weight: 600;
    border-radius: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 0.35rem;
    transition: background 0.15s, border-color 0.15s;
}
.ncd-toggle-btn-active   { background: transparent; border: 1px solid rgba(5,150,105,0.2);  color: var(--cb-green); }
.ncd-toggle-btn-active:hover   { background: rgba(5,150,105,0.08);  border-color: var(--cb-green); }
.ncd-toggle-btn-inactive { background: transparent; border: 1px solid rgba(107,114,128,0.2); color: var(--cb-gray); }
.ncd-toggle-btn-inactive:hover { background: rgba(107,114,128,0.08); border-color: var(--cb-gray); }

/* —— Fields grid —— */

.ncd-code { font-family: monospace; font-size: 0.78rem; color: var(--cb-accent); background: rgba(227,72,36,0.06); border: 1px solid rgba(227,72,36,0.15); padding: 0.15rem 0.4rem; }

/* —— Badge modulo —— */

/* —— Table —— */

.ncd-table thead th:last-child { text-align: right; width: 80px; }
.ncd-table td.ncd-td-right { text-align: right; }

/* —— Destinatario badge —— */
.ncd-dest-badge {
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.2rem 0.55rem; font-size: 0.68rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.03em; border-radius: 0;
}
.ncd-dest-name { font-weight: 600; font-size: 0.85rem; color: var(--cb-dark); }
.ncd-dest-note { font-size: 0.75rem; color: var(--cb-muted); }

/* —— Action btn —— */
.ncd-action-btn {
    width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
    background: transparent; border-radius: 0; cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.ncd-action-btn-danger { border: 1px solid rgba(220,38,38,0.15); color: var(--cb-danger); }
.ncd-action-btn-danger:hover { background: rgba(220,38,38,0.08); border-color: var(--cb-danger); }

/* —— Empty state —— */
.ncd-empty small { color: var(--cb-muted); font-size: 0.78rem; display: block; margin-bottom: 1.25rem; }

.ncd-btn-green {
    padding: 0.5rem 1.25rem; font-size: 0.85rem; font-weight: 600;
    color: #fff; background: var(--cb-green); border: 2px solid var(--cb-green);
    border-radius: 0; text-decoration: none; display: inline-flex; align-items: center; gap: 0.4rem;
    transition: background 0.2s;
}
.ncd-btn-green:hover { background: var(--cb-green-hover); border-color: var(--cb-green-hover); color: #fff; text-decoration: none; }

/* —— Sidebar status card —— */
.ncd-status-box {
    padding: 0.85rem 1rem; font-size: 0.85rem;
    display: flex; align-items: flex-start; gap: 0.6rem;
    border-left: 4px solid;
}
.ncd-status-box--success { border-color: var(--cb-green); background: rgba(5,150,105,0.05); }
.ncd-status-box--success svg { color: var(--cb-green); flex-shrink: 0; margin-top: 1px; }
.ncd-status-box--warn    { border-color: var(--cb-amber); background: rgba(217,119,6,0.04); }
.ncd-status-box--warn svg    { color: var(--cb-amber); flex-shrink: 0; margin-top: 1px; }
.ncd-status-box--secondary { border-color: var(--cb-gray); background: rgba(107,114,128,0.04); }
.ncd-status-box--secondary svg { color: var(--cb-gray); flex-shrink: 0; margin-top: 1px; }
.ncd-status-title { font-size: 0.85rem; font-weight: 700; color: var(--cb-dark); margin-bottom: 0.2rem; }
.ncd-status-sub { font-size: 0.75rem; color: var(--cb-gray); }

/* —— Audit list —— */
.ncd-audit-item { display: flex; justify-content: space-between; align-items: baseline; padding: 0.55rem 0; border-bottom: 1px solid var(--cb-light); }
.ncd-audit-item:last-child { border-bottom: none; }
.ncd-audit-label { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--cb-gray); }

/* —— Responsive —— */
@media (max-width: 991.98px) {
    .ncd-layout { grid-template-columns: 1fr; }
    .ncd-sidebar { order: -1; }
    .ncd-fields-grid { grid-template-columns: 1fr; }
    .ncd-field--full { grid-column: 1; }
}
@media (max-width: 575.98px) {
    .ncd-page { padding: 1rem; }
    .ncd-header-actions { flex-wrap: wrap; }
}

/* MEZZI > AddDestinatario PAGE STYLES */

/* —— Page —— */

.nca-page-icon {
    width: 42px; height: 42px; flex-shrink: 0;
    background: rgba(5,150,105,0.08);
    border: 1px solid rgba(5,150,105,0.15);
    display: flex; align-items: center; justify-content: center;
}

/* —— Layout —— */
.nca-layout { display: grid; grid-template-columns: 1fr 300px; gap: 1.5rem; align-items: start; }

/* —— Validation —— */
.nca-validation {
    border-radius: 0; border: 1px solid var(--cb-border);
    border-left: 4px solid var(--cb-danger);
    background: rgba(220,38,38,0.04);
    padding: 0.85rem 1.25rem; font-size: 0.85rem;
    margin-bottom: 1.25rem; color: var(--cb-danger);
}

.nca-form-row { margin-bottom: 0.85rem; }
.nca-input, .nca-select {
    width: 100%; border: 1px solid var(--cb-border);
    font-size: 0.85rem; color: var(--cb-dark);
    padding: 0.5rem 0.75rem; border-radius: 0;
    background: var(--cb-white);
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none; -webkit-appearance: none;
}
.nca-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
}
.nca-input:focus, .nca-select:focus {
    outline: none;
    border-color: var(--cb-accent);
    box-shadow: 0 0 0 0.2rem rgba(227,72,36,0.12);
}

/* —— Buttons —— */
.nca-btn-green {
    padding: 0.55rem 1.5rem; font-size: 0.85rem; font-weight: 600;
    color: #fff; background: var(--cb-green); border: 2px solid var(--cb-green);
    border-radius: 0; cursor: pointer;
    display: inline-flex; align-items: center; gap: 0.4rem;
    transition: background 0.2s, box-shadow 0.2s;
}
.nca-btn-green:hover { background: var(--cb-green-hover); border-color: var(--cb-green-hover); box-shadow: 0 2px 8px rgba(5,150,105,0.2); }

/* —— Info sidebar —— */
.nca-info-card { background: var(--cb-white); border: 1px solid var(--cb-border); overflow: hidden; position: sticky; top: 72px; }
.nca-type-item { padding: 0.85rem 0; border-bottom: 1px solid var(--cb-light); }
.nca-type-item:last-child { border-bottom: none; padding-bottom: 0; }
.nca-type-badge {
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.2rem 0.6rem; font-size: 0.68rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.03em; border-radius: 0;
    margin-bottom: 0.4rem;
}
.nca-type-badge--cyan   { background: rgba(8,145,178,0.06);  color: var(--cb-cyan);  border: 1px solid rgba(8,145,178,0.2); }
.nca-type-badge--amber  { background: rgba(217,119,6,0.06);  color: var(--cb-amber); border: 1px solid rgba(217,119,6,0.2); }
.nca-type-badge--accent { background: rgba(227,72,36,0.06);  color: var(--cb-accent);border: 1px solid rgba(227,72,36,0.2); }
.nca-type-desc { font-size: 0.8rem; color: var(--cb-gray); margin: 0; }

/* —— Responsive —— */
@media (max-width: 991.98px) {
    .nca-layout { grid-template-columns: 1fr; }
    .nca-info-card { position: static; }
}
@media (max-width: 575.98px) {
    .nca-page { padding: 1rem; }
}

/* LOTTI > _PartecipantiPartial PAGE STYLES */

/* ----- Statistiche ----- */

.tab-stat-card--accent::before  { background: #E34824; }
.tab-stat-card--success::before { background: #059669; }
.tab-stat-card--info::before    { background: #0891b2; }
.tab-stat-card--amber::before   { background: #d97706; }

.tab-stat-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.tab-stat-icon--accent  { background: rgba(227,72,36,0.08);  border: 1px solid rgba(227,72,36,0.15);  color: #E34824; }
.tab-stat-icon--success { background: rgba(5,150,105,0.08);  border: 1px solid rgba(5,150,105,0.15);  color: #059669; }
.tab-stat-icon--info    { background: rgba(8,145,178,0.08);  border: 1px solid rgba(8,145,178,0.15);  color: #0891b2; }
.tab-stat-icon--amber   { background: rgba(217,119,6,0.08);  border: 1px solid rgba(217,119,6,0.15);  color: #d97706; }

.tab-card--accent  .tab-card-header::before { background: #E34824; }
.tab-card--info    .tab-card-header::before { background: #0891b2; }

/* ----- Tabella ----- */

.tab-table thead th {
    background: #151515;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.7rem 1rem;
    border: none;
    white-space: nowrap;
}

.tab-table tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #EEEFF0;
    color: #151515;
    vertical-align: middle;
}

.tab-table tbody tr:last-child td {
    border-bottom: none;
}

.tab-table tbody tr:hover td {
    background: rgba(227,72,36,0.03);
}

.tab-table tbody tr.tab-row--highlight td {
    background: rgba(5,150,105,0.04);
}

.tab-table tbody tr.tab-row--highlight:hover td {
    background: rgba(5,150,105,0.07);
}

/* ----- Badge ----- */

/* Posizione graduatoria */
.tab-pos-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    min-width: 28px;
    padding: 0.2rem 0.45rem;
    font-size: 0.68rem;
    font-weight: 700;
    border-radius: 0;
    border: 1px solid transparent;
}

.tab-pos-badge--gold   { background: rgba(217,119,6,0.10);  border-color: rgba(217,119,6,0.25);  color: #d97706; }
.tab-pos-badge--silver { background: rgba(107,114,128,0.10); border-color: rgba(107,114,128,0.25); color: #6b7280; }
.tab-pos-badge--bronze { background: rgba(180,83,9,0.10);   border-color: rgba(180,83,9,0.25);   color: #b45309; }
.tab-pos-badge--other  { background: rgba(21,21,21,0.05);   border-color: rgba(21,21,21,0.15);   color: #6b7280; }

.tab-btn--accent {
    background: #E34824;
    border-color: #E34824;
    color: #fff;
}

.tab-btn--accent:hover {
    background: #c93d1e;
    border-color: #c93d1e;
    color: #fff;
    box-shadow: 0 2px 8px rgba(227,72,36,0.20);
}

.tab-btn--icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    border: 1px solid rgba(227,72,36,0.15);
    background: transparent;
    color: #E34824;
    border-radius: 0;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}

.tab-btn--icon:hover {
    background: rgba(227,72,36,0.06);
    border-color: #E34824;
    color: #E34824;
}

/* ----- Alert empty state ----- */

.tab-alert-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #151515;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-alert-body {
    font-size: 0.82rem;
    color: #6b7280;
    margin: 0;
}

@media (max-width: 575.98px) {
    .tab-field { flex-direction: column; gap: 0.15rem; }
    .tab-field-label { min-width: auto; }
}

/* ----- Scostamento offerta ----- */
.tab-scost-positive { font-size: 0.72rem; color: #dc2626; }
.tab-scost-negative { font-size: 0.72rem; color: #059669; }

/* ----- Responsive tabella ----- */
@media (max-width: 767.98px) {
    .tab-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .tab-table thead th,
    .tab-table tbody td { padding: 0.6rem 0.75rem; }
}

/* PARTECIPANTI LOTTO INDEX PAGE STYLES */

@media (max-width: 575.98px) {
    .pli-page { padding: 1rem; }
}

/* ----- Info Lotto banner ----- */
.pli-lotto-banner {
    background: #fff;
    border: 1px solid #e0e1e3;
    border-radius: 0;
    position: relative;
    overflow: hidden;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

.pli-lotto-banner::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: #E34824;
}

.pli-lotto-banner-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #151515;
    margin-bottom: 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pli-lotto-banner-title i { color: #E34824; }

.pli-lotto-meta-item {
    font-size: 0.83rem;
    color: #6b7280;
}

.pli-lotto-meta-item strong { color: #151515; font-weight: 600; }

/* ----- Alert TempData ----- */

.pli-alert-left { display: flex; align-items: center; gap: 0.5rem; }

.pli-toolbar-left {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.pli-toolbar-title {
    font-size: 1rem;
    font-weight: 700;
    color: #151515;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pli-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 0.4rem;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 0;
    border: 1px solid rgba(107,114,128,0.20);
    background: rgba(107,114,128,0.06);
    color: #6b7280;
}

/* ----- Tabella ----- */
.pli-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.pli-table thead th {
    background: #151515;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.7rem 1rem;
    border: none;
    white-space: nowrap;
}

.pli-table tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #EEEFF0;
    color: #151515;
    vertical-align: middle;
}

.pli-table tbody tr:last-child td { border-bottom: none; }

.pli-table tbody tr:hover td { background: rgba(227,72,36,0.03); }

@media (max-width: 767.98px) {
    .pli-table thead th,
    .pli-table tbody td { padding: 0.6rem 0.75rem; }
}

/* ----- Badge ----- */

/* ----- Link anagrafica inline ----- */
.pli-link-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #0891b2;
    text-decoration: none;
    border: 1px solid rgba(8,145,178,0.20);
    padding: 0.2rem 0.5rem;
    border-radius: 0;
    transition: background 0.15s, border-color 0.15s;
}

.pli-link-inline:hover {
    background: rgba(8,145,178,0.06);
    border-color: #0891b2;
    color: #0891b2;
}

.pli-btn-icon--info {
    border-color: rgba(8,145,178,0.15);
    color: #0891b2;
}

.pli-btn-icon--info:hover {
    background: rgba(8,145,178,0.06);
    border-color: #0891b2;
    color: #0891b2;
}

.pli-btn-icon--amber {
    border-color: rgba(217,119,6,0.15);
    color: #d97706;
}

.pli-btn-icon--amber:hover {
    background: rgba(217,119,6,0.06);
    border-color: #d97706;
    color: #d97706;
}

.pli-btn-icon--danger {
    border-color: rgba(220,38,38,0.15);
    color: #dc2626;
}

.pli-btn-icon--danger:hover {
    background: rgba(220,38,38,0.06);
    border-color: #dc2626;
    color: #dc2626;
}

.pli-btn--accent {
    background: #E34824;
    border-color: #E34824;
    color: #fff;
}

.pli-btn--accent:hover {
    background: #c93d1e;
    border-color: #c93d1e;
    color: #fff;
    box-shadow: 0 2px 8px rgba(227,72,36,0.20);
}

.pli-btn--secondary {
    background: transparent;
    color: #6b7280;
    border-color: #e0e1e3;
}

.pli-btn--secondary:hover {
    border-color: #151515;
    color: #151515;
}

/* ----- Empty state ----- */
.pli-empty {
    border-radius: 0;
    border: 1px solid #e0e1e3;
    border-left: 4px solid #0891b2;
    background: rgba(8,145,178,0.04);
    padding: 1.5rem 1.5rem;
    margin-bottom: 1.5rem;
}

.pli-empty-body {
    font-size: 0.83rem;
    color: #6b7280;
    margin: 0;
}

/* ----- Note troncate ----- */
.pli-note-truncate {
    font-size: 0.82rem;
    color: #6b7280;
    cursor: default;
}

/* ----- Footer ----- */
.pli-footer { margin-top: 0.5rem; }

/* ----- Valore offerta ----- */
.pli-amount {
    font-weight: 700;
    color: #059669;
}

/* PARTECIPANTI LOTTO > CREATE PAGE STYLES */

@media (max-width: 575.98px) {
    .plc-page { padding: 1rem; }
}

/* ----- Header ----- */
.plc-header {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 1.75rem;
}

.plc-title-icon {
    width: 34px;
    height: 34px;
    background: rgba(5,150,105,0.08);
    border: 1px solid rgba(5,150,105,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #059669;
    font-size: 1rem;
    margin-top: 0.15rem;
}

.plc-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: #151515;
    letter-spacing: -0.025em;
    margin: 0 0 0.25rem;
    line-height: 1.2;
}

.plc-subtitle {
    font-size: 0.82rem;
    color: #6b7280;
    margin: 0;
}

.plc-subtitle strong {
    color: #151515;
    font-weight: 600;
}

.plc-card--green .plc-card-header::before  { background: #059669; }
.plc-card--info  .plc-card-header::before  { background: #0891b2; }

.plc-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #151515;
    margin-bottom: 0.4rem;
}

.plc-label .plc-required { color: #dc2626; }
.plc-label .plc-optional { color: #9ca3af; font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 0.75rem; }

.plc-input,
.plc-select,
.plc-textarea {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    color: #151515;
    background: #fff;
    border: 1px solid #e0e1e3;
    border-radius: 0;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.plc-input:focus,
.plc-select:focus,
.plc-textarea:focus {
    outline: none;
    border-color: #E34824;
    box-shadow: 0 0 0 0.2rem rgba(227,72,36,0.12);
}

.plc-input[readonly],
.plc-input:disabled {
    background: #EEEFF0;
    color: #6b7280;
}

.plc-textarea { resize: vertical; min-height: 100px; }

/* ----- Separatore form ----- */

/* ----- Checkbox / Switch ----- */
.plc-check-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.plc-check-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #151515;
    cursor: pointer;
}

.plc-check-input {
    width: 1rem;
    height: 1rem;
    border: 1px solid #e0e1e3;
    border-radius: 0;
    accent-color: #E34824;
    cursor: pointer;
    flex-shrink: 0;
}

/* ----- Info box sidebar ----- */
.plc-info-section {
    margin-bottom: 1.1rem;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid #EEEFF0;
}

.plc-info-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.plc-info-heading {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    margin-bottom: 0.4rem;
}

.plc-info-text {
    font-size: 0.82rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.plc-info-text strong { color: #151515; font-weight: 600; }

.plc-info-list {
    font-size: 0.82rem;
    color: #6b7280;
    padding-left: 1.1rem;
    margin: 0;
    line-height: 1.6;
}

.plc-info-warning {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: #dc2626;
    background: rgba(220,38,38,0.04);
    border-left: 3px solid #dc2626;
    padding: 0.5rem 0.75rem;
    margin: 0;
}

.plc-info-warning strong { font-weight: 600; }

/* ----- Bottoni ----- */

/* ----- Layout responsive ----- */
.plc-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 992px) {
    .plc-row { grid-template-columns: 1fr 340px; }
}

.plc-flags-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 575.98px) {
    .plc-flags-row { grid-template-columns: 1fr; }
}

/* Sidebar sticky */
.plc-sidebar {
    position: sticky;
    top: 72px;
    z-index: 10;
    align-self: start;
}

@media (max-width: 991.98px) {
    .plc-sidebar { position: static; }
}

/* PARTECIPANTI LOTTO > DETAILS PAGE STYLES */

@media (max-width: 575.98px) {
    .pld-page { padding: 1rem; }
}

/* ----- Header ----- */
.pld-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

.pld-title-icon {
    width: 34px;
    height: 34px;
    background: rgba(227,72,36,0.08);
    border: 1px solid rgba(227,72,36,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #E34824;
    font-size: 1rem;
    margin-top: 0.15rem;
}

.pld-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: #151515;
    letter-spacing: -0.025em;
    margin: 0 0 0.4rem;
    line-height: 1.2;
}

/* ----- Badge ----- */

/* ----- Alert TempData ----- */

.pld-alert-left { display: flex; align-items: center; gap: 0.5rem; }

/* ----- Layout ----- */
.pld-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 992px) {
    .pld-row { grid-template-columns: 1fr 300px; }
}

.pld-card--accent  .pld-card-header::before { background: #E34824; }
.pld-card--gray    .pld-card-header::before { background: #6b7280; }
.pld-card--neutral .pld-card-header::before { background: #e0e1e3; }

@media (max-width: 991.98px) {
    .pld-field { flex-direction: column; gap: 0.15rem; }
    .pld-field-label { width: auto; }
}

/* ----- Separatore ----- */

/* ----- Offerta valore grande ----- */
.pld-amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: #059669;
    letter-spacing: -0.02em;
}

/* ----- Note box ----- */

/* ----- Sidebar sticky ----- */
.pld-sidebar {
    position: sticky;
    top: 72px;
    z-index: 10;
    align-self: start;
}

@media (max-width: 991.98px) {
    .pld-sidebar { position: static; }
}

/* ----- Audit (sistema) ----- */

.pld-sys-item:last-child { margin-bottom: 0; }

.pld-sys-mono {
    font-size: 0.72rem;
    color: #9ca3af;
    font-family: monospace;
    word-break: break-all;
}

/* Bottoni outline sidebar (azioni rapide) */
.pld-btn--outline-gray {
    background: transparent;
    border: 1px solid rgba(107,114,128,0.20);
    color: #6b7280;
    font-size: 0.82rem;
    padding: 0.4rem 0.8rem;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.15s, border-color 0.15s;
    width: 100%;
    justify-content: flex-start;
}

.pld-btn--outline-gray:hover {
    background: rgba(107,114,128,0.04);
    border-color: #6b7280;
    color: #151515;
}

.pld-btn--outline-info {
    background: transparent;
    border: 1px solid rgba(8,145,178,0.20);
    color: #0891b2;
    font-size: 0.82rem;
    padding: 0.4rem 0.8rem;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.15s, border-color 0.15s;
    width: 100%;
    justify-content: flex-start;
}

.pld-btn--outline-info:hover {
    background: rgba(8,145,178,0.04);
    border-color: #0891b2;
    color: #0891b2;
}

.pld-btn--full-amber {
    background: #d97706;
    border: 2px solid #d97706;
    color: #fff;
    font-size: 0.85rem;
    padding: 0.55rem 1rem;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.15s, border-color 0.15s;
    width: 100%;
    justify-content: flex-start;
}

.pld-btn--full-amber:hover {
    background: #b45309;
    border-color: #b45309;
    color: #fff;
}

.pld-btn--full-danger {
    background: #dc2626;
    border: 2px solid #dc2626;
    color: #fff;
    font-size: 0.85rem;
    padding: 0.55rem 1rem;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.15s, border-color 0.15s;
    width: 100%;
    justify-content: flex-start;
}

.pld-btn--full-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    color: #fff;
}

/* ----- Footer torna lista ----- */
.pld-footer { margin-top: 1.5rem; }

/* PARTECIPANTI LOTTO > EDIT PAGE STYLES */

/* Title icon (variante amber 34x34 nel header) */
.ple-title-icon {
    width: 34px;
    height: 34px;
    background: rgba(217,119,6,0.08);
    border: 1px solid rgba(217,119,6,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #d97706;
    font-size: 1rem;
    margin-right: 0.5rem;
}

/* ----- Layout ----- */
.ple-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 992px) {
    .ple-row { grid-template-columns: 1fr 300px; }
}

.ple-card--amber   .ple-card-header::before { background: #d97706; }
.ple-card--info    .ple-card-header::before { background: #0891b2; }
.ple-card--neutral .ple-card-header::before { background: #e0e1e3; }

.ple-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #151515;
    margin-bottom: 0.4rem;
}

.ple-label .ple-required { color: #dc2626; }
.ple-label .ple-optional { color: #9ca3af; font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 0.75rem; }

.ple-input,
.ple-select,
.ple-textarea {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    color: #151515;
    background: #fff;
    border: 1px solid #e0e1e3;
    border-radius: 0;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.ple-input:focus,
.ple-select:focus,
.ple-textarea:focus {
    outline: none;
    border-color: #E34824;
    box-shadow: 0 0 0 0.2rem rgba(227,72,36,0.12);
}

.ple-input[readonly],
.ple-input:disabled {
    background: #EEEFF0;
    color: #6b7280;
}

.ple-textarea { resize: vertical; min-height: 100px; }

/* ----- Separatore form ----- */

/* ----- Checkbox ----- */
.ple-flags-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 575.98px) {
    .ple-flags-row { grid-template-columns: 1fr; }
}

.ple-check-group { display: flex; flex-direction: column; gap: 0.35rem; }

.ple-check-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #151515;
    cursor: pointer;
}

.ple-check-input {
    width: 1rem;
    height: 1rem;
    border: 1px solid #e0e1e3;
    border-radius: 0;
    accent-color: #E34824;
    cursor: pointer;
    flex-shrink: 0;
}

/* ----- Sidebar ----- */
.ple-sidebar {
    position: sticky;
    top: 72px;
    z-index: 10;
    align-self: start;
}

@media (max-width: 991.98px) {
    .ple-sidebar { position: static; }
}

/* ----- Info sidebar ----- */
.ple-info-section {
    margin-bottom: 1.1rem;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid #EEEFF0;
}

.ple-info-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.ple-info-heading {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    margin-bottom: 0.4rem;
}

.ple-info-text {
    font-size: 0.82rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.ple-info-text strong { color: #151515; font-weight: 600; }

.ple-info-list {
    font-size: 0.82rem;
    color: #6b7280;
    padding-left: 1.1rem;
    margin: 0;
    line-height: 1.6;
}

.ple-info-warning {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: #dc2626;
    background: rgba(220,38,38,0.04);
    border-left: 3px solid #dc2626;
    padding: 0.5rem 0.75rem;
    margin: 0;
}

.ple-info-warning strong { font-weight: 600; }

/* ----- Audit ----- */

.ple-sys-item:last-child { margin-bottom: 0; }

/* ----- Bottoni ----- */
/* PARTECIPANTI LOTTO > DELETE PAGE STYLES */

@media (max-width: 575.98px) {
    .pldel-page { padding: 1rem; }
}

/* ----- Alert pericolo banner ----- */
.pldel-danger-banner {
    border-radius: 0;
    border: 1px solid rgba(220,38,38,0.20);
    border-left: 4px solid #dc2626;
    background: rgba(220,38,38,0.04);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}

.pldel-danger-banner-icon {
    color: #dc2626;
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 0.05rem;
}

.pldel-danger-banner-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #dc2626;
    margin-bottom: 0.25rem;
}

.pldel-danger-banner-body {
    font-size: 0.85rem;
    color: #151515;
    margin: 0;
}

/* ----- Header ----- */
.pldel-header {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 1.75rem;
}

.pldel-title-icon {
    width: 34px;
    height: 34px;
    background: rgba(220,38,38,0.08);
    border: 1px solid rgba(220,38,38,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #dc2626;
    font-size: 1rem;
    margin-top: 0.15rem;
}

.pldel-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: #dc2626;
    letter-spacing: -0.025em;
    margin: 0;
    line-height: 1.2;
}

/* ----- Alert TempData errore ----- */
.pldel-alert-error {
    border-radius: 0;
    border: 1px solid #e0e1e3;
    border-left: 4px solid #dc2626;
    background: rgba(220,38,38,0.04);
    padding: 0.85rem 1.25rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: #151515;
}

.pldel-alert-left { display: flex; align-items: center; gap: 0.5rem; }

/* ----- Layout ----- */
.pldel-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 992px) {
    .pldel-row { grid-template-columns: 1fr 300px; }
}

.pldel-card--danger  .pldel-card-header::before { background: #dc2626; }
.pldel-card--neutral .pldel-card-header::before { background: #e0e1e3; }
.pldel-card--info    .pldel-card-header::before { background: #0891b2; }

@media (max-width: 991.98px) {
    .pldel-field { flex-direction: column; gap: 0.15rem; }
    .pldel-field-label { width: auto; }
}

/* ----- Separatore ----- */

/* ----- Sezione sub-heading ----- */
.pldel-section-heading {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    margin-bottom: 0.75rem;
}

/* ----- Badge ----- */

/* ----- Nota soft-delete ----- */

/* ----- Bottoni ----- */

/* Bottoni outline sidebar */
.pldel-btn--outline-amber {
    background: transparent;
    border: 1px solid rgba(217,119,6,0.20);
    color: #d97706;
    font-size: 0.82rem;
    padding: 0.4rem 0.8rem;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.15s, border-color 0.15s;
    width: 100%;
    justify-content: flex-start;
}

.pldel-btn--outline-amber:hover {
    background: rgba(217,119,6,0.06);
    border-color: #d97706;
    color: #d97706;
}

.pldel-btn--outline-info {
    background: transparent;
    border: 1px solid rgba(8,145,178,0.20);
    color: #0891b2;
    font-size: 0.82rem;
    padding: 0.4rem 0.8rem;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.15s, border-color 0.15s;
    width: 100%;
    justify-content: flex-start;
}

.pldel-btn--outline-info:hover {
    background: rgba(8,145,178,0.04);
    border-color: #0891b2;
    color: #0891b2;
}

/* ----- Sidebar sticky ----- */
.pldel-sidebar {
    position: sticky;
    top: 72px;
    z-index: 10;
    align-self: start;
}

@media (max-width: 991.98px) {
    .pldel-sidebar { position: static; }
}

/* ----- Warning conseguenze ----- */
.pldel-consequences {
    border-radius: 0;
    border: 1px solid rgba(217,119,6,0.20);
    border-left: 4px solid #d97706;
    background: rgba(217,119,6,0.04);
    padding: 0;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.pldel-consequences-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(217,119,6,0.15);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #d97706;
}

.pldel-consequences-list {
    padding: 0.85rem 1rem 0.85rem 2rem;
    margin: 0;
    font-size: 0.82rem;
    color: #6b7280;
    line-height: 1.7;
}

/* ----- Audit ----- */

.pldel-sys-item:last-child { margin-bottom: 0; }

/* ----- Alternative actions ----- */
.pldel-alt-text {
    font-size: 0.82rem;
    color: #6b7280;
    margin-bottom: 0.85rem;
}

.pldel-alt-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* PREVENTIVI > CREATE PAGE STYLES */

.pc-section-title { font-size: 0.85rem; font-weight: 700; color: #151515; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.4rem; }
.pc-section-title i { color: #E34824; }
.pc-lotto-info { background: rgba(8,145,178,0.04); border: 1px solid rgba(8,145,178,0.15); padding: 1rem 1.25rem; margin-bottom: 1.5rem; display: flex; gap: 2rem; flex-wrap: wrap; }
.pc-lotto-info strong { font-size: 0.82rem; color: #151515; }
.pc-lotto-info span { font-size: 0.82rem; color: #6b7280; }

/* PREVENTIVI > DETAILS PAGE STYLES */

/* (pd-page/breadcrumb rimossi, usano cb-page/breadcrumb) */

.pd-field-value--lg { font-size: 1.1rem; }
.pd-field-value--muted { color: #9ca3af; font-weight: 400; }
.pd-btn-outline { background: transparent; border-color: rgba(227,72,36,0.2); color: #E34824; font-size: 0.82rem; padding: 0.4rem 0.8rem; }
.pd-btn-outline:hover { border-color: #E34824; background: rgba(227,72,36,0.04); color: #E34824; }
.pd-note { background: rgba(8,145,178,0.04); border: 1px solid rgba(8,145,178,0.12); padding: 0.75rem 1rem; font-size: 0.85rem; color: #151515; }
.pd-doc-row { display: flex; align-items: center; gap: 1rem; }
.pd-doc-row .pd-doc-info { flex: 1; }
.pd-doc-row .pd-doc-info h3 { font-size: 0.9rem; font-weight: 600; color: #151515; margin: 0 0 0.1rem; }
.pd-doc-row .pd-doc-info small { font-size: 0.72rem; color: #9ca3af; }
.pd-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid #EEEFF0; flex-wrap: wrap; gap: 0.5rem; }
@media (max-width: 991.98px) { .pd-sticky { position: static; } .pd-header { flex-direction: column; } }

/* PREVENTIVI > EDIT PAGE STYLES */

.pe-section-title { font-size: 0.85rem; font-weight: 700; color: #151515; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.4rem; }
.pe-section-title i { color: #E34824; }
.pe-lotto-info { background: rgba(8,145,178,0.04); border: 1px solid rgba(8,145,178,0.15); padding: 1rem 1.25rem; margin-bottom: 1.5rem; display: flex; gap: 2rem; flex-wrap: wrap; }
.pe-lotto-info strong { font-size: 0.82rem; color: #151515; }
.pe-lotto-info span { font-size: 0.82rem; color: #6b7280; }
.pe-doc-alert { border-radius: 0; border: 1px solid #e0e1e3; padding: 0.85rem 1.25rem; font-size: 0.85rem; display: flex; align-items: center; gap: 0.75rem; }
.pe-doc-alert--info { background: rgba(8,145,178,0.04); border-left: 4px solid #0891b2; }
.pe-doc-alert--info i { color: #0891b2; font-size: 1.5rem; }
.pe-doc-alert--secondary { background: #EEEFF0; border-left: 4px solid #6b7280; }
.pe-doc-alert--secondary i { color: #6b7280; }

/* PROFILE INDEX PAGE STYLES */

/* Btn outline (locale: usato in security section) */
.p-btn-outline {
    background: transparent;
    color: #E34824;
    border: 2px solid #E34824;
    padding: 0.55rem 1.5rem;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 0;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
}
.p-btn-outline:hover {
    background: #E34824;
    color: #fff;
}

/* Card header */
.p-card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e0e1e3;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.p-card-header-icon {
    width: 36px;
    height: 36px;
    background: rgba(227,72,36,0.08);
    border: 1px solid rgba(227,72,36,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.p-card-header-icon svg { color: #E34824; }
.p-card-header h2 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #151515;
    margin: 0;
}
.p-card-body { padding: 1.5rem; }

/* Field rows */
.p-field {
    padding: 0.85rem 0;
    border-bottom: 1px solid #EEEFF0;
    display: flex;
    gap: 1rem;
}
.p-field:last-child { border-bottom: none; }
.p-field-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    min-width: 140px;
    padding-top: 0.1rem;
    flex-shrink: 0;
}
.p-field-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: #151515;
    flex: 1;
}
.p-field-empty {
    color: #9ca3af;
    font-style: italic;
}

/* Accent bar */
.p-accent-bar {
    width: 4px;
    background: #E34824;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
}

/* Security section */
.p-security-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.p-security-text p {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0;
}

@media (max-width: 575.98px) {
    .p-field { flex-direction: column; gap: 0.2rem; }
    .p-field-label { min-width: auto; }
}

/* PROFILE > EDIT PAGE STYLES */

.pfe-card-header-icon {
    width: 36px;
    height: 36px;
    background: rgba(227,72,36,0.08);
    border: 1px solid rgba(227,72,36,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pfe-card-header-icon svg { color: #E34824; }
.pfe-card-header h2 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #151515;
    margin: 0;
}

/* Form styling */
.pfe-form .form-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #151515;
    margin-bottom: 0.35rem;
}
.pfe-form .form-control,
.pfe-form .form-select {
    border-radius: 0;
    border: 1px solid #e0e1e3;
    font-size: 0.9rem;
    padding: 0.6rem 0.85rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.pfe-form .form-control:focus,
.pfe-form .form-select:focus {
    border-color: #E34824;
    box-shadow: 0 0 0 0.2rem rgba(227,72,36,0.12);
}
.pfe-form .form-text {
    font-size: 0.75rem;
    color: #9ca3af;
}
.pfe-form .text-danger {
    font-size: 0.75rem;
}

/* Note box */
.pfe-note {
    background: #EEEFF0;
    border: 1px solid #e0e1e3;
    border-left: 4px solid #E34824;
    border-radius: 0;
    padding: 1rem 1.25rem;
    font-size: 0.8rem;
    color: #6b7280;
}
.pfe-note strong { color: #151515; }

/* PROFILE > ChangePassword PAGE STYLES */

.pcp-header { margin-bottom: 2rem; }
.pcp-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #151515;
    margin: 0 0 0.25rem;
}
.pcp-header p {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0;
}

.pcp-card-header-icon {
    width: 36px;
    height: 36px;
    background: rgba(227,72,36,0.08);
    border: 1px solid rgba(227,72,36,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pcp-card-header-icon svg { color: #E34824; }
.pcp-card-header h2 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #151515;
    margin: 0;
}

/* Form */
.pcp-form .form-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #151515;
    margin-bottom: 0.35rem;
}
.pcp-form .form-control {
    border-radius: 0;
    border: 1px solid #e0e1e3;
    font-size: 0.9rem;
    padding: 0.6rem 0.85rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.pcp-form .form-control:focus {
    border-color: #E34824;
    box-shadow: 0 0 0 0.2rem rgba(227,72,36,0.12);
}
.pcp-form .text-danger { font-size: 0.75rem; }

/* Requirements box */
.pcp-requirements {
    background: #EEEFF0;
    border: 1px solid #e0e1e3;
    border-left: 4px solid #E34824;
    border-radius: 0;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}
.pcp-requirements h3 {
    font-size: 0.8rem;
    font-weight: 700;
    color: #151515;
    margin: 0 0 0.5rem;
}
.pcp-requirements ul {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 0.8rem;
    color: #6b7280;
}
.pcp-requirements li { margin-bottom: 0.15rem; }

/* Tips card */
.pcp-tips {
    background: #fff;
    border: 1px solid #e0e1e3;
    border-radius: 0;
    padding: 1.25rem 1.5rem;
}
.pcp-tips h3 {
    font-size: 0.8rem;
    font-weight: 700;
    color: #151515;
    margin: 0 0 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.pcp-tips h3 svg { color: #E34824; }
.pcp-tips ul {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 0.8rem;
    color: #6b7280;
}
.pcp-tips li { margin-bottom: 0.15rem; }

/* REGISTRO CONTRATTI > ALLEGATO DETAILS PAGE STYLES */

.ra-page-meta { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; font-size: 0.82rem; color: var(--cb-gray); }
.ra-page-meta .ra-sep { color: var(--cb-muted); }

/* Alerts */

/* Toast replacement */
.ra-toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 2000; display: flex; flex-direction: column; gap: 0.5rem; }
.ra-toast { border-radius: 0; border: 1px solid; padding: 0.75rem 1rem; font-size: 0.85rem; display: flex; align-items: center; gap: 0.5rem; min-width: 280px; box-shadow: 0 4px 16px rgba(21,21,21,0.12); animation: raSlideIn 0.2s ease; }
.ra-toast-close { margin-left: auto; background: none; border: none; cursor: pointer; color: var(--cb-muted); flex-shrink: 0; }
.ra-toast-close:hover { color: var(--cb-dark); }
@keyframes raSlideIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Badges */

/* Preview area */
.ra-preview-frame { width: 100%; height: 600px; border: none; display: block; }
.ra-preview-img-wrap { text-align: center; padding: 2rem; background: var(--cb-light); }
.ra-preview-img { max-height: 600px; max-width: 100%; cursor: zoom-in; border: 1px solid var(--cb-border); }
.ra-preview-hint { font-size: 0.72rem; color: var(--cb-muted); margin-top: 0.5rem; }
.ra-no-preview { text-align: center; padding: 4rem 2rem; }
.ra-no-preview-icon { font-size: 5rem; opacity: 0.3; margin-bottom: 1rem; }
.ra-no-preview-title { font-size: 1rem; font-weight: 600; color: var(--cb-gray); margin-bottom: 0.5rem; }
.ra-no-preview-sub { font-size: 0.82rem; color: var(--cb-muted); margin-bottom: 1.5rem; }

/* Descrizione inline edit */
.ra-desc-text { font-size: 0.85rem; color: var(--cb-dark); margin: 0; line-height: 1.6; }
.ra-desc-empty { font-size: 0.85rem; color: var(--cb-muted); font-style: italic; margin: 0; }
.ra-edit-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; }

/* Info list (sidebar) */
.ra-info-key { color: var(--cb-gray); flex-shrink: 0; white-space: nowrap; }
.ra-info-val { color: var(--cb-dark); font-weight: 500; text-align: right; word-break: break-all; }
.ra-info-code { font-size: 0.72rem; font-family: monospace; background: var(--cb-light); padding: 0.1rem 0.35rem; color: var(--cb-gray); }

/* Registro ref */
.ra-ref-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--cb-gray); display: block; margin-bottom: 0.2rem; }
.ra-ref-link { font-size: 0.85rem; font-weight: 600; color: var(--cb-accent); text-decoration: none; }
.ra-ref-link:hover { color: var(--cb-accent-hover); text-decoration: underline; }
.ra-ref-val { font-size: 0.85rem; color: var(--cb-dark); }
.ra-ref-item { margin-bottom: 0.85rem; }
.ra-ref-item:last-child { margin-bottom: 0; }

.ra-btn-block { width: 100%; justify-content: center; }

/* Sidebar action stack */
.ra-action-stack { display: flex; flex-direction: column; gap: 0.5rem; }

.ra-modal { background: var(--cb-white); border: 1px solid var(--cb-border); border-radius: 0; width: 100%; max-width: 520px; overflow: hidden; }
.ra-modal-header--danger::before { background: var(--cb-danger); }

/* Image modal full */
.ra-img-modal-backdrop { position: fixed; inset: 0; background: rgba(21,21,21,0.9); z-index: 1600; display: none; align-items: center; justify-content: center; padding: 1rem; }
.ra-img-modal-backdrop.active { display: flex; }
.ra-img-modal { max-width: 95vw; max-height: 95vh; position: relative; }
.ra-img-modal img { max-width: 95vw; max-height: 90vh; display: block; border: none; }
.ra-img-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 0; margin-bottom: 0.5rem; }
.ra-img-modal-title { font-size: 0.85rem; font-weight: 600; color: #fff; margin: 0; }
.ra-img-modal-close { background: none; border: 1px solid rgba(255,255,255,0.3); cursor: pointer; color: #fff; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 0; }
.ra-img-modal-close:hover { background: rgba(255,255,255,0.1); }

@media (max-width: 991.98px) { .ra-sidebar-sticky { position: static; } }

/* REGISTRO CONTRATTI > _FILTERPARTIAL PAGE STYLES */

.rf-toggle-btn { background: none; border: 1px solid #e0e1e3; cursor: pointer; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: #6b7280; border-radius: 0; transition: background 0.15s, border-color 0.15s; }
.rf-toggle-btn:hover { background: #f3f4f6; border-color: #e0e1e3; color: #6b7280; }
.rf-toggle-btn i { transition: transform 0.2s ease; }
.rf-toggle-btn.collapsed i { transform: rotate(-90deg); }

/* Collapse body */
.rf-body { padding: 1.5rem; padding-left: calc(1.5rem + 4px); }
.rf-body.closed { display: none; }
.rf-body.open { display: block; }

/* Form elements */
.rf-label { display: block; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7280; margin-bottom: 0.3rem; }

/* Grid */
.rf-grid { display: grid; gap: 0.85rem; }
.rf-grid--4 { grid-template-columns: repeat(4, 1fr); }
.rf-grid--main { grid-template-columns: 2fr 1fr 1.5fr 1.5fr; }
.rf-grid--row2  { grid-template-columns: 1.5fr 1.5fr 1fr 1fr; }

/* Divider */

/* Filtri rapidi */
.rf-quick-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #9ca3af; white-space: nowrap; }
.rf-quick-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.rf-quick-sep { width: 1px; height: 20px; background: #e0e1e3; flex-shrink: 0; }

/* Date section toggle */
.rf-section-toggle { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; font-weight: 600; color: #6b7280; background: none; border: none; cursor: pointer; padding: 0; text-decoration: none; transition: color 0.15s; }
.rf-section-toggle:hover { color: #E34824; }
.rf-section-toggle i.rf-chevron { transition: transform 0.2s ease; }
.rf-section-toggle.open i.rf-chevron { transform: rotate(180deg); }
.rf-date-body { margin-top: 0.75rem; }
.rf-date-body.closed { display: none; }
.rf-date-body.open { display: block; }

/* Footer buttons */
.rf-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 1rem; border-top: 1px solid #EEEFF0; margin-top: 1rem; }

@media (max-width: 991.98px) {
    .rf-grid--main { grid-template-columns: 1fr 1fr; }
    .rf-grid--row2  { grid-template-columns: 1fr 1fr; }
    .rf-grid--4     { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 575.98px) {
    .rf-grid--main { grid-template-columns: 1fr; }
    .rf-grid--row2  { grid-template-columns: 1fr; }
    .rf-grid--4     { grid-template-columns: 1fr; }
    .rf-quick-row   { gap: 0.5rem; }
}

/* REGISTRO CONTRATTI > UPLOAD PAGE STYLES */

/* Alerts */

/* Context info box */
.ru-context-box {
    background: var(--cb-white); border: 1px solid var(--cb-border);
    border-left: 4px solid var(--cb-cyan);
    padding: 1rem 1.25rem; margin-bottom: 1.5rem;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.ru-context-title { font-size: 0.9rem; font-weight: 600; color: var(--cb-dark); margin: 0 0 0.2rem 0; }
.ru-context-sub   { font-size: 0.75rem; color: var(--cb-muted); }
.ru-context-code  { font-size: 0.72rem; font-family: monospace; background: var(--cb-light); padding: 0.1rem 0.3rem; color: var(--cb-gray); }

/* Badge */

/* Form */

/* Dropzone */
.ru-dropzone {
    border: 2px dashed var(--cb-border); padding: 2.5rem 1.5rem;
    text-align: center; cursor: pointer; background: var(--cb-white);
    transition: border-color 0.2s ease, background 0.2s ease;
}
.ru-dropzone:hover, .ru-dropzone.dragover {
    border-color: var(--cb-accent);
    background: rgba(227,72,36,0.02);
}
.ru-dropzone.has-file {
    border-color: var(--cb-green);
    background: rgba(5,150,105,0.02);
    border-style: solid;
}
.ru-dropzone-icon { font-size: 2.5rem; color: var(--cb-muted); }
.ru-dropzone.has-file .ru-dropzone-icon { color: var(--cb-green); }
.ru-dropzone-text { font-size: 0.85rem; color: var(--cb-gray); margin: 0.75rem 0 0.4rem 0; }
.ru-dropzone-link { color: var(--cb-accent); font-weight: 600; text-decoration: none; cursor: pointer; }
.ru-dropzone-link:hover { color: var(--cb-accent-hover); text-decoration: underline; }

/* Info list */
.ru-info-strong { font-weight: 600; color: var(--cb-dark); }

.ru-btn-icon--secondary { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 0; border: 1px solid rgba(107,114,128,0.2); color: var(--cb-gray); background: transparent; text-decoration: none; transition: background 0.15s, border-color 0.15s; flex-shrink: 0; }
.ru-btn-icon--secondary:hover { background: rgba(107,114,128,0.06); border-color: var(--cb-gray); color: var(--cb-gray); }

/* Form section footer */
.ru-form-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 1.25rem; border-top: 1px solid var(--cb-light); }

/* Responsive */
@media (max-width: 991.98px) { .ru-sidebar-sticky { position: static; } }

/* REGISTRO CONTRATTI > UPLOADMULTIPLO PAGE STYLES */

/* Alerts */

/* Inline validation alert (JS) */
.rm-validation-alert { border-radius: 0; border: 1px solid rgba(220,38,38,0.2); border-left: 4px solid var(--cb-danger); background: rgba(220,38,38,0.04); padding: 0.75rem 1rem; font-size: 0.82rem; color: var(--cb-danger); display: none; margin-bottom: 1rem; }

/* Context box */
.rm-context-box { background: var(--cb-white); border: 1px solid var(--cb-border); border-left: 4px solid var(--cb-cyan); padding: 1rem 1.25rem; margin-bottom: 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.rm-context-title { font-size: 0.9rem; font-weight: 600; color: var(--cb-dark); margin: 0 0 0.2rem 0; }
.rm-context-sub   { font-size: 0.75rem; color: var(--cb-muted); }
.rm-context-code  { font-size: 0.72rem; font-family: monospace; background: var(--cb-light); padding: 0.1rem 0.3rem; color: var(--cb-gray); }

/* Badge */

/* Form */
.rm-validation { font-size: 0.72rem; color: var(--cb-danger); margin-top: 0.25rem; display: block; }

/* Dropzone */
.rm-dropzone {
    border: 2px dashed var(--cb-border); min-height: 150px; padding: 2.5rem 1.5rem;
    text-align: center; cursor: pointer; background: var(--cb-white);
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.rm-dropzone:hover, .rm-dropzone.dragover { border-color: var(--cb-accent); background: rgba(227,72,36,0.02); }
.rm-dropzone.has-files { border-color: var(--cb-green); background: rgba(5,150,105,0.02); border-style: solid; }
.rm-dropzone-icon { font-size: 2.5rem; color: var(--cb-muted); }
.rm-dropzone.has-files .rm-dropzone-icon { color: var(--cb-green); }
.rm-dropzone-text { font-size: 0.85rem; color: var(--cb-gray); margin: 0.75rem 0 0.4rem 0; }
.rm-dropzone-link { color: var(--cb-accent); font-weight: 600; text-decoration: none; cursor: pointer; }
.rm-dropzone-link:hover { color: var(--cb-accent-hover); text-decoration: underline; }

/* Files list */
.rm-files-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.rm-files-header-label { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--cb-gray); }
.rm-files-list { border: 1px solid var(--cb-border); }
.rm-file-remove { background: none; border: 1px solid rgba(220,38,38,0.2); color: var(--cb-danger); width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 0; cursor: pointer; flex-shrink: 0; transition: background 0.15s, border-color 0.15s; }
.rm-file-remove:hover { background: rgba(220,38,38,0.08); border-color: var(--cb-danger); }

/* Files footer */
.rm-files-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 0.6rem; font-size: 0.75rem; color: var(--cb-muted); }

/* Form footer */
.rm-form-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 1.25rem; border-top: 1px solid var(--cb-light); }

/* Link alternativo */
.rm-alt-link { text-align: center; font-size: 0.82rem; color: var(--cb-gray); margin-top: 0.75rem; }
.rm-alt-link a { color: var(--cb-accent); font-weight: 600; text-decoration: none; }
.rm-alt-link a:hover { color: var(--cb-accent-hover); text-decoration: underline; }

/* Sidebar allegati */

/* Limits table */
.rm-limits-item { display: flex; justify-content: space-between; align-items: center; padding: 0.55rem 0; border-bottom: 1px solid var(--cb-light); font-size: 0.82rem; }
.rm-limits-item:last-child { border-bottom: none; padding-bottom: 0; }
.rm-limits-val { font-weight: 700; color: var(--cb-dark); }
.rm-ext-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.5rem; }

/* Tips list */
.rm-tips-item { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.82rem; color: var(--cb-gray); padding: 0.4rem 0; border-bottom: 1px solid var(--cb-light); }
.rm-tips-item:last-child { border-bottom: none; }
.rm-tips-item i { flex-shrink: 0; margin-top: 0.1rem; }

.rm-btn-accent:disabled { opacity: 0.5; cursor: not-allowed; }
.rm-btn-icon--secondary { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 0; border: 1px solid rgba(107,114,128,0.2); color: var(--cb-gray); background: transparent; text-decoration: none; transition: background 0.15s, border-color 0.15s; flex-shrink: 0; }
.rm-btn-icon--secondary:hover { background: rgba(107,114,128,0.06); border-color: var(--cb-gray); color: var(--cb-gray); }

@media (max-width: 991.98px) { .rm-sidebar-sticky { position: static; } }

/* REPARTI > CREATE PAGE STYLES */

/* —— Page Icon (locale: 42px green) —— */
.rptc-page-icon {
    width: 42px; height: 42px; flex-shrink: 0;
    background: rgba(5,150,105,0.08); border: 1px solid rgba(5,150,105,0.15);
    display: flex; align-items: center; justify-content: center;
}

/* —— Layout —— */
.rptc-layout { display: grid; grid-template-columns: 1fr 300px; gap: 1.5rem; align-items: start; }

/* —— Card header (locale: variant green/cyan) —— */

/* —— Validation —— */
.rptc-validation {
    border-radius: 0; border: 1px solid var(--cb-border);
    border-left: 4px solid var(--cb-danger); background: rgba(220,38,38,0.04);
    padding: 0.85rem 1.25rem; font-size: 0.85rem; margin-bottom: 1.25rem; color: var(--cb-danger);
}

/* —— Form —— */
.rptc-form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; margin-bottom: 1rem; }
.rptc-form-row { margin-bottom: 0.85rem; }
.rptc-input, .rptc-textarea {
    width: 100%; border: 1px solid var(--cb-border); font-size: 0.85rem; color: var(--cb-dark);
    padding: 0.5rem 0.75rem; border-radius: 0; background: var(--cb-white);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.rptc-input:focus, .rptc-textarea:focus {
    outline: none; border-color: var(--cb-accent); box-shadow: 0 0 0 0.2rem rgba(227,72,36,0.12);
}
.rptc-textarea { resize: vertical; min-height: 90px; }

/* —— Info sidebar —— */
.rptc-info-card { position: sticky; top: 72px; }
.rptc-info-body { padding: 1.25rem 1.5rem 1.25rem 1.75rem; }
.rptc-info-box {
    background: rgba(8,145,178,0.04); border-left: 3px solid var(--cb-cyan);
    padding: 0.65rem 0.85rem; font-size: 0.82rem; color: var(--cb-gray); margin-bottom: 1rem;
}

/* —— Responsive —— */
@media (max-width: 991.98px) {
    .rptc-layout { grid-template-columns: 1fr; }
    .rptc-info-card { position: static; }
}
@media (max-width: 575.98px) {
    .rptc-form-2col { grid-template-columns: 1fr; }
}

/* REPARTI > DETAILS PAGE STYLES */
/* —— Alerts —— */

/* —— Layout —— */
.rpd-layout { display: grid; grid-template-columns: 1fr 280px; gap: 1.5rem; align-items: start; }

.rpd-btn-outline {
    padding: 0.4rem 0.9rem; font-size: 0.82rem; font-weight: 600;
    background: transparent; border-radius: 0; text-decoration: none;
    display: inline-flex; align-items: center; gap: 0.35rem;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

/* —— Fields grid —— */

.rpd-email-link { color: var(--cb-cyan); text-decoration: none; display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.85rem; font-weight: 500; transition: color 0.2s; }
.rpd-email-link:hover { color: var(--cb-accent); text-decoration: none; }

/* —— Badge count —— */
.rpd-count-badge {
    display: inline-flex; align-items: center; padding: 0.2rem 0.55rem;
    font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; border-radius: 0;
    background: rgba(107,114,128,0.06); color: var(--cb-gray); border: 1px solid rgba(107,114,128,0.2);
}

/* —— Table —— */

.rpd-table thead th.rpd-th-center { text-align: center; }
.rpd-table td.rpd-td-center { text-align: center; }

.rpd-user-name { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 600; font-size: 0.85rem; }
.rpd-user-email { color: var(--cb-cyan); font-size: 0.82rem; text-decoration: none; transition: color 0.2s; }
.rpd-user-email:hover { color: var(--cb-accent); text-decoration: none; }

/* —— Empty state —— */

/* —— Sidebar —— */
.rpd-sidebar-stack { position: sticky; top: 72px; display: flex; flex-direction: column; gap: 1.5rem; }

/* —— Audit list —— */
.rpd-audit-item { display: flex; justify-content: space-between; align-items: baseline; padding: 0.55rem 0; border-bottom: 1px solid var(--cb-light); }
.rpd-audit-item:last-child { border-bottom: none; }
.rpd-audit-label { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--cb-gray); }

/* —— Azioni sidebar —— */
.rpd-actions-stack { display: flex; flex-direction: column; gap: 0.5rem; }
.rpd-action-link {
    padding: 0.5rem 0.9rem; font-size: 0.82rem; font-weight: 600;
    background: transparent; border-radius: 0; text-decoration: none;
    display: flex; align-items: center; gap: 0.5rem;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.rpd-action-link-amber  { border: 1px solid rgba(217,119,6,0.2);  color: var(--cb-amber); }
.rpd-action-link-amber:hover  { background: rgba(217,119,6,0.08);  border-color: var(--cb-amber);  color: var(--cb-amber);  text-decoration: none; }
.rpd-action-link-danger { border: 1px solid rgba(220,38,38,0.2);  color: var(--cb-danger); }
.rpd-action-link-danger:hover { background: rgba(220,38,38,0.08);  border-color: var(--cb-danger); color: var(--cb-danger); text-decoration: none; }
.rpd-action-btn-disabled {
    padding: 0.5rem 0.9rem; font-size: 0.82rem; font-weight: 600;
    background: transparent; border-radius: 0;
    display: flex; align-items: center; gap: 0.5rem;
    border: 1px solid rgba(220,38,38,0.1); color: rgba(220,38,38,0.35);
    cursor: not-allowed;
}
.rpd-warning-note {
    font-size: 0.72rem; color: var(--cb-muted);
    background: rgba(217,119,6,0.04); border-left: 3px solid var(--cb-amber);
    padding: 0.4rem 0.65rem; display: flex; gap: 0.35rem; align-items: flex-start;
}
.rpd-warning-note svg { flex-shrink: 0; color: var(--cb-amber); margin-top: 1px; }

/* —— Responsive —— */
@media (max-width: 991.98px) {
    .rpd-layout { grid-template-columns: 1fr; }
    .rpd-sidebar-stack { position: static; }
    .rpd-fields-grid { grid-template-columns: 1fr; }
    .rpd-field--full { grid-column: 1; }
}
@media (max-width: 575.98px) {
    .rpd-page { padding: 1rem; }
    .rpd-header-actions { flex-wrap: wrap; }
}

/* REPARTI > EDIT PAGE STYLES */
/* —— Page icon (locale: amber per modifica) —— */
.rpe-page-icon {
    width: 42px; height: 42px; flex-shrink: 0;
    background: rgba(217,119,6,0.08); border: 1px solid rgba(217,119,6,0.15);
    display: flex; align-items: center; justify-content: center;
}

/* —— Layout —— */
.rpe-layout { display: grid; grid-template-columns: 1fr 300px; gap: 1.5rem; align-items: start; }

/* —— Card header (locale: variant amber/cyan) —— */

/* —— Validation —— */
.rpe-validation {
    border-radius: 0; border: 1px solid var(--cb-border);
    border-left: 4px solid var(--cb-danger); background: rgba(220,38,38,0.04);
    padding: 0.85rem 1.25rem; font-size: 0.85rem; margin-bottom: 1.25rem; color: var(--cb-danger);
}

/* —— Form —— */
.rpe-form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; margin-bottom: 1rem; }
.rpe-input, .rpe-textarea {
    width: 100%; border: 1px solid var(--cb-border); font-size: 0.85rem; color: var(--cb-dark);
    padding: 0.5rem 0.75rem; border-radius: 0; background: var(--cb-white);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.rpe-input:focus, .rpe-textarea:focus {
    outline: none; border-color: var(--cb-accent); box-shadow: 0 0 0 0.2rem rgba(227,72,36,0.12);
}
.rpe-textarea { resize: vertical; min-height: 90px; }

.rpe-form-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
.rpe-form-row {
    display: flex; flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1rem;
}
@media (max-width: 767.98px) {
    .rpe-form-2col { grid-template-columns: 1fr; }
}
.rpe-card-title {
    font-size: 0.9rem; font-weight: 700;
    color: #151515; margin: 0;
    text-transform: uppercase; letter-spacing: 0.02em;
}

/* —— Form actions —— */

/* —— Info sidebar —— */
.rpe-info-card { background: var(--cb-white); border: 1px solid var(--cb-border); overflow: hidden; position: sticky; top: 72px; }
.rpe-info-body { padding: 1.25rem 1.5rem 1.25rem 1.75rem; }
.rpe-info-box {
    background: rgba(8,145,178,0.04); border-left: 3px solid var(--cb-cyan);
    padding: 0.65rem 0.85rem; font-size: 0.82rem; color: var(--cb-gray); margin-bottom: 1rem;
}

/* —— Responsive —— */
@media (max-width: 991.98px) {
    .rpe-layout { grid-template-columns: 1fr; }
    .rpe-info-card { position: static; }
}
@media (max-width: 575.98px) {
    .rpe-form-2col { grid-template-columns: 1fr; }
}

/* REPARTI > DELETE PAGE STYLES */
/* —— Page —— */

/* —— Alert —— */

.rpx-alert svg { color: var(--cb-danger); flex-shrink: 0; }

/* —— Centered wrapper —— */
.rpx-wrapper { display: flex; justify-content: center; }

/* —— Card header —— */

/* —— Card body —— */

/* —— Warning box —— */
.rpx-warning-box {
    background: rgba(217,119,6,0.04); border-left: 4px solid var(--cb-amber);
    padding: 0.85rem 1rem; font-size: 0.85rem; color: var(--cb-dark);
    display: flex; align-items: flex-start; gap: 0.5rem; margin-bottom: 1.5rem;
}
.rpx-warning-box svg { color: var(--cb-amber); flex-shrink: 0; margin-top: 1px; }
.rpx-warning-box strong { font-weight: 700; }

/* —— Fields —— */
.rpx-fields { display: flex; flex-direction: column; }

/* —— Utenti warning inline —— */
.rpx-utenti-warn {
    display: flex; align-items: center; gap: 0.4rem; margin-top: 0.3rem;
    font-size: 0.72rem; color: var(--cb-danger);
}

/* —— Badge —— */

/* —— Responsive —— */
@media (max-width: 575.98px) {
    .rpx-page { padding: 1rem; }
    .rpx-field { flex-direction: column; gap: 0.2rem; }
    .rpx-field-label { width: auto; }
}

/* RICHIESTEINTEGRAZIONE PAGE STYLES */

/* PAGE WRAPPER */

/* HEADER */
.ri-header h1 { font-size: 1.4rem; font-weight: 700; color: #151515; margin: 0 0 0.25rem; display: flex; align-items: center; gap: 0.5rem; letter-spacing: -0.025em; }
.ri-header h1 svg { color: #E34824; flex-shrink: 0; }
.ri-header p { font-size: 0.85rem; color: #6b7280; margin: 0; }

.ri-btn-green { background: #059669; border-color: #059669; }
.ri-btn-green:hover { background: #047857; border-color: #047857; color: #fff; box-shadow: 0 2px 8px rgba(5,150,105,0.2); }

/* HERO CARD */
.ri-hero { background: #fff; border: 1px solid #e0e1e3; border-radius: 0; position: relative; overflow: hidden; padding: 1.5rem; padding-left: calc(1.5rem + 4px); margin-bottom: 1.5rem; }
.ri-hero::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--ri-hero-color, #E34824); }
.ri-hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem 1.5rem; }

.ri-tab-group { display: flex; }
.ri-tab { padding: 0.4rem 0.9rem; font-size: 0.78rem; font-weight: 600; border: 1px solid #e0e1e3; background: transparent; color: #6b7280; text-decoration: none; transition: background 0.15s, color 0.15s; }
.ri-tab:not(:last-child) { border-right: none; }
.ri-tab:hover { background: #EEEFF0; color: #151515; text-decoration: none; }
.ri-tab.active { background: #E34824; color: #fff; border-color: #E34824; }
.ri-tab.active:hover { color: #fff; }

/* TABLE */

/* Row accent —— left border color by status */
.ri-row-accent { position: relative; }
.ri-row-accent td:first-child { border-left: 3px solid var(--ri-row-color, transparent); }

.ri-code { font-weight: 700; color: #151515; font-size: 0.85rem; }

/* BADGES */

.ri-act-btn { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #e0e1e3; background: #fff; color: #6b7280; border-radius: 0; cursor: pointer; transition: all 0.15s; font-size: 0.85rem; text-decoration: none; padding: 0; }
.ri-act-btn:hover { border-color: #E34824; color: #E34824; background: rgba(227,72,36,0.04); }
.ri-act-btn-success:hover { border-color: #059669; color: #059669; background: rgba(5,150,105,0.04); }
.ri-act-btn-danger:hover { border-color: #dc2626; color: #dc2626; background: rgba(220,38,38,0.04); }

.ri-legenda { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.ri-legenda-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; color: #6b7280; }
.ri-legenda-color { width: 14px; height: 14px; flex-shrink: 0; }

/* EMPTY STATE */

/* MODAL OVERRIDES */
.modal-content { border-radius: 0 !important; }

/* ========== RESPONSIVE ========== */
@media (max-width: 991.98px) {
    .ri-hero-grid { grid-template-columns: 1fr; }
    .ri-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767.98px) {
    .ri-header { flex-direction: column; }
    .ri-header-actions { width: 100%; }
    .ri-header-actions a { flex: 1; justify-content: center; }
}

@media (max-width: 575.98px) {
    .ri-page { padding: 1rem; }
    .ri-stats { grid-template-columns: 1fr; }
    .ri-toolbar { padding: 0.65rem 0.85rem; }
    .ri-tab { padding: 0.35rem 0.65rem; font-size: 0.72rem; }
    .ri-legenda { flex-direction: column; gap: 0.5rem; }
}

/* RICHIESTEINTEGRAZIONE > CREATE PAGE STYLES */

/* PAGE WRAPPER */

/* HEADER */
.ric-header { margin-bottom: 2rem; }
.ric-header h1 { font-size: 1.4rem; font-weight: 700; color: #151515; margin: 0 0 0.25rem; display: flex; align-items: center; gap: 0.5rem; letter-spacing: -0.025em; }
.ric-header h1 svg { color: #E34824; flex-shrink: 0; }
.ric-header p { font-size: 0.85rem; color: #6b7280; margin: 0.25rem 0 0; }

/* FORM */
.cb-form .form-text i { margin-right: 0.2rem; }

/* INFO BOX */
.ric-info-box { background: rgba(8,145,178,0.04); border-left: 3px solid #0891b2; padding: 0.85rem 1rem; margin-bottom: 1.5rem; }
.ric-info-box-title { font-size: 0.85rem; font-weight: 700; color: #151515; margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.4rem; }
.ric-info-box-title i { color: #0891b2; }

/* INFO LIST */
.ric-info-list { font-size: 0.82rem; color: #151515; padding-left: 1.2rem; margin: 0; }
.ric-info-list li { margin-bottom: 0.35rem; }
.ric-info-list li:last-child { margin-bottom: 0; }
.ric-info-list li strong { color: #E34824; }

/* BADGES */

/* SIDEBAR STICKY */

/* ========== RESPONSIVE ========== */
@media (max-width: 991.98px) {
    .ric-sticky { position: static; }
}

@media (max-width: 575.98px) {
    .ric-page { padding: 1rem; }
    .ric-form-actions { flex-direction: column; gap: 0.5rem; }
    .ric-form-actions .ric-btn { justify-content: center; }
}

/* RICHIESTEINTEGRAZIONE > DETAILS PAGE STYLES */

/* PAGE WRAPPER */

/* HEADER */
.rid-header h1 { font-size: 1.4rem; font-weight: 700; color: #151515; margin: 0 0 0.5rem; display: flex; align-items: center; gap: 0.5rem; letter-spacing: -0.025em; }
.rid-header h1 svg { color: #E34824; flex-shrink: 0; }
.rid-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* OUTLINE BUTTONS (sidebar/document) */
.rid-btn-outline { background: transparent; font-size: 0.82rem; padding: 0.4rem 0.8rem; border: 1px solid; border-radius: 0; text-decoration: none; display: inline-flex; align-items: center; gap: 0.3rem; transition: all 0.15s; font-weight: 600; }

/* TEXT BOX (testo richiesta/risposta) */
.rid-text-box { background: #EEEFF0; padding: 0.85rem 1rem; font-size: 0.85rem; color: #151515; border: 1px solid #e0e1e3; cursor: pointer; transition: background 0.15s; }
.rid-text-box:hover { background: #e8e9eb; }

/* FIELDS GRID —— 2 column (info lotto) */

.rid-field-v { display: flex; flex-direction: column; padding: 0.6rem 0; border-bottom: 1px solid #EEEFF0; }
.rid-field-v:last-child { border-bottom: none; }
.rid-field-v-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7280; margin-bottom: 0.15rem; }

/* BADGES */

/* ALERT */

.rid-alert strong { display: block; margin-bottom: 0.25rem; }
.rid-alert p { margin: 0; color: #6b7280; font-size: 0.82rem; }

/* COUNTDOWN */
.rid-countdown { text-align: center; padding: 1rem 0.5rem; }
.rid-countdown-num { font-size: 3rem; font-weight: 800; line-height: 1; color: var(--rid-countdown-color, #E34824); margin-bottom: 0.2rem; }
.rid-countdown-label { font-size: 0.82rem; color: #6b7280; }

/* SIDEBAR SYSTEM FIELDS */

.rid-sys-field:last-child { margin-bottom: 0; }

.rid-sys-label i { font-size: 0.72rem; }

.rid-sys-value small { font-size: 0.72rem; color: #9ca3af; }
.rid-sys-value .rid-badge { margin-left: 0.3rem; }

/* SIDEBAR STICKY */

/* ACTION LIST */
.rid-action-list { display: flex; flex-direction: column; gap: 0.5rem; }
.rid-action-list .rid-btn-outline { justify-content: center; width: 100%; }

/* ========== RESPONSIVE ========== */
@media (max-width: 991.98px) {
    .rid-sticky { position: static; }
    .rid-header { flex-direction: column; }
    .rid-field { flex-direction: column; }
    .rid-field-label { width: auto; margin-bottom: 0.15rem; }
    .rid-fields-grid { grid-template-columns: 1fr; }
}

@media (max-width: 575.98px) {
    .rid-page { padding: 1rem; }
    .rid-header-actions { width: 100%; }
    .rid-header-actions .rid-btn { flex: 1; justify-content: center; }
}

/* RICHIESTEINTEGRAZIONE > RISPONDI PAGE STYLES */

/* PAGE WRAPPER */

/* HEADER */
.rir-header { margin-bottom: 1.5rem; }
.rir-header h1 { font-size: 1.4rem; font-weight: 700; color: #151515; margin: 0 0 0.25rem; display: flex; align-items: center; gap: 0.5rem; letter-spacing: -0.025em; }
.rir-header h1 svg { color: #059669; flex-shrink: 0; }
.rir-header p { font-size: 0.85rem; color: #6b7280; margin: 0.25rem 0 0; }

/* CONTEXT BAR */
.rir-context-bar { background: #fff; border: 1px solid #e0e1e3; padding: 0.85rem 1.25rem; display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; position: relative; }
.rir-context-bar::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #E34824; }
.rir-context-item { display: flex; flex-direction: column; }
.rir-context-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7280; }

.rir-muted { font-size: 0.82rem; color: #9ca3af; font-style: italic; }
.rir-muted i { font-style: normal; margin-right: 0.2rem; }

/* TEXT BOX */
.rir-text-box { background: #EEEFF0; padding: 0.85rem 1rem; font-size: 0.85rem; color: #151515; border: 1px solid #e0e1e3; cursor: text; transition: background 0.15s; }
.rir-text-box:hover { background: #e8e9eb; }

/* OUTLINE BUTTONS */
.rir-btn-outline { background: transparent; font-size: 0.82rem; padding: 0.4rem 0.8rem; border: 1px solid; border-radius: 0; text-decoration: none; display: inline-flex; align-items: center; gap: 0.3rem; transition: all 0.15s; font-weight: 600; }

/* FORM */

/* BADGES */

/* ALERT */

.rir-alert strong { display: block; margin-bottom: 0.2rem; }
.rir-alert p { margin: 0; color: #6b7280; font-size: 0.82rem; }

/* INFO LIST */
.rir-info-list { font-size: 0.82rem; color: #151515; padding-left: 1.2rem; margin: 0; }
.rir-info-list li { margin-bottom: 0.35rem; }
.rir-info-list li:last-child { margin-bottom: 0; }
.rir-info-list li strong { color: #E34824; }

/* ========== RESPONSIVE ========== */
@media (max-width: 991.98px) {
    .rir-field { flex-direction: column; }
    .rir-field-label { width: auto; margin-bottom: 0.15rem; }
    .rir-context-bar { flex-direction: column; gap: 0.5rem; }
}

@media (max-width: 575.98px) {
    .rir-page { padding: 1rem; }
    .rir-form-actions { flex-direction: column; gap: 0.5rem; }
    .rir-form-actions .rir-btn { justify-content: center; }
}

/* SCADENZE REGISTRO > CREATE PAGE STYLES */

/* Info registro box */
.srcc-info-box {
    background: rgba(8,145,178,0.04);
    border-left: 4px solid #0891b2;
    padding: 0.85rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex; align-items: center;
    justify-content: space-between; flex-wrap: wrap; gap: 0.75rem;
}
.srcc-info-title { font-size: 0.9rem; font-weight: 600; color: #151515; }
.srcc-info-sub { font-size: 0.78rem; color: #6b7280; margin-top: 0.15rem; }
.srcc-info-sub code {
    font-size: 0.78rem; color: #E34824; background: rgba(227,72,36,0.06);
    padding: 0.1rem 0.4rem; border: 1px solid rgba(227,72,36,0.15);
    font-family: monospace;
}

/* Alert */

/* Layout 2 colonne */
.srcc-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1.5rem;
    align-items: start;
}
@media (max-width: 991.98px) {
    .srcc-layout { grid-template-columns: 1fr; }
}

.srcc-card-header::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0;
    width: 4px; background: #E34824;
}
.srcc-card-header-gray::before  { background: #6b7280; }
.srcc-card-header-green::before { background: #059669; }

/* Form section title */
.srcc-section-title {
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.05em; color: #6b7280;
    display: flex; align-items: center; gap: 0.4rem;
    margin-bottom: 0.75rem; margin-top: 1.25rem;
}
.srcc-section-title:first-child { margin-top: 0; }
.srcc-section-title i { color: #E34824; }

.srcc-field-group-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 575.98px) {
    .srcc-field-group-2, .srcc-field-group-3 { grid-template-columns: 1fr; }
}
@media (max-width: 767.98px) {
    .srcc-field-group-3 { grid-template-columns: 1fr 1fr; }
}

.srcc-label {
    font-size: 0.8rem; font-weight: 600; color: #151515;
    text-transform: uppercase; letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
}
.srcc-label .req { color: #dc2626; margin-left: 0.2rem; }
.srcc-input, .srcc-select, .srcc-textarea {
    border: 1px solid #e0e1e3; font-size: 0.85rem; padding: 0.5rem 0.75rem;
    color: #151515; background: #fff; width: 100%; outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.srcc-input:focus, .srcc-select:focus, .srcc-textarea:focus {
    border-color: #E34824; box-shadow: 0 0 0 0.2rem rgba(227,72,36,0.12);
}
.srcc-textarea { resize: vertical; min-height: 80px; }

/* Footer form */
/* Sidebar sticky */
.srcc-sidebar {
    position: sticky;
    top: 72px;
}
@media (max-width: 991.98px) {
    .srcc-sidebar { position: static; }
}

/* Info card sidebar */
.srcc-sys-row {
    display: flex; flex-direction: column;
    padding: 0.6rem 0; border-bottom: 1px solid #EEEFF0;
}
.srcc-sys-row:last-child { border-bottom: none; }

.srcc-sys-empty { font-size: 0.85rem; color: #9ca3af; font-style: italic; }

/* SCADENZE REGISTRO > DETAILS PAGE STYLES */

@media (max-width: 575.98px) {
    .srd-page { padding: 1rem; }
}

/* Hero header */
.srd-hero {
    background: #fff; border: 1px solid #e0e1e3;
    position: relative; overflow: hidden;
    padding: 1.5rem 1.5rem 1.5rem 1.75rem;
    margin-bottom: 1.5rem;
    display: flex; align-items: flex-start;
    justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
.srd-hero::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0;
    width: 4px; background: var(--srd-hero-color, #E34824);
}
.srd-hero-left { display: flex; align-items: center; gap: 1rem; }
.srd-hero-icon {
    width: 48px; height: 48px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
}
.srd-hero-title {
    font-size: 1.3rem; font-weight: 700; color: #151515;
    letter-spacing: -0.02em; margin: 0 0 0.35rem;
}
.srd-hero-meta {
    display: flex; align-items: center; gap: 0.5rem;
    flex-wrap: wrap; font-size: 0.82rem; color: #6b7280;
}
.srd-hero-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }

/* Badge */

/* Alert */

/* Layout 2 colonne */
.srd-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1.5rem;
    align-items: start;
}
@media (max-width: 991.98px) {
    .srd-layout { grid-template-columns: 1fr; }
}

.srd-card-header-inner { display: flex; align-items: center; gap: 0.75rem; }
.srd-card-header::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0;
    width: 4px; background: #E34824;
}
.srd-card-header-gray::before   { background: #6b7280; }
.srd-card-header-cyan::before   { background: #0891b2; }
.srd-card-header-neutral::before{ background: #e0e1e3; }

/* Campi details grid */

@media (max-width: 575.98px) { .srd-fields-grid { grid-template-columns: 1fr; } }

/* Sidebar sticky */
.srd-sidebar { position: sticky; top: 72px; }
@media (max-width: 991.98px) { .srd-sidebar { position: static; } }

.srd-info-empty { font-size: 0.82rem; color: #9ca3af; font-style: italic; text-align: right; }

/* Bottoni sidebar outline */
.srd-side-btn {
    display: flex; align-items: center; gap: 0.5rem;
    width: 100%; padding: 0.5rem 0.85rem; font-size: 0.82rem; font-weight: 600;
    border: 1px solid; background: transparent; cursor: pointer; text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    margin-bottom: 0.5rem;
}
.srd-side-btn:last-child { margin-bottom: 0; }
.srd-side-btn-accent  { color: #E34824; border-color: rgba(227,72,36,0.2); }
.srd-side-btn-accent:hover  { background: rgba(227,72,36,0.06); border-color: #E34824; color: #E34824; }
.srd-side-btn-cyan    { color: #0891b2; border-color: rgba(8,145,178,0.2); }
.srd-side-btn-cyan:hover    { background: rgba(8,145,178,0.06); border-color: #0891b2; color: #0891b2; }
.srd-side-btn-danger  { color: #dc2626; border-color: rgba(220,38,38,0.2); }
.srd-side-btn-danger:hover  { background: rgba(220,38,38,0.06); border-color: #dc2626; color: #dc2626; }

/* Modal custom */
.srd-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(21,21,21,0.5); z-index: 1060;
    align-items: center; justify-content: center;
}
.srd-modal-overlay.open { display: flex; }
.srd-modal {
    background: #fff; border: 1px solid #e0e1e3;
    width: 100%; max-width: 440px; margin: 1rem; overflow: hidden;
}
.srd-modal-warn {
    background: rgba(220,38,38,0.04); border-left: 3px solid #dc2626;
    padding: 0.65rem 0.85rem; font-size: 0.82rem; color: #dc2626;
    margin-top: 0.75rem;
}

/* Allegati partial override */
.srd-card-body.p-0 { padding: 0 !important; }

/* SCADENZE REGISTRO > EDIT PAGE STYLES */

/* Info registro box */
.sre-info-box {
    background: rgba(8,145,178,0.04);
    border-left: 4px solid #0891b2;
    padding: 0.85rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex; align-items: center;
    justify-content: space-between; flex-wrap: wrap; gap: 0.75rem;
}
.sre-info-title { font-size: 0.9rem; font-weight: 600; color: #151515; }
.sre-info-sub { font-size: 0.78rem; color: #6b7280; margin-top: 0.15rem; }
.sre-info-sub code {
    font-size: 0.78rem; color: #E34824; background: rgba(227,72,36,0.06);
    padding: 0.1rem 0.4rem; border: 1px solid rgba(227,72,36,0.15);
    font-family: monospace;
}

/* Alert */

/* Layout 2 colonne */
.sre-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1.5rem;
    align-items: start;
}
@media (max-width: 991.98px) {
    .sre-layout { grid-template-columns: 1fr; }
}

.sre-card-header::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0;
    width: 4px; background: #d97706;
}
.sre-card-header-green::before  { background: #059669; }
.sre-card-header-gray::before   { background: #6b7280; }

/* Form section title */
.sre-section-title {
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.05em; color: #6b7280;
    display: flex; align-items: center; gap: 0.4rem;
    margin-bottom: 0.75rem; margin-top: 1.25rem;
}
.sre-section-title:first-child { margin-top: 0; }
.sre-section-title i { color: #d97706; }

.sre-field-group-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 575.98px) {
    .sre-field-group-3, .sre-field-group-2 { grid-template-columns: 1fr; }
}
@media (max-width: 767.98px) {
    .sre-field-group-3 { grid-template-columns: 1fr 1fr; }
}

.sre-label {
    font-size: 0.8rem; font-weight: 600; color: #151515;
    text-transform: uppercase; letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
}
.sre-label .req { color: #dc2626; margin-left: 0.2rem; }
.sre-input, .sre-select, .sre-textarea {
    border: 1px solid #e0e1e3; font-size: 0.85rem; padding: 0.5rem 0.75rem;
    color: #151515; background: #fff; width: 100%; outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.sre-input:focus, .sre-select:focus, .sre-textarea:focus {
    border-color: #E34824; box-shadow: 0 0 0 0.2rem rgba(227,72,36,0.12);
}
.sre-textarea { resize: vertical; min-height: 80px; }

/* Toggle completamento */
.sre-toggle-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.75rem 0; gap: 1rem;
}
.sre-toggle-info { flex: 1; }
/* Footer form */
/* Sidebar sticky */
.sre-sidebar { position: sticky; top: 72px; }
@media (max-width: 991.98px) { .sre-sidebar { position: static; } }

/* Info sidebar */
.sre-sys-row {
    display: flex; flex-direction: column;
    padding: 0.6rem 0; border-bottom: 1px solid #EEEFF0;
}
.sre-sys-row:last-child { border-bottom: none; }

.sre-sys-empty { font-size: 0.85rem; color: #9ca3af; font-style: italic; margin-top: 0.15rem; }

/* Bottone sidebar outline */
.sre-side-btn {
    display: flex; align-items: center; gap: 0.5rem;
    width: 100%; padding: 0.5rem 0.85rem; font-size: 0.82rem; font-weight: 600;
    border: 1px solid rgba(227,72,36,0.2); background: transparent;
    color: #E34824; cursor: pointer; text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
    margin-bottom: 0.5rem;
}
.sre-side-btn:last-child { margin-bottom: 0; }
.sre-side-btn:hover { background: rgba(227,72,36,0.06); border-color: #E34824; color: #E34824; }
.sre-side-btn-gray { color: #6b7280; border-color: rgba(107,114,128,0.2); }
.sre-side-btn-gray:hover { background: rgba(107,114,128,0.06); border-color: #6b7280; color: #151515; }

/* SCADENZE REGISTRO > _ALLEGATI PARTIAL PAGE STYLES */

.srap-small { font-size: 0.78rem; color: #6b7280; white-space: nowrap; }
.srap-muted { font-size: 0.78rem; color: #9ca3af; }

.srap-action-btn {
    width: 32px; height: 32px; border: 1px solid; background: transparent;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.82rem; text-decoration: none; cursor: pointer;
    transition: background 0.15s;
}
.srap-action-download { color: #0891b2; border-color: rgba(8,145,178,0.2); }
.srap-action-download:hover { background: rgba(8,145,178,0.08); border-color: #0891b2; color: #0891b2; }
.srap-action-delete { color: #dc2626; border-color: rgba(220,38,38,0.2); }
.srap-action-delete:hover { background: rgba(220,38,38,0.06); border-color: #dc2626; color: #dc2626; }

/* SCADENZE REGISTRO > UPLOAD ALLEGATO PAGE STYLES */

@media (max-width: 575.98px) {
    .srua-page { padding: 1rem; }
}

/* Header */
.srua-header { margin-bottom: 1.5rem; }
.srua-title {
    font-size: 1.4rem; font-weight: 700; color: #151515;
    letter-spacing: -0.025em; margin: 0;
}

/* Info scadenza box */
.srua-info-box {
    background: rgba(8,145,178,0.04);
    border-left: 4px solid #0891b2;
    padding: 0.85rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex; align-items: center;
    justify-content: space-between; flex-wrap: wrap; gap: 0.75rem;
}
.srua-info-title { font-size: 0.9rem; font-weight: 600; color: #151515; }
.srua-info-sub { font-size: 0.78rem; color: #6b7280; margin-top: 0.15rem; }
.srua-info-sub code {
    font-size: 0.78rem; color: #E34824; background: rgba(227,72,36,0.06);
    padding: 0.1rem 0.4rem; border: 1px solid rgba(227,72,36,0.15);
    font-family: monospace;
}

/* Alert */

/* Layout 2 colonne */
.srua-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1.5rem;
    align-items: start;
}
@media (max-width: 991.98px) {
    .srua-layout { grid-template-columns: 1fr; }
}

.srua-card-header::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0;
    width: 4px; background: #E34824;
}
.srua-card-header-cyan::before  { background: #0891b2; }

/* Badge allegati */

/* Form section title */
.srua-section-title {
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.05em; color: #6b7280;
    display: flex; align-items: center; gap: 0.4rem;
    margin-bottom: 0.75rem; margin-top: 1.25rem;
}
.srua-section-title:first-child { margin-top: 0; }
.srua-section-title i { color: #E34824; }

/* Campi form */
@media (max-width: 575.98px) { .srua-field-group-2 { grid-template-columns: 1fr; } }

.srua-label {
    font-size: 0.8rem; font-weight: 600; color: #151515;
    text-transform: uppercase; letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
}
.srua-label .req { color: #dc2626; margin-left: 0.2rem; }
.srua-input, .srua-select {
    border: 1px solid #e0e1e3; font-size: 0.85rem; padding: 0.5rem 0.75rem;
    color: #151515; background: #fff; width: 100%; outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.srua-input:focus, .srua-select:focus {
    border-color: #E34824; box-shadow: 0 0 0 0.2rem rgba(227,72,36,0.12);
}

/* File input custom */
.srua-file-wrap {
    border: 2px dashed #e0e1e3; padding: 1.5rem; text-align: center;
    cursor: pointer; transition: border-color 0.2s, background 0.2s;
    position: relative;
}
.srua-file-wrap:hover, .srua-file-wrap.dragover {
    border-color: #E34824; background: rgba(227,72,36,0.02);
}
.srua-file-wrap input[type="file"] {
    position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.srua-file-hint { font-size: 0.82rem; color: #6b7280; }
.srua-file-hint strong { color: #E34824; }

/* File preview */
.srua-file-preview {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    background: rgba(8,145,178,0.04); border-left: 3px solid #0891b2;
    font-size: 0.85rem; margin-top: 0.75rem;
}
.srua-file-preview-icon { color: #0891b2; font-size: 1.1rem; flex-shrink: 0; }
.srua-file-preview-name { font-weight: 600; color: #151515; }
.srua-file-preview-size { font-size: 0.75rem; color: #9ca3af; margin-left: 0.5rem; }

/* Link upload multiplo */
.srua-multiplo-hint {
    text-align: center; font-size: 0.82rem; color: #6b7280;
    margin-top: 1rem; padding: 0.65rem;
    background: rgba(107,114,128,0.04); border: 1px solid #e0e1e3;
}
.srua-multiplo-hint a { color: #E34824; font-weight: 600; text-decoration: none; }
.srua-multiplo-hint a:hover { color: #c93d1e; text-decoration: underline; }

/* Footer form */
/* Sidebar sticky */
.srua-sidebar { position: sticky; top: 72px; }
@media (max-width: 991.98px) { .srua-sidebar { position: static; } }

/* Lista allegati esistenti */
.srua-allegato-item {
    display: flex; align-items: center; gap: 0.65rem;
    padding: 0.65rem 1rem; border-bottom: 1px solid #EEEFF0;
}
.srua-allegato-item:last-child { border-bottom: none; }
.srua-allegato-icon { color: #6b7280; font-size: 1rem; flex-shrink: 0; }
.srua-allegato-name { display: block; font-size: 0.82rem; font-weight: 600; color: #151515; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srua-allegato-size { display: block; font-size: 0.72rem; color: #9ca3af; }
.srua-empty {
    text-align: center; padding: 1.5rem 1rem;
    font-size: 0.82rem; color: #9ca3af;
}

/* SCADENZE REGISTRO > UPLOAD ALLEGATO MULTIPLO PAGE STYLES */

@media (max-width: 575.98px) {
    .srum-page { padding: 1rem; }
}

/* Header */
.srum-header { margin-bottom: 1.5rem; }
.srum-title {
    font-size: 1.4rem; font-weight: 700; color: #151515;
    letter-spacing: -0.025em; margin: 0;
}

/* Info scadenza box */
.srum-info-box {
    background: rgba(8,145,178,0.04);
    border-left: 4px solid #0891b2;
    padding: 0.85rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex; align-items: center;
    justify-content: space-between; flex-wrap: wrap; gap: 0.75rem;
}
.srum-info-title { font-size: 0.9rem; font-weight: 600; color: #151515; }
.srum-info-sub { font-size: 0.78rem; color: #6b7280; margin-top: 0.15rem; }
.srum-info-sub code {
    font-size: 0.78rem; color: #E34824; background: rgba(227,72,36,0.06);
    padding: 0.1rem 0.4rem; border: 1px solid rgba(227,72,36,0.15);
    font-family: monospace;
}

/* Alert */

/* Layout 2 colonne */
.srum-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1.5rem;
    align-items: start;
}
@media (max-width: 991.98px) {
    .srum-layout { grid-template-columns: 1fr; }
}

.srum-card-header::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0;
    width: 4px; background: #E34824;
}
.srum-card-header-cyan::before { background: #0891b2; }

/* Badge */

/* Form section title */
.srum-section-title {
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.05em; color: #6b7280;
    display: flex; align-items: center; gap: 0.4rem;
    margin-bottom: 0.75rem; margin-top: 1.25rem;
}
.srum-section-title:first-child { margin-top: 0; }
.srum-section-title i { color: #E34824; }

/* Campi form */
@media (max-width: 575.98px) { .srum-field-group-2 { grid-template-columns: 1fr; } }

.srum-label {
    font-size: 0.8rem; font-weight: 600; color: #151515;
    text-transform: uppercase; letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
}
.srum-label .req { color: #dc2626; margin-left: 0.2rem; }
.srum-input, .srum-select {
    border: 1px solid #e0e1e3; font-size: 0.85rem; padding: 0.5rem 0.75rem;
    color: #151515; background: #fff; width: 100%; outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.srum-input:focus, .srum-select:focus {
    border-color: #E34824; box-shadow: 0 0 0 0.2rem rgba(227,72,36,0.12);
}

/* File drop area */
.srum-file-wrap {
    border: 2px dashed #e0e1e3; padding: 2rem 1.5rem; text-align: center;
    cursor: pointer; transition: border-color 0.2s, background 0.2s;
    position: relative;
}
.srum-file-wrap:hover, .srum-file-wrap.dragover {
    border-color: #E34824; background: rgba(227,72,36,0.02);
}
.srum-file-wrap input[type="file"] {
    position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.srum-file-hint { font-size: 0.85rem; color: #6b7280; }
.srum-file-hint strong { color: #E34824; }
.srum-file-multi-badge {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.2rem 0.65rem; font-size: 0.72rem; font-weight: 600;
    background: rgba(227,72,36,0.06); color: #E34824;
    border: 1px solid rgba(227,72,36,0.2);
    text-transform: uppercase; letter-spacing: 0.03em;
    margin-bottom: 0.5rem;
}

/* File preview multiplo */
.srum-files-preview {
    margin-top: 0.75rem;
    background: rgba(8,145,178,0.04); border-left: 3px solid #0891b2;
    padding: 0.75rem 1rem;
}
.srum-files-summary {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.85rem; font-weight: 600; color: #151515; margin-bottom: 0.5rem;
}
.srum-files-summary i { color: #0891b2; }
.srum-files-total { font-size: 0.75rem; color: #9ca3af; font-weight: 400; margin-left: 0.25rem; }
.srum-files-list { display: flex; flex-direction: column; gap: 0.25rem; }

/* Hint upload singolo */
.srum-singolo-hint {
    text-align: center; font-size: 0.82rem; color: #6b7280;
    margin-top: 1rem; padding: 0.65rem;
    background: rgba(107,114,128,0.04); border: 1px solid #e0e1e3;
}
.srum-singolo-hint a { color: #E34824; font-weight: 600; text-decoration: none; }
.srum-singolo-hint a:hover { color: #c93d1e; text-decoration: underline; }

/* Footer form */
/* Sidebar sticky */
.srum-sidebar { position: sticky; top: 72px; }
@media (max-width: 991.98px) { .srum-sidebar { position: static; } }

/* Lista allegati esistenti */
.srum-allegato-item {
    display: flex; align-items: center; gap: 0.65rem;
    padding: 0.65rem 1rem; border-bottom: 1px solid #EEEFF0;
}
.srum-allegato-item:last-child { border-bottom: none; }
.srum-allegato-icon { color: #6b7280; font-size: 1rem; flex-shrink: 0; }
.srum-allegato-name {
    display: block;
    font-size: 0.82rem; font-weight: 600; color: #151515;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.srum-allegato-size { display: block; font-size: 0.72rem; color: #9ca3af; }
.srum-empty {
    text-align: center; padding: 1.5rem 1rem;
    font-size: 0.82rem; color: #9ca3af;
}

/* LAYOUT PAGE STYLES */
* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--cb-light);
    color: var(--cb-dark);
    overflow-x: hidden;
}

/* Remove all list bullets globally in layout areas */
.cb-topbar ul,
.cb-topbar li,
.cb-sidebar ul,
.cb-sidebar li,
.cb-topbar-right ul,
.cb-topbar-right li,
.dropdown-menu,
.dropdown-menu li {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

/* ========== TOPBAR ========== */
.cb-topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--topbar-height);
    background: var(--cb-white);
    border-bottom: 1px solid var(--cb-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    z-index: 1040;
    transition: left 0.3s ease;
}
body.cb-sidebar-collapsed .cb-topbar {
    left: var(--sidebar-collapsed-width);
}
.cb-topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.cb-topbar-toggle {
    background: none;
    border: none;
    color: var(--cb-dark);
    cursor: pointer;
    padding: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}
.cb-topbar-toggle:hover { color: var(--cb-accent); }
.cb-topbar-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--cb-dark);
    margin: 0;
}
.cb-topbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.cb-topbar-right .dropdown-toggle::after { display: none; }
.cb-topbar-right .nav-link {
    color: var(--cb-dark);
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.4rem 0.6rem;
    border-radius: 0;
    transition: color 0.2s;
}
.cb-topbar-right .nav-link:hover { color: var(--cb-accent); }

/* ========== SIDEBAR ========== */
.cb-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--cb-white);
    border-right: 1px solid var(--cb-border);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, width 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

/* ---- COLLAPSED: icon-only mode ---- */
body.cb-sidebar-collapsed .cb-sidebar {
    width: var(--sidebar-collapsed-width);
    transform: none; /* non nasconde, rimane visibile a 64px */
}

/* Nasconde testi, chevron, sezione titoli e brand testuale nel collassato */
body.cb-sidebar-collapsed .cb-sidebar .cb-nav-section-title,
body.cb-sidebar-collapsed .cb-sidebar .cb-nav-item span,
body.cb-sidebar-collapsed .cb-sidebar .cb-nav-collapse-btn span,
body.cb-sidebar-collapsed .cb-sidebar .cb-nav-collapse-btn .cb-chevron,
body.cb-sidebar-collapsed .cb-sidebar .cb-user-details,
body.cb-sidebar-collapsed .cb-sidebar .cb-user-chevron,
body.cb-sidebar-collapsed .cb-sidebar .cb-nav-sub {
    display: none !important;
}

/* Centra le icone nei nav-item */
body.cb-sidebar-collapsed .cb-sidebar .cb-nav-item,
body.cb-sidebar-collapsed .cb-sidebar .cb-nav-collapse-btn {
    justify-content: center;
    padding: 0.65rem 0;
    gap: 0;
}

/* Brand in modalit—— collassata: solo il dot */
body.cb-sidebar-collapsed .cb-sidebar .cb-sidebar-brand {
    justify-content: center;
    padding: 0;
}

body.cb-sidebar-collapsed .cb-sidebar .cb-brand-logo {
    display: none;
}
body.cb-sidebar-collapsed .cb-sidebar .cb-brand-icon {
    display: block;
}

/* Tooltip al hover in modalit—— collassata */
body.cb-sidebar-collapsed .cb-sidebar .cb-nav-item,
body.cb-sidebar-collapsed .cb-sidebar .cb-nav-collapse-btn {
    position: relative;
}

body.cb-sidebar-collapsed .cb-sidebar .cb-nav-item[data-label]::after,
body.cb-sidebar-collapsed .cb-sidebar .cb-nav-collapse-btn[data-label]::after {
    content: attr(data-label);
    position: absolute;
    left: calc(var(--sidebar-collapsed-width) + 8px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--cb-dark);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.3rem 0.65rem;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    z-index: 2000;
    transition: opacity 0.15s ease;
}

body.cb-sidebar-collapsed .cb-sidebar .cb-nav-item[data-label]:hover::after,
body.cb-sidebar-collapsed .cb-sidebar .cb-nav-collapse-btn[data-label]:hover::after {
    opacity: 1;
}

/* User footer collassato: solo avatar centrato, niente bordo superiore */
body.cb-sidebar-collapsed .cb-sidebar .cb-sidebar-footer {
    border-top: none;
    padding: 0.5rem 0;
    display: flex;
    justify-content: center;
}

body.cb-sidebar-collapsed .cb-sidebar .cb-user-toggle {
    justify-content: center;
    padding: 0.5rem 0;
    width: auto;
}

body.cb-sidebar-collapsed .cb-sidebar .cb-user-avatar {
    width: 36px;
    height: 36px;
}

/* Brand */
.cb-sidebar-brand {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    border-bottom: 1px solid var(--cb-border);
    flex-shrink: 0;
    transition: padding 0.3s ease;
}
.cb-sidebar-brand a {
    text-decoration: none;
    display: flex;
    align-items: center;
    height: 100%;
}
.cb-brand-logo {
    width: 150px;
    height: auto;
    display: block;
    transition: opacity 0.3s ease;
}
.cb-brand-icon {
    width: 32px;
    height: 32px;
    display: none;
    transition: opacity 0.3s ease;
}

/* Nav sections */
.cb-sidebar-nav {
    flex: 1;
    padding: 1rem 0;
}
.cb-nav-section {
    margin-bottom: 0;
}
.cb-nav-section + .cb-nav-section {
    border-top: 1px solid var(--cb-border);
    padding-top: 0.25rem;
    margin-top: 0.25rem;
}
body.cb-sidebar-collapsed .cb-sidebar .cb-nav-section + .cb-nav-section {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}
.cb-nav-section-title {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--cb-gray);
    padding: 0.5rem 1.25rem 0.25rem;
    margin: 0;
    transition: opacity 0.2s;
}

/* Nav items */
.cb-nav-item {
    display: flex;
    align-items: center;
    padding: 0.55rem 1.25rem;
    color: var(--cb-dark);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
    gap: 0.65rem;
}
.cb-nav-item:hover {
    background: rgba(227,72,36,0.05);
    color: var(--cb-accent);
    border-left-color: var(--cb-accent);
    text-decoration: none;
}
.cb-nav-item.active {
    background: rgba(227,72,36,0.08);
    color: var(--cb-accent);
    border-left-color: var(--cb-accent);
    font-weight: 600;
}
.cb-nav-item svg { opacity: 0.7; flex-shrink: 0; }
.cb-nav-item:hover svg, .cb-nav-item.active svg { opacity: 1; color: var(--cb-accent); }

/* Collapsible sub-menu */
.cb-nav-collapse-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.55rem 1.25rem;
    color: var(--cb-dark);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease;
    border: none;
    background: none;
    border-left: 3px solid transparent;
    gap: 0.65rem;
    cursor: pointer;
}
.cb-nav-collapse-btn:hover {
    background: rgba(227,72,36,0.05);
    color: var(--cb-accent);
    border-left-color: var(--cb-accent);
}
.cb-nav-collapse-btn svg { opacity: 0.7; flex-shrink: 0; }
.cb-nav-collapse-btn:hover svg { opacity: 1; color: var(--cb-accent); }
.cb-nav-collapse-btn .cb-chevron {
    margin-left: auto;
    transition: transform 0.2s ease;
}
.cb-nav-collapse-btn[aria-expanded="true"] .cb-chevron {
    transform: rotate(90deg);
}
.cb-nav-sub {
    padding-left: 1rem;
}
.cb-nav-sub .cb-nav-item {
    font-size: 0.825rem;
    padding: 0.4rem 1.25rem;
    border-left: none;
    padding-left: 2.5rem;
}
.cb-nav-sub .cb-nav-item::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    background: var(--cb-border);
    margin-right: 0.5rem;
    flex-shrink: 0;
}
.cb-nav-item.active::before {
    background: var(--cb-accent);
}
.cb-nav-sub .cb-nav-item:hover::before {
    background: var(--cb-accent);
}

/* Sidebar footer / user */
.cb-sidebar-footer {
    border-top: 1px solid var(--cb-border);
    padding: 0.75rem 1.25rem;
    flex-shrink: 0;
    transition: padding 0.3s ease, border 0.3s ease;
}
.cb-sidebar-footer .cb-user-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.8rem;
    color: var(--cb-dark);
}
.cb-sidebar-footer .cb-user-avatar {
    width: 32px;
    height: 32px;
    background: var(--cb-light);
    border: 1px solid var(--cb-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cb-sidebar-footer .cb-user-avatar svg { color: var(--cb-gray); }

/* User toggle (clickable) */
.cb-user-toggle {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.5rem 0.25rem;
    text-decoration: none;
    color: var(--cb-dark);
    transition: background 0.15s ease;
    cursor: pointer;
}
.cb-user-toggle:hover {
    background: rgba(227,72,36,0.05);
    color: var(--cb-accent);
    text-decoration: none;
}
.cb-user-details {
    flex: 1;
    overflow: hidden;
}
.cb-user-name {
    display: block;
    font-weight: 600;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--cb-dark);
}
.cb-user-toggle:hover .cb-user-name { color: var(--cb-accent); }
.cb-user-role {
    display: block;
    font-size: 0.7rem;
    color: var(--cb-gray);
}
.cb-user-chevron {
    flex-shrink: 0;
    opacity: 0.5;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.cb-user-toggle:hover .cb-user-chevron { opacity: 1; color: var(--cb-accent); }
.cb-user-toggle[aria-expanded="true"] .cb-user-chevron {
    transform: rotate(180deg);
    opacity: 1;
}

/* User dropdown (dropup from sidebar footer) */
.cb-user-dropdown {
    width: calc(var(--sidebar-width) - 2.5rem);
    border: 1px solid var(--cb-border);
    border-radius: 0 !important;
    box-shadow: 0 -4px 16px rgba(21,21,21,0.1);
    padding: 0.4rem 0;
}
.cb-user-dropdown .dropdown-item {
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    color: var(--cb-dark);
    border-radius: 0;
    transition: all 0.15s;
}
.cb-user-dropdown .dropdown-item:hover {
    background: rgba(227,72,36,0.06);
    color: var(--cb-accent);
}
.cb-user-dropdown .dropdown-item svg {
    margin-right: 0.5rem;
    opacity: 0.7;
}
.cb-user-dropdown .dropdown-item:hover svg { opacity: 1; color: var(--cb-accent); }
.cb-user-dropdown .dropdown-item.text-danger { color: var(--cb-accent) !important; }
.cb-user-dropdown .dropdown-item.text-danger:hover { background: rgba(227,72,36,0.08); }
.cb-user-dropdown .dropdown-divider { border-color: var(--cb-border); margin: 0.25rem 0; }

/* ========== MAIN CONTENT ========== */
.cb-main-wrapper {
    margin-left: var(--sidebar-width);
    margin-top: var(--topbar-height);
    min-height: calc(100vh - var(--topbar-height));
    transition: margin-left 0.3s ease;
    display: flex;
    flex-direction: column;
}
body.cb-sidebar-collapsed .cb-main-wrapper {
    margin-left: var(--sidebar-collapsed-width);
}
.cb-main-content {
    flex: 1;
    padding: 0;
}

/* ========== FOOTER —— trasparente, testo scuro ========== */
.cb-footer {
    background: transparent;
    border-top: none;
    color: var(--cb-gray);
    padding: 1rem 1.5rem;
    font-size: 0.8rem;
}
.cb-footer a {
    color: var(--cb-gray);
    text-decoration: none;
    transition: color 0.2s;
}
.cb-footer a:hover { color: var(--cb-accent); }

/* ========== OVERLAY (mobile) ========== */
.cb-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1045;
}

/* ========== DROPDOWN STYLING (topbar) ========== */
.cb-topbar .dropdown-menu {
    background: var(--cb-white);
    border: 1px solid var(--cb-border);
    border-radius: 0;
    box-shadow: 0 8px 24px rgba(21,21,21,0.12);
    padding: 0.5rem 0;
}
.cb-topbar .dropdown-item {
    color: var(--cb-dark);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    border-radius: 0;
    transition: all 0.15s;
}
.cb-topbar .dropdown-item:hover {
    background: rgba(227,72,36,0.06);
    color: var(--cb-accent);
}
.cb-topbar .dropdown-item svg {
    margin-right: 0.5rem;
    opacity: 0.7;
}
.cb-topbar .dropdown-item:hover svg { opacity: 1; color: var(--cb-accent); }
.cb-topbar .dropdown-item.text-danger { color: var(--cb-accent) !important; }
.cb-topbar .dropdown-item.text-danger:hover { background: rgba(227,72,36,0.08); }
.cb-topbar .dropdown-divider { border-color: var(--cb-border); margin: 0.25rem 0; }

/* ========== GLOBAL OVERRIDES ========== */
.card, .btn, .form-control, .form-select, .input-group-text,
.alert, .badge, .modal-content, .toast, .dropdown-menu,
.nav-tabs .nav-link, .nav-pills .nav-link, .pagination .page-link,
.table, .accordion-item, .accordion-button {
    border-radius: 0 !important;
}
.card { border: 1px solid var(--cb-border); box-shadow: none; }
.card:hover { border-color: rgba(227,72,36,0.25); }

.btn-primary {
    background: var(--cb-accent) !important;
    border-color: var(--cb-accent) !important;
    color: #fff !important;
}
.btn-primary:hover {
    background: var(--cb-accent-hover) !important;
    border-color: var(--cb-accent-hover) !important;
}
.btn-outline-primary {
    color: var(--cb-accent) !important;
    border-color: var(--cb-accent) !important;
}
.btn-outline-primary:hover {
    background: var(--cb-accent) !important;
    color: #fff !important;
}
.text-primary { color: var(--cb-accent) !important; }
.bg-primary { background-color: var(--cb-dark) !important; }

.table thead th {
    background: var(--cb-dark);
    color: #fff;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border: none;
}
.table tbody tr:hover { background: rgba(227,72,36,0.03); }
.page-item.active .page-link { background-color: var(--cb-accent); border-color: var(--cb-accent); }
.form-control:focus, .form-select:focus {
    border-color: var(--cb-accent);
    box-shadow: 0 0 0 0.2rem rgba(227,72,36,0.15);
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--cb-light); }
::-webkit-scrollbar-thumb { background: #c4c5c7; }
::-webkit-scrollbar-thumb:hover { background: var(--cb-accent); }

/* ========== RESPONSIVE ========== */
@media (max-width: 991.98px) {
    .cb-sidebar {
        /* Su mobile la sidebar si nasconde completamente (fuori schermo a sinistra) */
        transform: translateX(calc(-1 * var(--sidebar-width)));
        width: var(--sidebar-width) !important; /* ripristina larghezza piena su mobile */
    }
    body.cb-sidebar-open .cb-sidebar {
        transform: translateX(0);
    }
    body.cb-sidebar-open .cb-sidebar-overlay {
        display: block;
    }
    /* In collapsed mode su mobile: torna all'icona-only solo se aperta */
    body.cb-sidebar-collapsed .cb-sidebar {
        transform: translateX(calc(-1 * var(--sidebar-width)));
        width: var(--sidebar-width) !important;
    }
    .cb-topbar { left: 0 !important; }
    .cb-main-wrapper { margin-left: 0 !important; }
}
@media (min-width: 992px) {
    body.cb-sidebar-open .cb-sidebar-overlay { display: none; }
}

/* _PAGINATIONPARTIAL PAGE STYLES */

/* Info pagina */
.pg-info {
    font-size: 0.72rem;
    font-weight: 500;
    color: #6b7280;
    text-align: center;
    margin-top: 0.5rem;
}

/* —— Responsive —— */
@media (max-width: 575.98px) {
    .pg-pagination .page-item .page-link {
        min-width: 30px;
        height: 30px;
        font-size: 0.72rem;
        padding: 0 0.35rem;
    }

    .pg-pagination {
        gap: 0.15rem;
    }
}

/* SOGGETTI > CREATE PAGE STYLES */

/* —— Card header (locale: variant accent/gray/green/cyan/amber/neutral) —— */

/* Textarea */
.sgc-textarea {
    border: 1px solid var(--cb-border); font-size: 0.85rem;
    border-radius: 0; padding: 0.55rem 0.75rem;
    width: 100%; background: #fff; color: var(--cb-dark);
    resize: vertical; transition: border-color 0.2s, box-shadow 0.2s;
}
.sgc-textarea:focus {
    outline: none; border-color: var(--cb-accent);
    box-shadow: 0 0 0 0.2rem rgba(227,72,36,0.12);
}

/* Titoli sezione form */
.sgc-section-title {
    font-size: 0.82rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.03em; color: var(--cb-gray);
    display: flex; align-items: center; gap: 0.4rem;
    margin-bottom: 0.75rem;
}
.sgc-section-title i { color: var(--cb-accent); }

/* Separatore */

.sgc-form-row-3    { grid-template-columns: repeat(3, 1fr); }
.sgc-form-row-2    { grid-template-columns: repeat(2, 1fr); }
.sgc-form-row-addr { grid-template-columns: 130px 1fr 100px; }
.sgc-form-row-addr2{ grid-template-columns: 2fr 100px 60px 90px; }
/* Pattern status row per toggle */
.sgc-toggle-row {
    display: flex; align-items: center;
    justify-content: space-between; padding: 0.65rem 0;
    border-bottom: 1px solid var(--cb-light);
}
.sgc-toggle-row:last-child { border-bottom: none; }

/* —— Card azioni bottom —— */
.sgc-actions-card {
    background: var(--cb-white); border: 1px solid var(--cb-border);
    border-radius: 0; padding: 1rem 1.5rem;
    display: flex; align-items: center;
    justify-content: space-between; gap: 1rem;
    flex-wrap: wrap; margin-top: 0.5rem;
}

/* —— Sidebar sticky —— */

/* —— Responsive —— */
@media (max-width: 991.98px) {
    .sgc-form-row-3    { grid-template-columns: repeat(2, 1fr); }
    .sgc-form-row-addr { grid-template-columns: 110px 1fr; }
    .sgc-form-row-addr2{ grid-template-columns: 1fr 1fr; }
    .sgc-sidebar       { position: static; }
}
@media (max-width: 575.98px) {
    .sgc-form-row-3    { grid-template-columns: 1fr; }
    .sgc-form-row-2    { grid-template-columns: 1fr; }
    .sgc-form-row-addr { grid-template-columns: 1fr; }
    .sgc-form-row-addr2{ grid-template-columns: 1fr; }
}

/* SOGGETTI > DETAILS PAGE STYLES */

/* Outline piccoli sidebar */
.sgd-btn-outline {
    background: transparent; font-weight: 600; font-size: 0.82rem;
    border-radius: 0; padding: 0.4rem 0.8rem; border: 1px solid;
    display: inline-flex; align-items: center; gap: 0.4rem;
    text-decoration: none; cursor: pointer; width: 100%;
    justify-content: center; transition: background 0.15s, border-color 0.15s;
}

/* —— Alert TempData —— */

/* —— Griglia campi details —— */

/* separatore sezione dentro card */
.sgd-sep { border-top: 1px solid var(--cb-light); margin: 1rem 0 0.5rem; }

/* —— Badge —— */

/* —— Code monospace —— */
.sgd-code {
    font-family: monospace; font-size: 0.82rem;
    background: var(--cb-light); padding: 0.15rem 0.45rem;
    color: var(--cb-dark); border: 1px solid var(--cb-border);
    display: inline-block;
}

/* —— Box sconto partner —— */
.sgd-info-box {
    background: rgba(8,145,178,0.04);
    border-left: 3px solid var(--cb-cyan);
    padding: 0.75rem 1rem; font-size: 0.85rem;
    margin-top: 0.5rem;
}
.sgd-info-box-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--cb-cyan); margin-bottom: 0.2rem; }
.sgd-info-box-value { font-size: 1.25rem; font-weight: 700; color: var(--cb-dark); }

/* —— Avviso PA —— */
.sgd-warn-inline {
    font-size: 0.78rem; color: var(--cb-amber); font-weight: 600;
    display: inline-flex; align-items: center; gap: 0.3rem;
}

/* —— Sidebar sticky —— */
.sgd-sidebar {
    position: sticky; top: 72px; z-index: 10;
}

/* —— Audit campi verticali —— */

.sgd-sys-value:last-child { margin-bottom: 0; }

/* —— Responsive —— */
@media (max-width: 991.98px) {
    .sgd-fields-grid { grid-template-columns: 1fr; }
    .sgd-field--full { grid-column: 1; }
    .sgd-sidebar { position: static; }
}
@media (max-width: 575.98px) {
    .sgd-header { flex-direction: column; }
    .sgd-header-actions { width: 100%; }
}

/* SOGGETTI > EDIT PAGE STYLES */

/* Textarea */
.sge-textarea {
    border: 1px solid var(--cb-border); font-size: 0.85rem;
    border-radius: 0; padding: 0.55rem 0.75rem;
    width: 100%; background: #fff; color: var(--cb-dark);
    resize: vertical; transition: border-color 0.2s, box-shadow 0.2s;
}
.sge-textarea:focus {
    outline: none; border-color: var(--cb-accent);
    box-shadow: 0 0 0 0.2rem rgba(227,72,36,0.12);
}

/* Titoli sezione form */
.sge-section-title {
    font-size: 0.82rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.03em; color: var(--cb-gray);
    display: flex; align-items: center; gap: 0.4rem;
    margin-bottom: 0.75rem;
}
.sge-section-title i { color: var(--cb-accent); }

/* Separatore sezione */

.sge-form-row-3 { grid-template-columns: repeat(3, 1fr); }
.sge-form-row-2 { grid-template-columns: repeat(2, 1fr); }
.sge-form-row-addr { grid-template-columns: 130px 1fr 100px; }
.sge-form-row-addr2 { grid-template-columns: 2fr 100px 60px 90px; }
.sge-col-full { grid-column: 1 / -1; }
/* Pattern status row per toggle */
.sge-toggle-row {
    display: flex; align-items: center;
    justify-content: space-between; padding: 0.65rem 0;
    border-bottom: 1px solid var(--cb-light);
}
.sge-toggle-row:last-child { border-bottom: none; }

/* —— Card azioni bottom —— */
.sge-actions-card {
    background: var(--cb-white); border: 1px solid var(--cb-border);
    border-radius: 0; padding: 1rem 1.5rem;
    display: flex; align-items: center;
    justify-content: space-between; gap: 1rem;
    flex-wrap: wrap; margin-top: 0.5rem;
}
.sge-actions-left { display: flex; align-items: center; gap: 0.5rem; }

/* —— Sidebar sticky —— */

/* —— Responsive —— */
@media (max-width: 991.98px) {
    .sge-form-row-3    { grid-template-columns: repeat(2, 1fr); }
    .sge-form-row-4    { grid-template-columns: repeat(2, 1fr); }
    .sge-form-row-addr { grid-template-columns: 110px 1fr; }
    .sge-form-row-addr2{ grid-template-columns: 1fr 1fr; }
    .sge-sidebar       { position: static; }
}
@media (max-width: 575.98px) {
    .sge-form-row-3    { grid-template-columns: 1fr; }
    .sge-form-row-2    { grid-template-columns: 1fr; }
    .sge-form-row-addr { grid-template-columns: 1fr; }
    .sge-form-row-addr2{ grid-template-columns: 1fr; }
}

/* SOGGETTI > DELETE PAGE STYLES */

/* —— Variabili —— */
/* —— Layout pagina —— */

/* —— Header —— */
.sdel-header { margin-bottom: 1.5rem; }
.sdel-header h1 {
    font-size: 1.45rem; font-weight: 700;
    color: var(--cb-danger); letter-spacing: -0.025em;
    margin: 0; display: flex; align-items: center; gap: 0.5rem;
}

/* —— Alert principale (warning eliminazione) —— */
.sdel-warning-alert {
    border-radius: 0;
    border: 1px solid rgba(220,38,38,0.2);
    border-left: 4px solid var(--cb-danger);
    background: rgba(220,38,38,0.04);
    padding: 1rem 1.25rem;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    display: flex; align-items: flex-start; gap: 0.75rem;
}
.sdel-warning-alert-icon { color: var(--cb-danger); font-size: 1.2rem; flex-shrink: 0; margin-top: 0.1rem; }
.sdel-warning-alert-title { font-size: 0.88rem; font-weight: 700; color: var(--cb-danger); margin-bottom: 0.25rem; }
.sdel-warning-alert-body  { font-size: 0.85rem; color: var(--cb-dark); }

.sdel-icon-box--danger i  { color: var(--cb-danger); }
.sdel-icon-box--neutral i { color: var(--cb-muted); }
.sdel-icon-box--cyan i    { color: var(--cb-cyan); }

/* —— Griglia campi riepilogo —— */

.sdel-field-value--lg { font-size: 1rem; font-weight: 700; }

/* —— Badge —— */

/* —— Box informativo soft-delete —— */
.sdel-info-box {
    background: rgba(8,145,178,0.04);
    border-left: 3px solid var(--cb-cyan);
    padding: 0.75rem 1rem; font-size: 0.82rem; color: var(--cb-dark);
    margin-bottom: 1rem;
}
.sdel-info-box-title {
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.04em; color: var(--cb-cyan); margin-bottom: 0.4rem;
    display: flex; align-items: center; gap: 0.3rem;
}
.sdel-info-list {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 0.3rem;
}
.sdel-info-list li {
    display: flex; align-items: flex-start; gap: 0.4rem;
    font-size: 0.82rem; color: var(--cb-dark);
}
.sdel-info-list li i { color: var(--cb-cyan); flex-shrink: 0; margin-top: 0.1rem; }

/* —— Box nota relazioni —— */

/* —— Sidebar sticky —— */

/* —— Responsive —— */
@media (max-width: 991.98px) {
    .sdel-fields-grid { grid-template-columns: 1fr; }
    .sdel-field--full { grid-column: 1; }
    .sdel-sidebar { position: static; }
}
@media (max-width: 575.98px) {
    .sdel-header h1 { font-size: 1.2rem; }
}

/* TIPI DOCUMENTO > CREATE PAGE STYLES */

/* ===== TipoDocumento Create —— prefisso tdc- ===== */

/* Card header (locale: variant green/cyan/gray) */

.tdc-card-body--sm { padding: 1rem 1.25rem; }

textarea.tdc-form-control { resize: vertical; }

.tdc-validation {
    display: block; font-size: 0.72rem;
    color: #dc2626; margin-top: 0.25rem;
}

/* Section separator */

/* Form footer */
/* Note box cyan */

/* Aree list */
.tdc-area-item {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.55rem 1.25rem; font-size: 0.82rem; color: #151515;
    border-bottom: 1px solid #EEEFF0;
}
.tdc-area-item:last-child { border-bottom: none; }
.tdc-area-item i { color: #E34824; font-size: 0.9rem; flex-shrink: 0; }

/* Sidebar sticky */

/* Validation summary */
.tdc-validation-summary {
    display: flex; align-items: flex-start; gap: 0.5rem;
    padding: 0.85rem 1.25rem; margin-bottom: 1.25rem;
    border: 1px solid rgba(220,38,38,0.2);
    border-left: 4px solid #dc2626;
    background: rgba(220,38,38,0.04);
    font-size: 0.85rem; color: #151515;
    border-radius: 0;
}
.tdc-validation-summary i { color: #dc2626; flex-shrink: 0; margin-top: 0.1rem; }
.tdc-validation-summary ul { margin: 0; padding-left: 1.2rem; }

/* Responsive */
@media (max-width: 991.98px) {
    .tdc-sidebar { position: static; }
}
@media (max-width: 575.98px) {
    .tdc-form-footer { flex-direction: column-reverse; }
    .tdc-form-footer .cb-btn { width: 100%; justify-content: center; }
}

/* TIPI DOCUMENTO > DETAILS PAGE STYLES */

/* Subtitle (badge stack sotto cb-page-title) */
.tdet-subtitle { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.4rem; }

/* Alert */

.tdet-btn-outline-sm {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.8rem;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 0;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.tdet-btn-outline-sm-gray {
    border: 1px solid rgba(107,114,128,0.2);
    color: #6b7280;
    background: transparent;
}
.tdet-btn-outline-sm-gray:hover {
    background: rgba(107,114,128,0.04);
    border-color: #6b7280;
    color: #151515;
}

.tdet-card-body--sm { padding: 1rem 1.5rem 1rem 1.75rem; }

/* Fields */

/* Badge */

/* Docs count badge (large) */
.tdet-doc-count {
    font-size: 1.5rem;
    font-weight: 700;
    color: #E34824;
    line-height: 1;
}

/* Warning box */
.tdet-warning-box {
    background: rgba(217,119,6,0.04);
    border-left: 3px solid #d97706;
    padding: 0.6rem 0.85rem;
    font-size: 0.85rem;
    color: #151515;
    margin-bottom: 0.75rem;
}
.tdet-warning-box:last-child { margin-bottom: 0; }
.tdet-warning-box strong { color: #d97706; }
.tdet-warning-box .tdet-warning-sub {
    font-size: 0.78rem;
    color: #6b7280;
    margin-top: 0.2rem;
}

/* Sidebar sticky */
.tdet-sidebar {
    position: sticky;
    top: 72px;
    z-index: 10;
}

/* Audit rows */
.tdet-audit-row {
    display: flex;
    flex-direction: column;
    padding: 0.6rem 0;
    border-bottom: 1px solid #EEEFF0;
}
.tdet-audit-row:last-child { border-bottom: none; }
.tdet-audit-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    margin-bottom: 0.15rem;
}

/* ===== Responsive ===== */
@media (max-width: 991.98px) {
    .tdet-sidebar { position: static; }
    .tdet-fields-grid { grid-template-columns: 1fr; }
    .tdet-field--full { grid-column: 1; }
}
@media (max-width: 575.98px) {
    .tdet-page { padding: 1rem; }
    .tdet-header { flex-direction: column; align-items: flex-start; }
    .tdet-actions { width: 100%; }
    .tdet-btn { width: 100%; justify-content: center; }
}

/* TIPI DOCUMENTO > EDIT PAGE STYLES */

/* Alerts */

/* Form elements */
.tde-section-label {
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}
.tde-section-label i { color: #E34824; }

.tde-btn-actions { display: flex; gap: 0.5rem; justify-content: space-between; align-items: center; }

/* Sidebar actions */
.tde-sidebar-actions { display: flex; flex-direction: column; gap: 0.5rem; }

/* Badges */

/* Sticky sidebar */
.tde-sidebar {
    position: sticky;
    top: 72px;
    z-index: 10;
}

@media (max-width: 991.98px) {
    .tde-sidebar { position: static; }
}

/* TIPI DOCUMENTO > DELETE PAGE STYLES */

/* Page header */
.tdd-header {
    margin-bottom: 1.5rem;
}
.tdd-title {
    font-size: 1.4rem; font-weight: 700; color: #dc2626;
    letter-spacing: -0.025em; margin: 0;
    display: flex; align-items: center; gap: 0.5rem;
}

/* Alert */

.tdd-card-body--sm { padding: 1rem 1.25rem 1rem 1.5rem; }

/* Blocco non eliminabile */
.tdd-block-box {
    display: flex; align-items: flex-start; gap: 0.75rem;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(220,38,38,0.2);
    border-left: 4px solid #dc2626;
    background: rgba(220,38,38,0.04);
    margin-bottom: 1.25rem;
}
.tdd-block-box i { color: #dc2626; font-size: 1.25rem; flex-shrink: 0; margin-top: 0.1rem; }
.tdd-block-title { font-size: 0.9rem; font-weight: 700; color: #dc2626; margin-bottom: 0.25rem; }
.tdd-block-text  { font-size: 0.85rem; color: #151515; margin: 0; }

/* Warning box (avviso irreversibile) */
.tdd-warning-box {
    display: flex; align-items: flex-start; gap: 0.5rem;
    background: rgba(217,119,6,0.04);
    border-left: 3px solid #d97706;
    padding: 0.65rem 0.85rem;
    font-size: 0.85rem; color: #151515;
    margin-bottom: 1.25rem;
}
.tdd-warning-box i { color: #d97706; flex-shrink: 0; margin-top: 0.1rem; }

/* Badge */

.tdd-btn-outline-sm {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.4rem 0.8rem; font-size: 0.82rem; font-weight: 600;
    border-radius: 0; text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.tdd-btn-outline-sm-amber {
    border: 1px solid rgba(217,119,6,0.2); color: #d97706; background: transparent;
}
.tdd-btn-outline-sm-amber:hover { background: rgba(217,119,6,0.04); border-color: #d97706; color: #d97706; }
.tdd-btn-outline-sm-gray {
    border: 1px solid rgba(107,114,128,0.2); color: #6b7280; background: transparent;
}
.tdd-btn-outline-sm-gray:hover { background: rgba(107,114,128,0.04); border-color: #6b7280; color: #151515; }

/* Form footer (bottoni affiancati) */
.tdd-form-footer {
    display: flex; align-items: center; justify-content: space-between;
    gap: 0.5rem; padding-top: 1.25rem;
    border-top: 1px solid #EEEFF0; flex-wrap: wrap;
}

/* Info list sidebar */
.tdd-info-list { list-style: none; margin: 0; padding: 0; }
.tdd-info-list li {
    display: flex; align-items: flex-start; gap: 0.5rem;
    font-size: 0.82rem; color: #6b7280;
    padding: 0.45rem 0; border-bottom: 1px solid #EEEFF0;
}
.tdd-info-list li:last-child { border-bottom: none; }
.tdd-info-list li::before {
    content: ''; width: 5px; height: 5px;
    background: #e0e1e3; border-radius: 50%;
    flex-shrink: 0; margin-top: 0.45rem;
}

/* Cyan note box */

.tdd-note-list { list-style: none; margin: 0; padding: 0; }
.tdd-note-list li {
    font-size: 0.82rem; color: #6b7280;
    padding: 0.2rem 0; display: flex; align-items: flex-start; gap: 0.4rem;
}
.tdd-note-list li::before {
    content: '\2014'; color: #0891b2; font-weight: 700; flex-shrink: 0;
}

/* Sidebar sticky */

/* Responsive */
@media (max-width: 991.98px) {
    .tdd-sidebar { position: static; }
}
@media (max-width: 575.98px) {
    .tdd-page { padding: 1rem; }
    .tdd-form-footer { flex-direction: column-reverse; }
    .tdd-btn { width: 100%; justify-content: center; }
    .tdd-field { flex-direction: column; }
    .tdd-field-label { width: auto; }
}

/* TIPI SCADENZA MEZZO > CREA PAGE STYLES */

/* Header icon (locale: 26x26 inline-flex) */
.tsmc-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Card header (locale: variant amber/green) */

.tsmc-card-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #E34824;
}

/* Form section titles */
.tsmc-section-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.tsmc-section-title i {
    color: #E34824;
    font-size: 0.9rem;
}

/* Form labels */

/* Info box */
.tsmc-info-box {
    background: rgba(8, 145, 178, 0.04);
    border-left: 3px solid #0891b2;
    padding: 0.6rem 0.85rem;
    font-size: 0.82rem;
    color: #6b7280;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.tsmc-info-box i {
    color: #0891b2;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.tsmc-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
}

.tsmc-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding-top: 0.5rem;
}

/* Responsive */
@media (max-width: 575.98px) {
    .tsmc-card-body {
        padding: 1rem 1rem 1rem 1.25rem;
    }

    .tsmc-footer {
        flex-direction: column-reverse;
    }

    .tsmc-footer .cb-btn {
        width: 100%;
        justify-content: center;
    }
}

/* TIPI SCADENZA MEZZO > EDIT PAGE STYLES */

/* Page icon */
.tsme-page-icon { display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-right: 0.5rem; }

.tsme-card-header::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: #d97706;
}

/* Section titles */
.tsme-section-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

/* Form labels */

/* Info box sistema */
.tsme-info-box {
    background: rgba(107, 114, 128, 0.04);
    border-left: 3px solid #6b7280;
    padding: 0.6rem 0.85rem;
    font-size: 0.82rem;
    color: #6b7280;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.tsme-info-box i { flex-shrink: 0; margin-top: 0.1rem; }

.tsme-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
}

.tsme-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding-top: 0.5rem;
}

/* Responsive */
@media (max-width: 991.98px) {
    .tsme-header { flex-direction: column; gap: 0.75rem; }
}

@media (max-width: 575.98px) {
    .tsme-card-body { padding: 1rem 1rem 1rem 1.25rem; }
    .tsme-footer { flex-direction: column-reverse; }
    .tsme-btn { width: 100%; justify-content: center; }
}

/* TIPI SCADENZA MEZZO > _TIPO SCADENZA MEZZO TABLE PAGE STYLES */

.tsmp-table thead th:first-child { padding-left: 1rem; }
.tsmp-table thead th:last-child  { padding-right: 1rem; text-align: right; }
.tsmp-table thead th.tsmp-th-center { text-align: center; }

.tsmp-table tbody td:first-child { padding-left: 1rem; }
.tsmp-table tbody td:last-child  { padding-right: 1rem; }

/* Ordine */
.tsmp-ordine {
    font-size: 0.8rem;
    font-weight: 700;
    color: #9ca3af;
}

/* Nome e descrizione */
.tsmp-nome {
    font-size: 0.85rem;
    font-weight: 600;
    color: #151515;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.tsmp-nome .tsmp-lock {
    color: #9ca3af;
    font-size: 0.78rem;
}

.tsmp-desc {
    font-size: 0.72rem;
    color: #9ca3af;
    margin-top: 0.15rem;
}

/* Badge preavviso / rinnovo */

/* Testo muted vuoto */
.tsmp-empty {
    color: #9ca3af;
    font-size: 0.82rem;
}

/* Km */

/* Badge stato —— usa le classi calcolate dal ViewModel */
/* Le classi StatoBadgeClass seguono il pattern badge Corebeet gi—— nel ViewModel */

.tsmp-btn-action {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    border: 1px solid;
    background: transparent;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    text-decoration: none;
    font-size: 0.85rem;
}

.tsmp-btn-edit {
    color: #d97706;
    border-color: rgba(217, 119, 6, 0.2);
}

.tsmp-btn-edit:hover {
    background: rgba(217, 119, 6, 0.06);
    border-color: #d97706;
    color: #d97706;
    text-decoration: none;
}

.tsmp-btn-delete {
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.2);
}

.tsmp-btn-delete:hover {
    background: rgba(220, 38, 38, 0.06);
    border-color: #dc2626;
    color: #dc2626;
}

/* Empty state */

/* Responsive scroll */
.tsmp-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* USER > CREATE PAGE STYLES */
/* Card header (locale: variant green/cyan/accent/gray) */

/* Section label */
.uc-section-divider { border: 0; border-top: 1px solid var(--cb-light); margin: 1.25rem 0; }

/* Form */

/* Password strength hint */
.uc-password-hint { font-size: 0.72rem; color: var(--cb-muted); margin-top: 0.25rem; background: rgba(8,145,178,0.04); border-left: 3px solid var(--cb-cyan); padding: 0.4rem 0.65rem; }

/* Roles */
.uc-roles-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.uc-role-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem; border: 1px solid var(--cb-border); cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.uc-role-item:hover { background: rgba(5,150,105,0.03); border-color: rgba(5,150,105,0.2); }
.uc-role-item input[type="checkbox"] { width: 15px; height: 15px; border-radius: 0; accent-color: var(--cb-green); flex-shrink: 0; cursor: pointer; }
.uc-role-label { font-size: 0.82rem; font-weight: 500; color: var(--cb-dark); cursor: pointer; }

/* Status toggle */
.uc-status-row { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 0; }
.uc-status-sub { font-size: 0.72rem; color: var(--cb-muted); margin-top: 0.15rem; }
.uc-toggle-wrap { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.uc-toggle-wrap input { opacity: 0; width: 0; height: 0; position: absolute; }
.uc-toggle-slider { position: absolute; inset: 0; background: var(--cb-border); cursor: pointer; transition: background 0.2s; border-radius: 0; }
.uc-toggle-slider::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; transition: transform 0.2s; }
.uc-toggle-wrap input:checked + .uc-toggle-slider { background: var(--cb-green); }
.uc-toggle-wrap input:checked + .uc-toggle-slider::before { transform: translateX(20px); }

/* Info box */
.uc-info-box { background: rgba(8,145,178,0.04); border-left: 3px solid var(--cb-cyan); padding: 0.65rem 0.9rem; font-size: 0.78rem; color: var(--cb-gray); margin-top: 1rem; }

@media (max-width: 991.98px) {
    .uc-sidebar-sticky { position: static; }
    .uc-roles-grid { grid-template-columns: 1fr; }
}

/* USER > DETAILS PAGE STYLES */
/* Alerts */

/* Page header */
/* (ud-page-header/page-title/page-sub rimossi, usano cb-page-header/title/subtitle) */

/* Avatar */
.ud-avatar-wrap { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--cb-light); }
.ud-avatar { width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; font-weight: 700; background: rgba(227,72,36,0.1); color: var(--cb-accent); border: 1px solid rgba(227,72,36,0.2); flex-shrink: 0; letter-spacing: 0.02em; }
.ud-avatar-name { font-size: 1rem; font-weight: 700; color: var(--cb-dark); }
.ud-avatar-email { font-size: 0.78rem; color: var(--cb-muted); }

/* Fields (read-only) */

.ud-field:last-child, .ud-field--full:last-child { border-bottom: none; }

/* Badges */

/* Roles list */
.ud-roles-wrap { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* Status display */
.ud-status-row { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 0; border-bottom: 1px solid var(--cb-light); }
.ud-status-key { font-size: 0.82rem; color: var(--cb-gray); }

/* Danger zone */
.ud-danger-text { font-size: 0.78rem; color: var(--cb-muted); margin: 0 0 1rem; line-height: 1.5; }

/* Buttons */
.ud-btn-block { width: 100%; justify-content: center; }
.ud-action-stack { display: flex; flex-direction: column; gap: 0.5rem; }

@media (max-width: 991.98px) {
    .ud-sidebar-sticky { position: static; }
    .ud-fields-grid { grid-template-columns: 1fr; }
    .ud-field--full { grid-column: 1; }
}

/* USER > EDIT PAGE STYLES */

.ue-section-divider { border: 0; border-top: 1px solid var(--cb-light); margin: 1.25rem 0; }

/* Form */

/* Roles checklist */
.ue-roles-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.ue-role-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem; border: 1px solid var(--cb-border); cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.ue-role-item:hover { background: rgba(227,72,36,0.03); border-color: rgba(227,72,36,0.2); }
.ue-role-item input[type="checkbox"] { width: 15px; height: 15px; border-radius: 0; accent-color: var(--cb-accent); flex-shrink: 0; cursor: pointer; }
.ue-role-label { font-size: 0.82rem; font-weight: 500; color: var(--cb-dark); cursor: pointer; }

/* Status toggle */
.ue-status-row { display: flex; align-items: center; justify-content: space-between; padding: 0.85rem 0; }
.ue-status-sub { font-size: 0.72rem; color: var(--cb-muted); margin-top: 0.15rem; }
/* Custom toggle switch */
/* Toggle switch —— override Bootstrap form-switch */
.ue-card-body .form-switch .form-check-input { border-radius: 0 !important; border: 1px solid var(--cb-border); background-color: var(--cb-border); width: 44px; height: 24px; transition: background-color 0.2s, border-color 0.2s; cursor: pointer; }
.ue-card-body .form-switch .form-check-input:checked { background-color: var(--cb-green); border-color: var(--cb-green); }
.ue-card-body .form-switch .form-check-input:focus { box-shadow: 0 0 0 0.2rem rgba(227,72,36,0.12); border-color: var(--cb-accent); }

/* Info box sidebar */
.ue-info-box { background: rgba(8,145,178,0.04); border-left: 3px solid var(--cb-cyan); padding: 0.65rem 0.9rem; font-size: 0.78rem; color: var(--cb-gray); margin-top: 1rem; }

@media (max-width: 991.98px) {
    .ue-sidebar-sticky { position: static; }
    .ue-roles-grid { grid-template-columns: 1fr; }
}
@media (max-width: 575.98px) {
    .ue-roles-grid { grid-template-columns: 1fr; }
}

/* VALUTAZIONI > DETAILS PAGE STYLES */

.vd-page {
    padding: 2rem;
}

@media (max-width: 575.98px) {
    .vd-page { padding: 1rem; }
}

/* Header */
.vd-title {
    display: flex; align-items: center; gap: 0.75rem;
    font-size: 1.4rem; font-weight: 700; color: #151515;
    letter-spacing: -0.025em; margin: 0 0 0.35rem 0;
}
.vd-title-icon {
    width: 38px; height: 38px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(227,72,36,0.08); border: 1px solid rgba(227,72,36,0.15);
}
.vd-subtitle { font-size: 0.85rem; color: #6b7280; margin: 0; }
.vd-subtitle strong { color: #151515; }

/* Card info gara —— fields grid */

@media (max-width: 767.98px) {
    .vd-fields-grid { grid-template-columns: 1fr; }
}
@media (max-width: 767.98px) {
    .vd-field--full { grid-column: 1; }
}

/* Valutazione card —— due colonne */
.vd-val-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;
    margin-bottom: 1.5rem;
}
@media (max-width: 767.98px) {
    .vd-val-grid { grid-template-columns: 1fr; }
}

/* Badge semantici */

/* Stato row */
.vd-stato-row {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.6rem 0; border-bottom: 1px solid #EEEFF0; margin-bottom: 0.5rem;
}
.vd-stato-label {
    font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.04em; color: #6b7280; flex-shrink: 0;
}

/* Alert Corebeet */

.vd-alert--secondary {
    background: rgba(107,114,128,0.04);
    border-left: 4px solid #9ca3af; color: #6b7280;
}
.vd-alert--secondary i { color: #9ca3af; flex-shrink: 0; }

/* Info sistema —— audit row */

@media (max-width: 575.98px) {
    .vd-sys-grid { grid-template-columns: 1fr; }
}

/* VALUTAZIONI > CREATE TECNICA PAGE STYLES */

/* Header */
.vct-header { margin-bottom: 1.5rem; }
.vct-title {
    display: flex; align-items: center; gap: 0.75rem;
    font-size: 1.4rem; font-weight: 700; color: #151515;
    letter-spacing: -0.025em; margin: 0 0 0.35rem 0;
}
.vct-title-icon {
    width: 38px; height: 38px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(227,72,36,0.08); border: 1px solid rgba(227,72,36,0.15);
}
.vct-subtitle { font-size: 0.85rem; color: #6b7280; margin: 0; }

/* Fields grid (info lotto) */

@media (max-width: 767.98px) {
    .vct-fields-grid { grid-template-columns: 1fr; }
}
@media (max-width: 767.98px) {
    .vct-field--full { grid-column: 1; }
}

/* Alert Corebeet */

.vct-alert i { flex-shrink: 0; margin-top: 0.1rem; }
.vct-alert-body { flex: 1; }
.vct-alert-title { font-weight: 700; color: #151515; margin-bottom: 0.25rem; font-size: 0.85rem; }
.vct-alert-text  { color: #6b7280; font-size: 0.82rem; }

/* Form */
.vct-form-section-title {
    font-size: 0.82rem; font-weight: 600; color: #6b7280;
    text-transform: uppercase; letter-spacing: 0.03em;
    display: flex; align-items: center; gap: 0.4rem;
    margin-bottom: 0.75rem;
}
.vct-form-section-title i { color: #E34824; }

.vct-validation { color: #dc2626; font-size: 0.72rem; margin-top: 0.25rem; display: block; }

/* Radio esito */
.vct-radio-group { display: flex; flex-direction: column; gap: 0.65rem; }
.vct-radio-item {
    display: flex; align-items: center; gap: 0.65rem;
    padding: 0.75rem 1rem; border: 1px solid #e0e1e3;
    cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.vct-radio-item:hover { border-color: #9ca3af; background: rgba(107,114,128,0.03); }
.vct-radio-item input[type="radio"] {
    width: 16px; height: 16px; accent-color: #E34824;
    flex-shrink: 0; cursor: pointer;
}
.vct-radio-item.is-success { border-color: rgba(5,150,105,0.3); background: rgba(5,150,105,0.03); }
.vct-radio-item.is-danger  { border-color: rgba(220,38,38,0.3);  background: rgba(220,38,38,0.03); }
.vct-radio-sub   { font-size: 0.75rem; color: #6b7280; margin-top: 0.1rem; }

/* Info box (nota finale) */
.vct-info-box {
    background: rgba(8,145,178,0.04);
    border-left: 3px solid #0891b2;
    padding: 0.65rem 0.9rem; font-size: 0.82rem; color: #151515;
    display: flex; align-items: flex-start; gap: 0.5rem;
}
.vct-info-box i { color: #0891b2; flex-shrink: 0; margin-top: 0.1rem; }

/* Validation summary */
.vct-validation-summary {
    display: flex; align-items: flex-start; gap: 0.65rem;
    padding: 0.85rem 1.25rem; font-size: 0.85rem;
    background: rgba(220,38,38,0.04);
    border: 1px solid #e0e1e3; border-left: 4px solid #dc2626;
    border-radius: 0; margin-bottom: 1.25rem; color: #dc2626;
}

.vct-btn--secondary {
    background: transparent; color: #6b7280; border-color: #e0e1e3;
}
.vct-btn--secondary:hover { background: #f3f4f6; border-color: #e0e1e3; color: #6b7280; text-decoration: none; }
.vct-btn--sm {
    padding: 0.35rem 0.9rem; font-size: 0.78rem;
}

@media (max-width: 575.98px) {
    .vct-card-footer { justify-content: stretch; }
    .vct-btn { width: 100%; justify-content: center; }
}

/* VALUTAZIONI > CREATE ECONOMICA PAGE STYLES */

/* Header */
.vce-title {
    display: flex; align-items: center; gap: 0.75rem;
    font-size: 1.4rem; font-weight: 700; color: #151515;
    letter-spacing: -0.025em; margin: 0 0 0.35rem 0;
}
.vce-title-icon {
    width: 38px; height: 38px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(5,150,105,0.08); border: 1px solid rgba(5,150,105,0.15);
}
.vce-subtitle { font-size: 0.85rem; color: #6b7280; margin: 0; }

/* Fields grid (info lotto) */

@media (max-width: 767.98px) {
    .vce-fields-grid { grid-template-columns: 1fr; }
}
@media (max-width: 767.98px) {
    .vce-field--full { grid-column: 1; }
}

/* Badge */

/* Alert Corebeet */

.vce-alert i { flex-shrink: 0; margin-top: 0.1rem; }
.vce-alert-body { flex: 1; }
.vce-alert-title { font-weight: 700; color: #151515; margin-bottom: 0.25rem; font-size: 0.85rem; }
.vce-alert-text  { color: #6b7280; font-size: 0.82rem; }

/* Form */
.vce-form-section-title {
    font-size: 0.82rem; font-weight: 600; color: #6b7280;
    text-transform: uppercase; letter-spacing: 0.03em;
    display: flex; align-items: center; gap: 0.4rem;
    margin-bottom: 0.75rem;
}
.vce-form-section-title i { color: #E34824; }

.vce-validation { color: #dc2626; font-size: 0.72rem; margin-top: 0.25rem; display: block; }

/* Radio esito */
.vce-radio-group { display: flex; flex-direction: column; gap: 0.65rem; }
.vce-radio-item {
    display: flex; align-items: center; gap: 0.65rem;
    padding: 0.75rem 1rem; border: 1px solid #e0e1e3;
    cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.vce-radio-item:hover { border-color: #9ca3af; background: rgba(107,114,128,0.03); }
.vce-radio-item input[type="radio"] {
    width: 16px; height: 16px; accent-color: #E34824;
    flex-shrink: 0; cursor: pointer;
}
.vce-radio-item.is-success { border-color: rgba(5,150,105,0.3); background: rgba(5,150,105,0.03); }
.vce-radio-item.is-danger  { border-color: rgba(220,38,38,0.3);  background: rgba(220,38,38,0.03); }
.vce-radio-sub   { font-size: 0.75rem; color: #6b7280; margin-top: 0.1rem; }

/* Info box (nota finale) */
.vce-info-box {
    background: rgba(8,145,178,0.04);
    border-left: 3px solid #0891b2;
    padding: 0.65rem 0.9rem; font-size: 0.82rem; color: #151515;
    display: flex; align-items: flex-start; gap: 0.5rem;
}
.vce-info-box i { color: #0891b2; flex-shrink: 0; margin-top: 0.1rem; }

.vce-btn--secondary {
    background: transparent; color: #6b7280; border-color: #e0e1e3;
}
.vce-btn--secondary:hover { background: #f3f4f6; border-color: #e0e1e3; color: #6b7280; text-decoration: none; }
.vce-btn--sm {
    padding: 0.35rem 0.9rem; font-size: 0.78rem;
}

/* Validation summary */
.vce-validation-summary {
    display: flex; align-items: flex-start; gap: 0.65rem;
    padding: 0.85rem 1.25rem; font-size: 0.85rem;
    background: rgba(220,38,38,0.04);
    border: 1px solid #e0e1e3;
    border-left: 4px solid #dc2626;
    border-radius: 0; margin-bottom: 1.25rem; color: #dc2626;
}

@media (max-width: 575.98px) {
    .vce-card-footer { justify-content: stretch; }
    .vce-btn { width: 100%; justify-content: center; }
}

/* PROGETTI PAGE STYLES */

/* ===== pri- Progetti Index ===== */

/* Card header (locale: variant gray + flex spacing diverso da cb-card-header) */

/* Filter Card */
.pri-toggle-btn { background: none; border: none; cursor: pointer; color: #6b7280; padding: 0.25rem; line-height: 1; margin-left: auto; transition: transform 0.2s ease; }
.pri-toggle-btn.collapsed i { transform: rotate(-90deg); }
.pri-toggle-btn i { transition: transform 0.2s ease; display: inline-block; }
.pri-filter-row { display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; }
.pri-filter-field { display: flex; flex-direction: column; gap: 0.3rem; min-width: 160px; }
.pri-filter-field--grow { flex: 1; min-width: 200px; }

/* Labels & Inputs */
.pri-input { border: 1px solid #e0e1e3; font-size: 0.85rem; padding: 0.45rem 0.65rem; background: #fff; color: #151515; width: 100%; transition: border-color 0.2s, box-shadow 0.2s; }
.pri-input:focus { outline: none; border-color: #E34824; box-shadow: 0 0 0 0.2rem rgba(227,72,36,0.12); }

/* Table - colonne specifiche */
.pri-th-actions { text-align: right !important; width: 180px; }
.pri-link-name { font-weight: 600; color: #E34824; text-decoration: none; }
.pri-link-name:hover { color: #c93d1e; text-decoration: underline; }
.pri-td-desc { color: #6b7280; font-size: 0.82rem; max-width: 320px; }
.pri-td-date { white-space: nowrap; color: #151515; }
.pri-td-actions { text-align: right; white-space: nowrap; }

/* Action Buttons */
.pri-action-btn { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(0,0,0,0.15); background: transparent; text-decoration: none; transition: background 0.2s ease, border-color 0.2s ease; margin-left: 0.25rem; font-size: 0.85rem; }
.pri-action-btn--cyan { color: #0891b2; border-color: rgba(8,145,178,0.15); }
.pri-action-btn--cyan:hover { background: rgba(8,145,178,0.08); border-color: #0891b2; color: #0891b2; }
.pri-action-btn--accent { color: #E34824; border-color: rgba(227,72,36,0.15); }
.pri-action-btn--accent:hover { background: rgba(227,72,36,0.08); border-color: #E34824; color: #E34824; }
.pri-action-btn--amber { color: #d97706; border-color: rgba(217,119,6,0.15); }
.pri-action-btn--amber:hover { background: rgba(217,119,6,0.08); border-color: #d97706; color: #d97706; }
.pri-action-btn--danger { color: #dc2626; border-color: rgba(220,38,38,0.15); }
.pri-action-btn--danger:hover { background: rgba(220,38,38,0.08); border-color: #dc2626; color: #dc2626; }

/* Empty State */

/* Pagination */

/* ===== Responsive ===== */
@media (max-width: 991.98px) {
    .pri-filter-row { flex-direction: column; }
    .pri-filter-field { min-width: 100%; }
    .pri-filter-actions { width: 100%; }
    .pri-filter-actions .cb-btn { flex: 1; justify-content: center; }
    .pri-td-desc { max-width: 200px; }
}

@media (max-width: 575.98px) {
    .pri-pagination { justify-content: center; }
}

/* PROGETTI > CREATE PAGE STYLES */

/* ===== prc- Progetto Create ===== */

/* Sidebar */

/* Section Title */

.prc-input,
.prc-textarea { display: block; width: 100%; border: 1px solid #e0e1e3; font-size: 0.85rem; padding: 0.5rem 0.75rem; background: #fff; color: #151515; transition: border-color 0.2s, box-shadow 0.2s; font-family: inherit; }
.prc-input:focus,
.prc-textarea:focus { outline: none; border-color: #E34824; box-shadow: 0 0 0 0.2rem rgba(227,72,36,0.12); }
.prc-textarea { resize: vertical; min-height: 100px; }

/* Row / Col */
.prc-row { display: flex; gap: 1rem; }

/* Info Box */
.prc-info-box { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.82rem; color: #6b7280; padding: 0.5rem 0.65rem; background: rgba(8,145,178,0.04); border-left: 3px solid #0891b2; margin-bottom: 0.6rem; }
.prc-info-box i { color: #0891b2; margin-top: 0.1rem; flex-shrink: 0; }
.prc-info-box:last-child { margin-bottom: 0; }

/* ===== Responsive ===== */
@media (max-width: 991.98px) {
    .prc-sidebar { position: static; }
}

@media (max-width: 575.98px) {
    .prc-row { flex-direction: column; gap: 0; }
}

/* PROGETTI > DETAILS PAGE STYLES */

/* ===== prd- Progetto Details ===== */

/* Header */
.prd-title { font-size: 1.45rem; font-weight: 700; color: #151515; letter-spacing: -0.025em; display: flex; align-items: center; gap: 0.5rem; margin: 0; }
.prd-subtitle { font-size: 0.85rem; color: #6b7280; margin: 0.25rem 0 0 0; }

/* Alerts */

.prd-alert span { flex: 1; }

/* Badge */

/* Table */
.prd-th-actions { text-align: right !important; width: 160px; }
.prd-td-actions { text-align: right; white-space: nowrap; }

/* Action Buttons */
.prd-action-btn { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(0,0,0,0.15); background: transparent; text-decoration: none; cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease; margin-left: 0.25rem; font-size: 0.85rem; }
.prd-action-btn--accent { color: #E34824; border-color: rgba(227,72,36,0.15); }
.prd-action-btn--accent:hover { background: rgba(227,72,36,0.08); border-color: #E34824; color: #E34824; }
.prd-action-btn--amber { color: #d97706; border-color: rgba(217,119,6,0.15); }
.prd-action-btn--amber:hover { background: rgba(217,119,6,0.08); border-color: #d97706; color: #d97706; }
.prd-action-btn--danger { color: #dc2626; border-color: rgba(220,38,38,0.15); }
.prd-action-btn--danger:hover { background: rgba(220,38,38,0.08); border-color: #dc2626; color: #dc2626; }

/* Empty State */

.prd-input { display: block; width: 100%; border: 1px solid #e0e1e3; font-size: 0.85rem; padding: 0.5rem 0.75rem; background: #fff; color: #151515; transition: border-color 0.2s, box-shadow 0.2s; font-family: inherit; }
.prd-input:focus { outline: none; border-color: #E34824; box-shadow: 0 0 0 0.2rem rgba(227,72,36,0.12); }

/* Info Box */
.prd-info-box { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.82rem; color: #6b7280; padding: 0.5rem 0.65rem; margin-top: 0.75rem; }
.prd-info-box i { margin-top: 0.1rem; flex-shrink: 0; }
.prd-info-box--danger { background: rgba(220,38,38,0.04); border-left: 3px solid #dc2626; color: #dc2626; }
.prd-info-box--danger i { color: #dc2626; }

/* ===== Responsive ===== */
@media (max-width: 991.98px) {
    .prd-field { flex-direction: column; }
    .prd-field-label { width: auto; margin-bottom: 0.15rem; }
}

@media (max-width: 575.98px) {
    .prd-page { padding: 1rem; }
    .prd-header { flex-direction: column; align-items: stretch; }
    .prd-header-right { width: 100%; display: flex; flex-direction: column; gap: 0.5rem; }
    .prd-header-right .prd-btn { width: 100%; justify-content: center; }
    .prd-title { font-size: 1.25rem; }
}

/* PROGETTI > EDIT PAGE STYLES */

/* ===== pre- Progetto Edit ===== */
/* Alerts */

.pre-card-header--amber::before { background: #d97706; }
.pre-card-header--green::before { background: #059669; }
.pre-card-header--cyan::before { background: #0891b2; }

/* Sidebar */

/* Section Title */

.pre-input,
.pre-textarea { display: block; width: 100%; border: 1px solid #e0e1e3; font-size: 0.85rem; padding: 0.5rem 0.75rem; background: #fff; color: #151515; transition: border-color 0.2s, box-shadow 0.2s; font-family: inherit; }
.pre-input:focus,
.pre-textarea:focus { outline: none; border-color: #E34824; box-shadow: 0 0 0 0.2rem rgba(227,72,36,0.12); }
.pre-textarea { resize: vertical; min-height: 100px; }

/* Row / Col */
.pre-row { display: flex; gap: 1rem; }

/* Info Box */
.pre-info-box { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.82rem; color: #6b7280; padding: 0.5rem 0.65rem; background: rgba(8,145,178,0.04); border-left: 3px solid #0891b2; margin-bottom: 0.6rem; }
.pre-info-box i { color: #0891b2; margin-top: 0.1rem; flex-shrink: 0; }
.pre-info-box:last-child { margin-bottom: 0; }

/* ===== Responsive ===== */
@media (max-width: 991.98px) {
    .pre-sidebar { position: static; }
}

@media (max-width: 575.98px) {
    .pre-page { padding: 1rem; }
    .pre-title { font-size: 1.25rem; }
    .pre-row { flex-direction: column; gap: 0; }
}

/* PROGETTI > DELETE PAGE STYLES */

/* ===== prdel- Progetto Delete ===== */

/* Header */
.prdel-header { margin-bottom: 1.5rem; }
.prdel-title { font-size: 1.45rem; font-weight: 700; color: #dc2626; letter-spacing: -0.025em; display: flex; align-items: center; gap: 0.5rem; margin: 0; }

/* Alerts */

.prdel-alert span { flex: 1; }

/* Sidebar */

/* ===== Responsive ===== */
@media (max-width: 991.98px) {
    .prdel-sidebar { position: static; }
    .prdel-field { flex-direction: column; }
    .prdel-field-label { width: auto; margin-bottom: 0.15rem; }
}

@media (max-width: 575.98px) {
    .prdel-page { padding: 1rem; }
    .prdel-title { font-size: 1.25rem; }
}

/* PROGETTI > GANTT PAGE STYLES */

/* ===== prg- Progetto Gantt ===== */

/* Header */
.prg-title { font-size: 1.45rem; font-weight: 700; color: #151515; letter-spacing: -0.025em; display: flex; align-items: center; gap: 0.5rem; margin: 0; }
.prg-subtitle { font-size: 0.85rem; color: #6b7280; margin: 0.25rem 0 0 0; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

/* Badge */

/* Alerts */

.prg-alert span { flex: 1; }

.prg-stat-sep { color: #9ca3af; font-weight: 400; margin: 0 0.15rem; }

/* Legend */
.prg-legend { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.25rem; }
.prg-legend-item { display: flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; color: #6b7280; }
.prg-legend-dot { width: 14px; height: 14px; flex-shrink: 0; }

/* Gantt Table */
.prg-table tfoot td { font-size: 0.82rem; font-weight: 700; color: #151515; padding: 0.7rem 0.6rem; border-bottom: 1px solid #e0e1e3; }

/* Sticky column */
.prg-sticky-col { position: sticky; left: 0; background: #fff; z-index: 1; font-weight: 700; }
thead .prg-sticky-col { background: #151515; z-index: 2; }
.prg-tfoot-anno .prg-sticky-col { background: #EEEFF0; }

/* Cell states */
.prg-active-cell { background-color: #e8f4e8 !important; }
.prg-scostamento-cell { background-color: #fff3cd !important; }

/* Cell values */
.prg-cell-values { font-size: 0.82rem; }
.prg-val-sep { color: #9ca3af; margin: 0 0.1rem; }
.prg-cell-scost { font-size: 0.65rem; font-weight: 700; }

/* Footer rows */
.prg-tfoot-anno td { background: #EEEFF0; }

/* Link */
.prg-link-name { font-weight: 600; color: #E34824; text-decoration: none; }
.prg-link-name:hover { color: #c93d1e; text-decoration: underline; }

/* Empty state */

/* ===== Responsive ===== */
@media (max-width: 991.98px) {
    .prg-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 575.98px) {
    .prg-page { padding: 1rem; }
    .prg-header { flex-direction: column; align-items: stretch; }
    .prg-header-right { width: 100%; flex-wrap: wrap; }
    .prg-title { font-size: 1.25rem; }
    .prg-stats { grid-template-columns: 1fr; }
    .prg-stat-num { font-size: 1.25rem; }
}

/* PROGETTI > GANTT DETTAGLIO PAGE STYLES */

/* ===== gd- Gantt Dettaglio ===== */

/* Header */
.gd-title { font-size: 1.35rem; font-weight: 700; color: #151515; letter-spacing: -0.025em; display: flex; align-items: center; gap: 0.5rem; margin: 0; }
.gd-title-muted { color: #6b7280; font-weight: 500; }
.gd-subtitle { font-size: 0.85rem; color: #6b7280; margin: 0.25rem 0 0 0; }

/* Badge */

/* Alerts */

.gd-alert span { flex: 1; }

/* Tabs (override Bootstrap nav-tabs) */
.gd-tabs-header.nav-tabs { border-bottom: 2px solid #e0e1e3; }
.gd-tabs-header.nav-tabs .gd-tab-btn.nav-link { padding: 0.85rem 1.25rem; font-size: 0.8rem; font-weight: 600; color: #6b7280; background: transparent; border: none; border-radius: 0; position: relative; white-space: nowrap; display: flex; align-items: center; gap: 0.35rem; cursor: pointer; transition: color 0.15s; }
.gd-tabs-header.nav-tabs .gd-tab-btn.nav-link:hover { color: #E34824; border-color: transparent; }
.gd-tabs-header.nav-tabs .gd-tab-btn.nav-link.active { color: #E34824; background: transparent; border-color: transparent; }
.gd-tabs-header.nav-tabs .gd-tab-btn.nav-link.active::after { content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 2px; background: #E34824; }

.gd-label { display: block; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: #151515; margin-bottom: 0.35rem; }

/* Info Box */
.gd-info-box { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.82rem; color: #6b7280; padding: 0.5rem 0.65rem; background: rgba(8,145,178,0.04); border-left: 3px solid #0891b2; }
.gd-info-box i { color: #0891b2; margin-top: 0.1rem; flex-shrink: 0; }

.gd-header-info { font-size: 0.78rem; color: #9ca3af; }

/* Btn extras */

.gd-table tfoot td { font-size: 0.82rem; font-weight: 700; color: #151515; padding: 0.7rem 0.6rem; border-bottom: 1px solid #e0e1e3; }

/* Sticky column */
.gd-sticky-col { position: sticky; left: 0; background: #fff; z-index: 1; font-weight: 700; }
thead .gd-sticky-col { background: #151515; z-index: 2; }
.gd-tfoot-progetto .gd-sticky-col { background: #fff3cd; }

/* Cell states */
.gd-active-cell { background-color: #e8f4e8 !important; }
.gd-disabled-cell { background-color: #f5f5f5 !important; color: #ccc; }
.gd-disabled-header { opacity: 0.4; }
.gd-scostamento-cell { background-color: #fff3cd !important; }
.gd-terminated-cell { background-color: #fce4e4 !important; }

/* Cell values */
.gd-val-sep { color: #9ca3af; margin: 0 0.1rem; }
.gd-tfoot-progetto td { background: #fff3cd; }
.gd-tfoot-sub { font-size: 0.68rem; font-weight: 400; color: #9ca3af; }

/* Ore input */
.gd-ore-input { width: 65px; margin: 0 auto; display: block; border: 1px solid #e0e1e3; font-size: 0.8rem; padding: 2px 4px; text-align: center; background: #fff; color: #151515; transition: border-color 0.2s, box-shadow 0.2s; }
.gd-ore-input:focus { outline: none; border-color: #E34824; box-shadow: 0 0 0 2px rgba(227,72,36,0.15); }

/* Empty state */

/* Mese select (header) */
.gd-mese-select { display: flex; align-items: center; gap: 0.4rem; }
.gd-label-inline { font-size: 0.78rem; font-weight: 600; color: #151515; white-space: nowrap; }

/* Rendicontazione section */
.gd-rend-section { border-top: 2px solid #e0e1e3; padding: 1.25rem 1.5rem; }
.gd-rend-title { font-size: 0.88rem; font-weight: 700; color: #151515; margin: 0 0 1rem 0; display: flex; align-items: center; gap: 0.4rem; }
.gd-rend-table { margin-bottom: 0; }
.gd-rend-thead th { background: #059669 !important; color: #fff; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; padding: 0.65rem 0.6rem; }

/* Ore max label */
.gd-ore-max-label { font-size: 0.65rem; color: #0891b2; margin-top: 0.2rem; text-align: center; }

/* ===== Responsive ===== */
@media (max-width: 991.98px) {
    .gd-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 575.98px) {
    .gd-page { padding: 1rem; }
    .gd-header { flex-direction: column; align-items: stretch; }
    .gd-header-right { width: 100%; }
    .gd-header-right .gd-btn { width: 100%; justify-content: center; }
    .gd-title { font-size: 1.15rem; }
    .gd-stats { grid-template-columns: 1fr; }
}

/* HEADER / BUTTONS / ALERTS / CARD —— migrati a .cb-* utilities */

/* Badge */

/* Filter Card */
.rsi-toggle-btn { background: none; border: none; cursor: pointer; color: #6b7280; padding: 0.25rem; line-height: 1; margin-left: auto; transition: transform 0.2s ease; }
.rsi-toggle-btn.collapsed i { transform: rotate(-90deg); }
.rsi-toggle-btn i { transition: transform 0.2s ease; display: inline-block; }
.rsi-filter-row { display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; }
.rsi-filter-field { display: flex; flex-direction: column; gap: 0.3rem; min-width: 160px; }
.rsi-filter-field--grow { flex: 1; min-width: 200px; }

/* Labels & Inputs */
.rsi-input { border: 1px solid #e0e1e3; font-size: 0.85rem; padding: 0.45rem 0.65rem; background: #fff; color: #151515; width: 100%; transition: border-color 0.2s, box-shadow 0.2s; }
.rsi-input:focus { outline: none; border-color: #E34824; box-shadow: 0 0 0 0.2rem rgba(227,72,36,0.12); }

/* Table —— migrato a .cb-table */
.cb-table .rsi-th-actions { text-align: right !important; width: 200px; }
.cb-table .rsi-td-actions { text-align: right; white-space: nowrap; }

/* Action Buttons */
.rsi-action-btn { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(0,0,0,0.15); background: transparent; text-decoration: none; transition: background 0.2s ease, border-color 0.2s ease; margin-left: 0.25rem; font-size: 0.85rem; }
.rsi-action-btn--amber { color: #d97706; border-color: rgba(217,119,6,0.15); }
.rsi-action-btn--amber:hover { background: rgba(217,119,6,0.08); border-color: #d97706; color: #d97706; }
.rsi-action-btn--danger { color: #dc2626; border-color: rgba(220,38,38,0.15); }
.rsi-action-btn--danger:hover { background: rgba(220,38,38,0.08); border-color: #dc2626; color: #dc2626; }
.rsi-action-btn--accent { color: #E34824; border-color: rgba(227,72,36,0.15); }
.rsi-action-btn--accent:hover { background: rgba(227,72,36,0.08); border-color: #E34824; color: #E34824; }
.rsi-action-btn--cyan { color: #0891b2; border-color: rgba(8,145,178,0.15); }
.rsi-action-btn--cyan:hover { background: rgba(8,145,178,0.08); border-color: #0891b2; color: #0891b2; }

/* Empty State */

/* Pagination */

/* ===== Responsive ===== */
@media (max-width: 991.98px) {
    .rsi-filter-row { flex-direction: column; }
    .rsi-filter-field { min-width: 100%; }
    .rsi-filter-actions { width: 100%; }
    .rsi-filter-actions .rsi-btn { flex: 1; justify-content: center; }
}

@media (max-width: 575.98px) {
    .rsi-page { padding: 1rem; }
    .rsi-header { flex-direction: column; align-items: stretch; }
    .rsi-header-right { width: 100%; }
    .rsi-header-right .rsi-btn { width: 100%; justify-content: center; }
    .rsi-title { font-size: 1.25rem; }
    .rsi-pagination { justify-content: center; }
}

/* RISORSE > CREATE PAGE STYLES */

/* ===== rsc- Risorsa Create ===== */

/* Card header (locale: variant accent/green/cyan) */

/* Sidebar */

/* Section Title */

.rsc-input { display: block; width: 100%; border: 1px solid #e0e1e3; font-size: 0.85rem; padding: 0.5rem 0.75rem; background: #fff; color: #151515; transition: border-color 0.2s, box-shadow 0.2s; font-family: inherit; }
.rsc-input:focus { outline: none; border-color: #E34824; box-shadow: 0 0 0 0.2rem rgba(227,72,36,0.12); }

/* Row / Col */
.rsc-row { display: flex; gap: 1rem; }

/* Info Box */
.rsc-info-box { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.82rem; color: #6b7280; padding: 0.5rem 0.65rem; background: rgba(8,145,178,0.04); border-left: 3px solid #0891b2; margin-bottom: 0.6rem; }
.rsc-info-box i { color: #0891b2; margin-top: 0.1rem; flex-shrink: 0; }
.rsc-info-box:last-child { margin-bottom: 0; }

/* ===== Responsive ===== */
@media (max-width: 991.98px) {
    .rsc-sidebar { position: static; }
}

@media (max-width: 575.98px) {
    .rsc-row { flex-direction: column; gap: 0; }
}

/* RISORSE > EDIT PAGE STYLES */

/* ===== rse- Risorsa Edit ===== */
/* Alerts */

/* Conflict cards */
.rse-conflict-card { border: 1px solid rgba(217,119,6,0.3); margin-bottom: 0.75rem; overflow: hidden; }
.rse-conflict-header { padding: 0.5rem 1rem; background: rgba(217,119,6,0.06); border-bottom: 1px solid rgba(217,119,6,0.2); display: flex; justify-content: space-between; align-items: center; font-size: 0.82rem; flex-wrap: wrap; gap: 0.5rem; }
.rse-conflict-table thead th { background: #EEEFF0 !important; color: #151515; font-size: 0.72rem; }
.rse-conflict-table tbody td { font-size: 0.8rem; }

/* Confirm box */
.rse-confirm-box { background: rgba(217,119,6,0.04); border: 1px solid rgba(217,119,6,0.2); border-left: 4px solid #d97706; padding: 1rem 1.25rem; margin-bottom: 1.25rem; }
.rse-confirm-text { font-size: 0.82rem; color: #151515; margin: 0 0 0.75rem 0; }
.rse-check-row { display: flex; align-items: flex-start; gap: 0.5rem; }
.rse-check-label { font-size: 0.82rem; font-weight: 700; color: #151515; cursor: pointer; }

/* Sidebar */

/* Section Title */

.rse-input { display: block; width: 100%; border: 1px solid #e0e1e3; font-size: 0.85rem; padding: 0.5rem 0.75rem; background: #fff; color: #151515; transition: border-color 0.2s, box-shadow 0.2s; font-family: inherit; }
.rse-input:focus { outline: none; border-color: #E34824; box-shadow: 0 0 0 0.2rem rgba(227,72,36,0.12); }

/* Row / Col */
.rse-row { display: flex; gap: 1rem; }

/* Badge */

/* Table (conflicts) */
.rse-table thead th { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; padding: 0.5rem 0.75rem; text-align: left; white-space: nowrap; }
.rse-table tbody td { font-size: 0.82rem; color: #151515; padding: 0.5rem 0.75rem; border-bottom: 1px solid #EEEFF0; }

/* Info Box */
.rse-info-box { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.82rem; color: #6b7280; padding: 0.5rem 0.65rem; background: rgba(8,145,178,0.04); border-left: 3px solid #0891b2; margin-bottom: 0.6rem; }
.rse-info-box i { color: #0891b2; margin-top: 0.1rem; flex-shrink: 0; }
.rse-info-box:last-child { margin-bottom: 0; }

/* ===== Responsive ===== */
@media (max-width: 991.98px) {
    .rse-sidebar { position: static; }
}

@media (max-width: 575.98px) {
    .rse-row { flex-direction: column; gap: 0; }
    .rse-conflict-header { flex-direction: column; }
}

/* RISORSE > DELETE PAGE STYLES */

/* ===== rsdel- Risorsa Delete ===== */

/* Header */
.rsdel-header { margin-bottom: 1.5rem; }
.rsdel-title { font-size: 1.45rem; font-weight: 700; color: #dc2626; letter-spacing: -0.025em; display: flex; align-items: center; gap: 0.5rem; margin: 0; }

/* Alerts */

.rsdel-alert span { flex: 1; }

/* Sidebar */

/* Badge */

/* ===== Responsive ===== */
@media (max-width: 991.98px) {
    .rsdel-sidebar { position: static; }
    .rsdel-field { flex-direction: column; }
    .rsdel-field-label { width: auto; margin-bottom: 0.15rem; }
}

@media (max-width: 575.98px) {
    .rsdel-page { padding: 1rem; }
    .rsdel-title { font-size: 1.25rem; }
}

/* RISORSE > GANTT PAGE STYLES */

/* ===== rsg- Risorsa Gantt ===== */

/* Header */
.rsg-title { font-size: 1.35rem; font-weight: 700; color: #151515; letter-spacing: -0.025em; display: flex; align-items: center; gap: 0.5rem; margin: 0; }
.rsg-subtitle { margin: 0.25rem 0 0 0; }

/* Year Bar */
.rsg-year-bar { display: flex; align-items: center; justify-content: center; gap: 0.35rem; padding: 0.75rem 1rem; background: #fff; border: 1px solid #e0e1e3; margin-bottom: 1rem; }
.rsg-year-btn { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #e0e1e3; background: #fff; color: #151515; text-decoration: none; cursor: pointer; transition: background 0.2s, border-color 0.2s; font-size: 0.85rem; }
.rsg-year-btn:hover:not(:disabled) { background: rgba(227,72,36,0.06); border-color: #E34824; color: #E34824; }
.rsg-year-btn:disabled { color: #9ca3af; cursor: not-allowed; opacity: 0.5; }
.rsg-year-btn.dropdown-toggle { width: auto; padding: 0 0.5rem; }
.rsg-year-btn.dropdown-toggle::after { margin-left: 0.3rem; }
.rsg-year-label { font-size: 1.15rem; font-weight: 700; color: #151515; min-width: 3.5rem; text-align: center; }

/* Badge */

.rsg-stat-sep { color: #9ca3af; font-weight: 400; margin: 0 0.15rem; }

/* Legend */
.rsg-legend { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.25rem; }
.rsg-legend-item { display: flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; color: #6b7280; }
.rsg-legend-dot { width: 14px; height: 14px; flex-shrink: 0; }

/* Gantt Table */
.rsg-table tfoot td { font-size: 0.82rem; font-weight: 700; color: #151515; padding: 0.7rem 0.6rem; border-bottom: 1px solid #e0e1e3; }

/* Sticky column */
.rsg-sticky-col { position: sticky; left: 0; background: #fff; z-index: 1; font-weight: 700; }
thead .rsg-sticky-col { background: #151515; z-index: 2; }
.rsg-tfoot-anno .rsg-sticky-col { background: #EEEFF0; }
.rsg-tfoot-progetto .rsg-sticky-col { background: #fff3cd; }

/* Cell states */
.rsg-active-cell { background-color: #e8f4e8 !important; }
.rsg-disabled-cell { background-color: #f5f5f5 !important; color: #ccc; }
.rsg-terminated-cell { background-color: #fce4e4 !important; }
.rsg-scostamento-cell { background-color: #fff3cd !important; }

/* Cell values */
.rsg-val-sep { color: #9ca3af; margin: 0 0.1rem; }
.rsg-cell-scost { font-size: 0.6rem; font-weight: 700; }

/* Footer rows */
.rsg-tfoot-anno td { background: #EEEFF0; }
.rsg-tfoot-progetto td { background: #fff3cd; }
.rsg-tfoot-sub { font-size: 0.68rem; font-weight: 400; color: #9ca3af; }

/* Link */
.rsg-link-name { color: #E34824; text-decoration: none; font-weight: 600; }
.rsg-link-name:hover { color: #c93d1e; text-decoration: underline; }

/* Chart */
.rsg-chart-body { padding: 1.5rem; }
.rsg-chart-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0; text-align: center; }
.rsg-chart-col { display: flex; flex-direction: column; align-items: center; }
.rsg-chart-bars { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.rsg-chart-bar { width: 14px; z-index: 1; }
.rsg-chart-bar--plan { background-color: rgba(227,72,36,0.4); }
.rsg-chart-bar--eff { background-color: rgba(5,150,105,0.7); }
.rsg-chart-bar--exceed { background-color: rgba(220,38,38,0.7); box-shadow: 0 0 4px rgba(220,38,38,0.5); }
.rsg-chart-max-line { position: absolute; left: 0; right: 0; border-top: 2px dashed #dc2626; z-index: 2; }
.rsg-chart-month { font-size: 0.75rem; color: #6b7280; margin-top: 0.35rem; font-weight: 500; }
.rsg-chart-val { font-size: 0.7rem; }
.rsg-chart-exceed-label { font-size: 0.6rem; font-weight: 700; color: #dc2626; }
.rsg-chart-max-label { font-size: 0.6rem; color: #9ca3af; }
.rsg-chart-legend { display: flex; gap: 1rem; margin-left: auto; font-size: 0.75rem; color: #6b7280; }
.rsg-chart-legend-item { display: flex; align-items: center; gap: 0.3rem; }
.rsg-chart-legend-dot { width: 12px; height: 12px; flex-shrink: 0; }
.rsg-chart-legend-line { width: 12px; height: 0; border-top: 2px dashed #dc2626; flex-shrink: 0; }

/* Empty state */

/* ===== Responsive ===== */
@media (max-width: 991.98px) {
    .rsg-stats { grid-template-columns: repeat(2, 1fr); }
    .rsg-chart-legend { flex-wrap: wrap; }
}

@media (max-width: 575.98px) {
    .rsg-page { padding: 1rem; }
    .rsg-header { flex-direction: column; align-items: stretch; }
    .rsg-header-right { width: 100%; }
    .rsg-header-right .rsg-btn { width: 100%; justify-content: center; }
    .rsg-title { font-size: 1.15rem; }
    .rsg-stats { grid-template-columns: 1fr; }
    .rsg-stat-num { font-size: 1.25rem; }
}

/* RISORSE > ORE MASSIME PAGE STYLES */

/* ===== rsom- Risorsa OreMassime ===== */

/* Header */
.rsom-title { font-size: 1.35rem; font-weight: 700; color: #151515; letter-spacing: -0.025em; display: flex; align-items: center; gap: 0.5rem; margin: 0; }
.rsom-subtitle { font-size: 0.85rem; color: #151515; margin: 0.25rem 0 0 0; }
.rsom-ruoli { display: flex; gap: 0.35rem; margin-top: 0.35rem; flex-wrap: wrap; }

/* Year Bar */
.rsom-year-bar { display: flex; align-items: center; justify-content: center; gap: 0.35rem; padding: 0.75rem 1rem; background: #fff; border: 1px solid #e0e1e3; margin-bottom: 1rem; }
.rsom-year-btn { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #e0e1e3; background: #fff; color: #151515; text-decoration: none; cursor: pointer; transition: background 0.2s, border-color 0.2s; font-size: 0.85rem; }
.rsom-year-btn:hover:not(:disabled) { background: rgba(227,72,36,0.06); border-color: #E34824; color: #E34824; }
.rsom-year-btn:disabled { color: #9ca3af; cursor: not-allowed; opacity: 0.5; }
.rsom-year-label { font-size: 1.15rem; font-weight: 700; color: #151515; min-width: 3.5rem; text-align: center; }

/* Badge */

/* Alerts */

.rsom-alert span { flex: 1; }

.rsom-header-info { font-size: 0.78rem; color: #9ca3af; }

/* Months Grid */
.rsom-months-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.rsom-month-item { display: flex; flex-direction: column; gap: 0.3rem; }
.rsom-month-label { font-size: 0.8rem; font-weight: 600; color: #151515; }
.rsom-input-wrap { display: flex; align-items: center; }
.rsom-ore-input { border: 1px solid #e0e1e3; font-size: 0.85rem; padding: 0.4rem 0.5rem; text-align: center; background: #fff; color: #151515; width: 100%; transition: border-color 0.2s, box-shadow 0.2s; }
.rsom-ore-input:focus { outline: none; border-color: #E34824; box-shadow: 0 0 0 0.2rem rgba(227,72,36,0.12); }
.rsom-ore-disabled { background: #EEEFF0; color: #9ca3af; }
.rsom-input-suffix { background: #EEEFF0; border: 1px solid #e0e1e3; border-left: none; padding: 0.4rem 0.6rem; font-size: 0.82rem; color: #6b7280; }

/* Conflict cards */
.rsom-conflict-card { border: 1px solid rgba(220,38,38,0.3); margin-bottom: 0.75rem; overflow: hidden; }
.rsom-conflict-header { padding: 0.5rem 1rem; background: rgba(220,38,38,0.06); border-bottom: 1px solid rgba(220,38,38,0.2); display: flex; justify-content: space-between; align-items: center; font-size: 0.82rem; flex-wrap: wrap; gap: 0.5rem; }
.rsom-conflict-total td { background: rgba(220,38,38,0.04); }

/* Table (conflicts) */
.rsom-table thead th { background: #EEEFF0; color: #151515; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; padding: 0.5rem 0.75rem; text-align: left; }
.rsom-table tbody td { font-size: 0.8rem; color: #151515; padding: 0.5rem 0.75rem; border-bottom: 1px solid #EEEFF0; }

/* Confirm box */
.rsom-confirm-box { background: rgba(220,38,38,0.04); border: 1px solid rgba(220,38,38,0.2); border-left: 4px solid #dc2626; padding: 1rem 1.25rem; margin-top: 1rem; }
.rsom-confirm-text { font-size: 0.82rem; color: #151515; margin: 0 0 0.75rem 0; }
.rsom-check-row { display: flex; align-items: flex-start; gap: 0.5rem; }
.rsom-check-label { font-size: 0.82rem; font-weight: 700; color: #151515; cursor: pointer; }

/* Actions bar */
.rsom-actions-bar { border-top: 1px solid #EEEFF0; padding-top: 1.25rem; margin-top: 1.25rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.rsom-quick-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.rsom-quick-input-wrap { display: flex; align-items: center; gap: 0; }
.rsom-quick-input-wrap .rsom-ore-input { width: 80px; border-right: none; }
.rsom-action-btn { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #e0e1e3; background: #fff; cursor: pointer; transition: background 0.2s, border-color 0.2s; font-size: 0.85rem; }
.rsom-action-btn--cyan { color: #0891b2; }
.rsom-action-btn--cyan:hover { background: rgba(8,145,178,0.08); border-color: #0891b2; }

/* Info Box */
.rsom-info-box { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.82rem; color: #6b7280; padding: 0.75rem 1rem; background: rgba(8,145,178,0.04); border-left: 3px solid #0891b2; }
.rsom-info-box i { color: #0891b2; margin-top: 0.1rem; flex-shrink: 0; }

/* ===== Responsive ===== */
@media (max-width: 767.98px) {
    .rsom-months-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 575.98px) {
    .rsom-page { padding: 1rem; }
    .rsom-header { flex-direction: column; align-items: stretch; }
    .rsom-header-right { width: 100%; }
    .rsom-header-right .rsom-btn { width: 100%; justify-content: center; }
    .rsom-title { font-size: 1.15rem; }
    .rsom-months-grid { grid-template-columns: repeat(2, 1fr); }
    .rsom-stats { grid-template-columns: 1fr; }
    .rsom-actions-bar { flex-direction: column; align-items: stretch; }
    .rsom-actions-bar .rsom-btn-accent { width: 100%; justify-content: center; }
}

/* IMPORT SOGGETTI > INDEX PAGE STYLES */

/* ===== sgi- ImportSoggetti Index ===== */

/* Dropzone */
.sgi-dropzone { border: 2px dashed #e0e1e3; padding: 2.5rem 1.5rem; text-align: center; cursor: pointer; transition: border-color 0.2s, background 0.2s; background: #EEEFF0; position: relative; }
.sgi-dropzone:hover,
.sgi-dropzone.dragover { border-color: #E34824; background: rgba(227,72,36,0.02); }
.sgi-dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.sgi-dropzone-icon { font-size: 2.5rem; color: #9ca3af; margin-bottom: 0.75rem; display: block; }
.sgi-dropzone-text { font-size: 0.92rem; color: #151515; font-weight: 500; margin-bottom: 0.25rem; }
.sgi-dropzone-sub { font-size: 0.78rem; color: #9ca3af; }
.sgi-file-selected { display: none; align-items: center; gap: 0.5rem; margin-top: 0.75rem; padding: 0.5rem 0.75rem; background: rgba(227,72,36,0.06); border: 1px solid rgba(227,72,36,0.15); font-size: 0.82rem; color: #E34824; font-weight: 500; }
.sgi-upload-actions { display: flex; gap: 0.75rem; align-items: center; margin-top: 1.25rem; }

/* Rules */
.sgi-rule { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.6rem 0; border-bottom: 1px solid #EEEFF0; font-size: 0.83rem; }
.sgi-rule:last-child { border-bottom: none; padding-bottom: 0; }
.sgi-rule-num { width: 22px; height: 22px; background: #E34824; color: #fff; font-size: 0.72rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 0.1rem; }
.sgi-rule-text { color: #151515; line-height: 1.5; }

/* Mapping table */
.sgi-mapping-table { width: 100%; font-size: 0.82rem; border-collapse: collapse; }
.sgi-mapping-table th { padding: 0.4rem 0.6rem; text-align: left; font-weight: 600; color: #6b7280; border-bottom: 1px solid #e0e1e3; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; }
.sgi-mapping-table td { padding: 0.4rem 0.6rem; border-bottom: 1px solid #EEEFF0; color: #151515; vertical-align: middle; }
.sgi-mapping-table tr:last-child td { border-bottom: none; }
.sgi-code { font-family: monospace; background: #EEEFF0; padding: 0.1rem 0.35rem; font-size: 0.78rem; color: #E34824; }

/* ===== Responsive ===== */
@media (max-width: 575.98px) {
    .sgi-upload-actions { flex-direction: column; }
    .sgi-upload-actions .cb-btn { width: 100%; justify-content: center; }
}

/* IMPORT SOGGETTI > _IMPORTLOGTABLE PAGE STYLES */

/* Log Table (partial _ImportLogTable) */
.sgr-code { font-family: monospace; background: #EEEFF0; padding: 0.1rem 0.35rem; font-size: 0.78rem; color: #E34824; }
.sgr-muted { color: #9ca3af; font-size: 0.75rem; }
.sgr-msg { font-size: 0.8rem; color: #6b7280; }
.sgr-empty { text-align: center; padding: 1.5rem 1rem; font-size: 0.85rem; color: #059669; display: flex; align-items: center; justify-content: center; gap: 0.35rem; }

/* IMPORT SOGGETTI > RISULTATO PAGE STYLES */

/* ===== sgr- ImportSoggetti Risultato ===== */
.sgr-page { padding: 2rem; max-width: 1100px; }

/* Header */
.sgr-title { font-size: 1.45rem; font-weight: 700; color: #151515; letter-spacing: -0.025em; display: flex; align-items: center; gap: 0.5rem; margin: 0; }
.sgr-filename { font-size: 0.78rem; color: #9ca3af; font-family: monospace; margin-top: 0.25rem; display: flex; align-items: center; gap: 0.3rem; }

/* Banner */
.sgr-banner { padding: 0.85rem 1.25rem; display: flex; align-items: center; gap: 0.6rem; font-size: 0.85rem; font-weight: 500; margin-bottom: 1.5rem; border: 1px solid; }
.sgr-banner--success { background: rgba(5,150,105,0.05); border-color: rgba(5,150,105,0.2); color: #059669; }
.sgr-banner--warn { background: rgba(217,119,6,0.05); border-color: rgba(217,119,6,0.2); color: #d97706; }
.sgr-banner--danger { background: rgba(220,38,38,0.05); border-color: rgba(220,38,38,0.2); color: #dc2626; }
.sgr-banner span { flex: 1; }

/* KPI strip */
.sgr-kpi-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.85rem; margin-bottom: 1.5rem; }
.sgr-kpi { background: #fff; border: 1px solid #e0e1e3; padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.25rem; }
.sgr-kpi-value { font-size: 1.9rem; font-weight: 800; line-height: 1; color: #151515; }
.sgr-kpi-label { font-size: 0.68rem; color: #9ca3af; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.sgr-kpi--success .sgr-kpi-value { color: #059669; }
.sgr-kpi--warn .sgr-kpi-value { color: #d97706; }
.sgr-kpi--danger .sgr-kpi-value { color: #dc2626; }
.sgr-kpi--info .sgr-kpi-value { color: #0891b2; }
.sgr-kpi--muted .sgr-kpi-value { color: #9ca3af; }

.sgr-card-header:hover { background: rgba(227,72,36,0.03); }

/* Count badges */
.sgr-card-count { font-size: 0.72rem; padding: 0.15rem 0.55rem; font-weight: 700; }

/* Chevron toggle */
.sgr-chevron { transition: transform 0.2s; color: #9ca3af; margin-left: auto; }
.collapsed .sgr-chevron { transform: rotate(-90deg); }

/* ===== Responsive ===== */
@media (max-width: 575.98px) {
    .sgr-page { padding: 1rem; }
    .sgr-header { flex-direction: column; align-items: stretch; }
    .sgr-header-right { width: 100%; flex-direction: column; }
    .sgr-header-right .sgr-btn { width: 100%; justify-content: center; }
    .sgr-title { font-size: 1.25rem; }
    .sgr-kpi-strip { grid-template-columns: repeat(2, 1fr); }
}

/* REVISO > AllineamentoSoggetti PAGE STYLES */

/* —— Page icon (locale: 48px square per branding Reviso) —— */
.rva-page-icon {
    width: 48px; height: 48px; border-radius: 0;
    background: rgba(227,72,36,0.08); border: 1px solid rgba(227,72,36,0.15);
    color: #E34824; display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
}

/* —— Bottoni (usati in JS template strings —— NON rimuovere) —— */
.rva-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    padding: .55rem 1.5rem; font-size: .85rem; font-weight: 600;
    border-radius: 0; border: 2px solid transparent; cursor: pointer;
    text-decoration: none; transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.rva-btn-secondary { background: transparent; color: #6b7280; border-color: #e0e1e3; }
.rva-btn-secondary:hover { background: #f3f4f6; border-color: #e0e1e3; color: #6b7280; }
.rva-btn-sm { padding: .35rem .75rem; font-size: .78rem; }

/* —— Launch card —— */
.rva-launch-card {
    background: #fff; border: 1px solid #e0e1e3; border-radius: 0;
    padding: 2.5rem; text-align: center; max-width: 520px; margin: 0 auto;
    position: relative; overflow: hidden;
}
.rva-launch-card::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0;
    width: 4px; background: #E34824;
}
.rva-launch-icon { font-size: 2.5rem; color: #E34824; margin-bottom: 1rem; }
.rva-launch-desc { color: #6b7280; font-size: .85rem; margin-bottom: 1.5rem; }

/* —— KPI bar —— */
.rva-kpi-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; margin-bottom: 1.5rem; }
.rva-kpi {
    background: #fff; border: 1px solid #e0e1e3; border-radius: 0;
    padding: 1rem; text-align: center; cursor: pointer;
    transition: transform .15s, box-shadow .15s; position: relative; overflow: hidden;
}
.rva-kpi::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0;
    width: 3px; background: #e0e1e3;
}
.rva-kpi:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.rva-kpi-num  { font-size: 1.8rem; font-weight: 800; line-height: 1.1; }
.rva-kpi-label{ font-size: .68rem; color: #6b7280; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-top: .35rem; }
.rva-kpi--warning::before { background: #d97706; } .rva-kpi--warning .rva-kpi-num { color: #d97706; }
.rva-kpi--danger::before  { background: #dc2626; } .rva-kpi--danger  .rva-kpi-num { color: #dc2626; }
.rva-kpi--info::before    { background: #0891b2; } .rva-kpi--info    .rva-kpi-num { color: #0891b2; }
.rva-kpi--success::before { background: #059669; } .rva-kpi--success .rva-kpi-num { color: #059669; }

/* —— Progress —— */
.rva-progress-wrap {
    background: #fff; border: 1px solid #e0e1e3; border-radius: 0;
    padding: .85rem 1rem; margin-bottom: 1.5rem; position: relative; overflow: hidden;
}
.rva-progress-wrap::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0;
    width: 4px; background: #059669;
}
.rva-progress-label { display: flex; justify-content: space-between; margin-bottom: .5rem; font-size: .82rem; color: #151515; }
.rva-progress-note  { color: #9ca3af; font-size: .75rem; }
.rva-progress-bar   { height: 8px; background: #EEEFF0; border-radius: 0; overflow: hidden; }
.rva-progress-fill  { height: 100%; background: #059669; transition: width .3s; }

/* —— Tabs (JS puro) —— */
.rva-tabs-header { border-bottom: 2px solid #e0e1e3; margin-bottom: 0; }
.rva-tabs-nav    { display: flex; gap: 0; flex-wrap: nowrap; }
.rva-tab-btn {
    padding: .85rem 1.25rem; font-size: .8rem; font-weight: 600;
    color: #6b7280; background: transparent; border: none;
    position: relative; white-space: nowrap;
    display: inline-flex; align-items: center; gap: .35rem;
    cursor: pointer; transition: color .15s;
}
.rva-tab-btn:hover { color: #E34824; }
.rva-tab-btn.active { color: #E34824; }
.rva-tab-btn.active::after {
    content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
    height: 2px; background: #E34824;
}
.rva-tab-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 20px; height: 18px; padding: 0 .4rem;
    background: #EEEFF0; color: #151515;
    border-radius: 0; font-size: .68rem; font-weight: 700;
    margin-left: .25rem;
}
.rva-tab-btn.active .rva-tab-count { background: #E34824; color: #fff; }

/* —— Pannello —— */
.rva-tab-pane { display: block; background: #fff; border: 1px solid #e0e1e3; border-top: none; padding: 1.25rem; }
.rva-tabs-header { background: #fff; border: 1px solid #e0e1e3; border-bottom: 2px solid #e0e1e3; padding: 0 1rem; }
.rva-kpi-bar { display: flex; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.rva-footer { padding: 0.75rem 1.25rem; background: #fff; border: 1px solid #e0e1e3; border-top: none; font-size: 0.78rem; color: #6b7280; }
.rva-panel {
    background: #fff; border: 1px solid #e0e1e3; border-top: none;
    border-radius: 0; overflow: hidden;
}
.rva-empty { padding: 2rem; text-align: center; color: #6b7280; margin: 0; }

/* —— Riga divergente —— */
.rva-riga-divergente { padding: .9rem 1.1rem; border-bottom: 1px solid #EEEFF0; }
.rva-riga-divergente:last-child { border-bottom: none; }
.rva-riga-divergente:hover { background: rgba(227,72,36,0.02); }
.rva-riga-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: .65rem; flex-wrap: wrap; gap: .5rem;
}
.rva-riga-left { display: flex; align-items: center; gap: .5rem; }
.rva-riga-nome { font-weight: 700; color: #151515; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.rva-riga-check { width: 16px; height: 16px; border-radius: 0; cursor: pointer; accent-color: #E34824; }

/* —— Diff table —— */
.rva-diff-table { width: 100%; font-size: .82rem; border-collapse: collapse; margin-top: .5rem; }
.rva-diff-table th {
    background: #151515; color: #fff;
    padding: .45rem .65rem; font-size: .72rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .04em; text-align: left;
}
.rva-diff-table td { padding: .45rem .65rem; border-bottom: 1px solid #EEEFF0; vertical-align: middle; }
.rva-diff-table tr:last-child td { border-bottom: none; }
.rva-diff-table tbody tr:hover { background: rgba(227,72,36,0.03); }
.rva-diff-campo  { font-weight: 600; color: #151515; width: 130px; }
.rva-diff-reviso { color: #059669; font-weight: 600; }
.rva-diff-arrow  { width: 30px; text-align: center; color: #9ca3af; }

/* —— Tabelle (Solo locale, Solo reviso, Allineati) —— */
.rva-td-nome { font-weight: 600; color: #151515; }
.rva-id-code {
    font-size: .8rem; font-family: monospace;
    background: #EEEFF0; color: #E34824;
    padding: .15rem .4rem; border-radius: 0;
}

/* —— Badge (DS conforme: sharp, uppercase 0.68rem) —— */
.rva-badge {
    display: inline-flex; align-items: center; gap: .25rem;
    padding: .2rem .55rem; font-size: .68rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .03em;
    border-radius: 0; border: 1px solid transparent;
}
.rva-badge-info      { background: rgba(8,145,178,.06);  color: #0891b2; border-color: rgba(8,145,178,.2); }
.rva-badge-accent,
.rva-badge-primary   { background: rgba(227,72,36,.06);  color: #E34824; border-color: rgba(227,72,36,.2); }
.rva-badge-secondary { background: rgba(107,114,128,.06); color: #6b7280; border-color: rgba(107,114,128,.2); }

/* —— Toolbar bulk —— */
.rva-bulk-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: .65rem 1rem; background: #EEEFF0; border-bottom: 1px solid #e0e1e3;
    flex-wrap: wrap; gap: .5rem;
}
.rva-check-all {
    display: flex; align-items: center; gap: .4rem;
    font-size: .78rem; font-weight: 600; color: #151515;
    text-transform: uppercase; letter-spacing: .04em; cursor: pointer;
}
.rva-check-all input[type="checkbox"] { accent-color: #E34824; cursor: pointer; }
.rva-bulk-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.rva-bulk-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 .3rem;
    background: rgba(255,255,255,.25);
    border-radius: 0; font-size: .7rem; font-weight: 700;
    margin-left: .25rem;
}

/* —— Footer meta —— */
.rva-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding: .75rem 0; margin-top: 1rem; flex-wrap: wrap; gap: .5rem;
    border-top: 1px solid #EEEFF0;
}
.rva-footer-meta { font-size: .78rem; color: #6b7280; display: inline-flex; align-items: center; gap: .35rem; }

/* —— Loading spinner —— */
.rva-loading {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 3rem 1rem; gap: 1rem;
}
.rva-loading p { color: #6b7280; font-size: .85rem; margin: 0; }
.rva-spinner {
    width: 36px; height: 36px;
    border: 3px solid #EEEFF0; border-top-color: #E34824;
    border-radius: 50%; animation: rva-spin .8s linear infinite;
}
@keyframes rva-spin { to { transform: rotate(360deg); } }

/* —— Toast —— */
.rva-toast {
    position: fixed; bottom: 1.5rem; right: 1.5rem;
    background: #fff; border: 1px solid #e0e1e3; border-radius: 0;
    padding: .75rem 1.1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,.12);
    display: flex; align-items: center; gap: .6rem;
    font-size: .85rem; font-weight: 600; z-index: 9999;
    transform: translateY(20px); opacity: 0;
    transition: all .3s ease; border-left: 4px solid;
}
.rva-toast--show    { transform: translateY(0); opacity: 1; }
.rva-toast-btn {
    margin-left: .75rem; padding: .25rem .7rem;
    border-radius: 0; border: 1px solid currentColor; background: none;
    cursor: pointer; font-size: .72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .04em; color: inherit;
}
.rva-toast-btn:hover { background: currentColor; color: #fff; }

/* —— Overlay fullscreen —— */
.rva-overlay-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1040; }
.rva-overlay-box {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    z-index: 1050; background: #fff; border: 1px solid #e0e1e3; border-radius: 0;
    padding: 2.5rem 3rem; text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,.2); min-width: 280px;
}
.rva-overlay-spinner {
    width: 3rem; height: 3rem; margin: 0 auto 1.25rem;
    border: 3px solid #EEEFF0; border-top-color: #E34824;
    border-radius: 50%; animation: rva-spin .8s linear infinite;
}
.rva-overlay-title { font-size: 1rem; font-weight: 700; color: #151515; margin-bottom: .35rem; text-transform: uppercase; letter-spacing: .04em; }
.rva-overlay-sub   { font-size: .83rem; color: #6b7280; }

/* —— Responsive —— */
@media (max-width: 991.98px) {
    .rva-kpi-bar { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767.98px) {
    .rva-bulk-toolbar { flex-direction: column; align-items: stretch; }
    .rva-bulk-actions { width: 100%; }
    .rva-bulk-actions .rva-btn { flex: 1; justify-content: center; }
    .rva-riga-header { flex-direction: column; align-items: stretch; }
    .rva-riga-header > button { width: 100%; }
    .rva-diff-table { font-size: .78rem; }
    .rva-diff-campo { width: auto; }
}
@media (max-width: 575.98px) {
    .rva-launch-card { padding: 1.5rem; }
    .rva-launch-icon { font-size: 2rem; }
    .rva-kpi-bar { grid-template-columns: 1fr; }
    .rva-kpi-num { font-size: 1.5rem; }
    .rva-page-icon { width: 40px; height: 40px; font-size: 1.2rem; }
    .rva-overlay-box { padding: 1.5rem; min-width: auto; width: calc(100% - 2rem); }
    .rva-tab-btn { padding: .65rem .85rem; font-size: .75rem; }
    .rva-toast { left: 1rem; right: 1rem; bottom: 1rem; }
}