/* ================= RESET ================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #06b6d4;
    --accent-color: #7c3aed;

    --page-background: #eef4ff;
    --card-background: #ffffff;
    --soft-blue: #dbeafe;

    --text-dark: #172033;
    --text-light: #64748b;
    --border-color: #e2e8f0;

    --container-width: 540px;
    --navigation-height: 78px;

    --small-shadow: 0 5px 15px rgba(37, 99, 235, 0.08);
    --card-shadow: 0 12px 30px rgba(30, 64, 175, 0.14);
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    background: #dce7f8;
    color: var(--text-dark);
    font-family: Arial, Helvetica, sans-serif;
}

button,
a {
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}

button {
    border: none;
    outline: none;
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}


/* ================= ORDER APP ================= */

.order-app {
    position: relative;
    width: 100%;
    max-width: var(--container-width);
    min-height: 100vh;
    margin: 0 auto;
    overflow: hidden;
    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #eff6ff 55%,
            #f8fafc 100%
        );
}


/* ================= ORDER SUMMARY ================= */

.order-summary-section {
    position: relative;
    min-height: 245px;
    border-radius: 0 0 45px 45px;
    background:
        linear-gradient(
            135deg,
            var(--primary-color),
            var(--secondary-color)
        );
}

.order-header {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 125px;
    padding: 30px 18px 20px;
}

.order-header h1 {
    color: #ffffff;
    font-size: 28px;
    font-weight: 800;
}


/* ================= HOLDINGS CARD ================= */

.holdings-card {
    position: absolute;
    right: 18px;
    bottom: -58px;
    left: 18px;
    z-index: 5;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 158px;
    padding: 28px 20px;
    border: 1px solid rgba(37, 99, 235, 0.1);
    border-radius: 20px;
    background:
        linear-gradient(
            145deg,
            #ffffff 0%,
            #dbeafe 52%,
            #cffafe 100%
        );
    box-shadow: var(--card-shadow);
}

.holding-item {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-direction: column;
}

.holding-item strong {
    color: var(--text-dark);
    font-size: 25px;
    font-weight: 800;
}

.holding-item span {
    margin-top: 5px;
    color: var(--text-light);
    font-size: 15px;
    font-weight: 700;
}

.holding-divider {
    width: 2px;
    height: 45px;
    margin: 0 20px;
    border-radius: 5px;
    background: rgba(100, 116, 139, 0.35);
}


/* ================= ORDER MAIN ================= */

.order-main {
    padding: 95px 18px 125px;
}


/* ================= GET ALL BUTTON ================= */

.get-all-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 72px;
    border-radius: 38px;
    background:
        linear-gradient(
            135deg,
            #bfdbfe,
            #a5f3fc
        );
    color: #64748b;
    font-size: 21px;
    font-weight: 800;
    box-shadow: var(--small-shadow);
}

.get-all-button:disabled {
    cursor: not-allowed;
    opacity: 0.85;
}


/* ================= ORDER TABS ================= */

.order-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
    margin-top: 25px;
}

.order-tab {
    position: relative;
    min-height: 75px;
    padding: 20px 8px;
    background: transparent;
    color: var(--text-light);
    font-size: 19px;
    font-weight: 800;
    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

.order-tab:active {
    transform: scale(0.95);
}

.order-tab.active {
    color: var(--primary-color);
}

.order-tab.active::after {
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 48px;
    height: 5px;
    border-radius: 10px;
    background:
        linear-gradient(
            90deg,
            var(--primary-color),
            var(--secondary-color)
        );
    content: "";
    transform: translateX(-50%);
}


/* ================= ORDER PANELS ================= */

.order-panel {
    display: none;
}

.order-panel.active {
    display: block;
}

.order-list {
    display: flex;
    gap: 15px;
    flex-direction: column;
}


/* ================= EMPTY ORDER STATE ================= */

.empty-order-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 460px;
    padding: 40px 15px;
    flex-direction: column;
}

.empty-order-state h2 {
    margin-top: 12px;
    color: var(--text-dark);
    font-size: 20px;
    font-weight: 800;
}

