/* AUTONOLEGGIO SMART - Stili Personalizzati */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --sidebar-width: 250px;
    --header-height: 60px;
}

/* Tema Scuro */
[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --border-color: #404040;
    --card-bg: #2d2d2d;
}

/* Tema Chiaro */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --border-color: #dee2e6;
    --card-bg: #ffffff;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

/* Layout Principale */
.app-container {
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h3 {
    margin: 0;
    font-weight: 700;
    font-size: 1.2rem;
}

.sidebar-nav {
    padding: 1rem 0;
    flex: 1;
    overflow-y: auto;
}

.sidebar-footer {
    border-top: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.1);
}

.nav-item {
    margin: 0.25rem 1rem;
}

.nav-link {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background-color: rgba(255,255,255,0.1);
    color: white;
    transform: translateX(5px);
}

.nav-link.active {
    background-color: rgba(255,255,255,0.2);
    color: white;
    font-weight: 600;
}

.nav-link i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background-color: var(--bg-secondary);
    overflow-x: auto;
    max-width: calc(100vw - var(--sidebar-width));
    box-sizing: border-box;
}

/* Header */
.header {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background-color: var(--bg-secondary);
}

/* Content Area */
.content {
    padding: 2rem;
}

/* Cards */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.card-header {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    border-radius: 0.75rem 0.75rem 0 0;
}

.card-body {
    padding: 1.5rem;
}

/* Dashboard Cards */
.stats-card {
    text-align: center;
    padding: 1.5rem;
    border-radius: 1rem;
    color: white;
    position: relative;
    overflow: hidden;
    min-width: 0;
    word-wrap: break-word;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    z-index: 1;
}

.stats-card .content {
    position: relative;
    z-index: 2;
}

.stats-card.primary {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
}

.stats-card.success {
    background: linear-gradient(135deg, var(--success-color), #146c43);
}

.stats-card.warning {
    background: linear-gradient(135deg, var(--warning-color), #e0a800);
}

.stats-card.danger {
    background: linear-gradient(135deg, var(--danger-color), #b02a37);
}

.stats-card.info {
    background: linear-gradient(135deg, var(--info-color), #0aa2c0);
}

.stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stats-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Tables */
.table {
    background-color: var(--card-bg);
    border-radius: 0.75rem;
    overflow: hidden;
    min-width: 0;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table th {
    background-color: var(--bg-secondary);
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    color: var(--text-primary);
}

.table td {
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

/* Buttons */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

/* Forms */
.form-control, .form-select {
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    color: var(--text-primary);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    background-color: var(--card-bg);
    color: var(--text-primary);
}

.form-label {
    font-weight: 600;
    color: var(--text-primary);
}

/* Status Badges */
.badge {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
}

/* Search Box */
.search-box {
    position: relative;
    max-width: 300px;
}

.search-box .form-control {
    padding-left: 2.5rem;
}

.search-box i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        max-width: 100vw;
    }
    
    .content {
        padding: 1rem;
    }
    
    .stats-number {
        font-size: 2rem;
    }
}

/* Stili per schermi stretti (quando i Developer Tools sono aperti) */
@media (max-width: 1200px) {
    .main-content {
        padding: 15px;
    }
    
    .content {
        padding: 1.5rem;
    }
    
    .stats-card {
        padding: 1rem;
    }
    
    .stats-number {
        font-size: 1.8rem;
    }
    
    .stats-label {
        font-size: 0.85rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table {
        font-size: 0.9rem;
    }
    
    .btn {
        font-size: 0.9rem;
        padding: 0.375rem 0.75rem;
    }
}

/* Stili per schermi molto stretti */
@media (max-width: 1000px) {
    .main-content {
        padding: 10px;
    }
    
    .content {
        padding: 1rem;
    }
    
    .stats-card {
        padding: 0.75rem;
    }
    
    .stats-number {
        font-size: 1.5rem;
    }
    
    .stats-label {
        font-size: 0.8rem;
    }
    
    .row {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }
    
    .col-md-3, .col-sm-6 {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* Animations */
.fade-enter-active, .fade-leave-active {
    transition: opacity 0.3s ease;
}

.fade-enter-from, .fade-leave-to {
    opacity: 0;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Vehicle Status Colors */
.status-disponibile {
    color: var(--success-color);
}

.status-noleggiato {
    color: var(--warning-color);
}

.status-manutenzione {
    color: var(--danger-color);
}

/* Rental Status Colors */
.status-attivo {
    color: var(--success-color);
}

.status-completato {
    color: var(--info-color);
}

.status-annullato {
    color: var(--danger-color);
}

/* Database Status Indicators */
.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.status-online {
    background-color: var(--success-color);
    box-shadow: 0 0 8px var(--success-color);
}

.status-offline {
    background-color: var(--danger-color);
    box-shadow: 0 0 8px var(--danger-color);
}

.status-warning {
    background-color: var(--warning-color);
    box-shadow: 0 0 8px var(--warning-color);
}

/* Database Status Component */
.database-status .btn-group .btn {
    flex: 1;
}

.database-status pre {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    font-size: 0.875rem;
    overflow-x: auto;
}

/* Help System Styles */
.help-system {
    display: inline-block;
}

.help-btn {
    margin-left: 0.5rem;
    font-size: 0.875rem;
}

.help-modal {
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
}

.help-modal .modal-body {
    max-height: 60vh;
    overflow-y: auto;
}

.help-modal h6 {
    color: var(--primary-color);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.help-modal h6:first-child {
    margin-top: 0;
}

.help-modal ul, .help-modal ol {
    margin-bottom: 1rem;
}

.help-modal li {
    margin-bottom: 0.5rem;
}

.help-modal .badge {
    font-size: 0.75rem;
}

.help-modal code {
    background-color: var(--bg-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.help-modal a {
    color: var(--primary-color);
    text-decoration: none;
}

.help-modal a:hover {
    text-decoration: underline;
}

/* Print Styles */
/* Modal Styles */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 1rem;
}

@media print {
    .sidebar, .header, .btn {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
    }

    .content {
        padding: 0 !important;
    }
} 