/* ==========================================================
   Hotel PMS - CSS Standard Globale
   File: /Hotel/css/app.css
   ========================================================== */

/* =============================
   VARIABILI + BASE
============================= */
:root{
  --pms-accent: #0d6efd;
  --pms-bg: #f6f7fb;
  --pms-text: #212529;
  --pms-border: rgba(0,0,0,0.07);
  --pms-shadow: 0 10px 28px rgba(0,0,0,0.05);
  --pms-radius-lg: 18px;
  --pms-radius-md: 12px;
  --pms-radius-pill: 999px;
  --pms-font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --pms-modal-bg: #dbe7f7;
  --pms-modal-text: #010124;
  --pms-modal-border: rgb(0, 0, 0);
  --pms-modal-header-bg: #8dc1f57e;
  --pms-table-border: rgba(0,0,0,0.10);
  --pms-table-radius: 12px;
  --pms-table-head-bg: rgba(13,110,253,0.05);
  --pms-table-row-hover: rgba(13,110,253,0.06);
  --pms-table-row-alt: rgba(0,0,0,0.03);
  --pms-table-cell-pad-y: .38rem;
  --pms-table-cell-pad-x: .55rem;
  --pms-table-line-height: 1.25;
}

body{
  font-family: var(--pms-font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: radial-gradient(circle at 30% 30%, rgba(13, 57, 253, 0.25), rgba(13,110,253,0) 60%);
  color: var(--pms-text);
}

h1,h2,h3,h4,h5,h6{
  font-family: var(--pms-font-sans);
}

html, body{
  height: 100%;
}

/* testi */
h1,h2,h3{
  letter-spacing: .1px;
}

/* =============================
   NAVBAR PMS (light / no "epigrafe")
============================= */
.pms-navbar{
  background: linear-gradient(180deg, #2b333b 0%, #242b32 100%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding-top: .35rem;
  padding-bottom: .35rem;
}

.pms-brand-dot{
  width: 8px;
  height: 8px;
  border-radius: var(--pms-radius-pill);
  background: var(--pms-accent);
  box-shadow: 0 0 0 5px rgba(13,110,253,0.16);
}

.pms-brand-logo{
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.25));
}

.pms-brand-text{
  font-weight: 650;
  letter-spacing: .08px;
}

.pms-nav{
  gap: .15rem;
}

.pms-nav .nav-link{
  border-radius: 10px;
  padding: .45rem .65rem;
  color: rgba(255,255,255,0.78);
  font-weight: 500;
  position: relative;
  transition: color .15s ease, background-color .15s ease;
  background: transparent;
  box-shadow: none;
}

.pms-nav .nav-link:hover{
  color: rgba(255,255,255,0.95);
  background: rgba(255,255,255,0.04);
}

/* ACTIVE = underline elegante (non pillola “lapide”) */
.pms-nav .nav-link.active{
  color: rgba(255,255,255,0.96);
  font-weight: 650;
  background: transparent;
  box-shadow: none;
}

.pms-nav .nav-link.active::after{
  content: "";
  position: absolute;
  left: .65rem;
  right: .65rem;
  bottom: .22rem;
  height: 2px;
  background: rgba(13,110,253,0.85);
  border-radius: var(--pms-radius-pill);
}

.pms-nav .dropdown-toggle::after{
  margin-left: .42rem;
  vertical-align: .15rem;
  opacity: .88;
}

.pms-navbar .dropdown-menu{
  margin-top: .4rem;
  padding: .45rem;
  border-radius: 14px;
  border: 1px solid rgba(31,41,55,0.10);
  box-shadow: 0 14px 34px rgba(15,23,42,0.16);
}

.pms-navbar .dropdown-item{
  border-radius: 10px;
  padding: .48rem .78rem;
  font-weight: 500;
}

.pms-navbar .dropdown-item:hover,
.pms-navbar .dropdown-item:focus{
  background: rgba(13,110,253,0.08);
}

.pms-navbar .dropdown-item.active,
.pms-navbar .dropdown-item:active{
  background: rgba(13,110,253,0.14);
  color: var(--pms-accent);
}

.pms-user{
  display: inline-flex;
  align-items: center;
  color: rgba(255,255,255,0.90) !important;
  font-weight: 600;
  max-width: 150px;
  min-width: 0;
}
.pms-user-name{
  display: inline-block;
  max-width: 105px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}
@media (max-width: 1399.98px){
  #pmsTopbar .pms-topbar-today-label,
  #pmsTopbar .pms-schedine-alert-text,
  #pmsTopbar .pms-caparre-alert-text{
    display: none;
  }
  .pms-user{
    max-width: 130px;
  }
  .pms-user-name{
    max-width: 86px;
  }
}

.pms-hotel-badge{
  display:inline-block;
  padding: .32rem .58rem;
  border-radius: var(--pms-radius-pill);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.84);
  font-size: .82rem;
}

.pms-season-badge{
  display:inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .28rem .55rem;
  border-radius: var(--pms-radius-pill);
  background: rgba(255, 193, 7, 0.15);
  border: 1px solid rgba(255, 193, 7, 0.35);
  color: rgba(255,255,255,0.92) !important;
  font-size: .80rem;
  transition: background .18s;
}
.pms-season-badge:hover{
  background: rgba(255, 193, 7, 0.28);
  border-color: rgba(255, 193, 7, 0.55);
}

