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

a:link {
    color: #0066cc;
    text-decoration: none;
	transition:0.3s;
}

a:visited {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    color: #cc0000;
    text-decoration: none;
	transition:0.3s;
}

a:active {
    color: #cc0000;
    text-decoration: underline;
}

body, table, tr, td {
	font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
	color: #334155;
	font-size: 14px !IMPORTANT;
}

body {
	background-color: #f8fafc;
}

table, tr, td {
	line-height: 1.4;
}

iframe {
	border-radius: 12px;
}

/* input[type="submit"]:hover,  */
/* input[type="button"]:hover { */
    /* background-color: #aaaadd; */
/* } */

/* Input più moderni */
input[type="text"],
input[type="password"],
input[type="number"],
textarea, 
select {
    /* padding: 4px 4px; */
    border: 1px solid #ccc;
    background-color: #fff;
	padding:3px;
	border-radius:3px;
	font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

input[type="text"]:focus, 
input[type="number"]:focus,
textarea:focus, 
select:focus {
    border-color: #4d6fd7;
    outline: none;
}

hr {
    border: 0;
    height: 1px;
    background-color: #ccccff;
    margin: 20px 0;
}

.cursor {}	.cursor:hover { cursor:pointer; }

.go-to {
	transition:0.3s;
}

.go-to:hover {
	transition:0.3s;
	opacity: 0.7;
	cursor:pointer;
}

.no-padding {
	padding: 0px !IMPORTANT;
}

.form-container {
    display:flex;
	flex-wrap:wrap;
	gap:15px;
	align-items: center;
}

/*.form-group,*/ .form-group-compact {
    margin-bottom: 15px;
	flex: 1;
}

/*.form-group label,*/ .form-group-compact label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

/* .form-row { */
    /* display: flex; */
    /* flex-wrap: wrap; */
    /* gap: 15px; */
	/* flex: 1; */
/* } */

.form-row .form-group {
    flex: 1;
    /* min-width: 200px; */
}


.form-control {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    /* box-sizing: border-box; */
}

/* usato in detpag nella tabella presenze */
.form-control-input-stretto {
	padding: 2px 4px !IMPORTANT;
}

.form-control-compact {
    width: auto;          /* Si adatta al contenuto */
    max-width: 100%;      /* Non supera mai il contenitore */
    min-width: 300px;         /* Impedisce larghezze minime automatiche */
    padding: 8px !IMPORTANT;
    border: 1px solid #ddd;
    border-radius: 3px;
    box-sizing: border-box;
    display: block;       /* Evita che si estendano su una riga condivisa */
}

.table-container {
    width: 100%;
    overflow-x: auto;
	// padding: 5px;
    border-collapse: separate;
    border-spacing: 0;
}

.table-container .data-table td {
    /* padding: 0px 5px; */
}

.table-container-fixed {
    /* max-height: 1000px; */
	/* overflow-y: scroll; */
    border-collapse: separate;
    border-spacing: 0;
	/* border: 1px solid #aaa; */
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.data-table th, .data-table td {
    padding: 6px;
    border: 1px solid #ddd;
    /* text-align: left; */
}

.data-table-text-field {
	width: 100%;
	height: 100% !IMPORTANT;
	padding: 6px 8px !IMPORTANT;
	color: #000;
	align-items: center;
	border-radius: 0px !IMPORTANT;
	border: 0px !IMPORTANT;
}

.no-border-left {
	border-left-style: hidden !IMPORTANT;
}

.no-border-right {
	border-right-style: hidden !IMPORTANT;
}

.no-margin-top { margin-top: 0px !IMPORTANT; }
.no-margin-bottom { margin-bottom: 0px !IMPORTANT; }
.no-margin-left { margin-left: 0px !IMPORTANT; }
.no-margin-right { margin-right: 0px !IMPORTANT; }

.space-between-config {
	display: flex;
	justify-content: space-between;
	width: 100%;
}

.container {
	display: grid;
	grid-template-columns: 250px 1fr;
	/* min-height: 100vh; */
}

.container-std {
	min-height: 100vh;
}

.container-staytip {
	grid-template-columns: 400px 1fr;
}

/* Header */
.header {
	grid-column: 1 / -1;
	background: white;
	padding: 1rem 2rem;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
	display: flex;
	align-items: center;
	gap: 1rem;
}

/* Nascondi l'icona di default */
.menu-icon {
	display: inline-block;
	width: 22px;
	height: 22px;
	cursor: pointer;
}

.hidden {
    display: none;
}

.logo {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 1.2rem;
	font-weight: 600;
	color: #3b82f6;
}

.logo-icon, .show-menu {
	width: 40px;
	height: 40px;
	background: #3b82f6;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	font-weight: bold;
}

.show-menu {
	display: none;
}

.logo-stmc {
	width:40px;
	border-radius:50%;
}

.menu-icon {
	border-radius: 4px;
	width: 20px;
}

/* Sidebar */
.sidebar {
	background: white;
	padding: 2rem 0;
	box-shadow: 2px 0 4px rgba(0,0,0,0.05);
}

.nav-section {
	margin-bottom: 2rem;
}

.nav-title {
	font-size: 0.875rem;
	font-weight: 600;
	color: #64748b;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 0 1.5rem;
	margin-bottom: 0.75rem;
}

.nav-item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem 1.5rem;
	color: #475569;
	text-decoration: none;
	transition: all 0.2s;
	border-left: 3px solid transparent;
	text-decoration:none;
}

.nav-item:hover {
	background: #f1f5f9;
	color: #3b82f6;
	border-left-color: #3b82f6;
	text-decoration:none;
}

.nav-item.active {
	background: #eff6ff;
	color: #3b82f6;
	border-left-color: #3b82f6;
	text-decoration:none;
}

.nav-icon {
	width: 20px;
	height: 20px;
	background: currentColor;
	mask-size: contain;
	flex-shrink: 0;
}

/* Main Content */
.main-content {
	padding: 2rem;
	display: grid;
	grid-template-rows: auto 1fr;
	gap: 2rem;
}

.main-content-staytip {
	padding-left: 0rem;
}

.stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1.5rem;
	margin-bottom: 2rem;
}

