/**
 * Siparislerim listesi + modal/takvim — AJAX fragment ile yuklendiginde de calisir.
 * (Once my_orders.html extra_css icindeydi.)
 */

/* FORCE HIDE Account Navigation */
.account-navigation,
#accountNavigation,
.account-nav-container,
.account-nav-wrapper,
nav.account-navigation {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
    left: -9999px !important;
}

/* ============= SEARCH AND FILTERS STYLES ============= */
.orders-search-filters {
    background: var(--tm-surface, white);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--tm-border, #e5e7eb);
}

.orders-search-bar {
    margin-bottom: 0.875rem;
}

.search-form {
    width: 100%;
}

.search-input-wrapper {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0.5rem;
    width: 100%;
}

.search-input-row {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--tm-text-muted, #6b7280);
    font-size: 1rem;
    pointer-events: none;
    z-index: 1;
}

.search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.625rem 0.875rem 0.625rem 2.5rem;
    border: 1.5px solid var(--tm-border, #e5e7eb);
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: var(--tm-bg-secondary, #fafafa);
    height: 40px;
    line-height: 1.5;
}

.search-input-row--has-clear .search-input {
    padding-right: 2.25rem;
}

.search-input:focus {
    outline: none;
    border-color: #F27A1A;
    background: var(--tm-surface, white);
    box-shadow: 0 0 0 3px rgba(242, 122, 26, 0.1);
}

.search-clear {
    position: absolute;
    right: 0.625rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--tm-text-muted, #9ca3af);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    z-index: 1;
    width: 20px;
    height: 20px;
}

.search-clear:hover {
    color: #dc2626;
}

.search-submit {
    padding: 0 1.25rem;
    background: linear-gradient(135deg, #F27A1A 0%, #FF8C3D 100%);
    border: none;
    border-radius: 8px;
    color: var(--tm-surface, white);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    transition: all 0.2s ease;
    white-space: nowrap;
    height: 40px;
}

.search-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(242, 122, 26, 0.25);
}

.search-submit:active {
    transform: translateY(0);
}

.orders-filters {
    padding-top: 0.875rem;
    border-top: 1px solid var(--tm-border, #e5e7eb);
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.875rem;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 0 0 auto;
}

.filter-group label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--tm-text-secondary, #374151);
    display: flex;
    align-items: center;
    gap: 0.375rem;
    white-space: nowrap;
    margin: 0;
}

.filter-group label i {
    color: #F27A1A;
    font-size: 0.875rem;
}

.filter-group--date-range {
    flex: 1 1 100%;
    max-width: 100%;
    align-items: stretch;
}

.filter-group--date-range label {
    align-self: flex-start;
}

.orders-date-range-field {
    display: flex;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    border-radius: 8px;
    border: 1.5px solid var(--tm-border, #e5e7eb);
    background: var(--tm-bg-secondary, #fafafa);
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.orders-date-range-field:focus-within {
    border-color: #F27A1A;
    background: var(--tm-surface, #fff);
    box-shadow: 0 0 0 3px rgba(242, 122, 26, 0.12);
}

.orders-date-range-input {
    flex: 1;
    min-width: 0;
    padding: 0 0.75rem;
    border: none !important;
    border-radius: 0;
    font-size: 0.8125rem;
    font-family: inherit;
    color: var(--tm-text-primary, #1f2937);
    background: transparent;
    height: 36px;
    cursor: pointer;
    outline: none;
    box-shadow: none !important;
    -webkit-appearance: none;
    appearance: none;
}

.orders-date-range-input::placeholder {
    color: var(--tm-text-muted, #9ca3af);
}

.orders-date-range-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    border: none;
    border-left: 1px solid var(--tm-border, #e5e7eb);
    background: var(--tm-surface, #fff);
    color: #F27A1A;
    cursor: pointer;
    transition: background 0.2s ease;
}

.orders-date-range-btn:hover {
    background: #fff3e4;
}

.orders-date-range-btn:focus-visible {
    outline: 2px solid #F27A1A;
    outline-offset: -2px;
}

/* Siparişlerim tarih modalı — id ile özgüllük (yüklenen başka #dateRangePickerModal kurallarını ezer) */
#storeOrdersDateRangeModal.store-orders-date-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 100060 !important;
    align-items: center;
    justify-content: center;
    padding: max(12px, env(safe-area-inset-top, 0px))
             max(12px, env(safe-area-inset-right, 0px))
             max(12px, env(safe-area-inset-bottom, 0px))
             max(12px, env(safe-area-inset-left, 0px));
    margin: 0 !important;
    background: rgba(15, 23, 42, 0.45);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

#storeOrdersDateRangeModal.store-orders-date-overlay[hidden] {
    display: none !important;
}

#storeOrdersDateRangeModal.store-orders-date-overlay:not([hidden]) {
    display: flex !important;
}

.store-orders-date-panel {
    background: var(--tm-surface, #fff);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
    border: 1px solid var(--tm-border, #e5e7eb);
    width: min(100%, 580px);
    max-width: 100%;
    max-height: min(88vh, 720px);
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.store-orders-date-panel .date-range-picker-container {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    max-height: 100%;
    gap: 0;
}

/* Dashboard ile aynı takvim (ızgara); harici CSS eksik / çakışma olsa da çalışır */
.store-orders-date-panel .date-range-picker-header {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--tm-bg-secondary, #f1f5f9);
    flex-shrink: 0;
}

.store-orders-date-panel .date-picker-nav-btn {
    flex-shrink: 0;
    background: transparent;
    border: none;
    color: #F27A1A;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    line-height: 1;
}

.store-orders-date-panel .date-picker-months {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 16px;
    flex: 1 1 auto;
    justify-content: center;
    min-width: 0;
}

.store-orders-date-panel .date-picker-month-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #F27A1A;
    white-space: nowrap;
}

.store-orders-date-panel .date-range-picker-body {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 10px;
    margin-bottom: 0;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.store-orders-date-panel .date-picker-calendar {
    flex: 1 1 0;
    min-width: 0;
}

.store-orders-date-panel .date-picker-weekdays {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 2px;
    margin-bottom: 6px;
    width: 100%;
}

.store-orders-date-panel .date-picker-weekday {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: #F27A1A;
    padding: 4px 2px;
}

.store-orders-date-panel .date-picker-days {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 2px;
    width: 100%;
}

.store-orders-date-panel .date-picker-day {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    aspect-ratio: 1;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    border: 2px solid transparent;
    min-height: 28px;
    box-sizing: border-box;
}

.store-orders-date-panel .date-picker-day:hover:not(.disabled):not(.range-start):not(.range-end) {
    background: #fef3c7;
}

.store-orders-date-panel .date-picker-day.disabled {
    color: var(--tm-border-strong, #cbd5e1);
    cursor: not-allowed;
}

.store-orders-date-panel .date-picker-day.in-range {
    background: #fef3c7;
    color: #F27A1A;
}

.store-orders-date-panel .date-picker-day.range-start,
.store-orders-date-panel .date-picker-day.range-end {
    background: #F27A1A !important;
    color: var(--tm-surface, white) !important;
    font-weight: 600;
}

.store-orders-date-panel .date-range-picker-footer {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 8px;
    padding-top: 10px;
    margin-top: 10px;
    border-top: 1px solid var(--tm-bg-secondary, #f1f5f9);
    flex-shrink: 0;
    background: var(--tm-surface, #fff);
    padding-bottom: max(4px, env(safe-area-inset-bottom, 0px));
}

.store-orders-date-panel .date-picker-btn-today,
.store-orders-date-panel .date-picker-btn-clear,
.store-orders-date-panel .date-picker-btn-apply {
    padding: 8px 12px;
    border-radius: 6px;
    border: none;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.store-orders-date-panel .date-picker-btn-today {
    background: #fef3c7;
    color: #F27A1A;
}

.store-orders-date-panel .date-picker-btn-clear {
    background: var(--tm-surface, white);
    color: var(--tm-text-muted, #64748b);
    border: 1px solid var(--tm-border, #e5e7eb) !important;
}

.store-orders-date-panel .date-picker-btn-apply {
    background: #F27A1A;
    color: var(--tm-surface, white);
}

@media (max-width: 576px) {
    #storeOrdersDateRangeModal.store-orders-date-overlay {
        padding: max(8px, env(safe-area-inset-top))
                 max(10px, env(safe-area-inset-right))
                 max(12px, env(safe-area-inset-bottom))
                 max(10px, env(safe-area-inset-left)) !important;
    }

    .store-orders-date-panel {
        width: 100%;
        max-height: min(78vh, 560px);
    }

    /* Mobilde tek ay: daha kısa panel, butonlar her zaman görünür */
    .store-orders-date-panel .date-picker-months #month2Title {
        display: none !important;
    }
    .store-orders-date-panel #month2Calendar {
        display: none !important;
    }
    .store-orders-date-panel .date-picker-months {
        justify-content: center;
        gap: 0;
    }

    .store-orders-date-panel .date-range-picker-body {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.5rem;
    }
    .store-orders-date-panel .date-picker-calendar {
        width: 100%;
        min-width: 0;
    }

    .store-orders-date-panel .date-picker-weekday {
        font-size: 0.62rem;
        padding: 2px 1px;
    }
    .store-orders-date-panel .date-picker-day {
        font-size: 0.72rem;
        min-height: 24px;
        border-radius: 6px;
    }

    .store-orders-date-panel .date-range-picker-footer {
        display: grid !important;
        grid-template-columns: 1fr 1fr 1fr;
        justify-content: stretch !important;
        gap: 6px;
        padding-top: 12px;
        margin-top: 8px;
    }
    .store-orders-date-panel .date-picker-btn-today,
    .store-orders-date-panel .date-picker-btn-clear,
    .store-orders-date-panel .date-picker-btn-apply {
        padding: 10px 6px;
        font-size: 0.75rem;
        width: 100%;
        text-align: center;
    }
}

.store-orders-date-panel .date-picker-day.other-month {
    color: var(--tm-text-muted, #94a3b8);
    font-weight: 400;
}

.filter-select {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border: 1.5px solid var(--tm-border, #e5e7eb);
    border-radius: 8px;
    font-size: 0.8125rem;
    background: var(--tm-surface, white);
    color: var(--tm-text-primary, #1f2937);
    cursor: pointer;
    transition: all 0.2s ease;
    height: 36px;
    min-width: 140px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.625rem center;
}

.filter-select:hover {
    border-color: #d1d5db;
    background-color: var(--tm-bg-secondary, #fafafa);
}

.filter-select:focus {
    outline: none;
    border-color: #F27A1A;
    box-shadow: 0 0 0 3px rgba(242, 122, 26, 0.1);
    background-color: var(--tm-surface, white);
}

.btn-clear-filters {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    background: var(--tm-bg-secondary, #f3f4f6);
    border: 1.5px solid var(--tm-border, #e5e7eb);
    border-radius: 8px;
    color: var(--tm-text-muted, #6b7280);
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    height: 36px;
    margin-left: auto;
}

.btn-clear-filters:hover {
    background: var(--tm-border, #e5e7eb);
    border-color: #d1d5db;
    color: var(--tm-text-secondary, #374151);
}

/* Search Results Info */
.search-results-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.8125rem;
    color: #1e40af;
}

.search-results-info i {
    font-size: 0.9375rem;
    flex-shrink: 0;
}

.search-results-info span {
    flex: 1;
}

.search-results-info .search-clear-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.625rem;
    background: var(--tm-surface, white);
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    color: #1e40af;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.search-results-info .search-clear-link:hover {
    background: #dbeafe;
    border-color: #93c5fd;
}

/* Responsive */
@media (max-width: 768px) {
    .orders-search-filters {
        padding: 0.875rem;
    }
    
    .orders-search-bar {
        margin-bottom: 0.75rem;
    }
    
    .search-input-wrapper {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .search-input-row {
        width: 100%;
    }
    
    .search-input {
        width: 100%;
    }
    
    .search-icon {
        left: 0.75rem;
    }
    
    .search-clear {
        right: 0.5rem;
    }
    
    .search-submit {
        width: 100%;
        justify-content: center;
    }
    
    .orders-filters {
        padding-top: 0.75rem;
    }
    
    .filter-form {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .filter-group {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.375rem;
    }
    
    .filter-group label {
        width: 100%;
    }
    
    .filter-select {
        width: 100%;
        min-width: 100%;
    }
    
    .btn-clear-filters {
        width: 100%;
        justify-content: center;
        margin-left: 0;
    }
    
    .orders-stats {
        grid-template-columns: 1fr;
        gap: 0.625rem;
    }
}

/* ============= CANCELLATION REQUEST STYLES ============= */
.order-cancellation-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.75rem;
    border-top: 1px solid var(--tm-bg-secondary, #f0f0f0);
}

.order-cancellation-info.pending {
    background: #fff7ed;
    color: #c2410c;
}

.order-cancellation-info i {
    font-size: 0.875rem;
}

.order-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-cancel-request {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 5px;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #dc2626;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-cancel-request:hover {
    background: #fee2e2;
    border-color: #dc2626;
}

.btn-cancel-request i {
    font-size: 0.75rem;
}

/* Cancellation Modal */
.cancellation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--tm-z-loading);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cancellation-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.cancellation-modal-content {
    position: relative;
    background: var(--tm-surface, white);
    border-radius: 12px;
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
}

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

.cancellation-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: #fef2f2;
    border-bottom: 1px solid #fecaca;
}

.cancellation-modal-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #dc2626;
}

.cancellation-modal-header h3 i {
    font-size: 1.125rem;
}

.cancellation-modal-close {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: var(--tm-text-muted, #9ca3af);
    transition: color 0.15s ease;
}

.cancellation-modal-close:hover {
    color: #dc2626;
}

.cancellation-modal-body {
    padding: 1.25rem;
}

.cancellation-modal-info {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    font-size: 0.8125rem;
    color: #0369a1;
    margin-bottom: 1rem;
}

.cancellation-modal-info i {
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.cancellation-modal-body .form-group {
    margin-bottom: 0;
}

.cancellation-modal-body label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--tm-text-secondary, #374151);
}

.cancellation-modal-body textarea {
    width: 100%;
    min-height: 120px;
    padding: 0.75rem;
    border: 1px solid var(--tm-border, #e5e7eb);
    border-radius: 8px;
    font-size: 0.875rem;
    resize: vertical;
    transition: border-color 0.15s ease;
}

.cancellation-modal-body textarea:focus {
    outline: none;
    border-color: #F27A1A;
    box-shadow: 0 0 0 3px rgba(242, 122, 26, 0.1);
}

.cancellation-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: #f9fafb;
    border-top: 1px solid var(--tm-border, #e5e7eb);
}

.btn-modal-cancel {
    padding: 0.625rem 1.25rem;
    background: var(--tm-surface, white);
    border: 1px solid var(--tm-border, #e5e7eb);
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--tm-text-muted, #6b7280);
    cursor: pointer;
    transition: all 0.15s ease;
}

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

.btn-modal-submit {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.625rem 1.25rem;
    background: #dc2626;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--tm-surface, white);
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-modal-submit:hover {
    background: #b91c1c;
}

.btn-modal-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.875rem 1.5rem;
    background: var(--tm-bg-card, #1f2937);
    color: var(--tm-surface, white);
    border-radius: 8px;
    font-size: 0.875rem;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: toastSlideUp 0.3s ease;
}

.toast-notification.success {
    background: #059669;
}

.toast-notification.error {
    background: #dc2626;
}

@keyframes toastSlideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* =============== DESKTOP STYLES =============== */
@media (min-width: 992px) {
    /* Yalnızca siparişler listesi görünürken; tüm /store body’sini bozmasın */
    body:has(#storeOrdersSpaMain .orders-page-container) {
        background-color: var(--tm-bg-secondary, #f8f9fa) !important;
    }
    
    .orders-page-container {
        max-width: 1200px !important;
        margin: 0 auto !important;
        padding: 1.25rem 1.5rem !important;
    }
    
    /* Page Header - Compact */
    .orders-page-header {
        margin-bottom: 0.875rem;
    }
    
    .orders-page-header h1 {
        font-size: 1.25rem;
        font-weight: 700;
        color: var(--tm-text-primary, #1f2937);
        margin: 0 0 0.25rem 0;
        padding-bottom: 0.5rem;
        border-bottom: 3px solid #F27A1A;
        display: inline-block;
    }
    
    .orders-page-header p {
        font-size: 0.8125rem;
        color: var(--tm-text-muted, #6b7280);
        margin: 0.5rem 0 0 0;
    }
    
    /* Stats - Compact */
    .orders-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .stat-item {
        background: var(--tm-surface, white);
        border: 1px solid var(--tm-border, #e5e7eb);
        border-radius: 8px;
        padding: 0.875rem 1rem;
        display: flex;
        flex-direction: column;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
        transition: all 0.2s ease;
    }
    
    .stat-item:hover {
        box-shadow: 0 2px 6px rgba(0,0,0,0.08);
        border-color: #d1d5db;
    }
    
    .stat-value {
        font-size: 1.5rem;
        font-weight: 700;
        color: #F27A1A;
        line-height: 1.2;
    }
    
    .stat-label {
        font-size: 0.75rem;
        color: var(--tm-text-muted, #6b7280);
        margin-top: 0.25rem;
        font-weight: 500;
    }
    
    /* Orders List - Compact */
    .orders-list {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* Order Card - Compact */
    .order-card {
        background: var(--tm-surface, white);
        border: 1px solid var(--tm-border, #e5e7eb);
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 1px 3px rgba(0,0,0,0.03);
        transition: all 0.15s ease;
    }
    
    .order-card:hover {
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        border-color: #d1d5db;
    }
    
    /* Order Header - Compact */
    .order-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.625rem 0.875rem;
        background: var(--tm-bg-secondary, #fafafa);
        border-bottom: 1px solid var(--tm-bg-secondary, #f0f0f0);
    }
    
    .order-info {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }
    
    .order-number {
        font-size: 0.8125rem;
        font-weight: 700;
        color: var(--tm-text-primary, #1f2937);
    }
    
    .order-date {
        font-size: 0.6875rem;
        color: var(--tm-text-muted, #9ca3af);
    }
    
    .order-status {
        display: inline-flex;
        align-items: center;
        gap: 0.25rem;
        padding: 0.25rem 0.5rem;
        border-radius: 12px;
        font-size: 0.6875rem;
        font-weight: 600;
    }
    
    .order-status i {
        font-size: 0.625rem;
    }
    
    .order-status.status-delivered {
        background: #d1fae5;
        color: #059669;
    }
    
    .order-status.status-processing {
        background: #fff3e4;
        color: #d97706;
    }
    
    .order-status.status-shipped {
        background: #dbeafe;
        color: #2563eb;
    }
    
    .order-status.status-cancelled {
        background: #fee2e2;
        color: #dc2626;
    }
    
    .order-status.status-pending,
    .order-status.status-confirmed {
        background: var(--tm-bg-secondary, #f3f4f6);
        color: var(--tm-text-muted, #6b7280);
    }
    
    .order-status.status-refunded {
        background: #fef3c7;
        color: #92400e;
    }
    
    /* Order Items - Compact */
    .order-items {
        padding: 0.5rem 0.875rem;
    }
    
    .order-item {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.375rem 0;
        border-bottom: 1px solid var(--tm-bg-secondary, #f5f5f5);
    }
    
    .order-item:last-child {
        border-bottom: none;
    }
    
    .item-image {
        width: 36px;
        height: 36px;
        border-radius: 4px;
        overflow: hidden;
        flex-shrink: 0;
        background: var(--tm-bg-secondary, #f5f5f5);
    }
    
    .item-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
    
    .image-placeholder {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--tm-bg-secondary, #f5f5f5);
        color: #d1d5db;
        font-size: 0.75rem;
    }
    
    .item-details {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    
    .item-name {
        font-size: 0.75rem;
        font-weight: 600;
        color: var(--tm-text-primary, #1f2937);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .item-meta {
        font-size: 0.625rem;
        color: var(--tm-text-muted, #9ca3af);
    }
    
    .item-price {
        font-size: 0.75rem;
        font-weight: 700;
        color: var(--tm-text-primary, #1f2937);
    }
    
    /* Refunded Item Styles */
    .order-item.refunded {
        opacity: 0.7;
        background: #fef2f2;
        border-left: 2px solid #dc2626;
        padding-left: 0.5rem;
        margin-left: -0.5rem;
        border-radius: 4px;
    }
    
    .order-item.refunded .item-name {
        text-decoration: line-through;
        color: var(--tm-text-muted, #9ca3af);
    }
    
    .order-item.refunded .item-price,
    .item-price.refunded-price {
        text-decoration: line-through;
        color: var(--tm-text-muted, #9ca3af);
    }
    
    .item-refund-badge {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 2px 8px;
        border-radius: 4px;
        font-size: 0.6875rem;
        font-weight: 600;
        background: #dc2626;
        color: var(--tm-surface, white);
        margin-left: 6px;
        text-decoration: none !important;
        white-space: nowrap;
    }
    
    .item-refund-badge i {
        font-size: 0.625rem;
    }
    
    .order-refund-info {
        display: flex;
        align-items: center;
        gap: 0.375rem;
        padding: 0.5rem 0.875rem;
        background: #fef2f2;
        border-top: 1px solid #fecaca;
        font-size: 0.6875rem;
        color: #dc2626;
    }
    
    .order-refund-info i {
        font-size: 0.75rem;
    }
    
    .more-items {
        text-align: center;
        font-size: 0.6875rem;
        color: var(--tm-text-muted, #9ca3af);
        padding: 0.25rem 0;
        font-style: italic;
    }
    
    /* Order Footer - Compact */
    .order-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0.875rem;
        background: var(--tm-bg-secondary, #fafafa);
        border-top: 1px solid var(--tm-bg-secondary, #f0f0f0);
    }
    
    .order-total {
        display: flex;
        align-items: center;
        gap: 0.375rem;
    }
    
    .total-label {
        font-size: 0.75rem;
        color: var(--tm-text-muted, #6b7280);
    }
    
    .total-amount {
        font-size: 0.9375rem;
        font-weight: 700;
        color: #F27A1A;
    }
    
    .btn-detail {
        display: inline-flex;
        align-items: center;
        gap: 0.25rem;
        padding: 0.375rem 0.75rem;
        background: var(--tm-surface, white);
        border: 1px solid #e0e0e0;
        border-radius: 5px;
        font-size: 0.6875rem;
        font-weight: 600;
        color: var(--tm-text-secondary, #374151);
        text-decoration: none;
        transition: all 0.15s ease;
    }
    
    .btn-detail i {
        font-size: 0.625rem;
    }
    
    .btn-detail:hover {
        background: #f9fafb;
        border-color: #F27A1A;
        color: #F27A1A;
    }
    
    /* Pagination - Compact */
    .orders-pagination {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.75rem;
        margin-top: 1rem;
    }
    
    .page-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        background: var(--tm-surface, white);
        border: 1px solid #e0e0e0;
        border-radius: 5px;
        color: var(--tm-text-secondary, #374151);
        text-decoration: none;
        transition: all 0.15s ease;
        font-size: 0.75rem;
    }
    
    .page-btn:hover {
        background: #F27A1A;
        border-color: #F27A1A;
        color: var(--tm-surface, white);
    }
    
    .page-info {
        font-size: 0.75rem;
        color: var(--tm-text-muted, #6b7280);
    }
    
    /* Empty State - Compact */
    .empty-state {
        text-align: center;
        padding: 2rem 1.5rem;
        background: var(--tm-surface, white);
        border-radius: 10px;
        border: 1px solid var(--tm-border, #e5e7eb);
        box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    }
    
    .empty-icon {
        width: 48px;
        height: 48px;
        margin: 0 auto 0.75rem;
        background: #fff3e4;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .empty-icon i {
        font-size: 1.25rem;
        color: #F27A1A;
    }
    
    .empty-state h3 {
        font-size: 0.875rem;
        font-weight: 600;
        color: var(--tm-text-primary, #1f2937);
        margin: 0 0 0.25rem 0;
    }
    
    .empty-state p {
        font-size: 0.75rem;
        color: var(--tm-text-muted, #6b7280);
        margin: 0 0 1rem 0;
    }
    
    .btn-shop {
        display: inline-flex;
        align-items: center;
        padding: 0.5rem 1.25rem;
        background: linear-gradient(135deg, #F27A1A 0%, #FF8C3D 100%);
        border: none;
        border-radius: 6px;
        font-size: 0.75rem;
        font-weight: 600;
        color: var(--tm-surface, white);
        text-decoration: none;
        transition: all 0.15s ease;
        box-shadow: 0 2px 4px rgba(242, 122, 26, 0.2);
    }
    
    .btn-shop:hover {
        transform: translateY(-1px);
        box-shadow: 0 3px 8px rgba(242, 122, 26, 0.3);
        color: var(--tm-surface, white);
    }
}

/* =============== TABLET STYLES =============== */
@media (max-width: 991px) and (min-width: 768px) {
    .orders-page-container {
        max-width: 100%;
        padding: 1rem 1.5rem;
    }
    
    .orders-filters {
        background: var(--tm-surface, white);
        border: 1px solid var(--tm-border, #e5e7eb);
        border-radius: 10px;
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .filter-form {
        display: flex;
        align-items: center;
        gap: 1rem;
        flex-wrap: wrap;
    }
    
    .filter-group {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .filter-group label {
        font-size: 0.8125rem;
        font-weight: 600;
        color: var(--tm-text-secondary, #374151);
    }
    
    .filter-select {
        height: 36px;
        padding: 0 2rem 0 0.75rem;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        font-size: 0.8125rem;
        color: var(--tm-text-secondary, #374151);
        background-color: var(--tm-bg-secondary, #fafafa);
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 0.75rem center;
        min-width: 120px;
    }
    
    .btn-clear-filters {
        display: inline-flex;
        align-items: center;
        gap: 0.375rem;
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
        font-weight: 600;
        color: #dc2626;
        background: #fef2f2;
        border: 1px solid #fecaca;
        border-radius: 6px;
        text-decoration: none;
    }
    
    .orders-stats {
        gap: 0.75rem;
    }
    
    .stat-item {
        padding: 0.875rem 1rem;
    }
}

/* =============== MOBILE STYLES =============== */
@media (max-width: 767px) {
    .orders-page-container {
        padding: 0.75rem;
    }
    
    /* Mobile Header */
    .orders-page-header {
        background: linear-gradient(135deg, #F27A1A 0%, #FF8C3D 100%);
        border-radius: 12px;
        padding: 1.25rem;
        margin-bottom: 1rem;
        text-align: center;
    }
    
    .orders-page-header h1 {
        font-size: 1.25rem;
        font-weight: 700;
        color: var(--tm-surface, white);
        margin: 0 0 0.25rem 0;
        padding: 0;
        border: none;
        display: block;
    }
    
    .orders-page-header p {
        font-size: 0.8125rem;
        color: rgba(255, 255, 255, 0.9);
        margin: 0;
    }
    
    /* Mobile Filters */
    .orders-filters {
        background: var(--tm-surface, white);
        border: 1px solid var(--tm-border, #e5e7eb);
        border-radius: 10px;
        padding: 0.875rem;
        margin-bottom: 0.75rem;
    }
    
    .filter-form {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .filter-group {
        display: flex;
        flex-direction: column;
        gap: 0.375rem;
    }
    
    .filter-group label {
        font-size: 0.75rem;
        font-weight: 600;
        color: var(--tm-text-secondary, #374151);
    }
    
    .filter-select {
        height: 40px;
        width: 100%;
        padding: 0 2.25rem 0 0.875rem;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        font-size: 0.875rem;
        color: var(--tm-text-secondary, #374151);
        background-color: var(--tm-bg-secondary, #fafafa);
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 0.875rem center;
    }
    
    .orders-date-range-field {
        border-color: #e0e0e0;
    }
    
    .orders-date-range-input {
        height: 40px;
        font-size: 0.875rem;
    }
    
    .orders-date-range-btn {
        width: 48px;
        min-height: 40px;
    }
    
    .btn-clear-filters {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.375rem;
        padding: 0.625rem;
        font-size: 0.8125rem;
        font-weight: 600;
        color: #dc2626;
        background: #fef2f2;
        border: 1px solid #fecaca;
        border-radius: 8px;
        text-decoration: none;
        margin-top: 0.25rem;
    }
    
    /* Mobile Stats */
    .orders-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .stat-item {
        background: var(--tm-surface, white);
        border: 1px solid var(--tm-border, #e5e7eb);
        border-radius: 8px;
        padding: 0.75rem;
        text-align: center;
    }
    
    .stat-value {
        font-size: 1.25rem;
        font-weight: 700;
        color: #F27A1A;
        display: block;
    }
    
    .stat-label {
        font-size: 0.625rem;
        color: var(--tm-text-muted, #6b7280);
        display: block;
    }
    
    /* Mobile Order List */
    .orders-list {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .order-card {
        background: var(--tm-surface, white);
        border: 1px solid var(--tm-border, #e5e7eb);
        border-radius: 12px;
        overflow: hidden;
    }
    
    .order-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.875rem 1rem;
        background: var(--tm-bg-secondary, #fafafa);
        border-bottom: 1px solid var(--tm-bg-secondary, #f0f0f0);
    }
    
    .order-info {
        display: flex;
        flex-direction: column;
        gap: 0.125rem;
    }
    
    .order-number {
        font-size: 0.875rem;
        font-weight: 700;
        color: var(--tm-text-primary, #1f2937);
    }
    
    .order-date {
        font-size: 0.6875rem;
        color: var(--tm-text-muted, #9ca3af);
    }
    
    .order-status {
        padding: 0.25rem 0.5rem;
        font-size: 0.6875rem;
    }
    
    .order-items {
        padding: 0.75rem 1rem;
    }
    
    .order-item {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.5rem 0;
        border-bottom: 1px solid var(--tm-bg-secondary, #f5f5f5);
    }
    
    .item-image {
        width: 40px;
        height: 40px;
        border-radius: 6px;
        overflow: hidden;
        flex-shrink: 0;
        background: var(--tm-bg-secondary, #f5f5f5);
    }
    
    .item-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
    
    .item-name {
        font-size: 0.75rem;
    }
    
    .item-meta {
        font-size: 0.625rem;
    }
    
    .item-price {
        font-size: 0.8125rem;
    }
    
    .order-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 1rem;
        background: var(--tm-bg-secondary, #fafafa);
        border-top: 1px solid var(--tm-bg-secondary, #f0f0f0);
    }
    
    .total-label {
        font-size: 0.75rem;
    }
    
    .total-amount {
        font-size: 1rem;
    }
    
    .btn-detail {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
        background: var(--tm-surface, white);
        border: 1px solid #e0e0e0;
        border-radius: 6px;
        color: var(--tm-text-secondary, #374151);
        text-decoration: none;
    }
    
    /* Mobile Pagination */
    .orders-pagination {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.75rem;
        margin-top: 1rem;
    }
    
    .page-btn {
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--tm-surface, white);
        border: 1px solid #e0e0e0;
        border-radius: 6px;
        color: var(--tm-text-secondary, #374151);
        text-decoration: none;
    }
    
    .page-info {
        font-size: 0.75rem;
        color: var(--tm-text-muted, #6b7280);
    }
    
    /* Mobile Empty State */
    .empty-state {
        text-align: center;
        padding: 2rem 1.5rem;
        background: var(--tm-surface, white);
        border-radius: 12px;
        border: 1px solid var(--tm-border, #e5e7eb);
    }
    
    .empty-icon {
        width: 56px;
        height: 56px;
        margin: 0 auto 0.875rem;
        background: #fff3e4;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .empty-icon i {
        font-size: 1.25rem;
        color: #F27A1A;
    }
    
    .empty-state h3 {
        font-size: 0.9375rem;
        font-weight: 600;
        color: var(--tm-text-primary, #1f2937);
        margin: 0 0 0.25rem 0;
    }
    
    .empty-state p {
        font-size: 0.8125rem;
        color: var(--tm-text-muted, #6b7280);
        margin: 0 0 1rem 0;
    }
    
    .btn-shop {
        display: inline-flex;
        align-items: center;
        padding: 0.5rem 1.25rem;
        background: linear-gradient(135deg, #F27A1A 0%, #FF8C3D 100%);
        border: none;
        border-radius: 8px;
        font-size: 0.8125rem;
        font-weight: 600;
        color: var(--tm-surface, white);
        text-decoration: none;
    }
}