@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f6f8;
    color: #333;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, #1a1d23 0%, #2d3748 100%);
    color: #fff;
    z-index: 1000;
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 20px 25px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand h4 {
    font-weight: 700;
    font-size: 1.2rem;
    margin: 0;
    color: #fff;
}

.sidebar-brand span {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

.sidebar-menu {
    padding: 15px 0;
}

.sidebar-menu .nav-header {
    padding: 10px 25px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
}

.sidebar-menu .nav-item {
    margin: 2px 10px;
}

.sidebar-menu .nav-link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.sidebar-menu .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sidebar-menu .nav-link.active {
    background: var(--primary);
    color: #fff;
}

.sidebar-menu .nav-link i {
    width: 24px;
    margin-right: 12px;
    font-size: 1.1rem;
}

.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.topbar {
    background: #fff;
    padding: 15px 30px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar .breadcrumb {
    margin: 0;
    font-size: 0.9rem;
}

.topbar .breadcrumb-item a {
    color: var(--primary);
    text-decoration: none;
}

.topbar .user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.topbar .user-info {
    text-align: right;
}

.topbar .user-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.topbar .user-role {
    font-size: 0.75rem;
    color: var(--secondary);
}

.topbar .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.content-wrapper {
    padding: 25px 30px;
}

.page-header {
    margin-bottom: 25px;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1d23;
    margin-bottom: 5px;
}

.page-header p {
    color: var(--secondary);
    font-size: 0.9rem;
    margin: 0;
}

.card {
    background: #fff;
    border: none;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.card-header {
    background: transparent;
    border-bottom: 1px solid #f0f0f0;
    padding: 15px 20px;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-card .stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a1d23;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--secondary);
}

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

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

.table {
    font-size: 0.9rem;
}

.table thead th {
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

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

.badge {
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 6px;
}

.badge-ldv { background: #e3f2fd; color: #1565c0; }
.badge-tru { background: #fff3e0; color: #e65100; }
.badge-bus { background: #e8f5e9; color: #2e7d32; }
.badge-adt { background: #fce4ec; color: #c2185b; }
.badge-fel { background: #f3e5f5; color: #7b1fa2; }

.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e9ecef;
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid #fff;
}

.timeline-item.maintenance::before { background: var(--warning); }
.timeline-item.unit-swap::before { background: var(--success); }
.timeline-item.sim-swap::before { background: var(--info); }
.timeline-item.creation::before { background: var(--primary); }
.timeline-item.suppression::before { background: var(--danger); }

.timeline-content {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 8px;
}

.timeline-date {
    font-size: 0.75rem;
    color: var(--secondary);
    margin-bottom: 5px;
}

.timeline-type {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.timeline-details {
    font-size: 0.85rem;
    color: #666;
}

.form-label {
    font-weight: 500;
    font-size: 0.85rem;
    color: #495057;
    margin-bottom: 5px;
}

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

.search-box {
    position: relative;
}

.search-box input {
    padding-left: 40px;
}

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

.filters-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.action-buttons {
    display: flex;
    gap: 5px;
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1d23 0%, #2d3748 100%);
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.login-card .logo {
    text-align: center;
    margin-bottom: 30px;
}

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

.login-card .logo h3 {
    font-weight: 700;
    margin-top: 10px;
    color: #1a1d23;
}

.login-card .logo p {
    font-size: 0.85rem;
    color: var(--secondary);
}

@media print {
    .sidebar, .topbar, .action-buttons, .btn, .no-print {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .content-wrapper {
        padding: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .filters-bar {
        flex-direction: column;
    }
}

.vehicle-detail-header {
    background: linear-gradient(135deg, var(--primary) 0%, #2d3748 100%);
    color: #fff;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.vehicle-detail-header h2 {
    font-weight: 700;
    margin-bottom: 5px;
}

.vehicle-detail-header .subtitle {
    opacity: 0.8;
    font-size: 0.9rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.detail-item {
    padding: 10px 0;
}

.detail-item .label {
    font-size: 0.75rem;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item .value {
    font-weight: 500;
    color: #1a1d23;
}

.chart-container {
    position: relative;
    height: 250px;
}

@media (max-width: 576px) {
    .content-wrapper {
        padding: 15px;
    }
    
    .topbar {
        padding: 10px 15px;
    }
    
    .page-header h1 {
        font-size: 1.3rem;
    }
}
