/*
 * Neutral light-gray storefront theme.
 * Loaded after the existing dark adapters so both storefront shells share
 * one readable, low-glare palette without changing their layout.
 */
:root[data-theme="dark"] {
    --md-primary: #79aef2;
    --md-primary-hover: #5d96e0;
    --md-primary-container: #244d7d;
    --md-on-primary: #ffffff;
    --md-secondary: #c4a7e7;
    --md-secondary-hover: #b495db;
    --md-on-secondary: #ffffff;

    --md-success: #78d99a;
    --md-warning: #ffc078;
    --md-error: #ff8585;
    --md-info: #78c7eb;

    --md-bg: #343941;
    --md-surface: #40464f;
    --md-surface-2: #4b525c;
    --md-on-surface: #f4f6f8;
    --md-on-surface-med: #c5cbd3;
    --md-on-surface-dis: #9ea6b1;
    --md-divider: rgba(255, 255, 255, .12);
    --md-outline: rgba(255, 255, 255, .24);
    --md-nav-fg: #d2d7de;
    --md-nav-section: #aeb6c0;
    --md-nav-active-fg: #a9ccff;
    --md-hover-overlay: rgba(255, 255, 255, .075);
    --md-selected-overlay: rgba(121, 174, 242, .17);
    --md-focus-ring: rgba(121, 174, 242, .38);
    --md-scrim: rgba(16, 20, 26, .58);

    --md-primary-rgb: 121, 174, 242;
    --md-secondary-rgb: 196, 167, 231;
    --md-success-rgb: 120, 217, 154;
    --md-warning-rgb: 255, 192, 120;
    --md-error-rgb: 255, 133, 133;
    --md-info-rgb: 120, 199, 235;

    --md-e1: 0 1px 2px rgba(15, 23, 42, .05), 0 3px 10px -4px rgba(15, 23, 42, .11);
    --md-e2: 0 2px 4px rgba(15, 23, 42, .06), 0 7px 18px -7px rgba(15, 23, 42, .14);
    --md-e4: 0 4px 8px rgba(15, 23, 42, .07), 0 13px 28px -10px rgba(15, 23, 42, .16);
    --md-e8: 0 8px 18px rgba(15, 23, 42, .09), 0 22px 42px -14px rgba(15, 23, 42, .19);

    --bs-white: #4b525c;
    --bs-white-rgb: 75, 82, 92;
    --bs-body-bg: var(--md-bg);
    --bs-body-color: var(--md-on-surface);
    --bs-light: #4b525c;
    --bs-light-rgb: 75, 82, 92;
    --bs-dark: #f4f6f8;
    --bs-dark-rgb: 244, 246, 248;
    --bs-gray-100: #4b525c;
    --bs-gray-200: #565e69;
    --bs-gray-300: #626b77;
    --bs-gray-400: #7b8592;
    --bs-gray-500: #9ea6b1;
    --bs-gray-600: #c5cbd3;

    --glass-bg: rgba(73, 80, 90, .72);
    --glass-bg-strong: rgba(78, 85, 96, .88);
    --glass-bg-soft: rgba(88, 96, 107, .56);
    --glass-border: rgba(255, 255, 255, .15);
    --glass-border-soft: rgba(255, 255, 255, .10);
    --glass-hi: inset 0 1px 0 rgba(255, 255, 255, .13);
    --glass-shadow: 0 10px 30px rgba(12, 16, 21, .22);
    --glass-shadow-lg: 0 18px 44px rgba(12, 16, 21, .30);
    --uc-field-bg: rgba(255, 255, 255, .08);
    --uc-ink: #f4f6f8;
    --uc-ink-med: #c5cbd3;
    --uc-ink-dis: #9ea6b1;
    --uc-primary-deep: #b9d6fb;
    --uc-focus: #8bbcf7;
    --uc-focus-rgb: 139, 188, 247;

    color-scheme: dark;
}

:root[data-theme="dark"] body,
:root[data-theme="dark"] body.sf-body,
:root[data-theme="dark"] .sf-layout,
:root[data-theme="dark"] .sf-workspace,
:root[data-theme="dark"] .auth-wrapper {
    color: var(--md-on-surface);
    background: var(--md-bg);
}

:root[data-theme="dark"] .sf-sidebar,
:root[data-theme="dark"] .sf-brand-row,
:root[data-theme="dark"] .sf-account {
    background: #3b4149;
}

:root[data-theme="dark"] .sf-topbar {
    background: rgba(63, 69, 78, .96);
}

:root[data-theme="dark"] .sf-search .input-group-text,
:root[data-theme="dark"] .sf-search .form-control {
    color: #f4f6f8;
    background: rgba(255, 255, 255, .055);
    border-color: rgba(255, 255, 255, .24);
}

:root[data-theme="dark"] .sf-search .form-control::placeholder {
    color: #c5cbd3;
    opacity: 1;
}

:root[data-theme="dark"] .btn-outline-secondary {
    color: #c9d9ee;
    border-color: #7f8996;
}