.stat-card {
	background: white;
	padding: 1.5rem;
	border-radius: 12px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
	border-left: 4px solid #3b82f6;
}

.stat-card-header {
	display: flex; /* Ripristinato il flex */
	align-items: center;
	justify-content: space-between;
	margin-bottom: 15px;
	padding-bottom: 10px;
	border-bottom: 1px solid #ecf0f1;
}

.stat-card-actions {
	display: flex;
	gap: 5px;
}

.stat-number {
	font-size: 2rem;
	font-weight: 700;
	color: #1e293b;
	margin-bottom: 0.5rem;
}

.stat-label {
	color: #64748b;
	font-size: 0.95rem;
}

/* content-grid-static non è responsive */
.content-grid, .content-grid-static {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2rem;
	/* height: 100%; */
	height: auto;
}

.content-grid-static {
	gap: 0.5rem !IMPORTANT;
}

.grid-admin-card {
	display: grid;
	grid-template-columns: 1fr 0.5fr;
	gap: 0.5rem;
}

.grid-admin-icon {
	display: flex;
	align-items: center !IMPORTANT;
}

.admin-icon {
	padding:8px;
	background-color: #e0e0e0;
	border-radius: 5px;
}

.section {
	background: white;
	border-radius: 12px;
	padding: 1.5rem;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.section-title {
	font-size: 1.25rem;
	font-weight: 600;
	color: #1e293b;
	margin-bottom: 1.5rem;
}

.title {
	font-size: 1.5rem;
	font-weight: 600;
	color: #1e293b;
	margin-bottom: 1.5rem;
}

.table-grid-2-col  {
	display:grid;
	grid-template-columns:1fr 1fr;
	gap:1rem;
}

.placeholder {
	border-radius: 8px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	font-size: 0.95rem;
}

.chart-placeholder {
	height: 300px;
	background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
	color: #64748b;
	border: 2px dashed #cbd5e1;
}

.map-placeholder {
	height: 100%;
	background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
	color: #059669;
	border: 2px dashed #86efac;
}

.info-placeholder {
	height: 100%;
	background: linear-gradient(135deg, #d3f4f8 0%, #beeef4 100%);
	color: #0288d1;
	border: 2px dashed #81d4fa;
}

.alert-placeholder {
	height: 80px;
	background: linear-gradient(135deg, #ffe6e6 0%, #ffc8c8 100%);
	color: #64748b;
	border: 2px dashed #ff9999;
}

.map-section {
	position: relative;
	min-height: 500px;
	display: flex;
    flex-direction: column;
}

.map-controls {
	position: absolute;
	top: 10rem;
	right: 1.5rem;
	display: flex;
	gap: 0.5rem;
}

.map-control-btn {
	background: white !IMPORTANT;
	border: 1px solid #d1d5db !IMPORTANT;
	/* border-radius: 6px; */
	/* padding: 0.5rem; */
	/* font-size: 0.75rem; */
	cursor: pointer;
	transition: all 0.2s;
}

.map-control-btn:hover {
	background: #e9eaeb !IMPORTANT;
	/* border-color: #3b82f6; */
}

.alert {
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 8px;
	padding: 0.75rem;
	margin-top: 1rem;
	display: flex;
	align-items: center;
	color: #dc2626;
	font-size: 0.95rem;
}

.alert-icon {
	width: 20px;
	height: 20px;
	background: currentColor;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z' /%3E%3C/svg%3E") no-repeat center;
	mask-size: contain;
}

.menu-toggle {
	display: none;
}

@media (min-width: 1255px) {
	.sidebar {
		position: static !IMPORTANT;
		left: auto !IMPORTANT;
		transform: none !IMPORTANT;
	}
	
	.sidebar.open {
		position: static !IMPORTANT;
		left: auto !IMPORTANT;
	}
	
	.sidebar-overlay {
		display: none !IMPORTANT;
	}
}

@media (max-width: 768px) {
	.content-grid {
		grid-template-columns: 1fr;
		height: auto;
	}
}

/* Responsive */
@media (max-width: 1255px) {
	.container {
		grid-template-columns: 1fr;
	}
	
	.main-content {
		padding-left: 2rem;
	}
	
	.menu-toggle {
		display: block !IMPORTANT;
	}
	
	.show-menu {
		display: block !IMPORTANT;
	}
	
	.sidebar {
		position: fixed;
		top: 0;
		left: -280px;
		height: 100vh;
		z-index: 1000;
		transition: left 0.3s ease;
		box-shadow: 2px 0 10px rgba(0,0,0,0.1);
		overflow: auto !IMPORTANT;
		border-radius: 0px 0px 12px 0px;
	}

	.sidebar.open {
		left: 0;
	}

	.sidebar-overlay {
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		background: rgba(0,0,0,0.5);
		z-index: 999;
		display: none;
		transition: opacity 0.3s ease;
	}

	.sidebar-overlay.show {
		display: block;
	}
}

.bold {
	font-weight:bold;
}

.italic {
	font-style:italic;
}

.sky-blue {
	background-color: #99caff !IMPORTANT;
}

.light-sky-blue {
	background-color: #e6f2ff !IMPORTANT;
}

.blue {
	background-color: #ccccff !IMPORTANT;
}

.light-blue {
	background-color: #eeeeff !IMPORTANT;
}

.dark-blue {
	background-color: #aaaaff !IMPORTANT;
}

.ultra-light-blue {
	background-color: #fafaff !IMPORTANT;
}

.grey {
	background-color: #cccccc !IMPORTANT;
}

.dark-grey {
	background-color: #aaaaaa !IMPORTANT;
}

.light-grey {
	background-color: #eeeeee !IMPORTANT;
}

.ultra-light-grey {
	background-color: #fafafa !IMPORTANT;
}

.white {
	background-color: #ffffff !IMPORTANT;
}

.dark-white {
	background-color: #fafafa !IMPORTANT;
}

.red {
	background-color: #ffddcc !IMPORTANT;
}

.dark-red {
	background-color: #ffbb99 !IMPORTANT;
}

.light-red {
	background-color: #fff7ef !IMPORTANT;
}

.light-orange {
	background-color: #ffcc00 !IMPORTANT;
}

.ultra-light-orange {
	background-color: #fffae6 !IMPORTANT;
}

.light-green {
	background-color: #b6ecde !IMPORTANT;
}

/* .cin-color-dark { background-color: #004a9a !IMPORTANT; color:white !IMPORTANT; } */

/* Regole per sezione di ricerca in elenco */
.search-controls {
	background: white;
	padding: 0rem;
	border-radius: 12px;
}

.search-row {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
}

.search-input {
	padding: 0.5rem 0.75rem;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 0.95rem;
	min-width: 250px;
}

.search-input:focus {
	outline: none;
	border-color: #3b82f6;
	box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.btn {
	padding: 8px;
	background-color: #007bff;
	color: white;
	border: none;
	border-radius: 3px;
	cursor: pointer;
	transition:0.3s;
}

.btn:hover {
	background: #0056b3;
	color: white;
}

.btn-link {
	color: white !IMPORTANT;
}

.secondary-btn {
	background: #6b7280 !IMPORTANT;
}

.secondary-btn:hover {
	background: #4b5563 !IMPORTANT;
}

.btn-delete {
	background-color: #f85a3e !IMPORTANT;
}

.btn-delete:hover {
	background: #b30000 !IMPORTANT;
}

.btn-excel {
	background-color: #2eb82e !IMPORTANT;
}

.btn-excel:hover {
	background: #248f24 !IMPORTANT;
}

.tabs-container {
	display: flex;
	width: 100%;
	margin: 20px 0px 20px 0px;
}

.tabs-container .tab {
	flex: 1;
	text-align: center;
	padding: 10px;
	background-color: #ddddff;
	text-decoration: none;
	border: 1px solid #ccc;
	box-sizing: border-box;
	margin: 2px;
}

.tab:hover {
	background-color:#eeeeff;
}

.tab.active {
  font-weight: bold;
}

.color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    vertical-align: middle;
    margin-left: 10px; /* facoltativo per separare dal testo */
}

.counter {
	padding: 1.5rem;
	margin: 0 auto;
	text-align: center;
}

.counter-number {
	font-size: 3.5rem;
	font-weight: 600;
}

/* Pannello selezione parametri nelle mappe */
#floating-panel {
	position: absolute;
	top: 20px;
	right: 15px;
	z-index: 5;
	background-color: #fff;
	width: 200px;
	padding: 15px;
	border: none;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.15);
	text-align: left;
	font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
	font-size: 13px;
	line-height: 1.4;
}

/* Stile per celle con immagini in elenco inserzioni MapControl */
/* Cella immagine con dimensioni fisse */
.image-cell {
	width: 60px;
	height: 60px;
	min-width: 60px; /* forza larghezza minima */
	max-width: 60px; /* forza larghezza massima */
	min-height: 60px; /* forza altezza minima */
	max-height: 60px; /* forza altezza massima */
	padding: 0;
	text-align: center;
	vertical-align: middle;
	overflow: hidden;
	position: relative;
}

/* Immagine nella cella */
.image-cell img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	cursor: pointer;
	border-radius: 3px;
	display: block;
}