.empty-illustration {
    position: relative;
    width: 260px;
    height: 270px;
}

.empty-glow {
    position: absolute;
    top: 25px;
    left: 50%;
    width: 230px;
    height: 230px;
    border-radius: 50%;
    background:
        radial-gradient(
            circle,
            rgba(6, 182, 212, 0.25) 0%,
            rgba(37, 99, 235, 0.12) 55%,
            rgba(37, 99, 235, 0) 72%
        );
    transform: translateX(-50%);
}

.empty-illustration::before {
    position: absolute;
    top: 38px;
    right: 32px;
    width: 16px;
    height: 16px;
    border: 4px solid var(--secondary-color);
    border-radius: 50%;
    content: "";
    transform: rotate(15deg);
}

.empty-illustration::after {
    position: absolute;
    bottom: 44px;
    left: 25px;
    width: 19px;
    height: 19px;
    border: 4px solid var(--primary-color);
    border-radius: 50%;
    content: "";
}


/* ================= SERVER ILLUSTRATION ================= */

.server-stack {
    position: absolute;
    top: 60px;
    left: 50%;
    z-index: 3;
    display: flex;
    width: 180px;
    gap: 13px;
    flex-direction: column;
    transform: translateX(-50%);
}

.server-row {
    position: relative;
    display: block;
    width: 100%;
    height: 53px;
    border-radius: 14px;
    background:
        linear-gradient(
            135deg,
            var(--primary-color),
            var(--secondary-color)
        );
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18);
}

.server-row::before {
    position: absolute;
    top: 50%;
    left: 18px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    content: "";
    transform: translateY(-50%);
}

.server-row::after {
    position: absolute;
    top: 50%;
    right: 20px;
    left: 45px;
    height: 11px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.75);
    content: "";
    transform: translateY(-50%);
}

.empty-alert {
    position: absolute;
    top: 117px;
    right: 11px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 65px;
    height: 65px;
    border: 5px solid #ffffff;
    border-radius: 50%;
    background:
        linear-gradient(
            135deg,
            var(--accent-color),
            var(--primary-color)
        );
    color: #ffffff;
    font-size: 35px;
    font-weight: 800;
    box-shadow: 0 10px 22px rgba(124, 58, 237, 0.25);
}


/* ================= BOTTOM NAVIGATION ================= */

.bottom-navigation {
    position: fixed;
    bottom: 0;
    left: 50%;
    z-index: 100;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    width: 100%;
    max-width: var(--container-width);
    min-height: var(--navigation-height);
    padding: 9px 8px calc(8px + env(safe-area-inset-bottom));
    border-radius: 22px 22px 0 0;
    background: #ffffff;
    box-shadow: 0 -8px 25px rgba(15, 23, 42, 0.12);
    transform: translateX(-50%);
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    flex-direction: column;
}

.nav-item > i {
    font-size: 21px;
}

.nav-item.active {
    color: var(--primary-color);
}

.vip-nav-item {
    justify-content: flex-end;
}

.vip-icon {
    position: absolute;
    top: -31px;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border: 5px solid #ffffff;
    border-radius: 50%;
    background:
        linear-gradient(
            135deg,
            var(--primary-color),
            var(--secondary-color)
        );
    color: #ffffff;
    font-size: 22px;
    transform: translateX(-50%);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.vip-nav-item > span:last-child {
    margin-top: 31px;
}


/* ================= FOCUS STATES ================= */

.order-tab:focus-visible,
.nav-item:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.35);
    outline-offset: 3px;
}


/* ================= RESPONSIVE ================= */

@media (min-width: 600px) {
    .order-app {
        box-shadow: 0 0 40px rgba(15, 23, 42, 0.15);
    }
}

