/* NIVA nested corners · isolated candidate · 2026-11-06.
   Radius values are final CSS lengths: do not multiply them by 1.4 again.
   Concentric surfaces: R_outer = R_inner + padding + border.
   Scoped specificity also survives Vite's late component stylesheets. */
:root {
  --nc-control: 9px;
  --radius-inner: var(--nc-control);
}
:root :is(.dashboard-layout .panel-card, .dashboard-layout .hero-card,
          .dashboard-layout .plans-page .product-card.pk-card) {
  --nc-inner: var(--nc-control);
  --nc-outer: calc(var(--nc-inner) + var(--visual-card-padding, 22px) + 1px);
  border-radius: var(--nc-outer) !important;
}
:root :is(.panel-card, .hero-card, .product-card.pk-card) :is(
  .niva-btn, .btn-hero-cta, .btn-hero-secondary, .pk-btn, .wh-primary, .wh-secondary,
  .wh-search, .wh-detail-notice, .wh-attention, .wh-error, .wh-order-note,
  .btn-primary-action, .mini-btn, .form-item input, .form-select,
  .qi-btn, .qi-note, .link-display-box, .node-item-row, .full-uri-container,
  .ops-help-note, .ops-help-item, .ar-breakdown, .ar-last-result,
  .p2b-breakdown, .rt-breakdown, .rt-pay-item, .ar-period-item,
  .renew-help-btn, .btn-base, .v2-btn, .cnf-intro, .cnf-overview, .cnf-node-row,
  .cnf-saved-tip, .stat-box, .stat-mini-card, .embed-copy-box, .pf-link input) {
  border-radius: var(--nc-inner, var(--nc-control)) !important;
}
/* Compact statistic surfaces have a separate inset at each breakpoint. */
:root .mini-stat-card {
  --nc-stat-inset: 15px;
  --nc-stat-inner: 6px;
  border-radius: calc(var(--nc-stat-inner) + var(--nc-stat-inset)) !important;
}
:root .mini-stat-card .ms-icon { border-radius: var(--nc-stat-inner) !important; }
:root .ql-item { border-radius: 10px !important; }
:root .notice-card .announcement-box { border-radius: var(--nc-inner) !important; }

/* Dialog padding is 24px on phones, 28px on larger screens; both have 1px borders. */
:root .modal-box {
  --nc-inner: 8px;
  --nc-dialog-inset: 25px;
  border-radius: calc(var(--nc-inner) + var(--nc-dialog-inset)) !important;
}
:root .modal-box :is(.amount-chip, .recharge-input, .btn-recharge-cta,
  .select-card-item, .custom-hero, .order-breakdown, .pay-url-area,
  .coupon-wrapper-box, .btn-action-base, .btn-action, .btn-base, .niva-btn,
  .form-input, .form-select, .input-inner, .niva-node-search-field,
  .niva-isp-grid li, .mio-isp-grid li, .us-native-grid li,
  .cnf-node-row, .cnf-intro, .cnf-dialog, .wh-detail-notice) {
  border-radius: var(--nc-inner) !important;
}
/* Embedded code/coupon actions use the wrapper's real 4px padding + 1px border. */
:root .embed-wrap { --nc-embed-outer: var(--nc-inner, 12px); border-radius: var(--nc-embed-outer) !important; }
:root .embed-wrap .embed-code-btn { border-radius: max(0px, calc(var(--nc-embed-outer) - 5px)) !important; }
:root .modal-box .coupon-wrapper-box .niva-btn { border-radius: 3px !important; }

/* Authentication card and its inputs share the same contour and inset. */
:root .auth-card {
  --nc-auth-inset: 21px;
  --nc-inner: 10px;
  border-radius: calc(var(--nc-inner) + var(--nc-auth-inset)) !important;
}
:root .auth-card :is(.input-inner, .embed-wrap, .email-split, .niva-btn, .error-banner, .success-banner) {
  border-radius: var(--nc-inner) !important;
}
:root .auth-card .embed-wrap .embed-code-btn { border-radius: 5px !important; }