:root[data-theme="dark"] .btn-outline-secondary:hover,
:root[data-theme="dark"] .btn-outline-secondary:focus {
    color: #ffffff;
    background: #596575;
    border-color: #9aa6b5;
}

:root[data-theme="dark"] .sf-brand,
:root[data-theme="dark"] .sf-brand__name,
:root[data-theme="dark"] .sf-page-title strong,
:root[data-theme="dark"] .sf-page-title small,
:root[data-theme="dark"] .sf-nav__label,
:root[data-theme="dark"] .sf-account__user,
:root[data-theme="dark"] .sf-topbar__account,
:root[data-theme="dark"] .panel-header .panel-title,
:root[data-theme="dark"] .upstream-catalog__toolbar,
:root[data-theme="dark"] .upstream-catalog__status,
:root[data-theme="dark"] .smm-catalog__toolbar,
:root[data-theme="dark"] .smm-catalog__status {
    color: var(--md-on-surface);
}

:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .acg-card,
:root[data-theme="dark"] .proxy-purchase__summary,
:root[data-theme="dark"] .proxy-purchase__product,
:root[data-theme="dark"] .upstream-panel,
:root[data-theme="dark"] .smm-catalog,
:root[data-theme="dark"] .smm-platforms,
:root[data-theme="dark"] .smm-types,
:root[data-theme="dark"] .smm-order-summary,
:root[data-theme="dark"] .long-rental-list,
:root[data-theme="dark"] .long-rental-product,
:root[data-theme="dark"] .long-rental-checkout,
:root[data-theme="dark"] .geonode-products,
:root[data-theme="dark"] .geonode-product,
:root[data-theme="dark"] .geonode-checkout,
:root[data-theme="dark"] .auth-card {
    color: var(--md-on-surface);
    background: var(--md-surface);
    border-color: var(--md-divider);
    box-shadow: var(--md-e1);
}

:root[data-theme="dark"] .panel-header,
:root[data-theme="dark"] .table > thead > tr > *,
:root[data-theme="dark"] .bootstrap-table .table > thead > tr > th {
    color: var(--md-on-surface);
    background: #49505a;
}

:root[data-theme="dark"] .form-control,
:root[data-theme="dark"] .form-select,
:root[data-theme="dark"] .layui-input,
:root[data-theme="dark"] .layui-select,
:root[data-theme="dark"] .layui-textarea,
:root[data-theme="dark"] .select2-container--default .select2-selection--single,
:root[data-theme="dark"] .select2-container--default .select2-selection--multiple {
    color: #1f2937;
    background-color: #ffffff;
    border-color: #c8ced7;
}

:root[data-theme="dark"] .form-control::placeholder,
:root[data-theme="dark"] .layui-input::placeholder,
:root[data-theme="dark"] .layui-textarea::placeholder {
    color: #737d8b;
}

:root[data-theme="dark"] .form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='12' viewBox='0 0 16 12'%3e%3cpath fill='none' stroke='%23374151' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m3 4 5 5 5-5'/%3e%3c/svg%3e");
}

/* Keep a single dropdown indicator on the recent-purchases category filter. */
:root[data-theme="dark"] #recent-order-category {
    -webkit-appearance: none !important;
    appearance: none !important;
    padding-right: 2.15rem !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='12' viewBox='0 0 16 12'%3e%3cpath fill='none' stroke='%23374151' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m3 4 5 5 5-5'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right .65rem center !important;
    background-size: 14px 10px !important;
}

/* Home and self-operated product cards use softened charcoal glass. */
:root[data-theme="dark"] .sf-home .acg-card,
:root[data-theme="dark"] .self-product-page .item-list .acg-card {
    color: #f4f6f8;
    background: rgba(79, 86, 97, .76);
    border-color: rgba(255, 255, 255, .15);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .13),
        0 10px 26px rgba(12, 16, 21, .20);
}

:root[data-theme="dark"] .sf-home .acg-card:hover,
:root[data-theme="dark"] .self-product-page .item-list .acg-card:hover {
    background: rgba(90, 98, 109, .90);
    border-color: rgba(121, 174, 242, .44);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .17),
        0 14px 32px rgba(12, 16, 21, .27),
        0 0 0 1px rgba(121, 174, 242, .10);
}

:root[data-theme="dark"] .sf-home .acg-card strong,
:root[data-theme="dark"] .sf-home .acg-card .text-muted,
:root[data-theme="dark"] .self-product-page .item-message,
:root[data-theme="dark"] .self-product-page .acg-card,
:root[data-theme="dark"] .self-product-page .goods-title,
:root[data-theme="dark"] .self-product-page .price,
:root[data-theme="dark"] .self-product-page .price .unit,
:root[data-theme="dark"] .self-product-page .meta,
:root[data-theme="dark"] .self-product-page .stat-row,
:root[data-theme="dark"] .self-product-page .stat-bottom,
:root[data-theme="dark"] .self-item-page h4,
:root[data-theme="dark"] .self-item-page .form-label,
:root[data-theme="dark"] .self-item-page .sku,
:root[data-theme="dark"] .self-item-page .price,
:root[data-theme="dark"] .self-item-page .price .unit {
    color: #f4f6f8 !important;
}

