
*{
  box-sizing:border-box;
}

:root { --sidebar-w: 250px; }
:root {

  /* BACKGROUND */
  --bg: #ffffff;
  --bg-panel: #e6f0fa;
  --bg-soft: #d9e6f5;
  --bg-hover: #cce0f2;

  /* TEXT */
  --text: #1a2c4d;
  --text-soft: #567396;

  /* BORDER */
  --border: #d0d9e3;

  /* PRIMARY (blu moderno) */
  --primary: #0066cc;
  --primary-soft: rgba(59,130,246,0.15);

  /* STATUS */
  --status-open: #0066cc;
  --status-open-bg: rgba(59,130,246,0.15);

  --status-progress: #ffb347;
  --status-progress-bg: rgba(245,158,11,0.18);
  
  //--selected-reports-bg: #a0c8e6;
  --selected-reports-bg: #99c2d9;

}

.dark {

  --bg: #1e1e1e;
  --bg-panel: #2a2a2a;
  --bg-soft: #333;
  --bg-hover: #3a3a3a;

  --text: #d0d9e3;
  --text-soft: #7e91a8;

  --border: #444;

}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  //display: flex;
  height: 100vh;
  font-family: "Segoe UI", sans-serif;
  background: #e0ebf4;
  color: #222;
  overflow: hidden;
  transition: all 0.3s ease;
}

#app-container {
  display: flex;
  width: 100%;
  height: 100vh;
}

/* === SIDEBAR === */
.sidebar {
  //background: #1f3d66; color: #fff;
  background: #fff; color: #1f3d66;
  width: var(--sidebar-w);
  height: 100vh;
  position: relative;
  flex-shrink: 0;
  display: flex; flex-direction: column;
  //border-right: 1px solid rgba(255,255,255,0.08);
  border-right: 1px solid #1f3d66;
  //transition: transform 0.35s ease, opacity 0.25s ease;
  z-index: 3;
  
}
.sidebar.hidden {
  transform: translateX(-100%);
  opacity: 0;
  position: absolute;
}

.brand {
  padding: 16px; background: #1c2d55;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-weight: 700; letter-spacing: .3px;
  white-space: nowrap;
  background:#fff;
}

.brand img{
  width:100%;
}

/*
.navwrap { 


  flex: 1;
  overflow-y: auto;
  border-top: 1px solid #00498a; //rgba(0,0,0,.12);
}
*/

.navwrap{
  flex: 1;
  overflow-y: auto;
}

.navwrap.has-overflow{
  //box-shadow: inset 0 3px 3px -3px rgba(0,0,0,.08);
  border-top: solid 1px #00498a;
}

.sidebar ul { list-style: none; }
.sidebar li {
  padding: 10px 15px; cursor: pointer;
  user-select: none; position: relative; white-space: nowrap;
}
.sidebar li:hover { background: #2a567a; color:#fff;}
.sidebar li .caret { float: right; transition: transform 0.2s; }
.sidebar li.open > .caret { transform: rotate(90deg); }
.sidebar ul ul { display: none; background: #2a567a; }
.sidebar li.open > ul { display: block; animation: fadeIn 0.25s; }
@keyframes fadeIn { from{opacity:0;transform:translateY(-4px)} to{opacity:1;transform:translateY(0)} }

/* === RIGHT SECTION === */
.right-section {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: 100vh;
  width: calc(100% - var(--sidebar-w));
  transition: width 0.3s ease;
}
.sidebar.hidden + .right-section {
  width: 100%;
}

/* === TOPBAR === */
.topbar {
  height: 50px;
  background: #00498a; //#222;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  border-bottom: 1px solid #111;
  flex-shrink: 0;
}
.menu-left, .menu-right { display: flex; align-items: center; gap: 15px; }
.menu-left i { cursor: pointer; font-size: 1.5em; }

.dropdown { position: relative; cursor: pointer; }
.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background: #333;
  border-radius: 6px;
  overflow: hidden;
  min-width: 180px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  z-index: 999999999;
}
.dropdown-content a {
  display: block;
  color: #fff;
  text-decoration: none;
  padding: 10px 14px;
}

.dropdown-content span {
  display: block;
  color: #fff;
  text-decoration: none;
  padding: 10px 14px;
}


.dropdown-content a:hover { background: #444; }
.dropdown.open .dropdown-content { display: block; }

/* === MAIN === */
.main {
  flex: 1;
  //padding: 20px;
  overflow-y: auto;
  //background: #e0ebf4;
  background: #fff;
  
}

/* === MODAL === */

.modal{
  position:fixed;
  inset:0;

  display:flex;
  justify-content:center;
  align-items:flex-start;

  padding:32px 0;

  background:rgba(0,0,0,.6);

  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;

  visibility:hidden;
  opacity:0;
  transition:opacity .3s ease, visibility .3s ease;

  z-index:10000;
}

.modal.show{
  visibility:visible;
  opacity:1;
}

.modal-content{
  position:relative;

  width:90%;
  margin:auto;

  background:#fff;
  padding:24px;

  border-radius:8px;
  box-shadow:0 5px 20px rgba(0,0,0,.3);

  box-sizing:border-box;

  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  align-items:flex-start;

  text-align:left;
}

.modal.large .modal-content{
  max-width:1100px;
}

.modal.fit-content .modal-content{
   width: fit-content;
    max-width: 90vw;
}


.modal.medium .modal-content{
  max-width:800px;
}

.modal.small .modal-content{
  max-width:350px;
}

#appModalTitle{
  width:100%;
  padding:0 0 20px;
  padding-right:40px;   /* spazio per la X */
  box-sizing:border-box;
  font-size: 17px;
  border-bottom:solid 2px #99c2d9;
  color:#00498a;
}



#appModalText{
  width:100%;

  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  align-items:center;

  text-align:center;

  margin:20px 0;

  box-sizing:border-box;
}

#appModalText img,
#appModalText video,
#appModalText iframe{
  display:block;

  max-width:100%;
  max-height:70vh;

  margin:auto;

  object-fit:contain;
}

.modal-close{
  position:absolute;
  top:16px;
  right:16px;
  z-index:2;
}

.closeModal{
  width:40px;
  height:40px;

  padding:0;

  border:none;
  background:transparent;

  cursor:pointer;

  color:#00498a;
  font-size:26px;
  line-height:40px;
  text-align:center;
}

.closeModal:hover{
  color:#000;
}

.closeModal::before{
  content:"✕";
}
/* === AUTH === */
.auth-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

#app-container.auth-mode {
  display: block;
}

.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background:#fff;
}

