
/* STILI GAMIFICATION */
.parking-spot {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 12px;
    min-width: 140px;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    position: relative;
    overflow: hidden;
}

.parking-spot.free {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-color: #28a745;
}

.parking-spot.occupied {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-color: #dc3545;
}

.parking-spot.reserved {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-color: #ffc107;
}

.parking-spot.vip-spot {
    background: linear-gradient(135deg, #cce5ff 0%, #b8daff 100%);
    border-color: #007bff;
}

.parking-spot:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.parking-spot.selected {
    border-color: #6f42c1;
    box-shadow: 0 0 0 3px rgba(111, 66, 193, 0.25);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(111, 66, 193, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(111, 66, 193, 0); }
    100% { box-shadow: 0 0 0 0 rgba(111, 66, 193, 0); }
}

.pulse-animation {
    animation: successPulse 0.5s ease-in-out;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Badge speciali */
.spot-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
}

.spot-badge.vip {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #000;
}

.spot-badge.electric {
    background: linear-gradient(45deg, #00ff88, #00ccff);
    color: #000;
}

.spot-badge.disabled {
    background: linear-gradient(45deg, #8B5CF6, #6366F1);
    color: white;
}

/* Veicoli in lista */
.vehicle-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.3s;
    cursor: move;
    position: relative;
}

.vehicle-card:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-color: #007bff;
    transform: translateX(5px);
}

.vehicle-card.dragging-vehicle {
    opacity: 0.8;
    transform: rotate(5deg);
    box-shadow: 0 10px 30px rgba(0, 123, 255, 0.3);
}

.vehicle-card::before {
    content: '👆 Trascina sul posto';
    position: absolute;
    top: -25px;
    left: 0;
    background: #007bff;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    opacity: 0;
    transition: opacity 0.3s;
}

.vehicle-card:hover::before {
    opacity: 1;
}

/* Tooltip durante drag */
.drag-tooltip {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    pointer-events: none;
    border-left: 4px solid #28a745;
}

/* Progress bar per durata rimanente */
.spot-timer {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 4px;
    font-weight: bold;
}

/* Modal migliorato */
.quick-booking-form {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 10px;
}

.quick-booking-form::-webkit-scrollbar {
    width: 6px;
}

.quick-booking-form::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.quick-booking-form::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.quick-booking-form::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Animazioni confetti */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background-color: #f00;
    top: 0;
    opacity: 0;
}

/* Dashboard header */
.dashboard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 0 0 15px 15px;
    margin-bottom: 20px;
}

/* Statistiche cards */
.card.bg-success.bg-opacity-10 {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(40, 167, 69, 0.2) 100%) !important;
    border: 2px solid #28a745;
}

.card.bg-danger.bg-opacity-10 {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(220, 53, 69, 0.2) 100%) !important;
    border: 2px solid #dc3545;
}

/* EFFETTI AUDIO */
audio {
    display: none;
}

/* LOADER ANIMATO */
.loader-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* NOTIFICHE SWEETALERT2 PERSONALIZZATE */
.swal2-popup {
    border-radius: 15px !important;
    overflow: hidden !important;
}

.swal2-confirm {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    padding: 10px 30px !important;
    border-radius: 50px !important;
}

/* Responsive */
@media (max-width: 768px) {
    .parking-spot {
        min-width: 120px;
        padding: 8px;
    }
    
    .spot-label {
        font-size: 14px;
    }
}
/* parking-management.css */
.parking-management-dashboard {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
}

/* Header */
.dashboard-header {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Search Panel */
.search-panel {
    background: white;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Main Container */
.main-container {
    display: flex;
    flex-wrap: wrap;
    padding: 1rem;
    gap: 1rem;
    min-height: 70vh;
}

/* Vehicles Sidebar */
.vehicles-sidebar {
    flex: 0 0 300px;
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    max-height: 600px;
    overflow-y: auto;
}

.vehicle-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    cursor: move;
    transition: all 0.2s ease;
}

.vehicle-card:hover {
    border-color: #0d6efd;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.1);
}

.vehicle-card.dragging {
    opacity: 0.5;
    transform: scale(0.98);
}

/* Parking Map */
.parking-map-container {
    flex: 1;
    min-width: 400px;
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.parking-map-wrapper {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
    min-height: 400px;
    max-height: 500px;
    overflow-y: auto;
    overflow-x: auto;
}

/* Parking Grid */
.parking-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.parking-row {
    margin-bottom: 1.5rem;
}

.spots-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(52px, 52px));
    gap: 12px;
    justify-content: start;
}

.parking-spot {
    width: 52px;
    height: 76px;
    border: 3px solid;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.parking-spot.free {
    border-color: #28a745;
    background: #d4edda;
}

.parking-spot.occupied {
    border-color: #dc3545;
    background: #f8d7da;
}

.parking-spot.reserved {
    border-color: #ffc107;
    background: #fff3cd;
}

.parking-spot:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.parking-spot.drop-hover {
    border-color: #0d6efd;
    background: #cfe2ff;
    animation: pulse 1s infinite;
}

.parking-spot.selected {
    border-color: #6f42c1;
    box-shadow: 0 0 0 3px rgba(111, 66, 193, 0.3);
}

.parking-spot.selectable {
    animation: blink 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes blink {
    0%, 100% { border-color: #28a745; }
    50% { border-color: #0d6efd; }
}

.spot-label {
    font-weight: 600;
    font-size: 10px;
    color: #212529;
}

.spot-vehicle {
    font-size: 9px;
    color: #495057;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Details Sidebar */
.booking-details-sidebar {
    flex: 0 0 350px;
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    max-height: 600px;
    overflow-y: auto;
}

.detail-row {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
}

.detail-label {
    display: block;
    font-weight: 600;
    color: #495057;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.detail-value {
    color: #212529;
    font-size: 0.9rem;
}

/* Quick Stats */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

.quick-stats .card {
    border: none;
    border-radius: 6px;
    text-align: center;
    padding: 0.75rem;
}

.quick-stats h4 {
    font-size: 1.5rem;
    margin: 0;
    font-weight: bold;
}

.quick-stats small {
    color: #6c757d;
    font-size: 0.8rem;
}

/* Loader */
#pf-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#pf-loader.show {
    display: flex;
}

/* Responsive */
@media (max-width: 1200px) {
    .main-container {
        flex-direction: column;
    }
    
    .vehicles-sidebar,
    .parking-map-container,
    .booking-details-sidebar {
        width: 100%;
        flex: none;
    }
    .spots-row {
        grid-template-columns: repeat(auto-fill, minmax(52px, 52px));
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .dashboard-header .row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-panel .row {
        flex-wrap: wrap;
    }
    
    .search-panel .col-md-4,
    .search-panel .col-md-3 {
        flex: 0 0 100%;
        margin-bottom: 0.5rem;
    }
    
    .spots-row {
        grid-template-columns: repeat(auto-fill, minmax(42px, 42px));
        gap: 8px;
    }
    .parking-spot {
        width: 42px;
        height: 64px;
    }
}

/* Filter visibility rules */
#interactive-parking-map[data-filter="free"] .parking-spot.occupied,
#interactive-parking-map[data-filter="free"] .parking-spot.booked,
#interactive-parking-map[data-filter="occupied"] .parking-spot.free,
#interactive-parking-map[data-filter="occupied"] .parking-spot.booked {
    display: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #adb5bd;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6c757d;
}