/* Download cards: large exterior, restrained inner steps and client rows. */
:root .dl2 :is(.dl2-hero, .pd-disclosure) {
  --nc-dl-inset: 21px;
  --nc-inner: 11px;
  border-radius: calc(var(--nc-inner) + var(--nc-dl-inset)) !important;
}
:root .dl2 :is(.dl2-hero, .pd-disclosure) :is(.dl2-step, .dl2-row, .dl2-btn, .dl2-note) {
  border-radius: var(--nc-inner) !important;
}
/* Small actions within a client row do not share its corner (they sit mid-row). */
:root .dl2 .pd-other-clients .dl2-row :is(.dl2-btn, .dl2-howto, .dl2-copy) { border-radius: 6px !important; }
:root .dl2 .dl2-step .dl2-copy { border-radius: 6px !important; }
:root .dl2 .dl2-dep { border-radius: 24px !important; }

/* Keep flush, borderless legacy wrappers flat. */
:root .wh-legacy-recharge .wallet-recharge-card,
:root .pf-expanded .panel-card { border-radius: 0 !important; }

@media (min-width: 768px) {
  :root .modal-box { --nc-dialog-inset: 29px; }
  :root .auth-card { --nc-auth-inset: 33px; }
  :root .mini-stat-card { --nc-stat-inset: 19px; }
  :root .dl2 .dl2-hero { --nc-dl-inset: 25px; }
}
@media (min-width: 1024px) {
  :root .auth-card { --nc-auth-inset: 41px; }
  :root .mini-stat-card { --nc-stat-inset: 21px; }
  :root .dl2 .dl2-hero { --nc-dl-inset: 25px; }
}
/* Supported browsers retain the currently approved 50% smooth curve.
   Other browsers use the same concentric radii with ordinary round corners.
   Pills, selected tabs, progress tracks and circular controls are untouched. */
@supports (corner-shape: superellipse(1.5)) {
  :root :is(.panel-card, .hero-card, .product-card.pk-card, .mini-stat-card, .ms-icon,
    .auth-card, .modal-box, .dl2-card, .dl2-step, .dl2-copy, .dl2-howto,
    .btn-hero-cta, .btn-hero-secondary, .pk-btn, .wh-primary, .wh-secondary,
    .niva-btn, .input-inner, .embed-wrap, .embed-code-btn, .email-split,
    .form-item input, .amount-chip, .recharge-input, .btn-recharge-cta,
    .niva-node-search-field, .niva-isp-grid li, .mio-isp-grid li) {
    corner-shape: superellipse(1.5);
  }
}

/* Content frames have a maximum depth of two. Deeper groups use spacing/rules.
   Keep input, action and keyboard-focus affordances usable. */
