:root {
    color-scheme: light;
    --orders-brand: #f45a22;
    --orders-brand-strong: #df4314;
    --orders-brand-soft: #fff1e9;
    --orders-ink: #172033;
    --orders-muted: #6b7280;
    --orders-line: #e8eaf0;
    --orders-canvas: #f4f6fa;
    --orders-surface: #ffffff;
    --orders-sidebar: #111827;
    --orders-sidebar-soft: #1c2739;
    --orders-shadow: 0 18px 45px rgba(31, 41, 55, .08);
    --orders-radius: 22px;
    --orders-skeleton-base: #eef1f5;
    --orders-skeleton-shine: #ffffff;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    overflow-x: hidden;
    background: var(--orders-canvas);
    color: var(--orders-ink);
    font-family: Inter, Poppins, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.hidden {
    display: none !important;
}

.orders-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.orders-auth-state {
    width: min(520px, calc(100% - 32px));
    min-height: 174px;
    margin: clamp(42px, 14vh, 150px) auto 0;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 18px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 26px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 28px 80px rgba(20, 29, 46, .13);
}

.orders-auth-state::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 18% 12%, rgba(244, 90, 34, .16), transparent 27%),
        radial-gradient(circle at 86% 82%, rgba(61, 102, 246, .1), transparent 28%),
        var(--orders-canvas);
}

.orders-auth-mark {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(145deg, #ff7b45, var(--orders-brand-strong));
    box-shadow: 0 15px 30px rgba(244, 90, 34, .25);
    font-size: 1.25rem;
}

.orders-auth-state strong {
    display: block;
    margin-bottom: 5px;
    font-family: Outfit, Inter, sans-serif;
    font-size: 1.2rem;
}

.orders-auth-state p {
    margin: 0;
    color: var(--orders-muted);
    line-height: 1.55;
}

.orders-login-link {
    grid-column: 2;
    width: max-content;
    padding: 11px 15px;
    border-radius: 12px;
    color: #fff;
    background: var(--orders-brand);
    text-decoration: none;
    font-weight: 800;
}

.orders-app {
    min-height: 100vh;
}

.orders-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    width: 270px;
    display: flex;
    flex-direction: column;
    padding: 24px 18px 20px;
    color: #fff;
    background:
        radial-gradient(circle at 100% 0, rgba(244, 90, 34, .22), transparent 35%),
        linear-gradient(180deg, #111827 0%, #162236 100%);
    box-shadow: 12px 0 38px rgba(15, 23, 42, .12);
}

.orders-brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.orders-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
}

.orders-brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: linear-gradient(145deg, #ff7947, #f04422);
    box-shadow: 0 12px 25px rgba(244, 90, 34, .28);
    font-family: Outfit, sans-serif;
    font-size: .86rem;
    font-weight: 900;
    letter-spacing: .02em;
}

.orders-brand strong,
.orders-brand small {
    display: block;
}

.orders-brand strong {
    font-family: Outfit, Inter, sans-serif;
    font-size: 1.15rem;
    letter-spacing: -.02em;
}

.orders-brand small {
    margin-top: 2px;
    color: #94a3b8;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.orders-sidebar-close {
    display: none;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: rgba(255, 255, 255, .08);
}

.orders-nav {
    min-height: 0;
    flex: 1;
    overflow-y: auto;
    padding: 20px 2px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .15) transparent;
}

.orders-nav-label {
    margin: 14px 13px 8px;
    color: #718096;
    font-size: .65rem;
    font-weight: 900;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.orders-nav-label:first-child {
    margin-top: 0;
}

.orders-nav a {
    min-height: 48px;
    display: grid;
    grid-template-columns: 28px 1fr auto;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    padding: 10px 12px;
    border-radius: 13px;
    color: #bdc7d6;
    text-decoration: none;
    font-size: .86rem;
    font-weight: 700;
    transition: color .16s ease, background .16s ease, transform .16s ease;
}

.orders-nav a i {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    color: #aeb8c8;
    background: rgba(255, 255, 255, .055);
}

.orders-nav a b {
    min-width: 27px;
    padding: 3px 7px;
    border-radius: 99px;
    color: #ffb596;
    background: rgba(244, 90, 34, .16);
    font-size: .68rem;
    text-align: center;
}

.orders-nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, .07);
    transform: translateX(2px);
}

.orders-nav a.active {
    color: #fff;
    background: linear-gradient(100deg, rgba(244, 90, 34, .97), rgba(255, 118, 70, .86));
    box-shadow: 0 12px 26px rgba(244, 90, 34, .2);
}