@media (max-width: 440px) {
    .order-summary-section {
        min-height: 225px;
    }

    .order-header {
        min-height: 112px;
    }

    .order-header h1 {
        font-size: 25px;
    }

    .holdings-card {
        right: 13px;
        left: 13px;
        min-height: 145px;
        padding-right: 12px;
        padding-left: 12px;
    }

    .holding-item strong {
        font-size: 21px;
    }

    .holding-item span {
        font-size: 13px;
    }

    .holding-divider {
        margin-right: 12px;
        margin-left: 12px;
    }

    .order-main {
        padding-right: 13px;
        padding-left: 13px;
    }

    .get-all-button {
        min-height: 65px;
        font-size: 18px;
    }

    .order-tab {
        min-height: 68px;
        font-size: 17px;
    }

    .empty-order-state {
        min-height: 410px;
    }

    .empty-illustration {
        width: 230px;
        height: 245px;
    }

    .empty-glow {
        width: 210px;
        height: 210px;
    }

    .server-stack {
        width: 160px;
    }

    .server-row {
        height: 49px;
    }

    .empty-alert {
        right: 5px;
        width: 58px;
        height: 58px;
        font-size: 30px;
    }
}

/* =========================================
   FUNCTIONAL ORDER CARDS
========================================= */

.order-panel:not(.active) {
    display: none;
}

.order-panel.active {
    display: block;
}

.order-list {
    display: grid;
    gap: 16px;
}

.order-list[hidden],
.empty-order-state[hidden] {
    display: none !important;
}

.get-all-button:not(:disabled) {
    cursor: pointer;
    opacity: 1;
    background: linear-gradient(135deg, #14c8df, #087d9f);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(8, 137, 165, 0.22);
}

.saved-order-card {
    overflow: hidden;
    padding: 16px;
    border: 1px solid #dcecf0;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(15, 66, 82, 0.08);
}

.saved-order-header {
    display: flex;
    align-items: flex-start;
    gap: 13px;
}

.saved-order-image {
    flex: 0 0 66px;
    width: 66px;
    height: 66px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(135deg, #e2faff, #b9edf5);
    color: #087d9f;
    font-size: 26px;
}

.saved-order-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.saved-order-heading {
    min-width: 0;
    flex: 1;
}

.saved-order-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.saved-order-badge {
    padding: 4px 8px;
    border-radius: 999px;
    background: #e9f9fc;
    color: #087d9f;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.saved-order-badge.status-active {
    background: #e5fbf4;
    color: #079b70;
}

.saved-order-badge.status-expired {
    background: #f1f3f4;
    color: #75848a;
}

.saved-order-badge.special-badge {
    background: #fff2d7;
    color: #dc8b08;
}

.saved-order-heading h2 {
    margin: 0;
    color: #173641;
    font-size: 17px;
    line-height: 1.3;
}

.saved-order-id {
    display: block;
    margin-top: 5px;
    color: #8a989d;
    font-size: 11px;
    overflow-wrap: anywhere;
}

.saved-order-data {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-top: 15px;
}

.saved-order-data-item {
    padding: 11px;
    border-radius: 13px;
    background: #f5fbfd;
}

.saved-order-data-item span {
    display: block;
    margin-bottom: 4px;
    color: #7b8b91;
    font-size: 11px;
}

.saved-order-data-item strong {
    display: block;
    color: #173641;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.saved-order-data-item.income-item strong {
    color: #079b70;
}

.saved-order-progress {
    margin-top: 15px;
}

.saved-order-progress-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 7px;
    color: #718188;
    font-size: 11px;
}

.saved-order-progress-heading strong {
    color: #087d9f;
    font-size: 12px;
}

.saved-order-progress-track {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #e6f0f3;
}

.saved-order-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #16c8df, #087d9f);
}

.saved-order-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 14px;
    padding-top: 13px;
    border-top: 1px solid #e8f0f2;
}

.saved-order-purchased {
    color: #87959a;
    font-size: 11px;
}

.saved-order-claimable {
    text-align: right;
}

.saved-order-claimable span {
    display: block;
    color: #7b8b91;
    font-size: 10px;
}

.saved-order-claimable strong {
    color: #079b70;
    font-size: 14px;
}

.order-toast {
    position: fixed;
    left: 50%;
    bottom: 100px;
    z-index: 99999;
    max-width: calc(100% - 35px);
    padding: 12px 18px;
    border-radius: 13px;
    background: #153842;
    color: #ffffff;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 12px 30px rgba(0, 34, 45, 0.25);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 20px);
    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}