/* Banner stagione corrente (persistente, sotto page-header) */
.pms-sc-banner{
  background: rgba(25, 135, 84, 0.08);
  border: 1px solid rgba(25, 135, 84, 0.25);
  color: var(--pms-text);
  font-size: .875rem;
}
.pms-sc-banner-nome{
  font-weight: 600;
  color: var(--bs-success-text-emphasis, #0a3622);
}
.pms-sc-banner-btn{
  font-size: .75rem;
  padding: .15rem .55rem;
  color: #198754;
  border: 1px solid #198754;
  white-space: nowrap;
}
.pms-sc-banner-btn:hover{
  background: #198754;
  color: #fff;
}

@media (max-width: 991.98px){
}

@media (prefers-reduced-motion: reduce){
}

/* =============================
   PAGE HEADER STANDARD (opzionale ma utile)
   Usa: <div class="pms-pagehead"> ... </div>
============================= */
.pms-pagehead{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap: 16px;

  padding: 10px 2px 14px 2px;
  margin: 8px 0 12px 0;

  border-bottom: 1px solid var(--pms-border);
}

.pms-pagehead-title{
  font-weight: 800;
  letter-spacing: .2px;
  line-height: 1.05;
  margin: 0;
}

.pms-pagehead-subtitle{
  color: rgba(33,37,41,0.65);
  font-size: 13px;
  margin-top: 2px;
}

.pms-pagehead-right{
  display:flex;
  align-items:center;
  gap: 12px;
  flex-wrap: wrap;
}

/* =============================
   CARD STANDARD
============================= */
.card{
  border: 1px solid var(--pms-border);
  border-radius: var(--pms-radius-lg);
  box-shadow: var(--pms-shadow);
}

.card .card-body{
  padding: 16px;
}

/* =============================
   FORM STANDARD PMS
============================= */
.form-control,
.form-select,
textarea{
  background-color: #f8f9fa;
  border-color: #ced4da;
  border-radius: var(--pms-radius-md);
}

.form-control:focus,
.form-select:focus,
textarea:focus{
  background-color: #ffffff;
  border-color: var(--pms-accent);
  box-shadow: 0 0 0 .15rem rgba(13,110,253,0.15);
}

.form-label{
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: #495057;
}

/* bottoni un po’ più “app” */
.btn{
  border-radius: 12px;
}

.btn-primary{
  box-shadow: 0 10px 20px rgba(13,110,253,0.12);
}

/* =============================
   DATATABLES STANDARD (globale)
============================= */
.dataTables_wrapper .dataTables_filter input{
  border-radius: 20px !important;
  padding-left: 2rem !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16'%3E%3Cpath fill='%236c757d' d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.044.06.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1 1 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: 0.65rem center !important;
  box-shadow: 0 1px 4px rgba(0,0,0,.08) !important;
  border-color: #dee2e6 !important;
  transition: box-shadow .15s, border-color .15s !important;
}
.dataTables_wrapper .dataTables_filter input:focus{
  border-color: #86b7fe !important;
  box-shadow: 0 0 0 3px rgba(13,110,253,.15) !important;
  outline: none !important;
}

.dataTables_wrapper .dataTables_length select{
  border-radius: 12px !important;
  padding-right: 1.8rem !important; /* spazio per la freccia DataTables */
  appearance: none !important;
  -webkit-appearance: none !important;
  min-width: 4rem;
}

.dataTables_wrapper .dataTables_filter label,
.dataTables_wrapper .dataTables_length label{
  font-size: 12px;
  color: rgba(33,37,41,0.70);
}

table.dataTable thead th{
  white-space: nowrap;
  padding-right: 1.6rem !important; /* spazio per le frecce di ordinamento */
  position: relative;
}

/* frecce DataTables — posizionate a destra senza sovrapporsi al testo */
table.dataTable thead th.dt-orderable-asc,
table.dataTable thead th.dt-orderable-desc,
table.dataTable thead th.sorting,
table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc {
  padding-right: 1.6rem !important;
}

table.dataTable thead th.sorting::after,
table.dataTable thead th.sorting_asc::after,
table.dataTable thead th.sorting_desc::after,
table.dataTable thead th.dt-orderable-asc span.dt-column-order,
table.dataTable thead th.dt-orderable-desc span.dt-column-order,
table.dataTable thead th.dt-ordering-asc span.dt-column-order,
table.dataTable thead th.dt-ordering-desc span.dt-column-order {
  position: absolute;
  right: .35rem;
  top: 50%;
  transform: translateY(-50%);
}

/* =============================
   DataTable Clienti: niente a capo (specifico)
============================= */
#clientiTable td,
#clientiTable th{
  white-space: nowrap;
}

/* =============================
   TAB con warning
============================= */
.nav-tabs .nav-link.tab-warning{
  color: #b02a37;
  font-weight: 600;
}

.nav-tabs .nav-link.tab-warning::after{
  content: " ⚠";
}

/* =============================
   Stop barra orizzontale su tutte le pagine
   (come richiesto)
============================= */
.table-responsive{
  overflow-x: visible !important;
}

/* =============================
   Tabelle specifiche (Agenzie)
============================= */
#tblAgenzie td,
#tblAgenzie th{
  vertical-align: middle;
}

/* =============================
   MODAL STANDARD (soft)
============================= */
.modal-content{
  border-radius: 18px;
  border: 1px solid var(--pms-modal-border);
  box-shadow: 0 18px 50px rgba(0,0,0,0.18);
  overflow: hidden;
  background: var(--pms-modal-bg);
  color: var(--pms-modal-text);
}

.modal-header{
  border-bottom: 1px solid var(--pms-modal-border);
  background: var(--pms-modal-header-bg);
}

.modal-footer{
  border-top: 1px solid var(--pms-modal-border);
}


/* ==========================================================
   ANTI-EPIGRAFE OVERRIDES (mettere IN FONDO a app.css)
   ========================================================== */

/* Navbar meno “lapide” */

/* Active elegante e leggero: underline sottile */

/* Hover soft */

/* Tipografia globale: meno “epigrafe” sui titoli */
h1{
  font-weight: 750 !important;
  letter-spacing: .08px !important;
  line-height: 1.08 !important;
  font-size: 2.25rem !important;                  /* Bootstrap spesso spara troppo */
  margin-bottom: .25rem;
}

h2{
  font-weight: 700 !important;
}

/* Sottotitoli coerenti e più “UI” */
.ag-subtitle, .rt-subtitle, .pms-pagehead-subtitle{
  color: rgba(33,37,41,0.62) !important;
  font-size: 13px !important;
}

/* Card: ombra più discreta */


/* ===== Navbar: da nero pieno a "graphite" ===== */

/* opzionale: micro-gradiente per dare “profondità” senza fare epigrafe */

/* ==========================================================
   Navbar: colore forzato (ID + Bootstrap var)
   ========================================================== */
#pmsTopbar{
  --bs-navbar-bg: #343c45;              /* bootstrap-safe */
  background-color: #091050 !important; /* fallback */
  background-image: none !important;
}
/* =============================
   Badge DEMO navbar
============================= */
.pms-demo-badge{
  display: inline-flex;
  align-items: center;
  padding: .22rem .55rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .02em;

  background: rgba(255,193,7,0.22);      /* warning soft */
  border: 1px solid rgba(255,193,7,0.35);
  color: rgba(255,255,255,0.92);
}

.pms-demo-badge.is-expired{
  background: rgba(220,53,69,0.20);      /* danger soft */
  border: 1px solid rgba(220,53,69,0.35);
  color: rgba(255,255,255,0.92);
}

/* Mobile: non “allunga” troppo la navbar */
@media (max-width: 576px){
  .pms-demo-badge{
    padding: .18rem .45rem;
    font-size: .72rem;
  }
}
/* =============================================
   Select2 "come form-select" (Bootstrap 5)
   ============================================= */
.select2-container { width: 100% !important; }