:root .dl2 .pd-other-clients .dl2-row {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding-inline: 0;
}
:root .dl2 .pd-other-clients .dl2-row + .dl2-row {
  border-top-color: var(--dl-bd) !important;
}
:root .modal-box .ot-card .ot-fact {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}
:root .modal-box .ot-card { border-radius: var(--nc-inner) !important; }
:root .modal-box .ot-card .ot-fact + .ot-fact {
  border-left-color: var(--border-soft, #9db4d42b) !important;
}
:root .dl2 .dl2-step .dl2-copy {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}
:root .panel-card :is(.ar-breakdown, .rt-breakdown, .p2b-breakdown) {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* Desktop layout candidate. Built on the accepted nested-corner preview.
   Content frames remain at a maximum depth of two. No mobile layout changes. */
@media (min-width: 992px) {
  /* Balance is an overview beside the ledger, never a page-wide banner. */
  :root .dashboard-layout .wallet-hub { display: block; }
  :root .wallet-hub .wh-account-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    align-items: start; gap: 20px;
  }
  :root .wallet-hub .wh-ledger {
    display: flex; flex-direction: column; gap: 16px; min-width: 0;
  }
  :root .wallet-hub > .wh-heading { margin-bottom: 20px; }
  :root .wallet-hub .wh-account-layout > .wh-balance { margin: 0; align-self: start; }
  :root .wallet-hub .wh-balance-top {
    flex-direction: column; align-items: stretch; gap: 20px;
  }
  :root .wallet-hub .wh-amount { font-size: 38px; margin-top: 10px; }
  :root .wallet-hub .wh-balance-top > .wh-primary { width: 100%; min-height: 40px; }
  :root .wallet-hub .wh-pending-inline { flex-wrap: wrap; gap: 8px; }
  :root .wallet-hub .wh-pending-inline > div { flex-basis: calc(100% - 30px); }
  :root .wallet-hub .wh-pending-inline > .wh-text { margin-left: 25px; }
  :root .wallet-hub .wh-ledger > .wh-tabs { margin: 0; gap: 24px; }
  :root .wallet-hub .wh-ledger > :is(.wh-bills, .wh-orders) { margin: 0; min-width: 0; }
  :root .wallet-hub .wh-bills { padding: 20px !important; --nc-inner: 9px; --nc-outer: 30px; }
  :root .wallet-hub .wh-record { padding-block: 13px; }
  :root .wallet-hub .wh-bills .wh-record:first-of-type { padding-top: 17px; }
  :root .wallet-hub .wh-month-summary { margin-top: 12px; padding-top: 10px; }
  :root .wallet-hub .wh-bill-tools {
    display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px;
    align-items: center;
  }
  :root .wallet-hub .wh-bill-tools > select { min-height: 38px; }
  :root .wallet-hub .wh-bill-tools .wh-search { margin: 0; padding: 8px 10px; }
  :root .wallet-hub .wh-bill-tools .wh-filters { grid-column: 1 / -1; margin: 0; gap: 4px; }
  :root .wallet-hub .wh-orders { gap: 12px; }
  :root .wallet-hub .wh-order { padding: 20px; --nc-outer: 30px; }

  /* Recommendation and setup guide share one row, with readable button widths. */
  :root .dl2 .pd-platform-picker { margin-bottom: 18px; }
  :root .dl2 .pd-platform-picker[open] > .pd-summary { display: none !important; }
  :root .dl2 .pd-platform-picker[open] > .pd-disclosure-body { padding-top: 0; }
  :root .dl2 .dl2-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start; gap: 18px;
  }
  :root .dl2 .dl2-body > .dl2-note { grid-column: 1 / -1; }
  :root .dl2 .dl2-hero {
    grid-column: 1; flex-direction: column; align-items: stretch;
    padding: 22px; gap: 18px; --nc-dl-inset: 23px;
  }
  :root .dl2 .dl2-hero-main { flex: 0 1 auto; }
  :root .dl2 .dl2-hero-act { flex: 0 1 auto; width: 100%; gap: 9px; }
  :root .dl2 .dl2-hero .dl2-desc { font-size: 13px; margin-top: 12px; }
  :root .dl2 .dl2-hero .dl2-btn--lg { min-height: 44px; height: auto; padding-block: 9px; font-size: 13px; }
  :root .dl2 .dl2-hero .dl2-btn--lg > span:not(.dl2-btn-sub) { text-align: center; }
  :root .dl2 .pd-download-options { padding-top: 12px; }
  :root .dl2 .pd-download-options > .pd-summary { min-height: 36px; }
  :root .dl2 .pd-download-options .pd-summary-description { display: none; }
  :root .dl2 .pd-download-guide { grid-column: 2; margin: 0; }
  :root .dl2 .pd-download-guide > .pd-summary { min-height: 38px; }
  :root .dl2 .pd-download-guide > .pd-disclosure-body { padding-top: 10px; }
  :root .dl2 .dl2-steps { grid-template-columns: minmax(0, 1fr); gap: 0; }
  :root .dl2 .dl2-step {
    flex-direction: row; align-items: flex-start; gap: 10px;
    background: transparent !important; border-color: transparent !important;
    border-radius: 0 !important; padding: 11px 0;
  }
  :root .dl2 .dl2-step + .dl2-step { border-top-color: var(--dl-bd) !important; }
  :root .dl2 .dl2-step > b { width: 24px; height: 24px; font-size: 12px; }
  :root .dl2 .dl2-step > div { flex: 1 1 calc(100% - 36px); }
  :root .dl2 .dl2-step strong { font-size: 13px; }
  :root .dl2 .dl2-step .dl2-copy { margin-left: 34px; height: 28px; padding-inline: 0; }

  /* The alternatives heading is unboxed; individual apps are compact cards. */
  :root .dl2 .pd-other-clients {
    grid-column: 1 / -1;
    padding: 0 !important; background: transparent !important;
    border-color: transparent !important; border-radius: 0 !important;
    box-shadow: none !important;
  }
  :root .dl2 .pd-other-clients > .pd-summary { padding: 4px 0 14px; min-height: 44px; }
  :root .dl2 .pd-other-clients > .pd-disclosure-body { padding-top: 14px; }
  :root .dl2 .pd-other-clients .dl2-grid { gap: 14px; }
  :root .dl2 .pd-other-clients .dl2-row {
    --nc-inner: 8px;
    background: var(--dl-card) !important;
    border-color: var(--dl-bd) !important;
    border-radius: 25px !important;
    padding: 16px;
    gap: 10px;
  }
  :root .dl2 .pd-other-clients .dl2-row :is(.dl2-btn, .dl2-howto) { border-radius: 8px !important; }
  :root .dl2 .pd-other-clients .dl2-row-act .dl2-btn { flex: 1 1 0; min-width: 0; height: 36px; font-size: 12px; }
  :root .dl2 .pd-other-clients .dl2-name { flex-wrap: wrap; row-gap: 2px; }
  :root .dl2 .dl2-dep {
    grid-column: 1 / -1;
    background: transparent; border-color: transparent;
    border-radius: 0 !important; box-shadow: none; padding: 0;
  }
  :root .dl2 .dl2-dep summary { padding-block: 4px; }
  :root .dl2 .dl2-foot { grid-column: 1 / -1; margin: 0; text-align: left; font-size: 11px; }

  /* Node search takes only the width it needs, alongside the list heading. */
  :root .dashboard-layout .node-list-card {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 340px);
    gap: 16px 24px; align-items: start;
  }
  :root .node-list-card .nodes-header-meta { margin: 0; min-height: 42px; align-items: center; gap: 12px; justify-content: flex-start; }
  :root .node-list-card .panel-title { margin-bottom: 0; }
  :root .node-list-card > .niva-node-search { margin: 0; }
  :root .node-list-card .niva-node-search-field { min-height: 40px; }
  :root .node-list-card .niva-node-search-count { font-size: 11px; line-height: 1.6; }
  :root .node-list-card .node-list-wrapper { grid-column: 1 / -1; gap: 10px 16px; }
  :root .node-list-card .node-item-row { min-height: 48px; padding: 10px 12px; }
}
@media (min-width: 992px) {
  :root .subscription-grid > .pd-auto-renew.panel-card { align-self: start; }
}
/* The ledger draws one rule between entries, and one above the month summary.
   A trailing row border plus a leading summary border produced a double line. */