:root[data-theme="dark"] .sf-home > .panel:first-child .panel-body font[color] {
    color: #ffc078 !important;
}

:root[data-theme="dark"] .self-product-page .item-list .acg-card.soldout {
    color: #d4d9df;
    background: rgba(67, 73, 82, .82);
    border-color: rgba(255, 255, 255, .11);
}

/* These sections previously forced white text for the dark canvas. */
:root[data-theme="dark"] .geonode-store__toolbar,
:root[data-theme="dark"] .geonode-store__toolbar strong,
:root[data-theme="dark"] .geonode-store__toolbar small,
:root[data-theme="dark"] .geonode-products,
:root[data-theme="dark"] .geonode-product,
:root[data-theme="dark"] .geonode-product__main strong,
:root[data-theme="dark"] .geonode-product small,
:root[data-theme="dark"] .geonode-product b,
:root[data-theme="dark"] .geonode-empty,
:root[data-theme="dark"] .geonode-checkout,
:root[data-theme="dark"] .geonode-checkout h6,
:root[data-theme="dark"] .geonode-checkout dt,
:root[data-theme="dark"] .geonode-checkout dd,
:root[data-theme="dark"] .geonode-checkout span,
:root[data-theme="dark"] .geonode-checkout strong,
:root[data-theme="dark"] .geonode-checkout > small {
    color: #f4f6f8;
}

:root[data-theme="dark"] .self-product-page .badge-soft-success,
:root[data-theme="dark"] .self-item-page .badge-soft-success {
    color: #a7efbd;
    background: rgba(33, 126, 67, .32);
    border-color: rgba(167, 239, 189, .34);
}

:root[data-theme="dark"] .self-item-page .badge-soft-primary {
    color: #cbd7ff;
    background: rgba(79, 70, 170, .34);
    border-color: rgba(203, 215, 255, .34);
}

:root[data-theme="dark"] .self-item-page .badge-soft-info {
    color: #e6c8ff;
    background: rgba(114, 65, 153, .34);
    border-color: rgba(230, 200, 255, .34);
}

:root[data-theme="dark"] .self-item-page .cash-pay {
    color: #1f2937;
    background: #ffffff;
    border-color: #d5dae1;
    box-shadow: 0 9px 24px rgba(31, 41, 55, .10);
}

:root[data-theme="dark"] .self-item-page .cash-pay .form-label,
:root[data-theme="dark"] .self-item-page .cash-pay .form-label i {
    color: #111827 !important;
}

/* User-center shell shares the same neutral gray foundation. */
:root[data-theme="dark"] .bg-content.uc-bg {
    background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015)) !important;
}

:root[data-theme="dark"] .uc-nav,
:root[data-theme="dark"] .uc-card,
:root[data-theme="dark"] .uc-message-dropdown {
    color: var(--uc-ink);
    background: var(--glass-bg-strong);
    border-color: var(--glass-border-soft);
    box-shadow: var(--glass-hi), var(--glass-shadow);
}

:root[data-theme="dark"] .uc-card .pay-list .button-click,
:root[data-theme="dark"] .uc-card .pay-list .button-click.uc-cash-method,
:root[data-theme="dark"] .uc-topup-methods .btn-pay {
    color: #1f2937;
    background: rgba(248, 250, 252, .94) !important;
    border-color: var(--glass-border-soft);
}

:root[data-theme="dark"] .uc-card .pay-list .button-click.checked,
:root[data-theme="dark"] .uc-card .pay-list .button-click.uc-cash-method.checked,
:root[data-theme="dark"] .uc-topup-methods .btn-pay.checked {
    color: #1d4ed8;
    background: #e8f1ff !important;
}

/* Final contrast guards for the mixed dark shell and light data surfaces. */
:root[data-theme="dark"] .sf-nav__link.active,
:root[data-theme="dark"] .sf-nav__group.active > .sf-nav__parent,
:root[data-theme="dark"] .sf-nav__child.active,
:root[data-theme="dark"] .sf-nav__product.active > .sf-nav__product-toggle,
:root[data-theme="dark"] .sf-nav__action.active,
:root[data-theme="dark"] .sf-smm-type.active {
    color: #b9d7ff;
}

:root[data-theme="dark"] .btn-primary,
:root[data-theme="dark"] .btn-primary:focus {
    color: #ffffff !important;
    background-color: #2867a8;
    border-color: #2867a8;
}

:root[data-theme="dark"] .btn-primary:hover,
:root[data-theme="dark"] .btn-primary:active {
    color: #ffffff !important;
    background-color: #21578f;
    border-color: #21578f;
}

:root[data-theme="dark"] .auth-card .text-link,
:root[data-theme="dark"] .uc-card a:not(.btn):not(.button-click),
:root[data-theme="dark"] .panel > .panel-body > a:not(.btn) {
    color: #a9ccff;
}

/* Short-term SMS catalog columns are deliberately light. */
:root[data-theme="dark"] .upstream-column,
:root[data-theme="dark"] .upstream-column__header,
:root[data-theme="dark"] .upstream-list,
:root[data-theme="dark"] .upstream-item,
:root[data-theme="dark"] .upstream-checkout {
    color: #1f2937;
}