.select2-container--default .select2-selection--single{
  min-height: calc(1.5em + .75rem + 2px);
  padding: .375rem 2.25rem .375rem .75rem;
  border: 1px solid var(--bs-border-color, #ced4da);
  border-radius: .7rem;              /* allineala al tuo stile */
  background-color: var(--bs-body-bg, #fff);  /* <-- lo sfondo che ti manca */
  display: flex;
  align-items: center;
}

.select2-container--default .select2-selection--single .select2-selection__rendered{
  padding-left: 0;
  line-height: 1.5;
}

.select2-container--default .select2-selection--single .select2-selection__arrow{
  height: 100%;
  right: .75rem;
  top: 0;
}

.select2-container--default.select2-container--focus .select2-selection--single{
  border-color: rgba(var(--bs-primary-rgb, 13,110,253), .5);
  box-shadow: 0 0 0 .25rem rgba(var(--bs-primary-rgb, 13,110,253), .25);
}

.select2-dropdown{
  border-radius: .5rem;
  border: 1px solid var(--bs-border-color, #ced4da);
  overflow: hidden;
}
/* =========================================================
   MODAL - sfondo globale
   File: /Hotel/css/app.css
   ========================================================= */
/* =========================================================
   TABELLE - stile globale (compatto e moderno)
   File: /Hotel/css/app.css
   NOTE: escludiamo il planning (sticky) da queste regole globali
   ========================================================= */

/* base table (globale) */
table:not(#planningTable):not(.planning-table){
  border: 1px solid var(--pms-table-border);
  border-radius: var(--pms-table-radius);
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
}

/* celle compatte */
table:not(#planningTable):not(.planning-table) th,
table:not(#planningTable):not(.planning-table) td{
  padding: var(--pms-table-cell-pad-y) var(--pms-table-cell-pad-x);
  line-height: var(--pms-table-line-height);
  vertical-align: middle;
  border-bottom: 1px solid var(--pms-table-border);
}

/* header */
table:not(#planningTable):not(.planning-table) thead th{
  background: var(--pms-table-head-bg);
  font-weight: 700;
  border-bottom: 1px solid var(--pms-table-border);
}

/* zebra + hover */
table:not(#planningTable):not(.planning-table) tbody tr:nth-child(even){
  background: var(--pms-table-row-alt);
}
table:not(#planningTable):not(.planning-table) tbody tr:hover{
  background: var(--pms-table-row-hover);
}

/* evita doppio bordo sull’ultima riga */
table:not(#planningTable):not(.planning-table) tbody tr:last-child td{
  border-bottom: 0;
}

/* azioni/icone: spesso sono loro ad alzare la riga */
table:not(#planningTable):not(.planning-table) td .btn,
table:not(#planningTable):not(.planning-table) td .btn.btn-sm{
  padding: .18rem .35rem;
  line-height: 1;
  min-height: auto;
}

table:not(#planningTable):not(.planning-table) td .btn i,
table:not(#planningTable):not(.planning-table) td .btn svg{
  font-size: .95rem;
  width: 1em;
  height: 1em;
}

/* badge compatti */
table:not(#planningTable):not(.planning-table) td .badge{
  font-size: .75rem;
  padding: .20em .55em;
}

/* =========================================================
   AZIONI (DataTables) - bottoni icona uniformi
   File: /Hotel/css/app.css
   ========================================================= */
.dt-actions{
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: .35rem;
  white-space: nowrap;
}

.btn-icon{
  width: 28px;
  height: 28px;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 999px !important;
}

/* override delle regole compatte dentro le tabelle */
table:not(#planningTable):not(.planning-table) td .dt-actions .btn-icon{
  min-height: 28px;
}

.btn-icon .bi{
  font-size: 1rem;
  line-height: 1;
}


/* =========================================================
   DATATABLES TOOLBAR UNIFICATA
   - "Visualizza N elementi" (length menu) a sinistra
   - Bottoni (es. Colonne) accanto al length menu
   - Cerca a destra
   ========================================================= */
.dataTables_wrapper .dt-toolbar .dataTables_length label,
.dataTables_wrapper .dt-toolbar .dataTables_filter label{
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin: 0;
  white-space: nowrap;
}

/* v.2.25.r — allineamento verticale uniforme toolbar */
.dataTables_wrapper .dt-toolbar .dataTables_length select,
.dataTables_wrapper .dt-toolbar .dataTables_filter input {
  height: 32px;
}
.dataTables_wrapper .dt-toolbar .dataTables_filter {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.dataTables_wrapper .dt-toolbar .dataTables_filter{
  width: 100%;
}

.dataTables_wrapper .dt-toolbar .dataTables_filter input{
  max-width: 240px;
  border-radius: 20px !important;
  padding-left: 2rem !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16'%3E%3Cpath fill='%236c757d' d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.044.06.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1 1 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: 0.65rem center !important;
  box-shadow: 0 1px 4px rgba(0,0,0,.08) !important;
  border-color: #dee2e6 !important;
  transition: box-shadow .15s, border-color .15s !important;
}
.dataTables_wrapper .dt-toolbar .dataTables_filter input:focus{
  border-color: #86b7fe !important;
  box-shadow: 0 0 0 3px rgba(13,110,253,.15) !important;
  outline: none !important;
}

/* se Buttons è attivo ma non ci sono bottoni, nascondi il contenitore */
.dataTables_wrapper .dt-buttons:empty{
  display: none !important;
}

/* ColVis: classe PMS (robusta contro override di DT/Bootstrap) */
.dt-buttons .pms-colvis-btn,
button.dt-button.pms-colvis-btn,
a.dt-button.pms-colvis-btn{
  background: var(--pms-accent) !important;
  background-color: var(--pms-accent) !important;
  background-image: none !important;
  border-color: var(--pms-accent) !important;
  color: #fff !important;
}

.dt-buttons .pms-colvis-btn:hover,
.dt-buttons .pms-colvis-btn:focus,
button.dt-button.pms-colvis-btn:hover,
button.dt-button.pms-colvis-btn:focus,
a.dt-button.pms-colvis-btn:hover,
a.dt-button.pms-colvis-btn:focus{
  background: rgba(13,110,253,0.90) !important;
  border-color: rgba(13,110,253,0.90) !important;
  color: #fff !important;
}

/* =========================================================
   DATATABLES BUTTONS (toolbar) - ColVis sempre leggibile
   Alcuni temi DT impostano background grigio sui .dt-button.
   Qui forziamo contrasto e riconoscibilità anche senza hover.
   ========================================================= */
.dataTables_wrapper .dt-buttons .dt-button{
  border-radius: 999px !important;
  font-weight: 650;
}

.dataTables_wrapper .dt-buttons .dt-button i,
.dataTables_wrapper .dt-buttons .dt-button span{
  opacity: 1 !important;
}

/* ColVis: SEMPRE blu.
   Alcuni temi DT forzano background grigio/gradient sui .dt-button.
   Qui imponiamo stile "primary" (utile perché il bottone deve essere riconoscibile anche a riposo).
*/
.dataTables_wrapper .dt-buttons .dt-button.buttons-colvis,
.dt-buttons .dt-button.buttons-colvis,
button.dt-button.buttons-colvis{
  background: var(--pms-accent) !important;
  background-color: var(--pms-accent) !important;
  background-image: none !important;
  border-color: var(--pms-accent) !important;
  color: #fff !important;

  /* allinea anche le variabili bootstrap se presenti */
  --bs-btn-bg: var(--pms-accent);
  --bs-btn-color: #fff;
  --bs-btn-border-color: var(--pms-accent);
  --bs-btn-hover-bg: rgba(13,110,253,0.90);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-border-color: rgba(13,110,253,0.90);
}

.dataTables_wrapper .dt-buttons .dt-button.buttons-colvis i.bi,
.dataTables_wrapper .dt-buttons .dt-button.buttons-collection i.bi,
.dataTables_wrapper .dt-buttons .dt-button.btn-outline-primary i.bi{
  margin-right: .35rem;
  color: inherit !important;
}

.dataTables_wrapper .dt-buttons .dt-button.buttons-colvis:hover,
.dataTables_wrapper .dt-buttons .dt-button.buttons-colvis:focus,
.dt-buttons .dt-button.buttons-colvis:hover,
.dt-buttons .dt-button.buttons-colvis:focus,
button.dt-button.buttons-colvis:hover,
button.dt-button.buttons-colvis:focus{
  background: rgba(13,110,253,0.90) !important;
  border-color: rgba(13,110,253,0.90) !important;
  color: #fff !important;
}

.dataTables_wrapper .dt-buttons .dt-button.buttons-colvis:active,
.dt-buttons .dt-button.buttons-colvis:active,
button.dt-button.buttons-colvis:active{
  background: rgba(13,110,253,0.85) !important;
  border-color: rgba(13,110,253,0.85) !important;
  color: #fff !important;
}


/* ===============================================================
   BookingModal condivisa — titolo con ID prenotazione evidenziato
   =============================================================== */

#bookingModal .modal-title{
  display:flex;
  align-items:center;
  gap:.5rem;
  flex-wrap:wrap;
}

#bookingModal .modal-title .booking-id-chip{
  display:inline-flex;
  align-items:center;
  padding:.12rem .55rem;
  border-radius:999px;
  font-size:.875rem;
  font-weight:700;
  line-height:1.2;
  color:#1a56db;
  background:#eef4ff;
  border:1px solid #c7d7f7;
}

/* ===============================================================
   Gruppi prenotazioni (booking_groups) – UI (bookingModal + Select2)
   =============================================================== */
.bk-group-swatch{
  display:inline-block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,.18);
  background: transparent;
}

.bk-group-dot{
  display:inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.18);
}

/* ===============================================================
   Page Header — intestazione uniforme per tutte le pagine PMS
   =============================================================== */
.pms-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: .75rem;
}

.pms-page-header-left {
  flex: 1 1 0;
  min-width: 0;
}

.pms-page-header-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  flex-shrink: 0;
}

.pms-page-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1a2942;
  margin: 0 0 .15rem 0;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: .45rem;
}

