.desktop-page {
    max-width: 100%;
    width: 100%;
    padding: 8px 12px 24px;
}

@media (min-width: 1680px) {
    .desktop-page {
        max-width: var(--container-desktop);
        margin-inline: auto;
    }
}

html[data-theme="dark"] .ag-swal-popup--dark,
html[data-theme="dark"] .swal2-popup.ag-swal-popup--dark {
    background: var(--surface) !important;
    color: var(--text) !important;
    border: 1px solid var(--border);
}

html[data-theme="light"] .ag-swal-popup--light,
html[data-theme="light"] .swal2-popup.ag-swal-popup--light {
    background: var(--surface) !important;
    color: var(--text) !important;
    border: 1px solid var(--border);
}

html[data-theme="dark"] .swal2-popup.swal2-toast.ag-swal-popup--dark,
html[data-theme="light"] .swal2-popup.swal2-toast.ag-swal-popup--light {
    background: var(--surface) !important;
    color: var(--text) !important;
    border: 1px solid var(--border);
    box-shadow: var(--card-shadow);
}

.ag-swal-title {
    color: var(--gold-bright) !important;
}

.ag-swal-html,
.swal2-popup.ag-swal-popup--dark .swal2-html-container,
.swal2-popup.ag-swal-popup--light .swal2-html-container,
.swal2-popup.ag-swal-popup--dark .swal2-content,
.swal2-popup.ag-swal-popup--light .swal2-content {
    color: var(--text) !important;
}


.ag-bottom-nav {
    display: none;
}

@media (max-width: 760px) {
    .ag-bottom-nav {
        display: grid;
    }

    .ag-top-actions {
        display: none !important;
    }

    .ag-user-dropdown {
        display: none !important;
    }

    body {
        padding-bottom: 0;
    }

    /* Space so page content/forms never sit under the fixed bottom nav. */
    .desktop-page {
        padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px));
    }

    .desktop-page:has(.ag-report-page) {
        padding-bottom: calc(140px + env(safe-area-inset-bottom, 0px));
    }
}

.ag-bottom-nav-wrapper {
    display: none;
}

@media (max-width: 760px) {
    .ag-bottom-nav-wrapper {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 100;
        margin-top: 0;
        padding: 0 8px calc(8px + env(safe-area-inset-bottom, 0px));
    }

    .ag-bottom-nav-wrapper .ag-bottom-nav {
        position: static;
        margin: 0;
        width: 100%;
    }
}

.ag-mobile-actions-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s ease;
    z-index: 1;
}

.ag-mobile-actions-backdrop.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.ag-mobile-actions-panel {
    position: absolute;
    right: 0;
    left: 0;
    bottom: calc(100% + 10px);
    z-index: 2;
    padding: 16px;
    border-radius: 24px;
    border: 1px solid var(--border);
    background: linear-gradient(145deg, var(--surface), var(--surface-2));
    box-shadow: var(--card-shadow);
    transform: translateY(18px) scale(0.94);
    transform-origin: center bottom;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease, visibility 0.28s ease;
}

.ag-mobile-actions-panel.is-open {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.ag-mobile-actions-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    color: var(--gold-bright);
    font-size: 18px;
    font-weight: 900;
}

.ag-mobile-actions-close {
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: transparent;
    color: var(--text);
    display: grid;
    place-items: center;
    font-size: 16px;
    transition: var(--transition);
}

.ag-mobile-actions-close:hover {
    background: var(--gold-soft);
    color: var(--gold-bright);
}

.ag-mobile-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.ag-mobile-action-item {
    min-height: 72px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--border-strong);
    background: linear-gradient(180deg, var(--gold-soft), rgba(201, 139, 34, 0.04));
    color: var(--gold-bright);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.3;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.ag-mobile-action-item i {
    font-size: 24px;
}

.ag-mobile-action-item:active {
    transform: scale(0.97);
}

