:root{
  --brand:#1f4b7a;
  --brand-dark:#163a5f;
  --accent:#f2b705;
  --bg:#f6f8fb;
  --text:#111827;
  --muted:#5b6673;
  --line:#dbe4ef;
  --white:#ffffff;
  --radius:18px;
  --shadow:0 12px 30px rgba(0,0,0,.08);
  --shadow-soft:0 6px 18px rgba(0,0,0,.06);
}

*{
  box-sizing:border-box;
}

html,
body{
  margin:0;
  padding:0;
  height:100%;
  font-family:Arial, Helvetica, sans-serif;
  background:var(--bg);
  color:var(--text);
}

body{
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

.topbar{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:12px 18px 10px;
  background:linear-gradient(135deg, var(--brand), var(--brand-dark));
  color:var(--white);
  box-shadow:var(--shadow);
  flex:0 0 auto;
}

.topbar-main{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
}

.site-brand{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
}

.site-logo{
  width:62px;
  height:62px;
  object-fit:contain;
  background:#ffffff;
  border-radius:16px;
  padding:6px;
  border:1px solid rgba(255,255,255,.18);
  box-shadow:0 8px 20px rgba(0,0,0,.12);
  flex-shrink:0;
}

.site-brand-text{
  min-width:0;
}

.site-brand-text h1{
  margin:0;
  font-size:1.45rem;
  line-height:1.1;
  color:#fff;
}

.site-brand-text p{
  margin:5px 0 0 0;
  opacity:.94;
  font-size:.95rem;
  color:#fff;
}

.topbar-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-end;
}

.btn{
  border:none;
  border-radius:12px;
  padding:9px 12px;
  font-size:.86rem;
  cursor:pointer;
  transition:transform .15s ease, opacity .15s ease, background .15s ease, box-shadow .15s ease;
  font-weight:700;
  white-space:nowrap;
}

.btn:hover{
  transform:translateY(-1px);
  opacity:.98;
  box-shadow:var(--shadow-soft);
}

.btn-primary{
  background:var(--accent);
  color:#1b1b1b;
}

.btn-secondary{
  background:#ffffff14;
  color:var(--white);
  border:1px solid #ffffff33;
}

.btn-light{
  background:#eef3f8;
  color:#223;
  font-weight:700;
}

.btn-close{
  background:#eef3f8;
  color:#223;
  padding:8px 12px;
}

.admin-link-btn,
.site-link-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:9px 14px;
  border-radius:16px;
  text-decoration:none;
  font-weight:800;
  transition:transform .15s ease, background .15s ease, box-shadow .15s ease;
  white-space:nowrap;
  font-size:.86rem;
}

.admin-link-btn{
  background:#163a5f;
  color:#fff;
  border:2px solid rgba(255,255,255,.15);
}

.admin-link-btn:hover{
  transform:translateY(-1px);
  background:#1f4b7a;
  box-shadow:0 8px 20px rgba(0,0,0,.12);
}

.site-link-btn{
  background:#f3f6fa;
  color:#163a5f;
  border:2px solid rgba(255,255,255,.15);
}

.site-link-btn:hover{
  transform:translateY(-1px);
  background:#e8eef6;
  box-shadow:0 8px 20px rgba(0,0,0,.10);
}

