.order-details-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1rem;
    margin: 1rem;
    height: calc(100vh - 200px);
}

.order-main-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    padding-right: 1rem;
    border-radius: 0.7rem;
}

.order-section {
    width: 100%;
}

.order-notes-panel {
    position: sticky;
    top: 0;
    height: 100%;
}

.info-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-label {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.info-value {
    font-size: 0.95rem;
    color: #212529;
}

.api-requests-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.api-request-item {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1rem;
    background-color: #f8f9fa;
}

.notes-content {
    max-height: 300px;
    overflow-y: auto;
}

.notes-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.note-item {
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-left: 3px solid #0d6efd;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.card {
    width: 100%;
    height: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
    margin: 0;
}



.card-header {
    border-bottom: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
}

.card-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.order-cards-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    max-width: 1600px;
    margin: 0 auto;
}

.cards-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.notes-row {
    display: grid;
    grid-template-columns: 1fr;
}

.order-card {
    min-width: 0;
    display: flex; /* For proper card stretching */
}

/* Notes card spans 2 columns */
.notes-card {
    grid-column: span 2;
}

.card-body {
    padding: 1rem;
}

.api-requests-summary {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.api-request-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 1400px) {
    .order-cards-container {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .notes-card {
        max-width: 620px;
    }
}

@media (max-width: 1200px) {
    .order-cards-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .cards-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1100px) {
    .order-cards-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .order-details-container {
        grid-template-columns: 1fr;
    }

    .order-notes-panel {
        position: relative;
    }

    .order-cards-container {
        grid-template-columns: repeat(auto-fit, minmax(260px, 280px));
    }
    
    .notes-card {
        grid-column: span 2;
        max-width: 580px;
    }
}

@media (max-width: 768px) {
    .order-cards-container {
        grid-template-columns: 1fr;
        max-width: 100%;
    }
    
    .notes-card {
        grid-column: 1;
        max-width: 100%;
    }
    
    .card-body {
        padding: 0.75rem;
    }

    .cards-row {
        grid-template-columns: 1fr;
    }
}

/* New vehicle details section-based styling */
.vehicle-details-container {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.5rem;
    max-width: 1600px;
    margin: 0 auto;
}

.details-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.details-section {
    background-color: #ffffff;
    border-radius: 0.7rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
    position: relative;
    min-height: 100%;
}

.details-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.section-header {
    background-color: #f8f9fa;
    padding: 1rem;
    border-bottom: 1px solid #eaeaea;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-header h5 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.section-header i {
    font-size: 1.2rem;
}

.section-content {
    padding: 1.25rem;
}

/* Enhanced multi-column grid styling for vehicle details */
.multi-column-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

.multi-column-grid.two-columns {
    grid-template-columns: repeat(2, 1fr);
}

.multi-column-grid.three-columns {
    grid-template-columns: repeat(3, 1fr);
}

.info-column {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.column-subheader {
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
}

.fullwidth-section {
    grid-column: 1 / -1;
}

.wide-section {
    grid-column: span 2;
}

/* Fee items specific styling */
.fees-container {
    width: 100%;
}

.fee-columns {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.fee-item {
    background-color: #f8f9fa;
    padding: 0.75rem;
    border-radius: 0.5rem;
}

.fee-total {
    /*border-top: 2px solid #dee2e6;*/
    /*padding-top: 1rem;*/
    text-align: right;
}

.fee-total-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0d6efd;
}

/* Responsive adjustments for the new layout */
@media (max-width: 1200px) {
    .details-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .details-row {
        grid-template-columns: 1fr;
    }
    
    .vehicle-details-container {
        padding: 1rem;
    }
    
    .section-content {
        padding: 1rem;
    }
}

/* Responsive adjustments */
@media (max-width: 1400px) {
    .multi-column-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 992px) {
    .wide-section {
        grid-column: 1 / -1;
    }
    
    .multi-column-grid.three-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .multi-column-grid, 
    .multi-column-grid.two-columns, 
    .multi-column-grid.three-columns {
        grid-template-columns: 1fr;
    }
    
    .fee-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .fee-columns {
        grid-template-columns: 1fr;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Document upload styling */
.upload-dropzone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
}

.upload-dropzone.drag-active {
    border-color: #007bff;
    background-color: #e8f4ff;
}

.upload-input {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.upload-icon {
    font-size: 3rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.upload-text {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.upload-divider {
    display: block;
    margin: 10px 0;
    color: #6c757d;
}

.upload-hint {
    color: #6c757d;
    margin-top: 10px;
    font-size: 0.9rem;
}

.selected-file {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 4px;
    background-color: #e9ecef;
    width: 100%;
}

.file-icon {
    font-size: 2rem;
    margin-right: 15px;
    color: #dc3545;
}

.file-details {
    flex: 1;
}

.file-name {
    display: block;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.file-size {
    display: block;
    font-size: 0.85rem;
    color: #6c757d;
}

.upload-btn {
    padding: 8px 16px;
}

/* Buyer section specific styling */
.buyers-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.buyer-panel {
    width: 100%;
    border-radius: 0.5rem;
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.joint-buyer-panel {
    background-color: #f8faff;
}

.buyer-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background-color: #f0f2f5;
    border-bottom: 1px solid #eaeaea;
}

.buyer-header i {
    color: #0d6efd;
    font-size: 1.1rem;
}

.buyer-header h6 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}