.demo-professional-body{margin:0;background:#f4f7fa;color:#212529}.demo-pro-ribbon{display:flex;justify-content:center;gap:.75rem;align-items:center;flex-wrap:wrap;padding:.45rem 1rem;background:#0f5f7f;color:#fff;font-size:.82rem;position:relative;z-index:1100}.demo-pro-topbar{background:#fff;border-bottom:1px solid #dee2e6;padding:.7rem 0;position:sticky;top:0;z-index:1030}.demo-pro-brand{display:inline-flex;align-items:center;gap:.7rem;color:#17324d}.demo-pro-brand__mark{width:2.35rem;height:2.35rem;border-radius:.7rem;display:inline-flex;align-items:center;justify-content:center;background:#e9f5fa;font-size:1.25rem}.demo-pro-brand span:last-child{display:flex;flex-direction:column;line-height:1.1}.demo-pro-brand small{color:#6c757d;margin-top:.2rem}.demo-pro-shell{display:grid;grid-template-columns:250px minmax(0,1fr);min-height:calc(100vh - 126px)}.demo-pro-sidebar{background:#17324d;color:#fff;padding:1.1rem .8rem;position:sticky;top:62px;align-self:start;height:calc(100vh - 62px);overflow-y:auto}.demo-pro-sidebar__studio{padding:.8rem .75rem 1rem;border-bottom:1px solid rgba(255,255,255,.15);display:flex;flex-direction:column;gap:.18rem}.demo-pro-sidebar__studio .small{font-size:.68rem;letter-spacing:.08em;color:#a8cad8}.demo-pro-sidebar__studio span{font-size:.8rem;color:#b9ced8}.demo-pro-menu{display:flex;flex-direction:column;gap:.2rem;padding-top:.8rem}.demo-pro-menu__link{display:flex;gap:.6rem;align-items:center;padding:.62rem .75rem;border-radius:.55rem;color:#e7f0f4;text-decoration:none;font-size:.9rem}.demo-pro-menu__link:hover,.demo-pro-menu__link.is-active{background:#fff;color:#17324d}.demo-pro-menu__label{padding:.85rem .75rem .35rem;color:#95b6c5;font-size:.68rem;text-transform:uppercase;letter-spacing:.08em}.demo-pro-content{min-width:0}.demo-pro-contextbar{display:flex;justify-content:space-between;align-items:center;gap:1rem;flex-wrap:wrap;padding:.72rem 1.4rem;background:#fff;border-bottom:1px solid #dee2e6}.demo-pro-contextbar>div:first-child{display:flex;gap:.55rem;align-items:center;flex-wrap:wrap}.demo-pro-main{min-height:70vh}.demo-pro-footer{border-top:1px solid #dee2e6;background:#fff;padding:1rem 0;font-size:.85rem}.demo-pro-footer a{text-decoration:none}.cpm-professional-stat{border-radius:.85rem}.cpm-studio-section{border-radius:.85rem;overflow:hidden}.cpm-studio-section--blue{border-top:3px solid #0d6efd!important}.cpm-studio-section--blue-deep{border-top:3px solid #17324d!important}.cpm-studio-section--green{border-top:3px solid #198754!important}.cpm-studio-section--orange{border-top:3px solid #fd7e14!important}.cpm-studio-subgroup{background:#fff}.demo-case-assignment{transition:border-color .2s ease,box-shadow .2s ease}.demo-case-assignment.is-saving{border-color:#ffc107!important;box-shadow:0 0 0 .14rem rgba(255,193,7,.13)}.demo-case-assignment.is-saved{border-color:#198754!important;box-shadow:0 0 0 .14rem rgba(25,135,84,.12)}.demo-case-assignment.is-error{border-color:#dc3545!important}.page-help-card{--page-help-accent:#0d6efd}.cpm-professional-option{background:#fff}.cpm-professional-option:has(input[type="checkbox"]:checked){background:#f7fbff;border-color:#9ec5fe!important}.demo-pro-save-saved{color:#198754!important}.demo-pro-save-saving{color:#b58105!important}.demo-pro-save-error{color:#dc3545!important}@media(max-width:991.98px){.demo-pro-shell{grid-template-columns:1fr}.demo-pro-sidebar{position:relative;top:auto;height:auto;overflow:visible;padding:.65rem}.demo-pro-sidebar__studio{display:none}.demo-pro-menu{flex-direction:row;overflow-x:auto;padding:0;gap:.35rem}.demo-pro-menu__label{display:none}.demo-pro-menu__link{white-space:nowrap;background:rgba(255,255,255,.08)}.demo-pro-contextbar{padding:.65rem 1rem}}@media(max-width:575.98px){.demo-pro-ribbon span{display:none}.demo-pro-topbar .btn-outline-primary{display:none}.demo-pro-brand small{font-size:.7rem}.demo-pro-contextbar{align-items:flex-start}.demo-pro-contextbar>div:last-child{width:100%}.table{font-size:.88rem}}

.demo-workspace-action{display:flex;min-height:8rem;flex-direction:column;justify-content:center;align-items:flex-start;gap:.28rem;padding:1rem;border:1px solid #dee2e6;border-radius:.85rem;background:#fff;text-decoration:none;color:#212529;box-shadow:0 .15rem .5rem rgba(33,37,41,.05);transition:.2s}.demo-workspace-action:hover{transform:translateY(-2px);border-color:#86b7fe;box-shadow:0 .4rem 1rem rgba(13,110,253,.12)}.demo-workspace-action>span{font-size:1.45rem}.demo-workspace-action small{color:#6c757d}.demo-activity-list{display:flex;flex-direction:column;gap:1rem}.demo-activity-item{display:flex;gap:.8rem;align-items:flex-start;padding-bottom:1rem;border-bottom:1px solid #eef0f2}.demo-activity-item:last-child{border-bottom:0;padding-bottom:0}.demo-activity-icon{width:2rem;height:2rem;border-radius:.55rem;background:#f1f5f8;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto}.demo-professional-calendar .fc-toolbar-title{font-size:1.15rem}.demo-professional-calendar .fc-event{cursor:pointer}.demo-event-legal{border-left:4px solid #6f42c1!important}.demo-event-client{border-left:4px solid #0d6efd!important}.demo-event-mediation{border-left:4px solid #198754!important}.demo-event-deadline{border-left:4px solid #fd7e14!important}.demo-event-family{border-left:4px solid #20c997!important}.demo-expense-status--pending,.demo-document-status--review{background:#fff3cd!important;color:#664d03!important;border:1px solid #ffecb5}.demo-expense-status--accepted,.demo-document-status--approved{background:#d1e7dd!important;color:#0f5132!important;border:1px solid #badbcc}.demo-expense-status--rejected{background:#f8d7da!important;color:#842029!important;border:1px solid #f5c2c7}.demo-expense-status--paid,.demo-document-status--signed{background:#198754!important;color:#fff!important}.demo-document-status--private{background:#6c757d!important;color:#fff!important}.demo-fake-document{min-height:22rem;border:1px solid #dee2e6;border-radius:.75rem;background:#fff;padding:2rem;box-shadow:inset 0 0 0 1rem #f8f9fa}.demo-fake-line{height:.55rem;border-radius:999px;background:#e9ecef;margin:.85rem 0}.demo-pro-chat__stream{height:30rem;overflow-y:auto;padding:1.2rem;background:#f5f7f9;display:flex;flex-direction:column;gap:.8rem}.demo-pro-chat__message{display:flex}.demo-pro-chat__message--professional{justify-content:flex-end}.demo-pro-chat__bubble{max-width:78%;padding:.75rem .9rem;border-radius:.9rem;background:#fff;border:1px solid #dee2e6}.demo-pro-chat__message--professional .demo-pro-chat__bubble{background:#e7f4ff;border-color:#b6dfff}.demo-pro-chat__time{margin-top:.35rem;color:#6c757d;font-size:.72rem;text-align:right}.demo-pro-chat__composer{display:flex;gap:.75rem;padding:1rem;background:#fff;border-top:1px solid #dee2e6}.demo-pro-chat__composer textarea{resize:none}.demo-pro-chat__composer .btn{align-self:stretch}@media(max-width:767.98px){.demo-pro-chat__stream{height:24rem}.demo-pro-chat__bubble{max-width:92%}.demo-pro-chat__composer{flex-direction:column}.demo-professional-calendar .fc-toolbar{align-items:flex-start;gap:.5rem}.demo-professional-calendar .fc-toolbar-chunk:last-child{display:none}}

/* V3: sidebar persistente e contesto famiglia in sola consultazione */
.demo-pro-sidebar{box-shadow:4px 0 18px rgba(23,50,77,.08)}
.demo-pro-sidebar__eyebrow{font-size:.66rem;letter-spacing:.09em;text-transform:uppercase;color:#9fc2d1;font-weight:700}
.demo-pro-sidebar__case{margin:.8rem .4rem .15rem;padding:.8rem .75rem;border:1px solid rgba(255,255,255,.16);border-radius:.7rem;background:rgba(255,255,255,.06);display:flex;flex-direction:column;gap:.18rem}
.demo-pro-sidebar__case>span:not(.demo-pro-readonly-pill){font-size:.78rem;color:#c3d8e1}
.demo-pro-readonly-pill{display:inline-flex;width:max-content;margin-top:.35rem;padding:.2rem .45rem;border-radius:999px;background:rgba(111,198,154,.16);border:1px solid rgba(111,198,154,.35);color:#c8f1dc!important;font-size:.68rem!important;font-weight:700}
.demo-pro-readonly-badge{background:#e7f6ee!important;color:#146c43!important;border:1px solid #badbcc}
.demo-pro-readonly-alert{background:#eef8f3;border:1px solid #cfe9dc;color:#245a42;border-left:4px solid #198754}
.demo-workspace-action--studio{border-style:dashed;background:#f8fafc}

/* Calendario: colori della legenda identici alle categorie degli eventi */
.demo-professional-calendar .fc-event{cursor:pointer;border-width:1px!important;border-left-width:4px!important;font-weight:600}
.demo-event-legal{background:#f1eafa!important;border-color:#6f42c1!important;color:#4f2f76!important}
.demo-event-client{background:#e8f1ff!important;border-color:#0d6efd!important;color:#084298!important}
.demo-event-mediation{background:#e7f6ee!important;border-color:#198754!important;color:#146c43!important}
.demo-event-deadline{background:#fff0e2!important;border-color:#fd7e14!important;color:#984c0c!important}
.demo-event-family{background:#e5f8f4!important;border-color:#20c997!important;color:#0f6f60!important}
.demo-calendar-legend{display:flex;flex-direction:column;gap:.72rem}
.demo-calendar-legend>div{display:flex;align-items:center;gap:.6rem}
.demo-calendar-dot{width:.8rem;height:.8rem;border-radius:50%;display:inline-block;flex:0 0 auto}
.demo-calendar-dot--legal{background:#6f42c1}.demo-calendar-dot--client{background:#0d6efd}.demo-calendar-dot--mediation{background:#198754}.demo-calendar-dot--deadline{background:#fd7e14}.demo-calendar-dot--family{background:#20c997}

@media(min-width:992px){
  .demo-pro-shell{grid-template-columns:270px minmax(0,1fr)}
  .demo-pro-sidebar{position:sticky;top:61px;height:calc(100vh - 61px);overflow-y:auto}
}

/* V4: sidebar laterale anche su mobile, con apertura a scomparsa */
.demo-pro-sidebar-toggle{display:none}
.demo-pro-sidebar__mobile-head{display:none}
.demo-pro-sidebar-backdrop{display:none;border:0;padding:0}

@media(max-width:991.98px){
  .demo-pro-topbar{position:sticky;top:0;z-index:1040}
  .demo-pro-sidebar-toggle{display:inline-flex;align-items:center;gap:.35rem}
  .demo-pro-shell{display:block;min-height:calc(100vh - 126px)}
  .demo-pro-sidebar{
    position:fixed;
    inset:0 auto 0 0;
    top:0;
    width:min(86vw,320px);
    height:100vh;
    padding:.8rem;
    overflow-y:auto;
    z-index:1065;
    transform:translateX(-102%);
    transition:transform .22s ease;
    box-shadow:8px 0 28px rgba(0,0,0,.22);
  }
  .demo-pro-sidebar.is-open{transform:translateX(0)}
  .demo-pro-sidebar__mobile-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:1rem;
    padding:.35rem .35rem .8rem;
    margin-bottom:.35rem;
    border-bottom:1px solid rgba(255,255,255,.16);
  }
  .demo-pro-sidebar__studio{display:flex}
  .demo-pro-menu{display:flex;flex-direction:column;overflow:visible;padding-top:.8rem;gap:.2rem}
  .demo-pro-menu__label{display:block}
  .demo-pro-menu__link{white-space:normal;background:transparent}
  .demo-pro-sidebar-backdrop{
    position:fixed;
    inset:0;
    z-index:1060;
    background:rgba(8,20,31,.48);
  }
  .demo-pro-sidebar-backdrop.is-visible{display:block}
  body.demo-sidebar-open{overflow:hidden}
  .demo-pro-content{width:100%}
  .demo-pro-contextbar{padding:.65rem 1rem}
}

@media(max-width:575.98px){
  .demo-pro-sidebar-toggle{font-size:.82rem}
}

/* V6: panoramica pratica in stile dashboard consultiva */
.demo-case-hero{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;flex-wrap:wrap;padding:1.15rem 1.25rem;border:1px solid #dce6ed;border-radius:1rem;background:#fff;box-shadow:0 .35rem 1rem rgba(23,50,77,.06)}
.demo-case-hero__eyebrow{font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:#67808f;margin-bottom:.35rem}
.demo-case-stat{position:relative;overflow:hidden;min-height:108px;padding:1rem;border:1px solid #dce6ed;border-radius:.9rem;background:#fff;color:#17324d;box-shadow:0 .3rem .9rem rgba(23,50,77,.06);transition:transform .16s ease,box-shadow .16s ease}
a:hover .demo-case-stat{transform:translateY(-2px);box-shadow:0 .5rem 1.2rem rgba(23,50,77,.1)}
.demo-case-stat__label{display:block;color:#6c757d;font-size:.78rem;font-weight:600}.demo-case-stat strong{display:block;margin-top:.15rem;font-size:1.75rem;line-height:1.05}.demo-case-stat__icon{position:absolute;right:.8rem;bottom:.55rem;font-size:1.65rem;opacity:.72}
.demo-case-stat--success{border-top:3px solid #198754}.demo-case-stat--warning{border-top:3px solid #fd7e14}.demo-case-stat--primary{border-top:3px solid #0d6efd}.demo-case-stat--info{border-top:3px solid #20c997}
.demo-case-preview-list{display:flex;flex-direction:column;gap:.85rem}.demo-case-preview-row{display:flex;align-items:center;gap:.9rem;padding-bottom:.85rem;border-bottom:1px solid #edf1f4}.demo-case-preview-row:last-child{padding-bottom:0;border-bottom:0}.demo-case-preview-date{display:flex;flex:0 0 3.25rem;height:3.25rem;flex-direction:column;align-items:center;justify-content:center;border-radius:.75rem;background:#eef6fa;color:#17324d}.demo-case-preview-date span{font-size:1.15rem;font-weight:800;line-height:1}.demo-case-preview-date small{font-size:.62rem;font-weight:800;letter-spacing:.06em;margin-top:.25rem}
.demo-case-support-line{display:flex;justify-content:space-between;gap:1rem;padding:.48rem 0;border-bottom:1px solid #edf1f4}.demo-case-support-line:last-child{border-bottom:0}.demo-case-support-line span{color:#6c757d}.demo-case-support-line strong{text-align:right}
.demo-case-message-preview{font-size:.92rem}.demo-case-person{display:flex;justify-content:space-between;gap:1rem;align-items:center;padding:.68rem .75rem;border:1px solid #e2e8ed;border-radius:.65rem;background:#fbfcfd}.demo-case-person span{font-size:.8rem;color:#6c757d;text-align:right}
@media(max-width:767.98px){.demo-case-hero{padding:1rem}.demo-case-stat{min-height:96px;padding:.85rem}.demo-case-stat strong{font-size:1.5rem}.demo-case-person{align-items:flex-start;flex-direction:column;gap:.15rem}.demo-case-person span{text-align:left}.demo-case-support-line{align-items:flex-start;flex-direction:column;gap:.15rem}.demo-case-support-line strong{text-align:left}}

/* V7: calendario contenuto nel workspace, senza scroll orizzontale */
html,
.demo-professional-body{max-width:100%;overflow-x:hidden}
.demo-pro-shell,
.demo-pro-content,
.demo-pro-main,
.demo-pro-main .container-fluid{min-width:0;max-width:100%}
.demo-professional-calendar{width:100%;max-width:100%;min-width:0;overflow:hidden}
.demo-professional-calendar .fc{width:100%;max-width:100%;min-width:0}
.demo-professional-calendar .fc-view-harness,
.demo-professional-calendar .fc-view,
.demo-professional-calendar .fc-scrollgrid,
.demo-professional-calendar .fc-scrollgrid-section,
.demo-professional-calendar .fc-scrollgrid-section>td{min-width:0;max-width:100%}
.demo-professional-calendar .fc-scrollgrid,
.demo-professional-calendar .fc-scrollgrid table{width:100%!important;table-layout:fixed}
.demo-professional-calendar .fc-daygrid-day-frame{min-width:0}
.demo-professional-calendar .fc-daygrid-event-harness{max-width:100%;min-width:0}
.demo-professional-calendar .fc-daygrid-event{max-width:100%;min-width:0;overflow:hidden}
.demo-professional-calendar .fc-event-main,
.demo-professional-calendar .fc-event-main-frame,
.demo-professional-calendar .fc-event-title-container{min-width:0;max-width:100%;overflow:hidden}
.demo-professional-calendar .fc-event-time,
.demo-professional-calendar .fc-event-title{display:inline;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.demo-professional-calendar .fc-toolbar{flex-wrap:wrap;gap:.65rem}
.demo-professional-calendar .fc-toolbar-chunk{min-width:0}

@media(max-width:1199.98px){
  .demo-professional-calendar .fc-toolbar{align-items:center}
  .demo-professional-calendar .fc-toolbar-title{font-size:1.05rem}
  .demo-professional-calendar .fc-button{padding:.35rem .55rem;font-size:.82rem}
}

@media(max-width:767.98px){
  .demo-professional-calendar .fc-toolbar{align-items:flex-start}
  .demo-professional-calendar .fc-toolbar-chunk:nth-child(2){order:-1;width:100%;text-align:center}
  .demo-professional-calendar .fc-daygrid-event{font-size:.72rem}
}

/* V8: eventi calendario sempre leggibili, mai rettangoli apparentemente vuoti */
.demo-professional-calendar .fc-daygrid-event,
.demo-professional-calendar .fc-timegrid-event{
  color:inherit!important;
  box-shadow:none;
}
.demo-professional-calendar .fc-event-main{
  min-width:0;
  padding:.14rem .28rem!important;
  background:transparent!important;
  color:inherit!important;
}
.demo-professional-calendar .demo-calendar-event-content{
  display:flex;
  align-items:center;
  gap:.28rem;
  min-width:0;
  width:100%;
  color:inherit!important;
  font-size:.76rem;
  font-weight:700;
  line-height:1.3;
}
.demo-professional-calendar .demo-calendar-event-marker{
  width:.42rem;
  height:.42rem;
  border-radius:50%;
  flex:0 0 .42rem;
  background:#6c757d;
}
.demo-professional-calendar .demo-calendar-event-marker--legal{background:#6f42c1}
.demo-professional-calendar .demo-calendar-event-marker--client{background:#0d6efd}
.demo-professional-calendar .demo-calendar-event-marker--mediation{background:#198754}
.demo-professional-calendar .demo-calendar-event-marker--deadline{background:#fd7e14}
.demo-professional-calendar .demo-calendar-event-marker--family{background:#20c997}
.demo-professional-calendar .demo-calendar-event-time{
  flex:0 0 auto;
  font-weight:800;
  color:inherit!important;
}
.demo-professional-calendar .demo-calendar-event-title{
  display:block;
  min-width:0;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
  color:inherit!important;
}
.demo-professional-calendar .demo-event-legal,
.demo-professional-calendar .demo-event-legal .fc-event-main{color:#4f2f76!important}
.demo-professional-calendar .demo-event-client,
.demo-professional-calendar .demo-event-client .fc-event-main{color:#084298!important}
.demo-professional-calendar .demo-event-mediation,
.demo-professional-calendar .demo-event-mediation .fc-event-main{color:#146c43!important}
.demo-professional-calendar .demo-event-deadline,
.demo-professional-calendar .demo-event-deadline .fc-event-main{color:#7a3d08!important}
.demo-professional-calendar .demo-event-family,
.demo-professional-calendar .demo-event-family .fc-event-main{color:#0b5f53!important}

@media(max-width:767.98px){
  .demo-professional-calendar .demo-calendar-event-content{font-size:.69rem;gap:.2rem}
  .demo-professional-calendar .demo-calendar-event-marker{width:.34rem;height:.34rem;flex-basis:.34rem}
}

/* V9: registro pratiche fedele all'area studio, ma interamente simulato nel browser */
.demo-candidate-case{transition:border-color .2s ease,box-shadow .2s ease,opacity .2s ease}
.demo-candidate-case.is-saving{border-color:#ffc107!important;box-shadow:0 0 0 .14rem rgba(255,193,7,.13)}
.demo-candidate-case.is-saved{border-color:#198754!important;box-shadow:0 0 0 .14rem rgba(25,135,84,.12)}
.cpm-professional-group{min-width:0}
.cpm-professional-group legend{color:#17324d}
.cpm-professional-group--lawyer_group{border-left:3px solid #0d6efd!important}
.cpm-professional-group--mediator{border-left:3px solid #198754!important}
.cpm-professional-group--consultant{border-left:3px solid #fd7e14!important}
.cpm-professional-option{min-width:0;transition:background-color .15s ease,border-color .15s ease}
.cpm-professional-option .form-check-label{min-width:0;overflow-wrap:anywhere}
.demo-case-assignment [data-demo-lead-change]{border-left:3px solid #ffc107}
.demo-case-assignment [data-demo-save-status]{min-height:1.25rem}

@media(max-width:575.98px){
  .cpm-professional-group{padding:.8rem!important}
  .cpm-professional-option{padding:.65rem!important}
  .demo-candidate-case .card-footer{align-items:stretch!important}
  .demo-candidate-case .card-footer .btn{width:100%}
}

/* --------------------------------------------------------------------------
   Tour guidato Demo Professionisti
   -------------------------------------------------------------------------- */
.demo-tour-mask {
    position: fixed;
    z-index: 12000;
    background: rgba(12, 26, 38, 0.64);
    pointer-events: none;
}

.demo-tour-target {
    position: relative !important;
    z-index: 12002 !important;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.98), 0 0 0 8px rgba(21, 124, 163, 0.62) !important;
    border-radius: 0.5rem;
    animation: demoTourPulse 1.7s ease-in-out infinite;
    pointer-events: auto !important;
}

.demo-tour-popover {
    position: fixed;
    z-index: 12003;
    width: min(390px, calc(100vw - 24px));
    padding: 1rem;
    border-radius: 0.9rem;
    background: #ffffff;
    color: #16202a;
    box-shadow: 0 18px 56px rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(21, 124, 163, 0.24);
    pointer-events: auto;
}

.demo-tour-popover__top,
.demo-tour-popover__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.demo-tour-popover__eyebrow {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #157ca3;
}

.demo-tour-popover__exit {
    border: 0;
    background: transparent;
    padding: 0;
    font-size: 0.78rem;
    color: #6c757d;
    text-decoration: underline;
}

.demo-tour-popover__title {
    margin-top: 0.7rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.demo-tour-popover__text {
    margin-top: 0.45rem;
    line-height: 1.48;
    color: #4a5661;
}

.demo-tour-popover__transition {
    display: grid;
    gap: .45rem;
    margin-top: .85rem;
    padding: .7rem .8rem;
    border: 1px solid rgba(21, 124, 163, .22);
    border-radius: .6rem;
    background: rgba(21, 124, 163, .07);
    color: #11617f;
    font-size: .82rem;
    font-weight: 700;
}

.demo-tour-popover__transition-track {
    display: block;
    height: .32rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(21, 124, 163, .15);
}

.demo-tour-popover__transition-progress {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #157ca3, #198754);
}

.demo-tour-popover__transition-progress.is-running {
    animation: demoTourTransitionProgress linear forwards;
}

.demo-tour-popover.is-processing .demo-tour-popover__hint {
    opacity: .55;
}

@keyframes demoTourTransitionProgress {
    from { width: 0; }
    to { width: 100%; }
}

.demo-tour-popover__footer {
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid #e9ecef;
    font-size: 0.78rem;
    color: #6c757d;
}

.demo-tour-popover__hint {
    font-weight: 600;
    color: #157ca3;
}

@keyframes demoTourPulse {
    0%, 100% { transform: translateZ(0) scale(1); }
    50% { transform: translateZ(0) scale(1.015); }
}

@media (prefers-reduced-motion: reduce) {
    .demo-tour-popover__transition-progress.is-running {
        animation-duration: .2s !important;
    }
}

@media (max-width: 575.98px) {
    .demo-tour-popover {
        width: calc(100vw - 20px);
        padding: 0.9rem;
    }

    .demo-tour-popover__footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* --------------------------------------------------------------------------
   V18 · Simula, onboarding e strumenti Studio
   -------------------------------------------------------------------------- */
.demo-simulate-button{font-weight:700;white-space:nowrap}
.demo-simulation-menu{width:min(430px,94vw)}
.demo-simulate-section__title{font-size:.75rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#6c757d;margin-bottom:.45rem}
.demo-simulate-link{display:flex;width:100%;align-items:flex-start;gap:.8rem;padding:.75rem .7rem;border:0;border-radius:.7rem;background:transparent;text-align:left;color:#17324d;transition:background-color .15s ease,transform .15s ease}
.demo-simulate-link:hover,.demo-simulate-link:focus{background:#eef6fa;transform:translateX(2px);outline:0}
.demo-simulate-link>span:first-child{font-size:1.15rem;line-height:1.4;flex:0 0 1.6rem;text-align:center}
.demo-simulate-link>span:last-child{display:flex;min-width:0;flex-direction:column}
.demo-simulate-link strong{font-size:.94rem}
.demo-simulate-link small{color:#6c757d;line-height:1.35;margin-top:.08rem}

.demo-simula-intro{position:fixed;z-index:11950;width:min(360px,calc(100vw - 24px));padding:1rem 2.2rem 1rem 1rem;border-radius:.85rem;background:#fff;border:1px solid rgba(21,124,163,.3);box-shadow:0 14px 40px rgba(0,0,0,.2);display:flex;flex-direction:column;gap:.35rem;color:#17324d}
.demo-simula-intro::before{content:"";position:absolute;right:1.6rem;top:-8px;width:16px;height:16px;background:#fff;border-left:1px solid rgba(21,124,163,.3);border-top:1px solid rgba(21,124,163,.3);transform:rotate(45deg)}
.demo-simula-intro strong{font-size:1rem;color:#157ca3}.demo-simula-intro span{font-size:.88rem;line-height:1.45;color:#4f5b66}.demo-simula-intro__close{position:absolute;right:.55rem;top:.45rem;border:0;background:transparent;color:#6c757d;font-size:1.25rem;line-height:1}

.demo-flow-stack{display:flex;flex-direction:column;gap:.65rem;margin-top:1rem}
.demo-flow-stack>div{display:flex;align-items:center;gap:.7rem;padding:.75rem;border:1px solid #e4e9ed;border-radius:.65rem;background:#fbfcfd}
.demo-flow-stack span{display:flex;align-items:center;justify-content:center;width:1.8rem;height:1.8rem;border-radius:50%;background:#157ca3;color:#fff;font-size:.78rem;font-weight:800;flex:0 0 1.8rem}

.demo-studio-chat-card{min-height:560px;overflow:hidden}
.demo-studio-chat-messages{display:flex;flex-direction:column;gap:.75rem;min-height:390px;max-height:500px;overflow:auto;background:#f6f8fa}
.demo-studio-chat-message{max-width:78%;padding:.7rem .85rem;border-radius:.8rem;background:#fff;border:1px solid #e3e8ec;box-shadow:0 .15rem .4rem rgba(0,0,0,.04)}
.demo-studio-chat-message.is-demo{align-self:flex-end;background:#eaf6ef;border-color:#c9e7d4}
.demo-studio-chat-message__head{font-size:.72rem;font-weight:700;color:#6c757d;margin-bottom:.25rem}

.demo-letter-body{font-family:inherit;line-height:1.55;resize:vertical}

.demo-studio-event-internal{background:#e9ecef!important;border-color:#6c757d!important;color:#263238!important}
.demo-studio-event-legal{background:#efe8f8!important;border-color:#6f42c1!important;color:#4f2f76!important}
.demo-studio-event-mediation{background:#e8f5ed!important;border-color:#198754!important;color:#146c43!important}
.demo-studio-event-deadline{background:#fff1e3!important;border-color:#fd7e14!important;color:#7a3d08!important}
.demo-studio-event-client{background:#e7f1ff!important;border-color:#0d6efd!important;color:#084298!important}

[data-demo-tour-case-row] .btn,[data-demo-tour-accept-member]{white-space:nowrap}

@media(max-width:991.98px){
  .demo-pro-top-actions{gap:.35rem!important}
  .demo-pro-top-actions .btn{padding:.34rem .5rem;font-size:.78rem}
  .demo-studio-chat-card{min-height:auto}.demo-studio-chat-messages{min-height:320px;max-height:420px}
}
@media(max-width:575.98px){
  .demo-pro-topbar .demo-pro-brand small{display:none}
  .demo-pro-top-actions [data-demo-reset-all],.demo-pro-top-actions .btn-success{display:none}
  .demo-simulate-button{display:inline-flex!important}
  .demo-simula-intro{right:10px!important;left:auto!important}
  .demo-studio-chat-message{max-width:92%}
  .demo-simulation-menu{width:94vw}
}
.demo-studio-tool-card{transition:transform .18s ease,box-shadow .18s ease;border-top:3px solid #157ca3!important}
.demo-studio-tool-card:hover{transform:translateY(-2px);box-shadow:0 .65rem 1.4rem rgba(23,50,77,.12)!important}

/* --------------------------------------------------------------------------
   Archivio Studio e Lettere: allineamento alle schermate operative reali
   -------------------------------------------------------------------------- */
.studio-archive-shell {
    --archive-blue: #1268e8;
    --archive-navy: #08366c;
    --archive-green: #18a957;
    --archive-cyan: #14b8c8;
    --archive-orange: #f39a05;
    max-width: 1180px;
    margin: 0 auto;
}
.studio-archive-hero {
    color: #fff;
    background: radial-gradient(circle at 92% 18%, rgba(255,255,255,.25), transparent 28%), linear-gradient(125deg, var(--archive-navy), var(--archive-blue) 58%, var(--archive-cyan));
    border: 1px solid rgba(18,104,232,.7);
    border-radius: 22px;
    box-shadow: 0 18px 42px rgba(8,54,108,.18);
}
.archive-stat {
    min-height: 112px;
    border: 1px solid currentColor;
    border-radius: 16px;
    background: #fff;
}
.archive-stat-blue { color: var(--archive-blue, #1268e8); }
.archive-stat-green { color: var(--archive-green, #18a957); }
.archive-stat-purple { color: #6f42c1; }
.archive-stat-orange { color: var(--archive-orange, #f39a05); }
.letter-type-card {
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    border: 2px solid transparent !important;
}
.letter-type-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,.10);
    border-color: #0d6efd !important;
}
.letter-type-card.selected {
    border-color: #0d6efd !important;
    background: #e7f3ff !important;
}
.letter-type-icon { font-size: 2rem; margin-bottom: .5rem; }
.letter-category-bar { scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
@media (max-width: 767.98px) {
    .studio-archive-hero { border-radius: 16px; }
}

/* --------------------------------------------------------------------------
   Chiusura pratica con sentenza · demo guidata
   -------------------------------------------------------------------------- */
.demo-closure-document {
    border-top: 4px solid #f59f00 !important;
}

.demo-closure-document__icon {
    display: grid;
    width: 4.4rem;
    height: 4.4rem;
    place-items: center;
    border-radius: 1.1rem;
    background: #fff4d6;
    font-size: 2.2rem;
}

.demo-closure-analysis__steps {
    padding-left: 1.25rem;
    color: #6c757d;
    font-size: .86rem;
}

.demo-closure-analysis__steps li.is-complete {
    color: #198754;
    font-weight: 700;
}

.demo-closure-analysis__steps li.is-complete::marker {
    content: "✓  ";
}

.demo-closure-kicker {
    display: block;
    margin-bottom: .3rem;
    color: #0d6efd;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.demo-closure-review-badge {
    align-self: flex-start;
    border: 1px solid #f59f00;
    background: #fff4d6;
    color: #8a4b00;
}

.demo-closure-review-badge.is-complete {
    border-color: #75b798;
    background: #e8f7ef;
    color: #146c43;
}

.demo-closure-field {
    height: 100%;
    padding: .85rem;
    border: 2px solid #f0ad4e;
    border-radius: .85rem;
    background: #fffaf0;
    transition: border-color .25s ease, background .25s ease, box-shadow .25s ease, transform .25s ease;
}

.demo-closure-field label {
    display: block;
    margin-bottom: .4rem;
    color: #71420b;
    font-size: .86rem;
    font-weight: 700;
}

.demo-closure-field small {
    display: block;
    margin-top: .35rem;
    color: #9a5c11;
}

.demo-closure-field.is-extracted {
    border-color: #fd7e14;
    background: #fff4e6;
    box-shadow: 0 0 0 .16rem rgba(253,126,20,.10);
    transform: translateY(-1px);
}

.demo-closure-field.is-confirmed {
    border-color: #198754;
    background: #effaf4;
    box-shadow: 0 0 0 .16rem rgba(25,135,84,.09);
}

.demo-closure-field.is-confirmed label,
.demo-closure-field.is-confirmed small {
    color: #146c43;
}

.demo-closure-success {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1.5rem;
    border: 1px solid #75b798;
    border-radius: 1.1rem;
    background: linear-gradient(135deg, #effaf4, #f7fbff);
}

.demo-closure-success__icon {
    display: grid;
    flex: 0 0 3.6rem;
    width: 3.6rem;
    height: 3.6rem;
    place-items: center;
    border-radius: 50%;
    background: #198754;
    color: #fff;
    font-size: 1.8rem;
    font-weight: 900;
}

.demo-closure-summary dt {
    color: #667085;
    font-size: .86rem;
}

.demo-closure-professional {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.demo-closure-professional small {
    display: block;
    color: #6c757d;
}

.demo-closure-next-step {
    border-left: 5px solid #157ca3 !important;
}

.demo-closure-request-box {
    padding: 1.2rem;
    border: 1px solid #cfe2ff;
    border-radius: .9rem;
    background: #f7fbff;
}

@media (max-width: 575.98px) {
    .demo-closure-success {
        align-items: flex-start;
    }

    .demo-closure-professional {
        align-items: flex-start;
        flex-direction: column;
    }
}
.demo-calendar-history-item {
    border-bottom: 1px solid #e7edf2;
}

.demo-calendar-history-item:last-child {
    border-bottom: 0;
}

.demo-calendar-history-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    cursor: pointer;
    background: #fff;
}

.demo-calendar-history-summary:hover {
    background: #f8fafc;
}

.demo-calendar-history-summary__main {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.demo-calendar-history-summary__main small {
    color: #6c757d;
}

.demo-calendar-history-counts {
    display: flex;
    justify-content: flex-end;
    gap: .4rem;
    flex-wrap: wrap;
}

.demo-calendar-history-timeline {
    padding: .25rem 1.25rem 1.25rem 2rem;
    background: #fbfcfd;
}

.demo-calendar-history-entry {
    position: relative;
    display: grid;
    grid-template-columns: 1rem 1fr;
    gap: .75rem;
    padding: .9rem 0;
}

.demo-calendar-history-entry:not(:last-child)::before {
    content: "";
    position: absolute;
    top: 1.6rem;
    bottom: -.7rem;
    left: .42rem;
    width: 2px;
    background: #dfe6ec;
}

.demo-calendar-history-entry__dot {
    position: relative;
    z-index: 1;
    width: .85rem;
    height: .85rem;
    margin-top: .3rem;
    border-radius: 50%;
    box-shadow: 0 0 0 3px #fff;
}

@media (max-width: 767.98px) {
    .demo-calendar-history-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .demo-calendar-history-counts {
        justify-content: flex-start;
    }
}

/* --------------------------------------------------------------------------
   Lettere · aggiornamento allegati 22/08/2026
   -------------------------------------------------------------------------- */
.demo-letter-update-badge{
    background:#eef8f3;
    color:#146c43;
    border:1px solid #badbcc;
    font-weight:700;
}
.demo-letter-update-alert{
    background:linear-gradient(135deg,#f7fbff,#f2fbf6);
    border-color:#cfe2ff!important;
    color:#17324d;
}
.demo-letter-update-icon{
    flex:0 0 2.5rem;
    width:2.5rem;
    height:2.5rem;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:.8rem;
    background:#e8f3ff;
    color:#0d6efd;
    font-size:1.2rem;
}
.demo-letter-attachment-shell{
    border-top:1px solid #e8edf2;
    padding-top:1.25rem;
}
.demo-letter-attachment-dropzone{
    padding:1rem;
    border:1px dashed #a8bfd3;
    border-radius:.85rem;
    background:#f9fbfd;
}
.demo-letter-attachment-card{
    display:grid;
    grid-template-columns:2.5rem minmax(0,1fr);
    gap:.8rem;
    padding:.9rem;
    border:1px solid #dfe5eb;
    border-radius:.8rem;
    background:#fff;
    transition:border-color .2s ease,box-shadow .2s ease,background .2s ease;
}
.demo-letter-attachment-card.is-preparing{
    border-color:#e0ad18;
    box-shadow:0 0 0 .12rem rgba(255,193,7,.12);
    background:#fffdf5;
}
.demo-letter-attachment-card.is-ready{
    border-color:#75b798;
    box-shadow:0 0 0 .12rem rgba(25,135,84,.08);
    background:#fbfffd;
}
.demo-letter-attachment-card__icon{
    width:2.5rem;
    height:2.5rem;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:.7rem;
    background:#f2f6fa;
    font-size:1.2rem;
}
.demo-letter-attachment-card__body{min-width:0}
.demo-letter-attachment-card__meta{
    margin-top:.35rem;
    font-size:.78rem;
    color:#667085;
}
.demo-letter-preview-attachments{
    margin-top:1.25rem;
    padding-top:.2rem;
}
.demo-letter-preview-attachments hr{
    border:0;
    border-top:1px solid #bfc5cb;
    margin:0 0 .85rem;
    opacity:1;
}
.demo-letter-detail-attachments-card{border-top:3px solid #0d6efd}
.demo-letter-detail-attachment{
    display:flex;
    gap:.65rem;
    align-items:flex-start;
    padding-bottom:.65rem;
    border-bottom:1px solid #edf1f4;
}
.demo-letter-detail-attachment:last-child{padding-bottom:0;border-bottom:0}
.demo-letter-detail-attachment>span:last-child{display:flex;flex-direction:column;min-width:0}
.demo-letter-detail-attachment strong{overflow-wrap:anywhere}
.demo-letter-detail-attachment small{color:#667085;margin-top:.1rem}
.demo-letter-detail-file-icon{font-size:1.05rem;line-height:1.3}
@media(max-width:575.98px){
    .demo-letter-attachment-card{grid-template-columns:2.1rem minmax(0,1fr);padding:.75rem}
    .demo-letter-attachment-card__icon{width:2.1rem;height:2.1rem}
}


/* --------------------------------------------------------------------------
   Autopilot sentenza + riepilogo famiglia · 29/08/2026
   -------------------------------------------------------------------------- */
.demo-pro-family-summary{border:1px solid #dce5ee;border-left:4px solid #0d6efd;border-radius:1rem;background:linear-gradient(135deg,#f8fbff,#fff 58%,#fffaf5);padding:1rem 1.1rem}.demo-pro-family-child{border:1px solid #e2e8ee;border-left:4px solid #0dcaf0;border-radius:.8rem;background:#fff;padding:.8rem}.demo-pro-family-child span{display:inline-flex;gap:.25rem;border:1px solid #e5eaee;border-radius:999px;background:#fafcfd;padding:.25rem .5rem;font-size:.76rem;color:#56616b}.demo-pro-summary-note{display:flex;flex-direction:column;gap:.15rem;border:1px solid #e7dfd3;border-left:4px solid #d8a45d;border-radius:.75rem;background:#fffaf4;padding:.65rem .75rem}.demo-pro-summary-note small{color:#6c757d}.demo-autopilot-kicker{text-transform:uppercase;font-size:.72rem;letter-spacing:.05em;font-weight:800;color:#0d6efd}.demo-autopilot-document{border-left:4px solid #d8a12f!important}.demo-autopilot-document__icon{display:grid;place-items:center;width:3.5rem;height:3.5rem;border-radius:1rem;background:#fff7df;font-size:1.8rem}.demo-autopilot-field{height:100%;border:1px solid #e3e8ed;border-left:4px solid #fd7e14;border-radius:.75rem;background:#fffaf4;padding:.75rem}.demo-autopilot-field>span,.demo-autopilot-field small{font-size:.76rem;color:#6c757d}.demo-autopilot-field.is-no_change{border-left-color:#6c757d;background:#fafafa}.demo-autopilot-field.is-ready{border-left-color:#198754;background:#f5fcf8}.demo-autopilot-field.is-planning{border-left-color:#0d6efd;background:#f7fbff}.demo-autopilot-field.is-configure{border-left-color:#d8a12f}.demo-autopilot-field.is-review{border-left-color:#dc3545;background:#fff8f8}.demo-autopilot-preview-row{border:1px solid #e2e7eb;border-left:4px solid #6c757d;border-radius:.75rem;padding:.75rem;background:#fff}.demo-autopilot-preview-row.is-ready{border-left-color:#198754}.demo-autopilot-preview-row.is-planning{border-left-color:#0d6efd;background:#f7fbff}.demo-autopilot-preview-row.is-configure{border-left-color:#d8a12f;background:#fffaf4}.demo-autopilot-preview-row.is-review{border-left-color:#dc3545;background:#fff8f8}.demo-autopilot-preview-row__head{display:flex;justify-content:space-between;gap:.75rem;align-items:center;margin-bottom:.5rem}.demo-autopilot-status{font-size:.72rem;border:1px solid #dfe4e8;border-radius:999px;padding:.18rem .45rem;background:#f8f9fa}.demo-autopilot-status.is-ready{border-color:#badbcc;color:#146c43;background:#effaf4}.demo-autopilot-status.is-planning{border-color:#b6d4fe;color:#084298;background:#e7f1ff}.demo-autopilot-status.is-configure{border-color:#ffe69c;color:#664d03;background:#fff3cd}.demo-autopilot-status.is-review{border-color:#f1aeb5;color:#842029;background:#f8d7da}.demo-autopilot-before-after{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:.8rem;align-items:center;font-size:.86rem}.demo-autopilot-before-after span{display:flex;flex-direction:column;gap:.15rem}.demo-autopilot-before-after small{color:#6c757d}.demo-autopilot-apply-result{border:1px solid #badbcc;border-left:4px solid #198754;border-radius:.75rem;background:#effaf4;padding:.8rem}.demo-autopilot-apply-result span{display:block;color:#4f5b55;font-size:.85rem}.demo-close-admin-card{border-left:4px solid #dc3545!important}.demo-close-admin-rule{display:flex;flex-direction:column;gap:.2rem;border:1px solid #e2e7eb;border-radius:.75rem;padding:.75rem;background:#fbfcfd}.demo-close-flow-step{display:flex;gap:.75rem;align-items:flex-start;padding:.75rem 0;border-top:1px solid #edf0f2}.demo-close-flow-step:first-of-type{border-top:0}.demo-close-flow-step>b{display:grid;place-items:center;flex:0 0 2rem;width:2rem;height:2rem;border-radius:50%;background:#e9ecef}.demo-close-flow-step span{display:flex;flex-direction:column}.demo-close-flow-step small{color:#6c757d}.demo-close-flow-step.is-done>b{background:#198754;color:#fff}.demo-close-flow-step.is-current>b{background:#dc3545;color:#fff}@media(max-width:767.98px){.demo-autopilot-before-after{grid-template-columns:1fr}.demo-autopilot-before-after>b{transform:rotate(90deg);justify-self:start}}

/* --------------------------------------------------------------------------
   Strumenti pratica · demo aggiornata 02/09/2026
   -------------------------------------------------------------------------- */
.demo-case-tool-card{transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;background:#fff}.demo-case-tool-card:hover,.demo-case-tool-card:focus{transform:translateY(-2px);box-shadow:0 .5rem 1.25rem rgba(33,37,41,.08);border-color:#9ec5fe!important}.demo-preparation-status{border:1px solid transparent}.demo-preparation-status--present{color:#146c43;background:#d1e7dd;border-color:#a3cfbb}.demo-preparation-status--missing{color:#842029;background:#f8d7da;border-color:#f1aeb5}.demo-preparation-status--to_verify{color:#664d03;background:#fff3cd;border-color:#ffe69c}.demo-preparation-status--not_applicable{color:#41464b;background:#e2e3e5;border-color:#c4c8cb}.demo-dossier-timeline{position:relative;padding-left:1.4rem}.demo-dossier-timeline::before{content:"";position:absolute;left:.35rem;top:.35rem;bottom:.35rem;width:2px;background:#dfe5eb}.demo-dossier-timeline__item{position:relative;padding:0 0 1.35rem .7rem}.demo-dossier-timeline__item:last-child{padding-bottom:0}.demo-dossier-timeline__dot{position:absolute;left:-1.25rem;top:.28rem;width:.72rem;height:.72rem;border-radius:50%;background:#0d6efd;border:2px solid #fff;box-shadow:0 0 0 2px #b6d4fe}.demo-hearing-option{cursor:pointer;background:#fff}.demo-hearing-option:has(input:checked){border-color:#9ec5fe!important;background:#f7fbff}.demo-dossier-nav .btn{border-radius:999px}
