/* ============================================
   Vehicle Card Components
   ============================================ */

.vehicle-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 300ms ease;
    cursor: pointer;
}

.vehicle-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.vehicle-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--gray-100);
}

.vehicle-card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.vehicle-card-badge.available {
    background: rgba(16, 185, 129, 0.9);
    color: white;
}

.vehicle-card-badge.rented {
    background: rgba(239, 68, 68, 0.9);
    color: white;
}

.vehicle-card-badge.maintenance {
    background: rgba(245, 158, 11, 0.9);
    color: white;
}

/* ============================================
   Modal Components
   ============================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9998;
    animation: fadeIn 200ms ease-out;
}

.modal-container {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
}

.modal-content {
    background: white;
    border-radius: 1rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideInUp 300ms ease-out;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* ============================================
   Navigation Components
   ============================================ */

.nav-link {
    position: relative;
    padding: 0.5rem 1rem;
    color: var(--gray-700);
    font-weight: 500;
    transition: color 200ms ease;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background: var(--primary);
    transition: transform 200ms ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

/* ============================================
   Table Components
   ============================================ */

.table-container {
    overflow-x: auto;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.data-table thead {
    background: var(--gray-50);
    border-bottom: 2px solid var(--gray-200);
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-100);
}

.data-table tbody tr {
    transition: background-color 150ms ease;
}

.data-table tbody tr:hover {
    background: var(--gray-50);
}

/* ============================================
   Search Box Component
   ============================================ */

.search-box {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid var(--gray-200);
    border-radius: 9999px;
    transition: all 200ms ease;
    font-size: 1rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    pointer-events: none;
}

/* ============================================
   Dropdown Component
   ============================================ */

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 200ms ease;
    z-index: 1000;
}

.dropdown.active .dropdown-menu,
.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--gray-700);
    border-radius: 0.375rem;
    transition: all 150ms ease;
    cursor: pointer;
}

.dropdown-item:hover {
    background: var(--gray-50);
    color: var(--primary);
}

/* ============================================
   Stats Card Component
   ============================================ */

.stats-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--primary);
}

.stats-card.blue {
    border-left-color: #3b82f6;
}

.stats-card.green {
    border-left-color: #10b981;
}

.stats-card.yellow {
    border-left-color: #f59e0b;
}

.stats-card.purple {
    border-left-color: #8b5cf6;
}

.stats-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stats-icon.blue {
    background: #dbeafe;
    color: #3b82f6;
}

.stats-icon.green {
    background: #d1fae5;
    color: #10b981;
}

.stats-icon.yellow {
    background: #fef3c7;
    color: #f59e0b;
}

.stats-icon.purple {
    background: #ede9fe;
    color: #8b5cf6;
}

/* ============================================
   Toast Notification
   ============================================ */

.toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-xl);
    min-width: 300px;
    animation: slideInRight 300ms ease-out;
    z-index: 10000;
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--error);
}

.toast.warning {
    border-left: 4px solid var(--warning);
}

.toast.info {
    border-left: 4px solid var(--info);
}

/* ============================================
   Breadcrumb Component
   ============================================ */

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: white;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.breadcrumb-item {
    color: var(--gray-600);
    transition: color 150ms ease;
}

.breadcrumb-item:hover {
    color: var(--primary);
}

.breadcrumb-item.active {
    color: var(--gray-900);
    font-weight: 600;
}

.breadcrumb-separator {
    color: var(--gray-400);
}

/* ============================================
   Pagination Component
   ============================================ */

.pagination {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--gray-200);
    border-radius: 0.375rem;
    background: white;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 150ms ease;
}

.pagination-btn:hover:not(.active):not(:disabled) {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

.pagination-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   Progress Bar
   ============================================ */

.progress-bar {
    width: 100%;
    height: 0.5rem;
    background: var(--gray-200);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 300ms ease;
}

/* ============================================
   Tabs Component
   ============================================ */

.tabs {
    border-bottom: 2px solid var(--gray-200);
    display: flex;
    gap: 1rem;
}

.tab-item {
    padding: 1rem 1.5rem;
    color: var(--gray-600);
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 200ms ease;
}

.tab-item:hover {
    color: var(--gray-900);
}

.tab-item.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    padding: 2rem 0;
}

/* ============================================
   Avatar Component
   ============================================ */

.avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    overflow: hidden;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--gray-700);
}

.avatar.sm {
    width: 2rem;
    height: 2rem;
    font-size: 0.875rem;
}

.avatar.lg {
    width: 4rem;
    height: 4rem;
    font-size: 1.25rem;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