.order-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (min-width: 700px) {
    .order-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 420px) {
    .saved-order-card {
        padding: 14px;
    }

    .saved-order-data {
        grid-template-columns: 1fr 1fr;
    }

    .saved-order-footer {
        align-items: flex-end;
    }
}


/* =========================================
   DATABASE ORDER HISTORY UPDATE
========================================= */

/* Refresh Button */

.get-all-button {
    gap: 10px;
    background:
        linear-gradient(
            135deg,
            var(--primary-color),
            var(--secondary-color)
        );
    color: #ffffff;
}

.get-all-button:not(:disabled) {
    background:
        linear-gradient(
            135deg,
            var(--primary-color),
            var(--secondary-color)
        );
    color: #ffffff;
    box-shadow:
        0 10px 24px rgba(37, 99, 235, 0.22);
}

.get-all-button i {
    font-size: 18px;
}

.get-all-button:disabled {
    cursor: wait;
    opacity: 0.7;
}


/* Four Status Tabs */

.order-tabs {
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 2px;
}

.order-tab {
    min-width: 0;
    padding-right: 4px;
    padding-left: 4px;
    font-size: 15px;
}

#ordersPanel {
    margin-top: 18px;
}


/* Loading State */

.order-loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 260px;
    gap: 12px;
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 800;
    flex-direction: column;
}

.order-loading-state i {
    font-size: 34px;
}


/* Empty State */

.empty-order-state p {
    max-width: 310px;
    margin-top: 8px;
    color: var(--text-light);
    text-align: center;
    font-size: 14px;
    line-height: 1.55;
}


/* Error State */

.order-error-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 330px;
    padding: 35px 20px;
    text-align: center;
    flex-direction: column;
}

.order-error-state > i {
    color: #ef4444;
    font-size: 48px;
}

.order-error-state h2 {
    margin-top: 18px;
    color: var(--text-dark);
    font-size: 20px;
}

.order-error-state p {
    max-width: 320px;
    margin-top: 9px;
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.55;
}

.order-error-state button {
    min-width: 135px;
    min-height: 46px;
    margin-top: 20px;
    padding: 10px 20px;
    border-radius: 24px;
    background:
        linear-gradient(
            135deg,
            var(--primary-color),
            var(--secondary-color)
        );
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
}


/* Correct hidden-state behavior */

.order-loading-state[hidden],
.order-error-state[hidden],
.order-list[hidden],
.empty-order-state[hidden] {
    display: none !important;
}


/* Database Order Status Badges */

.saved-order-badge.status-active {
    background: #dcfce7;
    color: #07845e;
}

.saved-order-badge.status-completed {
    background: #dbeafe;
    color: #1d4ed8;
}

.saved-order-badge.status-cancelled {
    background: #fee2e2;
    color: #dc2626;
}

.saved-order-badge.currency-inr {
    background: #eef2ff;
    color: #4338ca;
}

.saved-order-badge.currency-usdt {
    background: #ccfbf1;
    color: #0f766e;
}


/* Image Fallback */

.saved-order-image i {
    color: #087d9f;
    font-size: 27px;
}

.saved-order-image i[hidden],
.saved-order-image img[hidden] {
    display: none;
}


/* Responsive Tabs */

@media (max-width: 440px) {
    .order-tab {
        min-height: 62px;
        padding-right: 2px;
        padding-left: 2px;
        font-size: 13px;
    }

    .order-tab.active::after {
        width: 36px;
    }

    .order-loading-state {
        min-height: 230px;
    }
}

/* =========================================================
   MARATHON ORDERS PAGE — RESPONSIVE POLISH

   FRONTEND ONLY
   Paste this COMPLETE block at the END of order.css.

   No order.html or order.js changes are required.
   Existing API, filters, income claim and order states stay unchanged.
========================================================= */


/* ---------------- PAGE FRAME ---------------- */

body {
    background:
        radial-gradient(
            circle at 50% -8%,
            rgba(37, 99, 235, 0.18),
            transparent 32rem
        ),
        #dce7f8;
}