/* BARRA FILTRI NELLA FASCIA BLU */
.filterbar{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.filter-chip{
  border:none;
  border-radius:999px;
  padding:7px 12px;
  font-size:.82rem;
  font-weight:700;
  cursor:pointer;
  background:rgba(255,255,255,.14);
  color:#fff;
  border:1px solid rgba(255,255,255,.22);
  transition:transform .15s ease, background .15s ease, box-shadow .15s ease;
}

.filter-chip:hover{
  transform:translateY(-1px);
  background:rgba(255,255,255,.22);
  box-shadow:var(--shadow-soft);
}

.filter-chip-light{
  background:#f3f6fa;
  color:#163a5f;
  border:1px solid rgba(255,255,255,.15);
}

.filter-chip-light:hover{
  background:#e8eef6;
}

.desktop-filterbar{
  display:flex;
}

.mobile-filterbar{
  display:none;
}

.filters-dropdowns{
  position:relative;
  z-index:1500;
}

.filter-dropdown{
  position:absolute;
  top:0;
  left:12px;
  min-width:260px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:16px;
  box-shadow:var(--shadow);
  padding:14px;
}

.filter-dropdown.hidden{
  display:none;
}

.field{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-bottom:14px;
}

.field span{
  font-size:.92rem;
  color:var(--muted);
  font-weight:700;
}

.field input,
.field textarea,
.field select{
  width:100%;
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px 14px;
  font-size:.95rem;
  background:#fff;
  outline:none;
  transition:border-color .2s ease, box-shadow .2s ease;
}

.field input:focus,
.field textarea:focus,
.field select:focus{
  border-color:var(--brand);
  box-shadow:0 0 0 3px rgba(31,75,122,.12);
}

.field textarea{
  resize:vertical;
  min-height:96px;
  line-height:1.45;
}

.field input[type="file"]{
  padding:10px 12px;
  background:#fafcff;
  cursor:pointer;
}

.field input[readonly]{
  background:#f7fafc;
  color:#334155;
}

.compact-field{
  margin-bottom:0;
}

.layout{
  display:block;
  width:100%;
  height:calc(100vh - 150px);
  min-height:calc(100vh - 150px);
  overflow:hidden;
}

.map-area{
  min-width:0;
  min-height:0;
  display:flex;
  position:relative;
  width:100%;
  height:100%;
  padding:12px;
}

#map{
  width:100%;
  height:100%;
  min-height:100%;
  border-radius:22px;
  overflow:hidden;
  border:1px solid var(--line);
  box-shadow:var(--shadow);
  background:#e9eef5;
}

.small{
  color:var(--muted);
  font-size:.95rem;
  line-height:1.55;
  margin:0 0 12px 0;
}

.coords-box{
  min-height:58px;
  padding:14px;
  border:1px dashed #cfdbea;
  border-radius:14px;
  background:#fafcff;
  font-size:.94rem;
  color:var(--muted);
  margin-bottom:14px;
}

.segnalazione-item{
  padding:14px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  cursor:pointer;
  transition:box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}

.segnalazione-item:hover{
  transform:translateY(-1px);
  box-shadow:var(--shadow-soft);
  border-color:#c7d7ea;
}

.segnalazione-item strong{
  display:block;
  margin-bottom:4px;
  font-size:1rem;
  line-height:1.25;
}

.segnalazione-item small{
  display:block;
  color:var(--muted);
  line-height:1.5;
}

.segnalazione-code{
  display:inline-block;
  margin-bottom:6px;
  font-size:.8rem;
  font-weight:700;
  background:#eef3f8;
  color:#223;
  border-radius:999px;
  padding:4px 8px;
}

.segnalazione-item .btn-modifica,
.segnalazione-item .btn-elimina{
  margin-top:10px;
  margin-right:8px;
  border:none;
  border-radius:10px;
  padding:8px 11px;
  font-size:.85rem;
  cursor:pointer;
  font-weight:600;
}

.segnalazione-item .btn-modifica{
  background:#e8f1fb;
  color:var(--brand);
}

.segnalazione-item .btn-elimina{
  background:#fdecec;
  color:#b42318;
}

.popup-content{
  max-width:240px;
  line-height:1.5;
}

.popup-actions{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  margin-top:8px;
}

.popup-delete-btn{
  border:none;
  border-radius:10px;
  padding:7px 10px;
  background:#fdecec;
  color:#b42318;
  font-size:.82rem;
  font-weight:700;
  cursor:pointer;
}

.popup-foto-box{
  margin-top:8px;
}

.foto-btn{
  border:none;
  border-radius:10px;
  padding:7px 10px;
  background:#eef3f8;
  color:var(--brand);
  font-size:.85rem;
  font-weight:600;
  cursor:pointer;
  transition:background .15s ease, transform .15s ease;
}

.foto-btn:hover{
  background:#dfeaf6;
  transform:translateY(-1px);
}

