*{box-sizing:border-box}
:root{
--sidebar:#172538;--sidebar2:#122033;--primary:#1683ff;--primary-soft:#e9f3ff;
--text:#14223a;--muted:#6c7b91;--border:#dfe6ef;--bg:#f6f8fb;--panel:#fff;
--green:#28bf65;--orange:#ffb41f;--red:#f24a4a;--purple:#7759ea
}
html,body{margin:0;min-height:100%;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--text);background:var(--bg)}
button,input,textarea{font:inherit}a{color:inherit}.app{display:flex;min-height:100vh}
.sidebar{position:fixed;inset:0 auto 0 0;width:245px;display:flex;flex-direction:column;background:linear-gradient(180deg,var(--sidebar),var(--sidebar2));color:#fff;border-right:1px solid #29384c}
.brand{min-height:76px;display:flex;align-items:center;gap:12px;padding:8px 14px;border-bottom:1px solid rgba(255,255,255,.08)}
.brand-photo{width:62px;height:50px;object-fit:cover;border-radius:4px;background:#f4e6bf}
.brand-title{font-family:Georgia,serif;font-size:16px;line-height:1.05}.brand-subtitle{font-size:12px;color:#b8c4d4;margin-top:3px}
.new-ticket{margin:14px;height:48px;display:flex;align-items:center;justify-content:center;gap:10px;border-radius:6px;background:var(--primary);color:#fff;text-decoration:none;font-weight:650}
.sidebar-nav{display:flex;flex-direction:column;padding:0 10px;overflow-y:auto}.sidebar-nav a{height:44px;display:flex;align-items:center;gap:13px;padding:0 12px;text-decoration:none;color:#d0d7e0;border-radius:6px;font-size:14px}
.sidebar-nav a:hover,.sidebar-nav a.active{background:rgba(255,255,255,.08);color:#fff}.nav-separator{height:8px}
.nav-icon{width:22px;height:22px;display:grid;place-items:center}.nav-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.sidebar-footer{margin-top:auto;padding:18px 20px;border-top:1px solid rgba(255,255,255,.09);display:flex;flex-direction:column;font-size:12px;line-height:1.6;color:#c3cedc}.sidebar-footer strong{color:white}.main{width:calc(100% - 245px);margin-left:245px}
.topbar{height:76px;background:#fff;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;padding:0 24px}.topbar-user{display:flex;align-items:center;gap:10px}.topbar-user strong,.topbar-user small{display:block}.topbar-user small{color:var(--muted);margin-top:2px}.logout-link{text-decoration:none;color:#5f6d80;font-size:12px;margin-left:10px}
.notification{position:relative;margin-right:8px}.notification-count{position:absolute;top:-9px;right:-10px;display:grid;place-items:center;min-width:17px;height:17px;border-radius:50%;background:var(--red);color:#fff;font-size:10px}
.avatar{width:43px;height:43px;border-radius:50%;background:linear-gradient(135deg,#425973,#1b2b3f);color:#fff;display:grid;place-items:center;font-weight:700;font-size:12px;flex:none}.avatar-small{width:34px;height:34px;font-size:10px}
.content{padding:22px}.breadcrumb{display:flex;gap:9px;color:var(--muted);font-size:13px;margin-bottom:22px}.breadcrumb a{color:var(--primary);text-decoration:none}
.ticket-header{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:22px}.ticket-title-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.ticket-title-row h1{margin:0;font-size:22px}.ticket-title-row h1 span{margin-left:8px}.ticket-created{margin-top:9px;color:var(--muted);font-size:12px}.ticket-actions{display:flex;gap:10px}.btn{min-height:42px;padding:0 15px;border-radius:6px;border:1px solid transparent;cursor:pointer}.btn-primary{background:var(--primary);color:#fff}.btn-secondary{background:#fff;border-color:var(--border)}.btn-danger-outline{background:#fff;border-color:var(--border)}.btn-icon{width:44px;padding:0}
.badge{display:inline-flex;align-items:center;padding:5px 10px;border-radius:5px;font-size:11px;font-weight:700;text-transform:uppercase}.priority-high{background:#fff0c5;color:#bb7300}.status-working{background:var(--primary);color:#fff}
.ticket-layout{display:grid;grid-template-columns:minmax(0,1fr) 365px;gap:20px}.tabs{display:flex;background:#eef2f6;border-radius:7px;margin-bottom:16px}.tab{border:0;background:transparent;padding:13px 20px;color:#5e6e84;cursor:pointer;position:relative}.tab.active{color:#075abf;font-weight:650}.tab.active:after{content:"";position:absolute;left:18px;right:18px;bottom:0;height:2px;background:var(--primary)}
.tab-panel{display:none}.tab-panel.active{display:block}.conversation{display:flex;flex-direction:column;gap:14px}.comment{padding:18px;background:#fff;border:1px solid var(--border);border-radius:7px}.comment-header{display:flex;align-items:center;gap:12px}.comment-author{flex:1}.comment-author strong{margin-right:8px}.role{font-size:10px;padding:4px 7px;border-radius:4px;margin-right:8px}.role-utente,.role-staff{background:#e5f1ff;color:#0759be}.role-esterno{background:#eceff3;color:#565f6d}.comment-date{font-size:11px;color:#8491a4}.private-indicator{font-size:12px;color:#5a687b;display:flex;align-items:center;gap:6px}.comment-menu{border:0;background:none;color:#5a687b;cursor:pointer}
.comment-body{margin-left:55px}.comment-body p{line-height:1.65;color:#303c4f}.comment-attachments{display:flex;gap:12px;flex-wrap:wrap;margin-top:16px}.photo-preview{width:calc(33.333% - 8px);min-width:150px}.photo-placeholder{aspect-ratio:1.45/1;border-radius:5px;background:linear-gradient(135deg,#9ca2a8,#59636e);display:flex;align-items:center;justify-content:center;flex-direction:column;color:#fff}.photo-placeholder span{font-size:26px}.photo-placeholder small{background:rgba(0,0,0,.3);padding:2px 6px;border-radius:3px;margin-top:8px}.file-card{min-width:255px;display:flex;align-items:center;gap:12px;padding:11px;border:1px solid var(--border);background:#fafbfd;border-radius:5px}.file-icon{width:38px;height:42px;display:grid;place-items:center;border-radius:4px;color:#fff;font-size:10px;font-weight:700}.file-icon.pdf{background:#e42b32}.file-card strong,.file-card small{display:block}.file-card small{color:var(--muted);margin-top:3px}
.new-comment{display:flex;gap:12px;margin-top:14px}.comment-editor{flex:1;background:#fff;border:1px solid var(--border);border-radius:7px}.comment-editor textarea{width:100%;min-height:90px;border:0;outline:0;padding:15px;resize:vertical}.editor-toolbar{display:flex;align-items:center;justify-content:space-between;padding:8px 10px;border-top:1px solid var(--border)}.editor-tools button{width:31px;height:31px;border:0;background:transparent}.editor-actions{display:flex;align-items:center;gap:14px}.private-checkbox{font-size:12px}.private-checkbox span{color:var(--muted)}
.panel,.dash-panel{background:#fff;border:1px solid var(--border);border-radius:7px;overflow:hidden}.panel{margin-bottom:17px}.panel-header{min-height:49px;padding:0 15px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--border)}.panel-header h2{font-size:14px;margin:0}.panel-header a{color:var(--primary);font-size:12px;text-decoration:none}.small-button{padding:7px 10px;background:#fff;border:1px solid var(--border);border-radius:5px}.info-list{padding:8px 0}.info-row{display:grid;grid-template-columns:25px 112px minmax(0,1fr);align-items:center;min-height:41px;padding:5px 15px;font-size:12px}.info-label{color:var(--muted)}.participants{padding:10px 14px}.participant{display:flex;align-items:center;gap:10px;padding:8px 0}.participant strong,.participant small{display:block}.participant small{color:var(--muted);margin-top:3px}.participant-type{font-weight:400;color:#657187}.empty-panel{padding:50px;text-align:center;background:#fff;border:1px solid var(--border);border-radius:7px;color:var(--muted)}
/* dashboard */
.dashboard-content{padding-top:22px}.dashboard-heading{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:18px}.dashboard-heading h1{margin:0;font-size:30px}.dashboard-heading p{margin:3px 0 0;color:var(--muted);font-size:16px}.date-filter{border:1px solid var(--border);background:#fff;border-radius:7px;padding:12px 16px}
.stats-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:14px;margin-bottom:18px}.stat-card{background:#fff;border:1px solid var(--border);border-radius:8px;min-height:116px;padding:18px;display:flex;align-items:center;gap:16px}.stat-icon{width:54px;height:54px;border-radius:50%;display:grid;place-items:center;color:#fff;flex:none}.stat-icon svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.stat-icon.blue{background:#1683ff}.stat-icon.orange{background:#ffb41f}.stat-icon.purple{background:#765aef}.stat-icon.green{background:#29be65}.stat-icon.red{background:#f04a4a}.stat-card strong{display:block;font-size:28px}.stat-card span{display:block;color:#66758b;margin-top:2px}
.dashboard-grid{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:16px}.charts-grid{display:grid;grid-template-columns:1.25fr .95fr .7fr;gap:14px;margin-bottom:14px}.chart-body{min-height:250px;padding:18px}.donut-layout{display:flex;align-items:center;gap:18px}.donut{width:180px;height:180px;border-radius:50%;position:relative;display:grid;place-items:center;flex:none}.donut:before{content:"";position:absolute;width:102px;height:102px;background:#fff;border-radius:50%}.donut>div{position:relative;text-align:center;display:flex;flex-direction:column}.donut strong{font-size:25px}.donut span{color:var(--muted)}.donut-cat{background:conic-gradient(#1683ff 0 50%,#ffb41f 50% 71%,#36c677 71% 89%,#9aa7b8 89% 100%)}.donut-prio{background:conic-gradient(#f04a4a 0 18%,#ffb41f 18% 68%,#36c677 68% 100%)}.legend{display:flex;flex-direction:column;gap:13px;font-size:12px;min-width:170px}.legend span{display:grid;grid-template-columns:14px 1fr auto;gap:8px}.dot{width:10px;height:10px;border-radius:50%;display:inline-block;margin-top:2px}.blue-dot{background:#1683ff}.orange-dot{background:#ffb41f}.green-dot{background:#36c677}.gray-dot{background:#9aa7b8}.red-dot{background:#f04a4a}.compact{margin:16px}.priority-wrap{display:flex;flex-direction:column;align-items:center;padding:12px}.priority-wrap .donut{width:150px;height:150px}.priority-wrap .donut:before{width:86px;height:86px}
.bar-chart{height:250px;padding:24px 18px 10px;display:flex;align-items:flex-end;justify-content:space-around;border-bottom:1px solid var(--border)}.bar-wrap{height:210px;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:4px;font-size:11px}.bar{width:42px;border-radius:4px 4px 0 0}.b1{background:#1683ff}.b2{background:#ffb41f}.b3{background:#765aef}.b4{background:#29be65}.bar-wrap span{max-width:70px;text-align:center;color:#4d5a6d}
.tickets-panel{margin-bottom:20px}.table-wrap{overflow:auto}.tickets-table{width:100%;border-collapse:collapse;font-size:12px}.tickets-table th,.tickets-table td{padding:11px 12px;border-bottom:1px solid #edf0f4;text-align:left;white-space:nowrap}.tickets-table th{font-size:11px;color:#4e5b6d}.tickets-table a{color:#0876e8;text-decoration:none}.mini-badge{padding:4px 8px;border-radius:5px}.blue-badge,.light-blue-badge{background:#dfeeff;color:#0761c7}.purple-badge{background:#eee9ff;color:#684ad2}.green-badge{background:#dff7e7;color:#1d8d4c}.red-badge{background:#ffe2e0;color:#dc403b}.orange-badge{background:#fff0cf;color:#b87800}
.dashboard-side{display:flex;flex-direction:column;gap:14px}.activity-list>div{display:flex;gap:12px;padding:12px 14px;border-bottom:1px solid #edf0f4}.activity-icon{width:35px;height:35px;border-radius:50%;background:#e3f0ff;color:#0876e8;display:grid;place-items:center;flex:none}.activity-icon.green{background:#e0f7e8;color:#23a85b}.activity-list p{margin:0;font-size:12px;line-height:1.45}.activity-list p a{color:#0876e8}.activity-list small{display:block;color:var(--muted);margin-top:2px}.quick-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:14px}.quick-grid button{min-height:100px;border:1px solid var(--border);border-radius:7px;background:#fff;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;cursor:pointer}.quick-grid svg{width:30px;height:30px;fill:none;stroke:#5e6f88;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.quick-grid span{font-size:12px}
/* login */
.login-page{background:linear-gradient(135deg,#142538 0%,#0f1d2d 52%,#e9edf3 52%,#f8fafc 100%);min-height:100vh}.login-shell{min-height:100vh;display:grid;grid-template-columns:1fr 460px;align-items:center;gap:70px;max-width:1180px;margin:auto;padding:40px}.login-brand{color:#fff;display:flex;align-items:center;gap:22px}.login-brand-image img{width:180px;height:120px;object-fit:cover;border-radius:10px;background:#ead8ad}.login-brand h1{font-family:Georgia,serif;font-size:38px;margin:0}.login-brand p{font-size:18px;color:#d6deea}.login-card{background:#fff;border-radius:14px;padding:34px;box-shadow:0 25px 60px rgba(8,20,36,.22)}.login-heading h2{margin:0 0 6px;font-size:25px}.login-heading p{margin:0 0 24px;color:var(--muted)}.login-card label{display:block;font-size:13px;font-weight:600;margin:17px 0}.login-card input{width:100%;margin-top:7px;padding:13px;border:1px solid #ccd6e2;border-radius:7px;outline:none}.login-card input:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(22,131,255,.12)}.login-submit{width:100%;margin-top:6px}.alert{padding:11px 12px;border-radius:6px;font-size:13px;margin-bottom:12px}.alert.error{background:#fff0ef;color:#b63b35}.alert.info{background:#edf5ff;color:#215f9f}.login-security{text-align:center;margin-top:18px;color:#8995a5;font-size:11px}
@media(max-width:1280px){.stats-grid{grid-template-columns:repeat(3,1fr)}.charts-grid{grid-template-columns:1fr 1fr}.charts-grid .dash-panel:last-child{grid-column:1/-1}.dashboard-grid{grid-template-columns:1fr}.dashboard-side{display:grid;grid-template-columns:1fr 1fr}}
@media(max-width:1000px){.sidebar{display:none}.main{margin-left:0;width:100%}.ticket-layout{grid-template-columns:1fr}.stats-grid{grid-template-columns:repeat(2,1fr)}.charts-grid{grid-template-columns:1fr}.charts-grid .dash-panel:last-child{grid-column:auto}.login-shell{grid-template-columns:1fr;max-width:560px}.login-brand{display:none}}
@media(max-width:650px){.content{padding:14px}.stats-grid{grid-template-columns:1fr}.dashboard-heading{flex-direction:column;gap:12px}.dashboard-side{display:flex}.ticket-header{flex-direction:column}.ticket-title-row h1{font-size:19px;width:100%}.ticket-actions{flex-wrap:wrap}.tabs{overflow:auto}.comment-body{margin-left:0}.photo-preview{width:100%}.editor-toolbar{flex-direction:column;align-items:flex-start}.login-shell{padding:18px}.login-card{padding:24px}}

/* =========================================================
   DASHBOARD DATABASE / REPORT INTERATTIVI
   Aggiungere in fondo ad assets/css/app.css
   ========================================================= */

.stat-card-link {
    color: inherit;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.stat-card-link:hover {
    transform: translateY(-2px);
    border-color: #c9d8ea;
    box-shadow: 0 8px 24px rgba(19, 39, 66, .08);
}

.clear-filter {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #fff;
    color: #58677b;
    text-decoration: none;
    font-size: 13px;
}

.clear-filter:hover {
    color: var(--primary);
    border-color: #bcd7f7;
}

.report-list {
    padding: 12px 14px;
}

.report-row {
    display: grid;
    grid-template-columns: minmax(115px, 1fr) minmax(80px, 1.4fr) 58px;
    align-items: center;
    gap: 12px;
    min-height: 47px;
    padding: 5px 8px;
    border-radius: 6px;
    color: inherit;
    text-decoration: none;
    transition: background .15s ease;
}

.report-row:hover,
.report-row.selected {
    background: #f0f6ff;
}

.report-name {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: 12px;
    font-weight: 600;
}

.report-dot {
    width: 10px;
    height: 10px;
    flex: 0 0 auto;
    border-radius: 50%;
}

.dot-1 { background: #1683ff; }
.dot-2 { background: #ffb41f; }
.dot-3 { background: #36c677; }
.dot-4 { background: #7759ea; }
.dot-5 { background: #8a98aa; }

.priority-dot-1 { background: #b83232; }
.priority-dot-2 { background: #f04a4a; }
.priority-dot-3 { background: #ffb41f; }
.priority-dot-4 { background: #36c677; }

.report-progress {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #edf1f6;
}

.report-progress span {
    display: block;
    height: 100%;
    min-width: 2px;
    border-radius: inherit;
    background: var(--primary);
}

.report-value {
    text-align: right;
}

.report-value strong,
.report-value small {
    display: block;
}

.report-value strong {
    font-size: 13px;
}

.report-value small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
}

.report-empty,
.activity-empty,
.empty-ticket-list {
    padding: 30px 18px;
    color: var(--muted);
    text-align: center;
    font-size: 13px;
}

.status-report {
    min-height: 250px;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    gap: 9px;
    padding: 28px 14px 14px;
}

.status-column {
    width: 19%;
    min-width: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: inherit;
    text-decoration: none;
    border-radius: 7px;
    transition: background .15s ease;
}

.status-column:hover,
.status-column.selected {
    background: #f0f6ff;
}

.status-column strong {
    font-size: 12px;
}

.status-column span {
    min-height: 30px;
    color: #5b687a;
    font-size: 10px;
    line-height: 1.15;
    text-align: center;
}

.status-bar {
    width: 34px;
    min-height: 8px;
    border-radius: 4px 4px 0 0;
}

.status-bar-1 { background: #1683ff; }
.status-bar-2 { background: #56a6ff; }
.status-bar-3 { background: #ffb41f; }
.status-bar-4 { background: #7759ea; }
.status-bar-5 { background: #29be65; }

.panel-subtitle {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
}

.ticket-title-link {
    color: var(--text) !important;
    font-weight: 600;
}

.tickets-table tbody tr:hover {
    background: #fafcff;
}

.quick-grid a {
    min-height: 100px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    color: inherit;
    text-decoration: none;
    transition: border-color .15s ease, background .15s ease;
}

.quick-grid a:hover {
    border-color: #bcd7f7;
    background: #f7fbff;
}

.quick-grid a svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: #5e6f88;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 900px) {
    .report-row {
        grid-template-columns: minmax(100px, 1fr) 1fr 50px;
        gap: 8px;
    }
}

/* =========================================================
   CATALOGO RICHIESTE
   ========================================================= */

.catalog-content {
    max-width: 1550px;
    margin: 0 auto;
}

.catalog-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.catalog-heading h1 {
    margin: 0;
    font-size: 30px;
}

.catalog-heading p {
    max-width: 760px;
    margin: 5px 0 0;
    color: var(--muted);
    line-height: 1.5;
}

.alert.success {
    background: #e8f8ee;
    color: #207343;
}

.catalog-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.catalog-stats article {
    min-height: 95px;
    padding: 18px 20px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.catalog-stats span,
.catalog-stats strong {
    display: block;
}

.catalog-stats span {
    color: var(--muted);
    font-size: 12px;
}

.catalog-stats strong {
    margin-top: 5px;
    font-size: 28px;
}

.catalog-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.catalog-categories-panel {
    position: sticky;
    top: 95px;
}

.catalog-panel {
    margin-bottom: 16px;
}

.catalog-panel .panel-header > div small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
}

.catalog-category-list {
    padding: 8px;
}

.catalog-category-card {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.catalog-category-card:hover {
    background: #f3f7fc;
}

.catalog-category-card strong,
.catalog-category-card small {
    display: block;
}

.catalog-category-card strong {
    font-size: 13px;
}

.catalog-category-card small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 650;
}

.status-pill.active {
    color: #207846;
    background: #e2f6e9;
}

.status-pill.inactive {
    color: #6d7684;
    background: #eceff3;
}

.catalog-simple-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 15px;
}

.catalog-simple-form label,
.modal-body label {
    display: block;
    color: #354258;
    font-size: 12px;
    font-weight: 650;
}

.catalog-simple-form input,
.modal-body input[type="text"],
.modal-body textarea,
.modal-body select {
    width: 100%;
    margin-top: 7px;
    padding: 11px 12px;
    border: 1px solid #ccd6e2;
    border-radius: 6px;
    outline: none;
    color: var(--text);
    background: white;
}

.catalog-simple-form input:focus,
.modal-body input[type="text"]:focus,
.modal-body textarea:focus,
.modal-body select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(22, 131, 255, .1);
}

.catalog-main-panel {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.catalog-section {
    scroll-margin-top: 95px;
}

.catalog-section-header {
    min-height: 80px;
    padding: 15px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--border);
}

.catalog-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.catalog-section-title h2 {
    margin: 0;
    font-size: 17px;
}

.catalog-section-header p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.catalog-table-wrap {
    overflow-x: auto;
}

.catalog-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.catalog-table th,
.catalog-table td {
    padding: 13px 15px;
    border-bottom: 1px solid #edf0f4;
    text-align: left;
    vertical-align: middle;
}

.catalog-table th {
    color: #5b687a;
    background: #fafbfd;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.catalog-table tbody tr:hover {
    background: #fbfdff;
}

.catalog-description {
    max-width: 390px;
    color: #657186;
    line-height: 1.45;
}

.catalog-priority {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 700;
}

.priority-urgent {
    color: #fff;
    background: #c93636;
}

.priority-high {
    color: #c13a34;
    background: #ffe2df;
}

.priority-medium {
    color: #b27500;
    background: #fff0cf;
}

.priority-low {
    color: #207846;
    background: #e1f6e8;
}

.catalog-actions-cell {
    width: 55px;
    text-align: right !important;
}

.icon-button {
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: white;
    color: #526176;
    cursor: pointer;
}

.icon-button:hover {
    color: var(--primary);
    border-color: #bfd9f7;
}

.catalog-section-footer {
    padding: 11px 15px;
    background: #fafbfd;
}

.catalog-add-row {
    border: 0;
    background: transparent;
    color: var(--primary);
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
}

.catalog-empty-row {
    padding: 20px;
    color: var(--muted);
    text-align: center;
}

.empty-catalog {
    padding: 50px;
    text-align: center;
}

.empty-catalog h2 {
    margin-top: 0;
}

.empty-catalog p {
    color: var(--muted);
}

body.modal-open {
    overflow: hidden;
}

.modal-backdrop[hidden] {
    display: none !important;
}

.modal-backdrop {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(10, 24, 42, .58);
}

.modal-card {
    width: min(620px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 24px 70px rgba(7, 20, 38, .28);
}

.modal-small {
    width: min(500px, 100%);
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
}

.modal-header p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.modal-close {
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: #657387;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.modal-body {
    display: grid;
    gap: 17px;
    padding: 20px 22px;
}

.modal-body textarea {
    resize: vertical;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 22px 20px;
}

.toggle-line {
    display: flex !important;
    align-items: center;
    gap: 9px;
}

.toggle-line input {
    width: auto !important;
    margin: 0 !important;
}

.form-note {
    margin: -5px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

@media (max-width: 1050px) {
    .catalog-layout {
        grid-template-columns: 1fr;
    }

    .catalog-categories-panel {
        position: static;
    }

    .catalog-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 650px) {
    .catalog-heading {
        flex-direction: column;
    }

    .catalog-heading .btn {
        width: 100%;
    }

    .catalog-stats {
        grid-template-columns: 1fr 1fr;
    }

    .catalog-section-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .modal-backdrop {
        padding: 10px;
    }
}

/* =========================================================
   NUOVO TICKET
   ========================================================= */

.new-ticket-content {
    max-width: 1520px;
    margin: 0 auto;
}

.new-ticket-heading {
    margin-bottom: 18px;
}

.new-ticket-heading h1 {
    margin: 0;
    font-size: 30px;
}

.new-ticket-heading p {
    margin: 5px 0 0;
    color: var(--muted);
}

.new-ticket-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 18px;
    align-items: start;
}

.new-ticket-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.new-ticket-side {
    position: sticky;
    top: 94px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-panel {
    margin: 0;
}

.form-panel .panel-header > div small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
}

.ticket-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 190px;
    gap: 15px;
    padding: 18px;
    align-items: end;
}

.ticket-form-stack {
    display: grid;
    gap: 17px;
    padding: 18px;
}

.ticket-form-grid label,
.ticket-form-stack label {
    display: block;
    color: #344154;
    font-size: 12px;
    font-weight: 650;
}

.ticket-form-grid input,
.ticket-form-grid select,
.ticket-form-stack input,
.ticket-form-stack select,
.ticket-form-stack textarea {
    width: 100%;
    margin-top: 7px;
    padding: 12px 13px;
    border: 1px solid #ccd6e2;
    border-radius: 6px;
    outline: none;
    color: var(--text);
    background: #fff;
}

.ticket-form-grid input:focus,
.ticket-form-grid select:focus,
.ticket-form-stack input:focus,
.ticket-form-stack select:focus,
.ticket-form-stack textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(22, 131, 255, .1);
}

.ticket-form-grid select:disabled {
    color: #8b96a5;
    background: #f3f5f8;
}

.ticket-form-stack textarea {
    resize: vertical;
}

.required {
    color: #e14646;
}

.auto-priority-box {
    min-height: 73px;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #fafbfd;
}

.auto-priority-box span,
.auto-priority-box strong,
.auto-priority-box small {
    display: block;
}

.auto-priority-box span {
    color: var(--muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.auto-priority-box strong {
    margin-top: 4px;
    font-size: 18px;
}

.auto-priority-box small {
    margin-top: 2px;
    color: #8793a4;
    font-size: 9px;
}

.input-with-icon {
    position: relative;
}

.input-with-icon > span {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 12px;
    width: 19px;
    height: 19px;
    transform: translateY(-50%);
    color: #76849a;
    pointer-events: none;
}

.input-with-icon > span svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.input-with-icon input,
.input-with-icon textarea {
    padding-left: 41px;
}

.input-with-icon:has(textarea) > span {
    top: 20px;
    transform: none;
}

.upload-area {
    margin: 18px;
    min-height: 220px;
    padding: 28px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    border: 2px dashed #cbd5e2;
    border-radius: 9px;
    background: #fafbfd;
    text-align: center;
    transition: background .15s ease, border-color .15s ease;
}

.upload-area.drag-active {
    border-color: var(--primary);
    background: #eef6ff;
}

.upload-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #eaf3ff;
    color: #237ad9;
}

.upload-icon svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.upload-area strong {
    margin-top: 4px;
    font-size: 14px;
}

.upload-area > span {
    color: var(--muted);
    font-size: 11px;
}

.upload-area > small {
    max-width: 520px;
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
}

.upload-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.selected-files {
    display: grid;
    gap: 8px;
    padding: 0 18px 18px;
}

.selected-file-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
}

.selected-file-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 5px;
    background: #f0f3f7;
}

.selected-file-row strong,
.selected-file-row small {
    display: block;
}

.selected-file-row strong {
    font-size: 11px;
}

.selected-file-row small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 9px;
}

.field-help {
    margin: -8px 0 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.55;
}

.new-ticket-submit-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 4px 0 18px;
}

.btn-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.create-ticket-button {
    min-width: 145px;
}

.summary-panel,
.help-panel {
    margin: 0;
}

.summary-list {
    padding: 8px 15px;
}

.summary-list > div {
    padding: 11px 0;
    border-bottom: 1px solid #edf0f4;
}

.summary-list > div:last-child {
    border-bottom: 0;
}

.summary-list span,
.summary-list strong {
    display: block;
}

.summary-list span {
    color: var(--muted);
    font-size: 10px;
}

.summary-list strong {
    margin-top: 3px;
    font-size: 12px;
    word-break: break-word;
}

.summary-open {
    color: #0e70d6;
}

.help-list {
    padding: 11px 14px 14px;
}

.help-list > div {
    display: grid;
    grid-template-columns: 26px 1fr;
    gap: 9px;
    align-items: start;
    margin: 10px 0;
}

.help-list > div > span {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #e8f2ff;
    color: #1474d8;
    font-size: 10px;
    font-weight: 700;
}

.help-list p {
    margin: 2px 0 0;
    color: #536176;
    font-size: 11px;
    line-height: 1.45;
}

@media (max-width: 1120px) {
    .new-ticket-layout {
        grid-template-columns: 1fr;
    }

    .new-ticket-side {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 850px) {
    .ticket-form-grid {
        grid-template-columns: 1fr;
    }

    .new-ticket-side {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 650px) {
    .new-ticket-heading h1 {
        font-size: 25px;
    }

    .upload-area {
        margin: 12px;
    }

    .selected-files {
        padding: 0 12px 12px;
    }

    .new-ticket-submit-row {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .new-ticket-submit-row .btn {
        width: 100%;
    }
}

/* =========================================================
   CATALOGO MASTER V2
   ========================================================= */

.catalog-master-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 18px;
    padding: 5px;
    width: fit-content;
    background: #eaf0f6;
    border-radius: 8px;
}

.catalog-master-tabs a {
    padding: 10px 15px;
    border-radius: 6px;
    color: #5d6b7f;
    text-decoration: none;
    font-size: 12px;
    font-weight: 650;
}

.catalog-master-tabs a.active {
    color: #075fca;
    background: white;
    box-shadow: 0 1px 4px rgba(20, 40, 70, .08);
}

.catalog-single-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 18px;
    align-items: start;
}

.catalog-guidance {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: white;
}

.catalog-guidance strong {
    display: block;
    margin-bottom: 7px;
}

.catalog-guidance p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.55;
}

.catalog-guidance code {
    font-size: 10px;
    color: #245f9e;
}

.catalog-section-title svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: #66788f;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.catalog-header-actions {
    display: flex;
    gap: 8px;
}

.btn-danger-outline {
    color: #c8413b;
    border-color: #e8c5c2;
}

.btn-danger-outline:hover {
    color: #a82e29;
    border-color: #dba29e;
    background: #fff7f6;
}

@media (max-width: 900px) {
    .catalog-single-layout {
        grid-template-columns: 1fr;
    }
}

/* ===== TICKET REALE V1 ===== */
.ticket-status-open{color:#0a63c7;background:#dfeeff}.ticket-status-working{color:#fff;background:#1683ff}.ticket-status-waiting{color:#6548c6;background:#eee9ff}.ticket-status-closed{color:#237b48;background:#ddf4e5}
.comment-source{margin-right:8px;padding:3px 6px;border-radius:4px;background:#f0f2f5;color:#687589;font-size:10px}.private-badge{margin-right:8px;padding:3px 6px;border-radius:4px;background:#fff2cf;color:#956700;font-size:10px;font-weight:650}.private-comment{border-color:#eddca4;background:#fffdf8}
.real-photo-preview{position:relative;width:calc(33.333% - 8px);min-width:150px;overflow:hidden;border-radius:6px;background:#edf1f5;color:#fff;text-decoration:none}.real-photo-preview img{width:100%;aspect-ratio:1.45/1;display:block;object-fit:cover}.real-photo-preview span{position:absolute;right:6px;bottom:6px;left:6px;overflow:hidden;padding:4px 6px;border-radius:4px;background:rgba(0,0,0,.52);font-size:9px;text-overflow:ellipsis;white-space:nowrap}.real-file-card{color:inherit;text-decoration:none}
.editor-attach-button{width:34px;height:34px;display:grid;place-items:center;border-radius:5px;cursor:pointer}.editor-attach-button:hover{background:#edf2f8}.comment-file-preview{display:flex;flex-wrap:wrap;gap:7px;padding:0 12px 8px}.comment-selected-file{max-width:260px;padding:5px 8px;overflow:hidden;border-radius:5px;background:#eef3f8;color:#59687c;font-size:10px;text-overflow:ellipsis;white-space:nowrap}.ticket-closed-message{margin-top:15px;padding:18px;border:1px solid #dfe6ef;border-radius:7px;background:#f4f6f8;color:#677487;text-align:center;font-size:12px}
.details-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.detail-card{margin:0}.detail-card-wide{grid-column:1/-1}.detail-list{padding:8px 16px}.detail-list>div{display:grid;grid-template-columns:140px 1fr;gap:12px;padding:11px 0;border-bottom:1px solid #edf0f4}.detail-list>div:last-child{border-bottom:0}.detail-list span{color:var(--muted);font-size:11px}.detail-list strong{font-size:12px;font-weight:600}.detail-note strong{line-height:1.6}
.attachments-gallery{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.attachment-gallery-item{overflow:hidden;border:1px solid var(--border);border-radius:7px;background:#fff;color:inherit;text-decoration:none}.attachment-gallery-item img{width:100%;aspect-ratio:1.4/1;display:block;object-fit:cover;background:#eef1f5}.attachment-gallery-item>div:last-child{padding:10px 12px}.attachment-gallery-item strong,.attachment-gallery-item small{display:block}.attachment-gallery-item strong{overflow:hidden;font-size:11px;text-overflow:ellipsis;white-space:nowrap}.attachment-gallery-item small{margin-top:4px;color:var(--muted);font-size:9px}.attachment-generic-icon{height:145px;display:grid;place-items:center;background:#f1f3f6;color:#657185;font-size:22px;font-weight:800}
.participants-full-panel,.history-panel{margin:0}.participants-full-list{padding:8px 16px}.participant-full-row{display:flex;align-items:center;gap:12px;padding:11px 0;border-bottom:1px solid #edf0f4}.participant-full-row:last-child{border-bottom:0}.participant-full-row strong,.participant-full-row span,.participant-full-row small{display:block}.participant-full-row strong{font-size:12px}.participant-full-row span{margin-top:2px;color:#58708e;font-size:9px;text-transform:uppercase}.participant-full-row small{margin-top:3px;color:var(--muted);font-size:10px}
.history-list{padding:8px 18px 18px}.history-row{position:relative;display:grid;grid-template-columns:18px 1fr;gap:10px;padding:13px 0}.history-row:not(:last-child)::before{content:"";position:absolute;top:29px;bottom:-8px;left:7px;width:1px;background:#dce4ee}.history-dot{z-index:1;width:15px;height:15px;margin-top:2px;border:3px solid #d9eaff;border-radius:50%;background:#1683ff}.history-row strong{display:block;font-size:11px}.history-row small{display:block;margin-top:4px;color:var(--muted);font-size:9px}.history-change{display:flex;gap:7px;margin-top:5px;color:#57667b;font-size:10px}
.management-panel{margin-bottom:17px}.management-form{display:grid;gap:12px;padding:15px}.management-form label{color:#4b596c;font-size:11px;font-weight:650}.management-form select{width:100%;margin-top:6px;padding:10px 11px;border:1px solid #ccd6e2;border-radius:6px;background:#fff}.attachment-row{color:inherit;text-decoration:none}.sidebar-empty{padding:18px;color:var(--muted);text-align:center;font-size:10px}
@media(max-width:900px){.details-grid{grid-template-columns:1fr}.detail-card-wide{grid-column:auto}.attachments-gallery{grid-template-columns:repeat(2,1fr)}}@media(max-width:650px){.real-photo-preview{width:100%}.attachments-gallery{grid-template-columns:1fr}.detail-list>div{grid-template-columns:1fr;gap:3px}}


/* =========================================================
   THEME / NAVIGATION V2
   Dashboard e Ticket condividono la stessa identità visiva
   ========================================================= */

.sidebar-nav .nav-icon {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    flex: 0 0 22px;
}

.sidebar-nav .nav-icon svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ticket-main .panel,
.ticket-sidebar .panel,
.comment,
.comment-editor {
    box-shadow: 0 1px 2px rgba(18, 37, 63, .025);
}

.ticket-header {
    padding-top: 2px;
}

.ticket-title-row h1 {
    letter-spacing: -.015em;
}

.ticket-sidebar .panel-header,
.ticket-main .panel-header {
    background: #fff;
}

.ticket-sidebar .info-row {
    border-bottom: 1px solid #f0f2f5;
}

.ticket-sidebar .info-row:last-child {
    border-bottom: 0;
}

.ticket-sidebar .info-icon {
    width: 7px;
    height: 7px;
    overflow: hidden;
    border-radius: 50%;
    background: #8fa0b4;
    color: transparent;
}

@media (min-width: 1181px) {
    .ticket-layout {
        grid-template-columns: minmax(0, 1fr) 365px;
    }
}


/* =========================================================
   DASHBOARD CATEGORY SCOPE V3
   ========================================================= */

.dashboard-scope-banner {
    min-height: 72px;
    margin-bottom: 15px;
    padding: 13px 17px;
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto auto;
    gap: 20px;
    align-items: center;
    border: 1px solid #cddff3;
    border-radius: 8px;
    background: #f4f9ff;
}

.dashboard-scope-banner > div span,
.dashboard-scope-banner > div strong {
    display: block;
}

.dashboard-scope-banner > div span {
    color: #647489;
    font-size: 10px;
}

.dashboard-scope-banner > div strong {
    margin-top: 2px;
    color: #1d3859;
    font-size: 16px;
}

.dashboard-scope-banner > div:nth-child(2) {
    text-align: right;
}

.dashboard-scope-banner > div:nth-child(2) strong {
    font-size: 23px;
}

.dashboard-scope-banner a {
    padding: 9px 12px;
    border: 1px solid #bad4f0;
    border-radius: 6px;
    background: #fff;
    color: #136fcf;
    text-decoration: none;
    font-size: 10px;
    font-weight: 650;
}

.dashboard-scope-banner a:hover {
    background: #eef6ff;
}

/* Uniforma Nuovo Ticket a Dashboard e Ticket */
.unified-page-theme .panel {
    box-shadow: 0 1px 2px rgba(18, 37, 63, .025);
}

.unified-page-theme .panel-header {
    background: #fff;
}

.unified-page-theme .new-ticket-heading h1 {
    letter-spacing: -.015em;
}

.unified-page-theme .ticket-form-grid,
.unified-page-theme .ticket-form-stack {
    background: #fff;
}

@media (max-width: 760px) {
    .dashboard-scope-banner {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .dashboard-scope-banner > div:nth-child(2) {
        text-align: left;
    }

    .dashboard-scope-banner a {
        width: fit-content;
    }
}


/* =========================================================
   UTENTI E ANAGRAFICA V1
   ========================================================= */

.users-content {
    max-width: 1550px;
    margin: 0 auto;
}

.users-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.users-heading h1 {
    margin: 0;
    font-size: 30px;
    letter-spacing: -.015em;
}

.users-heading p {
    margin: 5px 0 0;
    color: var(--muted);
}

.users-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 17px;
}

.users-stats article {
    padding: 17px 19px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.users-stats span,
.users-stats strong {
    display: block;
}

.users-stats span {
    color: var(--muted);
    font-size: 10px;
}

.users-stats strong {
    margin-top: 4px;
    font-size: 25px;
}

.users-table-wrap {
    overflow-x: auto;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.users-table th,
.users-table td {
    padding: 12px 13px;
    border-bottom: 1px solid #edf0f4;
    text-align: left;
    vertical-align: middle;
}

.users-table th {
    background: #fafbfd;
    color: #687589;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 210px;
}

.user-cell strong,
.user-cell small {
    display: block;
}

.user-cell strong {
    font-size: 11px;
}

.user-cell small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px;
}

.access-role {
    display: inline-flex;
    padding: 4px 7px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 700;
}

.access-admin {
    color: #7033b5;
    background: #f1e7ff;
}

.access-staff {
    color: #1765af;
    background: #e4f0ff;
}

.access-utente {
    color: #4f6479;
    background: #edf1f5;
}

.user-modal {
    width: min(760px, 100%);
}

.user-form-grid {
    grid-template-columns: 1fr 1fr;
}

.user-active-toggle {
    grid-column: 1 / -1;
}

.profile-catalog-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.profile-catalog-panel {
    margin: 0;
}

.profile-option-list {
    padding: 8px;
}

.profile-option-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.profile-option-row:hover {
    background: #f5f8fc;
}

.profile-option-row strong,
.profile-option-row small {
    display: block;
}

.profile-option-row strong {
    font-size: 11px;
}

.profile-option-row small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px;
}

.profile-ticket-grid {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1100px) {
    .profile-ticket-grid {
        grid-template-columns: 1fr 1fr;
    }

    .profile-catalog-grid {
        grid-template-columns: 1fr;
    }
}

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

    .user-form-grid,
    .profile-ticket-grid {
        grid-template-columns: 1fr;
    }

    .users-heading {
        flex-direction: column;
    }
}


/* =========================================================
   LUOGO PROFILO V2
   ========================================================= */

.user-location-field {
    grid-column: 1 / -1;
}

.user-location-field small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 400;
    line-height: 1.45;
}

.user-location-description {
    max-width: 360px;
    color: #66758a;
    line-height: 1.4;
}

.location-description-live {
    display: block;
    min-height: 18px;
    margin-top: 7px;
    padding: 8px 10px;
    border-radius: 5px;
    background: #f4f7fa;
    color: #68778b;
    font-size: 10px;
    font-weight: 400;
    line-height: 1.45;
}

.summary-list > div > small {
    display: block;
    margin-top: 4px;
    color: #7d8999;
    font-size: 9px;
    line-height: 1.4;
}

.detail-location-description strong,
.info-row-description strong {
    color: #5f6f84;
    font-weight: 500;
    line-height: 1.45;
}


/* =========================================================
   UTENTE DESCRIZIONE + CATALOGO THEME V3
   ========================================================= */

.user-description-field,
.user-location-field {
    grid-column: 1 / -1;
}

.user-description-field textarea,
.user-location-field textarea {
    width: 100%;
    margin-top: 7px;
    padding: 11px 12px;
    border: 1px solid #ccd6e2;
    border-radius: 6px;
    outline: none;
    resize: vertical;
    color: var(--text);
    background: #fff;
}

.user-description-field textarea:focus,
.user-location-field textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(22, 131, 255, .1);
}

.requester-description-box {
    padding: 11px 12px;
    border: 1px solid #dce4ed;
    border-radius: 6px;
    background: #f8fafc;
}

.requester-description-box span,
.requester-description-box strong {
    display: block;
}

.requester-description-box span {
    color: #77859a;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.requester-description-box strong {
    margin-top: 4px;
    color: #536176;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.45;
}

#luogo_descrizione {
    width: 100%;
    margin-top: 8px;
    padding: 10px 11px;
    border: 1px solid #ccd6e2;
    border-radius: 6px;
    resize: vertical;
    color: var(--text);
    background: #fff;
}

#luogo_descrizione:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(22, 131, 255, .1);
}

.unified-page-theme .catalog-heading h1 {
    letter-spacing: -.015em;
}

.unified-page-theme .catalog-section,
.unified-page-theme .catalog-panel,
.unified-page-theme .panel {
    box-shadow: 0 1px 2px rgba(18, 37, 63, .025);
}


/* =========================================================
   CAMPI TICKET GLOBALI + REPORT V4
   ========================================================= */
.dashboard-person-cell strong,.dashboard-person-cell small,
.dashboard-location-cell strong,.dashboard-location-cell small,
.report-complex-cell strong,.report-complex-cell small,
.report-ticket-link strong,.report-ticket-link span { display:block; }

.dashboard-person-cell small,.dashboard-location-cell small {
    max-width:220px;margin-top:3px;overflow:hidden;color:#7a8798;
    font-size:9px;text-overflow:ellipsis;white-space:nowrap;
}

.report-content { max-width:1600px;margin:0 auto; }
.report-heading { display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:18px; }
.report-heading h1 { margin:0;font-size:30px;letter-spacing:-.015em; }
.report-heading p { margin:5px 0 0;color:var(--muted); }

.report-export-button { display:inline-flex;align-items:center;gap:7px;text-decoration:none; }
.report-export-button svg { width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round; }

.report-filter-panel { margin-bottom:16px;padding:16px; }
.report-filter-grid { display:grid;grid-template-columns:repeat(6,minmax(120px,1fr));gap:12px; }
.report-filter-grid label { color:#4d5b6f;font-size:10px;font-weight:650; }
.report-filter-grid select,.report-filter-grid input { width:100%;margin-top:6px;padding:10px 11px;border:1px solid #ccd6e2;border-radius:6px;background:#fff;color:var(--text); }
.report-filter-actions { display:flex;justify-content:flex-end;gap:8px;margin-top:13px; }
.report-stats { margin-bottom:16px; }

.report-table-wrap { overflow-x:auto; }
.report-table { width:100%;border-collapse:collapse;font-size:11px; }
.report-table th,.report-table td { padding:12px 13px;border-bottom:1px solid #edf0f4;text-align:left;vertical-align:top; }
.report-table th { background:#fafbfd;color:#687589;font-size:9px;text-transform:uppercase;letter-spacing:.04em; }

.report-ticket-link { min-width:150px;color:inherit;text-decoration:none; }
.report-ticket-link strong { color:#1675d1;font-size:10px; }
.report-ticket-link span { max-width:240px;margin-top:4px;font-size:11px;font-weight:600; }
.report-complex-cell { min-width:150px; }
.report-complex-cell strong { font-size:10px; }
.report-complex-cell small { max-width:260px;margin-top:3px;color:#768397;font-size:9px;line-height:1.4; }

@media (max-width:1200px) { .report-filter-grid { grid-template-columns:repeat(3,1fr); } }
@media (max-width:720px) {
    .report-heading { flex-direction:column; }
    .report-filter-grid { grid-template-columns:1fr; }
    .report-filter-actions { flex-direction:column-reverse; }
    .report-filter-actions .btn { width:100%; }
}


/* =========================================================
   TICKET PROFILO FIX V5
   ========================================================= */
.ticket-info-compact .panel-header { padding: 12px 14px; }

.ticket-info-compact-grid {
    display:grid;
    grid-template-columns:1fr 1fr;
    padding:4px 12px 9px;
}

.ticket-info-compact-grid > div {
    min-width:0;
    padding:8px 6px;
    border-bottom:1px solid #eef1f4;
}

.ticket-info-compact-grid span,
.ticket-info-compact-grid strong,
.ticket-info-compact-grid small { display:block; }

.ticket-info-compact-grid span {
    margin-bottom:3px;
    color:#7a8798;
    font-size:8.5px;
    text-transform:uppercase;
    letter-spacing:.035em;
}

.ticket-info-compact-grid strong {
    color:#18263b;
    font-size:10.5px;
    line-height:1.3;
    overflow-wrap:anywhere;
}

.ticket-info-compact-grid small {
    margin-top:3px;
    color:#6f7c8e;
    font-size:9px;
    line-height:1.35;
    overflow-wrap:anywhere;
}

.ticket-info-compact-grid .ticket-info-wide { grid-column:1 / -1; }

.ticket-info-compact-grid .compact-secondary {
    color:#5f6e80;
    font-weight:500;
}

.requester-description-box strong { white-space:pre-wrap; }

#luogo_descrizione {
    min-height:72px;
    margin-top:8px;
}

@media (max-width:650px) {
    .ticket-info-compact-grid { grid-template-columns:1fr; }
    .ticket-info-compact-grid .ticket-info-wide { grid-column:auto; }
}


/* =========================================================
   NUOVO TICKET PROFILO V7
   ========================================================= */

.requester-profile-card {
    margin-top: 4px;
    padding: 13px 14px;
    border: 1px solid #d9e2ed;
    border-radius: 7px;
    background: #f8fafc;
}

.requester-profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 11px 18px;
}

.requester-profile-grid > div {
    min-width: 0;
}

.requester-profile-grid span,
.requester-profile-grid strong {
    display: block;
}

.requester-profile-grid span {
    margin-bottom: 3px;
    color: #77869a;
    font-size: 8.5px;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.requester-profile-grid strong {
    color: #26354a;
    font-size: 10.5px;
    font-weight: 550;
    line-height: 1.4;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.requester-profile-grid .requester-profile-wide {
    grid-column: 1 / -1;
}

@media (max-width: 680px) {
    .requester-profile-grid {
        grid-template-columns: 1fr;
    }

    .requester-profile-grid .requester-profile-wide {
        grid-column: auto;
    }
}


/* =========================================================
   AREA UTENTE V1
   ========================================================= */

.user-sidebar .sidebar-nav {
    padding-top: 14px;
}

.user-dashboard-content {
    max-width: 1450px;
    margin: 0 auto;
}

.user-welcome {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    margin-bottom:18px;
    padding:6px 1px;
}

.user-welcome .eyebrow {
    color:#1675d1;
    font-size:9px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.08em;
}

.user-welcome h1 {
    margin:4px 0 0;
    font-size:30px;
    letter-spacing:-.02em;
}

.user-welcome p {
    margin:6px 0 0;
    color:var(--muted);
}

.user-primary-action {
    text-decoration:none;
}

.user-kpi-grid {
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:14px;
    margin-bottom:16px;
}

.user-kpi-grid article {
    padding:16px 18px;
    border:1px solid var(--border);
    border-radius:8px;
    background:#fff;
}

.user-kpi-grid span,
.user-kpi-grid strong {
    display:block;
}

.user-kpi-grid span {
    color:var(--muted);
    font-size:10px;
}

.user-kpi-grid strong {
    margin-top:4px;
    font-size:27px;
}

.user-dashboard-grid {
    display:grid;
    grid-template-columns:minmax(0,1fr) 320px;
    gap:16px;
    align-items:start;
}

.user-ticket-list {
    padding:5px 14px 12px;
}

.user-ticket-row {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    padding:13px 4px;
    border-bottom:1px solid #edf0f4;
    color:inherit;
    text-decoration:none;
}

.user-ticket-row:last-child {
    border-bottom:0;
}

.user-ticket-row:hover {
    background:#fbfdff;
}

.user-ticket-main {
    min-width:0;
}

.user-ticket-number {
    margin-bottom:3px;
    color:#1974cf;
    font-size:9px;
    font-weight:700;
}

.user-ticket-main strong,
.user-ticket-main small {
    display:block;
}

.user-ticket-main strong {
    font-size:12px;
}

.user-ticket-main small {
    margin-top:4px;
    color:#758398;
    font-size:9px;
}

.user-ticket-state {
    flex:0 0 auto;
    text-align:right;
}

.user-ticket-state strong,
.user-ticket-state small {
    display:block;
}

.user-ticket-state strong {
    font-size:10px;
}

.user-ticket-state small {
    margin-top:4px;
    color:#8894a4;
    font-size:8.5px;
}

.user-profile-summary-body {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:0;
    padding:6px 14px 12px;
}

.user-profile-summary-body > div {
    padding:9px 6px;
    border-bottom:1px solid #eef1f4;
}

.user-profile-summary-body .wide {
    grid-column:1 / -1;
}

.user-profile-summary-body span,
.user-profile-summary-body strong {
    display:block;
}

.user-profile-summary-body span {
    color:#7c899b;
    font-size:8.5px;
    text-transform:uppercase;
}

.user-profile-summary-body strong {
    margin-top:3px;
    font-size:10px;
    line-height:1.4;
}

.user-ticket-filters {
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    margin-bottom:15px;
}

.user-ticket-filters a {
    padding:8px 12px;
    border:1px solid #d9e2ec;
    border-radius:999px;
    background:#fff;
    color:#64748a;
    font-size:10px;
    text-decoration:none;
}

.user-ticket-filters a.active {
    border-color:#b8d5f5;
    background:#edf6ff;
    color:#126ec9;
    font-weight:650;
}

.user-ticket-list.full {
    padding-top:8px;
}

.user-self-profile .requester-profile-card {
    margin-top:0;
}

@media (max-width:900px) {
    .user-dashboard-grid {
        grid-template-columns:1fr;
    }
    .user-kpi-grid {
        grid-template-columns:1fr 1fr;
    }
}

@media (max-width:650px) {
    .user-welcome {
        align-items:flex-start;
        flex-direction:column;
    }
    .user-kpi-grid {
        grid-template-columns:1fr 1fr;
    }
    .user-ticket-row {
        align-items:flex-start;
        flex-direction:column;
    }
    .user-ticket-state {
        text-align:left;
    }
}


/* =========================================================
   GRUPPI / STAFF V2
   ========================================================= */
.user-form-grid {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:13px 16px;
    padding:16px;
}
.user-form-grid label {
    display:flex;
    flex-direction:column;
    gap:6px;
}
.user-form-grid .form-wide { grid-column:1 / -1; }

.group-box {
    padding:12px 13px;
    border:1px solid #dce4ee;
    border-radius:7px;
    background:#f8fafc;
}
.group-box > span {
    display:block;
    margin-bottom:8px;
    color:#627086;
    font-size:10px;
    font-weight:700;
    text-transform:uppercase;
}
.group-box label {
    display:inline-flex;
    flex-direction:row;
    align-items:center;
    margin-right:16px;
    gap:6px;
    font-size:11px;
}
.group-box small {
    display:block;
    margin-top:8px;
    color:#7b8798;
    font-size:9px;
}
.users-admin-list { padding:8px 14px 14px; }
.user-admin-card {
    border-bottom:1px solid #edf0f4;
}
.user-admin-card > summary {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:13px 4px;
    cursor:pointer;
    list-style:none;
}
.user-admin-card > summary::-webkit-details-marker { display:none; }
.user-admin-card > summary strong,
.user-admin-card > summary small { display:block; }
.user-admin-card > summary small { margin-top:4px;color:#7b8798;font-size:9px; }
.check-line { display:flex!important;flex-direction:row!important;align-items:center;gap:7px!important; }

.management-form small {
    display:block;
    margin-top:5px;
    color:#7a8798;
    font-size:8.5px;
    line-height:1.4;
}

@media(max-width:700px){
    .user-form-grid{grid-template-columns:1fr;}
    .user-form-grid .form-wide{grid-column:auto;}
}
