.page-header {
    margin-bottom: 1rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.25rem 0;
}

.page-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

/* Status Navigation */
.status-navigation {
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    margin-bottom: 1rem;
}

/* ------------------------------ */
/* NEW FIXED MOBILE DROPDOWN CSS */
/* ------------------------------ */

.status-mobile-wrapper {
    width: 100%;
    padding: 0 1rem;
    box-sizing: border-box;
    margin-bottom: 1rem;
}

.status-mobile-container {
    position: relative;
    width: 100%;
}

.status-mobile-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    width: 100%;
    padding: 12px 40px 12px 14px;

    border: 1px solid #d1d5db;
    border-radius: 8px;

    font-size: 15px;
    font-weight: 500;
    background-color: #fff;
    color: #111827;

    cursor: pointer;

    box-sizing: border-box;

    /* Prevent text overflow */
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.status-mobile-select:focus {
    outline: none;
    border-color: #762c21;
    box-shadow: 0 0 0 2px rgba(118, 44, 33, 0.1);
}

.status-mobile-arrow {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    pointer-events: none;
    color: #6b7280;
}

/* Hide on desktop */
@media (min-width: 768px) {
    .status-mobile-wrapper {
        display: none;
    }
}

/* Desktop Tabs */
.status-desktop {
    display: none;
    overflow-x: auto;
}

.status-tabs {
    display: flex;
    min-width: max-content;
}

.status-tab {
    flex: 1;
    padding: 1rem 1.5rem;
    text-align: center;
    font-weight: 500;
    font-size: 0.875rem;
    color: #6b7280;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: color 0.2s, background-color 0.2s, border-color 0.2s;
}

.status-tab:hover {
    color: #000;
    background-color: #f9fafb;
}

.status-tab.is-active {
    color: #000;
    background-color: #f9fafb;
    border-bottom-color: #000;
}

/* Orders List */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Order Card */
.order-card {
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.order-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Order Header */
.order-header {
    background-color: #f9fafb;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.order-info {
    flex: 1;
    min-width: 0;
}

.order-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.order-number {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
}

.order-date {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Tracking Info */
.tracking-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.tracking-icon {
    width: 1rem;
    height: 1rem;
    color: #6b7280;
}

.tracking-label {
    font-size: 0.75rem;
    color: #6b7280;
}

.tracking-number {
    font-size: 0.75rem;
    font-weight: 600;
    color: #2563eb;
    user-select: all;
}

.tracking-copy {
    font-size: 0.75rem;
    color: #2563eb;
    background: none;
    border: none;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}

.tracking-copy:hover {
    color: #1e40af;
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    align-self: flex-start;
}

.status-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.status-completed {
    background-color: #d1fae5;
    color: #065f46;
}

.status-cancelled {
    background-color: #fee2e2;
    color: #991b1b;
}

.status-processing {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-shipped {
    background-color: #e9d5ff;
    color: #6b21a8;
}

.status-cancellation_requested {
    background-color: #fed7aa;
    color: #9a3412;
}

.status-return_refund {
    background-color: #fecaca;
    color: #991b1b;
}

/* Order Items */
.order-items {
    display: flex;
    flex-direction: column;
}

.order-item {
    padding: 0.75rem 1rem;
    display: flex;
    gap: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
}

.order-item:last-child {
    border-bottom: none;
}

.item-image {
    width: 4rem;
    height: 4rem;
    object-fit: cover;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.item-details {
    flex: 1;
    min-width: 0;
}

.item-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #111827;
    margin: 0 0 0.25rem 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.item-quantity,
.item-price {
    display: block;
}

.item-total {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    flex-shrink: 0;
    text-align: right;
}

/* Order Footer */
.order-footer {
    background-color: #f9fafb;
    padding: 0.75rem 1rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.payment-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    font-size: 0.75rem;
}

.payment-label {
    color: #6b7280;
}

.payment-method {
    font-weight: 500;
    color: #111827;
}

.payment-status {
    color: #6b7280;
}

.payment-error {
    color: #dc2626;
}

.order-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.order-total-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.total-label {
    font-size: 0.875rem;
    color: #6b7280;
}

.total-amount {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border-radius: 0.5rem;
    border: 1px solid;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    display: inline-block;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background-color: #000;
    color: #fff;
    border-color: #000;
}

.btn-primary:hover:not(:disabled) {
    background-color: #1f2937;
}

.btn-secondary {
    background-color: #fff;
    color: #374151;
    border-color: #d1d5db;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #f9fafb;
}

.btn-danger {
    background-color: #fff;
    color: #dc2626;
    border-color: #fca5a5;
}

.btn-danger:hover:not(:disabled) {
    background-color: #fef2f2;
}

.btn-warning-static {
    background-color: #fff7ed;
    color: #9a3412;
    border-color: #fed7aa;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    border-radius: 0.5rem;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.empty-state .empty-icon {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 1rem;
}

.empty-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.5rem 0;
}

.empty-text {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0 0 1.5rem 0;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.toast {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 500;
    pointer-events: auto;
    opacity: 0;
    transform: translateX(100%);
    animation: slideIn 0.3s ease-out forwards;
    max-width: 20rem;
}

.toast.is-hiding {
    animation: slideOut 0.3s ease-in forwards;
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Tablet Styles (640px - 1023px) */
@media (min-width: 640px) {
    .page-title {
        font-size: 1.875rem;
    }

    .status-navigation {
        margin-bottom: 1.5rem;
    }

    .order-header {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
        padding: 1rem 1.5rem;
    }

    .order-meta {
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
    }

    .order-date {
        font-size: 0.875rem;
    }

    .order-item {
        padding: 1rem 1.5rem;
        gap: 1rem;
    }

    .item-image {
        width: 5rem;
        height: 5rem;
    }

    .item-meta {
        flex-direction: row;
        gap: 1rem;
        font-size: 0.875rem;
    }

    .item-price {
        display: inline;
    }

    .item-total {
        font-size: 1rem;
    }

    .order-footer {
        padding: 1rem 1.5rem;
    }

    .empty-state {
        padding: 3rem;
    }

    .empty-icon {
        width: 6rem;
        height: 6rem;
    }

    .empty-title {
        font-size: 1.125rem;
    }

    .empty-text {
        font-size: 1rem;
    }
}

/* Desktop Styles (768px and up) */
@media (min-width: 768px) {
    .page-header {
        margin-bottom: 1.5rem;
    }

    .status-desktop {
        display: block;
    }

    .orders-list {
        gap: 1rem;
    }
}

/* Large Desktop Styles (1024px and up) */
@media (min-width: 1024px) {
    .status-tab {
        padding: 1rem 1.5rem;
    }

    .order-footer {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
    }

    .payment-info {
        font-size: 0.875rem;
        gap: 0.5rem;
    }

    .order-actions {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }

    .order-total-section {
        flex-direction: column;
        align-items: flex-end;
        border: none;
        padding: 0;
        gap: 0.25rem;
    }

    .total-label {
        font-size: 0.75rem;
    }

    .total-amount {
        font-size: 1.25rem;
    }

    .action-buttons {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

/* Extra Large Desktop (1280px and up) */
@media (min-width: 1280px) {
    .order-actions {
        gap: 1.5rem;
    }
}