.pms-page-icon {
  font-size: 1.35rem;
  color: #2e75b6;
  opacity: .85;
  flex-shrink: 0;
}

.pms-page-subtitle {
  font-size: .8375rem;
  color: #6c757d;
  margin: 0;
  line-height: 1.4;
  max-width: 680px;
}

/* Separatore sottile sotto l'header */
.pms-page-header::after {
  content: '';
  display: block;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, #dee2e6 0%, transparent 100%);
  margin-top: .6rem;
}

/* Planning toolbar toggle */
#btnPlanningToolbarToggle.active {
  background: var(--pms-accent);
  color: #fff;
  border-color: var(--pms-accent);
}


/* =========================================================
   FIX v.4.1.l - Topbar sempre visibile anche su pagine lunghe
   ========================================================= */
#pmsTopbar{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
}
body{
  padding-top: 64px;
}
body.has-debug-toolbar{
  padding-top: 96px;
}

/* =========================
   Documenti emessi filters
   ========================= */
.doc-emessi-filters {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  border: 1px solid #adb5bd;
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}

.doc-emessi-filter-pill {
  appearance: none;
  border: 0;
  border-right: 1px solid #d7dde5;
  background: #fff;
  color: #6c757d;
  padding: .52rem .95rem;
  font-size: .93rem;
  line-height: 1.2;
  transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.doc-emessi-filter-pill:last-child {
  border-right: 0;
}

.doc-emessi-filter-pill:hover,
.doc-emessi-filter-pill:focus {
  background: #f8f9fa;
  color: #495057;
  outline: none;
}

.doc-emessi-filter-pill[data-filter-tipo=""] {
  color: #6c757d;
}

.doc-emessi-filter-pill[data-filter-tipo="Ricevuta"] {
  color: #198754;
}

.doc-emessi-filter-pill[data-filter-tipo="Fattura"] {
  color: #dc3545;
}

.doc-emessi-filter-pill.is-active[data-filter-tipo=""] {
  background: #6c757d;
  color: #fff;
}

.doc-emessi-filter-pill.is-active[data-filter-tipo="Ricevuta"] {
  background: rgba(25, 135, 84, 0.12);
  color: #146c43;
  box-shadow: inset 0 0 0 1px rgba(25, 135, 84, 0.28);
}

.doc-emessi-filter-pill.is-active[data-filter-tipo="Fattura"] {
  background: rgba(220, 53, 69, 0.12);
  color: #b02a37;
  box-shadow: inset 0 0 0 1px rgba(220, 53, 69, 0.28);
}

@media (max-width: 575.98px) {
  .doc-emessi-filters {
    display: flex;
    width: 100%;
  }

  .doc-emessi-filter-pill {
    flex: 1 1 auto;
    text-align: center;
    padding-left: .65rem;
    padding-right: .65rem;
  }
}

/* ==========================================================
   Fix navbar: evita overflow orizzontale con KPI/alert attivi
   Ver. 2026.0708.1055
========================================================== */
#pmsTopbar,
#pmsTopbar .container-fluid,
#pmsNavbar,
#pmsNavbar > .navbar-nav,
#pmsTopbar .navbar-brand {
  min-width: 0;
}

#pmsTopbar .navbar-brand {
  flex-shrink: 1;
  overflow: hidden;
}

#pmsTopbar .pms-brand-text {
  min-width: 0;
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#pmsTopbar .pms-hotel-badge {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1899.98px) {
  #pmsTopbar .pms-topbar-today-label,
  #pmsTopbar .pms-schedine-alert-text,
  #pmsTopbar .pms-caparre-alert-text {
    display: none !important;
  }

  #pmsTopbar .pms-topbar-today {
    gap: .18rem;
    padding: .10rem .22rem;
  }

  #pmsTopbar .pms-topbar-today-pill {
    gap: .12rem;
    padding: .08rem .24rem;
  }

  #pmsTopbar .pms-schedine-alert,
  #pmsTopbar .pms-caparre-alert {
    padding: .35rem .55rem;
  }

  #pmsTopbar .pms-hotel-badge {
    max-width: 120px;
  }

  #pmsTopbar .pms-brand-text {
    max-width: 180px;
  }
}

@media (max-width: 1699.98px) {
  #pmsTopbar .pms-nav .nav-link {
    padding-left: .48rem;
    padding-right: .48rem;
  }

  #pmsTopbar .pms-season-badge {
    padding-left: .42rem;
    padding-right: .42rem;
  }

  #pmsTopbar .pms-brand-text {
    max-width: 145px;
  }
}

@media (max-width: 1549.98px) {
  #pmsTopbar #pmsTopbarTodayItem {
    display: none !important;
  }
}


/* ==========================================================
   Fix navbar: font originale ripristinato dopo avvisi aggregati
   Ver. 2026.0708.1152
   Nota: la compattezza ora è garantita dall'aggregazione Avvisi,
   quindi non servono più riduzioni globali del font navbar.
========================================================== */
#pmsNavbar { min-width: 0 !important; }
#pmsNavbar > .navbar-nav:first-child {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow: visible !important;
}
#pmsNavbar > .navbar-nav.ms-auto {
  flex: 0 1 auto !important;
  min-width: 0 !important;
}
#pmsNavbar .dropdown-menu { z-index: 2050 !important; }



/* Fix dropdown menu navbar: non usare overflow hidden sul contenitore dei menu - Ver. 2026.0708.1117 */
#pmsNavbar,
#pmsNavbar > .navbar-nav,
#pmsNavbar .nav-item.dropdown {
  overflow: visible !important;
}
#pmsNavbar .dropdown-menu {
  z-index: 2050 !important;
}


