/* Vendors Page Styles */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8fafc;
    color: #111827;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* Main Vendors Content */
.vendors-main {
    flex: 1;
    padding: 0;
    margin-top: var(--header-height, 64px);
}

.vendors-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* Vendors Header */
.vendors-header {
    margin-bottom: 2rem;
}

.vendors-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.875rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
}

.vendors-title i {
    color: #3b82f6;
    font-size: 1.5rem;
}

.vendors-subtitle {
    color: #6b7280;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Vendors Controls */
.vendors-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.controls-left {
    display: flex;
    align-items: center;
    flex: 1;
}

.controls-center {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.controls-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Search Container */
.search-container {
    position: relative;
    min-width: 300px;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 0.875rem;
}

.search-input {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.25rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.875rem;
    background: #f9fafb;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.clear-search-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.clear-search-btn:hover {
    color: #ef4444;
    background: #fef2f2;
}

/* Filter Container */
.filter-container {
    display: flex;
    gap: 0.75rem;
}

.filter-dropdown {
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
    color: #374151;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 150px;
}

.filter-dropdown:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Table Styles */
.vendors-table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.vendors-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.vendors-table th {
    background: #f8fafc;
    color: #374151;
    font-weight: 600;
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.875rem;
    white-space: nowrap;
}

.vendors-table td {
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
    font-size: 0.875rem;
}

.vendors-table tbody tr {
    transition: background-color 0.2s ease;
    cursor: pointer;
}

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

.vendors-table tbody tr:last-child td {
    border-bottom: none;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
}

.status-approved {
    background: #dcfce7;
    color: #16a34a;
}

.status-pending {
    background: #fef3c7;
    color: #d97706;
}

.status-expired, .status-rejected, .status-inactive {
    background: #fecaca;
    color: #dc2626;
}

/* Action Buttons */
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    color: #6b7280;
    margin-right: 0.5rem;
}

.action-btn:hover {
    background: #f3f4f6;
    transform: scale(1.1);
}

.action-btn.view-vendor {
    color: #3b82f6;
}

.action-btn.delete-vendor {
    color: #ef4444;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: white;
    color: #374151;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(.active) {
    background: #f9fafb;
    border-color: #d1d5db;
}

.pagination-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

/* Button Styles */
.btn {
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    white-space: nowrap;
}

.btn.primary {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
}

.btn.primary:hover {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn.secondary, .btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.btn.secondary:hover, .btn-secondary:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    backdrop-filter: blur(2px);
}

.modal-content {
    background: white;
    margin: 2% auto;
    width: 90%;
    max-width: 900px;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: modalSlideIn 0.3s ease-out;
    max-height: 95vh;
    overflow-y: auto;
    position: relative;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1.5rem;
    padding: 1.5rem 1.5rem 0;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #6b7280;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    z-index: 10;
}

.close-modal:hover {
    background: #f3f4f6;
    color: #374151;
}

/* Wizard Stepper Styles */
.wizard-steps {
    display: flex;
    justify-content: space-between;
    margin: 0 1.5rem 2rem;
    padding: 1rem 0;
    position: relative;
}

.wizard-step {
    flex: 1;
    text-align: center;
    color: #9ca3af;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.wizard-step span {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.wizard-step.active span {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    transform: scale(1.1);
}

.wizard-step.active {
    color: #3b82f6;
}

.wizard-step.completed span {
    background: linear-gradient(135deg, #10b981, #16a34a);
    color: white;
}

.wizard-step.completed {
    color: #10b981;
}

.wizard-step.completed span::before {
    content: '\2713';
    font-size: 1rem;
    display: block;
    line-height: 40px;
}

.wizard-step.completed span {
    font-size: 0;
}

.wizard-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    right: -50%;
    width: 100%;
    height: 3px;
    background: #e5e7eb;
    z-index: 0;
    transition: all 0.3s ease;
}

.wizard-step.completed:not(:last-child)::after,
.wizard-step.active:not(:last-child)::after {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
}

.wizard-label {
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.wizard-step.active .wizard-label {
    color: #3b82f6;
    font-weight: 600;
}

.wizard-step.completed .wizard-label {
    color: #10b981;
    font-weight: 600;
}

/* Wizard Content */
.wizard-step-content {
    padding: 0 1.5rem;
    margin-bottom: 2rem;
}

.wizard-step-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-col {
    flex: 1;
}

/* Form Control Specific Styles */
select.form-control {
    cursor: pointer;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

input[type="file"].form-control {
    padding: 0.5rem;
    background: #f9fafb;
}

/* Toggle Switch Styles */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-bottom: 1rem;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e5e7eb;
    transition: 0.3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 24px;
}

/* ID Input Group */
.id-input-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.id-input-group input {
    flex: 1;
}

#generateIdBtn {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

#generateIdBtn:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

#generateIdBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Toggle Row */
.toggle-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.toggle-label {
    font-size: 0.875rem;
    color: #6b7280;
}

.helper-text {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.25rem;
    font-style: italic;
}

/* Document Section */
.doc-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.doc-grid .doc-label {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    border: 2px dashed #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    min-height: 80px;
    text-align: center;
    gap: 0.5rem;
}

.doc-grid .doc-label:hover {
    border-color: #3b82f6;
    background: #f0f9ff;
    color: #3b82f6;
    transform: translateY(-2px);
}

.doc-grid .doc-label.drag-over {
    border-color: #10b981 !important;
    background: #ecfdf5 !important;
    color: #10b981 !important;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
}

.doc-grid .doc-label i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

.doc-grid .doc-label input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    top: 0;
    left: 0;
}

/* Uploaded Files Container */
.uploaded-files-container {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.uploaded-files-container h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.uploaded-files-container h4::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 1rem;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 2px;
}

.uploaded-file-item {
    margin-bottom: 0.75rem;
}

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

/* Remove Document Button */
.remove-doc-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 2;
}

