.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__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 (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; }
}