/* Navbar avvisi aggregati - Ver. 2026.0708.1138 */
#pmsTopbar .pms-alerts-summary {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .30rem .58rem;
  color: #fff !important;
  background: linear-gradient(90deg, rgba(220,53,69,.28) 0%, rgba(255,193,7,.22) 100%);
  border: 1px solid rgba(255,193,7,.42);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
  white-space: nowrap;
}
#pmsTopbar .pms-alerts-summary:hover,
#pmsTopbar .pms-alerts-summary:focus {
  color: #fff !important;
  background: linear-gradient(90deg, rgba(220,53,69,.38) 0%, rgba(255,193,7,.34) 100%);
  border-color: rgba(255,193,7,.64);
}
#pmsTopbar .pms-alerts-summary::after { margin-left: .35rem; }
#pmsTopbar .pms-alerts-label { font-weight: 750; }
#pmsTopbar #pmsAlertsTotal {
  min-width: 1.35rem;
  line-height: 1.15;
  box-shadow: 0 0 0 1px rgba(255,255,255,.16);
}
#pmsTopbar .pms-alerts-menu {
  min-width: 300px;
  padding: .45rem;
  border-radius: 16px;
}
#pmsTopbar .pms-alerts-row {
  display: flex;
  align-items: center;
  gap: .6rem;
  border-radius: 12px;
  padding: .62rem .68rem;
}
#pmsTopbar .pms-alerts-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
#pmsTopbar .pms-alerts-icon-schedine { background: rgba(220,53,69,.13); color: #dc3545; }
#pmsTopbar .pms-alerts-icon-caparre { background: rgba(255,193,7,.18); color: #b7791f; }
#pmsTopbar .pms-alerts-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
}
#pmsTopbar .pms-alerts-body strong { font-size: .88rem; line-height: 1.1; }
#pmsTopbar .pms-alerts-body small {
  color: #64748b;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 1599.98px) {
  #pmsTopbar .pms-alerts-label { display: none; }
  #pmsTopbar .pms-alerts-summary { padding-left: .46rem; padding-right: .46rem; }
}

/* ==========================================================
   Fix navbar: ripristino reale font originale menu
   Ver. 2026.0708.1204
   Override finale: annulla le riduzioni applicate nei fix compatti.
========================================================== */
#pmsTopbar .navbar-brand,
#pmsTopbar .pms-brand-text,
#pmsNavbar .nav-link,
#pmsNavbar .dropdown-toggle,
#pmsNavbar .dropdown-item,
#pmsTopbar .pms-user,
#pmsTopbar .pms-user-name,
#pmsTopbar .pms-hotel-badge,
#pmsTopbar .pms-alerts-summary,
#pmsTopbar .pms-alerts-label {
  font-size: 1rem !important;
}

#pmsTopbar .pms-season-badge,
#pmsTopbar .pms-season-badge .small,
#pmsTopbar .pms-topbar-today,
#pmsTopbar .pms-topbar-today-pill {
  font-size: .875rem !important;
}

#pmsTopbar #pmsAlertsTotal,
#pmsTopbar .pms-alerts-summary .badge,
#pmsTopbar .pms-topbar-today-pill .badge {
  font-size: .875rem !important;
}

#pmsNavbar .nav-link {
  padding-top: .45rem !important;
  padding-bottom: .45rem !important;
}

/* ===============================================================
   Emissione documento: selezione voci economiche
   =============================================================== */
.doc-importi-modal-content {
  min-height: 28rem;
}

.doc-importi-list {
  display: grid;
  gap: .75rem;
}

.doc-importi-group {
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: .85rem;
  overflow: hidden;
  background: #fff;
}

.doc-importi-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem .9rem;
  background: #f3f7fd;
  border-bottom: 1px solid rgba(15, 23, 42, .1);
  color: #234c91;
  font-weight: 700;
}

.doc-importi-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .8rem;
  padding: .7rem .9rem;
  border-bottom: 1px solid rgba(15, 23, 42, .08);
  cursor: pointer;
}

.doc-importi-row:last-child {
  border-bottom: 0;
}

.doc-importi-row:hover {
  background: #f8fbff;
}

.doc-importi-row.is-unchecked {
  opacity: .55;
  background: #f8f9fa;
}

.doc-importi-row .form-check-input {
  margin: 0;
  width: 1.15rem;
  height: 1.15rem;
}

.doc-importi-label {
  min-width: 0;
}

.doc-importi-label strong {
  display: block;
  color: #172033;
}

.doc-importi-label small {
  display: block;
  color: #6b7280;
  margin-top: .1rem;
}

.doc-importi-amount {
  white-space: nowrap;
  font-weight: 800;
  color: #0f766e;
}

.doc-importi-amount.is-negative {
  color: #c62828;
}

.doc-importi-footer {
  align-items: center;
}

.doc-importi-total-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.doc-importi-total-wrap strong {
  margin-top: .2rem;
  color: #0d6efd;
  font-size: 1.35rem;
}

@media (max-width: 575.98px) {
  .doc-importi-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .doc-importi-amount {
    grid-column: 2;
  }

  .doc-importi-footer {
    align-items: stretch;
  }

  .doc-importi-total-wrap {
    width: 100%;
    margin-bottom: .5rem;
  }
}

/* Selezione pagamenti da visualizzare nel documento */
.doc-pagamenti-section {
  border-top: 1px solid rgba(15, 23, 42, .10);
  padding-top: 1rem;
}
.doc-pagamenti-group .doc-importi-group-title {
  background: rgba(16, 185, 129, .08);
  color: #047857;
}
.doc-pagamento-row .doc-importi-amount {
  color: #047857;
}
.doc-pagamento-row .doc-importi-amount.is-negative {
  color: #b91c1c;
}

/* ==========================================================
   Conto prenotazioni di gruppo — gerarchia visiva compatta
   Ver. 2026.0717.1154
   ========================================================== */
#bgcBlock .btn-xs {
  padding: .18rem .38rem;
  font-size: .75rem;
  line-height: 1.2;
}

#bgcBlock .bgc-section {
  display: block;
}

#bgcBlock .bgc-item {
  font-size: .85rem;
}

#bgcBlock .bgc-block-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  color: var(--bs-secondary-color);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .01em;
}

#bgcBlock .bgc-readonly-label {
  flex: 0 0 auto;
  padding: .12rem .45rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 999px;
  background: var(--bs-tertiary-bg);
  color: var(--bs-secondary-color);
  font-size: .68rem;
  font-weight: 600;
}

#bgcBlock .bgc-group-overview {
  padding: .75rem;
  border: 1px solid var(--bs-border-color);
  border-radius: .55rem;
  background: var(--bs-tertiary-bg);
}

#bgcBlock .bgc-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .5rem;
  margin-top: .55rem;
}

#bgcBlock .bgc-metric {
  min-width: 0;
  padding: .55rem .65rem;
  border: 1px solid var(--bs-border-color);
  border-radius: .45rem;
  background: var(--bs-body-bg);
}

#bgcBlock .bgc-metric-saldo {
  border-color: rgba(var(--bs-warning-rgb), .45);
}

#bgcBlock .bgc-metric-label,
#bgcBlock .bgc-metric-value {
  display: block;
}

#bgcBlock .bgc-metric-label {
  margin-bottom: .15rem;
  color: var(--bs-secondary-color);
  font-size: .7rem;
}

#bgcBlock .bgc-metric-value {
  overflow: hidden;
  font-size: .92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#bgcBlock .bgc-room-section {
  padding-top: .1rem;
}

#bgcBlock .bgc-cam-row {
  margin-bottom: .45rem;
  padding: .6rem .7rem;
  border: 1px solid var(--bs-border-color);
  border-radius: .5rem;
  background: var(--bs-body-bg);
  font-size: .82rem;
}

#bgcBlock .bgc-cam-row.is-current {
  border-color: var(--bs-primary);
  border-left-width: 4px;
  background: rgba(var(--bs-primary-rgb), .055);
  box-shadow: 0 0 0 1px rgba(var(--bs-primary-rgb), .05);
}

#bgcBlock .bgc-room-head,
#bgcBlock .bgc-room-values {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
}

#bgcBlock .bgc-room-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .4rem;
  min-width: 0;
  color: var(--bs-emphasis-color);
  font-weight: 700;
}