.orders-nav a.active i {
    color: #fff;
    background: rgba(255, 255, 255, .16);
}

.orders-nav a.active b {
    color: #fff;
    background: rgba(255, 255, 255, .18);
}

.orders-sidebar-foot {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 11px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 15px;
    background: rgba(255, 255, 255, .045);
}

.orders-live-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #2ed17e;
    box-shadow: 0 0 0 6px rgba(46, 209, 126, .12);
}

.orders-sidebar-foot strong,
.orders-sidebar-foot small {
    display: block;
}

.orders-sidebar-foot strong {
    font-size: .72rem;
}

.orders-sidebar-foot small {
    margin-top: 3px;
    color: #8290a5;
    font-size: .63rem;
}

.orders-sidebar-backdrop {
    display: none;
}

.orders-main {
    min-height: 100vh;
    margin-left: 270px;
    padding: 28px clamp(22px, 3.3vw, 52px) 60px;
}

.orders-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 24px;
}

.orders-header-copy {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.orders-eyebrow,
.orders-section-kicker {
    margin: 0 0 5px;
    color: var(--orders-brand-strong);
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.orders-eyebrow {
    display: flex;
    align-items: center;
    gap: 7px;
}

.orders-eyebrow span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--orders-brand);
    box-shadow: 0 0 0 5px rgba(244, 90, 34, .11);
}

.orders-header h1 {
    margin: 0;
    font-family: Outfit, Inter, sans-serif;
    font-size: clamp(1.75rem, 2.7vw, 2.45rem);
    line-height: 1.05;
    letter-spacing: -.045em;
}

.orders-header-copy>div>p:last-child {
    margin: 7px 0 0;
    color: var(--orders-muted);
    font-size: .9rem;
}

.orders-menu-button,
.orders-icon-button {
    width: 43px;
    height: 43px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid var(--orders-line);
    border-radius: 13px;
    color: var(--orders-ink);
    background: var(--orders-surface);
    cursor: pointer;
}

.orders-menu-button {
    display: none;
}

.orders-icon-button {
    display: grid;
}

.orders-header-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.orders-sync-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 12px;
    border: 1px solid #dcece3;
    border-radius: 12px;
    color: #23724d;
    background: #f1fbf5;
    font-size: .75rem;
    font-weight: 800;
}

.orders-sync-label i {
    color: #27bd71;
    font-size: .47rem;
}