.auth-box {
  background: #fff;
  //padding: 30px;
  border-radius: 8px;
  width: 100%;
  max-width: 350px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

  .board-hero-slogan{
    bottom:-34%;
    text-align:center;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.2px;
    color:#000;
  }

.auth-box-img-container {
  padding-top:30px;
}

.auth-box-form-container {
  padding:30px;
}

.auth-box h2 {
  margin-bottom: 20px;
  text-align: center;
}

.auth-box input {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #b0c4d8;
  border-radius: 6px;
}

.auth-box button {
  width: 100%;
  padding: 10px;
  background: #1f3d66;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.auth-box button:hover {
  background: #162b43;
}

.auth-box img{
  width:100%;
}

.auth-footer {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  background: #fff;
  color: #455c78;
}

.input-error {
  font-size: 12px;
  color: #d95454;
  margin: -10px 0 10px;
}

.auth-error {
  display: none;
  background: #f5d9d9;
  color: #d95454;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 15px;
  font-size: 13px;
}

/* === DEVTOOLS === */
.dev-panel {
  position: fixed;
  bottom: 10px;
  right: 10px;
  width: 300px;
  background: #111;
  color: #0f0;
  font-size: 12px;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0,0,0,.5);
  z-index: 99999;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.dev-header {
  background: #000;
  padding: 8px;
  border-bottom: 1px solid #333;
}

.dev-body {
  padding: 10px;
  display: flex;
  gap: 10px;
}

.dev-body button {
  flex: 1;
  padding: 6px;
  background: #222;
  color: #0f0;
  border: 1px solid #333;
  cursor: pointer;
}

.dev-body button:hover {
  background: #333;
}

#devOutput {
  padding: 10px;
  max-height: 200px;
  overflow: auto;
  white-space: pre-wrap;
}



















/* struttura base */
.navwrap,
.navwrap ul{
  list-style:none;
  margin:0;
  padding:0;
}

/* item */
.menu-item{
  user-select:none;
}

/* label cliccabile */
.menu-label{
  display:flex;
  align-items:center;
  padding:10px 12px;
  cursor:pointer;
  gap:8px;
  box-sizing:border-box;
  border:1px solid transparent;
}

/* hover */
.menu-label:hover{
  //background:var(--bg-hover);
  border: 1px solid #fff;
  border-radius:5px 5px;
  opacity: 0.8;
}

/* titolo */
.menu-title{
  flex:1;
}

/* caret */
.caret{
  transition:transform 0.2s ease;
}

/* nascondi submenu di default */
.menu-item ul{
  display:none;
  padding-left:12px;
}

/* quando aperto */
.menu-item.open > ul{
  display:block;
}

/* rotazione caret quando aperto */
.menu-item.open > .menu-label .caret{
  transform:rotate(90deg);
}













.reports-list-panel{
  padding-top:10px;
  display:flex;
  flex-direction:column;
  height:100%;
  background:var(--bg-panel);
  //border-right:1px solid var(--border);
}

.reports-list-tabs{
  display:flex;
  //gap:20px;
  padding:0 12px;
  border-bottom:1px solid var(--border);
}

/* singolo tab */
.reports-list-tabs{
  display:flex;
  border-bottom:1px solid #cfd8e4;
  padding:0 12px;
}

/* tab */
.reports-tab{
  border:1px solid #dde6f0;
  border-top-left-radius:6px;
  border-top-right-radius:6px;

  padding:7px 7px;
  margin-bottom:-1px; /* 🔥 per attaccarsi alla linea */

  background:transparent;
  color:#3d4f6c;

  font-size:13px;
  cursor:pointer;

  transition:all 0.2s ease;
}

/* hover */
.reports-tab:hover{
  background:#e6f0fa;
  border-color:#d9e6f2 #d9e6f2 #cfd8e4;
}

/* attivo */
.reports-tab.active{
  background:#fff;
  color:#1c283d;

  border-color:#cfd8e4 #cfd8e4 #fff;
  font-weight:500;
}

/* tab */
.reports-tab{
  display:flex;
  align-items:center;
  gap:6px; /* 🔥 badge di fianco */
}

.reports-list-empty{
  padding: 30px 15px 15px 15px;
  text-align:center;
  
  font-size:17px;
  font-weight:700;
  color:#00498a;
}

.reports-list-empty.hidden{
  display:none;
  
}

/* label */
.tab-label{
  display:inline-block;
}

/* badge base */
.tab-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  min-width:18px;
  height:18px;
  padding:0 6px;

  font-size:11px;
  font-weight:600;

  border-radius:6px;

  line-height:1;
  
  background:#004f57;
  color:#fff;
  
}

/* 🎨 PASTEL COLORS */

/* tutte */
.tab-badge.is-all{
  background:#dbe6f4;   /* grigio pastello */
  color:#567396;
}

/* aperte */
.tab-badge.is-open{
  //background:#a0c8e6;   /* blu pastello */
  //color:#0056b3;
  background: #004f57;
  color:#fff;
  //opacity:0.5;

}

/* in carico */
.tab-badge.is-progress{
  //background:#fff0b3;   /* giallo pastello */
  //color:#b36a00;
  background: #995c20;
  color:#fff;
  //opacity:0.5;
}

/* aperte */
.tab-badge.is-closed{
  //background:#a0c8e6;   /* blu tipo crimson */
  //color:#0056b3;
  background: #b63b39;
  color:#fff;
  //opacity:0.5;

}


/* attivo */
.reports-tab.active .tab-badge{
  //background:#c0d0f0;   /* leggermente più evidente */
  //color:#003f99;
}

.reports-list-search{
  position:relative;
  padding:12px;
  background:#fff;
}

/* input */
.reports-list-search input{
  width:100%;
  padding:10px 40px 10px 14px; /* spazio per icona a destra */

  border:none;
  border-radius:999px;

  background:var(--bg);
  color:var(--text);

  outline:none;

  /* 🔥 shadow input */
  box-shadow:
    0 2px 6px rgba(0,0,0,0.08),
    0 6px 16px rgba(0,0,0,0.10);

  transition:all 0.2s ease;
}

/* focus */
.reports-list-search input:focus{
  box-shadow:
    0 0 0 2px rgba(0,128,255,0.2),
    0 4px 12px rgba(0,0,0,0.12);
}

/* icona lente */
.search-icon{
  position:absolute;
  right:22px;
  top:50%;
  transform:translateY(-50%);

  width:18px;
  height:18px;

  color:var(--text-soft);
  pointer-events:none;
}
.reports-list-items{
  display:flex;
  flex-direction:column;
  //gap:8px; /* spazio tra item */
  border-top: solid 1px #c4cfe0;
}

.report-item{
  //padding:12px;
  border-bottom:1px solid var(--border);
  cursor:pointer;
  display:flex;
  flex-direction:column;
  background: #dde6f0;
  box-shadow: 1px 0px 10px rgba(0,0,0,0.15);
  
  
}

.report-item:hover{
  //background:var(--bg-hover);
  opacity:0.7;
}

.report-item.active{
  background:var(--bg-soft);
}

.report-item-top,
.report-item-bottom{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0px 12px 6px 12px;
  position:relative;
}

.report-item-middle{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:6px 12px;
}

.report-item-content

.report-item-middle .hidden{
  display:none;
}


.report-item-title{
  font-size:14px;
  font-weight:600;
  color:var(--text);
  min-width:0;
  flex:1;
}

.report-item-time{
  font-size:12px;
  color:var(--text-soft);
  white-space:nowrap;
}



.report-item-user{
  font-size:12px;
  color:var(--text-soft);
  min-width:0;
  flex:1;
}

.report-item-status{
  font-size:11px;
  padding:3px 8px;
  border-radius:999px;
  white-space:nowrap;
  margin-top:14px;
  margin-right:10px;
  min-width: 70px;
  text-align:center;
  
}

.report-item-status.is-open{
  //background:rgba(0, 128, 255, 0.12);
  background: #004f57;
  color:#fff;
  //opacity:0.5;
}

.report-item-status.is-progress{
  //background:rgba(255, 166, 0, 0.14);
  background: #995c20;
  color:#fff;
  //opacity:0.5;
}

