/* V8.4.1.8 - Modalita Mobile Smart */
.rv-smart-toggle{display:none}
.rv-smart-panel{display:block}
.rv-smart-mini-summary{display:none}

@media (max-width:991px), (max-width:1366px) and (pointer:coarse){
  body.rv-mobile-smart{--rv-smart-border:#dbe4ea;--rv-smart-text:#173256;--rv-smart-muted:#708299}
  body.rv-mobile-smart main.container{padding-left:8px!important;padding-right:8px!important}
  body.rv-mobile-smart .rv-smart-toggle{
    display:flex;width:100%;align-items:center;justify-content:space-between;gap:10px;
    min-height:52px;padding:10px 13px;border:1px solid var(--rv-smart-border);border-radius:14px;
    background:#fff;color:var(--rv-smart-text);font-weight:850;text-align:left;
    box-shadow:0 4px 12px rgba(20,53,78,.06);margin:0 0 8px
  }
  body.rv-mobile-smart .rv-smart-toggle .rv-smart-label{display:flex;align-items:center;gap:9px;min-width:0}
  body.rv-mobile-smart .rv-smart-toggle .rv-smart-label-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  body.rv-mobile-smart .rv-smart-toggle .rv-smart-chevron{transition:transform .18s ease;color:#62788b;flex:0 0 auto}
  body.rv-mobile-smart .rv-smart-toggle[aria-expanded="true"] .rv-smart-chevron{transform:rotate(180deg)}
  body.rv-mobile-smart .rv-smart-panel[hidden]{display:none!important}
  body.rv-mobile-smart .rv-smart-panel{margin-bottom:10px}

  /* Home: solo azioni essenziali, sezioni secondarie richiudibili */
  body.rv-mobile-smart .rv-home-hero{padding:10px 12px!important;margin-bottom:8px!important;border-radius:15px!important}
  body.rv-mobile-smart .rv-home-title-icon{width:40px!important;height:40px!important;border-radius:11px!important}
  body.rv-mobile-smart .rv-home-titlebox h1{font-size:1.15rem!important}
  body.rv-mobile-smart .rv-home-subtitle{display:none!important}
  body.rv-mobile-smart .rv-home-userbox{padding:7px 10px!important;border-radius:12px!important}
  body.rv-mobile-smart .rv-home-quick{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;margin-bottom:9px!important}
  body.rv-mobile-smart .rv-home-quick a{min-height:55px!important;border-radius:13px!important;padding:7px 8px!important}
  body.rv-mobile-smart .rv-home-sections{display:block!important}
  body.rv-mobile-smart .rv-home-section{padding:9px!important;border-radius:15px!important;margin-bottom:8px!important;min-height:0!important}
  body.rv-mobile-smart .rv-home-section-head{margin:0!important;padding:3px 2px!important}
  body.rv-mobile-smart .rv-home-section-head + .rv-home-grid{margin-top:8px}
  body.rv-mobile-smart .rv-home-section p{display:none!important}
  body.rv-mobile-smart .rv-home-grid{grid-template-columns:1fr!important;gap:7px!important}
  body.rv-mobile-smart .rv-home-link,body.rv-mobile-smart .rv-home-link-btn{min-height:54px!important;padding:7px 9px!important;border-radius:12px!important}
  body.rv-mobile-smart .rv-home-link-desc{display:none!important}

  /* Dettaglio ordine: titolo compatto e dettagli secondari ridotti */
  body.rv-mobile-smart .rv-order-detail-page{margin-top:6px!important;padding:0!important}
  body.rv-mobile-smart .rv-order-heading{font-size:1.1rem!important;line-height:1.2!important;margin-bottom:8px!important;padding:0 2px!important}
  body.rv-mobile-smart .rv-order-heading img{display:none!important}
  body.rv-mobile-smart .rv-toolbar-card{padding:9px!important;margin-bottom:10px!important}
  body.rv-mobile-smart .rv-toolbar-title{margin-bottom:6px!important;font-size:.74rem!important}
  body.rv-mobile-smart .rv-toolbar-box{padding:8px!important;border-radius:12px!important}
  body.rv-mobile-smart .rv-order-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}
  body.rv-mobile-smart .rv-order-actions>a,
  body.rv-mobile-smart .rv-order-actions>.dropdown,
  body.rv-mobile-smart .rv-order-actions>.alert{width:100%!important;min-width:0!important;max-width:none!important;margin:0!important}
  body.rv-mobile-smart .rv-order-actions .btn,body.rv-mobile-smart .rv-order-actions .dropdown-toggle{width:100%!important;min-height:48px!important;padding:8px!important;font-size:.84rem!important;white-space:normal!important}
  body.rv-mobile-smart .rv-items-card{padding:9px!important;border-radius:14px!important}
  body.rv-mobile-smart .rv-history-card{padding:10px!important}
  body.rv-mobile-smart .rv-order-detail-page>.card:not(.rv-toolbar-card):not(.rv-items-card):not(.rv-history-card){margin-bottom:8px!important}
  body.rv-mobile-smart .rv-smart-order-status{
    display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:0 0 9px
  }
  body.rv-mobile-smart .rv-smart-order-status>div{background:#fff;border:1px solid #dde6ed;border-radius:12px;padding:8px 5px;text-align:center;box-shadow:0 3px 10px rgba(29,52,72,.05)}
  body.rv-mobile-smart .rv-smart-order-status strong{display:block;font-size:1.1rem;color:#17324d;line-height:1.1}
  body.rv-mobile-smart .rv-smart-order-status small{display:block;color:#71839a;font-size:.68rem;margin-top:2px}

  /* Reparto: riepilogo/filtri in tendina, scheda capo ridotta all'essenziale */
  body.rv-mobile-smart .dept-page{margin-top:0!important}
  body.rv-mobile-smart .dept-head{padding:9px 11px!important;margin-bottom:8px!important;border-radius:14px!important}
  body.rv-mobile-smart .dept-title img{width:34px!important;height:34px!important}
  body.rv-mobile-smart .dept-title h1{font-size:1.14rem!important}
  body.rv-mobile-smart .dept-subtitle{display:none!important}
  body.rv-mobile-smart .stat-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:5px!important;padding:6px!important}
  body.rv-mobile-smart .stat-grid .stat-box{min-height:52px!important;padding:5px 2px!important;font-size:.68rem!important}
  body.rv-mobile-smart .stat-grid .stat-box strong{font-size:1.05rem!important;margin-bottom:2px!important}
  body.rv-mobile-smart .work-toolbar{position:static!important;padding:7px!important;margin-bottom:8px!important}
  body.rv-mobile-smart .filter-row{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;overflow:visible!important;gap:5px!important}
  body.rv-mobile-smart .filter-chip{min-height:38px!important;white-space:normal!important;padding:5px 7px!important;font-size:.78rem!important}
  body.rv-mobile-smart #bulkForm{padding:7px!important;margin-bottom:8px!important}
  body.rv-mobile-smart .work-list{gap:8px!important}
  body.rv-mobile-smart .work-card{padding:10px!important;gap:8px!important;border-radius:13px!important}
  body.rv-mobile-smart .work-name{font-size:1.05rem!important}
  body.rv-mobile-smart .work-service{font-size:.86rem!important}
  body.rv-mobile-smart .work-qty{min-width:38px!important;width:38px!important;height:38px!important}
  body.rv-mobile-smart .primary-action{min-height:52px!important;font-size:.92rem!important}
  body.rv-mobile-smart .rv-smart-card-extra[hidden]{display:none!important}
  body.rv-mobile-smart .rv-smart-card-more{display:flex;width:100%;justify-content:center;align-items:center;gap:7px;min-height:40px;border:1px solid #d7e1e8;border-radius:10px;background:#f8fafb;color:#294b66;font-weight:800;font-size:.82rem}
  body.rv-mobile-smart .rv-smart-card-more .rv-smart-chevron{transition:transform .18s ease}
  body.rv-mobile-smart .rv-smart-card-more[aria-expanded="true"] .rv-smart-chevron{transform:rotate(180deg)}

  /* Non creare doppia navigazione su telefono */
  body.rv-mobile-smart .calculator-fab{opacity:.88}
}

@media (max-width:420px){
  body.rv-mobile-smart .rv-order-actions{grid-template-columns:1fr!important}
  body.rv-mobile-smart .stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

/* V8.4.1.9 - Tendine mobile descrittive */
@media (max-width:991px), (max-width:1366px) and (pointer:coarse){
  body.rv-mobile-smart .rv-smart-toggle-v9{margin:7px 0!important}
  body.rv-mobile-smart .rv-smart-menu-subtitle{display:block;color:#708299;font-size:.72rem;font-weight:650;line-height:1.15;margin-top:2px;white-space:normal}
  body.rv-mobile-smart .rv-smart-v9-panel[hidden],
  body.rv-mobile-smart .rv-smart-garment-panel[hidden]{display:none!important}
  body.rv-mobile-smart .rv-smart-priority-always{margin-bottom:10px!important;border-width:2px!important}
  body.rv-mobile-smart .rv-smart-priority-always .card-header{font-size:.94rem!important}
  body.rv-mobile-smart .rv-smart-v9-top-actions{margin-bottom:5px}

  /* Dashboard Operativa */
  body.rv-mobile-smart .rv-phase2-dashboard>.card{margin-bottom:8px!important}
  body.rv-mobile-smart .rv-phase2-dashboard .rv-smart-toggle-v9 + .card{margin-top:0!important}

  /* Dashboard Lavorazioni */
  body.rv-mobile-smart .rv-dashboard>.rv-smart-toggle-v9{margin-bottom:7px!important}
  body.rv-mobile-smart .rv-dashboard .rv-smart-v9-panel{margin-bottom:8px}
  body.rv-mobile-smart .rv-dashboard .rv-smart-original-title{display:none!important}

  /* Nuovo ordine */
  body.rv-mobile-smart .rv-new-order-page #sezioneDatiCliente>.rv-smart-toggle-v9{margin-bottom:9px!important}
  body.rv-mobile-smart .rv-new-order-page .card-capo{padding:8px!important;border-left-width:4px!important}
  body.rv-mobile-smart .rv-new-order-page .rv-smart-garment-toggle{margin:0!important;background:#f9fcff!important}
  body.rv-mobile-smart .rv-new-order-page .rv-smart-garment-panel{padding:9px 5px 4px}
  body.rv-mobile-smart .rv-new-order-page .rv-smart-garment-panel>.d-flex:first-child{margin-bottom:8px!important}
  body.rv-mobile-smart .rv-new-order-page .rv-order-steps{font-size:.78rem}

  /* Clienti / Convenzionati */
  body.rv-mobile-smart .rv-clients .rv-client-card,
  body.rv-mobile-smart .conv-page .conv-panel{margin-top:0!important}
  body.rv-mobile-smart .conv-client-tools{display:grid;gap:8px;margin:8px 0 10px}
  body.rv-mobile-smart .conv-client-tools form{display:flex;gap:6px}
  body.rv-mobile-smart .conv-client-tools input{min-width:0;flex:1}
  body.rv-mobile-smart .conv-state-tabs{display:grid;grid-template-columns:1fr 1fr;gap:6px}
  body.rv-mobile-smart .conv-state-tabs .btn{min-height:44px;display:flex;align-items:center;justify-content:center;font-weight:800}

  /* Accessi */
  body.rv-mobile-smart .rv-system-page>.rv-smart-toggle-v9{margin-top:8px!important}
  body.rv-mobile-smart .rv-system-page .rv-system-panel{margin-bottom:7px!important}
  body.rv-mobile-smart .rv-system-page .rv-device-row,
  body.rv-mobile-smart .rv-system-page .rv-system-card{padding:8px!important}
  body.rv-mobile-smart .rv-system-page .rv-smart-v9-panel{margin-top:6px}
}