.ag-mobile-action-item.fill {
    color: #241704;
    border-color: transparent;
    background: linear-gradient(135deg, #f8cf68, #bd7d16);
}

html[data-theme="light"] .ag-mobile-action-item.fill {
    color: #4a2f04;
    background: linear-gradient(135deg, #efbe4a, #c98b22);
}

.ag-mobile-action-item:nth-child(5) {
    grid-column: 1 / -1;
}

.ag-bottom-nav-trigger {
    border: 0;
    background: transparent;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 7px;
    color: var(--muted);
    border-radius: 18px;
    font-weight: 850;
    font-size: 15px;
    font-family: inherit;
    padding: 0;
    width: 100%;
    min-height: 100%;
    transition: background 0.2s ease, color 0.2s ease;
}

.ag-bottom-nav-trigger i {
    font-size: 27px;
}

.ag-bottom-nav-trigger.is-active {
    background: var(--gold-soft);
    color: var(--gold-bright);
}

.ag-mobile-profile-panel__head {
    align-items: flex-start;
}

.ag-mobile-profile-user {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.ag-mobile-profile-user .avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--gold-bright);
    border: 1px solid var(--border);
    background: var(--gold-soft);
    font-size: 22px;
    flex-shrink: 0;
}

.ag-mobile-profile-user strong {
    display: block;
    font-size: 14px;
    font-weight: 850;
    color: var(--text);
    margin-bottom: 4px;
}

.ag-mobile-profile-user span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.ag-mobile-profile-user span i {
    color: var(--gold-bright);
    margin-left: 4px;
}

.ag-mobile-profile-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ag-mobile-profile-item {
    width: 100%;
    min-height: 52px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(127, 127, 127, 0.04);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
    font-weight: 800;
    text-align: right;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.ag-mobile-profile-item span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.ag-mobile-profile-item i {
    font-size: 18px;
    color: var(--gold-bright);
}

.ag-mobile-profile-item:active {
    transform: scale(0.98);
}

.ag-mobile-profile-item.active {
    background: var(--gold-soft);
    border-color: var(--border-strong);
    color: var(--gold-bright);
}

.ag-mobile-profile-item.is-danger {
    color: var(--red);
    border-color: rgba(255, 93, 88, 0.28);
}

.ag-mobile-profile-item.is-danger i {
    color: var(--red);
}

.ag-mobile-profile-divider {
    height: 1px;
    background: var(--line);
    margin: 4px 0;
}

.ag-mobile-profile-label {
    margin: 0;
    padding: 0 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.product-card .ab-order-link {
    display: block;
    color: inherit;
    cursor: pointer;
    text-decoration: none;
}

.product-card .ab-order-link small {
    display: block;
    font-size: 13px;
    font-weight: 850;
    margin-bottom: 5px;
}

.product-card .ab-order-link .rounded {
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.product-card .ab-order-link:hover .rounded {
    transform: translateY(-1px);
}

.product-card .ab-order-link:hover {
    opacity: 0.92;
}

.product-card .rounded {
    border: none;
    background: transparent !important;
    padding: 0;
    box-shadow: none;
}

.product-card .ab-price-value {
    font-size: 21px;
    line-height: 1.1;
    font-weight: 950;
}

.product-card .price-side.buy .ab-price-value {
    color: var(--green);
}

.product-card .price-side.sell .ab-price-value {
    color: var(--red);
}

.product-card .rounded.bg-inactive-buy .ab-price-value,
.product-card .rounded.bg-inactive-sell .ab-price-value {
    color: var(--muted) !important;
    font-size: 14px;
    font-weight: 800;
}

.product-card .mobile-actions-row {
    display: none;
}

.desktop-market.section-panel {
    padding: 16px 18px;
}

.desktop-market .section-head {
    margin-bottom: 12px;
}

.desktop-market .section-head h2 {
    font-size: 20px;
}

.desktop-market .category-title {
    font-size: 16px;
    margin-bottom: 10px;
}

.desktop-market .product-grid {
    gap: 14px;
}

.desktop-market .product-card {
    min-height: 112px;
    padding: 14px;
    border-radius: 14px;
}

.desktop-market .product-card h3 {
    margin-bottom: 12px;
    font-size: 17px;
}

.desktop-market .price-pair {
    gap: 10px;
}

.desktop-market .price-divider {
    height: 40px;
}

.desktop-market .price-side small {
    font-size: 12px;
    margin-bottom: 4px;
}

.desktop-market .product-card .ab-price-value {
    font-size: 19px;
}

.desktop-market .product-card .rounded.bg-inactive-buy .ab-price-value,
.desktop-market .product-card .rounded.bg-inactive-sell .ab-price-value {
    font-size: 13px;
}

.desktop-market .validity {
    min-height: 26px;
    margin-top: 10px;
    padding: 3px 10px;
    font-size: 12px;
    gap: 5px;
}

@media (max-width: 760px) {
    .product-card .mobile-actions-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        width: 100%;
        margin-top: 14px;
        padding: 0 2px;
        justify-content: center;
        align-items: stretch;
    }

    .product-card .mobile-actions-row .trade-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 48px;
        height: auto;
        padding: 12px 16px;
        border-radius: 12px;
        font-size: 15px;
        font-weight: 900;
        line-height: 1.2;
        text-align: center;
        box-sizing: border-box;
    }

    .product-card .mobile-actions-row .trade-btn.buy {
        color: var(--green);
        border-color: rgba(105, 214, 83, 0.55);
        background: rgba(105, 214, 83, 0.12);
    }

    .product-card .mobile-actions-row .trade-btn.sell {
        color: var(--red);
        border-color: rgba(255, 93, 88, 0.55);
        background: rgba(255, 93, 88, 0.12);
    }

    .desktop-market .product-card {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .desktop-market .product-card .mobile-actions-row {
        margin-top: auto;
        padding-top: 12px;
    }
}

.ag-logo-img {
    width: 150px;
    height: 52px;
    object-fit: contain;
    border-radius: 8px;
}

@media (max-width: 760px) {
    .desktop-header .ag-brand {
        min-width: 0;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        flex-wrap: nowrap;
        gap: 6px;
    }

    .desktop-header .ag-brand__mark {
        flex: 0 0 auto;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .desktop-header .ag-brand__text {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 4px;
    }

    .desktop-header .ag-brand .logo-bars {
        width: 56px;
        height: 36px;
    }

    .desktop-header .ag-brand .logo-bars span {
        height: 18px;
    }

    .desktop-header .ag-brand .logo-bars span:nth-child(2) {
        height: 26px;
    }

    .desktop-header .ag-brand h1 {
        width: 100%;
        min-width: 0;
        font-size: 22px;
        line-height: 1.2;
        white-space: normal;
        text-align: center;
    }

    .desktop-header .ag-brand p {
        width: 100%;
        margin: 0;
        white-space: normal;
        font-size: 11px;
        line-height: 1.5;
        text-align: center;
    }

    .desktop-header .ag-logo-img {
        width: 100%;
        height: 36px;
    }
}

.ag-user-dropdown .dropdown-menu {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
}

.ag-user-dropdown .dropdown-item {
    color: var(--text);
}

.ag-user-dropdown .dropdown-item:hover {
    background: var(--gold-soft);
    color: var(--gold-bright);
}

.ag-user-dropdown .dropdown-header {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.ag-theme-option.active {
    background: var(--gold-soft);
    color: var(--gold-bright);
}

.ag-theme-option {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: right;
}

.desktop-summary {
    gap: 18px;
    margin-top: 20px;
}

.ag-mobile-balance-accordion {
    display: none;
    margin-top: 18px;
    padding: 0;
    overflow: hidden;
}

@media (max-width: 760px) {
    .ag-desktop-summary {
        display: none !important;
    }

    .ag-mobile-balance-accordion {
        display: block;
    }
}

.ag-mobile-balance-trigger {
    width: 100%;
    border: 0;
    background: transparent;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    color: inherit;
    font-family: inherit;
    text-align: right;
}

.ag-mobile-balance-trigger__main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.ag-mobile-balance-trigger__text .label {
    margin: 0 10px 6px;
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
}

.ag-mobile-balance-trigger__text h2 {
    margin: 0 15px 0;
    font-size: 28px;
    font-weight: 950;
    letter-spacing: -0.5px;
}

.ag-mobile-balance-trigger__text h2 small {
    font-size: 12px;
    font-weight: 500;
}

.ag-mobile-balance-more {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    color: var(--gold-bright);
    background: var(--gold-soft);
    font-size: 13px;
    font-weight: 850;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.ag-mobile-balance-more i {
    font-size: 14px;
    transition: transform 0.28s ease;
}

.ag-mobile-balance-accordion.is-open .ag-mobile-balance-more i {
    transform: rotate(180deg);
}

.ag-mobile-balance-body {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.36s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

.ag-mobile-balance-accordion.is-open .ag-mobile-balance-body {
    max-height: 520px;
    opacity: 1;
}

.ag-mobile-balance-body {
    padding: 0 18px;
}

.ag-mobile-balance-accordion.is-open .ag-mobile-balance-body {
    padding-bottom: 18px;
}

.ag-gold-asset-list--mobile {
    min-width: 0;
    max-width: none;
    width: 100%;
    border-inline: 0;
    border-top: 1px solid var(--line);
    padding: 14px 0 0;
    margin-bottom: 12px;
}

.ag-gold-asset-list--mobile .ag-gold-asset-item {
    font-size: 12px;
    padding: 6px 5px;
    border-bottom: 1px dashed var(--line);
}

.ag-gold-asset-list--mobile .ag-gold-asset-item:last-child {
    border-bottom: 0;
}

.ag-gold-asset-list--mobile .ag-gold-asset-item__name {
    max-width: none;
}

.ag-mobile-balance-detail {
    margin-bottom: 14px;
}

.ag-mobile-balance-detail .sub {
    display: block;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
    line-height: 1.5;
}

.ag-mobile-withdraw-card {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(127, 127, 127, 0.04);
}

.ag-mobile-withdraw-card__head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ag-mobile-withdraw-card__head .label {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 800;
}

.ag-mobile-withdraw-card__head h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 950;
}

.ag-mobile-withdraw-card__head h2 small {
    font-size: 12px;
}

.ag-mobile-withdraw-card__footer {
    display: flex;
    justify-content: center;
    margin-top: 12px;
}

.ag-mobile-withdraw-card .mini-outline,
.ag-mobile-withdraw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    margin-top: 0;
    border: 1px solid var(--border-strong);
    color: var(--gold-bright);
    background: transparent;
    border-radius: 9px;
    padding: 6px 20px;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}

.ag-mobile-referral-card {
    margin-top: 12px;
}

.ag-mobile-referral-card .sub {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.desktop-summary--dual {
    grid-template-columns: repeat(3, minmax(300px, 550px));
    justify-content: center;
}

@media (max-width: 1200px) {
    .desktop-summary--dual {
        grid-template-columns: 1fr;
        max-width: 560px;
        margin-inline: auto;
    }
}

.desktop-summary .summary-card {
    min-height: 108px;
    padding: 16px 20px;
    gap: 14px;
}

.desktop-summary .summary-card .label {
    font-size: 15px;
    margin-bottom: 8px;
}

.desktop-summary .summary-card h2 {
    font-size: 28px;
    letter-spacing: -0.5px;
}

.desktop-summary .summary-card h2 span {
    display: inline-block;
    direction: ltr;
}

.desktop-summary .summary-card h2 small {
    font-size: 12px;
}

.desktop-summary .summary-card .sub {
    margin-top: 8px;
    font-size: 12px;
}

.desktop-summary .summary-card .icon-box {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 20px;
}

.desktop-summary .summary-bars {
    width: 44px;
    height: 34px;
}

.desktop-summary .summary-bars span {
    height: 14px;
}

.desktop-summary .summary-bars span:nth-child(2) {
    height: 22px;
}

.desktop-summary .summary-card .mini-outline {
    padding: 5px 16px;
    font-size: 13px;
}

.summary-card--gold-assets {
    align-items: stretch;
}

.summary-card--gold-assets .summary-card__content {
    flex: 1;
    min-width: 0;
}

.ag-gold-asset-list {
    list-style: none;
    margin: 0;
    padding: 0 14px;
    border-inline: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    min-width: 200px;
    max-width: 220px;
    flex-shrink: 0;
}

.ag-gold-asset-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    line-height: 1.1;
}

.ag-gold-asset-item__name {
    color: var(--muted);
    font-weight: 750;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 80px;
}

.ag-gold-asset-item__value {
    direction: rtl;
    color: var(--gold-bright);
    font-weight: 900;
    white-space: nowrap;
}

.ag-gold-asset-item__value small {
    color: var(--muted-2);
    font-size: 10px;
    font-weight: 700;
    margin-right: 3px;
}

@media (max-width: 1200px) {
    .ag-gold-asset-list {
        min-width: 100px;
        max-width: 130px;
        padding: 0 10px;
    }

    .ag-gold-asset-item__name {
        max-width: 52px;
    }
}

@media (max-width: 760px) {
    .summary-card--gold-assets {
        flex-wrap: wrap;
        row-gap: 12px;
    }

    .ag-gold-asset-list {
        order: 3;
        width: 100%;
        max-width: none;
        min-width: 0;
        border-inline: 0;
        border-top: 1px solid var(--line);
        padding: 10px 0 0;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .ag-gold-asset-item {
        background: var(--gold-soft);
        border: 1px solid var(--border);
        border-radius: 999px;
        padding: 4px 10px;
        font-size: 10px;
    }

    .ag-gold-asset-item__name {
        max-width: none;
    }
}

.summary-card--withdrawable {
    position: relative;
    align-items: flex-start;
    padding-bottom: 48px;
}

.summary-card--withdrawable .summary-card__withdraw-btn {
    position: absolute;
    bottom: 16px;
    left: 20px;
    margin-top: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.summary-card__withdraw-btn .bi-copy {
    font-size: 0.92em;
    line-height: 1;
}

.ag-mobile-referral-card .summary-card__withdraw-btn {
    position: static;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

@media (max-width: 760px) {
    .summary-card--withdrawable .summary-card__withdraw-btn {
        bottom: 14px;
        left: 16px;
    }
}

.ag-hidden-tools {
    display: flex;
}

@media (max-width: 760px) {
    .ag-hidden-tools {
        display: none;
    }
}

.ag-mobile-tools {
    display: none;
}

@media (max-width: 760px) {
    .ag-mobile-tools {
        display: flex;
    }
}

html[data-theme="light"] {
    --bg: #e8e1d5;
    --bg-soft: #e8e1d5;
    --surface: #f3ede4;
    --surface-2: #ede5d9;
    --surface-3: #e8e0d3;
    --line: #d8cfc0;
    --border: rgba(188, 128, 24, 0.34);
    --border-strong: rgba(178, 118, 18, 0.52);
    --gold: #b87d14;
    --gold-bright: #d49220;
    --gold-soft: rgba(185, 125, 28, 0.17);
    --green: #4fbe3c;
    --red: #ef4e48;
    --blue: #3d93ef;
    --text: #1c1a16;
    --muted: #5a564f;
    --muted-2: #767064;
    --card-shadow: 0 14px 42px rgba(82, 58, 14, 0.13);
    --soft-shadow: 0 10px 30px rgba(82, 58, 14, 0.1);
    --header-grad: radial-gradient(circle at 88% -35%, rgba(200, 140, 30, 0.24), transparent 31%),
        linear-gradient(180deg, #ede5d9, #e4dbd0);
}

html[data-theme="light"] body.desktop-view {
    background: linear-gradient(180deg, var(--bg), var(--bg-soft));
}

html[data-theme="light"] .action-button.fill {
    color: #4a2f04;
    background: linear-gradient(135deg, #efbe4a, #c98b22);
}

html[data-theme="light"] .product-card {
    box-shadow: 0 10px 28px rgba(90, 62, 15, 0.11);
}

html[data-theme="light"] .price-divider {
    background: #cfc4b4;
}

html[data-theme="light"] .table thead th {
    background: #e4dbd0;
}

html[data-theme="light"] .logo h1 {
    color: #c98b22;
}

.transactions .section-head {
    margin-bottom: 14px;
}

.transactions .section-head h2 {
    font-size: 20px;
}

.transactions .more-btn {
    margin-top: 0;
    min-height: 40px;
    padding: 8px 18px;
    border-radius: 12px;
    font-size: 14px;
    transition: var(--transition);
    white-space: nowrap;
}

.transactions .more-btn:hover {
    border-color: var(--gold-bright);
    background: var(--gold-soft);
    color: var(--gold-bright);
    transform: translateY(-1px);
}

@media (max-width: 760px) {
    .transactions .section-head {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .transactions .section-head h2 {
        font-size: 17px;
    }

    .transactions .more-btn {
        justify-content: center;
        width: 100%;
    }

    .transactions .desktop-table,
    .transactions .ag-transactions-scroll {
        display: block !important;
    }

    .transactions .mobile-table-fallback {
        display: none !important;
    }

    .ag-transactions-scroll {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: var(--gold-bright) transparent;
        margin-inline: -4px;
        padding-inline: 4px 8px;
        padding-bottom: 6px;
    }

    .ag-transactions-scroll::-webkit-scrollbar {
        height: 6px;
    }

    .ag-transactions-scroll::-webkit-scrollbar-thumb {
        background: var(--gold-soft);
        border-radius: 999px;
    }

    .ag-transactions-scroll::-webkit-scrollbar-track {
        background: transparent;
    }

    .ag-transactions-table {
        min-width: 760px;
        margin-bottom: 0;
    }

    .ag-transactions-table thead th,
    .ag-transactions-table tbody td {
        padding: 10px 12px;
        font-size: 13px;
    }

    .ag-transactions-table .status {
        font-size: 12px;
        white-space: nowrap;
    }
}

/* ---------- Mobile compact UX (desktop untouched) ---------- */
@media (max-width: 760px) {
    .desktop-page {
        padding: 6px 8px calc(120px + env(safe-area-inset-bottom, 0px));
    }

    .desktop-page:has(.ag-report-page) {
        padding-bottom: calc(140px + env(safe-area-inset-bottom, 0px));
    }

    .desktop-header {
        padding: 12px 14px !important;
        min-height: auto;
        gap: 10px;
    }

    .desktop-header .ag-brand {
        gap: 4px;
    }

    .desktop-header .ag-brand h1 {
        font-size: 19px;
    }

    .desktop-header .ag-brand p {
        font-size: 10px;
        line-height: 1.35;
    }

    .desktop-header .ag-logo-img {
        width: 150px;
        height: 32px;
    }

    .desktop-header .ag-brand .logo-bars {
        width: 48px;
        height: 32px;
    }

    .ag-mobile-balance-accordion {
        margin-top: 10px;
        border-radius: 16px;
    }

    .ag-mobile-balance-trigger {
        padding: 12px 14px;
        gap: 10px;
    }

    .ag-mobile-balance-trigger__main {
        gap: 10px;
    }

    .ag-mobile-balance-trigger__main .icon-box {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        font-size: 16px;
    }

    .ag-mobile-balance-trigger__text .label {
        font-size: 12px;
        margin-bottom: 4px;
    }

    .ag-mobile-balance-trigger__text h2 {
        font-size: 22px;
    }

    .ag-mobile-balance-more {
        min-height: 32px;
        padding: 0 10px;
        font-size: 11px;
    }

    .ag-mobile-balance-body {
        padding: 0 14px;
    }

    .ag-mobile-balance-accordion.is-open .ag-mobile-balance-body {
        padding-bottom: 12px;
    }

    .ag-gold-asset-list--mobile {
        padding-top: 10px;
        margin-bottom: 8px;
    }

    .ag-gold-asset-list--mobile .ag-gold-asset-item {
        font-size: 11px;
        padding: 4px 0;
    }

    .ag-mobile-balance-detail {
        margin-bottom: 10px;
    }

    .ag-mobile-balance-detail .sub {
        font-size: 13px;
    }

    .ag-mobile-withdraw-card {
        padding: 10px 12px;
        border-radius: 12px;
    }

    .ag-mobile-withdraw-card__head {
        gap: 10px;
    }

    .ag-mobile-withdraw-card__head .icon-box {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .ag-mobile-withdraw-card__head .label {
        font-size: 12px;
        margin-bottom: 4px;
    }

    .ag-mobile-withdraw-card__head h2 {
        font-size: 20px;
    }

    .ag-mobile-withdraw-card .mini-outline,
    .ag-mobile-withdraw-btn {
        padding: 5px 16px;
        font-size: 12px;
    }

    .ag-mobile-referral-card {
        margin-top: 10px;
    }

    .ag-mobile-referral-card .sub {
        display: block;
        margin-top: 6px;
        color: var(--muted);
        font-size: 11px;
        line-height: 1.4;
    }

    .notice {
        margin-top: 10px !important;
        padding: 10px 14px !important;
        min-height: auto !important;
        gap: 10px !important;
    }

    .notice-title {
        font-size: 14px !important;
    }

    .notice p {
        font-size: 12px !important;
        line-height: 1.6 !important;
    }

    .desktop-market.section-panel {
        margin-top: 10px !important;
        padding: 12px 14px !important;
    }

    .desktop-market .section-head {
        margin-bottom: 8px;
    }

    .desktop-market .section-head h2 {
        font-size: 16px;
    }

    .desktop-market .category {
        margin-top: 4px;
    }

    .desktop-market .category-title {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .desktop-market .product-grid {
        gap: 10px;
    }

    .desktop-market .product-card {
        min-height: auto !important;
        padding: 10px 12px !important;
        border-radius: 12px !important;
    }

    .desktop-market .product-card h3 {
        font-size: 15px;
        margin-bottom: 8px;
    }

    .desktop-market .price-pair {
        gap: 8px;
    }

    .desktop-market .price-divider {
        height: 34px;
    }

    .desktop-market .price-side small {
        font-size: 11px;
        margin-bottom: 2px;
    }

    .product-card .ab-order-link small {
        font-size: 11px;
        margin-bottom: 2px;
    }

    .desktop-market .product-card .ab-price-value {
        font-size: 17px;
    }

    .desktop-market .validity {
        min-height: 22px;
        margin-top: 8px;
        padding: 2px 8px;
        font-size: 10px;
        gap: 4px;
    }

    .product-card .mobile-actions-row {
        gap: 8px;
        margin-top: 10px;
        padding-top: 8px;
    }

    .product-card .mobile-actions-row .trade-btn {
        min-height: 40px;
        padding: 8px 12px;
        font-size: 13px;
        border-radius: 10px;
    }

    .transactions {
        margin-top: 10px !important;
        padding: 12px 14px !important;
    }

    .transactions .section-head {
        margin-bottom: 10px;
        gap: 8px;
    }

    .transactions .section-head h2 {
        font-size: 15px;
    }

    .transactions .more-btn {
        min-height: 34px;
        padding: 6px 14px;
        font-size: 12px;
    }

    .ag-transactions-table thead th,
    .ag-transactions-table tbody td {
        padding: 8px 10px;
        font-size: 12px;
    }

    .ag-transactions-table .status {
        font-size: 11px;
        gap: 4px;
    }

    .ag-bottom-nav-wrapper {
        margin-top: 0;
    }

    .bottom-nav.ag-bottom-nav {
        min-height: 72px !important;
        padding: 6px 8px !important;
        border-radius: 18px !important;
        gap: 4px !important;
    }

    .bottom-nav.ag-bottom-nav a,
    .ag-bottom-nav-trigger {
        font-size: 12px !important;
        gap: 4px !important;
        border-radius: 14px !important;
    }

    .bottom-nav.ag-bottom-nav i,
    .ag-bottom-nav-trigger i {
        font-size: 22px !important;
    }

    .ag-mobile-actions-panel {
        padding: 12px;
        border-radius: 18px;
    }

    .ag-mobile-actions-panel__head {
        font-size: 15px;
        margin-bottom: 10px;
    }

    .ag-mobile-action-item {
        min-height: 60px;
        padding: 10px;
        font-size: 12px;
        border-radius: 12px;
    }

    .ag-mobile-action-item i {
        font-size: 20px;
    }

    .ag-mobile-profile-user .avatar {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .ag-mobile-profile-user strong {
        font-size: 13px;
    }

    .ag-mobile-profile-item {
        min-height: 44px;
        padding: 0 12px;
        font-size: 13px;
        border-radius: 12px;
    }
}

.category-block--empty {
    display: none !important;
}
