/* Reset e stili generali */
* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f9;
    display: flex;
    height: 100vh;
    flex-direction: column;
}

/* Overlay Iniziale (3 secondi) */
.splash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #111;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    font-size: 2rem;
    font-weight: bold;
    transition: opacity 0.5s ease;
}

.splash-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Layout Dashboard */
.dashboard {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.sidebar {
    width: 320px;
    background-color: #fff;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 1000;
    overflow-y: auto;
}

.map-container {
    flex: 1;
    height: 100%;
}

/* Form e Controlli */
.control-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.control-label {
    font-weight: bold;
    font-size: 0.9rem;
}

.control-input,
.control-select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.btn-primary {
    padding: 10px;
    background-color: #d9534f;
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: bold;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.btn-primary:hover {
    background-color: #c9302c;
}

/* Stato Visivo / Messaggi */
.status-message {
    font-style: italic;
    color: #666;
    font-size: 0.9rem;
}

/* Modale Dettaglio */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    width: 400px;
    max-width: 90%;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.modal-close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #aaa;
}

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

/* Stili per la Legenda */
.legend-container {
    background: #f9f9f9;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #e1e1e1;
    margin-top: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    margin-top: 5px;
    color: #333;
}

.legend-color {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
}