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

/* --- STEMMA VISTA MESE: Centrato sulla colonna Lunedì --- */
.stemma-month {
	position: absolute;
	top: 35px;
	left: 35px;
	width: clamp(60px, 10vw, 120px);
	height: auto;
	z-index: 5;
	pointer-events: none;
}

/* --- STEMMA VISTA GIORNO: Piccolo e distanziato --- */
.stemma-day {
	position: absolute;
	top: 12px;
	left: 25px;
	width: clamp(55px, 5vw, 65px);
	height: auto;
	z-index: 5;
	pointer-events: none;
}

body {
	font-family: -apple-system, 'Segoe UI', Arial, sans-serif;
	background: #f0f4f0;
	padding: 10px;
	touch-action: manipulation;
}

.container {
	position: relative;
	max-width: 800px;
	margin: 0 auto;
	background: white;
	border-radius: 16px;
	padding: 16px;
	box-shadow: 0 4px 20px rgba(0,0,0,0.1);
	padding-left: 30px;
	padding-top: 25px;
}

header { text-align: center; margin-bottom: 10px; }
header h1 { color: #2d5a27; font-size: 1.8em; }
header p { color: #666; font-size: 0.9em; }

.success { background: #d4edda; color: #155724; padding: 12px; border-radius: 8px; margin-bottom: 12px; }
.error { background: #f8d7da; color: #721c24; padding: 12px; border-radius: 8px; margin-bottom: 12px; }

.date-header {
	text-align: center;
	padding: 12px 0;
	margin-bottom: 25px;
	background: linear-gradient(135deg, #2d5a27, #4a8c3f);
	border-radius: 12px;
	box-shadow: 0 2px 10px rgba(45, 90, 39, 0.3);
}
.date-header h2 {
	color: white;
	font-size: 1.6em;
	font-weight: 700;
	letter-spacing: 0.5px;
	text-shadow: 0 2px 4px rgba(0,0,0,0.2);
	margin: 0;
}

.view-toggle {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	margin-bottom: 15px;
	justify-content: center;
	align-items: stretch;
}
.view-toggle a {
	padding: 8px 14px;
	background: #e8ede8;
	text-decoration: none;
	border-radius: 8px;
	color: #333;
	font-size: 0.9em;
	transition: 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
}
.view-toggle a:hover { background: #d0e0d0; }
.view-toggle a.active { background: #2d5a27; color: white; }

.btn-admin {
	background: #2d5a27;
	color: white;
	border: none;
	padding: 8px 16px;
	border-radius: 8px;
	cursor: pointer;
	font-size: 0.9em;
	transition: 0.2s;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
}
.btn-admin:hover { background: #1d3a18; }

.date-picker-wrapper {
	position: relative;
	display: inline-block;
}
.btn-date-picker,
label.btn-date-picker {
	display: inline-flex;
	background: #17a2b8;
	color: white;
	padding: 8px 14px;
	border-radius: 8px;
	border: none;
	font-size: 0.9em;
	cursor: pointer;
	transition: 0.2s;
	text-align: center;
	text-decoration: none;
	font-family: inherit;
	line-height: 1.4;
	align-items: center;
	justify-content: center;
	min-height: 44px;
}
.btn-date-picker:hover,
label.btn-date-picker:hover {
	background: #138496;
}

.btn-today {
	background: #ffc107;
	color: #333;
	padding: 8px 14px;
	border-radius: 8px;
	text-decoration: none;
	font-size: 0.9em;
	font-weight: bold;
	transition: 0.2s;
	border: none;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
}
.btn-today:hover { background: #e0a800; }

.month-title {
	text-align: center;
	margin-bottom: 15px;
}
.month-title h2 { color: #333; font-size: 1.3em; }

.calendar-grid .weekdays,
.calendar-grid .days {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 5px;
}
.calendar-grid .weekdays div,
.calendar-grid .days .day,
.calendar-grid .days .empty {
	padding: 8px;
	text-align: center;
	border-radius: 6px;
}

.weekdays {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	font-weight: bold;
	color: #555;
	margin-bottom: 6px;
	text-align: center;
	font-size: 0.85em;
}
.weekdays div { padding: 6px; }
.days {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
}

/* ===== VISTA MESE - GIORNI MODIFICATI ===== */

/* Giorni del calendario - versione desktop */
.day {
	padding: 12px 6px;
	text-align: center;
	border-radius: 10px;
	cursor: pointer;
	min-height: 75px;
	height: 75px;
	border: 2px solid transparent;
	font-size: 1em;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	transition: all 0.2s;
}

.day:hover {
	transform: scale(1.03);
	box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Numero del giorno */
.day .day-number {
	display: block;
	font-weight: bold;
	font-size: 1.1em;
	line-height: 1.2;
}

/* Info giorno - occupato: numero ore in rosso, totale in nero */
.day .day-info {
	display: block;
	font-size: 0.75em;
	line-height: 1.2;
	white-space: nowrap;
	min-height: 1.2em;
}

.day .day-info.occupied-text {
	color: #dc3545;
	font-style: italic;
	font-weight: normal;
}

/* Giorni liberi - placeholder invisibile per mantenere altezza */
.day .day-info.free-text {
	color: transparent;
	font-size: 0.75em;
	line-height: 1.2;
	visibility: hidden;
	min-height: 1.2em;
}

/* Totale ore - sempre nero */
.day .day-total {
	color: #000000;
	font-weight: bold;
}

.day.free { background: #e6f5e6; border-color: #8bc98b; }
.day.occupied { background: #fde8e8; border-color: #e8a0a0; }
.day.today { border-color: #2d5a27; border-width: 3px; }
.day.today.free { background: #c8e6c8; }
.day.today.occupied { background: #fcd0d0; }

/* Rimuovi il vecchio stile day small */
.day small { display: none; }

.empty { padding: 10px 4px; }

/* ===== SLOT - STESSO COMPORTAMENTO SU TUTTI GLI SCHERMI ===== */
.slot-grid {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 10px;
}
.slot {
	padding: 12px 16px;
	border-radius: 8px;
	font-weight: 500;
	border: 2px solid transparent;
	display: block;
}
.slot.free {
	background: #e6f5e6;
	border-color: #8bc98b;
	cursor: pointer;
}
.slot.free:hover { transform: scale(1.01); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.slot.occupied {
	background: #fde8e8;
	border-color: #e8a0a0;
	cursor: default;
}
.slot.grey {
	background: #e9ecef !important;
	border-color: #ced4da !important;
	color: #6c757d;
	cursor: not-allowed !important;
	opacity: 0.8;
}
.slot.grey.forced-grey {
	background: #e0e0e0 !important;
	color: #666 !important;
	cursor: not-allowed;
}
.slot.selected {
	background: #2d5a27 !important;
	color: white !important;
	border-color: #1d3a18 !important;
}
.slot.selected .slot-label span { color: white !important; }
.slot .slot-label {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: nowrap;
	gap: 8px;
}
.slot .slot-label span {
	font-weight: normal;
	font-size: 0.85em;
	white-space: nowrap;
}
.slot .slot-label .slot-orario {
	font-weight: 600;
	font-size: 1em;
}
.slot .slot-label .slot-stato {
	font-weight: 500;
}

/* ===== PRENOTAZIONE DETTAGLIO - SU UNA RIGA ===== */
.prenotazione-dettaglio {
	margin-top: 6px;
	padding: 6px 12px;
	background: rgba(255,255,255,0.85);
	border-radius: 6px;
	border-left: 3px solid #2d5a27;
}
.prenotazione-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: nowrap;
	gap: 8px;
}
.prenotazione-nome {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: nowrap;
	font-size: 0.95em;
}
.prenotazione-nome strong { color: #2d5a27; }
.prenotazione-nome .prenotazione-note {
	color: #888;
	font-style: italic;
	font-size: 0.85em;
}
.prenotazione-azioni {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-shrink: 0;
}
.prenotazione-info {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	font-size: 0.85em;
	color: #666;
	margin-top: 2px;
}

.btn-edit {
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
	border-radius: 4px;
	display: inline-flex;
	align-items: center;
}
.btn-edit svg { fill: #ffc107; width: 20px; height: 20px; }
.btn-edit:hover { background: #fff3cd; }

.btn-delete {
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
	border-radius: 4px;
	display: inline-flex;
	align-items: center;
}
.btn-delete svg { fill: #dc3545; width: 20px; height: 20px; }
.btn-delete:hover { background: #f8d7da; }

.selection-display {
	margin-top: 15px;
	padding: 12px;
	background: #f8f9fa;
	border-radius: 8px;
	text-align: center;
	border: 2px dashed #ccc;
}
.selection-display p { color: #666; font-size: 1em; }

.btn-cancel {
	display: inline-block;
	padding: 10px 18px;
	background: #ddd;
	color: #333;
	text-decoration: none;
	border-radius: 8px;
}

.btn-reset {
	display: inline-block;
	padding: 10px 18px;
	background: #ddd;
	color: #333;
	text-decoration: none;
	border-radius: 8px;
	border: none;
	cursor: pointer;
	font-size: 0.9em;
	font-family: inherit;
	transition: 0.2s;
}
.btn-reset:hover {
	background: #ccc;
}

.btn-prenota {
	display: inline-block;
	padding: 10px 18px;
	background: #2d5a27;
	color: white;
	text-decoration: none;
	border-radius: 8px;
}
.btn-prenota:hover { background: #1d3a18; }

.form-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0,0,0,0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 999;
	padding: 20px;
}
.form-popup {
	background: white;
	border-radius: 16px;
	padding: 24px;
	max-width: 500px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.form-popup-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 15px;
	border-bottom: 2px solid #e8ede8;
	padding-bottom: 10px;
}
.form-popup-header h3 { color: #2d5a27; }
.form-popup-close {
	background: #dc3545;
	color: white;
	border: none;
	border-radius: 50%;
	width: 32px;
	height: 32px;
	font-size: 1.2em;
	cursor: pointer;
}
.form-popup-close:hover { background: #b02a37; }

form div { margin-bottom: 12px; }
form label { display: block; font-weight: bold; margin-bottom: 4px; color: #333; font-size: 0.95em; }
form input, form textarea, form select {
	width: 100%;
	padding: 10px;
	border: 2px solid #ddd;
	border-radius: 8px;
	font-size: 1em;
	background: white;
}
form input:focus, form textarea:focus, form select:focus {
	border-color: #2d5a27;
	outline: none;
}
form button {
	background: #2d5a27;
	color: white;
	border: none;
	padding: 12px;
	border-radius: 8px;
	font-size: 1.1em;
	cursor: pointer;
	width: 100%;
}
form button:hover { background: #1d3a18; }

/* ----- MODALE PRENOTAZIONE ----- */
.booking-modal {
	display: none;
	position: fixed;
	top: 0; left: 0;
	width: 100%; height: 100%;
	background: rgba(0,0,0,0.5);
	z-index: 9999;
	overflow-y: auto;
	align-items: center;
	justify-content: center;
}
.booking-modal-content {
	background: #fefefe;
	margin: 5% auto;
	padding: 20px;
	border: 1px solid #888;
	width: 90%;
	max-width: 500px;
	border-radius: 10px;
}
.booking-modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	border-bottom: 2px solid #4CAF50;
	padding-bottom: 10px;
}
.booking-modal-header h3 {
	margin: 0;
	font-size: 24px;
	color: #333;
}
.close-modal {
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
	color: #666;
}
.form-group {
	margin-bottom: 15px;
}
.form-group label {
	display: block;
	margin-bottom: 5px;
	font-weight: bold;
	color: #555;
}
.form-group input,
.form-group textarea {
	width: 100%;
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 5px;
	box-sizing: border-box;
}
.selected-slots-summary {
	background-color: #f0f8f0;
	border: 1px solid #4CAF50;
	border-radius: 5px;
	padding: 10px;
	margin-bottom: 15px;
}
.selected-slots-summary ul {
	list-style: disc;
	padding-left: 20px;
	margin: 5px 0;
}
.modal-date-display {
	text-align: center;
	font-size: 22px;
	font-weight: bold;
	color: #2e7d32;
	margin: 10px 0;
	padding: 10px;
	background-color: #e8f5e9;
	border-radius: 8px;
}
.email-toggle-group {
	margin-bottom: 15px;
	padding: 10px;
	background-color: #f9f9f9;
	border-radius: 5px;
	border: 1px solid #e0e0e0;
}
.toggle-label {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
}
.toggle-label input[type="checkbox"] {
	width: 20px;
	height: 20px;
	accent-color: #4CAF50;
}
.modal-actions {
	display: flex;
	gap: 20px;
	justify-content: center;
	margin-top: 15px;
}

/* ----- PULSANTI MODALE CON SVG - FUNZIONANO SU TUTTI GLI SCHERMI ----- */
.btn-icon {
	background: transparent !important;
	border: none;
	cursor: pointer;
	line-height: 1;
	padding: 10px;
	transition: transform 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
}

.btn-icon:hover,
.btn-icon:active {
	background: transparent !important;
	transform: scale(1.2);
}

.btn-icon svg {
	width: 48px;
	height: 48px;
	transition: all 0.2s;
}

.btn-confirm svg {
	stroke: #2e7d32;
}

.btn-cancel svg {
	stroke: #dc3545;
}

/* ===== RESPONSIVE ===== */
/* Tablet e smartphone grandi */
@media (max-width: 768px) {
	.container {
		max-width: 100%;
		padding: 12px;
		padding-left: 20px;
	}

	.stemma-month {
		width: 80px;
		top: 30px;
		left: 30px;
	}
	.stemma-day {
		width: 55px;
		top: 10px;
		left: 15px;
	}

	.view-toggle {
		flex-wrap: wrap;
		justify-content: center;
	}

	.slot-grid {
		flex-direction: column;
	}
	.slot {
		display: block;
		padding: 12px 16px;
	}
	.slot .slot-label {
		flex-wrap: nowrap;
	}

	/* Giorni tablet - stessa altezza */
	.day {
		min-height: 65px;
		height: 65px;
		padding: 8px 4px;
		gap: 3px;
	}

	.day .day-number {
		font-size: 1em;
	}

	.day .day-info,
	.day .day-info.free-text {
		font-size: 0.7em;
		min-height: 1.2em;
	}

	/* Prenotazione dettaglio su tablet - una riga */
	.prenotazione-row {
		flex-wrap: nowrap;
	}

	/* Pulsanti SVG dimensioni intermedie per tablet */
	.btn-icon svg {
		width: 54px;
		height: 54px;
	}

	.modal-actions {
		gap: 30px;
	}
}

/* Smartphone standard */
@media (max-width: 480px) {
	body { padding: 4px; }
	.container { padding: 8px; border-radius: 12px; padding-left: 15px; padding-top: 20px; }

	.stemma-month {
		width: 55px;
		top: 20px;
		left: 20px;
	}
	.stemma-day {
		width: 40px;
		top: 6px;
		left: 8px;
	}

	header h1 { font-size: 1.2em; }
	header p { font-size: 0.75em; margin-bottom: 4px; }

	.date-header {
		padding: 6px 0;
		margin-bottom: 12px;
	}
	.date-header h2 { font-size: 1em; }

	.view-toggle {
		gap: 4px;
		margin-bottom: 10px;
	}
	.view-toggle a {
		font-size: 0.8em;
		padding: 8px 12px;
		min-height: 40px;
	}
	.btn-date-picker,
	label.btn-date-picker {
		font-size: 0.8em;
		padding: 8px 12px;
		min-height: 40px;
	}
	.btn-today {
		font-size: 0.8em;
		padding: 8px 12px;
		min-height: 40px;
	}
	.btn-admin {
		font-size: 0.8em;
		padding: 8px 12px;
		min-height: 40px;
	}

	.btn-reset {
		font-size: 0.9em;
		padding: 10px 18px;
		min-height: auto;
	}

	.month-title h2 { font-size: 0.95em; }
	.month-title .btn-month-nav { font-size: 1.1em; padding: 0 6px; }

	.weekdays {
		font-size: 0.7em;
		margin-bottom: 3px;
	}
	.weekdays div { padding: 3px 2px; }

	/* ===== GIORNI DEL CALENDARIO - STESSA ALTEZZA ===== */
	.day {
		min-height: 60px;
		height: 60px;
		padding: 6px 3px;
		font-size: 0.85em;
		border-radius: 8px;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 3px;
		position: relative;
	}

	.day .day-number {
		display: block;
		font-weight: bold;
		font-size: 1em;
	}

	.day .day-info,
	.day .day-info.free-text {
		display: block;
		font-size: 0.65em;
		line-height: 1.2;
		white-space: nowrap;
		min-height: 1.2em;
	}

	.day .day-info.occupied-text {
		color: #dc3545;
		font-style: italic;
		font-weight: normal;
	}

	.day .day-info.free-text {
		color: transparent;
		visibility: hidden;
	}

	.day .day-total {
		color: #000000;
		font-weight: bold;
	}

	.day small { display: none; }
	/* ===== FINE MODIFICHE GIORNI ===== */

	/* ===== SLOT - UNA RIGA SINGOLA SU SMARTPHONE ===== */
	.slot-grid {
		gap: 6px;
		margin-top: 10px;
		flex-direction: column;
	}
	.slot {
		padding: 12px 16px;
		font-size: 0.9em;
		border-radius: 8px;
		display: block;
		min-height: auto;
	}
	.slot .slot-label {
		display: flex;
		justify-content: space-between;
		align-items: center;
		flex-wrap: nowrap;
		gap: 8px;
		width: 100%;
	}
	.slot .slot-label strong {
		font-size: 0.95em;
		white-space: nowrap;
	}
	.slot .slot-label span {
		font-size: 0.85em;
		white-space: nowrap;
	}
	.slot .slot-label .slot-orario {
		font-size: 1em;
	}
	.slot .slot-label .slot-stato {
		font-size: 0.9em;
	}

	/* ===== PRENOTAZIONE DETTAGLIO - UNA RIGA SU SMARTPHONE ===== */
	.prenotazione-dettaglio {
		padding: 6px 10px;
		margin-top: 6px;
	}
	.prenotazione-row {
		display: flex;
		justify-content: space-between;
		align-items: center;
		flex-wrap: nowrap;
		gap: 6px;
	}
	.prenotazione-nome {
		display: flex;
		align-items: center;
		gap: 6px;
		flex-wrap: nowrap;
		font-size: 0.85em;
		overflow: hidden;
	}
	.prenotazione-nome strong {
		font-size: 0.9em;
		white-space: nowrap;
	}
	.prenotazione-nome .prenotazione-note {
		font-size: 0.7em;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		max-width: 80px;
	}
	.prenotazione-azioni {
		display: flex;
		gap: 4px;
		align-items: center;
		flex-shrink: 0;
	}
	.prenotazione-azioni .btn-edit svg,
	.prenotazione-azioni .btn-delete svg {
		width: 18px;
		height: 18px;
	}
	/* ===== FINE SLOT ===== */

	.selection-display {
		padding: 12px;
		margin-top: 15px;
	}
	.selection-display p { font-size: 1em; }
	.btn-prenota, .btn-cancel, .btn-reset {
		padding: 10px 18px;
		font-size: 0.9em;
	}

	/* ===== MODALE PRENOTAZIONE - PULSANTI SVG PIÙ GRANDI ===== */
	.booking-modal-content {
		padding: 15px;
		margin: 5% auto;
		width: 95%;
	}
	.booking-modal-header h3 { font-size: 1.3em; }
	.modal-date-display { font-size: 1.2em; padding: 8px; }
	.selected-slots-summary { padding: 8px; font-size: 0.9em; }
	.form-group { margin-bottom: 12px; }
	.form-group label { font-size: 0.9em; }
	.form-group input,
	.form-group textarea { padding: 8px; font-size: 0.9em; }

	.btn-icon {
		padding: 15px;
	}

	.btn-icon svg {
		width: 64px;
		height: 64px;
	}

	.btn-confirm svg {
		stroke: #2e7d32;
		stroke-width: 4;
	}

	.btn-cancel svg {
		stroke: #dc3545;
		stroke-width: 4;
	}

	.modal-actions {
		gap: 40px;
		margin-top: 20px;
	}

	.email-toggle-group { padding: 8px; }
	.toggle-label { font-size: 0.9em; }

	.form-popup { padding: 15px; max-width: 95%; }
	.form-popup-header h3 { font-size: 1.2em; }
	.form-popup-close { width: 30px; height: 30px; font-size: 1.1em; }
	form div { margin-bottom: 10px; }
	form label { font-size: 0.9em; }
	form input, form textarea, form select { padding: 8px; font-size: 0.9em; }
	form button { padding: 10px; font-size: 1em; }

	.slot, .day, .view-toggle a, .btn-date-picker, .btn-today {
		min-height: auto;
	}
}

/* Schermi molto piccoli (es. iPhone SE) */
@media (max-width: 380px) {
	body { padding: 2px; }
	.container { padding: 4px; padding-left: 8px; padding-top: 12px; }
	.stemma-month {
		width: 45px;
		top: 15px;
		left: 15px;
	}
	.stemma-day {
		width: 35px;
		top: 5px;
		left: 6px;
	}
	header h1 { font-size: 1.1em; }
	header p { font-size: 0.7em; }
	.date-header { padding: 5px 0; margin-bottom: 10px; }
	.date-header h2 { font-size: 0.9em; }

	.view-toggle a {
		font-size: 0.75em;
		padding: 7px 10px;
		min-height: 38px;
	}
	.btn-date-picker,
	label.btn-date-picker {
		font-size: 0.75em;
		padding: 7px 10px;
		min-height: 38px;
	}
	.btn-today {
		font-size: 0.75em;
		padding: 7px 10px;
		min-height: 38px;
	}
	.btn-admin {
		font-size: 0.75em;
		padding: 7px 10px;
		min-height: 38px;
	}

	.btn-reset {
		font-size: 0.85em;
		padding: 8px 14px;
		min-height: auto;
	}

	.day {
		min-height: 50px;
		height: 50px;
		font-size: 0.75em;
		padding: 4px 2px;
		gap: 2px;
	}

	.day .day-number {
		font-size: 0.9em;
	}

	.day .day-info,
	.day .day-info.free-text {
		font-size: 0.6em;
		min-height: 1.2em;
	}

	.slot {
		padding: 10px 14px;
		font-size: 0.85em;
	}
	.slot .slot-label {
		flex-wrap: nowrap;
		gap: 6px;
	}
	.slot .slot-label strong {
		font-size: 0.9em;
	}
	.slot .slot-label .slot-orario {
		font-size: 0.9em;
	}
	.slot .slot-label span {
		font-size: 0.8em;
	}

	.prenotazione-dettaglio {
		padding: 4px 8px;
	}
	.prenotazione-row {
		gap: 4px;
	}
	.prenotazione-nome {
		font-size: 0.8em;
	}
	.prenotazione-nome strong {
		font-size: 0.85em;
	}
	.prenotazione-nome .prenotazione-note {
		max-width: 60px;
		font-size: 0.65em;
	}
	.prenotazione-azioni .btn-edit svg,
	.prenotazione-azioni .btn-delete svg {
		width: 16px;
		height: 16px;
	}

	.btn-prenota, .btn-cancel, .btn-reset { padding: 8px 14px; font-size: 0.8em; }

	.booking-modal-content { padding: 10px; width: 98%; }
	.booking-modal-header h3 { font-size: 1.1em; }
	.modal-date-display { font-size: 1em; padding: 6px; }
	.form-group input, .form-group textarea { padding: 6px; font-size: 0.85em; }

	.btn-icon {
		padding: 12px;
	}

	.btn-icon svg {
		width: 54px;
		height: 54px;
	}

	.modal-actions {
		gap: 30px;
	}
}

/* Orientamento landscape su smartphone */
@media (max-width: 768px) and (orientation: landscape) {
	.container { padding: 8px; padding-left: 15px; }
	.stemma-month { width: 45px; top: 12px; left: 12px; }
	.stemma-day { width: 35px; top: 6px; left: 8px; }
	header h1 { font-size: 1em; }
	.date-header { padding: 4px 0; margin-bottom: 8px; }
	.date-header h2 { font-size: 0.9em; }

	.day {
		min-height: 42px;
		height: 42px;
		padding: 4px 3px;
		gap: 2px;
	}

	.day .day-number {
		font-size: 0.85em;
	}

	.day .day-info,
	.day .day-info.free-text {
		font-size: 0.55em;
		min-height: 1.2em;
	}

	.slot {
		padding: 10px 14px;
		font-size: 0.85em;
	}
	.slot .slot-label {
		flex-wrap: nowrap;
		gap: 6px;
	}

	.prenotazione-dettaglio {
		padding: 4px 8px;
	}
	.prenotazione-row {
		flex-wrap: nowrap;
	}
	.prenotazione-nome {
		font-size: 0.8em;
	}

	.booking-modal-content { max-height: 80vh; }

	.btn-icon svg {
		width: 54px;
		height: 54px;
	}

	.modal-actions {
		gap: 30px;
	}
}

/* Ottimizzazioni per dispositivi con display ad alta densità */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
	.stemma-month, .stemma-day {
		image-rendering: -webkit-optimize-contrast;
	}
}