.order-app {
    width: min(100%, 1100px);
    max-width: 1100px;
    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #f1f6ff 42%,
            #f8fafc 100%
        );
}


/* ---------------- COMPACT SUMMARY ---------------- */

.order-summary-section {
    min-height: 190px;
    border-radius: 0 0 34px 34px;
    background:
        radial-gradient(
            circle at 12% 12%,
            rgba(255, 255, 255, 0.2),
            transparent 24%
        ),
        radial-gradient(
            circle at 88% 80%,
            rgba(124, 58, 237, 0.16),
            transparent 29%
        ),
        linear-gradient(
            135deg,
            var(--primary-color),
            var(--secondary-color)
        );
}

.order-header {
    min-height: 94px;
    padding: 22px 18px 16px;
    background: transparent;
}

.order-header h1 {
    font-size: clamp(23px, 2.6vw, 28px);
    letter-spacing: -0.025em;
    text-shadow: 0 4px 12px rgba(30, 64, 175, 0.18);
}

.holdings-card {
    right: auto;
    bottom: -44px;
    left: 50%;
    width: min(calc(100% - 36px), 660px);
    min-height: 112px;
    padding: 19px 22px;
    border-color: rgba(96, 165, 250, 0.24);
    border-radius: 18px;
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.98),
            rgba(219, 234, 254, 0.96) 54%,
            rgba(207, 250, 254, 0.96)
        );
    box-shadow:
        0 14px 34px rgba(30, 64, 175, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transform: translateX(-50%);
}

.holding-item strong {
    color: #172033;
    font-size: clamp(21px, 2.4vw, 25px);
    line-height: 1.1;
}

.holding-item span {
    margin-top: 6px;
    color: #64748b;
    font-size: 13px;
}

.holding-divider {
    width: 1px;
    height: 40px;
    margin: 0 24px;
    background: linear-gradient(
        180deg,
        transparent,
        rgba(100, 116, 139, 0.45),
        transparent
    );
}


/* ---------------- MAIN CONTENT ---------------- */

.order-main {
    width: 100%;
    max-width: 1040px;
    margin: 0 auto;
    padding: 70px 20px 122px;
}

.get-all-button {
    width: min(100%, 620px);
    min-height: 48px;
    gap: 9px;
    margin: 0 auto;
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 14px;
    font-size: 15px;
    box-shadow:
        0 9px 22px rgba(37, 99, 235, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.24);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

.get-all-button i {
    font-size: 16px;
}

.get-all-button:active:not(:disabled) {
    transform: scale(0.985);
}

.get-all-button:disabled {
    filter: saturate(0.72);
    opacity: 0.66;
}


/* ---------------- STATUS TABS ---------------- */

.order-tabs {
    width: min(100%, 680px);
    min-height: 52px;
    gap: 4px;
    margin: 17px auto 0;
    padding: 4px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    background: rgba(226, 232, 240, 0.66);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.order-tab {
    min-height: 42px;
    padding: 9px 5px;
    border-radius: 12px;
    font-size: 13px;
}

.order-tab.active {
    background: #ffffff;
    color: var(--primary-color);
    box-shadow:
        0 5px 14px rgba(30, 64, 175, 0.12),
        inset 0 0 0 1px rgba(96, 165, 250, 0.12);
}

.order-tab.active::after {
    bottom: 4px;
    width: 28px;
    height: 3px;
}

#ordersPanel {
    margin-top: 16px;
}


/* ---------------- ORDER CARDS ---------------- */

.order-list {
    gap: 16px;
}

.saved-order-card {
    position: relative;
    display: flex;
    min-width: 0;
    padding: 16px;
    overflow: hidden;
    border-color: rgba(96, 165, 250, 0.2);
    border-radius: 18px;
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.99),
            rgba(248, 250, 252, 0.98)
        );
    flex-direction: column;
    box-shadow:
        0 10px 26px rgba(30, 64, 175, 0.09),
        inset 0 1px 0 rgba(255, 255, 255, 0.86);
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.saved-order-card::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--primary-color),
        var(--secondary-color)
    );
    content: "";
}

