/* TransportPro - Styles principaux */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --header-height: 60px;
    --border-radius: 0.5rem;
    --box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --box-shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.875rem;
    background-color: #f1f5f9;
    color: #334155;
    line-height: 1.6;
}

/* Layout */
.wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #4D5BF9 0%, #3a45d6 100%);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    transition: all 0.3s ease;
    overflow-y: auto;
}

.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

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

.sidebar-brand {
    display: flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 700;
}

.sidebar-brand i {
    font-size: 1.75rem;
    margin-right: 0.75rem;
    color: #ffffff;
}

.sidebar-nav {
    list-style: none;
    padding: 0.5rem 0;
}

.nav-header {
    padding: 1rem 1.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.9);
}

.sidebar .nav-item .nav-link {
    display: flex;
    align-items: center;
    padding: 0.65rem 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar .nav-item .nav-link i {
    font-size: 1.1rem;
    width: 24px;
    margin-right: 0.75rem;
    color: #ffffff;
}

.sidebar .nav-item .nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.sidebar .nav-item .nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border-left-color: #ffffff;
}

/* Main Content */
#content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    transition: all 0.3s ease;
}

.main-content {
    padding: 1.5rem;
}

/* Navbar */
.navbar {
    height: var(--header-height);
    padding: 0 1rem;
}

#sidebarToggle {
    color: var(--secondary-color);
    text-decoration: none;
}

.notification-badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
}

.notification-dropdown {
    min-width: 300px;
}

.notification-dropdown .dropdown-item {
    white-space: normal;
    padding: 0.75rem 1rem;
}

.notification-dropdown .dropdown-item i {
    margin-right: 0.5rem;
}

.avatar i {
    color: var(--secondary-color);
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    background: #fff;
}

.card-header {
    background: transparent;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.card-body {
    padding: 1.25rem;
}

/* Stats Cards */
.stat-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    padding: 1.25rem;
    color: #fff;
}

.stat-card.primary { background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%); }
.stat-card.success { background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%); }
.stat-card.warning { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.stat-card.danger { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }
.stat-card.info { background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%); }
.stat-card.secondary { background: linear-gradient(135deg, #64748b 0%, #475569 100%); }

.stat-card .stat-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    opacity: 0.2;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--secondary-color);
    border-bottom-width: 1px;
    background: #f8fafc;
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
    padding: 0.75rem;
}

.table-hover tbody tr:hover {
    background-color: #f8fafc;
}

/* Buttons */
.btn {
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Forms */
.form-control, .form-select {
    font-size: 0.875rem;
    border-radius: 0.375rem;
    border-color: #e2e8f0;
    padding: 0.5rem 0.75rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.375rem;
    color: #475569;
}

.input-group-text {
    background: #f8fafc;
    border-color: #e2e8f0;
}

/* Badges */
.badge {
    font-weight: 500;
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
    border-radius: 0.25rem;
}

/* Alerts */
.alert {
    border-radius: var(--border-radius);
    border: none;
}

/* Modal */
.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
}

.modal-header {
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 1.25rem;
}

.modal-footer {
    border-top: 1px solid #e2e8f0;
    padding: 1rem 1.25rem;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
}

/* Filters */
.filter-bar {
    background: #fff;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    box-shadow: var(--box-shadow);
}

/* Action buttons */
.action-buttons .btn {
    margin-left: 0.25rem;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--secondary-color);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Charts */
.chart-container {
    position: relative;
    height: 300px;
}

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #2563eb 100%);
}

.login-card {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo i {
    font-size: 3rem;
    color: var(--primary-color);
}

.login-logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-top: 0.5rem;
}

/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }
    
    .sidebar.show {
        margin-left: 0;
    }
    
    #content {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 576px) {
    .main-content {
        padding: 1rem;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .stat-card .stat-value {
        font-size: 1.5rem;
    }
}

/* Print styles */
@media print {
    .sidebar, .navbar, .btn, .action-buttons {
        display: none !important;
    }
    
    #content {
        margin-left: 0;
        width: 100%;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Quick additions */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cursor-pointer {
    cursor: pointer;
}

.border-left-primary {
    border-left: 4px solid var(--primary-color) !important;
}

.border-left-success {
    border-left: 4px solid var(--success-color) !important;
}

.border-left-warning {
    border-left: 4px solid var(--warning-color) !important;
}

.border-left-danger {
    border-left: 4px solid var(--danger-color) !important;
}

/* Utility classes */
.min-h-300 { min-height: 300px; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }

/* Table responsive scroll */
.table-responsive {
    border-radius: var(--border-radius);
}

/* Vehicle status indicators */
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
}

.status-dot.active { background-color: var(--success-color); }
.status-dot.inactive { background-color: var(--secondary-color); }
.status-dot.maintenance { background-color: var(--warning-color); }
