.order-history-desktop { display: none; }
@media (min-width: 769px) {
.order-history-desktop { display: block; }
.order-history-legacy { display: none; }

    .tlc-theme :is(.order-page, .order-history-layout, #buy_mutiple) {
        font-family: inherit; font-size: 13px; line-height: 1.6; letter-spacing: 0;
    }
    .tlc-theme :is(.order-page, .order-history-layout, #buy_mutiple) .btn {
        min-height: 38px; padding: 8px 13px; font-size: 13px; font-weight: 600; gap: 7px;
    }
    .tlc-theme :is(.order-page, .order-history-layout, #buy_mutiple) :is(.form-control, .form-select) {
        min-height: 42px; font-size: 13px; font-weight: 400; letter-spacing: 0;
    }
    .tlc-theme :is(.order-page, .order-history-layout, #buy_mutiple) .form-label {
        font-size: 12px; font-weight: 600; margin-bottom: 7px; letter-spacing: 0;
    }
    .tlc-theme .order-filter-card { box-shadow: none; background: transparent; border: 0; margin-bottom: 20px; }
    .tlc-theme .order-filter-card .card-body { padding: 0; }
    .order-filter-grid { display: grid; grid-template-columns: minmax(200px, 1.5fr) repeat(4, minmax(140px, 1fr)); gap: 14px; align-items: end; }
    .order-filter-grid > div { width: auto; min-width: 0; }
    .tlc-theme .order-history-table { font-family: inherit; font-size: 13px; letter-spacing: 0; }
    .tlc-theme .order-history-table tbody { font-weight: 400; }
    .tlc-theme .order-history-table :is(th, td) { border-color: var(--tlc-line); }
    .tlc-theme .order-history-table td { padding: 16px 14px; line-height: 1.65; }
    .tlc-theme .order-history-table th { padding: 12px 14px; font-size: 12px; font-weight: 600; letter-spacing: 0; }
    .order-history-table .order-data-list { margin: 0; padding: 0; list-style: none; min-width: 155px; font-size: 13px; }
    .order-history-table .order-data-list li { margin: 0 0 4px; color: var(--tlc-muted, #697988); white-space: normal; }
    .order-history-table .order-date-list { min-width: 195px; font-size: 12px; }
    .order-history-table .order-value { color: var(--tlc-ink, #172f43); font-weight: 600; font-variant-numeric: tabular-nums; }
    .order-history-table .order-server-cell { font-weight: 500; }
    .order-history-table .order-uid-cell a { font-weight: 500; }
    @media (max-width: 1199px) {
        .order-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
        .order-filter-grid > div:first-child { grid-column: 1 / -1; }
    }
    @media (max-width: 575px) {
        .order-filter-grid { gap: 12px; }
        .order-filter-grid > div:last-child { grid-column: 1 / -1; }
        .tlc-theme :is(.order-page, .order-history-layout, #buy_mutiple) :is(.form-control, .form-select) { font-size: 16px; }
    }
    .order-history-layout, .order-history-layout > .col-12 { min-width: 0; max-width: 100%; }
    .order-history-layout > .col-12 { padding-inline: 0; }
    .order-history-scroll { width: 100%; max-width: 100%; overflow-x: auto; padding-bottom: 8px; }
    .order-history-scroll:focus-visible { outline: 2px solid var(--tlc-accent, #087f76); outline-offset: 2px; }
    .table .btn.order-action-button {
        display: inline-flex; align-items: center; justify-content: center; gap: 8px;
        min-height: 36px; padding: 7px 12px; border-radius: 8px;
        border: 1px solid var(--tlc-line, #dce5eb); background: var(--tlc-bg, #f5f7fa);
        color: var(--tlc-ink, #233e50); font-size: 12px; font-weight: 600;
        white-space: nowrap; box-shadow: none;
    }
    .table .order-action-button:is(:hover, :focus-visible, [aria-expanded="true"]) {
        border-color: var(--tlc-accent, #087f76); color: var(--tlc-accent, #087f76);
    }
    .table .order-action-button.dropdown-toggle::after { margin-left: 3px; vertical-align: middle; }
    .order-row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
    .table .order-action-menu { min-width: 195px; padding: 6px; border-radius: 10px; }
    .table .order-action-menu .dropdown-item {
        display: block; padding: 9px 12px; border: 0; border-radius: 6px;
        font-size: 13px; font-weight: 500; opacity: 1; white-space: nowrap;
    }
    .table .order-uid-cell { min-width: 320px; width: 360px; max-width: 420px; }
    .table .order-server-cell { min-width: 280px; width: 320px; max-width: 380px; }
    .table :is(.order-uid-cell, .order-server-cell),
    .table :is(.order-uid-cell, .order-server-cell) :is(a, span, small) {
        white-space: normal !important;
        overflow-wrap: anywhere;
        word-break: normal;
        text-overflow: clip;
        line-height: 1.65;
    }
    .order-cell-content { display: block; width: 100%; }
    @media (max-width: 768px) {
        table.order-history-table tbody td:is(.order-uid-cell, .order-server-cell) {
            padding: 10px !important;
        }
        table.order-history-table tbody td:is(.order-uid-cell, .order-server-cell)::before {
            position: static;
            display: block;
            width: auto;
            margin-bottom: 6px;
        }
        [data-color-mode="dark"] .tlc-theme table.order-history-table tbody tr {
            background: var(--tlc-surface);
            border-color: var(--tlc-line);
        }
    }

.order-history-table .order-summary-row { cursor: pointer; }
.order-history-table .order-summary-row:focus-visible { outline: 2px solid var(--tlc-accent, #087f76); outline-offset: -2px; }
.order-history-table .order-summary-row.is-expanded { background: var(--tlc-bg, #f5f8f7); }
.table.order-history-table .order-summary-row > td { padding: 10px 12px; font-size: 12px; line-height: 1.5; }
.table.order-history-table .order-uid-cell { min-width: 240px; width: 34%; max-width: 480px; }
.table.order-history-table .order-server-cell { min-width: 180px; width: 240px; max-width: 300px; }
.table.order-history-table .order-summary-row .order-cell-content { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.order-detail-toggle { display: inline-flex; align-items: center; gap: 7px; background: none; border: 0; padding: 5px 0; color: var(--tlc-accent, #087f76); font-size: 12px; font-weight: 600; white-space: nowrap; }
.order-detail-toggle i { font-size: 9px; }
.order-detail-toggle[aria-expanded="true"] i { transform: rotate(90deg); }
.order-select-control { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; min-height: 32px; margin: 0; }
.order-select-control input { width: 16px; height: 16px; accent-color: var(--tlc-accent, #087f76); }
.order-copy-uid { padding: 3px; border: 0; background: none; color: var(--tlc-muted, #73847e); }
.order-created-cell { min-width: 135px; font-size: 11px !important; }
.order-status-cell, .order-quantity-cell { white-space: nowrap; }
.order-history-table .order-detail-row[hidden] { display: none !important; }
.table.order-history-table .order-detail-row > td { padding: 0; background: var(--tlc-bg, #f6f8fa); }
.order-expanded-content { padding: 12px 16px; }
.order-detail-top { display: flex; align-items: center; gap: 20px; margin-bottom: 12px; }
.order-progress-summary { flex: 1; min-width: 0; }
.order-run-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 11px; margin-bottom: 6px; }
.order-run-heading > span { color: var(--tlc-muted, #73847e); font-variant-numeric: tabular-nums; }
.order-run-track { height: 5px; border-radius: 6px; background: var(--tlc-line, #dfe7e4); overflow: hidden; }
.order-run-track > span { display: block; height: 100%; background: var(--tlc-accent, #087f76); border-radius: inherit; }
.order-detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 20px; margin: 0; }
.order-detail-grid dt, .order-detail-dates dt, .order-detail-notes dt { font-size: 11px; font-weight: 400; color: var(--tlc-muted, #73847e); margin: 0 0 2px; }
.order-detail-grid dd, .order-detail-dates dd, .order-detail-notes dd { margin: 0; font-size: 12px; color: var(--tlc-ink, #233e50); overflow-wrap: anywhere; }
.order-detail-grid dd { font-weight: 600; font-variant-numeric: tabular-nums; }
.order-detail-dates { display: flex; flex-wrap: wrap; gap: 6px 24px; border-top: 1px solid var(--tlc-line, #e3e9ee); padding-top: 8px; margin: 10px 0 0; }
.order-detail-dates > div { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.order-detail-dates dd { font-size: 11px; }
.order-detail-notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 8px 20px; margin: 10px 0 0; }
.order-detail-text { white-space: pre-wrap; max-height: 120px; overflow-y: auto; }
.order-detail-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.order-detail-tools .btn { min-height: 32px !important; padding: 5px 9px !important; font-size: 11px !important; margin-top: 0 !important; }
.table.order-history-table .order-summary-row.is-expanded .order-cell-content { -webkit-line-clamp: unset; }
.mobile-bulk-action-bar { display: none; }
.table.order-history-table .order-actions-cell { width: 48px; min-width: 48px; padding-inline: 6px; text-align: center; }
.table.order-history-table .order-summary-row > .order-actions-cell { padding-inline: 6px; }
.table.order-history-table .order-row-actions { justify-content: center; gap: 0; }
.table.order-history-table .btn.order-action-button { width: 32px; min-width: 32px; height: 32px; min-height: 32px; padding: 0; gap: 0; border-radius: 6px; }
@media (max-width: 768px) {
    .order-history-scroll { overflow: visible; }
    table.order-history-table { display: block; border: 0; width: 100%; }
    table.order-history-table thead, table.order-history-table tfoot { display: none; }
    table.order-history-table tbody { display: block; }
    table.order-history-table .order-summary-row {
        display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px;
        border: 1px solid var(--tlc-line, #e3e9ee); border-radius: 10px; background: var(--tlc-surface, #fff);
        padding: 12px; margin-bottom: 10px;
    }
    table.order-history-table .order-summary-row.is-expanded { border-radius: 10px 10px 0 0; margin-bottom: 0; }
    table.order-history-table .order-summary-row > td {
        display: block; padding: 0 !important; border: 0; min-width: 0; width: auto; max-width: none;
        background: transparent; box-shadow: none;
    }
    table.order-history-table .order-summary-row > td::before { position: static; display: block; width: auto; content: attr(data-label); color: var(--tlc-muted, #73847e); font-size: 10px; margin: 0 0 3px; }
    table.order-history-table .order-summary-row .order-id-cell::before,
    table.order-history-table .order-summary-row .order-check-cell::before { display: none; }
    table.order-history-table .order-check-cell { grid-column: 2; grid-row: 1; justify-self: end; }
    table.order-history-table .order-actions-cell { grid-column: 1/-1; width: auto; min-width: 0; justify-self: start; }
    table.order-history-table .btn.order-action-button { width: 40px; height: 40px; min-height: 40px; }
    table.order-history-table .order-actions-cell::before { display: none; }
    table.order-history-table .order-uid-cell, table.order-history-table .order-server-cell { grid-column: 1/-1; }
    table.order-history-table .order-created-cell { grid-column: 1/-1; }
    table.order-history-table .order-detail-row { display: block; margin-bottom: 10px; border: 1px solid var(--tlc-line, #e3e9ee); border-top: 0; border-radius: 0 0 10px 10px; overflow: hidden; }
    table.order-history-table .order-detail-row > td { display: block; width: 100%; padding: 0; border: 0; }
    .order-expanded-content { padding: 10px 12px; }
    .order-detail-top { flex-wrap: wrap; gap: 8px; }
    .order-progress-summary { flex-basis: 100%; }
    .order-detail-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px 14px; }
    .order-detail-toggle { min-height: 36px; }
    .order-copy-uid { min-height: 32px; min-width: 32px; }
    .order-select-control { min-height: 36px; min-width: 36px; }
    .mobile-bulk-action-bar { position: fixed; bottom: 70px; left: 10px; right: 10px; z-index: 1055; }
    .mobile-bulk-action-bar.show { display: block; }
    .mobile-bulk-action-content { padding: 12px; border: 1px solid var(--tlc-line, #e3e9ee); border-radius: 10px; background: var(--tlc-surface, #fff); box-shadow: 0 4px 20px #0002; }
    .mobile-bulk-action-count { font-size: 12px; margin-bottom: 8px; }
    .mobile-select-all-buttons, .mobile-bulk-action-buttons { display: flex; gap: 8px; margin-top: 6px; }
    .mobile-select-all-buttons .btn, .mobile-bulk-action-buttons .btn { flex: 1; }
}

.table.order-history-table .order-copy-cell { cursor: copy; }
.table.order-history-table .order-copy-cell:hover { color: var(--tlc-accent, #087f76); background: var(--tlc-bg, #f5f8f7); }
.order-copy-value { border: 0; background: transparent; padding: 5px 2px; color: var(--tlc-accent, #087f76); font: inherit; font-weight: 600; cursor: copy; white-space: nowrap; }
.order-id-cell .order-detail-toggle { min-width: 24px; justify-content: center; margin-right: 3px; }
.order-copy-cell:focus-visible, .order-copy-value:focus-visible { outline: 2px solid var(--tlc-accent, #087f76); outline-offset: -2px; }

.table.order-history-table .order-table-state > td { padding: 30px 12px; text-align: center; }
.order-table-state > td > div { display: flex; justify-content: center; align-items: center; gap: 10px; font-size: 13px; color: var(--tlc-muted, #73847e); }
.order-table-spinner { width: 20px; height: 20px; border: 2px solid var(--tlc-line, #dfe7e4); border-top-color: var(--tlc-accent, #087f76); border-radius: 50%; animation: order-table-spin .7s linear infinite; flex-shrink: 0; }
@keyframes order-table-spin { to { transform: rotate(360deg); } }
@media (max-width: 768px) { table.order-history-table .order-table-state, table.order-history-table .order-table-state > td { display: block; width: 100%; } }
@media (prefers-reduced-motion: reduce) { .order-table-spinner { animation: none; } }

.table.order-history-table .order-uid-link { display: inline; width: auto; padding: 0; cursor: pointer; }


.order-quantity-summary { display: flex; align-items: baseline; gap: 4px; font-variant-numeric: tabular-nums; }
.order-quantity-summary strong { font-size: 12px; font-weight: 600; }
.order-quantity-summary > span { font-size: 10px; color: var(--tlc-muted, #73847e); }
.order-quantity-progress { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.order-quantity-track { flex: 1; min-width: 40px; height: 4px; border-radius: 4px; overflow: hidden; background: var(--tlc-line, #dfe7e4); }
.order-quantity-track > span { display: block; height: 100%; border-radius: inherit; background: var(--tlc-accent, #087f76); }
.order-quantity-progress small { font-size: 10px; color: var(--tlc-muted, #73847e); min-width: 28px; text-align: right; font-variant-numeric: tabular-nums; }
}