.saved-order-header {
    gap: 12px;
    padding-top: 3px;
}

.saved-order-image {
    flex-basis: 60px;
    width: 60px;
    height: 60px;
    border: 1px solid rgba(6, 182, 212, 0.16);
    border-radius: 14px;
    background:
        radial-gradient(
            circle at 45% 40%,
            #ffffff,
            #c8f4fa
        );
    box-shadow: 0 6px 15px rgba(8, 137, 165, 0.1);
}

.saved-order-image img {
    object-fit: contain;
}

.saved-order-image i {
    font-size: 24px;
}

.saved-order-badges {
    gap: 5px;
    margin-bottom: 5px;
}

.saved-order-badge {
    padding: 4px 7px;
    font-size: 9px;
    letter-spacing: 0.025em;
}

.saved-order-heading h2 {
    color: #172033;
    font-size: 16px;
    letter-spacing: -0.012em;
}

.saved-order-id {
    margin-top: 4px;
    color: #7c8b93;
    font-size: 10.5px;
}

.saved-order-data {
    gap: 8px;
    margin-top: 13px;
}

.saved-order-data-item {
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 11px;
    background: #f4f9fc;
}

.saved-order-data-item span {
    margin-bottom: 4px;
    font-size: 10px;
}

.saved-order-data-item strong {
    color: #173641;
    font-size: 13px;
}

.saved-order-progress {
    margin-top: 13px;
}

.saved-order-progress-track {
    height: 6px;
}

.saved-order-footer {
    margin-top: auto;
    padding-top: 12px;
    border-top-color: rgba(148, 163, 184, 0.2);
}

.saved-order-claimable strong {
    font-size: 13px;
}


/* ---------------- PAGE STATES ---------------- */

.order-loading-state {
    min-height: 220px;
    gap: 10px;
    font-size: 14px;
}

.order-loading-state i {
    font-size: 29px;
}

.empty-order-state {
    min-height: 355px;
    padding: 26px 15px;
}

.empty-illustration {
    width: 190px;
    height: 190px;
}

.empty-glow {
    top: 5px;
    width: 180px;
    height: 180px;
}

.empty-illustration::before {
    top: 20px;
    right: 18px;
    width: 12px;
    height: 12px;
    border-width: 3px;
}

.empty-illustration::after {
    bottom: 17px;
    left: 12px;
    width: 14px;
    height: 14px;
    border-width: 3px;
}

.server-stack {
    top: 30px;
    width: 132px;
    gap: 8px;
}

.server-row {
    height: 39px;
    border-radius: 10px;
    box-shadow: 0 7px 15px rgba(37, 99, 235, 0.16);
}

.server-row::before {
    left: 13px;
    width: 10px;
    height: 10px;
}

.server-row::after {
    right: 14px;
    left: 34px;
    height: 8px;
}

.empty-alert {
    top: 75px;
    right: 4px;
    width: 48px;
    height: 48px;
    border-width: 4px;
    font-size: 25px;
}

.empty-order-state h2,
.order-error-state h2 {
    font-size: 18px;
}

.empty-order-state p,
.order-error-state p {
    font-size: 13px;
}

.order-error-state {
    min-height: 300px;
    padding: 30px 18px;
}

.order-error-state > i {
    font-size: 42px;
}

.order-error-state button {
    min-height: 43px;
    margin-top: 17px;
    border-radius: 13px;
}

.order-toast {
    width: max-content;
    max-width: min(calc(100% - 28px), 440px);
    bottom: 94px;
    padding: 11px 16px;
    border-radius: 12px;
    font-size: 12px;
}


/* ---------------- DESKTOP ---------------- */

@media (min-width: 860px) {
    .order-app {
        min-height: calc(100vh - 28px);
        margin-top: 14px;
        margin-bottom: 14px;
        border: 1px solid rgba(148, 163, 184, 0.2);
        border-radius: 26px;
        box-shadow: 0 22px 60px rgba(15, 23, 42, 0.14);
    }

    .order-summary-section {
        border-radius: 26px 26px 34px 34px;
    }

    .order-main {
        padding: 72px 24px 126px;
    }

    .order-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
        gap: 18px;
    }

    .bottom-navigation {
        width: min(calc(100% - 32px), 720px);
        max-width: 720px;
        border: 1px solid rgba(148, 163, 184, 0.2);
        border-bottom: 0;
    }
}