.report-item-status.is-closed{
  //background:rgba(255, 166, 0, 0.14);
  background: #b63b39;
  color:#fff;
  //opacity:0.5;
}


.report-item-preview{
  font-size:13px;
  color:var(--text-soft);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  padding: 0px 12px 12px 12px;
}
.arrow-title{
  font-size:12px;  
  display:inline-block;
  transform:translateY(-4px);
  color:#c4cfe0;
}



.nav-icon{
  width:24px;
  height:24px;
  display:block;
}

/* ICON */
.admin-icon{
  width:40px;
  height:40px;
  border-radius:10px;
  background:rgba(255,255,255,.04);
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow: 0px 0px 6px #c4cfe0;
}


.icon-chat{
  fill: currentColor;
  flex-shrink: 0;
  vertical-align:middle;
}


.icon-chat-enter{
  flex-shrink: 0;
}

.chat-container {
  height: 100dvh;
  display: flex;
  flex-direction: column;
}

.chat-tool-icon{
  width:22px;
  height:22px;
  display:block;
}

/* WRAPPER */
/*
.chat-wrapper{
  height: 100%;
  display: flex;
  flex-direction: column;
}*/

.chat-wrapper{
  height:100%;
  display:flex;
  flex-direction:column;
}

.chat-view{
  flex:1;
  display:flex;
  flex-direction:column;
  background:var(--bg-main);
  min-height:0;
}

.chat-main{
  flex:1;
  overflow-y:auto;
  display:flex;
  flex-direction:column;
  padding:10px 10px 10px 10px;
  
  min-height:0; 
}


.admin-list{
  padding:14px 14px 14px 14px;
  
}

/* HEADER */
/*
.chat-header{
  margin-bottom:14px;
}
*/
  .chat-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:10px 16px;
    border-bottom:1px solid var(--border);
    background:var(--bg-panel);
    
    /*position:fixed;*/
    position: static; /* era fixed */
    
    /*
    top:56px;
    left:0;
    right:0;
    z-index:9;
    */
  }
  
.chat-header-left{
  display:flex;
  align-items:left;
  gap:0px;
  margin-right:10px;
}  
  
.chat-header-title{
  font-weight:600;
}

.chat-header-subtitle{
  font-size:12px;
  color:var(--muted);
}  

.chat-header-group{
  font-weight: normal;
}

.chat-header h2{
  margin:0;
  font-size:18px;
  font-weight:600;
}

.chat-header-menu-btn{
  background:none;
  border:none;
  color:var(--txt);
  //color:#cfd9ea;
  font-size:22px;
  cursor:pointer;
  padding:4px 8px;
}


.chat-sub{
  font-size:13px;
  color:var(--muted);
}

/* LIST */
.chat-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.chat-check-icon{
  width:14px;
  height:14px;
  color:#fff;
  opacity:0.5;
}

.chat-check-icon.read{
  //color:#1a73e8; //#0050cc;
  //background:#fff;
  opacity:1.0;
}

.chat-check-icon-recived{
  width:14px;
  height:14px;
  color:#455c78;
  opacity:0.5;
}

.chat-check-icon-recived.read{
  //color:#455c78; //#0050cc;
  //background:#fff;
  opacity:1.0;
}


/*---------------------------------*/

/*
.chat-view{
  height:100dvh;
  display:flex;
  flex-direction:column;
  background:var(--bg-main);
}
*/

/*

  .chat-view{
    height:100%;
    position:relative;
    display:flex;
    flex-direction:column;
    background:var(--bg-main);
    
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
  }

.chat-wrapper,
.chat-view{
  height: 100%;
  //max-height: 100%;
}
*/



.chat-back-btn{
  border:solid 1px #c4cfe0;
  background:none;
  font-size:20px;
  color:var(--txt);
  cursor:pointer;
  //background: #dde6f0;
  border-radius:5px 5px 5px 5px;
  margin-right:5px;
}


.chat-title{
  font-size:16px;
  margin:0;
}

.chat-subtitle{
  font-size:12px;
  color:var(--muted);
}

.chat-status{
  font-size:11px;
  padding:2px 6px;
  border-radius:6px;
  background:var(--bg-soft);
}


/*
.chat-messages{
  flex:1;
  overflow-y:auto;
  padding:12px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
*/
  .chat-messages{
    flex:1;
    padding:12px;
    display:flex;
    flex-direction:column;
    gap:10px;
    overflow:visible;
  }


.chat-message{
  display:flex;
}

.chat-message.is-sent{
  justify-content:flex-end;
}

.chat-message.is-received{
  justify-content:flex-start;
}

.chat-bubble.is-received-admin{
  background:#0b6fb8;
  color:#fff;
}


.chat-bubble{
  max-width:75%;
  padding:10px 12px;
  border-radius:14px;
  background: var(--bg-panel); // var(--bg-soft);
  position:relative;
  box-shadow: 0px 0px 5px #b0c4d8;
  margin-bottom: 8px;
}

.chat-message.is-sent .chat-bubble{
  //background:var(--accent);
  background:#357230; //#337740;
  
  color:#fff;
}

.chat-bubble-text{
  font-size:14px;
  line-height:1.4;
  word-wrap:break-word;
}

.chat-bubble-meta{
  display:flex;
  justify-content:flex-end;
  gap:6px;
  margin-top:4px;
  font-size:11px;
  //opacity:1.0;
}

.chat-checks{
  font-size:12px;
}

/* CARD */
.admin-card{
  background:var(--bg-panel);
  border-radius:12px;
  box-shadow:0 2px 8px rgba(0,0,0,.2);
  overflow:hidden;
  margin-bottom:15px;
}

.chat-bubble.has-media{
  padding:6px;
}

.chat-media-thumb img{
  width:100%;
  border-radius:10px;
  display:block;
}

.chat-bubble-caption{
  font-size:13px;
  margin-top:6px;
}

.chat-location-card{
  display:flex;
  gap:10px;
  align-items:center;
  background:var(--bg-soft);
  border-radius:10px;
  padding:10px;
  border:none;
  cursor:pointer;
}

.chat-location-icon{
  font-size:20px;
}

.chat-location-title{
  font-size:13px;
  font-weight:600;
}

.chat-location-text{
  font-size:12px;
  color:var(--muted);
}

/*
.chat-attachment-preview{
  padding:8px 10px;
  border-top:1px solid var(--border);
  background:var(--bg-panel);
}
*/

.chat-composer-wrap.attach-mode{
  flex:1;
}

footer.chat-composer-wrap.attach-mode{
  border-top:1px solid #00498a; //#313131;
}

.chat-attachment-preview{
  flex:1;

  display:flex;
  justify-content:center;
  align-items:center;
  overflow:hidden;
  
}

.chat-composer-wrap.bk-attach{
  //background: #1a1a1a;
  background:rgba(0,0,0,.92);
}

.chat-attachment-preview.hidden{
  display:none;
}

.chat-attachment-preview-wrapper{
  flex:1;

  display:flex;
  justify-content:center;
  align-items:center;

  position:relative;

  width:100%;
  height:100%;
  
  
  
  background: #131314;
  
}

.chat-attachment-preview-video,
.chat-attachment-preview-image{
  display:block;

  max-width:100%;
  max-height:100%;

  width:auto;
  height:auto;

  object-fit:contain;
}