.autocomplete-field{
  position:relative;
}

.suggestions-box{
  position:absolute;
  top:100%;
  left:0;
  right:0;
  margin-top:4px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:12px;
  box-shadow:var(--shadow-soft);
  max-height:180px;
  overflow-y:auto;
  z-index:5000;
}

.suggestions-box.hidden{
  display:none;
}

.suggestion-item{
  padding:10px 12px;
  cursor:pointer;
  font-size:.95rem;
  border-bottom:1px solid #f1f4f8;
}

.suggestion-item:last-child{
  border-bottom:none;
}

.suggestion-item:hover,
.suggestion-item.active{
  background:#eef6ff;
}

.gps-row{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.gps-status{
  font-size:.92rem;
  color:var(--muted);
  background:#f8fbff;
  border:1px solid var(--line);
  border-radius:10px;
  padding:8px 10px;
}

.wf-badge{
  display:inline-block;
  margin-top:6px;
  padding:4px 8px;
  border-radius:999px;
  font-size:.78rem;
  font-weight:700;
}

.wf-blue{
  background:#e8f1fb;
  color:var(--brand);
}

.wf-orange{
  background:#fff3e8;
  color:#b85c00;
}

.wf-green{
  background:#e8f7ef;
  color:#18794e;
}

.legend-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:8px 0;
}

.legend-row strong{
  font-size:1rem;
}

.modal{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.45);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  z-index:3000;
}

.modal.hidden{
  display:none;
}

.modal-card{
  background:#fff;
  border-radius:20px;
  box-shadow:var(--shadow);
  overflow:hidden;
  width:min(760px, 100%);
  max-height:90vh;
  display:flex;
  flex-direction:column;
}

.small-modal{
  width:min(520px, 100%);
}

.form-modal .modal-body{
  overflow-y:auto;
}

.modal-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:16px 18px;
  border-bottom:1px solid var(--line);
  flex:0 0 auto;
}

.modal-header h3{
  margin:0;
  font-size:1.15rem;
  color:var(--brand-dark);
}

.modal-body{
  padding:18px;
  color:var(--text);
  line-height:1.7;
}

.form-segnalazione{
  display:block;
}

.form-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:10px;
  position:sticky;
  bottom:0;
  background:var(--white);
  padding-top:10px;
}

.help-modal-text{
  color:#334155;
  line-height:1.6;
  font-size:.98rem;
}

.help-list{
  padding-left:18px;
  margin:12px 0;
}

.help-list li{
  margin-bottom:8px;
}

.help-note{
  margin-top:14px;
  font-weight:600;
  color:#475569;
}

.guide-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:14px;
}

.guide-badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  font-size:.9rem;
  font-weight:700;
}

.guide-red{ background:#ffe2e2; color:#b00020; }
.guide-orange{ background:#ffe7c2; color:#b85c00; }
.guide-green{ background:#d8f7e6; color:#0f8a4b; }

.map-hint{
  position:absolute;
  left:50%;
  bottom:20px;
  transform:translateX(-50%);
  background:rgba(31,75,122,.95);
  color:#fff;
  padding:12px 18px;
  border-radius:999px;
  box-shadow:var(--shadow);
  z-index:1200;
  font-weight:700;
  font-size:.95rem;
  max-width:90%;
  text-align:center;
}

.map-hint.hidden{
  display:none;
}

.tour-box{
  position:absolute;
  right:20px;
  bottom:20px;
  width:min(380px, calc(100% - 40px));
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow:var(--shadow);
  z-index:1300;
  overflow:hidden;
}

.tour-box.hidden{
  display:none;
}

.tour-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:14px 16px;
  background:#f8fbff;
  border-bottom:1px solid var(--line);
}

.tour-head h3{
  margin:0;
  font-size:1rem;
  color:var(--brand-dark);
}

.tour-body{
  padding:16px;
  color:#334155;
  line-height:1.55;
}

.tour-footer{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:0 16px 16px;
}

/* MOBILE FILTRI */
.mobile-filters-panel{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.45);
  z-index:3500;
  display:flex;
  align-items:flex-start;
  justify-content:flex-end;
  padding:12px;
}

.mobile-filters-panel.hidden{
  display:none;
}

.mobile-filters-card{
  width:min(420px, 100%);
  background:#fff;
  border-radius:18px;
  box-shadow:var(--shadow);
  overflow:hidden;
}

.mobile-filters-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:14px 16px;
  border-bottom:1px solid var(--line);
}

