.card-submit-order-tracker {
    max-width: 1200px;
    margin: 2rem auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.tracker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.tracker-header h2 {
    margin: 0;
    font-size: 1.8rem;
    color: #1e1e1e;
}

.tracker-filters select {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    background-color: #fff;
    cursor: pointer;
}

.orders-loading {
    text-align: center;
    padding: 2rem;
    color: #666;
    background: #f9f9f9;
    border-radius: 8px;
}

.order-item {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.order-header {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    gap: 1.5rem;
    width: 100%;
    min-height: 64px;
    box-sizing: border-box;
}

.order-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.order-id {
    font-size: 0.9rem;
    font-weight: 500;
    color: #666;
    min-width: 120px;
}

.order-date {
    color: #666;
    font-size: 0.9rem;
    min-width: 100px;
}

.order-company {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e1e1e;
    min-width: 80px;
}

.order-status {
    margin-left: auto;
    padding-right: 0.5rem;
    min-width: 160px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.status-badge {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    min-width: 140px;
    text-align: center;
    letter-spacing: 0.5px;
}

.toggle-details {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0.5rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.toggle-details:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.toggle-details::after {
    content: '▼';
    display: block;
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.order-item.expanded .toggle-details::after {
    transform: rotate(180deg);
}

.order-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.order-details {
    display: none;
    padding: 1.5rem;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.order-item.expanded .order-details {
    display: block;
}

.order-summary {
    margin-bottom: 2rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.summary-item {
    flex: 1;
    margin-right: 2rem;
}

.summary-item:last-child {
    margin-right: 0;
}

.summary-item .label {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.summary-item .value {
    font-weight: 500;
    color: #1e1e1e;
}

.cards-table-wrapper {
    overflow-x: auto;
    margin-top: 1rem;
}

.cards-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.cards-table th,
.cards-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.cards-table th {
    background: #f1f1f1;
    font-weight: 600;
    color: #333;
}

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

.order-error,
.no-orders {
    text-align: center;
    padding: 3rem;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.error-icon,
.no-orders-icon {
    display: block;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.error-message,
.no-orders-message {
    color: #666;
}

/* Status Colors */
.status-pending .status-badge {
    background-color: #f5f7fa;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}

.status-shipped_grader .status-badge {
    background-color: #fff3e0;
    color: #ed8936;
    border: 1px solid #fbd38d;
}

.status-received_grader .status-badge {
    background-color: #e6fffa;
    color: #319795;
    border: 1px solid #81e6d9;
}

.status-grading .status-badge {
    background-color: #ebf4ff;
    color: #4c51bf;
    border: 1px solid #c3dafe;
}

.status-research_id .status-badge {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.status-assembly_qa .status-badge {
    background-color: #ede9fe;
    color: #6d28d9;
    border: 1px solid #c4b5fd;
}

.status-shipped_shop .status-badge {
    background-color: #e6fffa;
    color: #2b6cb0;
    border: 1px solid #81e6d9;
}

.status-completed .status-badge {
    background-color: #f0fff4;
    color: #2f855a;
    border: 1px solid #9ae6b4;
}

/* Company Group Styles */
.company-group {
    margin-bottom: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.company-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    border-radius: 8px 8px 0 0;
}

.company-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.25rem;
    font-weight: 600;
}

.company-header .order-count {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
}

.company-orders {
    padding: 1rem;
}

.company-orders .order-item {
    margin-bottom: 1rem;
}

.company-orders .order-item:last-child {
    margin-bottom: 0;
}

.order-item {
    border: 1px solid #e9ecef;
    border-radius: 6px;
    background: #fff;
    transition: all 0.3s ease;
}

.order-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .tracker-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .order-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .summary-row {
        flex-direction: column;
        gap: 1rem;
    }

    .summary-item {
        margin-right: 0;
    }

    .cards-table {
        font-size: 0.8rem;
    }

    .cards-table th,
    .cards-table td {
        padding: 0.5rem;
    }
}

/* Card Status Badges */
.card-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.card-status.rejected {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.card-status.offer {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Rejected card row styling */
tr.rejected-card {
    background-color: #fff5f5;
}

tr.rejected-card td {
    text-decoration: line-through;
    color: #999;
}

tr.rejected-card td:last-child {
    text-decoration: none;
}