.chat-attachment-preview-close{

  position:absolute;

  top:0px;
  right:0px;

  width:32px;
  height:32px;

  border:none;
  border-radius:20%;

  cursor:pointer;
  
  font-size:14px;
  //background:#fff;
  opacity:0.6;
  box-shadow:0px 0px 3px #999;
  color:#fff;
  background:#000;
}











.chat-preview-list{
  display:flex;
  gap:8px;
  overflow-x:auto;
}

.chat-preview-item{
  position:relative;
  width:70px;
  height:70px;
}

.chat-preview-item img{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:8px;
}

.chat-preview-remove{
  position:absolute;
  top:-6px;
  right:-6px;
  width:20px;
  height:20px;
  border-radius:50%;
  border:none;
  background:#000;
  color:#fff;
  font-size:12px;
  cursor:pointer;
}

/*
.chat-composer-wrap{
  border-top:1px solid var(--border);
  background:var(--bg-panel);
  padding:8px;
  display:flex;
  flex-direction:column;
  gap:6px;
}
*/

  .chat-composer-wrap{
  border-top:1px solid var(--border);
  background:var(--bg-panel);
  
  
  padding:8px;

  display:flex;
  flex-direction:column;
  gap:6px;

  flex: 0 0 auto;
  
  box-sizing:border-box;
}

.chat-send-btn:disabled{
  opacity:0.4;
  cursor:not-allowed;
}

.chat-tools{
  display:flex;
  gap:8px;
}

.chat-tool-btn{
  border:none;
  background:var(--bg-soft);
  border-radius:10px;
  padding:6px 10px;
  font-size:16px;
  cursor:pointer;
}

.chat-composer{
  display:flex;
  align-items:flex-end;
  gap:8px;
}

.chat-input-box{
  flex:1;
  background:var(--bg-soft);
  border-radius:14px;
  padding:6px 10px;
  max-height:140px;
  overflow-y:auto;
}

.chat-message-input{
  width:100%;
  border:none;
  outline:none;
  resize:none;
  background:transparent;
  color:var(--txt);
  font-size:15px;
  line-height:1.4;
  min-height:32px;
}

.chat-send-btn{
  width:44px;
  height:44px;
  border-radius:50%;
  border:none;
  background:#00498a; //var(--accent);
  color:#fff;
  font-size:18px;
  cursor:pointer;
  flex-shrink:0;
}

.chat-send-btn:active{
  transform:scale(.95);
}

.chat-day-separator{
  text-align:center;
  font-size:12px;
  color:var(--muted);
  margin:10px 0;
}


.chat-messages{
  scroll-behavior:smooth;
}



.chat-message-username{
  font-size: 12px;
  
}

.chat-message-name{
  font-size: 12px;
  font-weight:bold;
}

.chat-message-name-content{
  border-bottom: 1px solid #fff;
  padding-bottom: 5px;
  margin-bottom: 5px;
}



#mainContent{
  height:100vh;
  overflow:hidden; /* 🔴 questo è il punto chiave */
  display:flex;
  flex-direction:column;
}

.open-reports-container-class{
  flex:1;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}


.tickets{
  margin:15px 15px 15px 15px;
  border-radius :7px 7px 7px 7px;
  
//  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
 
}
  


.tickets-container{
  flex:1;
  display:flex;
  overflow:hidden;
  height:100%;
}

.tickets-list{
  width:25%; //300px;
  display:flex;
  flex-direction:column;
  overflow:hidden;
   
}

.tickets-chat{
  flex:1;
  display:flex;
  flex-direction:column;
}

/* unico punto scroll */
#reports-list-items{
  flex:1;
  overflow-y:auto;
}

.tickets-chat{
  flex:1;
  overflow:hidden;
  width:50%;
}


.tickets-details{
  width:25%; /* 300px */
  overflow-x: hidden;
  overflow-y: auto;
  //height: 100%;
}

.module-title{
  padding:12px 12px 12px 12px;
  //border-bottom:solid 1px #c4cfe0;
}

#devWsPanel {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 300px;
  height: 300px;
  background: #111;
  color: #0f0;
  z-index: 9999;
  display: none;
}

/*------------------------------*/
.chat-message-badge {
  position: absolute;
  top: -12px;
  right: 4px;

  width: 44px;
  height: 44px;
  
  display: none;
  
}

.chat-message-badge.has-unread{
  display: block;
}

/* svg sfondo */
.chat-message-badge .icon-chat {
  width: 100%;
  height: 100%;
  
  fill:#993636;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.lastmsgdatetime{
  color:#993636;
  font-size: 10px;
  font-weight: bold;
}

.lastmsgdatetime svg{
  width:17px;
  height:auto;
}

/* numero sopra */
.badge-count {
  position: absolute;
  top: 46%;
  left: 50%;
  transform: translate(-50%, -55%);

  font-size: 10px;
  font-weight: 700;
  color: #fff;
}

.chat-selected{
 
  //background: #d9e6f5;
  //background: #e0f0f5;
  background: var(--selected-reports-bg);
  //color: #004f57;
  //font-weight:bold;
  border-bottom: solid 1px #cbd4e0;
  padding: 5px 15px 5px 15px;
  text-align:center;
  
}


/*
=========================
PRESA IN CARICO
=========================

/*
=========================
CHIUDI
=========================
*/

.chat-header-btn{

  display:flex;
  align-items:center;
  justify-content:center;

  gap:.45rem;

  padding:3px 8px;

  border:none;
  border-radius:5px;

  color:#fff;

  font-size:.72rem;
  //font-weight:600;

  cursor:pointer;

  transition:
    transform .14s ease,
    opacity .14s ease,
    box-shadow .14s ease;

  box-shadow:
    0 2px 10px rgba(0,0,0,.08);
    
  min-width: 110px;  
}


.chat-header-btn:hover{
  opacity:.94;
}

.chat-header-btn:active{
  transform:scale(.98);
}

.report-action-progress{
  background:#994f29;
}

.report-action-close{
  margin-top: 5px; 
  background:#b3302d;
}

.report-action-open{
  padding: 5px 10px 5px 10px;
  background:#004f57;
}




.top-message{

  //background: #e0f0f5 !important; 
  background: var(--selected-reports-bg) !important;

}

.chat-header-btn.disabled{
  pointer-events:none;
  opacity:.5;
}

.chat-header-btn-wrap.disabled:hover{
  cursor:not-allowed;
}

.segnalazioni-sub-title{
  color: #b0c4d8;
  font-weight:normal;
}

.main-content{
  flex:1;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

.main-content-inside{
  display:flex;
  height:100%;
  padding:12px 12px 12px 12px;
}

#report-map{
  width:100%;
  height:300px;
  //border-radius:8px;
  border-bottom: solid 2px #99c2d9;
}


.chat-no-map{
  padding:15px;
  margin:15px;
  position:relative;
  //border: 1px solid #eee;
  box-shadow: 0px 0px 3px #ccc;
  border-radius: 15px 15px 15px 15px;
  background:#f9f9f9;
  font-size:12px;
}

.chat-no-map img{
  width:28px;
  height:28px;
  position:absolute;
  top: -14px;
  left: -14px;
  opacity:0.7;
}

#report-map-address{
  
  padding:5px 5px 5px 5px;
  //margin:15px;
  border-bottom: solid 2px #99c2d9;
  
  display:flex;
  align-items:flex-start;
  gap:8px;
  width:100%;
}


