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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 400px;
}

.form-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.form-header h1 {
    color: #333;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-header p {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #e9ecef;
    margin-bottom: 20px;
    width: auto;
    padding: 8px 16px;
    font-size: 14px;
    text-transform: none;
    letter-spacing: normal;
}

.btn-secondary:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.swap-button-container {
    display: flex;
    justify-content: center;
    margin: 10px 0;
}

.btn-reverse {
    width: auto;
    padding: 12px;
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #e9ecef;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-reverse:hover {
    background: #e9ecef;
    border-color: #667eea;
    color: #667eea;
    transform: scale(1.1);
}

.btn-reverse svg {
    transition: transform 0.3s ease;
}

.btn-reverse:hover svg {
    transform: rotate(180deg);
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    margin-top: 20px;
    font-size: 14px;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #c3e6cb;
    margin-top: 20px;
    font-size: 14px;
}

/* Loading state */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Bookings Preview Styles */
.bookings-preview {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* Tab Navigation Styles */
.tab-navigation {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #007bff;
    background-color: #f8f9fa;
}

.tab-btn.active {
    color: #007bff;
    border-bottom-color: #007bff;
    background-color: #f8f9fa;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Vehicle Results Styles */
.vehicle-results {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.vehicle-results h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.vehicle-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vehicle-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.vehicle-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.vehicle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.vehicle-id {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

.vehicle-id:hover {
    background-color: #f8f9fa;
    color: #007bff;
    transform: translateY(-1px);
}

.vehicle-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.vehicle-status.active {
    background-color: #d4edda;
    color: #155724;
}

.vehicle-status.inactive {
    background-color: #f8d7da;
    color: #721c24;
}

.vehicle-status.unknown {
    background-color: #e2e3e5;
    color: #383d41;
}

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

.vehicle-detail {
    display: flex;
    flex-direction: column;
}

.vehicle-detail-label {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.vehicle-detail div:last-child {
    font-size: 14px;
    color: #495057;
    font-weight: 500;
}

.no-results {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 20px;
}

/* Search Progress Styles */
.search-progress {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.progress-header span:first-child {
    font-weight: 500;
    color: #495057;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background-color: #007bff;
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-details {
    font-size: 14px;
    color: #6c757d;
    text-align: center;
}

/* Recent Swaps Styles */
.recent-swaps {
    margin-top: 30px;
    padding: 20px;
    background: #e8f4fd;
    border-radius: 8px;
    border: 1px solid #bee5eb;
}

.recent-swaps h3 {
    color: #0c5460;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.swaps-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.swap-item {
    background: white;
    border: 1px solid #bee5eb;
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.swap-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.swap-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.swap-vehicles {
    font-weight: 600;
    color: #0c5460;
    font-size: 16px;
}

.swap-time {
    font-size: 12px;
    color: #6c757d;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
}

.swap-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.swap-info {
    font-size: 14px;
    color: #495057;
}

.swap-actions {
    display: flex;
    gap: 8px;
}

.btn-reverse {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-reverse:hover {
    background: #138496;
    transform: translateY(-1px);
}

.btn-clear {
    background: #6c757d;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-clear:hover {
    background: #5a6268;
}

.bookings-preview h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.no-bookings {
    text-align: center;
    color: #28a745;
    font-weight: 500;
    padding: 20px;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    margin: 10px 0;
}

.bookings-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.booking-item {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.booking-item:last-child {
    margin-bottom: 0;
}

.booking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.booking-id {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

.booking-id:hover {
    background-color: #f8f9fa;
    color: #007bff;
    transform: translateY(-1px);
}

.booking-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.booking-status.new {
    background: #d4edda;
    color: #155724;
}

.booking-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    font-size: 13px;
    color: #6c757d;
}

.booking-detail {
    display: flex;
    flex-direction: column;
}

.booking-detail-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 2px;
}

.preview-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.preview-actions .btn {
    width: auto;
    min-width: 120px;
}

/* Responsive design */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .form-container {
        padding: 30px 20px;
    }
    
    .form-header h1 {
        font-size: 24px;
    }
    
    .booking-details {
        grid-template-columns: 1fr;
    }
    
    .preview-actions {
        flex-direction: column;
    }
    
    .preview-actions .btn {
        width: 100%;
    }
}