#bgcBlock .bgc-room-name .badge {
  font-size: .64rem;
}

#bgcBlock .bgc-room-total {
  display: flex;
  align-items: baseline;
  gap: .35rem;
  flex: 0 0 auto;
}

#bgcBlock .bgc-room-total span,
#bgcBlock .bgc-room-value small {
  color: var(--bs-secondary-color);
  font-size: .68rem;
  font-weight: 500;
}

#bgcBlock .bgc-room-values {
  justify-content: flex-end;
  margin-top: .35rem;
  padding-top: .35rem;
  border-top: 1px dashed var(--bs-border-color);
}

#bgcBlock .bgc-room-value {
  display: flex;
  align-items: baseline;
  gap: .3rem;
  white-space: nowrap;
}

#bgcBlock .bgc-room-value .bi-pencil-fill {
  font-size: .68rem;
}

#bgcBlock .bgc-other-rooms {
  overflow: hidden;
  border: 1px solid var(--bs-border-color);
  border-radius: .5rem;
  background: var(--bs-tertiary-bg);
}

#bgcBlock .bgc-other-rooms > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .55rem .7rem;
  color: var(--bs-secondary-color);
  cursor: pointer;
  font-size: .78rem;
  font-weight: 650;
  list-style: none;
  user-select: none;
}

#bgcBlock .bgc-other-rooms > summary::-webkit-details-marker {
  display: none;
}

#bgcBlock .bgc-other-rooms[open] > summary .bi-chevron-right {
  display: inline-block;
  transform: rotate(90deg);
}

#bgcBlock .bgc-other-rooms-body {
  padding: 0 .55rem .25rem;
}

#bgcBlock .bgc-other-rooms-body .bgc-cam-row:last-child {
  margin-bottom: .3rem;
}

#docGruppoBlock .doc-gruppo-details {
  overflow: hidden;
  border: 1px solid var(--bs-border-color);
  border-radius: .55rem;
  background: var(--bs-body-bg);
}

#docGruppoBlock .doc-gruppo-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  padding: .65rem .75rem;
  color: var(--bs-emphasis-color);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

#docGruppoBlock .doc-gruppo-details > summary::-webkit-details-marker {
  display: none;
}

#docGruppoBlock .doc-gruppo-details > summary::after {
  content: "›";
  flex: 0 0 auto;
  color: var(--bs-secondary-color);
  font-size: 1rem;
  transition: transform .15s ease;
}

#docGruppoBlock .doc-gruppo-details[open] > summary::after {
  transform: rotate(90deg);
}

#docGruppoBlock .doc-gruppo-summary-title {
  font-size: .82rem;
  font-weight: 700;
}

#docGruppoBlock .doc-gruppo-summary-meta {
  margin-left: auto;
  color: var(--bs-primary);
  font-size: .74rem;
  white-space: nowrap;
}

#docGruppoBlock .doc-gruppo-details-body {
  padding: .65rem;
  border-top: 1px solid var(--bs-border-color);
  background: var(--bs-tertiary-bg);
}

#docGruppoBlock .doc-gruppo-info {
  margin-bottom: .55rem;
  color: var(--bs-info-text-emphasis);
  font-size: .74rem;
}

#docGruppoBlock .doc-gruppo-card {
  margin-bottom: .45rem;
  padding: .55rem .65rem;
  border: 1px solid var(--bs-border-color);
  border-radius: .45rem;
  background: var(--bs-body-bg);
}

#docGruppoBlock .doc-gruppo-card:last-child {
  margin-bottom: 0;
}

#docGruppoBlock .doc-gruppo-card-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .55rem;
}

#docGruppoBlock .doc-gruppo-card-main label {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .25rem .4rem;
  min-width: 0;
  margin: 0;
  cursor: pointer;
}

#docGruppoBlock .doc-gruppo-camera {
  color: var(--bs-emphasis-color);
  font-size: .8rem;
  font-weight: 700;
}

#docGruppoBlock .doc-gruppo-guest,
#docGruppoBlock .doc-gruppo-stay {
  color: var(--bs-secondary-color);
  font-size: .7rem;
}

#docGruppoBlock .doc-gruppo-total {
  color: var(--bs-primary);
  font-size: .82rem;
  white-space: nowrap;
}

#docGruppoBlock .doc-gruppo-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .8rem;
  margin-top: .35rem;
  padding-left: 1.75rem;
  color: var(--bs-secondary-color);
  font-size: .68rem;
}

#docGruppoBlock .doc-gruppo-breakdown span {
  white-space: nowrap;
}

@media (max-width: 767.98px) {
  #bgcBlock .bgc-metrics {
    grid-template-columns: 1fr;
  }

  #bgcBlock .bgc-room-head,
  #bgcBlock .bgc-room-values {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  #bgcBlock .bgc-room-values {
    justify-content: flex-start;
  }

  #docGruppoBlock .doc-gruppo-details > summary {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  #docGruppoBlock .doc-gruppo-summary-meta {
    width: calc(100% - 1.5rem);
    margin-left: 0;
  }

  #docGruppoBlock .doc-gruppo-card-main {
    grid-template-columns: auto minmax(0, 1fr);
  }

  #docGruppoBlock .doc-gruppo-total {
    grid-column: 2;
  }
}


/* ===============================================================
   Riepilogo operativo topbar: Arrivi / Partenze / Occupate oggi
   Ver. 2026.0816.1448 — header tabella in flusso normale, senza sovrapposizione
   =============================================================== */
#pmsTopbar button.pms-topbar-today-pill {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  color: #fff;
  font: inherit;
  cursor: pointer;
  transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;
}

#pmsTopbar button.pms-topbar-today-pill:hover {
  filter: brightness(1.18);
  transform: translateY(-1px);
}

#pmsTopbar button.pms-topbar-today-pill:focus-visible {
  outline: 2px solid rgba(255,255,255,.95);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(13,110,253,.28);
}

.pms-today-detail-modal .modal-body {
  background: #f8fafc;
}

.pms-today-detail-state {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .85rem;
  text-align: center;
  font-weight: 600;
}

.pms-today-detail-empty-icon {
  font-size: 2.75rem;
  opacity: .55;
}

.pms-today-detail-table-wrap {
  border: 1px solid rgba(148,163,184,.35);
  border-radius: .75rem;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15,23,42,.06);
}

.pms-today-detail-table thead th {
  position: static;
  white-space: nowrap;
  background: #eef4fb;
  color: #334155;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .025em;
  border-bottom-width: 1px;
}

.pms-today-detail-table td {
  vertical-align: middle;
}

.pms-today-room-cell {
  min-width: 110px;
}

.pms-today-room-code {
  color: #0b4ea2;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.1;
}

.pms-today-guest {
  color: #0f2f5f;
}

@media (max-width: 991.98px) {
  .pms-today-detail-modal .modal-dialog {
    margin: .5rem;
  }

  .pms-today-detail-table {
    min-width: 1050px;
  }
}


/* ===============================================================
   Menu PMS: codifica cromatica per area funzionale
   Ver. 2026.0723.1752
   - il colore identifica il gruppo senza ridurre la leggibilita
   - testo principale bianco, icona e accenti colorati
   - dropdown coerente con il gruppo di appartenenza
================================================================ */
#pmsTopbar .pms-menu-group {
  --pms-menu-color: #4dabf7;
  --pms-menu-ink: #1971c2;
  --pms-menu-rgb: 25, 113, 194;
}