.report-map-address-marker{
  flex:0 0 auto;
  
}

.report-map-address-marker img{
  width:24px;
  height:auto;
  margin:auto 0px;
  
}

#report-map-address-place{
  flex:1;
  min-width:0;
  border-left: 1px #99c2d9 dashed;
  padding-left: 13px; 
  font-size:14px;
}


/*
  ATTACHMENTS
*/


.msg-media img{
  width:100%;
}

.msg-media{
  overflow:hidden;
}


.msg-map-container{
  overflow: hidden;
}

.msg-location-map{
  width:260px;
  height:260px;
  //border-radius:12px;
  overflow:hidden;
  margin-top: 3px;
}

.msg-location-address{
  width:180px;
  padding:8px 0px;
  box-sizing:border-box;

  //background:rgba(255,255,255,.9);

  font-size:13px;
  line-height:1.3;
}

.img-container{
  cursor:pointer;
}

.msg-media .video-container{
  width:260px;
  height:260px;

  display:flex;
  justify-content:center;
  align-items:center;

  overflow:hidden;
  box-sizing:border-box;
  cursor:pointer;
}

.video-container{
  width:260px;
  height:260px;
  padding:10px;

  background:#000;

  display:flex;
  justify-content:center;
  align-items:center;

  overflow:hidden;
  box-sizing:border-box;
  position:relative;
  
  overflow:hidden;
  cursor:pointer;
}

.video-container-modal{
  width:100%;
  height:100%;
  padding:10px;

  background:#000;

  display:flex;
  justify-content:center;
  align-items:center;

  box-sizing:border-box;
  position:relative;
  overflow:hidden;
}

.video-container-modal video{
  width:auto;
  height:100%;
  max-width:100%;
  max-height:100%;
  object-fit:contain;
  display:block;
}


.msg-media .video-container video{
  display:block;

  max-width:100%;
  max-height:100%;

  width:auto;
  height:auto;

  object-fit:contain;
}


.chat-file-container{
  width:100%;
  padding-top:10px;
  width:260px;
  //background:#fff;
}

.chat-file-info{
  margin-bottom:10px;
}


.chat-file{
  display:flex;
  align-items:center;
  gap:12px;
  overflow:hidden;
}

.chat-file-download{
  text-decoration:none;
  color:inherit;
}
.chat-file-name{
  word-break:break-all;
  text-align:center;
  
}

#chat-attachment-preview-file{
    word-break:break-all;
  text-align:center;
color:#999;
}

.chat-file-info{
  max-height: 120px;
}

.file-icon-simple{
  width:170px;
  height:120px;
  display:block;
  margin:0 auto;
}

/*=============*/
/* IMAGE VIEWR */
/*=============*/

.image-viewer{
  position:fixed;
  inset:0;
  z-index:99999;
  background:rgba(0,0,0,.92);
  overflow:hidden;
  touch-action:none;
}

.image-viewer.hidden{
  display:none;
}

/*
.image-viewer-topbar{
  position:fixed;
  top:0;
  left:0;
  right:0;
  height:52px;
  z-index:2;
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:16px;
  padding:0 16px;
  background:rgba(0,0,0,.45);
}
*/

.image-viewer-topbar{
  
  
  position:absolute;
  top:0;
  left:0;
  right:0;
  

  height:calc(52px + env(safe-area-inset-top));

  z-index:2;
  display:flex;
  justify-content:flex-end;
  align-items:flex-end;

  gap:16px;

  padding:
    env(safe-area-inset-top)
    16px
    8px
    16px;

  box-sizing:border-box;

  background:rgba(0,0,0,.45);
  z-index:999;
}

.image-viewer-topbar button,
.image-viewer-topbar a{
  color:#fff;
  background:none;
  border:0;
  font-size:26px;
  text-decoration:none;
  cursor:pointer;
}

.image-viewer-stage{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}

.image-viewer-stage img{
  max-width:100%;
  max-height:100%;
  user-select:none;
  touch-action:none;
  transform-origin:center center;
}

.hidden{
  display:none;  // !important; 
}

/*===============================*/
/* spinner e progressbar caricamento media */

.spinner{
  width:40px;
  height:40px;
  border:4px solid rgba(255,255,255,.25);
  border-top:4px solid #fff;
  border-radius:50%;
  animation:spin .8s linear infinite;
}

@keyframes spin{
  to{
    transform:rotate(360deg);
  }
}

.loading-overlay{
  position:fixed;
  inset:0;
  justify-content:center;
  align-items:center;
  background:rgba(0,0,0,.35);
  z-index:99999999;
  display:none;
}

.loading-overlay.show{
  display:flex;
}


/*
.progress{
  display:none;
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:6px;
  background:#d7d7d7;
  overflow:hidden;
  z-index:999999;
}
*/

.progress{
  display:none;
  position:fixed;

  top:env(safe-area-inset-top);
  left:0;
  right:0;

  height:6px;

  background:#d7d7d7;
  overflow:hidden;
  
  border-bottom:solid 1px #fff;

  z-index:999999;
}

.progress.show{
  display:block;
}

.progress-bar{
  width:0%;
  height:100%;
  background:#00498a;
}


/*############# Media Gallery */

.media-gallery{
  display:flex;
  gap:12px;
  overflow-x:auto;
  overflow-y:hidden;
  padding:18px 14px 18px 14px; //18px 14px;
  scroll-behavior:smooth;
  scrollbar-width:none;
  
  border-bottom: solid 2px #99c2d9;
  
}

.info-title{
  padding: 15px 15px 15px 15px ;
  color:#999;
  font-size: 12px;
  box-shadow: 0px 3px 3px #ddd;
  
}

.info-user-content{
  //padding: 15px 15px 0px 15px ;
  color:#333;
  font-size: 14px;
  
  padding-top:18px;
  
  //border-top: solid 1px #e6f0fa;
  //border-bottom: solid 1px #e6f0fa;
  
}

.info-user-content label{
  color:#00498a;
  font-size: 12px;
}

.media-gallery::-webkit-scrollbar{
  display:none;
}

.media-gallery.hidden{
  display:none;
}

.media-gallery-item{
  flex:0 0 110px;
  display:flex;
  flex-direction:column;
  gap:6px;
  text-decoration:none;
  color:#111;
  background:#fff;
  border-radius:10px;
  overflow:hidden;
  padding:8px;
  box-shadow:0 2px 8px rgba(0,0,0,.15);
  font-size:12px;
  cursor:pointer;
  transform:scale(.92);
  opacity:.75;
  transition:transform .22s ease, opacity .22s ease;
  
}




/*
.media-gallery-item.active{
  transform:scale(1.18) translateY(-6px);
  opacity:1;
  z-index:2;
}
*/
/*
.media-gallery-item:hover{
  transform:scale(1.08);
  opacity:1;
}
*/

.media-gallery:hover .media-gallery-item{
  transform:scale(.92);
  opacity:.65;
}

.media-gallery .media-gallery-item:hover{
  transform:scale(1.18) translateY(-6px);
  opacity:1;
  z-index:10;
}

.media-gallery-item img,
.media-gallery-item video,
.media-gallery-file-icon,
.media-gallery-map-icon{
  width:100%;
  aspect-ratio:1/1;
  object-fit:cover;
  border-radius:8px;
  background:#ddd;
}