:root[data-theme="dark"] .upstream-item__text small,
:root[data-theme="dark"] .upstream-list__empty,
:root[data-theme="dark"] .upstream-checkout__selection small,
:root[data-theme="dark"] .upstream-checkout__quantity > small,
:root[data-theme="dark"] .upstream-checkout__total small {
    color: #667085 !important;
}

:root[data-theme="dark"] .upstream-item__detail,
:root[data-theme="dark"] .upstream-checkout__total strong {
    color: #175cd3 !important;
}

/* SMM catalog panels also use white rows inside the gray application shell. */
:root[data-theme="dark"] .smm-category-list,
:root[data-theme="dark"] .smm-service-area,
:root[data-theme="dark"] .smm-service-list,
:root[data-theme="dark"] .smm-service,
:root[data-theme="dark"] .smm-order-form {
    color: #1f2937;
}

:root[data-theme="dark"] .smm-category small,
:root[data-theme="dark"] .smm-service small,
:root[data-theme="dark"] .smm-service-list__empty,
:root[data-theme="dark"] .smm-order-summary span,
:root[data-theme="dark"] .smm-order-field > span,
:root[data-theme="dark"] .smm-order-total span {
    color: #667085 !important;
}

/* Record tables remain dark, so explicit light-theme field colors must not leak in. */
:root[data-theme="dark"] .sms-record-transaction,
:root[data-theme="dark"] .sms-record-phone,
:root[data-theme="dark"] .sms-record-price,
:root[data-theme="dark"] .sms-record-date,
:root[data-theme="dark"] .sms-record-country strong,
:root[data-theme="dark"] .sms-record-service strong,
:root[data-theme="dark"] .sms-order-service strong,
:root[data-theme="dark"] .sms-order-amount strong {
    color: #f4f6f8;
}

:root[data-theme="dark"] .sms-record-country small,
:root[data-theme="dark"] .sms-record-service small,
:root[data-theme="dark"] .sms-order-lines small,
:root[data-theme="dark"] .sms-order-amount small {
    color: #c5cbd3 !important;
}

:root[data-theme="dark"] .sms-order-lines code {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 26px;
    padding: 3px 9px;
    border: 1px solid transparent;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    box-shadow: 0 2px 7px rgba(12, 16, 21, .18);
}

:root[data-theme="dark"] .sms-order-lines--number code {
    color: #0b4770;
    background: #d9f1ff;
    border-color: #9ed8f5;
}

:root[data-theme="dark"] .sms-order-lines--code code {
    color: #75400d;
    background: #ffedc2;
    border-color: #f2c66d;
}

/* Short-term SMS detail dialogs use a calm light workspace inside the gray shell. */
:root[data-theme="dark"] .sms-detail-dialog,
:root[data-theme="dark"] .sms-record-detail {
    height: 100%;
    overflow-y: auto;
    padding: 20px;
    color: #344054;
    background: #eef2f6;
}

:root[data-theme="dark"] .sms-detail-order {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
    margin-bottom: 14px;
    padding: 15px 17px;
    color: #344054;
    background: #ffffff;
    border: 1px solid #dfe5ec;
    border-radius: 8px;
    box-shadow: 0 5px 18px rgba(33, 49, 71, .07);
}

:root[data-theme="dark"] .sms-detail-order__icon,
:root[data-theme="dark"] .sms-detail-item__phone-icon,
:root[data-theme="dark"] .sms-record-detail__hero-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    color: #2563a6;
    background: #eaf2fb;
    border: 1px solid #d5e5f7;
    border-radius: 8px;
    font-size: 18px;
}