#pmsTopbar .pms-menu-panoramica {
  --pms-menu-color: #4dabf7;
  --pms-menu-ink: #1971c2;
  --pms-menu-rgb: 25, 113, 194;
}

#pmsTopbar .pms-menu-front-office {
  --pms-menu-color: #38d9c5;
  --pms-menu-ink: #087f8c;
  --pms-menu-rgb: 8, 127, 140;
}

#pmsTopbar .pms-menu-ospiti {
  --pms-menu-color: #8ce99a;
  --pms-menu-ink: #2b8a3e;
  --pms-menu-rgb: 43, 138, 62;
}

#pmsTopbar .pms-menu-struttura {
  --pms-menu-color: #ffc078;
  --pms-menu-ink: #c76b00;
  --pms-menu-rgb: 199, 107, 0;
}

#pmsTopbar .pms-menu-listini {
  --pms-menu-color: #d0bfff;
  --pms-menu-ink: #7950c4;
  --pms-menu-rgb: 121, 80, 196;
}

#pmsTopbar .pms-menu-group > .nav-link {
  border: 1px solid transparent;
}

#pmsTopbar .pms-menu-group > .nav-link .pms-nav-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.62rem;
  height: 1.62rem;
  margin-right: .18rem;
  border-radius: .48rem;
  color: var(--pms-menu-color);
  background: rgba(var(--pms-menu-rgb), .20);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}

#pmsTopbar .pms-menu-group > .nav-link:hover,
#pmsTopbar .pms-menu-group > .nav-link:focus,
#pmsTopbar .pms-menu-group.show > .nav-link {
  color: #fff;
  background: rgba(var(--pms-menu-rgb), .14);
  border-color: rgba(var(--pms-menu-rgb), .28);
}

#pmsTopbar .pms-menu-group > .nav-link:hover .pms-nav-ico,
#pmsTopbar .pms-menu-group > .nav-link:focus .pms-nav-ico,
#pmsTopbar .pms-menu-group.show > .nav-link .pms-nav-ico {
  transform: translateY(-1px);
  background: rgba(var(--pms-menu-rgb), .31);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), 0 2px 7px rgba(0, 0, 0, .18);
}

#pmsTopbar .pms-menu-group > .nav-link.active::after {
  background: var(--pms-menu-color);
  box-shadow: 0 0 8px rgba(var(--pms-menu-rgb), .42);
}

#pmsTopbar .pms-menu-group > .dropdown-menu {
  border-top: 3px solid var(--pms-menu-ink);
}

#pmsTopbar .pms-menu-group .dropdown-item {
  border-left: 3px solid transparent;
  transition: color .12s ease, background-color .12s ease, border-color .12s ease;
}

#pmsTopbar .pms-menu-group .dropdown-item > i {
  width: 1.18rem;
  color: var(--pms-menu-ink);
  text-align: center;
}

#pmsTopbar .pms-menu-group .dropdown-item:hover,
#pmsTopbar .pms-menu-group .dropdown-item:focus {
  color: #172033;
  background: rgba(var(--pms-menu-rgb), .09);
  border-left-color: rgba(var(--pms-menu-rgb), .48);
}

#pmsTopbar .pms-menu-group .dropdown-item.active,
#pmsTopbar .pms-menu-group .dropdown-item:active {
  color: var(--pms-menu-ink);
  background: rgba(var(--pms-menu-rgb), .14);
  border-left-color: var(--pms-menu-ink);
  font-weight: 700;
}

#pmsTopbar .pms-menu-group .dropdown-divider {
  border-color: rgba(var(--pms-menu-rgb), .20);
}

@media (max-width: 991.98px) {
  #pmsTopbar .pms-menu-group > .nav-link {
    margin-bottom: .18rem;
  }

  #pmsTopbar .pms-menu-group > .dropdown-menu {
    border-top-width: 2px;
  }
}

/* ================================================================
   Menu PMS - riconoscimento rapido delle singole funzioni
   - ogni voce ha un colore stabile e semanticamente distinto
   - l'icona resta evidente anche senza leggere l'intera etichetta
   - Schedine e Ricevute Alloggiati sono raccolte nel gruppo Ospiti
================================================================ */
#pmsTopbar .pms-menu-entry {
  --pms-item-color: #1971c2;
  --pms-item-rgb: 25, 113, 194;
  display: flex;
  align-items: center;
  gap: .62rem;
  min-height: 2.55rem;
  padding: .30rem .72rem .30rem .48rem;
  color: #263042;
  border-left: 3px solid transparent;
}

#pmsTopbar .pms-menu-entry .pms-item-ico {
  display: inline-flex;
  flex: 0 0 1.82rem;
  align-items: center;
  justify-content: center;
  width: 1.82rem;
  height: 1.82rem;
  border-radius: .52rem;
  color: var(--pms-item-color);
  background: rgba(var(--pms-item-rgb), .13);
  box-shadow: inset 0 0 0 1px rgba(var(--pms-item-rgb), .20);
  font-size: .98rem;
  transition: color .14s ease, background-color .14s ease, transform .14s ease, box-shadow .14s ease;
}

#pmsTopbar .pms-menu-entry::after {
  content: "";
  flex: 0 0 .38rem;
  width: .38rem;
  height: .38rem;
  margin-left: auto;
  border-radius: 50%;
  background: var(--pms-item-color);
  opacity: .62;
}

#pmsTopbar .pms-menu-entry:hover,
#pmsTopbar .pms-menu-entry:focus {
  color: #172033;
  background: linear-gradient(90deg, rgba(var(--pms-item-rgb), .13), rgba(var(--pms-item-rgb), .035));
  border-left-color: var(--pms-item-color);
}

#pmsTopbar .pms-menu-entry:hover .pms-item-ico,
#pmsTopbar .pms-menu-entry:focus .pms-item-ico {
  transform: translateX(1px) scale(1.04);
  color: #fff;
  background: var(--pms-item-color);
  box-shadow: 0 2px 7px rgba(var(--pms-item-rgb), .28);
}

#pmsTopbar .pms-menu-entry.active,
#pmsTopbar .pms-menu-entry:active {
  color: #172033;
  background: linear-gradient(90deg, rgba(var(--pms-item-rgb), .19), rgba(var(--pms-item-rgb), .055));
  border-left-color: var(--pms-item-color);
  font-weight: 700;
}

#pmsTopbar .pms-menu-entry.active .pms-item-ico,
#pmsTopbar .pms-menu-entry:active .pms-item-ico {
  color: #fff;
  background: var(--pms-item-color);
  box-shadow: 0 2px 8px rgba(var(--pms-item-rgb), .30);
}

#pmsTopbar .pms-menu-entry.active::after,
#pmsTopbar .pms-menu-entry:active::after {
  opacity: 1;
  box-shadow: 0 0 0 3px rgba(var(--pms-item-rgb), .13);
}

/* Panoramica */
#pmsTopbar .pms-item-dashboard   { --pms-item-color:#1971c2; --pms-item-rgb:25,113,194; }
#pmsTopbar .pms-item-statistiche { --pms-item-color:#7950f2; --pms-item-rgb:121,80,242; }