.media-gallery-file-icon-simple{
  width:120px;
  height:auto;
  display:block;
  margin:0 auto;
}


/*
.media-gallery-item img,
.media-gallery-item video,
.media-gallery-item .media-gallery-file-icon,
.media-gallery-item .media-gallery-map-icon{
  outline:none;
}

.media-gallery-item:hover img,
.media-gallery-item:hover video,
.media-gallery-item:hover .media-gallery-file-icon,
.media-gallery-item:hover .media-gallery-map-icon{
  outline:3px solid #99c2d9; //#00498a;
}
*/

.media-gallery-map-preview{
  width:100%;
  height:90px;
  border-radius:8px;
  overflow:hidden;
  pointer-events:none; /* il click va all'<a> */
}

.media-gallery-image img,
.media-gallery-item video,
.media-gallery-item .media-gallery-file-icon{
  outline:none;
}
.media-gallery-image:hover img,
.media-gallery-item:hover video,
.media-gallery-item:hover .media-gallery-file-icon{
  outline:3px solid #99c2d9; //#00498a;
}


.media-gallery-item .media-gallery-map-preview{
  outline:none;
}
.media-gallery-item:hover .media-gallery-map-preview{
  outline:3px solid #99c2d9;
}



.media-gallery-file-icon,
.media-gallery-map-icon{
  display:flex;
  align-items:center;
  justify-content:center;
  background:#f4f4f4;
  color:#00498a;
  font-weight:700;
}


.media-gallery-meta{
  display:flex;
  align-items:center;
  gap:6px;
}

.media-gallery-meta .chat-tool-icon{
  width:16px;
  height:16px;
  flex:none;
}

.media-gallery-meta small{
  margin:0;
  line-height:1;
}

.modal-confirm-content{
  padding:24px 20px;
  text-align:center;
}

.modal-confirm-text{
  margin:0 0 24px;
  font-size:16px;
  line-height:1.5;
  color:#2f2f2f;
}

.modal-confirm-actions{
  display:flex;
  justify-content:center;
  gap:12px;
}

.modal-confirm-actions button{
  min-width:120px;
  padding:10px 18px;
  border:none;
  border-radius:8px;
  font-size:15px;
  font-weight:600;
  cursor:pointer;
  transition:background .2s, opacity .2s;
}

.modal-confirm-actions button:hover{
  opacity:.92;
}

.modal-confirm-actions button[data-action="open-annulla"]{
  background:#e5e7eb;
  color:#2f2f2f;
}

.modal-confirm-actions button[data-action="open-conferma"]{
  background:#0e5861;
  color:#fff;
}

.modal-confirm-actions button[data-action="check-close"]{
  background:#b63b39;
  color:#fff;
}


.modal-confirm-actions button[data-action="open-forward-confirmation"]{
  background:#0e5861;
  color:#fff;
}


/* users page */

.admin-users-page{
  padding:20px;
  width:100%;
}

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

.admin-users-header h1{
  margin:0;
  color:#00498a;
  font-size:24px;
}

.admin-users-header p{
  margin:4px 0 0;
  color:#667;
  font-size:14px;
}

.reports-list-search.users-serch-input{
  //padding-left:0px;
  
}

.reports-list-search.users-serch-input input{
  min-width: 350px;
  
}


/*
.admin-users-table-wrap{
  background:#fff;
  border:1px solid #e1e6ee;
  border-radius:14px;
  overflow:hidden;
  
}
*/

.admin-users-table-wrap{

  width:85%;

  max-height:calc(100vh - 220px);

  overflow-y:auto;
  overflow-x:auto;

  background:#fff;
  border:1px solid #e1e6ee;
  border-radius:14px;
  max-height:calc(100vh - 260px);

}



/*
.admin-users-table{
  width:100%;
  border-collapse:collapse;
  font-size:14px;
  border-radius:14px;
}
*/

.admin-users-table{

  width:100%;
  border-collapse:collapse;

}

.admin-users-table thead th{

  position:sticky;
  top:0;
  z-index:5;

  background:#f7f9fc;

}

.admin-users-table th,
.admin-users-table td{
  padding:13px 14px;
  border-bottom:1px solid #eef2f6;
  text-align:left;
}

.admin-users-table th{
  background:#e6f0fa; //#f7f9fc;
  color:#00498a;
  font-weight:700;
}

.user-status{
  display:inline-flex;
  padding:4px 9px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  width:100px;
  justify-content:center;
  align-items:center;
}

.user-status.active{
  color:#137333;
  background:#e6f4ea;
}

.user-status.inactive{
  color:#9a3412;
  background:#ffedd5;
}


.user-action-btn.groups{
  padding:9px 11px;
  background:#00498a;
}

.user-action-btn.groups:hover{
  opacity: 0.8;
}

/*
.user-action-btn{
  border:0;
  border-radius:9px;
  //padding:8px 11px;
  padding:9px 14px;
  font-weight:700;
  cursor:pointer;
  color:#fff;
  background:#00498a;
  width: 114px; 
}

.user-action-btn.deactivate{
  background:#9a3412;
}

.user-action-btn.activate{
  background:#004f57;
}

.user-action-btn:disabled{
  opacity:.55;
  cursor:not-allowed;
}
*/



.admin-users-loader,
.admin-users-empty{
  padding:18px;
  text-align:center;
  color:#667;
}

.hidden{
  display:none;
}


/*
@media(max-width:700px){
  .admin-users-header{
    flex-direction:column;
  }

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

  .admin-users-table{
    min-width:720px;
  }
}
*/

.admin-users-toolbar{
    display:flex;
    align-items:center;
    gap:12px;
}

.users-serch-input{
    flex:1;
}

.admin-btn-primary{

    height:42px;
    padding:0 18px;

    border:1px solid #b8d0e8;
    border-radius:999px;

    background:#eef5fb;
    color:#00498a;

    font-weight:600;
    cursor:pointer;

    white-space:nowrap;

    transition:.2s;
}

.admin-btn-primary:hover{

    background:#e2eef9;
    border-color:#8fb8dd;

}

/* groups add form */
.admin-form{
    padding:20px;
    width:100%;
    
}

.admin-form-row{
    margin-bottom:18px;
}

.admin-form-row label{

    display:block;

    margin-bottom:6px;

    font-size:13px;
    font-weight:600;

    color:#00498a;
    
    text-align:left;

}

.admin-form-row input,
.admin-form-row input[type="text"],
.admin-form-row textarea{

    width:100%;

    padding:10px 12px;

    border:1px solid #d7e2ec;
    border-radius:10px;

    background:#f8fafc;

    outline:none;

    transition:.2s;
    font-size:15px !important;
    

}

.admin-form-row input:focus,
.admin-form-row textarea:focus{

    border-color:#8fb8dd;

    box-shadow:
        0 0 0 2px rgba(0,73,138,.12);

}

.admin-form-row textarea{

    resize:vertical;

    min-height:90px;

}

.admin-btn{

    height:42px;
    padding:0 18px;

    border:1px solid #b8d0e8;
    border-radius:999px;
    font-weight:600;
    cursor:pointer;

    white-space:nowrap;

    transition:.2s;
}

.admin-btn-add-form{
    background:#00498a;
    color:#fff;
}

.admin-btn-add-form:hover{

    opacity:0.8;
    border-color:#3C8ACD;

}


.admin-btn-null-form{
    background:#eef5fb;
    color:#00498a;

}