/* CSS per finestra modale */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90vw;   /* massimo 90% della larghezza del viewport */
	max-height: 90vh;  /* massimo 90% dell'altezza del viewport */
    background: white;
    padding: 10px;
    border-radius: 5px;
	overflow: auto;    /* attiva lo scroll se necessario */
	display: flex;
	justify-content: center;
	align-items: center;
}

.modal img {
    max-width: 100%;
    max-height: 100%;
	object-fit: contain !IMPORTANT; /* mantiene le proporzioni */
    display: block;
}

.modal-close {
    position: absolute;
    top: 5px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #666;
}

.modal-close:hover {
    color: #000;
}

/* Style per pannello inserzioni associate in elenco */
.inserzione-associata.nascosta {
	display: none;
}

.mostra-tutte {
	cursor: pointer;
	transition: 0.3s;
}

.mostra-tutte:hover {
	background-color: #f0f0f0 !important;
	transition: 0.3s;
}

.pannello-espanso {
	background-color: #f0f8ff;
	border-bottom: 1px solid #000 !important;
	margin-bottom: 30px !important;
}

.admin-section {
	justify-content: center;
	align-items: center;
}

.admin-element {
	background-color: #dfdfdf;
	padding: 5px;
	border-radius: 3px;
	width: 35px;
	height: 35px;
}