:root .wallet-hub .wh-bills > .wh-record { border-bottom: 0; }
:root .wallet-hub .wh-bills > .wh-record ~ .wh-record { border-top: 1px solid var(--wh-line); }

@media (max-width: 991.98px) {
  .wh-account-layout, .wh-ledger { display: contents; }
}
@media (min-width: 992px) {
  :root .dl2 .pd-download-guide .dl2-step { border-radius: 0 !important; }
}

/* Wallet revision: one composed account sheet, with an aligned ledger.
   Added data columns are desktop-only; existing mobile markup stays in place. */
.wh-quick-summary, .wh-desktop-tools, .wh-ledger-columns,
.wh-record-time, .wh-record-state, .wh-desktop-note { display: none; }
@media (min-width: 992px) {
  :root .dashboard-layout .carousel-page > .wallet-hub,
  :root .dashboard-layout .secondary-route > .wallet-hub { max-width: 760px !important; }
  :root .wallet-hub > .wh-heading { margin-bottom: 20px; }
  :root .wallet-hub .wh-sheet {
    display: block;
    --nc-inner: 9px;
    background: var(--wh-bg);
    border: 1px solid var(--wh-line);
    border-radius: 34px;
    box-shadow: 0 2px 5px #142b4e03, 0 12px 32px -20px #142b4e26;
  }
  :root .wallet-hub .wh-sheet > .wh-balance {
    margin: 0; padding: 22px 24px !important;
    background: transparent !important;
    border: 0 !important; border-bottom: 1px solid var(--wh-line) !important;
    border-radius: 0 !important; box-shadow: none !important;
  }
  :root .wallet-hub .wh-balance-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center; gap: 24px;
  }
  :root .wallet-hub .wh-eyebrow { font-size: 12px; }
  :root .wallet-hub .wh-amount { font-size: 36px; font-weight: 600; margin-top: 5px; line-height: 1.2; }
  :root .wallet-hub .wh-amount > span { font-size: 20px; vertical-align: 3px; margin-right: 4px; }
  :root .wallet-hub .wh-balance-top > .wh-primary { width: auto; min-width: 90px; min-height: 40px; padding: 8px 16px; }
  :root .wallet-hub .wh-quick-summary { display: flex; align-items: center; gap: 26px; }
  :root .wallet-hub .wh-quick-summary dl { margin: 0; min-width: 82px; }
  :root .wallet-hub .wh-quick-summary dt { color: var(--wh-muted); font-size: 11px; line-height: 1.6; }
  :root .wallet-hub .wh-quick-summary dd { margin: 7px 0 0; color: var(--wh-text); font-size: 17px; line-height: 1.4; font-weight: 500; font-variant-numeric: tabular-nums; }
  :root .wallet-hub .wh-pending-inline { flex-wrap: nowrap; padding-top: 14px; margin-top: 16px; }
  :root .wallet-hub .wh-pending-inline > div { flex: 1; }
  :root .wallet-hub .wh-pending-inline > .wh-text { margin-left: 0; }

  :root .wallet-hub .wh-ledger {
    display: grid; grid-template-columns: minmax(0, 1fr) auto;
    gap: 0 16px; padding: 14px 24px 18px;
  }
  :root .wallet-hub .wh-ledger > .wh-tabs { grid-column: 1; margin: 0; border: 0; gap: 24px; }
  :root .wallet-hub .wh-tabs > button { padding-bottom: 12px; font-size: 13px; }
  :root .wallet-hub .wh-desktop-tools { display: inline-flex; grid-column: 2; align-self: start; min-height: 30px; }
  :root .wallet-hub .wh-mobile-ledger-head { display: none; }
  :root .wallet-hub .wh-ledger > :is(.wh-bills, .wh-orders) {
    grid-column: 1 / -1; margin: 0;
    padding: 0 !important; background: transparent !important;
    border: 0 !important; border-top: 1px solid var(--wh-line) !important;
    border-radius: 0 !important; box-shadow: none !important;
  }
  :root .wallet-hub .wh-bill-tools { margin-top: 14px; margin-bottom: 6px; }
  :root .wallet-hub .wh-bills .wh-ledger-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 140px 110px 62px 14px;
    column-gap: 12px; padding: 13px 0 10px 36px;
    color: var(--wh-muted); font-size: 11px; line-height: 1.6;
    border-bottom: 1px solid var(--wh-line);
  }
  :root .wallet-hub .wh-ledger-columns > span:nth-child(3) { text-align: right; }
  :root .wallet-hub .wh-ledger-columns > span:nth-child(4) { text-align: center; }
  :root .wallet-hub .wh-bills .wh-record {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) 140px 110px 62px 14px;
    column-gap: 12px;
    padding: 15px 0;
    align-items: center; min-height: 58px;
  }
  :root .wallet-hub .wh-bills .wh-record:first-of-type { padding-top: 15px; }
  :root .wallet-hub .wh-record-info > small,
  :root .wallet-hub .wh-record-value > small { display: none; }
  :root .wallet-hub .wh-record-time { display: block; color: var(--wh-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
  :root .wallet-hub .wh-record-state { display: block; color: var(--wh-muted); font-size: 11px; text-align: center; }
  :root .wallet-hub .wh-record-state.credit { color: var(--wh-green); }
  :root .wallet-hub .wh-record-info strong { font-size: 13px; font-weight: 500; }
  :root .wallet-hub .wh-record-value b { font-size: 13px; font-weight: 600; }
  :root .wallet-hub .wh-month-summary { display: none; }
  :root .wallet-hub .wh-desktop-note {
    display: block; margin: 0;
    padding-top: 12px; border-top: 1px solid var(--wh-line);
    color: var(--wh-muted); font-size: 11px; line-height: 1.6;
  }
  :root .wallet-hub .wh-orders { gap: 0; }
  :root .wallet-hub .wh-orders > .wh-filters { padding-top: 12px; padding-bottom: 4px; }
  :root .wallet-hub .wh-orders > :is(.wh-order, .wh-empty) {
    border: 0; border-radius: 0 !important; box-shadow: none;
    background: transparent; padding: 16px 0;
  }
  :root .wallet-hub .wh-orders > .wh-order + .wh-order { border-top: 1px solid var(--wh-line); }
}
@media (min-width: 992px) {
  :root .dashboard-layout .wallet-hub .wh-sheet :is(
    .wh-balance.panel-card, .wh-bills.panel-card, .wh-orders > .panel-card
  ) { border-radius: 0 !important; }
}

/* Desktop wallet polish. Typography, balance grid, toolbar and interaction states.
   All new controls bind to the existing search/filter refs and API functions. */
.wh-active-filters { display: none; }
@media (min-width: 992px) {
  :root .wallet-hub {
    --wh-row-hover: #f4f7fb;
    --wh-control-bg: #fbfcfe;
  }
  :root.dark .wallet-hub {
    --wh-row-hover: #ffffff06;
    --wh-control-bg: #ffffff04;
  }
  :root .wallet-hub .wh-sheet { box-shadow: 0 2px 8px -4px #142b4e1a; }
  :root .wallet-hub .wh-balance-top {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 1.2fr) 90px;
    gap: 24px;
  }
  :root .wallet-hub .wh-quick-summary {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px;
  }
  :root .wallet-hub .wh-quick-summary dl { min-width: 0; }
  :root .wallet-hub .wh-eyebrow,
  :root .wallet-hub .wh-quick-summary dt { font-size: 12px; }
  :root .wallet-hub .wh-quick-summary dd {
    font-size: 20px; line-height: 1.4; margin-top: 6px;
    font-variant-numeric: tabular-nums;
  }
  :root .wallet-hub .wh-balance-top > .wh-primary {
    min-height: 40px; padding: 8px 14px;
    font-size: 14px !important;
    background: #1470e0; box-shadow: 0 1px 2px #0f3f7a1a !important;
  }
  :root .wallet-hub .wh-balance-top > .wh-primary:hover { background: #0f64ce; opacity: 1; }
  :root .wallet-hub .wh-ledger { padding-top: 12px; }
  :root .wallet-hub .wh-tabs > button { min-height: 42px; font-size: 14px; padding-bottom: 12px; }
  :root .wallet-hub .wh-desktop-toolbar {
    display: flex; align-items: center; gap: 8px;
    align-self: start; padding-bottom: 8px;
  }
  :root .wallet-hub .wh-toolbar-search {
    display: flex; width: 200px; height: 34px;
    min-width: 0; margin: 0; padding: 6px 10px;
    border: 1px solid var(--wh-line); background: var(--wh-control-bg);
    border-radius: 8px !important;
  }
  :root .wallet-hub .wh-toolbar-search input { font-size: 12px; line-height: 20px; }
  :root .wallet-hub .wh-toolbar-search > .wh-icon { width: 15px; height: 15px; }
  :root .wallet-hub .wh-toolbar-search:focus-within {
    outline: 2px solid var(--wh-blue); outline-offset: 2px;
  }
  :root .wallet-hub .wh-filter-toggle {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 34px; padding: 5px 10px; min-width: 72px;
    border: 1px solid var(--wh-line); border-radius: 8px;
    background: var(--wh-bg); color: var(--wh-text);
    font-size: 12px;
  }
  :root .wallet-hub .wh-filter-toggle .wh-icon { width: 15px; height: 15px; }
  :root .wallet-hub .wh-filter-toggle:hover,
  :root .wallet-hub .wh-filter-toggle[aria-expanded="true"] { background: var(--wh-soft); }
  :root .wallet-hub .wh-filter-toggle em {
    font-style: normal; font-size: 11px; font-weight: 600;
    min-width: 17px; line-height: 18px;
    padding-inline: 3px; border-radius: 4px;
    color: var(--wh-blue); background: #1470e010;
  }
  :root .wallet-hub .wh-bills .wh-bill-tools {
    grid-template-columns: 126px minmax(0, 1fr);
    align-items: center; gap: 10px 12px; margin: 14px 0 8px;
  }
  :root .wallet-hub .wh-bills .wh-bill-tools > .wh-search { display: none; }
  :root .wallet-hub .wh-bills .wh-bill-tools > select { min-height: 34px; }
  :root .wallet-hub .wh-bills .wh-bill-tools .wh-filters {
    grid-column: auto; margin: 0; gap: 3px;
  }
  :root .wallet-hub .wh-active-filters {
    display: flex; flex-wrap: wrap; align-items: center;
    gap: 6px; padding-top: 12px; padding-bottom: 2px;
  }
  :root .wallet-hub .wh-filter-chip {
    display: inline-flex; align-items: center; gap: 7px;
    min-width: 0; max-width: 220px; padding: 3px 7px;
    border: 1px solid var(--wh-line); border-radius: 6px;
    background: var(--wh-soft); color: var(--wh-muted);
    font-size: 12px; line-height: 20px;
    overflow: hidden; white-space: nowrap;
  }
  :root .wallet-hub .wh-filter-chip > span[aria-hidden] { margin-left: auto; opacity: .75; }
  :root .wallet-hub .wh-filter-chip-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  :root .wallet-hub .wh-clear-filters { min-height: 26px; margin-left: 4px; font-size: 12px !important; }
  :root .wallet-hub .wh-bills .wh-ledger-columns { font-size: 12px; }
  :root .wallet-hub .wh-bills .wh-record { min-height: 60px; transition: background-color 120ms ease; }
  :root .wallet-hub .wh-bills .wh-record:hover,
  :root .wallet-hub .wh-bills .wh-record:focus-visible { background: var(--wh-row-hover); }
  :root .wallet-hub .wh-bills .wh-record:focus-visible { outline-offset: -2px; }
  :root .wallet-hub .wh-record-info strong,
  :root .wallet-hub .wh-record-value b { font-size: 14px; }
  :root .wallet-hub .wh-record-time,
  :root .wallet-hub .wh-record-state,
  :root .wallet-hub .wh-desktop-note { font-size: 12px; }
  :root .wallet-hub .wh-record-value b { font-variant-numeric: tabular-nums; }

  /* Preserve selected tabs while reserving the strongest blue for recharge. */
  :root :is(.wallet-hub, .wallet-original-promotion) > .wh-heading .wh-view-switch .niva-seg-btn {
    background: transparent !important; border-color: transparent !important;
    box-shadow: none !important;
  }
  :root :is(.wallet-hub, .wallet-original-promotion) > .wh-heading .wh-view-switch .niva-seg-btn.active {
    background: #eaf3ff !important; border-color: #c6dcf5 !important;
    color: #1267cb !important;
  }
  :root.dark :is(.wallet-hub, .wallet-original-promotion) > .wh-heading .wh-view-switch .niva-seg-btn.active {
    background: #203348 !important; border-color: #325471 !important; color: #b7d8ff !important;
  }
  /* The wallet pane gently masks the shared grid; other routes keep their canvas. */
  :root .dashboard-layout .carousel-page:has(> :is(.wallet-hub, .wallet-original-promotion)),
  :root .dashboard-layout .secondary-route:has(> :is(.wallet-hub, .wallet-original-promotion)) {
    background-color: #f5f7fac7;
  }
  :root.dark .dashboard-layout .carousel-page:has(> :is(.wallet-hub, .wallet-original-promotion)),
  :root.dark .dashboard-layout .secondary-route:has(> :is(.wallet-hub, .wallet-original-promotion)) {
    background-color: #0f1319c7;
  }
}
@media (prefers-reduced-motion: reduce) {
  :root .wallet-hub .wh-record { transition: none; }
}

/* Small, local inline SVG operator marks; no network image requests or card wrappers. */
:root .plans-page .pk-operator {
  display: inline-block; position: relative; padding-left: 18px;
  white-space: nowrap; vertical-align: baseline; line-height: inherit;
}
:root .plans-page .pk-operator-logo {
  display: block; position: absolute; left: 0; top: 50%;
  width: 15px; height: 15px; overflow: visible; transform: translateY(-50%);
}
:root .plans-page .pk-operator--unicom { --pk-operator-color: #d42c25; }
:root .plans-page .pk-operator--mobile { --pk-operator-color: #007db3; --pk-operator-green: #749c12; }
:root .plans-page .pk-operator--telecom { --pk-operator-color: #0753a2; }
:root.dark .plans-page .pk-operator--unicom { --pk-operator-color: #ff827c; }
:root.dark .plans-page .pk-operator--mobile { --pk-operator-color: #63c5ef; --pk-operator-green: #b5d95b; }
:root.dark .plans-page .pk-operator--telecom { --pk-operator-color: #80bbff; }
:root .plans-page .pk-operator-part--main { fill: var(--pk-operator-color); }
:root .plans-page .pk-operator-part--green { fill: var(--pk-operator-green); }