/* Front office */
#pmsTopbar .pms-item-planning      { --pms-item-color:#0b7285; --pms-item-rgb:11,114,133; }
#pmsTopbar .pms-item-prenotazioni  { --pms-item-color:#4263eb; --pms-item-rgb:66,99,235; }
#pmsTopbar .pms-item-stato-camere  { --pms-item-color:#2b8a3e; --pms-item-rgb:43,138,62; }
#pmsTopbar .pms-item-blocchi       { --pms-item-color:#5c677d; --pms-item-rgb:92,103,125; }
#pmsTopbar .pms-item-caparre       { --pms-item-color:#e67700; --pms-item-rgb:230,119,0; }
#pmsTopbar .pms-item-documenti     { --pms-item-color:#a61e4d; --pms-item-rgb:166,30,77; }
#pmsTopbar .pms-item-email         { --pms-item-color:#1098ad; --pms-item-rgb:16,152,173; }

/* Ospiti, schedine e adempimenti */
#pmsTopbar .pms-item-schedine      { --pms-item-color:#d6336c; --pms-item-rgb:214,51,108; }
#pmsTopbar .pms-item-alloggiati    { --pms-item-color:#862e9c; --pms-item-rgb:134,46,156; }
#pmsTopbar .pms-item-presenze      { --pms-item-color:#087f5b; --pms-item-rgb:8,127,91; }
#pmsTopbar .pms-item-calendario    { --pms-item-color:#1c7ed6; --pms-item-rgb:28,126,214; }
#pmsTopbar .pms-item-agenzie       { --pms-item-color:#8d6e63; --pms-item-rgb:141,110,99; }
#pmsTopbar .pms-item-imposta       { --pms-item-color:#d9480f; --pms-item-rgb:217,72,15; }
#pmsTopbar .pms-item-vit           { --pms-item-color:#5f3dc4; --pms-item-rgb:95,61,196; }

/* Struttura */
#pmsTopbar .pms-item-camere        { --pms-item-color:#e8590c; --pms-item-rgb:232,89,12; }
#pmsTopbar .pms-item-tipologie     { --pms-item-color:#f08c00; --pms-item-rgb:240,140,0; }

/* Listini */
#pmsTopbar .pms-item-stagioni      { --pms-item-color:#f59f00; --pms-item-rgb:245,159,0; }
#pmsTopbar .pms-item-periodi       { --pms-item-color:#7048e8; --pms-item-rgb:112,72,232; }
#pmsTopbar .pms-item-prezzi        { --pms-item-color:#2f9e44; --pms-item-rgb:47,158,68; }
#pmsTopbar .pms-item-extra         { --pms-item-color:#c2255c; --pms-item-rgb:194,37,92; }

@media (max-width: 991.98px) {
  #pmsTopbar .pms-menu-entry {
    min-height: 2.72rem;
    padding-top: .38rem;
    padding-bottom: .38rem;
  }
}

/* ==========================================================
   Navbar responsive consolidata
   Ver. 2026.0831.0012
   - elimina sovrapposizioni tra menu principali e strumenti destri
   - mantiene una sola riga da 1200px in su comprimendo in modo progressivo
   - sotto 1200px usa il collapse Bootstrap (navbar-expand-xl)
   - in larghezze intermedie sacrifica prima elementi ridondanti/non essenziali
========================================================== */
@media (min-width: 1200px) {
  #pmsTopbar .container-fluid {
    flex-wrap: nowrap;
    gap: .30rem;
  }

  #pmsTopbar .navbar-brand {
    flex: 0 1 auto;
    min-width: 0;
    overflow: visible;
    gap: .45rem !important;
  }

  #pmsTopbar .pms-brand-text {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #pmsNavbar {
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
  }

  #pmsNavbar > .pms-nav {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    gap: .04rem;
  }

  #pmsNavbar > .pms-nav > .nav-item {
    flex: 0 1 auto;
    min-width: 0;
  }

  #pmsNavbar > .pms-nav > .nav-item > .nav-link {
    display: flex;
    align-items: center;
    min-width: 0;
    white-space: nowrap;
  }

  #pmsNavbar > .pms-nav > .nav-item > .nav-link > span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #pmsNavbar > .pms-nav-tools {
    flex: 0 0 auto !important;
    min-width: 0 !important;
    margin-left: .25rem !important;
    gap: .22rem !important;
    white-space: nowrap;
  }

  #pmsTopbar .pms-season-badge {
    display: inline-block;
    max-width: 145px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
  }

  #pmsTopbar .pms-user {
    min-width: 0;
    max-width: 122px;
  }

  #pmsTopbar .pms-user-name {
    min-width: 0;
    max-width: 78px;
  }
}

/* Desktop con scaling 110/125%: riduce prima ridondanze, non i menu. */
@media (min-width: 1200px) and (max-width: 1699.98px) {
  #pmsTopbar .pms-brand-text {
    max-width: 115px;
  }

  #pmsTopbar .pms-public-demo-badge {
    padding: .18rem .42rem;
    font-size: .68rem;
    letter-spacing: .01em;
  }

  #pmsTopbar .pms-nav .nav-link {
    font-size: .78rem;
    padding-left: .25rem;
    padding-right: .25rem;
  }

  #pmsTopbar .pms-nav .dropdown-toggle::after {
    margin-left: .20rem;
  }

  #pmsTopbar .pms-nav-ico {
    margin-right: .06rem;
  }

  #pmsTopbar .pms-season-badge {
    max-width: 128px;
    font-size: .62rem;
    padding-left: .34rem;
    padding-right: .34rem;
  }

  #pmsTopbar .pms-alerts-label {
    display: none !important;
  }

  #pmsTopbar .pms-alerts-summary {
    padding-left: .42rem;
    padding-right: .42rem;
  }

  #pmsTopbar .pms-user {
    max-width: 108px;
    padding-left: .28rem;
    padding-right: .28rem;
  }

  #pmsTopbar .pms-user-name {
    max-width: 66px;
  }

  /* Il nome hotel è già nel brand a sinistra: su schermi medi il duplicato sparisce. */
  #pmsNavbar .pms-hotel-context-static {
    display: none !important;
  }
}

/* 1200-1499: compattezza ulteriore senza sovrapposizioni. */
@media (min-width: 1200px) and (max-width: 1499.98px) {
  #pmsTopbar .pms-brand-text {
    max-width: 92px;
  }

  #pmsTopbar .pms-menu-struttura > .nav-link > span:last-child,
  #pmsTopbar .pms-menu-listini > .nav-link > span:last-child {
    display: none;
  }

  #pmsTopbar .pms-menu-struttura > .nav-link,
  #pmsTopbar .pms-menu-listini > .nav-link {
    padding-left: .30rem;
    padding-right: .30rem;
  }

  /* I tre KPI "oggi" sono disponibili nella dashboard/planning:
     sotto 1500px cedono spazio ai menu e alla stagione. */
  #pmsTopbar #pmsTopbarTodayItem {
    display: none !important;
  }

  #pmsTopbar .pms-season-badge {
    max-width: 112px;
  }
}

/* 1200-1349: icone per i gruppi più lunghi; tooltip title mantiene il significato. */
@media (min-width: 1200px) and (max-width: 1349.98px) {
  #pmsTopbar .pms-menu-panoramica > .nav-link > span:last-child,
  #pmsTopbar .pms-menu-front-office > .nav-link > span:last-child,
  #pmsTopbar .pms-menu-ospiti > .nav-link > span:last-child {
    display: none;
  }

  #pmsTopbar .pms-nav .nav-link {
    padding-left: .32rem;
    padding-right: .32rem;
  }

  #pmsTopbar .pms-brand-text {
    max-width: 78px;
  }

  #pmsTopbar .pms-season-badge {
    max-width: 98px;
  }

  #pmsTopbar .pms-user-name {
    max-width: 52px;
  }
}