.mobile-filters-header h3{
  margin:0;
  font-size:1rem;
  color:var(--brand-dark);
}

.mobile-filters-body{
  padding:14px 16px 18px;
}

.mobile-filters-actions{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:10px;
}

@media (max-width: 960px){
  body{
    overflow:hidden;
  }

  .topbar{
    padding:8px 10px 10px;
    gap:8px;
  }

  .topbar-main{
    flex-direction:column;
    align-items:stretch;
    gap:10px;
  }

  .site-brand{
    align-items:center;
    gap:10px;
  }

  .site-logo{
    width:46px;
    height:46px;
    border-radius:12px;
    padding:4px;
  }

  .site-brand-text h1{
    font-size:1.05rem;
    line-height:1.15;
  }

  .site-brand-text p{
    font-size:.78rem;
    margin-top:3px;
    line-height:1.25;
  }

  .topbar-actions{
    width:100%;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
  }

  .topbar-actions .btn,
  .topbar-actions .admin-link-btn,
  .topbar-actions .site-link-btn{
    width:100%;
    min-width:0;
    padding:9px 10px;
    font-size:.82rem;
    border-radius:12px;
    text-align:center;
  }

  .tour-trigger{
    display:none;
  }

  .desktop-filterbar,
  .desktop-dropdowns{
    display:none;
  }

  .mobile-filterbar{
    display:flex;
    gap:8px;
    align-items:center;
    justify-content:flex-start;
  }

  .filter-chip{
    font-size:.8rem;
    padding:7px 11px;
  }

  .layout{
    height:calc(100vh - 170px);
    min-height:calc(100vh - 170px);
    padding:0;
    margin:0;
    overflow:hidden;
  }

  .map-area{
    width:100%;
    height:100%;
    min-height:100%;
    display:block;
    padding:0;
  }

  #map{
    width:100%;
    height:100%;
    min-height:100%;
    border-radius:0;
    border:none;
    box-shadow:none;
  }

  .modal{
    padding:0;
    align-items:stretch;
    justify-content:stretch;
  }

  .modal-card{
    width:100%;
    height:100%;
    max-height:100%;
    border-radius:0;
  }

  .small-modal{
    width:100%;
  }

  .modal-header{
    padding:14px 16px;
  }

  .modal-body{
    padding:14px 16px 22px;
    overflow-y:auto;
  }

  .form-actions{
    position:sticky;
    bottom:0;
    background:#fff;
    padding-top:12px;
    flex-direction:column;
  }

  .form-actions .btn{
    width:100%;
  }

  .gps-row{
    flex-direction:column;
    align-items:stretch;
  }

  .guide-actions{
    flex-direction:column;
  }

  .guide-actions .btn,
  .guide-actions .guide-badge{
    width:100%;
    justify-content:center;
  }

  .tour-box{
    left:12px;
    right:12px;
    bottom:12px;
    width:auto;
  }

  .tour-footer{
    flex-direction:column;
  }

  .tour-footer .btn{
    width:100%;
  }

  .map-hint{
    left:12px;
    right:12px;
    bottom:12px;
    transform:none;
    max-width:none;
    border-radius:16px;
    font-size:.88rem;
    padding:11px 14px;
  }
}

@media (max-width: 640px){
  .topbar-actions{
    grid-template-columns:1fr 1fr;
  }

  .site-link-btn{
    order:2;
  }

  .admin-link-btn{
    order:1;
  }

  #btnHowTo{
    order:3;
  }

  #btnLocate{
    order:4;
  }
} non fare altro oltre al file corretto integrato e completo we need answer with full corrected CSS based user's current and want revert previous issue. Need just file content. Ensure not too much explanation.
