/* Molten gold (طلای آب‌شده) page */
.sj-mg-page {
    padding: clamp(1.25rem, 4vw, 2.5rem) 0 clamp(2.5rem, 6vw, 4rem);
    background: linear-gradient(180deg, #faf8f4 0%, #fff 40%, #f6f1e6 100%);
}

.sj-mg-page__container {
    width: min(100%, 56rem);
    margin: 0 auto;
    padding: 0 clamp(1rem, 3vw, 1.5rem);
}

.sj-mg-page__hero {
    position: relative;
    margin-bottom: 1.5rem;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1510 0%, #3d3020 55%, #2a2218 100%);
    color: #f5efe4;
    box-shadow: 0 20px 50px -20px rgba(26, 21, 16, 0.45);
}

.sj-mg-page__hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.sj-mg-page__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.45;
}

.sj-mg-page__orb--a {
    width: 180px;
    height: 180px;
    top: -40px;
    right: -20px;
    background: #d4b489;
}

.sj-mg-page__orb--b {
    width: 140px;
    height: 140px;
    bottom: -30px;
    left: 10%;
    background: #8a6f47;
}

.sj-mg-page__hero-inner {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem 1.75rem;
}

.sj-mg-page__hero-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    background: rgba(212, 180, 137, 0.15);
    border: 1px solid rgba(212, 180, 137, 0.35);
    color: #d4b489;
    font-size: 1.6rem;
}

.sj-mg-page__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0 0 0.35rem;
    font-size: 0.75rem;
    color: rgba(245, 239, 228, 0.65);
}

.sj-mg-page__title {
    margin: 0 0 0.35rem;
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    font-weight: 700;
    color: #fff;
}

.sj-mg-page__subtitle {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(245, 239, 228, 0.75);
}

.sj-mg-panel__card {
    background: #fff;
    border: 1px solid #e3dac5;
    border-radius: 16px;
    padding: 1.15rem 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 10px 30px -18px rgba(138, 111, 71, 0.2);
}

.sj-mg-panel__card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
}

.sj-mg-panel__prices-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.sj-mg-panel__badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: #fee2e2;
    color: #b91c1c;
}

.sj-mg-panel__badge.is-open {
    background: #dcfce7;
    color: #166534;
}

.sj-mg-panel__market-msg {
    margin: 0 0 0.85rem;
    font-size: 0.82rem;
    color: #6b6b6b;
}

.sj-mg-panel__price-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.sj-mg-price {
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1px solid #ececec;
}

.sj-mg-price--buy {
    background: linear-gradient(145deg, #fffbeb, #fff);
    border-color: #e3dac5;
}

.sj-mg-price--sell {
    background: linear-gradient(145deg, #f0fdf4, #fff);
    border-color: #bbf7d0;
}

.sj-mg-price__label {
    display: block;
    font-size: 0.72rem;
    color: #6b6b6b;
    margin-bottom: 0.25rem;
}

.sj-mg-price__value {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: #8a6f47;
}

.sj-mg-price__unit {
    font-size: 0.68rem;
    color: #9ca3af;
}

.sj-mg-panel__price-hint {
    margin: 0.75rem 0 0;
    font-size: 0.75rem;
    color: #9ca3af;
}

.sj-mg-panel__balances {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.sj-mg-balance__label {
    display: block;
    font-size: 0.72rem;
    color: #6b6b6b;
}

.sj-mg-balance__value {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a1a;
}

.sj-mg-balance__unit {
    font-size: 0.72rem;
    color: #9ca3af;
}

.sj-mg-panel__alert {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    margin-bottom: 1rem;
}

.sj-mg-panel__alert--warn {
    background: #fef2f2;
    border-color: #fecaca;
}

.sj-mg-panel__alert p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.55;
}

.sj-mg-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #ececec;
}

.sj-mg-tabs__btn {
    padding: 0.45rem 0.85rem;
    border: 1px solid #e3dac5;
    border-radius: 999px;
    background: #faf8f4;
    color: #6b6b6b;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.sj-mg-tabs__btn.is-active {
    background: #8a6f47;
    border-color: #8a6f47;
    color: #fff;
}

.sj-mg-tab-panel {
    display: none;
}

.sj-mg-tab-panel.is-active {
    display: block;
}

.sj-mg-form__field {
    margin-bottom: 0.85rem;
}

.sj-mg-form__field label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.sj-mg-form__field input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid #e3dac5;
    border-radius: 10px;
    font-size: 1rem;
}

.sj-mg-form__estimate {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0.9rem;
    margin-bottom: 0.85rem;
    border-radius: 10px;
    background: #f6f1e6;
    font-size: 0.85rem;
}

.sj-mg-form__estimate strong {
    color: #8a6f47;
    font-size: 1rem;
}

.sj-mg-form__pay {
    margin: 0 0 0.85rem;
    padding: 0.75rem 0;
    border: 0;
}

.sj-mg-form__pay legend {
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.sj-mg-form__pay label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-inline-end: 1rem;
    font-size: 0.85rem;
}

.sj-mg-form__note {
    margin: 0 0 0.85rem;
    font-size: 0.78rem;
    color: #6b6b6b;
}

.sj-mg-form__submit {
    width: 100%;
    justify-content: center;
}

.sj-mg-form__submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.sj-mg-trades {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sj-mg-trades__item {
    padding: 0.85rem 0;
    border-bottom: 1px solid #f0ebe0;
}

.sj-mg-trades__item:last-child {
    border-bottom: 0;
}

.sj-mg-trades__head {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
    font-size: 0.88rem;
}

.sj-mg-trades__status {
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    background: #f3f4f6;
    color: #4b5563;
}

.sj-mg-trades__item--pending .sj-mg-trades__status {
    background: #fffbeb;
    color: #b45309;
}

.sj-mg-trades__item--completed .sj-mg-trades__status {
    background: #dcfce7;
    color: #166534;
}

.sj-mg-trades__meta {
    font-size: 0.82rem;
    color: #6b6b6b;
}

.sj-mg-trades__time {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.72rem;
    color: #9ca3af;
}

.sj-mg-trades__pay {
    display: inline-flex;
    margin-top: 0.5rem;
    font-size: 0.82rem;
    padding: 0.4rem 0.85rem;
}

.sj-mg-empty {
    margin: 0;
    color: #6b6b6b;
    font-size: 0.88rem;
}

.sj-mg-panel__toast {
    position: fixed;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999999;
    max-width: min(90vw, 24rem);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: #1a1510;
    color: #fff;
    font-size: 0.88rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.sj-mg-panel__toast.is-error {
    background: #b91c1c;
}

.sj-mg-panel__toast.is-success {
    background: #166534;
}

@media (max-width: 560px) {
    .sj-mg-panel__price-grid,
    .sj-mg-panel__balances {
        grid-template-columns: 1fr;
    }
}