/* Existing CSS enables two columns at 700px. Keep tablets comfortably wide. */
@media (min-width: 700px) and (max-width: 859px) {
    .order-app {
        max-width: 760px;
    }

    .order-main {
        max-width: 720px;
    }

    .order-list {
        grid-template-columns: 1fr;
    }

    .bottom-navigation {
        max-width: 620px;
    }
}


/* ---------------- MOBILE ---------------- */

@media (max-width: 599px) {
    .order-summary-section {
        min-height: 176px;
        border-radius: 0 0 28px 28px;
    }

    .order-header {
        min-height: 82px;
        padding: 19px 15px 14px;
    }

    .order-header h1 {
        font-size: 23px;
    }

    .holdings-card {
        bottom: -42px;
        width: calc(100% - 26px);
        min-height: 104px;
        padding: 16px 12px;
        border-radius: 16px;
    }

    .holding-item strong {
        font-size: 20px;
    }

    .holding-item span {
        margin-top: 5px;
        font-size: 11.5px;
    }

    .holding-divider {
        height: 34px;
        margin: 0 12px;
    }

    .order-main {
        padding: 62px 13px 116px;
    }

    .get-all-button {
        min-height: 44px;
        border-radius: 13px;
        font-size: 14px;
    }

    .order-tabs {
        min-height: 48px;
        margin-top: 14px;
        border-radius: 14px;
    }

    .order-tab {
        min-height: 38px;
        padding: 8px 2px;
        border-radius: 10px;
        font-size: 11.5px;
    }

    .order-tab.active::after {
        width: 24px;
    }

    #ordersPanel {
        margin-top: 13px;
    }

    .order-list {
        gap: 13px;
    }

    .saved-order-card {
        padding: 14px 12px;
        border-radius: 16px;
    }

    .saved-order-image {
        flex-basis: 54px;
        width: 54px;
        height: 54px;
        border-radius: 12px;
    }

    .saved-order-heading h2 {
        font-size: 15px;
    }

    .saved-order-data {
        gap: 6px;
        margin-top: 11px;
    }

    .saved-order-data-item {
        padding: 8px;
        border-radius: 10px;
    }

    .saved-order-data-item strong {
        font-size: 12px;
    }

    .saved-order-footer {
        gap: 9px;
    }

    .empty-order-state {
        min-height: 320px;
    }
}


@media (max-width: 360px) {
    .order-main {
        padding-right: 9px;
        padding-left: 9px;
    }

    .order-tab {
        font-size: 10.5px;
    }

    .saved-order-data-item span {
        font-size: 9px;
    }

    .saved-order-data-item strong {
        font-size: 11px;
    }
}


/* ---------------- POINTER POLISH ---------------- */

@media (hover: hover) and (pointer: fine) {
    .saved-order-card:hover {
        border-color: rgba(37, 99, 235, 0.32);
        transform: translateY(-3px);
        box-shadow:
            0 16px 34px rgba(30, 64, 175, 0.13),
            inset 0 1px 0 rgba(255, 255, 255, 0.88);
    }

    .get-all-button:hover:not(:disabled) {
        filter: brightness(1.04);
        box-shadow:
            0 12px 27px rgba(37, 99, 235, 0.25),
            inset 0 1px 0 rgba(255, 255, 255, 0.26);
    }
}


/* ---------------- DARK THEME ---------------- */

html:is(.dark-theme, [data-marathon-theme="dark"]) body {
    background:
        radial-gradient(
            circle at 50% -8%,
            rgba(37, 99, 235, 0.2),
            transparent 32rem
        ),
        #020617;
}

html:is(.dark-theme, [data-marathon-theme="dark"]) .order-app {
    background:
        linear-gradient(
            180deg,
            #0b1220 0%,
            #0f172a 44%,
            #111827 100%
        ) !important;
}

