.marsalma-account-section {
    --marsalma-ink: #17251e;
    --marsalma-muted: #66736c;
    --marsalma-green: #1f6a47;
    --marsalma-green-dark: #154d34;
    --marsalma-mint: #eaf4ee;
    --marsalma-sand: #f5f1e7;
    color: var(--marsalma-ink);
}

.woocommerce-account:not(.logged-in) .woocommerce {
    max-width: 780px;
    margin-inline: auto;
}

.woocommerce-account:not(.logged-in) .page-content {
    width: 100%;
    margin-inline: auto;
}

.woocommerce-account:not(.logged-in) .woocommerce-form-login,
.woocommerce-account:not(.logged-in) .lost_reset_password {
    padding: clamp(22px, 4vw, 38px);
    border: 1px solid #e1e8e3;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 16px 46px rgba(24, 53, 39, .08);
}

.marsalma-account-access-note {
    margin: 0 0 26px;
    padding: 22px;
    border-radius: 17px;
    background: linear-gradient(135deg, #173f2d 0%, #286f4e 100%);
    color: #fff;
}

.marsalma-account-access-note__eyebrow {
    display: block;
    margin-bottom: 7px;
    color: rgba(255, 255, 255, .68);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.marsalma-account-access-note strong {
    display: block;
    font-size: clamp(18px, 2.4vw, 23px);
    line-height: 1.25;
}

.marsalma-account-access-note p {
    margin: 9px 0 0;
    color: rgba(255, 255, 255, .82);
}

.marsalma-account-access-note .marsalma-account-access-note__button {
    margin-top: 17px;
    border: 0;
    border-radius: 10px;
    background: #fff;
    color: #174e35;
    font-weight: 750;
}

.marsalma-account-access-note .marsalma-account-access-note__button:hover {
    background: #f4f7f5;
    color: #123f2c;
}

.marsalma-account-access-note--compact {
    padding: 18px 20px;
    background: #edf5f0;
    color: #173f2d;
}

.marsalma-account-access-note--compact strong { font-size: 18px; }
.marsalma-account-access-note--compact p { color: #56675d; }

/* Вход и восстановление доступа — стиль прежнего личного кабинета Marsalma. */
.woocommerce-account:not(.logged-in) .woocommerce {
    --marsalma-login-blue: #0d4175;
    --marsalma-login-sky: #58b7ef;
}
.woocommerce-account:not(.logged-in) .woocommerce-form-login,
.woocommerce-account:not(.logged-in) .lost_reset_password {
    border-color: #e3e6e9;
    border-radius: 8px;
    box-shadow: 0 12px 36px rgba(13, 65, 117, .08);
}
.woocommerce-account:not(.logged-in) .marsalma-account-access-note {
    border-radius: 8px;
    background: var(--marsalma-login-blue);
    box-shadow: none;
}
.woocommerce-account:not(.logged-in) .marsalma-account-access-note__eyebrow {
    color: rgba(255, 255, 255, .72);
}
.woocommerce-account:not(.logged-in) .marsalma-account-access-note strong { color: #fff; }
.woocommerce-account:not(.logged-in) .marsalma-account-access-note p { color: rgba(255, 255, 255, .82); }
.woocommerce-account:not(.logged-in) .marsalma-account-access-note .marsalma-account-access-note__button {
    min-height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: 7px;
    background: linear-gradient(90deg, #17558e 0%, var(--marsalma-login-sky) 100%);
    color: #fff;
    font-weight: 750;
}
.woocommerce-account:not(.logged-in) .marsalma-account-access-note .marsalma-account-access-note__button:hover {
    background: linear-gradient(90deg, #104577 0%, #45a9e5 100%);
    color: #fff;
}
.woocommerce-account:not(.logged-in) .woocommerce-form-login label,
.woocommerce-account:not(.logged-in) .lost_reset_password label {
    color: #253543;
    font-weight: 650;
}
.woocommerce-account:not(.logged-in) .woocommerce-form-login .input-text,
.woocommerce-account:not(.logged-in) .lost_reset_password .input-text {
    min-height: 48px;
    border: 1px solid #d5dce2;
    border-radius: 7px;
    background: #f7f8f9;
}
.woocommerce-account:not(.logged-in) .woocommerce-form-login .input-text:focus,
.woocommerce-account:not(.logged-in) .lost_reset_password .input-text:focus {
    border-color: var(--marsalma-login-sky);
    outline: 2px solid rgba(88, 183, 239, .18);
}
.woocommerce-account:not(.logged-in) .woocommerce-form-login__submit,
.woocommerce-account:not(.logged-in) .lost_reset_password .button {
    min-height: 48px;
    padding: 0 24px;
    border: 0;
    border-radius: 7px;
    background: var(--marsalma-login-blue);
    color: #fff;
    font-weight: 750;
}
.woocommerce-account:not(.logged-in) .woocommerce-form-login__submit:hover,
.woocommerce-account:not(.logged-in) .lost_reset_password .button:hover {
    background: #082f59;
    color: #fff;
}
.woocommerce-account:not(.logged-in) .woocommerce-LostPassword a { color: var(--marsalma-login-blue); font-weight: 650; }
.woocommerce-account:not(.logged-in) .marsalma-account-access-note--compact {
    background: #edf5fb;
    color: #173e61;
}
.woocommerce-account:not(.logged-in) .marsalma-account-access-note--compact strong { color: #173e61; }
.woocommerce-account:not(.logged-in) .marsalma-account-access-note--compact p { color: #4d6273; }

.woocommerce-account .woocommerce-MyAccount-navigation { width: 20%; }
.woocommerce-account.logged-in .page-content {
    width: 100%;
    max-width: none;
}
.woocommerce-account .woocommerce-MyAccount-content {
    width: 76%;
    container-type: inline-size;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    list-style: none;
    border: 1px solid #dce2e7;
    border-radius: 7px;
    background: #fff;
}
.woocommerce-account .woocommerce-MyAccount-navigation li {
    margin: 0;
    border-bottom: 1px solid #e8edf1;
}
.woocommerce-account .woocommerce-MyAccount-navigation li:last-child { border-bottom: 0; }
.woocommerce-account .woocommerce-MyAccount-navigation a {
    display: flex;
    align-items: center;
    min-height: 50px;
    padding: 12px 18px;
    border-radius: 0;
    color: #123f70;
    font-weight: 650;
    text-decoration: none;
}
.woocommerce-account .woocommerce-MyAccount-navigation a:hover { background: #edf5fb; color: #093b6f; }
.woocommerce-account .woocommerce-MyAccount-navigation .is-active a { background: #093b6f; color: #fff; }

.marsalma-account-heading {
    margin: 0 0 24px;
    padding: 26px 28px;
    border-radius: 22px;
    background: linear-gradient(135deg, #173f2d 0%, #286f4e 100%);
    color: #fff;
}

.marsalma-account-heading h2,
.marsalma-account-panel h3 {
    margin: 4px 0 8px;
}

.marsalma-account-heading h2 { color: #fff; }
.marsalma-account-heading p { max-width: 680px; margin: 0; color: rgba(255,255,255,.82); }
.marsalma-account-eyebrow,
.marsalma-account-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    opacity: .72;
}

.marsalma-partner-link-card,
.marsalma-account-panel,
.marsalma-account-note {
    margin: 0 0 20px;
    padding: 22px;
    border: 1px solid #e1e8e3;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(24, 53, 39, .06);
}

.marsalma-partner-link-card {
    display: grid;
    grid-template-columns: minmax(150px, .45fr) minmax(260px, 1.55fr);
    gap: 22px;
    align-items: end;
}

.marsalma-partner-code { display: block; margin-top: 5px; font-size: 24px; letter-spacing: .04em; }
.marsalma-partner-link-field label { display: block; margin: 0 0 7px; font-weight: 650; }
.marsalma-partner-link-field input { width: 100%; min-height: 44px; border-radius: 11px; background: #f7faf8; }

.marsalma-account-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 20px;
}
.marsalma-account-stats--compact { grid-template-columns: minmax(220px, 320px); }
.marsalma-account-stats--compact .marsalma-stat-card { min-height: 112px; }

.marsalma-bonus-dashboard .marsalma-account-stats--compact {
    grid-template-columns: minmax(0, 450px);
}
.marsalma-bonus-dashboard .marsalma-account-heading {
    margin: 0 0 28px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #122033;
}
.marsalma-bonus-dashboard .marsalma-account-heading h2 {
    margin: 0 0 10px;
    color: #050505;
    font-size: clamp(27px, 2.4vw, 34px);
}
.marsalma-bonus-dashboard .marsalma-account-heading p {
    max-width: 820px;
    color: #52677a;
    font-size: 15px;
    line-height: 1.55;
}
.marsalma-bonus-dashboard .marsalma-stat-card--available {
    display: grid;
    min-height: 0;
    aspect-ratio: 3 / 2;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 16px;
    padding: 20px 22px 26px;
    overflow: hidden;
    border: 0;
    border-radius: 7px;
    background-color: #123f70;
    background-image: url('../images/bonus-card-tilda.webp');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    box-shadow: 0 12px 28px rgba(9, 59, 111, .16);
}
.marsalma-bonus-dashboard .marsalma-stat-card--available span {
    min-height: 0;
    color: #fff;
    font-size: 14px;
    font-weight: 650;
}
.marsalma-bonus-dashboard .marsalma-stat-card--available strong {
    margin: 0;
    color: #fff;
    font-size: clamp(26px, 2.5vw, 34px);
    white-space: nowrap;
}
.marsalma-bonus-dashboard .marsalma-account-panel {
    margin: 38px 0 48px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.marsalma-bonus-dashboard .marsalma-account-panel h3 {
    margin: 0 0 14px;
    color: #050505;
    font-size: clamp(23px, 2vw, 28px);
}
.marsalma-bonus-dashboard .shop_table {
    width: 100%;
    border: 0;
    border-collapse: separate;
    border-spacing: 0 7px;
}
.marsalma-bonus-dashboard .shop_table th {
    padding: 0 14px 4px;
    border: 0;
    color: #123f70;
    font-size: 14px;
    font-weight: 650;
    letter-spacing: 0;
    text-transform: none;
}
.marsalma-bonus-dashboard .shop_table td {
    padding: 13px 14px;
    border: 0;
    background: #f2f2f2;
    color: #122033;
}
.marsalma-bonus-dashboard .shop_table td:first-child { border-radius: 7px 0 0 7px; }
.marsalma-bonus-dashboard .shop_table td:last-child {
    border-radius: 0 7px 7px 0;
    text-align: right;
    white-space: nowrap;
}

.marsalma-stat-card {
    min-height: 118px;
    padding: 18px;
    border-radius: 16px;
    background: #f7f9f7;
    border: 1px solid #e5ebe7;
}
.marsalma-stat-card span { display: block; min-height: 38px; color: var(--marsalma-muted); font-size: 13px; line-height: 1.35; }
.marsalma-stat-card strong { display: block; margin-top: 12px; font-size: clamp(20px, 2vw, 28px); line-height: 1; }
.marsalma-stat-card--available { color: #fff; border-color: var(--marsalma-green); background: var(--marsalma-green); }
.marsalma-stat-card--available span { color: rgba(255,255,255,.75); }
.marsalma-stat-card--pending { background: #fff8e8; border-color: #f0dfb1; }

.marsalma-account-note { background: var(--marsalma-sand); border-color: transparent; box-shadow: none; }
.marsalma-account-note p { margin: 6px 0 0; color: #566158; }
.marsalma-account-panel-heading { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.marsalma-withdrawal-panel .button { min-height: 44px; padding: 0 20px; border: 0; border-radius: 11px; background: var(--marsalma-green); color: #fff; font-weight: 700; }
.marsalma-withdrawal-panel .button:hover { background: var(--marsalma-green-dark); color: #fff; }
.marsalma-withdrawal-current { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 16px; border-radius: 13px; background: var(--marsalma-mint); }
.marsalma-withdrawal-current span { color: var(--marsalma-muted); }
.marsalma-withdrawal-current strong { font-size: 20px; }
.marsalma-withdrawal-current em { color: var(--marsalma-green-dark); font-style: normal; }

.marsalma-account-table-wrap { overflow-x: auto; }
.marsalma-account-panel .shop_table { margin-bottom: 0; }
.marsalma-commission-history table { margin: 10px 0 0; border: 0; }
.marsalma-commission-history th { color: var(--marsalma-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.marsalma-status { display: inline-flex; padding: 5px 9px; border-radius: 999px; background: #eef1ef; font-size: 12px; font-weight: 700; }
.marsalma-status--confirmed { color: #135b37; background: #dff2e7; }
.marsalma-status--pending { color: #7b5912; background: #fff1c9; }
.marsalma-status--reversed { color: #8a3434; background: #f8e4e4; }

/* Партнёрский кабинет — визуально продолжает прежний кабинет Marsalma. */
.marsalma-partner-dashboard {
    --marsalma-partner-blue: #0d4175;
    --marsalma-partner-blue-light: #58b7ef;
    --marsalma-partner-row: #f2f2f2;
    color: #101820;
}
.marsalma-partner-overview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(500px, 1fr);
    gap: clamp(28px, 3.5vw, 46px);
    align-items: end;
    margin-bottom: 48px;
}

.marsalma-partner-dashboard,
.marsalma-partner-overview__intro,
.marsalma-partner-overview__summary {
    min-width: 0;
}

/* The WooCommerce menu reduces the useful width even on a wide monitor.
 * Adapt the partner screen to that content column, not to the viewport. */
@container (max-width: 980px) {
    .marsalma-partner-overview {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
        align-items: stretch;
    }

    .marsalma-partner-dashboard .marsalma-account-heading p {
        max-width: 720px;
    }
}

@container (max-width: 520px) {
    .marsalma-partner-dashboard .marsalma-account-stats,
    .marsalma-partner-dashboard .marsalma-partner-link-field,
    .marsalma-partner-customers__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
.marsalma-partner-dashboard .marsalma-account-heading {
    margin: 0 0 18px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #101820;
}
.marsalma-partner-dashboard .marsalma-account-heading h2 {
    margin: 0 0 10px;
    color: #050505;
    font-size: clamp(26px, 2.2vw, 32px);
    line-height: 1.15;
}
.marsalma-partner-dashboard .marsalma-account-heading p {
    max-width: 680px;
    color: #1f2933;
    font-size: 16px;
    line-height: 1.25;
}
.marsalma-partner-dashboard .marsalma-account-eyebrow { display: none; }
.marsalma-partner-rules-link {
    display: inline-block;
    margin: 0 0 22px;
    color: var(--marsalma-partner-blue);
    font-weight: 750;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.marsalma-partner-rules-link:hover { color: var(--marsalma-partner-blue-light); }
.marsalma-partner-dashboard .marsalma-partner-link-card {
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.marsalma-partner-dashboard .marsalma-account-label {
    margin-bottom: 10px;
    color: #050505;
    font-size: clamp(20px, 2.4vw, 29px);
    font-weight: 750;
    letter-spacing: 0;
    text-transform: none;
    opacity: 1;
}
.marsalma-partner-dashboard .marsalma-partner-code {
    display: none;
}
.marsalma-partner-dashboard .marsalma-partner-link-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(160px, 200px);
    gap: 12px;
}
.marsalma-partner-dashboard .marsalma-partner-link-field input {
    min-height: 54px;
    padding: 0 18px;
    border: 0;
    border-radius: 7px;
    background: #f3f3f3;
    color: var(--marsalma-partner-blue);
    font-weight: 750;
}
.marsalma-partner-dashboard .marsalma-copy-partner-link,
.marsalma-partner-dashboard .marsalma-withdrawal-panel .button {
    min-height: 54px;
    padding: 0 22px;
    border: 0;
    border-radius: 7px;
    background: var(--marsalma-partner-blue);
    color: #fff;
    font-weight: 750;
}
.woocommerce-account .marsalma-partner-dashboard button.button.marsalma-copy-partner-link {
    border-radius: 7px;
    color: #122033;
    background: #ff8562;
}
.woocommerce-account .marsalma-partner-dashboard button.button.marsalma-copy-partner-link:hover {
    color: #122033;
    background: #ff7257;
}
.marsalma-partner-dashboard .marsalma-account-stats {
    grid-template-columns: 1.35fr 1fr 1fr;
    gap: 7px;
    margin: 0 0 7px;
}
.marsalma-partner-dashboard .marsalma-stat-card {
    min-width: 0;
    min-height: 130px;
    padding: 16px 14px;
    border: 0;
    border-radius: 7px;
    background: var(--marsalma-partner-blue);
    color: #fff;
}
.marsalma-partner-dashboard .marsalma-stat-card span {
    min-height: 45px;
    color: #fff;
    font-size: 15px;
    font-weight: 650;
    line-height: 1;
}
.marsalma-partner-dashboard .marsalma-stat-card strong {
    margin-top: 11px;
    color: #fff;
    font-size: clamp(25px, 2.5vw, 34px);
    white-space: nowrap;
}
.marsalma-partner-dashboard .marsalma-withdrawal-panel { margin: 0; padding: 0; }
.marsalma-partner-dashboard .marsalma-withdrawal-panel form { margin: 0; }
.marsalma-partner-dashboard .marsalma-withdrawal-panel .button {
    width: 100%;
    min-height: 45px;
    background: linear-gradient(90deg, #10457a 0%, var(--marsalma-partner-blue-light) 100%);
}
.marsalma-partner-dashboard .marsalma-withdrawal-panel .button:hover { filter: brightness(.96); }
.marsalma-partner-dashboard .marsalma-withdrawal-panel .button:disabled { opacity: .55; }
.marsalma-partner-dashboard .marsalma-withdrawal-current {
    min-height: 45px;
    justify-content: center;
    border-radius: 7px;
    background: #e6f2fb;
}
.marsalma-partner-pending { margin: 9px 0 0; color: #5c6770; font-size: 13px; text-align: right; }
.marsalma-partner-dashboard .marsalma-account-note {
    margin-bottom: 42px;
    padding: 17px 20px;
    border: 0;
    border-left: 4px solid var(--marsalma-partner-blue-light);
    border-radius: 7px;
    background: #f5f7f9;
}
.marsalma-partner-dashboard .marsalma-account-note p { color: #38434d; }
.marsalma-partner-dashboard .marsalma-account-panel {
    margin: 0 0 48px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.marsalma-partner-dashboard .marsalma-account-panel h3,
.marsalma-partner-customers h3 {
    margin: 0 0 14px;
    color: #050505;
    font-size: clamp(23px, 2vw, 28px);
    line-height: 1.2;
}
.marsalma-partner-dashboard .marsalma-commission-history table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 7px;
}
.marsalma-partner-dashboard .marsalma-commission-history th {
    padding: 0 14px 4px;
    color: var(--marsalma-partner-blue);
    font-size: 14px;
    letter-spacing: 0;
    text-transform: none;
}
.marsalma-partner-dashboard .marsalma-commission-history td {
    padding: 12px 14px;
    border: 0;
    background: var(--marsalma-partner-row);
    color: #111;
    line-height: 1.25;
}
.marsalma-partner-dashboard .marsalma-commission-history td:first-child { border-radius: 7px 0 0 7px; }
.marsalma-partner-dashboard .marsalma-commission-history td:last-child { border-radius: 0 7px 7px 0; text-align: right; white-space: nowrap; }
.marsalma-operation { color: var(--marsalma-partner-blue-light); font-weight: 750; }
.marsalma-operation--reversed { color: #a23e3e; }
.marsalma-operation--pending { color: #9a7419; }
.marsalma-partner-customers { margin-bottom: 28px; }
.marsalma-partner-customers__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.marsalma-partner-customer-card {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 80px;
    padding: 12px;
    border-radius: 7px;
    background: #f3f3f3;
}
.marsalma-partner-customer-icon {
    display: grid;
    width: 56px;
    height: 56px;
    place-items: center;
    border-radius: 7px;
    background: var(--marsalma-partner-blue);
    color: #fff;
    font-size: 22px;
}
.marsalma-partner-customer-card strong,
.marsalma-partner-customer-card small { display: block; }
.marsalma-partner-customer-card strong { color: #777; font-size: 15px; }
.marsalma-partner-customer-card small { margin-top: 4px; color: #8a8a8a; }

.woocommerce-account .woocommerce-orders-table {
    border: 0;
    border-collapse: separate;
    border-spacing: 0 10px;
}
.woocommerce-account .woocommerce-orders-table thead th {
    padding: 0 14px 7px;
    border: 0;
    color: #728078;
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.woocommerce-account .woocommerce-orders-table tbody tr {
    border: 1px solid #e7ece8;
    border-radius: 14px;
    background: #f8faf8;
}
.woocommerce-account .woocommerce-orders-table tbody td {
    padding: 15px 14px;
    border: 0;
    vertical-align: middle;
}
.woocommerce-account .woocommerce-orders-table tbody td:first-child { border-radius: 14px 0 0 14px; }
.woocommerce-account .woocommerce-orders-table tbody td:last-child { border-radius: 0 14px 14px 0; }
.woocommerce-account .woocommerce-orders-table__cell-order-number a { color: var(--marsalma-ink, #17251e); font-weight: 750; }
.woocommerce-account .woocommerce-orders-table__cell-marsalma-total { white-space: nowrap; font-weight: 750; }
.woocommerce-account .woocommerce-orders-table__cell-order-actions .button {
    min-width: 112px;
    padding: 9px 14px;
    border: 1px solid #cbd6cf;
    border-radius: 9px;
    background: #fff;
    color: #244638;
    text-align: center;
}
.marsalma-order-thumbs { display: flex; align-items: center; min-width: 105px; }
.marsalma-order-thumbs img,
.marsalma-order-thumb-placeholder {
    width: 38px;
    height: 38px;
    margin-left: -8px;
    border: 2px solid #fff;
    border-radius: 9px;
    background: #e9efeb;
    object-fit: cover;
}
.marsalma-order-thumbs img:first-child,
.marsalma-order-thumb-placeholder:first-child { margin-left: 0; }
.marsalma-order-thumbs strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 27px;
    height: 27px;
    margin-left: 7px;
    padding: 0 6px;
    border-radius: 999px;
    background: #e7efe9;
    color: #3d584a;
    font-size: 11px;
}
.marsalma-order-items-empty { color: #829087; font-size: 12px; }
.marsalma-order-bonus { color: #1b7650; font-weight: 750; white-space: nowrap; }
.marsalma-order-bonus--empty { color: #a2aba5; }

.marsalma-order-summary {
    margin: 0 0 28px;
    padding: 26px;
    border-radius: 22px;
    background: linear-gradient(145deg, #f0f7f3, #fff 58%);
    border: 1px solid #dfe9e2;
}
.marsalma-order-summary__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.marsalma-order-summary__top h2 { margin: 4px 0 0; }
.marsalma-order-summary__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 22px 0 0;
}
.marsalma-order-summary__grid > div {
    padding: 14px;
    border-radius: 13px;
    background: rgba(255,255,255,.88);
    border: 1px solid #e5ece7;
}
.marsalma-order-summary__grid span,
.marsalma-order-summary__address span { display: block; margin-bottom: 5px; color: #76837c; font-size: 12px; }
.marsalma-order-summary__grid strong { font-size: 17px; }
.marsalma-order-summary__address { margin-top: 14px; padding: 16px; border-radius: 13px; background: #fff; }
.marsalma-order-summary__address strong { font-size: 14px; line-height: 1.5; }
.marsalma-order-summary__promo { margin: 14px 0 0; }
.marsalma-order-summary .marsalma-account-note { margin: 16px 0 0; }

.woocommerce-account .woocommerce-order-details { margin-top: 0; }
.woocommerce-account .woocommerce-order-details__title { margin-bottom: 14px; }
.woocommerce-account .woocommerce-table--order-details { overflow: hidden; border: 1px solid #e1e8e3; border-radius: 16px; }
.marsalma-order-product { display: flex; gap: 12px; align-items: center; }
.marsalma-order-product > img { width: 64px; height: 64px; flex: 0 0 64px; border-radius: 11px; object-fit: cover; }
.marsalma-order-product small { display: block; margin-top: 5px; color: #758179; font-weight: 400; }

@media (max-width: 960px) {
    .woocommerce-account .woocommerce-MyAccount-navigation,
    .woocommerce-account .woocommerce-MyAccount-content { width: 100%; }
    .woocommerce-account .woocommerce-MyAccount-navigation { margin-bottom: 24px; }
    .woocommerce-account .woocommerce-MyAccount-navigation ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .marsalma-account-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .marsalma-order-summary__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .marsalma-partner-overview { grid-template-columns: 1fr; align-items: stretch; }
}

@media (max-width: 620px) {
    .woocommerce-account .woocommerce-MyAccount-navigation ul { display: flex; overflow-x: auto; padding: 6px; }
    .woocommerce-account .woocommerce-MyAccount-navigation li { flex: 0 0 auto; }
    .marsalma-account-heading { padding: 22px 20px; border-radius: 18px; }
    .marsalma-partner-link-card { grid-template-columns: 1fr; }
    .marsalma-account-stats { grid-template-columns: 1fr 1fr; }
    .marsalma-stat-card { min-height: 104px; padding: 15px; }
    .marsalma-account-panel,
    .marsalma-account-note,
    .marsalma-partner-link-card { padding: 18px; border-radius: 15px; }
    .woocommerce-account .woocommerce-orders-table tbody tr { display: grid; grid-template-columns: 1fr 1fr; padding: 14px; }
    .woocommerce-account .woocommerce-orders-table tbody td,
    .woocommerce-account .woocommerce-orders-table tbody td:first-child,
    .woocommerce-account .woocommerce-orders-table tbody td:last-child { padding: 8px; border-radius: 0; }
    .woocommerce-account .woocommerce-orders-table tbody td::before { color: #849087; font-size: 10px; letter-spacing: .05em; text-transform: uppercase; }
    .woocommerce-account .woocommerce-orders-table__cell-marsalma-items,
    .woocommerce-account .woocommerce-orders-table__cell-order-actions { grid-column: 1 / -1; }
    .woocommerce-account .woocommerce-orders-table__cell-order-actions .button { width: 100%; }
    .marsalma-order-summary { padding: 20px; border-radius: 18px; }
    .marsalma-order-summary__top { align-items: center; }
    .marsalma-order-product > img { width: 52px; height: 52px; flex-basis: 52px; }
    .marsalma-partner-dashboard .marsalma-partner-link-field { grid-template-columns: 1fr; }
    .marsalma-partner-dashboard .marsalma-account-stats { grid-template-columns: 1fr; }
    .marsalma-partner-dashboard .marsalma-stat-card { min-height: 98px; }
    .marsalma-partner-dashboard .marsalma-stat-card span { min-height: auto; }
    .marsalma-partner-customers__grid { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
    .marsalma-account-stats { grid-template-columns: 1fr; }
    .marsalma-stat-card { min-height: auto; }
    .marsalma-stat-card span { min-height: auto; }
    .marsalma-bonus-dashboard .marsalma-stat-card--available { padding: 16px 16px 20px; }
    .marsalma-order-summary__grid { grid-template-columns: 1fr; }
}