.remove-doc-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* Document Upload Success State */
.doc-label.uploaded {
    border-color: #10b981;
    background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
    color: #059669;
    position: relative;
}

.doc-label.uploaded i {
    color: #10b981;
}

/* Drag and Drop Global Styles */
.dragover {
    background: #f0f9ff !important;
    border-color: #3b82f6 !important;
}

/* File Type Validation Error */
.file-error {
    border-color: #ef4444 !important;
    background: #fef2f2 !important;
    color: #dc2626 !important;
    animation: shake 0.3s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Enhanced Button Styling for Wizard */
.wizard-actions .btn {
    min-width: 120px;
    font-weight: 600;
    letter-spacing: 0.025em;
}

.wizard-actions .btn.secondary {
    background: #f3f4f6;
    color: #374151;
    border: 2px solid #e5e7eb;
}

.wizard-actions .btn.secondary:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
    transform: translateY(-1px);
}

.wizard-actions .btn.primary {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border: 2px solid transparent;
}

.wizard-actions .btn.primary:hover {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

/* Ensure consistent spacing in wizard actions */
.wizard-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin: 2rem 1.5rem 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    flex-wrap: wrap;
}

.wizard-nav-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#addAdditionalContact {
    margin-right: auto;
}

/* Upload Progress Indicators */
.upload-progress-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    min-width: 300px;
    text-align: center;
}

.upload-progress-bar {
    width: 100%;
    height: 8px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
    margin: 1rem 0;
}

.upload-progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

/* File Validation Feedback */
.file-validation-message {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: #ef4444;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 10;
    opacity: 0;
    animation: fadeInOut 3s ease-in-out;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; transform: translateX(-50%) translateY(5px); }
    15%, 85% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Review Section */
.review-outline {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
}

.review-section {
    margin-bottom: 2rem;
}

.review-section:last-child {
    margin-bottom: 0;
}

.review-section-header {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.review-section-body {
    display: grid;
    gap: 0.75rem;
}

.review-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1rem;
    align-items: start;
}

.review-label {
    font-weight: 500;
    color: #6b7280;
    font-size: 0.875rem;
}

.review-value {
    color: #111827;
    font-size: 0.875rem;
    word-break: break-word;
}

/* Airport Suggestions */
.airport-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.airport-suggestion {
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.875rem;
    transition: background-color 0.2s ease;
}

.airport-suggestion:hover {
    background: #f8fafc;
}

.airport-suggestion:last-child {
    border-bottom: none;
}