:root[data-theme="dark"] .sms-detail-order__main,
:root[data-theme="dark"] .sms-detail-order__amount,
:root[data-theme="dark"] .sms-detail-item__identity {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

:root[data-theme="dark"] .sms-detail-order__main > span,
:root[data-theme="dark"] .sms-detail-order__amount > span,
:root[data-theme="dark"] .sms-detail-item__identity > span {
    color: #7a8698;
    font-size: 11px;
}

:root[data-theme="dark"] .sms-detail-order__main > strong,
:root[data-theme="dark"] .sms-detail-item__identity > strong {
    overflow: hidden;
    color: #172033;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

:root[data-theme="dark"] .sms-detail-order__main > small,
:root[data-theme="dark"] .sms-detail-item__identity > small {
    overflow: hidden;
    color: #667085;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

:root[data-theme="dark"] .sms-detail-order__amount {
    padding-left: 18px;
    border-left: 1px solid #e4e7ec;
    text-align: right;
}

:root[data-theme="dark"] .sms-detail-order__amount > strong {
    color: #175cd3;
    font-size: 17px;
}

:root[data-theme="dark"] .sms-detail-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

:root[data-theme="dark"] .sms-detail-item {
    padding: 16px;
    color: #344054;
    background: #ffffff;
    border: 1px solid #dfe5ec;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(33, 49, 71, .055);
}

:root[data-theme="dark"] .sms-detail-item__head {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding-bottom: 13px;
    border-bottom: 1px solid #e8ecf1;
}

:root[data-theme="dark"] .sms-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 18px;
    margin: 5px 0 14px;
}

:root[data-theme="dark"] .sms-detail-grid > div {
    min-width: 0;
    padding: 11px 0;
    border-bottom: 1px solid #eef1f4;
}

:root[data-theme="dark"] .sms-detail-grid dt {
    margin-bottom: 4px;
    color: #7a8698;
    font-size: 11px;
    font-weight: 400;
}

:root[data-theme="dark"] .sms-detail-grid dd {
    margin: 0;
    overflow: hidden;
    color: #344054;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

:root[data-theme="dark"] .sms-detail-code-block {
    padding: 13px 14px;
    color: #344054;
    background: #f3f7fc;
    border: 1px solid #dce8f6;
    border-radius: 7px;
}

:root[data-theme="dark"] .sms-detail-code-block > span {
    display: block;
    margin-bottom: 9px;
    color: #526175;
    font-size: 12px;
    font-weight: 600;
}

:root[data-theme="dark"] .sms-detail-codes > div {
    color: #344054;
    background: #ffffff;
    border-color: #d5dde7;
    border-radius: 6px;
}

:root[data-theme="dark"] .sms-detail-codes code {
    color: #175cd3;
    font-size: 15px;
    font-weight: 700;
}

:root[data-theme="dark"] .sms-detail-codes span { color: #475467; }
:root[data-theme="dark"] .sms-detail-codes small { color: #7a8698; }

:root[data-theme="dark"] .sms-record-detail__hero {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 18px;
    background: #ffffff;
    border: 1px solid #dfe5ec;
    border-radius: 8px 8px 0 0;
}

:root[data-theme="dark"] .sms-record-detail__hero-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

:root[data-theme="dark"] .sms-record-detail__hero-main small,
:root[data-theme="dark"] .sms-record-detail__hero-main span {
    overflow: hidden;
    color: #7a8698;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

:root[data-theme="dark"] .sms-record-detail__hero-main strong {
    overflow: hidden;
    color: #172033;
    font-size: 20px;
    letter-spacing: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

:root[data-theme="dark"] .sms-record-detail__status {
    padding: 5px 10px;
    color: #175cd3;
    background: #eaf2ff;
    border: 1px solid #cfe0f7;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

:root[data-theme="dark"] .sms-record-detail__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px;
    padding: 6px 18px 12px;
    background: #ffffff;
    border-right: 1px solid #dfe5ec;
    border-bottom: 1px solid #dfe5ec;
    border-left: 1px solid #dfe5ec;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 5px 18px rgba(33, 49, 71, .06);
}

:root[data-theme="dark"] .sms-record-detail__grid > div {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid #eef1f4;
}

:root[data-theme="dark"] .sms-record-detail__grid > div.is-wide { grid-column: 1 / -1; }
:root[data-theme="dark"] .sms-record-detail__grid span { color: #7a8698; font-size: 12px; }
:root[data-theme="dark"] .sms-record-detail__grid strong { overflow: hidden; color: #344054; font-size: 12px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
:root[data-theme="dark"] .sms-record-detail__grid strong.is-price { color: #175cd3; font-size: 14px; }

:root[data-theme="dark"] .sms-record-detail__section {
    margin-top: 14px;
    padding: 17px 18px 18px;
    color: #344054;
    background: #ffffff;
    border: 1px solid #dfe5ec;
    border-radius: 8px;
    box-shadow: 0 5px 18px rgba(33, 49, 71, .055);
}

:root[data-theme="dark"] .sms-record-detail__section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 13px;
    color: #2563a6;
}

:root[data-theme="dark"] .sms-record-detail__section-title > i { font-size: 19px; }
:root[data-theme="dark"] .sms-record-detail__section-title > div { display: flex; flex-direction: column; gap: 1px; }
:root[data-theme="dark"] .sms-record-detail__section-title strong { color: #172033; font-size: 14px; }
:root[data-theme="dark"] .sms-record-detail__section-title small { color: #7a8698; font-size: 11px; }

:root[data-theme="dark"] .sms-record-detail__messages {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

:root[data-theme="dark"] .sms-record-detail__messages > div:not(.sms-record-detail__empty) {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    color: #344054;
    background: #f7f9fc;
    border: 1px solid #e3e8ef;
    border-radius: 7px;
}

:root[data-theme="dark"] .sms-record-detail__messages code {
    color: #175cd3;
    font-size: 15px;
    font-weight: 700;
}

:root[data-theme="dark"] .sms-record-detail__messages span { overflow-wrap: anywhere; color: #475467; font-size: 12px; }
:root[data-theme="dark"] .sms-record-detail__messages small { color: #7a8698; font-size: 10px; white-space: nowrap; }

:root[data-theme="dark"] .sms-record-detail__empty {
    min-height: 130px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #7a8698;
    background: #f7f9fc;
    border: 1px dashed #cfd7e2;
    border-radius: 7px;
    text-align: center;
}

:root[data-theme="dark"] .sms-record-detail__empty i { margin-bottom: 3px; color: #7ba4d1; font-size: 25px; }
:root[data-theme="dark"] .sms-record-detail__empty span { color: #526175; font-size: 13px; font-weight: 600; }
:root[data-theme="dark"] .sms-record-detail__empty small { color: #8a95a5; font-size: 11px; }

@media (max-width: 620px) {
    :root[data-theme="dark"] .sms-detail-dialog,
    :root[data-theme="dark"] .sms-record-detail { padding: 12px; }

    :root[data-theme="dark"] .sms-detail-order { grid-template-columns: 40px minmax(0, 1fr); padding: 13px; }
    :root[data-theme="dark"] .sms-detail-order__amount { grid-column: 1 / -1; padding: 10px 0 0; border-top: 1px solid #e4e7ec; border-left: 0; text-align: left; }
    :root[data-theme="dark"] .sms-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    :root[data-theme="dark"] .sms-record-detail__hero { grid-template-columns: 42px minmax(0, 1fr); padding: 14px; }
    :root[data-theme="dark"] .sms-record-detail__status { grid-column: 1 / -1; width: fit-content; }
    :root[data-theme="dark"] .sms-record-detail__grid { grid-template-columns: 1fr; padding-right: 14px; padding-left: 14px; }
    :root[data-theme="dark"] .sms-record-detail__grid > div.is-wide { grid-column: auto; }
    :root[data-theme="dark"] .sms-record-detail__messages > div:not(.sms-record-detail__empty) { grid-template-columns: 1fr; gap: 5px; }
}

/* Long-rental SMS and residential proxy storefronts. */
:root[data-theme="dark"] .long-rental-shop,
:root[data-theme="dark"] .geonode-store {
    --purchase-ink: #172033;
    --purchase-muted: #667085;
    --purchase-soft: #f6f8fb;
    --purchase-line: #dfe5ec;
    --purchase-blue: #2563a6;
}

:root[data-theme="dark"] .long-rental-toolbar,
:root[data-theme="dark"] .geonode-store__toolbar {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
    padding: 10px 13px;
    color: #f4f6f8;
    background: rgba(255, 255, 255, .055);
    border: 1px solid rgba(255, 255, 255, .11);
    border-radius: 8px;
}

:root[data-theme="dark"] .long-rental-toolbar__title,
:root[data-theme="dark"] .geonode-store__toolbar-title {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
}

:root[data-theme="dark"] .long-rental-toolbar__title > div,
:root[data-theme="dark"] .geonode-store__toolbar-title > div {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

:root[data-theme="dark"] .long-rental-toolbar__icon,
:root[data-theme="dark"] .geonode-store__toolbar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    color: #b9d7ff;
    background: rgba(121, 174, 242, .15);
    border: 1px solid rgba(169, 204, 255, .22);
    border-radius: 7px;
}

:root[data-theme="dark"] .long-rental-toolbar__title strong,
:root[data-theme="dark"] .geonode-store__toolbar-title strong {
    color: #f4f6f8;
    font-size: 14px;
}

:root[data-theme="dark"] .long-rental-toolbar__title small,
:root[data-theme="dark"] .geonode-store__toolbar-title small {
    overflow: hidden;
    color: #c5cbd3;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

:root[data-theme="dark"] .long-rental-layout,
:root[data-theme="dark"] .geonode-store__layout {
    gap: 16px;
}

:root[data-theme="dark"] .long-rental-catalog {
    min-width: 0;
    padding: 14px;
    background: #f7f9fc;
    border: 1px solid var(--purchase-line);
    border-radius: 8px;
    box-shadow: 0 7px 22px rgba(15, 23, 42, .09);
}

:root[data-theme="dark"] .long-rental-filters {
    gap: 10px;
    margin-bottom: 12px;
    padding: 0;
}

:root[data-theme="dark"] .long-rental-filters label {
    gap: 5px;
    color: #526175;
    font-size: 11px;
    font-weight: 600;
}

:root[data-theme="dark"] .long-rental-filters .form-control,
:root[data-theme="dark"] .long-rental-filters .form-select {
    min-height: 38px;
    color: #1f2937;
    background-color: #ffffff;
    border-color: #cbd3dd;
}

:root[data-theme="dark"] .long-rental-list,
:root[data-theme="dark"] .geonode-products {
    overflow-y: auto;
    color: var(--purchase-ink);
    background: #ffffff;
    border: 1px solid var(--purchase-line);
    border-radius: 7px;
    box-shadow: none;
}

:root[data-theme="dark"] .long-rental-list { height: 470px; }
:root[data-theme="dark"] .geonode-products { height: 500px; }

:root[data-theme="dark"] .long-rental-product,
:root[data-theme="dark"] .geonode-product {
    min-height: 68px;
    color: var(--purchase-ink);
    background: #ffffff;
    border-color: #edf0f4;
    transition: background-color .16s ease, box-shadow .16s ease;
}

:root[data-theme="dark"] .long-rental-product:hover,
:root[data-theme="dark"] .geonode-product:hover {
    color: var(--purchase-ink);
    background: #f7faff;
}

:root[data-theme="dark"] .long-rental-product.active,
:root[data-theme="dark"] .geonode-product.active {
    color: var(--purchase-ink);
    background: #edf5ff;
    box-shadow: inset 3px 0 #3478bd;
}

:root[data-theme="dark"] .long-rental-product strong,
:root[data-theme="dark"] .long-rental-product b,
:root[data-theme="dark"] .geonode-product__main strong,
:root[data-theme="dark"] .geonode-product b {
    color: var(--purchase-ink);
}

:root[data-theme="dark"] .long-rental-product small,
:root[data-theme="dark"] .geonode-product small {
    color: var(--purchase-muted) !important;
}

:root[data-theme="dark"] .long-rental-product__stock b,
:root[data-theme="dark"] .geonode-product > span:nth-child(2) b {
    color: #027a48;
}

:root[data-theme="dark"] .long-rental-product__price b,
:root[data-theme="dark"] .geonode-product__price b {
    color: #175cd3;
    font-size: 15px;
}

:root[data-theme="dark"] .long-rental-checkout,
:root[data-theme="dark"] .geonode-checkout {
    overflow: hidden;
    padding: 0 17px 17px;
    color: #344054;
    background: #ffffff;
    border: 1px solid var(--purchase-line);
    border-top: 0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .11);
}

:root[data-theme="dark"] .long-rental-checkout::before,
:root[data-theme="dark"] .geonode-checkout::before {
    content: "";
    display: block;
    height: 4px;
    margin: 0 -17px 0;
    background: #79aef2;
}

:root[data-theme="dark"] .purchase-summary-title {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 0 12px;
    border-bottom: 1px solid #e8ecf1;
}

:root[data-theme="dark"] .purchase-summary-title > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    color: #2563a6;
    background: #eaf2fb;
    border-radius: 7px;
}

:root[data-theme="dark"] .purchase-summary-title > div { display: flex; flex-direction: column; gap: 1px; }
:root[data-theme="dark"] .purchase-summary-title h6 { margin: 0; color: var(--purchase-ink); font-size: 14px; }
:root[data-theme="dark"] .purchase-summary-title small { color: #7a8698; font-size: 10px; }

:root[data-theme="dark"] .long-rental-checkout dl,
:root[data-theme="dark"] .geonode-checkout dl { margin: 3px 0 0; }

:root[data-theme="dark"] .long-rental-checkout dl > div,
:root[data-theme="dark"] .geonode-checkout dl > div {
    padding: 10px 0;
    border-bottom-color: #e8ecf1;
}

:root[data-theme="dark"] .long-rental-checkout dt,
:root[data-theme="dark"] .geonode-checkout dt {
    color: #667085;
    font-size: 12px;
}

:root[data-theme="dark"] .long-rental-checkout dd,
:root[data-theme="dark"] .geonode-checkout dd {
    color: #344054;
    font-size: 12px;
    font-weight: 600;
}

:root[data-theme="dark"] .long-rental-checkout .form-control,
:root[data-theme="dark"] .long-rental-checkout .form-select {
    color: #1f2937;
    background-color: #f8fafc;
    border-color: #cbd3dd;
}

:root[data-theme="dark"] .long-rental-total,
:root[data-theme="dark"] .geonode-checkout__total {
    margin: 8px 0 13px;
    padding: 13px 12px;
    background: #f1f6fc;
    border: 1px solid #dbe7f4;
    border-radius: 7px;
}

:root[data-theme="dark"] .long-rental-total span,
:root[data-theme="dark"] .geonode-checkout__total span {
    color: #526175;
    font-size: 12px;
}

:root[data-theme="dark"] .long-rental-total strong,
:root[data-theme="dark"] .geonode-checkout__total strong {
    color: #175cd3;
    font-size: 22px;
}

:root[data-theme="dark"] .long-rental-checkout > small,
:root[data-theme="dark"] .geonode-checkout > small {
    display: block;
    margin-top: 11px;
    color: #667085;
    font-size: 10px;
    line-height: 1.6;
}

:root[data-theme="dark"] .purchase-empty {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 28px;
    color: #667085;
    text-align: center;
}

:root[data-theme="dark"] .purchase-empty > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 5px;
    color: #5f8fc2;
    background: #edf4fb;
    border-radius: 8px;
    font-size: 21px;
}

:root[data-theme="dark"] .purchase-empty strong { color: #475467; font-size: 13px; }
:root[data-theme="dark"] .purchase-empty small { color: #8a95a5; font-size: 11px; }

/* SMM purchase dialog: isolated light surfaces with explicit contrast. */
:root[data-theme="dark"] .smm-purchase-layer {
    color: #202733;
    background: #eef1f5 !important;
    border: 1px solid #cbd2dc;
}

:root[data-theme="dark"] .smm-purchase-layer .layui-layer-title {
    color: #202733 !important;
    background: #ffffff !important;
    border-bottom-color: #d7dde5 !important;
}

:root[data-theme="dark"] .smm-purchase-layer .layui-layer-content,
:root[data-theme="dark"] .smm-purchase-layer .smm-order-form {
    color: #202733 !important;
    background: #eef1f5 !important;
}

:root[data-theme="dark"] .smm-purchase-layer .smm-order-summary {
    color: #ffffff !important;
    background: #343b46 !important;
    border-color: #343b46 !important;
    box-shadow: none;
}

:root[data-theme="dark"] .smm-purchase-layer .smm-order-summary__icon {
    color: #ffffff !important;
    background: rgba(255, 255, 255, .10) !important;
    border-color: rgba(255, 255, 255, .24) !important;
}

:root[data-theme="dark"] .smm-purchase-layer .smm-order-summary__body > small {
    color: #d5dbe4 !important;
}

:root[data-theme="dark"] .smm-purchase-layer .smm-order-summary__body > strong {
    color: #ffffff !important;
}

:root[data-theme="dark"] .smm-purchase-layer .smm-order-summary__meta span {
    color: #eef2f7 !important;
    background: rgba(255, 255, 255, .11) !important;
    border: 1px solid rgba(255, 255, 255, .14);
}

:root[data-theme="dark"] .smm-purchase-layer .smm-order-overview,
:root[data-theme="dark"] .smm-purchase-layer .smm-order-footer {
    color: #202733 !important;
    background: #ffffff !important;
    border-color: #d7dde5 !important;
}

:root[data-theme="dark"] .smm-purchase-layer .smm-order-overview > div {
    border-color: #e0e5eb !important;
}

:root[data-theme="dark"] .smm-purchase-layer .smm-order-overview span,
:root[data-theme="dark"] .smm-purchase-layer .smm-order-total span,
:root[data-theme="dark"] .smm-purchase-layer .smm-order-section-title small {
    color: #667085 !important;
}

:root[data-theme="dark"] .smm-purchase-layer .smm-order-overview strong {
    color: #29313d !important;
}

:root[data-theme="dark"] .smm-purchase-layer .smm-order-overview > div:first-child strong {
    color: #1d5f9f !important;
}

:root[data-theme="dark"] .smm-purchase-layer .smm-order-section-title span,
:root[data-theme="dark"] .smm-purchase-layer .smm-order-field > span {
    color: #344054 !important;
}

:root[data-theme="dark"] .smm-purchase-layer .smm-order-field.is-required > span::after {
    color: #c9363e !important;
}

:root[data-theme="dark"] .smm-purchase-layer .smm-order-field .form-control,
:root[data-theme="dark"] .smm-purchase-layer .smm-order-field .form-select {
    color: #172033 !important;
    background-color: #ffffff !important;
    border-color: #bfc8d4 !important;
    box-shadow: none !important;
}

:root[data-theme="dark"] .smm-purchase-layer .smm-order-field .form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='12' viewBox='0 0 16 12'%3e%3cpath fill='none' stroke='%23556274' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m3 4 5 5 5-5'/%3e%3c/svg%3e") !important;
}

:root[data-theme="dark"] .smm-purchase-layer .smm-order-field .form-control::placeholder {
    color: #7d8795 !important;
    opacity: 1;
}

:root[data-theme="dark"] .smm-purchase-layer .smm-order-field .form-control:focus,
:root[data-theme="dark"] .smm-purchase-layer .smm-order-field .form-select:focus {
    color: #172033 !important;
    background-color: #ffffff !important;
    border-color: #4b83bd !important;
    box-shadow: 0 0 0 3px rgba(75, 131, 189, .15) !important;
}

:root[data-theme="dark"] .smm-purchase-layer .smm-order-field option {
    color: #172033;
    background: #ffffff;
}

:root[data-theme="dark"] .smm-purchase-layer .smm-order-total strong {
    color: #bd3038 !important;
}

:root[data-theme="dark"] .smm-purchase-layer .smm-order-submit,
:root[data-theme="dark"] .smm-purchase-layer .smm-order-submit:hover,
:root[data-theme="dark"] .smm-purchase-layer .smm-order-submit:focus {
    color: #ffffff !important;
    background: #316fae !important;
    border-color: #316fae !important;
}

:root[data-theme="dark"] .smm-purchase-layer .smm-order-submit:hover {
    background: #285f96 !important;
    border-color: #285f96 !important;
}

@media (max-width: 992px) {
    :root[data-theme="dark"] .long-rental-list,
    :root[data-theme="dark"] .geonode-products { height: 410px; }
}

@media (max-width: 600px) {
    :root[data-theme="dark"] .long-rental-toolbar,
    :root[data-theme="dark"] .geonode-store__toolbar { align-items: flex-start; }
    :root[data-theme="dark"] .long-rental-catalog { padding: 10px; }
    :root[data-theme="dark"] .long-rental-list,
    :root[data-theme="dark"] .geonode-products { height: 360px; }
    :root[data-theme="dark"] .long-rental-product,
    :root[data-theme="dark"] .geonode-product { min-height: 64px; }
    :root[data-theme="dark"] .long-rental-checkout,
    :root[data-theme="dark"] .geonode-checkout { padding-right: 14px; padding-left: 14px; }
}