.admin-btn-null-form:hover{
  background:#e2eef9;
    border-color:#8fb8dd;

}



.admin-form-actions{

    display:flex;

    justify-content:center;

    gap:10px;

    margin-top:24px;
}

.admin-form-error{

    min-height:18px;

    margin-top:6px;

    font-size:12px;
    font-weight:500;

    color:#c62828;
    text-align:left;

}

.row-added{

    animation:rowAdded .8s ease;

}

@keyframes rowAdded{

    from{

        background:#e8f5e9;

    }

    to{

        background:transparent;

    }

}


/* LISTA GRUPPI IN USERS */
.admin-user-groups-box{
  padding:18px;
}

.admin-user-groups-title{
  margin-bottom:16px;
  color:#3d5f82;
  font-size:14px;
}

.admin-user-groups-title strong{
  color:#00498a;
}

.admin-user-groups-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.group-check-row{
  display:flex;
  align-items:center;
  gap:12px;

  padding:12px 14px;

  border:1px solid #d7e2ec;
  border-radius:12px;

  background:#f8fafc;

  cursor:pointer;
}

.group-check-input{
  display:none;
}

.group-check-custom{
  width:22px;
  height:22px;

  flex:0 0 22px;

  border:2px solid #b8d0e8;
  border-radius:7px;

  background:#fff;

  position:relative;
}

.group-check-input:checked + .group-check-custom{
  background:#0A5AA3;
  border-color:#0A5AA3;
}

.group-check-input:checked + .group-check-custom::after{
  content:"";

  position:absolute;
  left:6px;
  top:2px;

  width:6px;
  height:12px;

  border:solid #fff;
  border-width:0 2px 2px 0;

  transform:rotate(45deg);
}

.group-check-content{
  display:flex;
  flex-direction:column;
  min-width:0;
}

.group-check-name{
  font-weight:700;
  color:#00498a;
}

.group-check-description{
  margin-top:2px;
  font-size:12px;
  color:#667;
}

.warning{

    padding:12px 16px;

    margin:12px 0;

    border:1px solid #f2c46d;
    border-left:4px solid #e6a400;

    border-radius:8px;

    background:#fff8e6;

    color:#7a5a00;

    font-size:14px;
    line-height:1.5;

}

/* profile */

.profile-page{

    //padding:12px;

}

/*
.admin-users-table-wrap{

  width:85%;

  max-height:calc(100vh - 220px);

  overflow-y:auto;
  overflow-x:hidden;

  background:#fff;
  border:1px solid #e1e6ee;
  border-radius:14px;
  max-height:calc(100vh - 260px);

}
*/

.profile-card{

    width:85%;

    

    max-height:calc(100vh - 220px);

    overflow-y:auto;
    overflow-x:hidden;

    background:#fff;

    border:1px solid #e1e6ee;
    border-radius:14px;

    box-shadow:
        0 8px 20px rgba(0,0,0,.05);
    
    margin:20px 20px 20px 20px;

}
.profile-section{

    padding:24px;

}

.profile-section h3 small{

    font-weight:normal;
    font-size:12px;

}


.profile-section:not(:last-child){

    border-bottom:1px solid #edf2f7;

}

.profile-section h3{

    margin:0 0 18px;

    color:#00498a;

    font-size:18px;

}

.profile-grid{

    display:grid;

    grid-template-columns:repeat(auto-fit,minmax(240px,1fr));

    gap:18px;

}

.profile-field{

    display:flex;

    flex-direction:column;

}

.profile-field label{

    margin-bottom:6px;

    color:#6b7f95;

    font-size:12px;

    font-weight:700;

    text-transform:uppercase;

    letter-spacing:.04em;

}

.profile-field span{

    color:#223548;

    font-size:15px;

}

.profile-badge{

    display:inline-flex;

    //align-items:center;
    align-items:left;

    //justify-content:center;
    justify-content:left;

    width:110px;

    //padding:5px 10px;

    border-radius:999px;

    font-size:12px;

    font-weight:700;

}

.profile-badge.active{

    background:#e9f7ef;

    color:#1d7a44;

}

.profile-badge.inactive{

    background:#fdecec;

    color:#b3261e;

}

/* tabella info */

.info-user-content{
  width:100%;
}

.info-user-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  background:#fff;
  font-size:12px;
}

.info-user-table tr:not(:last-child) th,
.info-user-table tr:not(:last-child) td{
  border-bottom:1px solid #fff;
}

.info-user-table th{
  width:170px;
  padding:4px 8px;
  background:#e6f0fa; //#f5f8fc;
  color:#00498a;
  text-align:left;
  font-weight:normal;
  white-space:nowrap;
  
}

.info-user-table td{
  padding:4px 8px;
  color:#243447;
  word-break:break-word;
  overflow:hidden;
  background:#f5f7fb;
}

.info-user-table tr:nth-child(even) td{
  background:#f5f7fb; //#fbfcfe;
}

/*
.info-user-table tr:hover th,
.info-user-table tr:hover td{
  background:#eef5fd;
}
*/