html:is(.dark-theme, [data-marathon-theme="dark"])
.order-summary-section {
    background:
        radial-gradient(
            circle at 12% 12%,
            rgba(255, 255, 255, 0.1),
            transparent 24%
        ),
        radial-gradient(
            circle at 88% 80%,
            rgba(124, 58, 237, 0.2),
            transparent 29%
        ),
        linear-gradient(135deg, #1d4ed8, #0e7490) !important;
}

html:is(.dark-theme, [data-marathon-theme="dark"]) .order-header {
    background: transparent !important;
}

html:is(.dark-theme, [data-marathon-theme="dark"]) .holdings-card {
    background:
        linear-gradient(
            145deg,
            rgba(30, 41, 59, 0.99),
            rgba(15, 23, 42, 0.99)
        ) !important;
    border-color: rgba(71, 85, 105, 0.72);
    box-shadow: 0 15px 36px rgba(0, 0, 0, 0.3);
}

html:is(.dark-theme, [data-marathon-theme="dark"])
.holding-item strong {
    color: #f8fafc;
}

html:is(.dark-theme, [data-marathon-theme="dark"])
.holding-item span {
    color: #cbd5e1;
}

html:is(.dark-theme, [data-marathon-theme="dark"]) .order-tabs {
    background: rgba(2, 6, 23, 0.58);
    border-color: rgba(71, 85, 105, 0.7);
}

html:is(.dark-theme, [data-marathon-theme="dark"])
.order-tab.active {
    background: #1e293b;
    color: #60a5fa;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.24);
}

html:is(.dark-theme, [data-marathon-theme="dark"])
.saved-order-card {
    background:
        linear-gradient(
            145deg,
            rgba(30, 41, 59, 0.99),
            rgba(15, 23, 42, 0.99)
        ) !important;
    border-color: rgba(71, 85, 105, 0.66);
    box-shadow: 0 12px 29px rgba(0, 0, 0, 0.25);
}

html:is(.dark-theme, [data-marathon-theme="dark"])
.saved-order-image {
    background:
        radial-gradient(circle at 45% 40%, #334155, #0f3b46);
    border-color: rgba(94, 234, 212, 0.15);
}

html:is(.dark-theme, [data-marathon-theme="dark"])
.saved-order-heading h2,
html:is(.dark-theme, [data-marathon-theme="dark"])
.saved-order-data-item strong {
    color: #f1f5f9;
}

html:is(.dark-theme, [data-marathon-theme="dark"])
.saved-order-id,
html:is(.dark-theme, [data-marathon-theme="dark"])
.saved-order-data-item span,
html:is(.dark-theme, [data-marathon-theme="dark"])
.saved-order-purchased,
html:is(.dark-theme, [data-marathon-theme="dark"])
.saved-order-claimable span {
    color: #94a3b8;
}

html:is(.dark-theme, [data-marathon-theme="dark"])
.saved-order-data-item {
    background: rgba(2, 6, 23, 0.45);
    border-color: rgba(71, 85, 105, 0.5);
}

html:is(.dark-theme, [data-marathon-theme="dark"])
.saved-order-progress-track {
    background: #334155;
}

html:is(.dark-theme, [data-marathon-theme="dark"])
.saved-order-footer {
    border-top-color: rgba(71, 85, 105, 0.62);
}

html:is(.dark-theme, [data-marathon-theme="dark"])
.empty-order-state h2,
html:is(.dark-theme, [data-marathon-theme="dark"])
.order-error-state h2 {
    color: #f8fafc;
}


/* ---------------- MOTION SAFETY ---------------- */

@media (prefers-reduced-motion: reduce) {
    .saved-order-card,
    .get-all-button,
    .order-tab,
    .order-toast {
        transition: none;
    }
}


/* DESKTOP SIZE — MATCH HOME PAGE */

@media (min-width: 600px) {
    .order-app {
        width: 100%;
        max-width: 540px;
    }

    .order-main {
        max-width: 540px;
    }

    .order-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .bottom-navigation {
        width: 100%;
        max-width: 540px;
    }
}