/* Vendor Detail Styles */
.vendor-details {
    padding: 1.5rem;
}

.detail-group {
    margin-bottom: 2rem;
}

.detail-group h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.detail-row {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 1rem;
    margin-bottom: 0.75rem;
    align-items: start;
}

.detail-label {
    font-weight: 500;
    color: #6b7280;
    font-size: 0.875rem;
}

.detail-value {
    color: #111827;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Document Items */
.vendor-documents {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.document-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    gap: 0.75rem;
}

.document-icon {
    color: #ef4444;
    font-size: 1.25rem;
}

.document-name {
    flex: 1;
    font-weight: 500;
    color: #111827;
    font-size: 0.875rem;
}

.document-download {
    color: #3b82f6;
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.document-download:hover {
    background: #f0f9ff;
    color: #2563eb;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: #f8fafc;
    border-radius: 0 0 12px 12px;
}

/* Input Error States */
.input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.input-error:focus {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* Error Text */
.input-error + .input-error {
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .vendors-container {
        padding: 1.5rem;
    }
    
    .vendors-controls {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .controls-left, .controls-center, .controls-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .search-container {
        min-width: unset;
        flex: 1;
    }
    
    .filter-container {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .filter-dropdown {
        min-width: unset;
    }
}

@media (max-width: 768px) {
    .vendors-container {
        padding: 1rem;
    }
    
    .vendors-title {
        font-size: 1.5rem;
    }
    
    .vendors-controls {
        padding: 1rem;
    }
    
    .controls-center, .controls-right {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn {
        justify-content: center;
        width: 100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .vendors-table-container {
        overflow-x: auto;
    }
    
    .vendors-table {
        min-width: 700px;
    }
    
    .modal-content {
        margin: 5% auto;
        width: 95%;
    }
    
    .wizard-step {
        font-size: 0.75rem;
    }
    
    .wizard-step span {
        width: 32px;
        height: 32px;
        line-height: 32px;
        font-size: 0.875rem;
    }
    
    .wizard-label {
        font-size: 0.625rem;
    }
    
    .doc-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-row {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
    
    .wizard-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .wizard-nav-buttons {
        justify-content: space-between;
        width: 100%;
    }
    
    #addAdditionalContact {
        margin-right: 0;
        order: -1;
    }
}

@media (max-width: 480px) {
    .vendors-container {
        padding: 0.75rem;
    }
    
    .vendors-title {
        font-size: 1.25rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .vendors-controls {
        padding: 0.75rem;
    }
    
    .modal-content {
        margin: 2% auto;
        width: 95%;
        max-height: 90vh;
    }
    
    .wizard-step-content {
        padding: 0 1rem;
    }
    
    .wizard-actions {
        margin: 1.5rem 1rem 1rem;
    }
    
    .vendors-table-container {
        margin-left: -0.75rem;
        margin-right: -0.75rem;
        border-radius: 0;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .vendors-table-container,
    .vendors-controls,
    .modal-content {
        border: 2px solid #000000;
    }
    
    .btn.primary,
    .btn-primary {
        background: #000000;
        color: #ffffff;
    }
    
    .status-badge {
        border: 1px solid #000000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .btn,
    .action-btn,
    .filter-dropdown,
    .vendors-table tbody tr,
    .modal-content,
    .wizard-step span {
        transition: none;
    }
    
    .modal-content {
        animation: none;
    }
    
    .btn.primary:hover,
    .btn-primary:hover {
        transform: none;
    }
}

/* Vendor Modal Specific Content */
.vendor-wizard-modal {
    max-width: 1000px;
}

/* Collapsible Section Styles for View Modal */
.collapsible-section {
    margin-bottom: 1.5rem;
}

.section-header {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    background: #f7f9fa;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.section-header:hover {
    background: #e5e7eb;
}

.section-arrow {
    font-size: 1.2rem;
    margin-left: auto;
    transition: transform 0.2s ease;
}

.section-body {
    padding: 1rem 1.5rem;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 8px 8px;
}

.section-body.collapsed {
    display: none;
}

/* Text Center Utility */
.text-center {
    text-align: center;
}

/* Legacy Support for Existing JavaScript */
.modal.show {
    display: block;
}

/* Additional Legacy Support */
.cancel-modal {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.cancel-modal:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

.edit-from-view {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.edit-from-view:hover {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Divider with Label */
.divider-with-label {
    position: relative;
    text-align: center;
    margin: 2rem 0 1.5rem;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
}

.divider-with-label::before,
.divider-with-label::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background: #e5e7eb;
}

.divider-with-label::before {
    left: 0;
}

.divider-with-label::after {
    right: 0;
}

.divider-with-label span {
    background: white;
    padding: 0 1rem;
}

/* Additional Documents */
.additional-documents-desc {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
    font-style: italic;
}

#addAnotherDocument {
    margin-bottom: 1rem;
}

/* Additional Contact Fields */
.additional-contact-fields {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
    position: relative;
}

.remove-contact-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.remove-contact-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* Change Log Modal Styles */
.change-log-container {
    padding: 0;
}

.change-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 1.5rem;
}

.log-vendor-info h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
}

.log-vendor-info p {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.log-controls {
    display: flex;
    gap: 0.5rem;
}

.log-controls .btn.small {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
}

.change-log-search {
    margin-bottom: 1.5rem;
}

.change-log-timeline {
    max-height: 400px;
    overflow-y: auto;
}

.change-log-empty {
    text-align: center;
    padding: 3rem 2rem;
    color: #6b7280;
}

.change-log-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.change-log-empty h4 {
    margin: 0 0 0.5rem;
    font-size: 1.125rem;
    color: #374151;
}

.change-log-empty p {
    margin: 0;
    font-size: 0.875rem;
}

.change-log-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.change-log-entry {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.change-log-entry:last-child {
    border-bottom: none;
}

.log-entry-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    color: white;
}

.log-entry-icon.action-create {
    background: linear-gradient(135deg, #10b981, #34d399);
}

.log-entry-icon.action-edit {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
}

.log-entry-icon.action-delete {
    background: linear-gradient(135deg, #ef4444, #f87171);
}

.log-entry-icon.action-view {
    background: linear-gradient(135deg, #6b7280, #9ca3af);
}

.log-entry-icon.action-export {
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
}

.log-entry-icon.action-other {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.log-entry-content {
    flex: 1;
    min-width: 0;
}

.log-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.log-action {
    font-weight: 600;
    color: #111827;
    font-size: 0.875rem;
}

.log-timestamp {
    font-size: 0.75rem;
    color: #6b7280;
}

.log-details {
    color: #374151;
    font-size: 0.875rem;
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.log-user {
    font-size: 0.75rem;
    color: #6b7280;
    font-style: italic;
}

/* Change Log Modal Loading State */
.modal-body.loading {
    position: relative;
    opacity: 0.7;
    pointer-events: none;
}

.modal-body.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
}

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

/* Responsive Design for Change Log */
@media (max-width: 768px) {
    .change-log-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .log-controls {
        width: 100%;
        justify-content: flex-end;
    }
    
    .change-log-entry {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .log-entry-icon {
        align-self: flex-start;
    }
    
    .log-entry-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

/* Billing Step Specific Styles */
.form-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-section h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
}

.form-section h4 i {
    color: #3b82f6;
    font-size: 1rem;
}

.form-section .toggle-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.form-section .toggle-row .switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.form-section .toggle-row .switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.form-section .toggle-row .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 24px;
}

.form-section .toggle-row .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.form-section .toggle-row input:checked + .slider {
    background-color: #3b82f6;
}

.form-section .toggle-row input:checked + .slider:before {
    transform: translateX(20px);
}

.form-section .toggle-row .toggle-label {
    font-size: 0.9rem;
    color: #4b5563;
    font-weight: 500;
}

#billingContactFields, #billingAddressFields {
    transition: opacity 0.3s ease, max-height 0.3s ease;
    overflow: hidden;
}

#billingContactFields[style*="display: none"], 
#billingAddressFields[style*="display: none"] {
    opacity: 0;
    max-height: 0;
}

/* Responsive adjustments for billing form */
@media (max-width: 768px) {
    .form-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .form-section h4 {
        font-size: 1rem;
    }
    
    .form-section .toggle-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}