.orders-refresh-button {
    min-height: 43px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border: 0;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(135deg, #ff7440, var(--orders-brand-strong));
    box-shadow: 0 12px 24px rgba(244, 90, 34, .2);
    cursor: pointer;
    font-size: .82rem;
    font-weight: 850;
}

.orders-refresh-button.loading i {
    animation: ordersSpin .85s linear infinite;
}

@keyframes ordersSpin {
    to { transform: rotate(360deg); }
}

.orders-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.orders-stat-card {
    position: relative;
    overflow: hidden;
    min-height: 128px;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 14px;
    padding: 20px;
    border: 1px solid var(--orders-line);
    border-radius: 19px;
    background: var(--orders-surface);
    box-shadow: 0 10px 28px rgba(31, 41, 55, .045);
}

.orders-stat-card::after {
    content: "";
    position: absolute;
    width: 70px;
    height: 70px;
    right: -27px;
    top: -27px;
    border-radius: 50%;
    background: currentColor;
    opacity: .055;
}

.orders-stat-icon {
    width: 45px;
    height: 45px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: currentColor;
    background: color-mix(in srgb, currentColor 11%, white);
}

.orders-stat-card.primary { color: #e75220; }
.orders-stat-card.warning { color: #c78108; }
.orders-stat-card.unpaid { color: #6557d9; }
.orders-stat-card.success { color: #15955a; }

.orders-stat-card p,
.orders-stat-card small {
    margin: 0;
    color: var(--orders-muted);
}

.orders-stat-card p {
    font-size: .7rem;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.orders-stat-card strong {
    display: block;
    margin: 3px 0 2px;
    color: var(--orders-ink);
    font-family: Outfit, Inter, sans-serif;
    font-size: 1.65rem;
    letter-spacing: -.035em;
}

.orders-stat-card small {
    font-size: .7rem;
}

.orders-workspace {
    min-width: 0;
    padding: 23px;
    border: 1px solid var(--orders-line);
    border-radius: var(--orders-radius);
    background: var(--orders-surface);
    box-shadow: var(--orders-shadow);
}

.orders-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 18px;
}

.orders-toolbar h2 {
    margin: 0;
    font-family: Outfit, Inter, sans-serif;
    font-size: 1.35rem;
    letter-spacing: -.025em;
}

.orders-search {
    width: min(460px, 48%);
    min-height: 46px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    padding: 0 12px 0 15px;
    border: 1px solid var(--orders-line);
    border-radius: 14px;
    color: #8a93a3;
    background: #f7f8fb;
    transition: border .15s ease, box-shadow .15s ease, background .15s ease;
}

.orders-search button {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 9px;
    color: #fff;
    background: var(--orders-brand);
    cursor: pointer;
}

.orders-search.searching button i {
    animation: ordersSpin .85s linear infinite;
}

.orders-search:focus-within {
    border-color: rgba(244, 90, 34, .5);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(244, 90, 34, .09);
}

.orders-search input {
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--orders-ink);
    background: transparent;
    font-size: .84rem;
}

.orders-search kbd {
    padding: 3px 7px;
    border: 1px solid #dfe2e8;
    border-radius: 7px;
    color: #8a93a3;
    background: #fff;
    font-size: .65rem;
    font-family: inherit;
}

.orders-filter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 10px 0 15px;
    border-bottom: 1px solid var(--orders-line);
}

.orders-tabs {
    min-width: 0;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 2px;
    scrollbar-width: none;
}

.orders-tabs::-webkit-scrollbar {
    display: none;
}

.orders-tabs button {
    flex: 0 0 auto;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border: 0;
    border-radius: 10px;
    color: #697386;
    background: transparent;
    cursor: pointer;
    font-size: .74rem;
    font-weight: 800;
}

.orders-tabs button span {
    min-width: 21px;
    padding: 2px 6px;
    border-radius: 99px;
    background: #edf0f5;
    font-size: .63rem;
    text-align: center;
}

.orders-tabs button.active {
    color: var(--orders-brand-strong);
    background: var(--orders-brand-soft);
}

.orders-tabs button.active span {
    color: #fff;
    background: var(--orders-brand);
}

.orders-result-meta {
    flex: 0 0 auto;
    margin: 0;
    color: #8a93a3;
    font-size: .72rem;
    font-weight: 700;
}

.orders-list {
    display: grid;
    gap: 10px;
    padding-top: 14px;
}

.order-card {
    border: 1px solid var(--orders-line);
    border-radius: 17px;
    background: #fff;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.order-card:hover,
.order-card[open] {
    border-color: rgba(244, 90, 34, .24);
    box-shadow: 0 12px 30px rgba(31, 41, 55, .07);
}

.order-card:hover {
    transform: translateY(-1px);
}

.order-card summary {
    min-height: 92px;
    display: grid;
    grid-template-columns: minmax(155px, 1.1fr) minmax(180px, 1.5fr) minmax(185px, 1.5fr) auto 28px;
    align-items: center;
    gap: 18px;
    padding: 16px 18px;
    list-style: none;
    cursor: pointer;
}

.order-card summary::-webkit-details-marker {
    display: none;
}

.order-cell {
    min-width: 0;
}

.order-cell small {
    display: block;
    margin-bottom: 5px;
    color: #929aaa;
    font-size: .62rem;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.order-cell strong,
.order-cell span {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: #263044;
    font-size: .82rem;
    font-weight: 800;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-cell span {
    color: #667085;
    font-size: .76rem;
    font-weight: 650;
}

.order-id-cell strong {
    color: var(--orders-brand-strong);
}

.order-status-stack {
    display: grid;
    justify-items: end;
    gap: 6px;
}

.order-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 9px;
    border-radius: 99px;
    font-size: .66rem;
    font-weight: 900;
    text-transform: capitalize;
}

.order-status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.order-status.pending { color: #ad6e00; background: #fff8e6; }
.order-status.unpaid { color: #6551c9; background: #f3f0ff; }
.order-status.processing { color: #1870b6; background: #edf7ff; }
.order-status.delivered { color: #167c4d; background: #eaf9f1; }
.order-status.attention { color: #c53939; background: #fff0f0; }

.order-total {
    color: var(--orders-ink);
    font-family: Outfit, Inter, sans-serif;
    font-size: .95rem;
    font-weight: 850;
}

.order-chevron {
    color: #9ba3b2;
    transition: transform .16s ease;
}

.order-card[open] .order-chevron {
    transform: rotate(180deg);
}

.order-details {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 13px;
    padding: 0 18px 18px;
}

.order-detail-panel {
    min-width: 0;
    padding: 13px;
    border-radius: 13px;
    background: #f7f8fb;
}

.order-detail-panel.products {
    grid-column: span 2;
}

.order-detail-panel small,
.order-detail-panel strong,
.order-detail-panel span {
    display: block;
}

.order-detail-panel small {
    margin-bottom: 6px;
    color: #929aaa;
    font-size: .61rem;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.order-detail-panel strong,
.order-detail-panel span {
    overflow-wrap: anywhere;
    color: #344054;
    font-size: .75rem;
    line-height: 1.5;
}

.order-product-line + .order-product-line {
    margin-top: 4px;
}

.orders-skeleton {
    height: 92px;
    overflow: hidden;
    border: 1px solid var(--orders-line);
    border-radius: 17px;
    background: linear-gradient(
        90deg,
        var(--orders-skeleton-base) 20%,
        var(--orders-skeleton-shine) 38%,
        var(--orders-skeleton-base) 56%
    );
    background-size: 240% 100%;
    animation: ordersSkeleton 1.25s ease-in-out infinite;
}

@keyframes ordersSkeleton {
    to { background-position: -220% 0; }
}

.orders-empty {
    min-height: 300px;
    display: grid;
    place-items: center;
    align-content: center;
    padding: 35px 18px;
    text-align: center;
}

.orders-empty>span {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 17px;
    color: var(--orders-brand);
    background: var(--orders-brand-soft);
}

.orders-empty h3 {
    margin: 14px 0 5px;
    font-family: Outfit, Inter, sans-serif;
}

.orders-empty p {
    margin: 0 0 14px;
    color: var(--orders-muted);
    font-size: .84rem;
}

.orders-empty button {
    padding: 9px 13px;
    border: 1px solid var(--orders-line);
    border-radius: 11px;
    color: var(--orders-ink);
    background: #fff;
    cursor: pointer;
    font-size: .76rem;
    font-weight: 800;
}

.orders-history-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px 4px 2px;
}

.orders-history-actions > button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 15px;
    border: 1px solid var(--orders-line);
    border-radius: 12px;
    cursor: pointer;
    font-size: .76rem;
    font-weight: 700;
}

.orders-load-more {
    color: #fff;
    border-color: transparent !important;
    background: linear-gradient(135deg, #ff7440, var(--orders-brand-strong));
    box-shadow: 0 10px 22px rgba(244, 90, 34, .16);
}

.orders-load-all {
    color: var(--orders-ink);
    background: var(--orders-surface);
}

.orders-history-actions > button:disabled {
    cursor: wait;
    opacity: .65;
}

.orders-history-actions p {
    flex-basis: 100%;
    margin: 2px 0 0;
    color: var(--orders-muted);
    font-size: .7rem;
    text-align: center;
}

[data-theme="dark"] {
    color-scheme: dark;
    --orders-ink: #edf2f8;
    --orders-muted: #9aa6b7;
    --orders-line: #2b3545;
    --orders-canvas: #111722;
    --orders-surface: #182131;
    --orders-shadow: 0 20px 48px rgba(0, 0, 0, .2);
    --orders-skeleton-base: #202b3c;
    --orders-skeleton-shine: #2c394d;
}

[data-theme="dark"] .orders-skeleton {
    border-color: #2f3b4d;
}

[data-theme="dark"] .orders-auth-state,
[data-theme="dark"] .orders-stat-card,
[data-theme="dark"] .orders-workspace,
[data-theme="dark"] .order-card,
[data-theme="dark"] .orders-menu-button,
[data-theme="dark"] .orders-icon-button {
    background: var(--orders-surface);
}

[data-theme="dark"] .orders-search,
[data-theme="dark"] .order-detail-panel {
    background: #121a27;
}

[data-theme="dark"] .orders-search kbd,
[data-theme="dark"] .orders-empty button,
[data-theme="dark"] .orders-load-all {
    border-color: var(--orders-line);
    background: #202a3a;
}

[data-theme="dark"] .order-cell strong,
[data-theme="dark"] .order-total,
[data-theme="dark"] .order-detail-panel strong,
[data-theme="dark"] .order-detail-panel span {
    color: var(--orders-ink);
}

[data-theme="dark"] :is(.orders-header h1, .orders-stat-card strong, .orders-toolbar h2, .order-cell strong, .order-total) {
    color: var(--orders-ink);
}

[data-theme="dark"] :is(.orders-header-copy > div > p:last-child, .orders-stat-card p, .orders-stat-card small, .orders-result-meta, .order-cell span, .order-detail-panel small) {
    color: var(--orders-muted);
}

[data-theme="dark"] .orders-search input {
    color: var(--orders-ink);
    caret-color: #ff8a5d;
}

[data-theme="dark"] .orders-search input::placeholder {
    color: #8794a8;
    opacity: 1;
}

[data-theme="dark"] .orders-tabs button:not(.active) {
    color: #9aa6b7;
}

@media (max-width: 1180px) {
    .orders-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .order-card summary {
        grid-template-columns: minmax(145px, 1fr) minmax(180px, 1.4fr) minmax(155px, 1fr) auto 24px;
        gap: 12px;
    }

    .order-customer-cell span {
        max-width: 190px;
    }
}

@media (max-width: 900px) {
    .orders-sidebar {
        width: min(310px, 88vw);
        transform: translateX(-105%);
        transition: transform .22s ease;
    }

    body.orders-sidebar-open {
        overflow: hidden;
    }

    body.orders-sidebar-open .orders-sidebar {
        transform: translateX(0);
    }

    .orders-sidebar-close,
    .orders-menu-button {
        display: grid;
    }

    .orders-sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 55;
        border: 0;
        background: rgba(15, 23, 42, .55);
        backdrop-filter: blur(4px);
    }

    body.orders-sidebar-open .orders-sidebar-backdrop {
        display: block;
    }

    .orders-main {
        margin-left: 0;
        padding: 24px 20px 54px;
    }
}

@media (max-width: 720px) {
    .orders-header {
        align-items: flex-start;
    }

    .orders-sync-label {
        display: none;
    }

    .orders-refresh-button span {
        display: none;
    }

    .orders-refresh-button {
        width: 43px;
        padding: 0;
        justify-content: center;
    }

    .orders-toolbar {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
    }

    .orders-search {
        width: 100%;
    }

    .orders-filter-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .orders-tabs {
        width: 100%;
    }

    .order-card summary {
        min-height: 0;
        grid-template-columns: 1fr auto 22px;
        gap: 11px;
        padding: 15px;
    }

    .order-customer-cell {
        grid-column: 1 / -1;
        grid-row: 2;
        padding-top: 10px;
        border-top: 1px solid var(--orders-line);
    }

    .order-product-cell {
        grid-column: 1 / -1;
        grid-row: 3;
    }

    .order-status-stack {
        grid-column: 2;
        grid-row: 1;
    }

    .order-chevron {
        grid-column: 3;
        grid-row: 1;
    }

    .order-details {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 0 15px 15px;
    }

    .order-detail-panel.products {
        grid-column: 1 / -1;
    }
}

@media (max-width: 540px) {
    .orders-main {
        padding: max(17px, env(safe-area-inset-top)) 12px max(40px, env(safe-area-inset-bottom));
    }

    .orders-header {
        gap: 12px;
        margin-bottom: 18px;
    }

    .orders-header-copy {
        gap: 10px;
    }

    .orders-header h1 {
        font-size: 1.65rem;
    }

    .orders-header-copy>div>p:last-child {
        display: none;
    }

    .orders-header-actions {
        gap: 7px;
    }

    .orders-icon-button,
    .orders-menu-button,
    .orders-refresh-button {
        width: 40px;
        height: 40px;
        min-height: 40px;
        border-radius: 12px;
    }

    .orders-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .orders-stat-card {
        min-height: 103px;
        grid-template-columns: 1fr;
        gap: 7px;
        padding: 14px;
    }

    .orders-stat-icon {
        width: 34px;
        height: 34px;
        border-radius: 11px;
        font-size: .82rem;
    }

    .orders-stat-card strong {
        font-size: 1.35rem;
    }

    .orders-stat-card small {
        display: none;
    }

    .orders-workspace {
        padding: 15px 12px;
        border-radius: 18px;
    }

    .orders-toolbar h2 {
        font-size: 1.2rem;
    }

    .orders-search kbd {
        display: none;
    }

    .orders-search {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .orders-tabs {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
        overflow: visible;
    }

    .orders-tabs button {
        min-width: 0;
        justify-content: center;
        padding-inline: 7px;
    }

    .orders-history-actions > button {
        flex: 1 1 150px;
    }

    .order-details {
        grid-template-columns: 1fr;
    }

    .order-detail-panel,
    .order-detail-panel.products {
        grid-column: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