.empty-chat-state{
  width:100%;
  min-height:220px;

  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;

  padding:28px 20px;
  box-sizing:border-box;

  background:linear-gradient(180deg,#fbfcfe 0%,#f2f5fa 100%);
  border:1px solid #e1e6ee;
  border-radius:8px 8px 0px 0px;

  color:#162446;
  text-align:center;
}

.empty-chat-icon{
  width:64px;
  height:64px;

  display:flex;
  align-items:center;
  justify-content:center;

  border-radius:18px;
  background:#eef4fb;
  color:#00498a;
}

.empty-chat-icon svg{
  width:36px;
  height:36px;
  fill:none;
  stroke:currentColor;
  stroke-width:3;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.empty-chat-title{
  font-size:17px;
  font-weight:700;
  color:#00498a;
}

.empty-chat-text{
  max-width:360px;
  font-size:14px;
  line-height:1.45;
  color:#607086;
}


.btn-delete{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;

  padding:9px 14px;
  border:1px solid #b42318;
  border-radius:10px;

  background:#b42318;
  color:#fff;

  font-size:14px;
  font-weight:600;
  cursor:pointer;

  transition:.18s ease;
}

.btn-delete:disabled{
  background:#b42318;
  border-color:#b42318;
  color:#fff;
  opacity:.55;
  cursor:not-allowed;
  //pointer-events:none;
}

.btn-delete svg{
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.btn-delete:hover{
  background:#931b12;
  border-color:#931b12;
}
.btn-edit{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;

  padding:9px 14px;
  border:1px solid #00498a;
  border-radius:10px;

  background:#00498a;
  color:#fff;

  font-size:14px;
  font-weight:600;
  cursor:pointer;

  transition:.18s ease;
}

.btn-edit svg{
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.btn-edit:hover{
  background:#005aa7;
  border-color:#005aa7;
}

.btn-delete{
  background: #b63b39;
}


.btn-forward{
  display:inline-flex;
  align-items:center;
  gap:8px;

  //padding:10px 16px;

  background:#0b6fb8;
  color:#fff;

  //border:0;
  //border-radius:8px;

  //font-size:14px;
  //font-weight:600;

  cursor:pointer;
  //transition: background-color .2s ease, transform .15s ease;
}

.btn-forward svg{
  width:14px;
  height:14px;
  fill:currentColor;
}

.btn-forward:hover{
  background:#085d9b;
}

.btn-forward:active{
  transform:translateY(1px);
}

.btn-forward:focus-visible{
  outline:3px solid rgba(11,111,184,.3);
  outline-offset:2px;
}

.btn-forward-in-list{
  display: flex;
  align-items: center;
  justify-content: center;

  width: 38px;
  height: 38px;

  margin-left: auto;

  padding: 0;

  background: #0b6fb8;
  color: #fff;

  border: 0;
  border-radius: 8px;

  cursor: pointer;

  transition:
    background-color .2s ease,
    transform .15s ease;
}

.btn-forward-in-list svg{
  width: 18px;
  height: 18px;

  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-forward-in-list:hover{
  background: #095d99;
}

.btn-forward-in-list:active{
  transform: scale(.96);
}

.btn-forward-in-list svg{
  width:14px;
  height:14px;
  fill:currentColor;
}

.btn-forward-in-list:hover{
  background:#085d9b;
}

.btn-forward-in-list:active{
  transform:translateY(1px);
}

.btn-forward-in-list:focus-visible{
  outline:3px solid rgba(11,111,184,.3);
  outline-offset:2px;
}

.administrations-list-header{
  text-align:left;
}

.administrations-list,
.administrations-list-header{
    width:100%;
    box-sizing:border-box;
}

.administrations-list{

  width:100%;

  max-height:calc(100vh - 220px);

  overflow-y:auto;
  overflow-x:hidden;

  background:#fff;
  border:1px solid #e1e6ee;
  border-radius:14px;
  max-height:calc(100vh - 260px);
  
  margin-top:25px;

}

.administrations-list table{
  width:100%;
}

.btn-forward:disabled{
    background:#c8d1dc;
    color:#fff;
    border-color:#c8d1dc;

    cursor:not-allowed;
    opacity:.8;
}


.btn-forward:disabled:hover{
    background:#c8d1dc;
    transform:none;
}

.user-menu-label{
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

svg{
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.report-sharing-layout{
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(16rem, 1fr);
  align-items: start;
}

.report-sharing-panel:first-child{
  padding: 0 1rem 0 0;
}

.report-sharing-panel:last-child{
  padding: 0 0 0 1rem;
}

.report-sharing-panel{
  min-width: 0;
  padding: 0px 0px 0px 0px;
}


.report-sharing-title{
  margin: 0 0 .8rem;
  font-size: 1rem;
  font-weight: 600;
  color: #00498a;
}

.shared-administrations-list{
  display: flex;
  flex-direction: column;
  gap: .65rem;
}


.shared-administration-item{
  padding: .75rem .85rem;
  border: 1px solid #d7e2ec;
  border-radius: .65rem;
  background: #f4f7fb;
}

.shared-administration-name{
  font-weight: 600;
  color: #1e2a35;
}

.shared-administration-group{
  margin-top: .2rem;
  font-size: .85rem;
  color: #647484;
}

.shared-administration-meta{
  margin-top: .35rem;
  font-size: .78rem;
  color: #7a8894;
}

.shared-administration-badge{
  display: inline-flex;
  margin-top: .4rem;
  padding: .18rem .45rem;
  border-radius: 999px;
  font-size: .72rem;
  background: #dceaf5;
  color: #00498a;
}

@media (max-width: 800px){

  .report-sharing-layout{
    grid-template-columns: 1fr;
  }

}

.dashed-right{
  border-right: dashed 1px #00498a;
}

.margin-top-0{
  margin-top:0px;
}

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

.align-center{
  text-align: center;
}

.admin-users-table td.align-center{
  text-align: center;
}

.modal.fit-content .admin-users-table-wrap {
    width: max-content;
    max-width: calc(100vw - 60px);
    overflow-x: auto;
}

.modal.fit-content .admin-users-table {
    width: max-content;
}

.group-users-list-title{
  width:100%;
  padding:0 0 5px;
  padding-right:40px;   /* spazio per la X */
  box-sizing:border-box;
  font-size: 17px;
  color:#00498a;
  text-align:left;
}

.group-users-list-description{
    align-self: stretch;
    text-align: left;
    padding-bottom:15px;
    font-size: 12px;
}

.admin-users-table td {
    text-align: center;
    font-size: 14px;
}

#session-expired-login {
    display: block;
    width: 100%;
    max-width: 260px;

    margin: 24px auto 4px;
    padding: 12px 22px;

    border: 0;
    border-radius: 8px;

    background: #1769aa;
    color: #fff;

    font-size: 15px;
    font-weight: 600;
    letter-spacing: .2px;

    cursor: pointer;

    box-shadow: 0 2px 6px rgba(0, 0, 0, .18);

    transition:
        background-color .15s ease,
        transform .1s ease,
        box-shadow .15s ease;
}

#session-expired-login:hover {
    background: #12568d;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .22);
}

#session-expired-login:active {
    transform: translateY(1px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
}

#session-expired-login:focus-visible {
    outline: 3px solid rgba(23, 105, 170, .3);
    outline-offset: 2px;
}

/* BADGE ACCESSO */

.user-status.enabled {
  background: #dff5e5;
  color: #176b35;
}

.user-status.blocked {
  background: #fde2e2;
  color: #a51d1d;
}

/* BOTTONE BLOCCO */

.user-action-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;

  width:114px;
  padding:9px 14px;

  border:0;
  border-radius:9px;

  font-size:14px;
  font-weight:700;
  color:#fff;

  cursor:pointer;
  transition:.18s ease;
}

.user-action-btn svg{
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
  flex-shrink:0;
}

.user-action-btn.activate{
  //background:#00498a;
  background:#357230;
}

.user-action-btn.activate:hover{
  //background:#005aa7;
  opacity:0.8;
}

.user-action-btn.deactivate{
  background:#b42318;
}

.user-action-btn.deactivate:hover{
  //background:#931b12;
  opacity:0.8;
}

.user-action-btn:disabled{
  opacity:.55;
  cursor:not-allowed;
}


.user-action-btn.enabled {
  //background:#005aa7;
  background:#b42318;
  color: #fff;
}

.user-action-btn.enabled:hover {
  opacity:0.8;
}


.user-action-btn.blocked {
  
  background:#357230;
  color: #fff;
}

.user-action-btn.blocked:hover {
  opacity:0.8;
  
}


.chat-header-btn.is-disabled,
.chat-header-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

/*
.report-action-close.is-disabled {
  opacity: .45;
  cursor: allowed-not;
}
*/

.chat-ownership-mark {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  //margin-left: 8px;
  font-size: 11px;
  font-weight: 600;
  vertical-align: middle;
}

.chat-ownership-mark svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.chat-ownership-mark.is-owner {
  color: #357230;
}

.chat-ownership-mark.is-shared {
  color: #b56a18;
}

.shared-item-container {
/*
  width: 100%;
  //text-align: right;
  //background: #fff;
  //padding: 0px 21px 0px 21px;
  padding-top: 10px 10px 10px 10px;
  background:#fff;
  border-radius: 
  box-sizing: border-box;
  opacity:0.7;
}
*/

  //margin-top: 12px;

  font-size:11px;
  padding:3px 8px;
  border-radius:5px;
  white-space:nowrap;
  margin-top:14px;
  margin-right:10px;
  min-width: 70px;
  text-align:center;
  background:#e8edf2;
}