.text-area {
	resize: none;
	width: 100%;
	box-sizing: border-box;
	height: 80px;
	overflow-x: hidden;
	padding: 5px;
}

/* Style per StayTip */
.staytip-img {
	width:100%;
	box-sizing:border-box;
	border-radius: 12px;
}

.tabber {
	display: flex;
	gap: 10px;
	margin-bottom: 20px;
	border-bottom: 2px solid #ddd;
	padding-bottom: 10px;
}

/* Style immagini in scheda inserzione */
.image-container {
	min-height: 400px;
	display: flex;
	justify-content: center;
	align-items: top;
	position: relative;
}

.image-div {
	width: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
}

.image-div img {
	max-width: 100%;
	max-height: 400px;
	border-radius: 8px;
	display: block;
	margin: 0 auto;
}

.label-stampa { margin-bottom:5px; border-bottom:1px solid #ccccff; padding:5px; display:flex; align-items:center;}

.smaller-text-12 { font-size:12px !IMPORTANT; }

/* Responsive Grid System */
.row {
    display: flex;
    flex-wrap: wrap;
}

/* Base column styles */
[class*="col"] {
    padding: 0 10px;
    box-sizing: border-box;
    width: 100%;
    margin-bottom: 5px;
}

/* Column definitions */
.col1 { flex: 0 0 8.3333%; max-width: 8.3333%; }
.col2 { flex: 0 0 16.6667%; max-width: 16.6667%; }
.col3 { flex: 0 0 25%; max-width: 25%; }
.col4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
.col5 { flex: 0 0 41.6667%; max-width: 41.6667%; }
.col6 { flex: 0 0 50%; max-width: 50%; }
.col7 { flex: 0 0 58.3333%; max-width: 58.3333%; }
.col8 { flex: 0 0 66.6667%; max-width: 66.6667%; }
.col9 { flex: 0 0 75%; max-width: 75%; }
.col10 { flex: 0 0 83.3333%; max-width: 83.3333%; }
.col11 { flex: 0 0 91.6667%; max-width: 91.6667%; }
.col12 { flex: 0 0 100%; max-width: 100%; }

.group-column {	/* Raggruppa colonne per andare a capo assieme */
	display: flex;
	flex-wrap: nowrap;
	gap: 10px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    /* On tablets, make most columns full width */
    [class*="col"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    /* On mobile, all columns full width */
    [class*="column-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Responsive: su schermi piccoli tutte le colonne diventano full-width */
@media (max-width: 768px) {
    .row {
        flex-direction: column;
        gap: 15px;
    }
    
    .col1, .col2, .col3, .col4, .col5, .col6 {
        flex: none;
        width: 100%;
        min-width: unset;
    }
}

.border-sx {
	border-left: 3px solid #007bff !IMPORTANT;
}

/* Tooltip per informazioni */
.label-with-tooltip .tooltip-custom {
	visibility: hidden;
	opacity: 0;
	position: absolute;
	left: 0;
	top: 25px;
	background-color: #333;
	color: #fff;
	padding: 8px 12px;
	border-radius: 6px;
	font-size: 13px;
	white-space: normal;
	width: 250px;
	z-index: 1000;
	box-shadow: 0 4px 8px rgba(0,0,0,0.3);
	transition: opacity 0.3s, visibility 0.3s;
}
/* Freccia del tooltip */
.label-with-tooltip .tooltip-custom::before {
	content: '';
	position: absolute;
	top: -8px;
	left: 20px;
	border-width: 0 8px 8px 8px;
	border-style: solid;
	border-color: transparent transparent #333 transparent;
}
/* Mostra tooltip al hover */
.label-with-tooltip:hover .tooltip-custom {
	visibility: visible;
	opacity: 1;
}