.dashboard-mobile-insights-content, .dashboard-mobile-metric-label, .dashboard-mobile-metric-meta { display: none; }
@media (max-width: 760px) {
  html body #dashboard-section#dashboard-section#dashboard-section#dashboard-section .dashboard-mobile-insights {
    width: 100% !important; box-sizing: border-box !important; margin-top: -6px !important;
    padding: 0 !important; border: 0 !important; background: transparent !important;
    box-shadow: none !important; min-height: 0 !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section#dashboard-section .dashboard-mobile-insights :is(.dashboard-advanced-metrics-header, .dashboard-advanced-metrics-grid) { display: none !important; }
  .dashboard-mobile-insights-content { display: grid; gap: 10px; width: 100%; min-width: 0; }
  .dashboard-mobile-metric-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
  .dashboard-mobile-metric-heading h3 { margin: 0; color: var(--dashboard-text); font-size: 15px; line-height: 20px; font-weight: 500; letter-spacing: 0; }
  .dashboard-mobile-metric-heading button { width: 28px; height: 28px; border: 0; padding: 0; background: transparent; color: var(--dashboard-secondary); font-size: 20px; cursor: pointer; }
  .dashboard-mobile-metric-info { margin: 0 0 8px; color: var(--dashboard-secondary); font-size: 11px; line-height: 1.4; }
  .dashboard-mobile-metric-info[hidden] { display: none; }
  .dashboard-mobile-metric-rows { width: 100%; min-width: 0; box-sizing: border-box; padding: 0 9px; border: 1px solid var(--dashboard-border); border-radius: 2px; background: var(--dashboard-panel-bg); }
  html body #dashboard-section#dashboard-section#dashboard-section#dashboard-section .dashboard-mobile-insights .dashboard-insight-card {
    display: grid !important; grid-template-columns: 22px minmax(0, 1fr) auto !important;
    grid-template-rows: auto auto !important; align-content: center !important; align-items: center !important;
    min-width: 0 !important; min-height: 54px !important; padding: 8px 0 !important;
    gap: 1px 7px !important; border: 0 !important; border-bottom: 1px solid var(--dashboard-border) !important;
    border-radius: 0 !important; background: transparent !important; box-shadow: none !important;
    overflow: visible !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section#dashboard-section .dashboard-mobile-insights .dashboard-insight-card:last-child { border-bottom: 0 !important; }
  html body #dashboard-section#dashboard-section#dashboard-section#dashboard-section .dashboard-mobile-insights .dashboard-insight-icon {
    grid-column: 1 !important; grid-row: 1 / 3 !important; width: 22px !important; height: 24px !important;
    background: transparent !important; border: 0 !important; border-radius: 0 !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section#dashboard-section .dashboard-mobile-insights :is(.dashboard-advanced-metric-label, .dashboard-advanced-metric-meta) { display: none !important; }
  html body #dashboard-section#dashboard-section#dashboard-section#dashboard-section .dashboard-mobile-insights .dashboard-mobile-metric-label {
    display: block; grid-column: 2; grid-row: 1; min-width: 0; color: var(--dashboard-text);
    font-size: 13px; line-height: 17px; font-weight: 500; letter-spacing: 0;
  }
  html body #dashboard-section#dashboard-section#dashboard-section#dashboard-section .dashboard-mobile-insights .dashboard-mobile-metric-meta {
    display: block; grid-column: 2; grid-row: 2; min-width: 0; color: var(--dashboard-secondary);
    font-size: 10px; line-height: 14px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  }
  html body #dashboard-section#dashboard-section#dashboard-section#dashboard-section .dashboard-mobile-insights .dashboard-advanced-metric-value {
    grid-column: 3 !important; grid-row: 1 / 3 !important; justify-self: end; text-align: right !important;
    margin: 0 !important; font-size: clamp(16px, 4.6vw, 19px) !important; line-height: 23px !important;
    font-weight: 500 !important; white-space: nowrap !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section#dashboard-section .dashboard-mobile-insights .dashboard-mobile-metric-unavailable { color: var(--dashboard-secondary) !important; }
  html body #dashboard-section#dashboard-section#dashboard-section#dashboard-section .dashboard-mobile-insights :is(article:has(#metric-sharpe-ratio), article:has(#metric-sortino-ratio)) { min-height: 48px !important; }
  html body #dashboard-section#dashboard-section#dashboard-section#dashboard-section .dashboard-mobile-insights :is(article:has(#metric-sharpe-ratio), article:has(#metric-sortino-ratio)) .dashboard-mobile-metric-meta { display: none; }
  html body #dashboard-section#dashboard-section#dashboard-section#dashboard-section .dashboard-mobile-insights :is(article:has(#metric-sharpe-ratio), article:has(#metric-sortino-ratio)) .dashboard-mobile-metric-label { grid-row: 1 / 3; }
  .dashboard-mobile-metric-progress { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 34px; padding: 6px 0; box-sizing: border-box; color: var(--dashboard-secondary); font-size: 11px; line-height: 15px; }
  .dashboard-mobile-metric-progress span:last-child { flex-shrink: 0; }
}

/* Withdrawals: compact mobile card layout. Desktop table remains unchanged. */
.withdrawals-mobile-intro,
.withdrawals-mobile-toolbar { display: none; }

@media (max-width: 760px) {
  html body #withdrawals-section#withdrawals-section#withdrawals-section .withdrawals-mobile-intro {
    display: none !important;
  }

  html body #withdrawals-section#withdrawals-section#withdrawals-section.active {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    width: 100% !important;
    padding: 18px 12px 24px !important;
    overflow: visible !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section .withdrawals-mobile-intro {
    display: block !important;
    margin: 0 0 16px !important;
  }
  #withdrawals-section .withdrawals-mobile-intro h1 {
    margin: 0 0 2px !important;
    color: #f0f5f8 !important;
    font-size: 30px !important;
    font-weight: 750 !important;
    line-height: 1.12 !important;
  }
  #withdrawals-section .withdrawals-mobile-intro p {
    margin: 0 !important;
    color: #9bb9cb !important;
    font-size: 14px !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section :is(.portfolio-summary-strip, .withdrawals-summary-panel, #floating-add-withdrawal-btn) { display: none !important; }
  html body #withdrawals-section#withdrawals-section#withdrawals-section .withdrawals-table-header {
    display: block !important;
    width: 100% !important;
    margin: 0 0 14px !important;
    padding: 0 !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section #add-withdrawal-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 52px !important;
    padding: 10px !important;
    border: 0 !important;
    border-radius: 13px !important;
    background: #15d5e5 !important;
    color: #001a22 !important;
    box-shadow: 0 8px 22px rgba(0, 218, 232, .18) !important;
    font-size: 16px !important;
    font-weight: 750 !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section .withdrawals-mobile-toolbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    width: 100% !important;
    min-height: 34px !important;
    margin: 0 0 10px !important;
    color: #9dbbd0 !important;
    font-size: 14px !important;
  }
  #withdrawals-section .withdrawals-mobile-sort {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    min-height: 34px !important;
    padding: 0 8px !important;
    border: 1px solid #1c4658 !important;
    border-radius: 11px !important;
    background: #091e29 !important;
    color: #b8e9fb !important;
  }
  #withdrawals-section .withdrawals-mobile-sort select {
    width: auto !important;
    max-width: 132px !important;
    min-height: 30px !important;
    padding: 0 15px 0 2px !important;
    border: 0 !important;
    background: transparent !important;
    color: inherit !important;
    font-size: 13px !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section .withdrawals-table-scroll {
    width: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    background: transparent !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section #withdrawals-table {
    width: 100% !important;
    min-width: 0 !important;
    background: transparent !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section #withdrawals-table thead { display: none !important; }
  html body #withdrawals-section#withdrawals-section#withdrawals-section #withdrawals-table-body {
    display: block !important;
    width: 100% !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section #withdrawals-table-body tr {
    display: grid !important;
    grid-template-columns: 24% 30% 23% 23% !important;
    grid-template-rows: 35px 24px !important;
    column-gap: 0 !important;
    row-gap: 3px !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 76px !important;
    margin: 0 0 7px !important;
    padding: 8px 10px !important;
    border: 1px solid #17465a !important;
    border-radius: 12px !important;
    background: linear-gradient(120deg, #081b25, #071820) !important;
    overflow: visible !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section #withdrawals-table-body td {
    height: auto !important;
    min-width: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    color: #a5c9da !important;
    font-size: 10px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section #withdrawals-table-body td[data-field="nr"] {
    grid-column: 1 !important; grid-row: 1 !important;
    width: 35px !important; height: 35px !important;
    justify-content: center !important;
    border-radius: 50% !important;
    background: #063b47 !important;
    color: #19d8e9 !important;
    font-size: 14px !important;
    font-weight: 750 !important;
  }
  #withdrawals-table-body td[data-field="nr"]::before { content: '#'; }
  html body #withdrawals-section#withdrawals-section#withdrawals-section #withdrawals-table-body td[data-field="amount"] {
    grid-column: 2 / 4 !important; grid-row: 1 !important;
    color: #19d8e9 !important;
    font-size: 18px !important;
    font-weight: 750 !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section #withdrawals-table-body td.action-buttons {
    grid-column: 4 !important; grid-row: 1 !important;
    overflow: visible !important;
  }
  #withdrawals-section #withdrawals-table-body .action-menu-toggle {
    width: 34px !important; height: 34px !important;
    border: 1px solid #1c4b5c !important;
    border-radius: 50% !important;
    background: #0a2a36 !important;
    color: #afdcec !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section #withdrawals-table-body td[data-field="date"] { grid-column: 1 !important; grid-row: 2 !important; }
  html body #withdrawals-section#withdrawals-section#withdrawals-section #withdrawals-table-body td[data-field="month"] { grid-column: 2 !important; grid-row: 2 !important; }
  html body #withdrawals-section#withdrawals-section#withdrawals-section #withdrawals-table-body td[data-field="source"] { grid-column: 3 !important; grid-row: 2 !important; }
  html body #withdrawals-section#withdrawals-section#withdrawals-section #withdrawals-table-body td[data-field="country"] { grid-column: 4 !important; grid-row: 2 !important; }
  #withdrawals-section #withdrawals-table-body td[data-field="date"]::before,
  #withdrawals-section #withdrawals-table-body td[data-field="month"]::before,
  #withdrawals-section #withdrawals-table-body td[data-field="source"]::before,
  #withdrawals-section #withdrawals-table-body td[data-field="country"]::before {
    flex: 0 0 auto;
    margin-right: 4px;
    color: #66c3ee;
    font-size: 14px;
  }
  #withdrawals-section #withdrawals-table-body td[data-field="date"]::before,
  #withdrawals-section #withdrawals-table-body td[data-field="month"]::before { content: '▣'; }
  #withdrawals-section #withdrawals-table-body td[data-field="source"]::before { content: '◉'; }
  #withdrawals-section #withdrawals-table-body td[data-field="country"]::before { content: '♧'; }
}

/* On mobile, keep Cash Flow in the same compact type scale as Portfolio insights. */
@media (max-width: 760px) {
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-cash-flow {
    display: block !important; width: 100% !important; max-width: none !important; box-sizing: border-box !important;
    justify-self: stretch !important; margin-top: -6px !important; min-height: 0 !important; height: auto !important;
    padding: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-cash-flow > .dashboard-panel-title {
    margin: 0 0 7px !important; padding: 0 9px !important; color: var(--dashboard-text) !important;
    font-size: 15px !important; line-height: 20px !important; font-weight: 500 !important;
    letter-spacing: 0 !important; text-transform: none !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-cash-flow-list {
    display: block !important; width: 100% !important; box-sizing: border-box !important;
    height: auto !important; margin: 0 !important; padding: 0 9px !important;
    border: 1px solid var(--dashboard-border) !important; border-radius: 2px !important;
    background: var(--dashboard-panel-bg) !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-cash-flow-list > .metric-row,
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-cash-flow-list > .dashboard-insight-card {
    display: grid !important; grid-template-columns: 22px minmax(0, 1fr) auto !important;
    grid-template-rows: auto auto !important; align-content: center !important; align-items: center !important;
    min-width: 0 !important; min-height: 54px !important; margin: 0 !important; padding: 8px 0 !important;
    gap: 1px 7px !important; border: 0 !important; border-bottom: 1px solid var(--dashboard-border) !important;
    border-radius: 0 !important; background: transparent !important; box-shadow: none !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-cash-flow-list > :last-child { border-bottom: 0 !important; }
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-cash-flow-list .dashboard-cash-icon,
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-cash-flow-list .dashboard-insight-icon {
    grid-column: 1 !important; grid-row: 1 / 3 !important; justify-self: start !important;
    width: 22px !important; height: 24px !important; color: var(--dashboard-secondary) !important;
    border: 0 !important; border-radius: 0 !important; background: transparent !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-cash-flow-list .dashboard-cash-icon .dashboard-ui-icon,
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-cash-flow-list .dashboard-insight-icon .dashboard-ui-icon { width: 22px !important; height: 22px !important; }
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-cash-flow-list > .metric-row > .metric-label {
    grid-column: 2 !important; grid-row: 1 / 3 !important; min-width: 0 !important; max-width: none !important;
    color: var(--dashboard-text) !important; font-size: 13px !important; line-height: 17px !important;
    font-weight: 500 !important; letter-spacing: 0 !important; text-align: left !important; text-transform: none !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-cash-flow-list > .dashboard-insight-card .dashboard-advanced-metric-label,
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-cash-flow-list > .dashboard-insight-card .dashboard-advanced-metric-meta { display: none !important; }
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-cash-flow-list > .dashboard-insight-card .dashboard-mobile-metric-label {
    display: block !important; grid-column: 2 !important; grid-row: 1 !important; min-width: 0 !important;
    color: var(--dashboard-text) !important; font-size: 13px !important; line-height: 17px !important;
    font-weight: 500 !important; letter-spacing: 0 !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-cash-flow-list > .dashboard-insight-card .dashboard-mobile-metric-meta {
    display: block !important; grid-column: 2 !important; grid-row: 2 !important; min-width: 0 !important;
    color: var(--dashboard-secondary) !important; font-size: 10px !important; line-height: 14px !important;
    overflow: hidden !important; white-space: nowrap !important; text-overflow: ellipsis !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-cash-flow-list .metric-value,
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-cash-flow-list .dashboard-advanced-metric-value {
    grid-column: 3 !important; grid-row: 1 / 3 !important; justify-self: end !important; min-width: 0 !important;
    margin: 0 !important; color: var(--dashboard-text) !important; font-size: clamp(16px, 4.6vw, 19px) !important;
    line-height: 23px !important; font-weight: 500 !important; text-align: right !important; white-space: nowrap !important;
    text-shadow: none !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-cash-flow-list #metric-return-capital-ratio { color: var(--appearance-amber, #c59b24) !important; }
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-cash-flow-list .dashboard-mobile-metric-unavailable { color: var(--dashboard-secondary) !important; }
}

/* Shared controls/icons. Existing Dark surfaces retain their established palette. */
html.appearance-changing *, html.appearance-changing *::before, html.appearance-changing *::after { transition: none !important; }
.dashboard-ui-icon { width: 24px; height: 24px; display: block; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.dashboard-card-icon { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; color: #28d3c6; background: rgba(28, 195, 185, .11); }
.dashboard-icon--muted { color: #9eb3c8; background: rgba(136, 162, 188, .1); }
.dashboard-icon--blue { color: #51a7ff; background: rgba(70, 150, 230, .1); }
.dashboard-icon--red { color: #f47885; background: rgba(238, 85, 108, .1); }
.dashboard-icon--amber { color: #ecc54d; background: rgba(224, 179, 45, .1); }
html body #dashboard-section.banymay-dashboard .dashboard-summary-item {
  display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: auto auto;
  column-gap: 12px; row-gap: 3px; align-content: center; align-items: center; padding: 0 16px;
}
html body #dashboard-section.banymay-dashboard .dashboard-summary-icon { grid-row: 1 / 3; grid-column: 1; }
html body #dashboard-section.banymay-dashboard .dashboard-summary-item > .dashboard-summary-label,
html body #dashboard-section.banymay-dashboard .dashboard-summary-item > .dashboard-summary-value { grid-column: 2; min-width: 0; }
html body #dashboard-section.banymay-dashboard .dashboard-summary-item > .dashboard-summary-label { white-space: normal !important; overflow-wrap: anywhere; }
html body #dashboard-section.banymay-dashboard .dashboard-summary-badge-row { align-items: center; gap: 7px; }
html body #dashboard-section.banymay-dashboard .dashboard-summary-badge-row > strong { margin-left: auto; }
html body #dashboard-section.banymay-dashboard .dashboard-rank-icon { width: 20px; height: 20px; background: transparent; }
html body #dashboard-section.banymay-dashboard .dashboard-rank-icon svg { width: 16px; height: 16px; }
html body #dashboard-section.banymay-dashboard .dashboard-cash-icon { width: 30px; height: 30px; }
html body #dashboard-section.banymay-dashboard .dashboard-cash-icon svg { width: 19px; height: 19px; }
html body #dashboard-section.banymay-dashboard .metric-row { gap: 10px; }
html body #dashboard-section.banymay-dashboard .metric-row > .metric-label { flex: 1; }
html body #dashboard-section.banymay-dashboard .dashboard-advanced-metric-card.dashboard-insight-card {
  display: grid !important;
  grid-template-columns: 36px minmax(0, 1fr) !important;
  grid-template-rows: auto auto auto !important;
  column-gap: 10px !important;
  row-gap: 2px !important;
  align-content: center !important;
  align-items: center !important;
  padding: 10px 12px !important;
  text-align: left !important;
}
html body #dashboard-section.banymay-dashboard .dashboard-insight-icon {
  position: static !important;
  grid-column: 1 !important;
  grid-row: 1 / 4 !important;
  width: 36px !important;
  height: 36px !important;
  align-self: center !important;
}
html body #dashboard-section.banymay-dashboard .dashboard-advanced-metric-label,
html body #dashboard-section.banymay-dashboard .dashboard-advanced-metric-value,
html body #dashboard-section.banymay-dashboard .dashboard-advanced-metric-meta {
  grid-column: 2 !important;
  min-width: 0 !important;
  max-width: 100% !important;
  text-align: left !important;
}
html body #dashboard-section.banymay-dashboard .dashboard-advanced-metric-label { grid-row: 1 !important; }
html body #dashboard-section.banymay-dashboard .dashboard-advanced-metric-value { grid-row: 2 !important; }
html body #dashboard-section.banymay-dashboard .dashboard-advanced-metric-meta { grid-row: 3 !important; }
html body #dashboard-section.banymay-dashboard .dashboard-insight-icon svg { width: 22px; height: 22px; opacity: .85; }
html body #dashboard-section.banymay-dashboard #metric-return-capital-ratio { opacity: .765 !important; }

/* Compact chart switch and real twelve-hour risk history. */
html body #dashboard-section.banymay-dashboard .dashboard-risk-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
html body #dashboard-section.banymay-dashboard .dashboard-risk-header h2 { margin-bottom: 0 !important; }
html body #dashboard-section.banymay-dashboard .risk-view-switch { display: inline-flex; flex-shrink: 0; padding: 2px; border: 1px solid #294b5d; border-radius: 18px; background: #0a1722; }
html body #dashboard-section.banymay-dashboard .risk-view-switch button { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border: 1px solid transparent; border-radius: 14px; background: transparent; color: #91a9bd; font-size: 11px; cursor: pointer; }
html body #dashboard-section.banymay-dashboard .risk-view-switch button.active { color: #b5f8ff; background: linear-gradient(140deg, #13596b, #103647); border-color: #25c9d9; }
html body #dashboard-section.banymay-dashboard .risk-view-switch button:focus-visible { outline: 2px solid #25c9d9; outline-offset: 2px; }
html body #dashboard-section.banymay-dashboard .risk-view-switch svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
html body #dashboard-section.banymay-dashboard .dashboard-risk-history { position: relative; height: 270px; min-width: 0; margin-top: 10px; }
html body #dashboard-section.banymay-dashboard .risk-history-message { display: flex; align-items: center; justify-content: center; height: 100%; margin: 0; padding: 25px; color: #94a5b3; font-size: 12px; line-height: 1.6; text-align: center; box-sizing: border-box; }
html body #dashboard-section.banymay-dashboard .dashboard-risk :is(.dashboard-risk-chart-wrap, .dashboard-risk-legend, .dashboard-risk-history, .risk-history-message, #risk-history-chart)[hidden] { display: none !important; }
html[data-appearance="light"] body #dashboard-section.banymay-dashboard .risk-view-switch { background: #eef6fa; border-color: #cbdde8; }
html[data-appearance="light"] body #dashboard-section.banymay-dashboard .risk-view-switch button.active { background: #d8f3f3; color: #087f88; }
html[data-appearance="light"] body #dashboard-section.banymay-dashboard .risk-history-message { color: #768b9e; }
.banymay-header #settings-menu .settings-menu-row-appearance { gap: 8px; }
.banymay-header #settings-menu .appearance-switch {
  position: relative; display: grid; grid-template-columns: repeat(2, 1fr); align-items: center;
  width: 132px; height: 36px; padding: 3px; flex: 0 0 132px; margin: 0;
  border: 1px solid #344958; border-radius: 20px; background: #0c1922; color: #9aafbf;
  cursor: pointer; box-shadow: none; font-family: inherit; font-weight: 600; font-size: 12px; line-height: 1.2;
}
.appearance-switch::before { content: ''; position: absolute; inset: 3px auto 3px 3px; width: calc(50% - 3px); border-radius: 16px; background: #263e4b; transition: transform .18s ease; }
.appearance-switch[aria-checked="true"]::before { transform: translateX(100%); background: #e3f5f3; }
.appearance-choice { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px; pointer-events: none; }
.appearance-choice svg { width: 16px; height: 16px; stroke-width: 1.65; }
.appearance-switch[aria-checked="false"] .appearance-choice-dark { color: #e9f2f7; }
.appearance-switch[aria-checked="true"] .appearance-choice-light { color: #008f89; }
.appearance-switch:focus-visible { outline: 2px solid #00b5b0; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .appearance-switch::before { transition: none; } }

/* The language row must own a higher stacking layer than subsequent settings.
 * Raising only the dropdown cannot escape the row's existing stacking context. */
.banymay-header #settings-menu .settings-menu-row:has(.settings-language-picker.open) {
  z-index: 40;
  isolation: isolate;
}
.banymay-header #settings-menu .settings-language-picker.open { position: static; }
.banymay-header #settings-menu .settings-language-picker.open .settings-language-menu {
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  width: 100%;
  min-width: 0;
  max-height: min(320px, max(80px, calc(100dvh - 300px)));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--header-menu-bg, #151f28) !important;
  background-image: none !important;
  opacity: 1;
  z-index: 2;
}

/* Light palette shared by every app section. The generated sheet covers legacy literals. */
html[data-appearance="light"] {
  color-scheme: light;
  --appearance-page: #f4f9fc;
  --appearance-panel: #ffffff;
  --appearance-soft: #f2f7fb;
  --appearance-text: #142e50;
  --appearance-secondary: #607c99;
  --appearance-border: #e2edf5;
  --appearance-teal: #00aaa5;
  --appearance-positive: #00a582;
  --appearance-negative: #f14365;
  --appearance-amber: #df9d05;
  --banymay-app-page-bg: var(--appearance-page);
}
html[data-appearance="light"][data-appearance="light"] body.theme-blue,
html[data-appearance="light"][data-appearance="light"] body.theme-blue:has(#dashboard-section.banymay-dashboard.active),
html[data-appearance="light"][data-appearance="light"] body.theme-blue:has(#dashboard-section.banymay-dashboard.active) > .container,
html[data-appearance="light"][data-appearance="light"] body.theme-blue > .container,
html[data-appearance="light"][data-appearance="light"] body.theme-blue :is(#dashboard-section, #stocks-section, #sectors-section, #deposits-section, #withdrawals-section, #dividends-section, #stocks-gains-section, #taxes-section, #profile-section, #settings-section, #leaderboard-section, #admin-section) {
  background: var(--appearance-page) !important; background-image: none !important; color: var(--appearance-text);
}
html[data-appearance="light"] body.theme-blue {
  margin-top: 0 !important;
  border-top: 0 !important;
  background-color: var(--appearance-page) !important;
}
html[data-appearance="light"][data-appearance="light"] body.theme-blue .navbar.banymay-header {
  --header-bg: #ffffff;
  --header-border: #e1ebf2;
  --header-text: #223f61;
  --header-text-muted: #6b83a0;
  --header-accent: #00aaa5;
  --header-hover-bg: #edf6fb;
  --header-menu-bg: #ffffff;
  --header-menu-border: #dfeaf2;
  --header-avatar-bg: #e5edf4;
  --header-avatar-text: #183554;
  background: #ffffff !important; border-color: #e1ebf2 !important;
  box-shadow: 0 2px 15px rgba(73, 117, 151, .035) !important;
}
html[data-appearance="light"] body.theme-blue .navbar.banymay-header {
  top: 0 !important;
  margin-top: 0 !important;
  transform: none !important;
  border-top: 0 !important;
}
html[data-appearance="light"][data-appearance="light"] body.theme-blue #settings-menu,
html[data-appearance="light"][data-appearance="light"] body.theme-blue .settings-language-menu {
  background: #ffffff !important; border-color: var(--appearance-border) !important; color: var(--appearance-text) !important;
  box-shadow: 0 12px 35px rgba(43, 85, 121, .12) !important;
}
html[data-appearance="light"][data-appearance="light"] body.theme-blue #settings-menu .appearance-switch { border-color: #d9e6ee; background: #f2f7fb; color: #657f99; }
html[data-appearance="light"][data-appearance="light"] body.theme-blue #settings-menu :is(.settings-menu-item, .settings-menu-copy, .settings-chip, .settings-logout-btn) { color: #223f61 !important; }
html[data-appearance="light"][data-appearance="light"] body.theme-blue #settings-menu .settings-chip.active { color: #008f89 !important; background: #e7f7f5 !important; border-color: #bde9e3 !important; }
html[data-appearance="light"][data-appearance="light"] body.theme-blue .banymay-header .nav-menu li a.nav-link:not(.disabled) { color: #223f61 !important; }
html[data-appearance="light"][data-appearance="light"] body.theme-blue .banymay-header .nav-menu li a.nav-link.active { color: #00aaa5 !important; }
html[data-appearance="light"] .dashboard-card-icon { color: #00a48f; background: #e6f7f5; }
html[data-appearance="light"] .dashboard-icon--muted { color: #708aa5; background: #f0f5f9; }
html[data-appearance="light"] .dashboard-icon--blue { color: #1286e4; background: #eaf5ff; }
html[data-appearance="light"] .dashboard-icon--red { color: #ff5274; background: #ffedf1; }
html[data-appearance="light"] .dashboard-icon--amber { color: #e5a100; background: #fff8e7; }

html[data-appearance="light"][data-appearance="light"] body.theme-blue #dashboard-section.banymay-dashboard {
  --dashboard-bg: var(--appearance-page);
  --dashboard-header-bg: #ffffff;
  --dashboard-panel-bg: #ffffff;
  --dashboard-panel-alt: #ffffff;
  --dashboard-inner-surface: #f5f9fc;
  --dashboard-text: var(--appearance-text);
  --dashboard-secondary: var(--appearance-secondary);
  --dashboard-muted: #7891aa;
  --dashboard-border: var(--appearance-border);
  --dashboard-divider: var(--appearance-border);
  --dashboard-grid: rgba(105, 143, 177, .14);
  --dashboard-accent: var(--appearance-teal);
  --dashboard-positive: var(--appearance-positive);
  --dashboard-negative: var(--appearance-negative);
  --dashboard-gold: var(--appearance-amber);
  --dashboard-panel-gap: 12px;
}
html[data-appearance="light"][data-appearance="light"] body.theme-blue #dashboard-section.banymay-dashboard .dashboard-content { padding: 16px 38px 24px !important; }
html[data-appearance="light"][data-appearance="light"] body.theme-blue #dashboard-section.banymay-dashboard :is(.dashboard-panel, .dashboard-performance.performance-chart-container, .dashboard-risk.chart-container, .dashboard-advanced-metric-card.dashboard-insight-card) {
  border-radius: 11px !important; clip-path: none !important;
  background: #ffffff !important; border-color: var(--appearance-border) !important;
  box-shadow: 0 4px 18px rgba(78, 132, 171, .045) !important;
}
html[data-appearance="light"][data-appearance="light"] body.theme-blue #dashboard-section.banymay-dashboard .dashboard-summary.dashboard-panel {
  min-height: 78px; padding: 0; gap: 10px; overflow: visible !important;
  border: 0 !important; background: transparent !important; box-shadow: none !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) minmax(130px, .75fr);
}
html[data-appearance="light"][data-appearance="light"] body.theme-blue #dashboard-section.banymay-dashboard :is(.dashboard-summary-item, .dashboard-summary-rankscore) {
  min-height: 78px; padding: 12px; background: #ffffff; border: 1px solid var(--appearance-border);
  border-radius: 11px; box-shadow: 0 4px 18px rgba(78, 132, 171, .04);
}
html[data-appearance="light"][data-appearance="light"] body.theme-blue #dashboard-section.banymay-dashboard :is(.dashboard-summary-item, .dashboard-summary-rankscore)::before { display: none; }
html[data-appearance="light"][data-appearance="light"] body.theme-blue #dashboard-section.banymay-dashboard .dashboard-summary-item { grid-template-columns: 44px minmax(0, 1fr); column-gap: 10px; }
html[data-appearance="light"][data-appearance="light"] body.theme-blue #dashboard-section.banymay-dashboard .dashboard-summary-label { font-size: 9px !important; letter-spacing: .04em; line-height: 13px; color: #6c86a2 !important; }
html[data-appearance="light"][data-appearance="light"] body.theme-blue #dashboard-section.banymay-dashboard :is(#dashboard-summary-balance, #dashboard-summary-profit, #metric-balance-total-return, #metric-average-annual-return, #metric-xirr):not(.negative) { color: var(--appearance-positive) !important; }
html[data-appearance="light"][data-appearance="light"] body.theme-blue #dashboard-section.banymay-dashboard :is(#dashboard-summary-balance, #dashboard-summary-profit, #dashboard-summary-money-invested) { font-size: 24px !important; line-height: 28px !important; font-weight: 700 !important; }
html[data-appearance="light"][data-appearance="light"] body.theme-blue #dashboard-section.banymay-dashboard #dashboard-summary-money-invested { color: var(--appearance-text) !important; }
html[data-appearance="light"][data-appearance="light"] body.theme-blue #dashboard-section.banymay-dashboard .dashboard-summary-badge-row strong { color: var(--appearance-text); font-size: 16px; }
html[data-appearance="light"][data-appearance="light"] body.theme-blue #dashboard-section.banymay-dashboard :is(.dashboard-panel-title, .dashboard-advanced-metrics-kicker) { color: var(--appearance-text) !important; letter-spacing: .035em !important; }
html[data-appearance="light"][data-appearance="light"] body.theme-blue #dashboard-section.banymay-dashboard :is(.negative, #performance-return.negative) { color: var(--appearance-negative) !important; }
html[data-appearance="light"][data-appearance="light"] body.theme-blue #dashboard-section.banymay-dashboard :is(.positive, .dashboard-advanced-metric-value.positive) { color: var(--appearance-positive) !important; }
html[data-appearance="light"][data-appearance="light"] body.theme-blue #dashboard-section.banymay-dashboard :is(.warning, .dashboard-advanced-metric-value.warning) { color: var(--appearance-amber) !important; }
html[data-appearance="light"][data-appearance="light"] body.theme-blue #dashboard-section.banymay-dashboard .time-btn { background: #f1f8fc !important; border-color: #e6f0f6 !important; color: var(--appearance-text) !important; }
html[data-appearance="light"][data-appearance="light"] body.theme-blue #dashboard-section.banymay-dashboard .time-btn.active { background: #00aaa5 !important; border-color: #00aaa5 !important; color: #ffffff !important; }
html[data-appearance="light"][data-appearance="light"] body.theme-blue #dashboard-section.banymay-dashboard .dashboard-breakdown-table tbody tr:nth-child(odd) { background: #f5f9fc !important; }
html[data-appearance="light"][data-appearance="light"] body.theme-blue #dashboard-section.banymay-dashboard .dashboard-cash-flow-list { gap: 7px; }
html[data-appearance="light"][data-appearance="light"] body.theme-blue #dashboard-section.banymay-dashboard .metric-row { min-height: 42px; padding: 7px 10px; border: 0 !important; border-radius: 14px; background: #f3f8fb !important; }
html[data-appearance="light"][data-appearance="light"] body.theme-blue #dashboard-section.banymay-dashboard .metric-label { max-width: none; letter-spacing: 0 !important; font-size: 10px !important; }
html[data-appearance="light"][data-appearance="light"] body.theme-blue #dashboard-section.banymay-dashboard .dashboard-advanced-metric-card.dashboard-insight-card { border-radius: 6px !important; }
html[data-appearance="light"][data-appearance="light"] body.theme-blue #dashboard-section.banymay-dashboard .dashboard-advanced-metric-label { color: var(--appearance-text) !important; font-size: 11px !important; }
html[data-appearance="light"][data-appearance="light"] body.theme-blue #dashboard-section.banymay-dashboard .dashboard-advanced-metric-meta { color: #637f9e !important; }

/* Fields, menus, modals, tables and inline-rendered helpers on every app page. */
html[data-appearance="light"][data-appearance="light"] body.theme-blue :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea) { color-scheme: light !important; color: #193857; }
html[data-appearance="light"][data-appearance="light"] body.theme-blue :is(input, textarea)::placeholder { color: #8198ac !important; opacity: 1; }
html[data-appearance="light"][data-appearance="light"] body.theme-blue :is(.broker-dropdown, .action-menu-content, .column-filter-menu, .dividend-import-dialog, .performance-tooltip-card, .balance-risk-tooltip) { background: #ffffff !important; color: #193857 !important; border-color: #dfeaf3 !important; }
html[data-appearance="light"][data-appearance="light"] body.theme-blue .broker-dropdown > * { color: #193857 !important; }
html[data-appearance="light"][data-appearance="light"] body.theme-blue .broker-dropdown > *:hover { background: #edf6fb !important; }
html[data-appearance="light"][data-appearance="light"] body.theme-blue :is(.modal-overlay, .dividend-import-overlay, .paywall-modal-overlay) { background: rgba(25, 47, 73, .32); }
html[data-appearance="light"][data-appearance="light"] body.theme-blue :is(.positive, .profit-positive, .gain-positive) { color: #009e7d !important; }
html[data-appearance="light"][data-appearance="light"] body.theme-blue :is(.negative, .profit-negative, .gain-negative, .text-danger) { color: #e74762 !important; }
html[data-appearance="light"][data-appearance="light"] body.theme-blue :is(.settings-save-btn, .settings-primary-btn, .download-primary-btn, .contact-submit-btn, .dividend-import-confirm) { background: #00aaa5 !important; color: #ffffff !important; border-color: #00aaa5 !important; }
html[data-appearance="light"][data-appearance="light"] body.theme-blue > div[style*="pointer-events: none"] { color: #607c99 !important; }
html[data-appearance="light"][data-appearance="light"] body.theme-blue :is(.portfolio-summary-bar, .portfolio-summary-strip, .portfolio-summary, .admin-sidebar, .my-plan-sidebar, .settings-sidebar) { border-color: #dfeaf3 !important; }

@media (max-width: 1450px) {
  html body #dashboard-section.banymay-dashboard .dashboard-summary-item { padding-inline: 10px; column-gap: 8px; grid-template-columns: 36px minmax(0, 1fr); }
  html body #dashboard-section.banymay-dashboard .dashboard-summary-icon { width: 36px; height: 36px; }
  html body #dashboard-section.banymay-dashboard .dashboard-summary-icon svg { width: 21px; height: 21px; }
  html[data-appearance="light"][data-appearance="light"] body.theme-blue #dashboard-section.banymay-dashboard :is(#dashboard-summary-balance, #dashboard-summary-profit, #dashboard-summary-money-invested) { font-size: 20px !important; }
}
@media (max-width: 1180px) {
  html[data-appearance="light"][data-appearance="light"] body.theme-blue #dashboard-section.banymay-dashboard .dashboard-summary.dashboard-panel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  html[data-appearance="light"][data-appearance="light"] body.theme-blue #dashboard-section.banymay-dashboard .dashboard-summary-rankscore { grid-column: 1 / -1; grid-row: auto; flex-direction: row; justify-content: space-around; min-height: 44px; }
  html[data-appearance="light"][data-appearance="light"] body.theme-blue #dashboard-section.banymay-dashboard .dashboard-content { padding-inline: 18px !important; }
}
@media (max-width: 680px) {
  html[data-appearance="light"][data-appearance="light"] body.theme-blue #dashboard-section.banymay-dashboard .dashboard-summary.dashboard-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html[data-appearance="light"][data-appearance="light"] body.theme-blue .navbar.banymay-header { position: fixed !important; top: 0 !important; left: 0; right: 0; }
  html[data-appearance="light"][data-appearance="light"] body.theme-blue #dashboard-section.banymay-dashboard .dashboard-content { padding: 10px 10px 20px !important; }
  html body #dashboard-section.banymay-dashboard .dashboard-summary-item { padding: 10px; min-height: 68px; }
  html body #dashboard-section.banymay-dashboard .dashboard-insight-card { padding-left: 58px; }
  html body #dashboard-section.banymay-dashboard .dashboard-insight-icon { left: 10px; }
}

/* Billing: make the Premium plan the only full-width overview card. */
html body #settings-section #billing-panel .billing-expired-heading { display: none !important; }
html body #settings-section #billing-panel { --dashboard-border: #263A46; }
html[data-appearance="light"] body #settings-section #billing-panel { --dashboard-border: var(--appearance-border); }
html body #settings-section #billing-panel .billing-overview-grid {
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100% !important;
}
html body #settings-section #billing-panel .billing-overview-grid > .billing-hero {
  width: 100% !important;
  max-width: none !important;
  border: 1px solid var(--dashboard-border) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
html body #settings-section #billing-panel :is(.billing-expired-features, .billing-expired-security) {
  border: 1px solid var(--dashboard-border) !important;
  border-radius: 0 !important;
}
html body #settings-section #billing-panel.billing-trial-expired .billing-overview-grid { grid-template-columns: minmax(0, 1fr) !important; }
html body #settings-section #billing-panel.billing-trial-expired .billing-price-block { margin-right: 0 !important; }

.stocks-mobile-nav, .stocks-mobile-tools, .stocks-mobile-summary, .stocks-mobile-list, .stocks-mobile-pages, .stocks-mobile-panel, .stocks-mobile-editor-nav { display: none; }
@media (max-width: 760px) {
  html body.theme-blue:has(:is(#stocks-section.active, #sectors-section.active, #deposits-section.active, #withdrawals-section.active, #dividends-section.active, #stocks-gains-section.active, #taxes-section.active, #profile-section.active, #settings-section.active, #leaderboard-section.active, #admin-section.active)) {
    --app-navbar-height: 64px !important;
    --app-navbar-offset: 64px !important;
    padding-top: 64px !important;
  }
  html body.theme-blue:has(:is(#stocks-section.active, #sectors-section.active, #deposits-section.active, #withdrawals-section.active, #dividends-section.active, #stocks-gains-section.active, #taxes-section.active, #profile-section.active, #settings-section.active, #leaderboard-section.active, #admin-section.active)) .stocks-mobile-nav {
    display: none !important;
  }
  .stocks-mobile-nav::-webkit-scrollbar { display: none; }
  .stocks-mobile-nav a { display: flex; align-items: center; flex: 0 0 auto; padding: 0 8px; text-decoration: none; color: #b7c5d5; font-size: 13px; white-space: nowrap; border-bottom: 2px solid transparent; }
  .stocks-mobile-nav a.active { color: #25d5df; border-bottom-color: #25d5df; font-weight: 700; }
  .stocks-mobile-nav a[hidden] { display: none; }
  html[data-appearance="light"] .stocks-mobile-nav { background: var(--appearance-page) !important; border-color: var(--appearance-border) !important; }
  html[data-appearance="light"] .stocks-mobile-nav a { color: var(--appearance-text); }
  html[data-appearance="light"] .stocks-mobile-nav a.active { color: var(--appearance-teal); border-color: var(--appearance-teal); }
  html body #stocks-section#stocks-section#stocks-section {
    --mobile-stocks-panel: #0f1d25;
    --mobile-stocks-border: #263a46;
    --mobile-stocks-text: #e8edf2;
    --mobile-stocks-muted: #a6b3c2;
    --mobile-stocks-accent: #25d5df;
    --mobile-stocks-positive: #24e5b6;
    padding: 0 !important; width: 100% !important; min-width: 0 !important;
  }
  html[data-appearance="light"] body #stocks-section#stocks-section#stocks-section {
    --mobile-stocks-panel: #fff;
    --mobile-stocks-border: var(--appearance-border);
    --mobile-stocks-text: var(--appearance-text);
    --mobile-stocks-muted: var(--appearance-secondary);
    --mobile-stocks-accent: var(--appearance-teal);
    --mobile-stocks-positive: var(--appearance-positive);
  }
  html body #stocks-section#stocks-section#stocks-section .stocks-page-shell { padding: 0 !important; margin: 0 !important; width: 100% !important; min-width: 0 !important; gap: 0 !important; }
  html body #stocks-section#stocks-section#stocks-section :is(.stocks-summary-strip, .stocks-page-header, .stocks-columns-btn, .stocks-last-updated, .stocks-toolbar-select, .stocks-table-scroll, #floating-add-btn) { display: none !important; }
  html body #stocks-section#stocks-section#stocks-section .stocks-page-heading { display: none !important; }
  html body #stocks-section#stocks-section#stocks-section .stocks-toolbar { order: 0 !important; display: grid !important; grid-template-columns: minmax(0,1fr) auto !important; gap: 8px !important; margin: 0 !important; padding: 12px !important; width: 100% !important; box-sizing: border-box !important; }
  html body #stocks-section#stocks-section#stocks-section .stocks-mobile-summary { order: 1 !important; }
  html body #stocks-section#stocks-section#stocks-section .stocks-mobile-list { order: 2 !important; }
  html body #stocks-section#stocks-section#stocks-section .stocks-mobile-pages { order: 3 !important; }
  html body #stocks-section#stocks-section#stocks-section .stocks-toolbar { scroll-margin-top: 76px; }
  html body #stocks-section#stocks-section#stocks-section .stocks-mobile-editor-nav {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    order: 0;
    gap: 5px;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 10px 14px;
  }
  html body #stocks-section#stocks-section#stocks-section .stocks-mobile-editor-nav[hidden] { display: none !important; }
  html body #stocks-section#stocks-section#stocks-section .stocks-mobile-editor-nav button {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    justify-self: stretch !important;
    width: 100% !important;
    min-height: 52px !important;
    box-sizing: border-box !important;
    padding: 12px 16px !important;
    border: 1px solid var(--mobile-stocks-border) !important;
    border-radius: 6px !important;
    background: var(--mobile-stocks-panel) !important;
    color: var(--mobile-stocks-accent) !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    text-align: left !important;
    touch-action: manipulation !important;
    cursor: pointer;
  }
  .stocks-mobile-editor-nav button:disabled { opacity: .5; cursor: default; }
  .stocks-mobile-editor-nav span { color: var(--mobile-stocks-muted); font-size: 11px; }
  html body #stocks-section#stocks-section#stocks-section .stocks-search-control { grid-column: 1; grid-row: 1; min-width: 0 !important; width: auto !important; height: 40px !important; padding: 0 10px !important; border-radius: 6px !important; background: var(--mobile-stocks-panel) !important; border: 1px solid var(--mobile-stocks-border) !important; }
  html body #stocks-section#stocks-section#stocks-section .stocks-search-control input { min-width: 0 !important; width: 100% !important; font-size: 13px !important; }
  html body #stocks-section#stocks-section#stocks-section .stocks-mobile-tools { display: flex; gap: 8px; grid-column: 2; grid-row: 1; }
  .stocks-mobile-tools button { width: 36px; height: 40px; border: 1px solid var(--mobile-stocks-border); border-radius: 6px; background: var(--mobile-stocks-panel); color: var(--mobile-stocks-text); font-size: 23px; cursor: pointer; }
  .stocks-mobile-tools svg { display: block; width: 22px; height: 22px; margin: auto; }
  .stocks-mobile-tools button[aria-expanded="true"] { border-color: var(--mobile-stocks-accent); color: var(--mobile-stocks-accent); }
  .stocks-mobile-tools button.has-active-filters { position: relative; color: var(--mobile-stocks-accent); }
  .stocks-mobile-tools button.has-active-filters::after { content: ''; position: absolute; top: 4px; right: 4px; width: 5px; height: 5px; border-radius: 50%; background: var(--mobile-stocks-accent); }
  html body #stocks-section#stocks-section#stocks-section .stocks-mobile-panel {
    display: grid !important; grid-column: 1 / -1; gap: 10px; width: 100%; min-width: 0;
    box-sizing: border-box; padding: 12px; border: 1px solid var(--mobile-stocks-border);
    border-radius: 8px; background: var(--mobile-stocks-panel); color: var(--mobile-stocks-text);
  }
  html body #stocks-section#stocks-section#stocks-section .stocks-mobile-panel[hidden] { display: none !important; }
  .stocks-mobile-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
  .stocks-mobile-panel-heading button { padding: 0; width: 32px; height: 32px; border: 0; background: transparent; color: var(--mobile-stocks-muted); font-size: 24px; }
  .stocks-mobile-panel-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stocks-mobile-panel-actions button, .stocks-mobile-panel > button { min-width: 0; min-height: 40px; padding: 8px; border: 1px solid var(--mobile-stocks-border); border-radius: 6px; background: transparent; color: var(--mobile-stocks-accent); font-size: 12px; cursor: pointer; }
  .stocks-mobile-panel-actions button:disabled { opacity: .4; cursor: default; }
  .stocks-mobile-panel-actions button[hidden] { display: none; }
  .stocks-mobile-panel-field { display: grid; gap: 5px; min-width: 0; color: var(--mobile-stocks-muted); font-size: 11px; }
  html body #stocks-section#stocks-section#stocks-section .stocks-mobile-panel-field select {
    display: block !important; width: 100% !important; min-width: 0 !important; max-width: 100% !important;
    box-sizing: border-box !important; height: 42px !important; padding: 0 10px !important; border-radius: 6px !important;
    border: 1px solid var(--mobile-stocks-border) !important; background: var(--mobile-stocks-panel) !important;
    color: var(--mobile-stocks-text) !important; font-size: 16px !important;
  }
  html body #stocks-section#stocks-section#stocks-section .stocks-mobile-summary { display: flex; align-items: center; justify-content: space-between; padding: 0 12px 12px; color: var(--mobile-stocks-muted); font-size: 12px; }
  .stocks-mobile-total strong { color: var(--mobile-stocks-text); margin-left: 5px; }
  html body #stocks-section#stocks-section#stocks-section .stocks-mobile-list { display: block; color: var(--mobile-stocks-text); width: 100%; }
  .stocks-mobile-row { box-sizing: border-box; display: grid; grid-template-columns: 20px minmax(0,1.35fr) minmax(0,.8fr) minmax(0,1fr) minmax(0,1fr) 14px; align-items: center; gap: 6px; padding: 8px 12px; min-height: 48px; border-bottom: 1px solid var(--mobile-stocks-border); }
  .stocks-mobile-row > * { min-width: 0; }
  .stocks-mobile-row button { margin: 0; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; font: inherit; text-align: left; }
  .stocks-mobile-row > button:last-child { font-size: 24px; text-align: right; }
  .stocks-mobile-check { width: 14px !important; height: 14px !important; margin: 0 !important; accent-color: var(--mobile-stocks-accent); }
  .stocks-mobile-head { min-height: 34px; font-size: 10px; color: var(--mobile-stocks-muted); border-top: 1px solid var(--mobile-stocks-border); }
  html body #stocks-section#stocks-section#stocks-section .stocks-mobile-head > button:nth-child(4),
  html body #stocks-section#stocks-section#stocks-section .stocks-mobile-head > button:nth-child(5) {
    width: 100%;
    text-align: right !important;
    white-space: nowrap;
  }
  .stocks-mobile-asset { display: flex; flex-direction: column; gap: 3px; }
  .stocks-mobile-asset strong { font-size: 13px; }
  .stocks-mobile-asset span { width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--mobile-stocks-muted); font-size: 10px; }
  .stocks-mobile-weight, .stocks-mobile-value, .stocks-mobile-change { font-size: 11px; white-space: nowrap; }
  .stocks-mobile-value, .stocks-mobile-change { text-align: right; }
  .stocks-mobile-change.positive { color: var(--mobile-stocks-positive); }
  .stocks-mobile-change.negative { color: #f07170; }
  .stocks-mobile-track { width: 100%; height: 5px; margin-top: 5px; background: var(--mobile-stocks-border); border-radius: 4px; overflow: hidden; }
  .stocks-mobile-track i { display: block; height: 100%; background: var(--mobile-stocks-accent); border-radius: inherit; }
  .stocks-mobile-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0 12px 8px; padding: 8px 12px; border: 1px solid var(--mobile-stocks-border); border-radius: 6px; background: var(--mobile-stocks-panel); }
  .stocks-mobile-detail > div:not(.stocks-mobile-detail-actions) { padding: 8px; display: flex; flex-direction: column; gap: 4px; }
  .stocks-mobile-detail > div:nth-child(even) { border-left: 1px solid var(--mobile-stocks-border); }
  .stocks-mobile-detail > div:nth-child(n+3):not(.stocks-mobile-detail-actions) { border-top: 1px solid var(--mobile-stocks-border); }
  .stocks-mobile-detail span { color: var(--mobile-stocks-muted); font-size: 11px; }
  .stocks-mobile-detail strong { font-size: 13px; }
  .stocks-mobile-detail .stocks-mobile-risk-high { color: #f07170; }
  .stocks-mobile-detail-actions { grid-column: 1 / -1; display: flex; gap: 8px; padding-top: 8px; }
  .stocks-mobile-detail-actions button { border: 0; background: transparent; color: var(--mobile-stocks-accent); cursor: pointer; padding: 4px; }
  html body #stocks-section#stocks-section#stocks-section .stocks-mobile-detail-actions button {
    display: inline-flex !important;
    flex: 1 1 0 !important;
    width: 50% !important;
    min-width: 0 !important;
    min-height: 64px !important;
    box-sizing: border-box !important;
    padding: 12px 18px !important;
    border: 1px solid var(--mobile-stocks-border) !important;
    border-radius: 6px !important;
    background: var(--mobile-stocks-panel) !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    text-align: center !important;
    justify-content: center !important;
    align-items: center !important;
    touch-action: manipulation !important;
    pointer-events: auto !important;
    -webkit-tap-highlight-color: transparent;
  }
  html body #stocks-section#stocks-section#stocks-section .stocks-mobile-pages { display: flex; justify-content: center; align-items: center; gap: 6px; padding: 18px 10px; color: var(--mobile-stocks-muted); }
  .stocks-mobile-pages button { width: 32px; height: 32px; border: 1px solid var(--mobile-stocks-border); border-radius: 5px; color: var(--mobile-stocks-text); background: var(--mobile-stocks-panel); cursor: pointer; }
  .stocks-mobile-pages button.active { background: var(--mobile-stocks-accent); color: #071b24; }
  .stocks-mobile-pages button:disabled { opacity: .35; cursor: default; }
  .stocks-mobile-empty { padding: 20px 12px; font-size: 13px; }
  html body #stocks-section#stocks-section#stocks-section :is(.stocks-mobile-summary, .stocks-mobile-list, .stocks-mobile-pages)[hidden] { display: none !important; }
  html body #stocks-section#stocks-section#stocks-section.stocks-mobile-editing :is(.stocks-mobile-list, .stocks-mobile-pages) { display: none !important; }
  html body #stocks-section#stocks-section#stocks-section.stocks-mobile-editing :is(.stocks-toolbar, .stocks-mobile-summary) { display: none !important; }
  html body #stocks-section#stocks-section#stocks-section#stocks-section.stocks-mobile-editing .stocks-table-scroll { display: block !important; overflow: visible !important; width: 100% !important; min-width: 0 !important; max-width: 100% !important; }
  html body #stocks-section#stocks-section#stocks-section#stocks-section.stocks-mobile-editing .stocks-table { display: block !important; min-width: 0 !important; width: 100% !important; max-width: 100% !important; }
  html body #stocks-section#stocks-section#stocks-section.stocks-mobile-editing .stocks-table thead { display: none !important; }
  html body #stocks-section#stocks-section#stocks-section#stocks-section.stocks-mobile-editing tbody { display: block !important; width: 100% !important; min-width: 0 !important; max-width: 100% !important; }
  html body #stocks-section#stocks-section#stocks-section.stocks-mobile-editing tbody tr:not(.stock-row-editing) { display: none !important; }
  html body #stocks-section#stocks-section#stocks-section#stocks-section.stocks-mobile-editing .stock-row-editing {
    display: grid !important; grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    align-items: start !important; gap: 12px 6px !important; box-sizing: border-box !important;
    width: 100% !important; min-width: 0 !important; max-width: 100% !important; margin: 0 !important; padding: 14px !important;
    scroll-margin-top: 76px;
    overflow: visible !important; border: 1px solid var(--mobile-stocks-border) !important;
    border-radius: 10px !important; background: var(--mobile-stocks-panel) !important;
  }
  html body #stocks-section#stocks-section#stocks-section#stocks-section.stocks-mobile-editing .stock-row-editing td[data-field]:not(:has(input, select, textarea)) { display: none !important; }
  html body #stocks-section#stocks-section#stocks-section#stocks-section.stocks-mobile-editing .stock-row-editing td[data-field]:has(input, select, textarea) {
    display: flex !important; flex-direction: column !important; align-items: stretch !important;
    width: 100% !important; min-width: 0 !important; max-width: 100% !important; box-sizing: border-box !important; padding: 0 !important;
    border: 0 !important; overflow: visible !important; height: auto !important;
    background: transparent !important; white-space: normal !important; text-overflow: clip !important;
    text-align: left !important; justify-content: flex-start !important;
  }
  html body #stocks-section#stocks-section#stocks-section#stocks-section.stocks-mobile-editing .stock-row-editing td[data-field]::before {
    content: attr(data-field); display: block !important; position: static !important; width: auto !important;
    margin: 0 0 5px !important; padding: 0 !important; color: var(--mobile-stocks-muted) !important;
    font-size: 11px !important; line-height: 1.3 !important; font-weight: 600 !important; text-transform: capitalize !important;
  }
  html body #stocks-section#stocks-section#stocks-section#stocks-section.stocks-mobile-editing .stock-row-editing td[data-field="share_price"]::before { content: 'Share price'; }
  html body #stocks-section#stocks-section#stocks-section#stocks-section.stocks-mobile-editing .stock-row-editing td[data-field="symbol"]::after { display: none !important; content: none !important; }
  html body #stocks-section#stocks-section#stocks-section#stocks-section.stocks-mobile-editing .stock-row-editing td[data-field="company"],
  html body #stocks-section#stocks-section#stocks-section#stocks-section.stocks-mobile-editing .stock-row-editing td[data-field="risk"],
  html body #stocks-section#stocks-section#stocks-section#stocks-section.stocks-mobile-editing .stock-row-editing td.action-buttons { grid-column: 1 / -1 !important; }
  html body #stocks-section#stocks-section#stocks-section#stocks-section.stocks-mobile-editing .stock-row-editing td[data-field="symbol"] { grid-column: 1 / 3 !important; grid-row: 1 !important; }
  html body #stocks-section#stocks-section#stocks-section#stocks-section.stocks-mobile-editing .stock-row-editing td[data-field="shares"] { grid-column: 3 / 5 !important; grid-row: 1 !important; }
  html body #stocks-section#stocks-section#stocks-section#stocks-section.stocks-mobile-editing .stock-row-editing td[data-field="broker"] { grid-column: 5 / 7 !important; grid-row: 1 !important; }
  html body #stocks-section#stocks-section#stocks-section#stocks-section.stocks-mobile-editing .stock-row-editing td[data-field="sector"] { grid-column: 1 / 4 !important; grid-row: 2 !important; }
  html body #stocks-section#stocks-section#stocks-section#stocks-section.stocks-mobile-editing .stock-row-editing td[data-field="risk"] { grid-column: 4 / 7 !important; grid-row: 2 !important; }
  html body #stocks-section#stocks-section#stocks-section#stocks-section.stocks-mobile-editing .stock-row-editing td[data-field="share_price"] { grid-column: 1 / -1 !important; grid-row: 3 !important; }
  html body #stocks-section#stocks-section#stocks-section#stocks-section.stocks-mobile-editing .stock-row-editing td.action-buttons { display: none !important; }
  html body #stocks-section#stocks-section#stocks-section#stocks-section.stocks-mobile-editing .stock-row-editing td :is(input, select, textarea) {
    display: block !important; box-sizing: border-box !important; width: 100% !important; min-width: 0 !important;
    max-width: 100% !important; min-height: 44px !important; margin: 0 !important; padding: 10px 11px !important;
    border: 1px solid var(--mobile-stocks-border) !important; border-radius: 7px !important;
    background: #0b1720 !important; color: var(--mobile-stocks-text) !important; font-size: 16px !important; line-height: 1.3 !important; text-align: left !important;
  }
  html[data-appearance="light"] body #stocks-section#stocks-section#stocks-section#stocks-section.stocks-mobile-editing .stock-row-editing td :is(input, select, textarea) { background: #fff !important; }
  html body #stocks-section#stocks-section#stocks-section#stocks-section.stocks-mobile-editing .stock-row-editing td[data-field="risk"] select { height: 44px !important; padding: 0 10px !important; line-height: normal !important; white-space: nowrap !important; }
  html body #stocks-section#stocks-section#stocks-section#stocks-section.stocks-mobile-editing .stock-row-editing td .broker-dropdown,
  html body #stocks-section#stocks-section#stocks-section#stocks-section.stocks-mobile-editing .stock-row-editing td .sector-dropdown { z-index: 10020 !important; max-width: min(86vw, 360px) !important; }
  html body #stocks-section#stocks-section#stocks-section#stocks-section.stocks-mobile-editing .stock-row-editing .action-menu-toggle { display: none !important; }
  html body #stocks-section#stocks-section#stocks-section#stocks-section.stocks-mobile-editing .stock-row-editing .action-menu-panel {
    display: flex !important; position: static !important; inset: auto !important; transform: none !important;
    flex-direction: row !important; justify-content: flex-start !important; gap: 8px !important;
    width: 100% !important; margin: 4px 0 0 !important; padding: 0 !important; background: transparent !important;
    border: 0 !important; box-shadow: none !important; opacity: 1 !important; visibility: visible !important;
  }
  html body #stocks-section#stocks-section#stocks-section#stocks-section.stocks-mobile-editing .stock-row-editing .action-menu-item { display: inline-flex !important; align-items: center !important; justify-content: center !important; min-height: 42px !important; padding: 8px 14px !important; border: 1px solid var(--mobile-stocks-border) !important; border-radius: 7px !important; }
  html body #stocks-section#stocks-section#stocks-section#stocks-section.stocks-mobile-editing .stock-row-editing .edit-btn::after { content: attr(title); margin-left: 6px; }
  html body #stocks-section#stocks-section#stocks-section#stocks-section.stocks-mobile-editing .stock-row-editing :is(.select-td, [data-field="number"]) { display: none !important; }
}

/* Very narrow phones keep the sort marker below the full header label. */
@media (max-width: 340px) {
  html body #dashboard-section#dashboard-section#dashboard-section#dashboard-section .dashboard-breakdown-table thead th {
    font-size: 7.5px !important;
    padding: 5px 2px 10px !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section#dashboard-section .dashboard-breakdown-table th.dashboard-breakdown-sortable::after {
    top: auto; bottom: 1px; transform: none; height: 7px;
  }
}

/* Show the active page name in the phone header without changing desktop nav. */
.banymay-header .banymay-header__page-title { display: none; }
@media (max-width: 760px) {
  html body .banymay-header .banymay-header__inner { gap: 8px !important; }
  html body .banymay-header .banymay-header__brand {
    flex: 0 0 auto !important;
    width: 90px !important;
    max-width: 90px !important;
  }
  html body .banymay-header .banymay-header__page-title {
    order: 1 !important;
    display: block !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    overflow: hidden !important;
    color: var(--header-text, #e8f1f5) !important;
    font-size: clamp(12px, 3.3vw, 15px) !important;
    font-weight: 650 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  html body .banymay-header .banymay-header__nav-toggle { flex: 0 0 40px !important; width: 40px !important; min-width: 40px !important; }
  html body .banymay-header .nav-stats { flex: 0 0 auto !important; margin-left: 0 !important; }
}
@media (max-width: 360px) {
  html body .banymay-header .banymay-header__inner { gap: 6px !important; padding-inline: 12px !important; }
  html body .banymay-header .banymay-header__brand { width: 72px !important; max-width: 72px !important; }
  html body .banymay-header .nav-logo-img { width: 72px !important; }
  html body .banymay-header .banymay-header__nav-toggle { flex-basis: 36px !important; width: 36px !important; min-width: 36px !important; }
}

/* Compact dark mobile withdrawal rows. */
@media (max-width: 760px) {
  html body.theme-blue #withdrawals-section#withdrawals-section#withdrawals-section.active #withdrawals-table-body > tr,
  html body #withdrawals-section#withdrawals-section#withdrawals-section.active #withdrawals-table-body > tr {
    grid-template-rows: 29px 18px !important;
    min-height: 61px !important;
    margin-bottom: 5px !important;
    padding: 5px 10px !important;
    row-gap: 1px !important;
    background: #00151b !important;
    background-color: #00151b !important;
    background-image: none !important;
  }
  html body.theme-blue #withdrawals-section#withdrawals-section#withdrawals-section.active #withdrawals-table-body > tr:hover,
  html body #withdrawals-section#withdrawals-section#withdrawals-section.active #withdrawals-table-body > tr:hover,
  html body.theme-blue #withdrawals-section#withdrawals-section#withdrawals-section.active #withdrawals-table-body > tr > td,
  html body #withdrawals-section#withdrawals-section#withdrawals-section.active #withdrawals-table-body > tr > td {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section.active #withdrawals-table-body > tr[data-withdrawal-filter-hidden="true"] { display: none !important; }
  html body #withdrawals-section#withdrawals-section#withdrawals-section.active #withdrawals-table-body td[data-field="nr"] {
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #18dbe7 !important;
    font-size: 15px !important;
    font-weight: 750 !important;
    justify-content: flex-start !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section.active #withdrawals-table-body td[data-field="amount"] {
    margin-left: 43px !important;
    font-size: clamp(17px, 4.7vw, 21px) !important;
    line-height: 1 !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section.active #withdrawals-table-body td.action-buttons .action-menu-toggle {
    width: 30px !important;
    height: 28px !important;
    min-width: 30px !important;
    min-height: 28px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #b7d4e6 !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section.active #withdrawals-table-body td.action-buttons .action-menu-toggle svg { width: 17px !important; height: 17px !important; }
}

/* The legacy desktop table has a 980px minimum. Remove that intrinsic width on phones. */
@media (max-width: 760px) {
  html body.theme-blue #withdrawals-section#withdrawals-section#withdrawals-section.active,
  html body #withdrawals-section#withdrawals-section#withdrawals-section.active {
    min-width: 0 !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    overflow-x: clip !important;
  }
  html body.theme-blue #withdrawals-section#withdrawals-section#withdrawals-section.active .withdrawals-table-scroll,
  html body #withdrawals-section#withdrawals-section#withdrawals-section.active .withdrawals-table-scroll,
  html body.theme-blue #withdrawals-section#withdrawals-section#withdrawals-section.active #withdrawals-table.withdrawals-redesign-table,
  html body #withdrawals-section#withdrawals-section#withdrawals-section.active #withdrawals-table.withdrawals-redesign-table,
  html body.theme-blue #withdrawals-section#withdrawals-section#withdrawals-section.active #withdrawals-table-body,
  html body #withdrawals-section#withdrawals-section#withdrawals-section.active #withdrawals-table-body {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    table-layout: auto !important;
  }
  html body.theme-blue #withdrawals-section#withdrawals-section#withdrawals-section.active #withdrawals-table-body > tr,
  html body #withdrawals-section#withdrawals-section#withdrawals-section.active #withdrawals-table-body > tr {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    grid-template-columns: minmax(0, 37fr) minmax(0, 33fr) minmax(0, 30fr) !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section.active #withdrawals-table-body > tr > td {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* Full-width mobile withdrawal editor, shown in place of the list. */
.withdrawals-mobile-edit-screen[hidden] { display: none !important; }
@media (max-width: 760px) {
  html body #withdrawals-section#withdrawals-section#withdrawals-section.withdrawals-mobile-editing > :not(#withdrawals-mobile-edit-screen) { display: none !important; }
  html body #withdrawals-section#withdrawals-section#withdrawals-section.withdrawals-mobile-editing #withdrawals-mobile-edit-screen {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding: 13px 2px 0 !important;
  }
  #withdrawals-section .withdrawals-mobile-edit-header {
    display: grid !important;
    grid-template-columns: 1fr 2fr 1fr !important;
    align-items: center !important;
    min-height: 45px !important;
    margin: 0 0 22px !important;
  }
  #withdrawals-section .withdrawals-mobile-edit-header h2 {
    grid-column: 2 !important;
    margin: 0 !important;
    color: #f1f5f7 !important;
    font-size: clamp(18px, 5vw, 22px) !important;
    font-weight: 650 !important;
    line-height: 1.1 !important;
    text-align: center !important;
    white-space: nowrap !important;
  }
  #withdrawals-section #withdrawals-mobile-edit-back {
    grid-column: 1 !important;
    grid-row: 1 !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    width: fit-content !important;
    min-height: 44px !important;
    padding: 0 4px !important;
    border: 0 !important;
    background: transparent !important;
    color: #1cdce7 !important;
    font-size: 34px !important;
    line-height: 1 !important;
    font-weight: 400 !important;
  }
  #withdrawals-section #withdrawals-mobile-edit-back span { font-size: 18px !important; font-weight: 600 !important; }
  #withdrawals-section #withdrawals-mobile-edit-back:disabled { opacity: .5 !important; }
  html body #withdrawals-section#withdrawals-section#withdrawals-section .withdrawals-mobile-edit-form {
    display: grid !important;
    gap: 26px !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 21px 14px 26px !important;
    border: 1px solid #1a5066 !important;
    border-radius: 12px !important;
    background: linear-gradient(130deg, #071d28, #041821) !important;
    box-shadow: none !important;
  }
  #withdrawals-section .withdrawals-mobile-edit-type {
    display: block !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }
  #withdrawals-section .withdrawals-mobile-edit-type legend,
  #withdrawals-section .withdrawals-mobile-edit-field > label {
    display: block !important;
    width: 100% !important;
    margin: 0 0 9px !important;
    padding: 0 !important;
    color: #eff3f5 !important;
    font-size: 17px !important;
    font-weight: 650 !important;
    line-height: 1.25 !important;
  }
  #withdrawals-section .withdrawals-mobile-type-options {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
  #withdrawals-section .withdrawals-mobile-type-options label {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    min-width: 0 !important;
    min-height: 50px !important;
    box-sizing: border-box !important;
    padding: 8px 12px !important;
    border: 1px solid #22546a !important;
    border-radius: 9px !important;
    background: #061923 !important;
    color: #f1f5f7 !important;
    font-size: 16px !important;
    font-weight: 550 !important;
    white-space: nowrap !important;
    cursor: pointer !important;
  }
  #withdrawals-section .withdrawals-mobile-type-options label:has(input:checked) {
    border: 2px solid #16e2e7 !important;
    color: #19e0e7 !important;
  }
  #withdrawals-section .withdrawals-mobile-type-options input { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
  #withdrawals-section .withdrawals-type-icon { width: 26px !important; flex: 0 0 26px !important; color: #91bfd6 !important; font-size: 30px !important; line-height: 1 !important; text-align: center !important; }
  #withdrawals-section .withdrawals-mobile-type-options label:has(input:checked) .withdrawals-type-icon { color: #18d999 !important; }
  #withdrawals-section .withdrawals-mobile-edit-field { min-width: 0 !important; }
  #withdrawals-section .withdrawals-mobile-amount-row { display: grid !important; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr) !important; gap: 12px !important; }
  html body #withdrawals-section#withdrawals-section#withdrawals-section .withdrawals-mobile-edit-form :is(input[type="number"], input[type="date"], select) {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 48px !important;
    box-sizing: border-box !important;
    padding: 0 13px !important;
    border: 1px solid #22546a !important;
    border-radius: 9px !important;
    background: #051722 !important;
    color: #f1f5f7 !important;
    font-family: inherit !important;
    font-size: 17px !important;
    line-height: 1.2 !important;
    box-shadow: none !important;
  }
  #withdrawals-section .withdrawals-mobile-date-wrap,
  #withdrawals-section .withdrawals-mobile-country-wrap { display: flex !important; align-items: center !important; min-width: 0 !important; border: 1px solid #22546a !important; border-radius: 9px !important; background: #051722 !important; }
  #withdrawals-section .withdrawals-mobile-date-wrap > span,
  #withdrawals-section .withdrawals-mobile-country-wrap > span { flex: 0 0 43px !important; text-align: center !important; color: #9dcbea !important; font-size: 23px !important; }
  html body #withdrawals-section#withdrawals-section#withdrawals-section .withdrawals-mobile-date-wrap input,
  html body #withdrawals-section#withdrawals-section#withdrawals-section .withdrawals-mobile-country-wrap select { border: 0 !important; border-left: 1px solid #22546a !important; border-radius: 0 9px 9px 0 !important; background: transparent !important; }
  #withdrawals-section .withdrawals-mobile-edit-error { margin: -10px 0 0 !important; color: #ff8893 !important; font-size: 13px !important; }
}

/* Dashboard refinements for web mobile only. */
@media (max-width: 760px) {
  html body.theme-blue .navbar.banymay-header {
    --header-height: 64px !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 64px !important;
    min-height: 64px !important;
    padding: 0 !important;
  }
  html body.theme-blue .banymay-header .banymay-header__inner {
    height: 64px !important;
    min-height: 64px !important;
    padding: 0 16px !important;
  }
  html body.theme-blue:has(#dashboard-section.active) {
    --app-navbar-height: 64px !important;
    --app-navbar-offset: 64px !important;
    padding-top: 64px !important;
  }
  /* Repeated ID raises the shared layout above legacy ID-based values and
     Light-only overrides. Both themes use these same geometry declarations. */
  html body #dashboard-section#dashboard-section#dashboard-section {
    --dashboard-panel-gap: 12px;
  }
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-content {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 10px 10px 20px !important;
    gap: 12px !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-summary.dashboard-panel {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding: 0 !important;
    min-height: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
    clip-path: none !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section :is(.dashboard-summary-item, .dashboard-summary-rankscore) {
    box-sizing: border-box !important;
    min-width: 0 !important;
    border: 1px solid var(--dashboard-border) !important;
    border-radius: 11px !important;
    background: var(--dashboard-panel-bg) !important;
    box-shadow: none !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section :is(.dashboard-summary-item, .dashboard-summary-rankscore)::before {
    display: none !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-summary-item {
    display: grid !important;
    grid-template-columns: 36px minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    align-content: center !important;
    align-items: center !important;
    min-height: 71.4px !important;
    padding: 7.65px !important;
    gap: 2px 8px !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-summary-label {
    font-size: 8px !important;
    line-height: 1.25 !important;
    letter-spacing: .045em !important;
    white-space: normal !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-summary-value {
    font-size: clamp(17px, 5vw, 22px) !important;
    line-height: 1.1 !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-summary-rankscore {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-around !important;
    min-height: 52.7px !important;
    padding: 8px 12px !important;
    gap: 10px !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-summary-badge-row strong {
    font-size: 16px !important;
    line-height: 22px !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section :is(.dashboard-panel, .dashboard-performance.performance-chart-container, .dashboard-risk.chart-container) {
    border-radius: 11px !important;
    clip-path: none !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section :is(.dashboard-panel-title, .dashboard-advanced-metrics-kicker) {
    letter-spacing: .035em !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-advanced-metric-card.dashboard-insight-card {
    border-radius: 6px !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-advanced-metric-label {
    font-size: 11px !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-cash-flow-list {
    height: auto !important;
    margin-top: 6px !important;
    justify-content: flex-start !important;
    gap: 2px !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-cash-flow {
    min-height: 0 !important;
    height: auto !important;
    grid-template-rows: auto auto !important;
    align-content: start !important;
    padding: 12px 18px !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-cash-flow .metric-row {
    min-height: 32px !important;
    padding: 3px 0 !important;
    border: 0 !important;
    border-radius: 14px !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-cash-flow .metric-label {
    font-size: 9px !important;
    line-height: 1.25 !important;
    letter-spacing: .025em !important;
  }
  html body.theme-blue #dashboard-section.banymay-dashboard .dashboard-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    min-height: 0 !important;
    padding: 0 !important;
  }
  html body.theme-blue #dashboard-section.banymay-dashboard .dashboard-summary-item {
    min-height: 71.4px !important;
    padding: 7.65px !important;
    grid-template-columns: 36px minmax(0, 1fr) !important;
    column-gap: 8px !important;
    row-gap: 2px !important;
  }
  html body.theme-blue #dashboard-section.banymay-dashboard .dashboard-summary-icon {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
  }
  html body.theme-blue #dashboard-section.banymay-dashboard .dashboard-summary-item > .dashboard-summary-label {
    font-size: 8px !important;
    line-height: 1.25 !important;
    letter-spacing: .045em !important;
  }
  html body.theme-blue #dashboard-section.banymay-dashboard .dashboard-summary-item > .dashboard-summary-value {
    font-size: clamp(17px, 5vw, 22px) !important;
    line-height: 1.1 !important;
  }
  html body.theme-blue #dashboard-section.banymay-dashboard .dashboard-summary-rankscore {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
    flex-direction: row !important;
    justify-content: space-around !important;
    align-items: center !important;
    gap: 10px !important;
    min-height: 52.7px !important;
    padding: 8px 12px !important;
  }
  html body.theme-blue #dashboard-section.banymay-dashboard .dashboard-summary-badge-row {
    flex: 1 1 0 !important;
    justify-content: center !important;
    gap: 6px !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-summary-badge-row {
    display: grid !important;
    grid-template-columns: 20px max-content minmax(0, 1fr) !important;
    min-width: 0 !important;
    gap: 0 6px !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-summary-badge-row > strong {
    margin-left: 0 !important;
    justify-self: center;
    /* Center in the remaining track, correcting half its 6px leading gap. */
    transform: translateX(-3px);
  }

  html body.theme-blue #dashboard-section.banymay-dashboard .dashboard-risk-legend {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    gap: 4px !important;
    width: 100% !important;
    max-width: none !important;
    overflow: hidden !important;
  }
  html body.theme-blue #dashboard-section.banymay-dashboard .dashboard-risk-legend-item {
    flex: 0 1 auto !important;
    gap: 3px !important;
    white-space: nowrap !important;
  }
  html body.theme-blue #dashboard-section.banymay-dashboard .dashboard-risk-legend-dot {
    width: 7px !important;
    height: 7px !important;
    flex: 0 0 7px !important;
  }
  html body.theme-blue #dashboard-section.banymay-dashboard .dashboard-risk-legend-text {
    font-size: 11px !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
  }

  html body.theme-blue #dashboard-section.banymay-dashboard .dashboard-breakdown-table-wrap {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }
  html body.theme-blue #dashboard-section.banymay-dashboard .dashboard-breakdown-table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
  }
  html body.theme-blue #dashboard-section.banymay-dashboard .dashboard-breakdown-table th,
  html body.theme-blue #dashboard-section.banymay-dashboard .dashboard-breakdown-table td {
    box-sizing: border-box !important;
    max-width: 0 !important;
    padding: 4px 2px !important;
    font-size: clamp(11px, 3vw, 13px) !important;
    line-height: 1.25 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  html body.theme-blue #dashboard-section.banymay-dashboard .dashboard-breakdown-table thead th {
    font-size: clamp(8px, 2.2vw, 9px) !important;
    letter-spacing: 0 !important;
    white-space: normal !important;
    vertical-align: middle !important;
    height: 34px !important;
    padding: 5px 8px 5px 2px !important;
    line-height: 1.25 !important;
    text-overflow: clip !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-breakdown-table th.dashboard-breakdown-sortable {
    position: relative;
  }
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-breakdown-table th.dashboard-breakdown-sortable::after {
    content: '' !important; position: absolute; right: 1px; top: 50%; transform: translateY(-50%);
    display: block; width: 5px; height: 12px; margin: 0; background: center / contain no-repeat;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 14'%3E%3Cpath d='M2 5 5 2 8 5M2 9 5 12 8 9' fill='none' stroke='%239eb3c8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-breakdown-table th.dashboard-breakdown-sortable[data-sort-direction="ascending"]::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 14'%3E%3Cpath d='M2 7 5 4 8 7' fill='none' stroke='%2325d5df' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-breakdown-table th.dashboard-breakdown-sortable[data-sort-direction="descending"]::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 14'%3E%3Cpath d='M2 7 5 10 8 7' fill='none' stroke='%2325d5df' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
  html body.theme-blue #dashboard-section.banymay-dashboard .dashboard-breakdown-table th:nth-child(1),
  html body.theme-blue #dashboard-section.banymay-dashboard .dashboard-breakdown-table td:nth-child(1) { width: 23% !important; }
  html body.theme-blue #dashboard-section.banymay-dashboard .dashboard-breakdown-table th:nth-child(2),
  html body.theme-blue #dashboard-section.banymay-dashboard .dashboard-breakdown-table td:nth-child(2) { width: 17% !important; }
  html body.theme-blue #dashboard-section.banymay-dashboard .dashboard-breakdown-table th:nth-child(3),
  html body.theme-blue #dashboard-section.banymay-dashboard .dashboard-breakdown-table td:nth-child(3) { width: 23% !important; }
  html body.theme-blue #dashboard-section.banymay-dashboard .dashboard-breakdown-table th:nth-child(4),
  html body.theme-blue #dashboard-section.banymay-dashboard .dashboard-breakdown-table td:nth-child(4) { width: 18% !important; }
  html body.theme-blue #dashboard-section.banymay-dashboard .dashboard-breakdown-table th:nth-child(5),
  html body.theme-blue #dashboard-section.banymay-dashboard .dashboard-breakdown-table td:nth-child(5) { width: 19% !important; }

  html body.theme-blue #dashboard-section.banymay-dashboard .dashboard-cash-flow .metric-row,
  html body.theme-blue #dashboard-section.banymay-dashboard .dashboard-cash-flow .metric-row:first-child {
    display: grid !important;
    grid-template-columns: 30px minmax(0, 1fr) auto !important;
    align-items: center !important;
    column-gap: 8px !important;
    min-height: 42px !important;
    padding: 7px 0 !important;
  }
  html body.theme-blue #dashboard-section.banymay-dashboard .dashboard-cash-flow .metric-row .dashboard-cash-icon { grid-column: 1 !important; }
  html body.theme-blue #dashboard-section.banymay-dashboard .dashboard-cash-flow .metric-row .metric-label {
    grid-column: 2 !important;
    min-width: 0 !important;
    max-width: none !important;
    align-self: center !important;
    white-space: normal !important;
    font-size: 9px !important;
    line-height: 1.25 !important;
    letter-spacing: .025em !important;
  }
  html body.theme-blue #dashboard-section.banymay-dashboard .dashboard-cash-flow .metric-row .metric-value {
    grid-column: 3 !important;
    align-self: center !important;
    white-space: nowrap !important;
  }
}

/* Deposits mobile layout: reflow the existing live summary, table and chart. */
@media (max-width: 760px) {
  html body #deposits-section#deposits-section#deposits-section {
    --mobile-deposits-panel: #0f1d25;
    --mobile-deposits-border: #263a46;
    --mobile-deposits-text: #e8edf2;
    --mobile-deposits-muted: #a6b3c2;
    --mobile-deposits-accent: #25d5df;
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 12px 24px !important;
    margin: 0 !important;
    overflow: visible !important;
  }
  html[data-appearance="light"] body #deposits-section#deposits-section#deposits-section {
    --mobile-deposits-panel: #fff;
    --mobile-deposits-border: var(--appearance-border);
    --mobile-deposits-text: var(--appearance-text);
    --mobile-deposits-muted: var(--appearance-secondary);
    --mobile-deposits-accent: var(--appearance-teal);
  }
  html body #deposits-section#deposits-section#deposits-section .deposits-page-shell {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 12px 0 0 !important;
  }
  html body #deposits-section#deposits-section#deposits-section :is(.deposits-page-header, .deposits-portfolio-summary, #floating-add-deposit-btn) {
    display: none !important;
  }
  html body #deposits-section#deposits-section#deposits-section .deposits-invested-band {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    gap: 0 !important;
    min-height: 0 !important;
    padding: 14px 16px !important;
    border: 1px solid var(--mobile-deposits-border) !important;
    border-radius: 12px !important;
    background: var(--mobile-deposits-panel) !important;
    color: var(--mobile-deposits-text) !important;
  }
  html body #deposits-section#deposits-section#deposits-section .deposits-total-deposits {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 2px !important;
    min-width: 0 !important;
    padding: 0 0 12px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--mobile-deposits-border) !important;
  }
  html body #deposits-section#deposits-section#deposits-section .deposits-total-deposits .deposits-summary-title {
    color: var(--mobile-deposits-muted) !important;
    font-size: 13px !important;
    line-height: 1.3 !important;
    letter-spacing: 0 !important;
  }
  html body #deposits-section#deposits-section#deposits-section .deposits-total-deposits #total-deposits-embedded {
    color: var(--mobile-deposits-text) !important;
    font-size: 27px !important;
    line-height: 1.15 !important;
    font-weight: 800 !important;
  }
  html body #deposits-section#deposits-section#deposits-section .deposits-breakdown {
    display: block !important;
    min-width: 0 !important;
    padding: 12px 0 0 !important;
  }
  html body #deposits-section#deposits-section#deposits-section .deposits-breakdown > .panel-zone-title { display: none !important; }
  html body #deposits-section#deposits-section#deposits-section #deposits-money-invested-list {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    row-gap: 10px !important;
    width: 100% !important;
  }
  html body #deposits-section#deposits-section#deposits-section #deposits-money-invested-list .breakdown-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    gap: 1px !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 10px !important;
    border: 0 !important;
    border-left: 1px solid var(--mobile-deposits-border) !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  html body #deposits-section#deposits-section#deposits-section #deposits-money-invested-list .breakdown-item:nth-child(3n + 1) {
    padding-left: 0 !important;
    border-left: 0 !important;
  }
  html body #deposits-section#deposits-section#deposits-section #deposits-money-invested-list .breakdown-label {
    overflow: hidden !important;
    max-width: 100% !important;
    color: var(--mobile-deposits-muted) !important;
    font-size: 12px !important;
    line-height: 1.25 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  html body #deposits-section#deposits-section#deposits-section #deposits-money-invested-list .breakdown-value {
    color: var(--mobile-deposits-text) !important;
    font-size: 18px !important;
    line-height: 1.2 !important;
    font-weight: 750 !important;
    white-space: nowrap !important;
  }
  html body #deposits-section#deposits-section#deposits-section .deposits-history-card {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  html body #deposits-section#deposits-section#deposits-section .deposits-history-topbar {
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  html body #deposits-section#deposits-section#deposits-section .deposits-history-actions {
    display: grid !important;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr) !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    gap: 8px !important;
    width: 100% !important;
    margin: 0 !important;
  }
  html body #deposits-section#deposits-section#deposits-section .deposits-history-add-btn {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 48px !important;
    margin: 0 !important;
    padding: 0 8px !important;
    border-radius: 9px !important;
    font-size: 15px !important;
    white-space: nowrap !important;
  }
  html body #deposits-section#deposits-section#deposits-section .deposits-history-add-btn .deposits-primary-label { font-size: inherit !important; }
  html body #deposits-section#deposits-section#deposits-section .deposits-view-switch {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 48px !important;
    height: 48px !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
    overflow: hidden !important;
    border: 1px solid var(--mobile-deposits-border) !important;
    border-radius: 9px !important;
    background: var(--mobile-deposits-panel) !important;
    box-shadow: none !important;
  }
  html body #deposits-section#deposits-section#deposits-section .deposits-view-switch .allocation-option {
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 46px !important;
    height: 46px !important;
    margin: 0 !important;
    padding: 0 4px !important;
    gap: 5px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--mobile-deposits-text) !important;
    font-size: 14px !important;
    white-space: nowrap !important;
  }
  html body #deposits-section#deposits-section#deposits-section .deposits-view-switch .allocation-option + .allocation-option { border-left: 1px solid var(--mobile-deposits-border) !important; }
  html body #deposits-section#deposits-section#deposits-section .deposits-view-switch .allocation-option.active {
    background: color-mix(in srgb, var(--mobile-deposits-accent) 14%, transparent) !important;
    color: var(--mobile-deposits-accent) !important;
  }
  html body #deposits-section#deposits-section#deposits-section .deposits-view-switch .option-icon svg { width: 17px !important; height: 17px !important; }
  html body #deposits-section#deposits-section#deposits-section .deposits-table-scroll {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    overflow-x: hidden !important;
    border: 1px solid var(--mobile-deposits-border) !important;
    border-radius: 11px !important;
    background: var(--mobile-deposits-panel) !important;
  }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table,
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table thead,
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table tbody {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    table-layout: fixed !important;
  }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table col.deposits-col-exclude { width: 8% !important; }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table col.deposits-col-count { width: 0 !important; }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table col.deposits-col-date { width: 27% !important; }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table col.deposits-col-broker { width: 26% !important; }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table col.deposits-col-amount { width: 21% !important; }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table col.deposits-col-currency { width: 12% !important; }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table col.deposits-col-actions { width: 6% !important; }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table thead th,
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table tbody td {
    box-sizing: border-box !important;
    min-width: 0 !important;
    padding: 10px 3px !important;
    overflow: hidden !important;
    color: var(--mobile-deposits-text) !important;
    font-size: 11px !important;
    line-height: 1.25 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table thead th {
    height: 42px !important;
    color: var(--mobile-deposits-muted) !important;
    font-size: 10px !important;
  }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table tr > :nth-child(2) { display: none !important; }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table tr > :first-child { text-align: center !important; }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table :is(.column-filter-toggle, .deposits-header-info, .sort-icon) { display: none !important; }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table .deposit-row-select,
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    margin: 0 auto !important;
  }
  html body #deposits-section#deposits-section#deposits-section #deposits-pagination-wrapper {
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 10px !important;
    border: 1px solid var(--mobile-deposits-border) !important;
    border-radius: 10px !important;
    background: var(--mobile-deposits-panel) !important;
    color: var(--mobile-deposits-muted) !important;
  }
  html body #deposits-section#deposits-section#deposits-section #deposits-pagination-wrapper[style*="display: none"] { display: none !important; }
  html body #deposits-section#deposits-section#deposits-section #deposits-pagination-wrapper .monthly-pagination-left,
  html body #deposits-section#deposits-section#deposits-section #deposits-pagination-wrapper .monthly-pagination-right {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    width: 100% !important;
    margin: 0 !important;
  }
  html body #deposits-section#deposits-section#deposits-section #deposits-pagination-wrapper .monthly-pagination-left label { font-size: 12px !important; }
  html body #deposits-section#deposits-section#deposits-section #deposits-page-size { min-width: 58px !important; height: 34px !important; }
  html body #deposits-section#deposits-section#deposits-section #deposits-pagination-wrapper .monthly-page-btn {
    min-width: 32px !important;
    width: 32px !important;
    height: 34px !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  html body #deposits-section#deposits-section#deposits-section .deposits-chart-card {
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 12px !important;
    overflow: hidden !important;
    border: 1px solid var(--mobile-deposits-border) !important;
    border-radius: 12px !important;
    background: var(--mobile-deposits-panel) !important;
  }
  html body #deposits-section#deposits-section#deposits-section .deposits-chart-header {
    display: flex !important;
    justify-content: flex-end !important;
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
  }
  html body #deposits-section#deposits-section#deposits-section .deposits-chart-type-switch { height: 40px !important; min-height: 40px !important; }
  html body #deposits-section#deposits-section#deposits-section .deposits-chart-type-switch .allocation-option { min-width: 78px !important; height: 38px !important; min-height: 38px !important; }
  html body #deposits-section#deposits-section#deposits-section .deposits-chart-legend {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    width: 100% !important;
    margin: 0 !important;
    overflow: hidden !important;
    transform: none !important;
  }
  html body #deposits-section#deposits-section#deposits-section .deposits-chart-legend-item {
    display: inline-flex !important;
    flex: 0 1 auto !important;
    align-items: center !important;
    gap: 5px !important;
    min-width: 0 !important;
    color: var(--mobile-deposits-muted) !important;
    font-size: 10px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
  }
  html body #deposits-section#deposits-section#deposits-section .deposits-chart-legend-item > span:last-child { overflow: hidden !important; text-overflow: ellipsis !important; }
  html body #deposits-section#deposits-section#deposits-section .deposits-chart-canvas-wrap {
    box-sizing: border-box !important;
    width: 100% !important;
    height: 310px !important;
    min-height: 310px !important;
    max-height: 310px !important;
    margin: 0 !important;
  }
  html body #deposits-section#deposits-section#deposits-section .deposits-chart-canvas-wrap canvas { max-width: 100% !important; }
}

/* Shared mobile foundations for every non-dashboard application destination. */
@media (max-width: 760px) {
  html body:has(:is(#stocks-section.active, #sectors-section.active, #deposits-section.active, #withdrawals-section.active, #dividends-section.active, #stocks-gains-section.active, #taxes-section.active, #profile-section.active, #settings-section.active, #leaderboard-section.active, #admin-section.active)) > .container {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  html body.theme-blue:has(:is(#stocks-section.active, #sectors-section.active, #deposits-section.active, #withdrawals-section.active, #dividends-section.active, #stocks-gains-section.active, #taxes-section.active, #profile-section.active, #settings-section.active, #leaderboard-section.active, #admin-section.active)) {
    --mobile-page-gutter: 12px;
    --mobile-surface: var(--appearance-panel, #0f1d25);
    --mobile-outline: var(--appearance-border, #263a46);
    --mobile-ink: var(--appearance-text, #e8edf2);
    --mobile-muted-ink: var(--appearance-secondary, #a6b3c2);
    --mobile-accent: var(--appearance-teal, #25d5df);
    overflow-x: clip !important;
  }
  html body.theme-blue :is(#sectors-section, #withdrawals-section, #dividends-section, #stocks-gains-section, #taxes-section, #profile-section, #settings-section, #leaderboard-section, #admin-section).active {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 12px var(--mobile-page-gutter, 12px) 22px !important;
    gap: 12px !important;
  }
  html body.theme-blue :is(#sectors-section, #withdrawals-section, #dividends-section, #stocks-gains-section, #taxes-section, #profile-section, #settings-section, #leaderboard-section, #admin-section).active > *,
  html body.theme-blue :is(#sectors-section, #withdrawals-section, #dividends-section, #stocks-gains-section, #taxes-section, #profile-section, #settings-section, #leaderboard-section, #admin-section).active :is(section, article, main, header, form, fieldset, .panel, .card, .chart-container, .table-header, .table-toolbar, .page-header, .content-grid) {
    box-sizing: border-box !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  html body.theme-blue :is(#sectors-section, #withdrawals-section, #dividends-section, #stocks-gains-section, #taxes-section, #profile-section, #settings-section, #leaderboard-section, #admin-section).active :is(img, video, canvas, svg) {
    max-width: 100% !important;
  }
  html body.theme-blue :is(#sectors-section, #withdrawals-section, #dividends-section, #stocks-gains-section, #taxes-section, #profile-section, #settings-section, #leaderboard-section, #admin-section).active :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    box-sizing: border-box !important;
    max-width: 100% !important;
    min-width: 0 !important;
    font-size: 16px !important;
  }
  html body.theme-blue :is(#sectors-section, #withdrawals-section, #dividends-section, #stocks-gains-section, #taxes-section, #profile-section, #leaderboard-section, #admin-section).active .portfolio-summary-strip {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  html body.theme-blue :is(#sectors-section, #withdrawals-section, #dividends-section, #stocks-gains-section, #taxes-section, #profile-section, #leaderboard-section, #admin-section).active .portfolio-summary-item {
    box-sizing: border-box !important;
    min-width: 0 !important;
    min-height: 70px !important;
    padding: 10px !important;
    overflow: hidden !important;
  }
  html body.theme-blue :is(#sectors-section, #withdrawals-section, #dividends-section, #stocks-gains-section, #taxes-section, #profile-section, #leaderboard-section, #admin-section).active .portfolio-summary-label {
    font-size: 9px !important;
    line-height: 1.25 !important;
    white-space: normal !important;
  }
  html body.theme-blue :is(#sectors-section, #withdrawals-section, #dividends-section, #stocks-gains-section, #taxes-section, #profile-section, #leaderboard-section, #admin-section).active .portfolio-summary-value {
    font-size: clamp(15px, 4.7vw, 21px) !important;
    line-height: 1.15 !important;
    overflow-wrap: anywhere !important;
  }
  html body.theme-blue :is(#sectors-section, #withdrawals-section, #dividends-section, #stocks-gains-section, #taxes-section, #profile-section, #settings-section, #leaderboard-section, #admin-section).active :is(.table-scroll, .table-wrapper, .table-responsive, .withdrawals-table-scroll, .dividends-table-shell, .realized-pl-table-scroll, .taxes-table-wrap, .chart-history-table-wrap, .leaderboard-table, .admin-table-wrap, .admin-users-table, .admin-finance-table-wrap) {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    overscroll-behavior-x: contain !important;
    -webkit-overflow-scrolling: touch !important;
  }
  html body.theme-blue :is(#sectors-section, #withdrawals-section, #dividends-section, #stocks-gains-section, #taxes-section, #profile-section, #settings-section, #leaderboard-section, #admin-section).active :is(.table-scroll, .table-wrapper, .table-responsive, .withdrawals-table-scroll, .dividends-table-shell, .realized-pl-table-scroll, .taxes-table-wrap, .chart-history-table-wrap, .leaderboard-table, .admin-table-wrap, .admin-users-table, .admin-finance-table-wrap) > table {
    max-width: none !important;
    margin: 0 !important;
  }
  html body.theme-blue :is(#sectors-section, #withdrawals-section, #dividends-section, #stocks-gains-section, #taxes-section, #profile-section, #settings-section, #leaderboard-section, #admin-section).active :is(.table-header, .page-header, .dividends-page-actions, .dividends-page-action-row, .dividends-chart-controls, .leaderboard-filters, .admin-users-filters) {
    flex-wrap: wrap !important;
    gap: 8px !important;
    min-width: 0 !important;
  }
  html body.theme-blue :is(#sectors-section, #withdrawals-section, #dividends-section, #stocks-gains-section, #taxes-section, #profile-section, #settings-section, #leaderboard-section, #admin-section).active :is(button, [role="button"], .allocation-option) {
    min-height: 40px;
    touch-action: manipulation;
  }
  html body.theme-blue :is(#sectors-section, #withdrawals-section, #dividends-section, #stocks-gains-section, #taxes-section, #profile-section, #settings-section, #leaderboard-section, #admin-section).active :is(.chart-container, .panel, .card) {
    max-width: 100% !important;
  }

  /* Allocation, cash-flow and withdrawal summaries. */
  html body #sectors-section.active { align-items: stretch !important; justify-content: flex-start !important; }
  html body #sectors-section.active .allocation-switch-wrapper,
  html body #sectors-section.active .allocation-switch { box-sizing: border-box !important; width: 100% !important; min-width: 0 !important; }
  html body #sectors-section.active .allocation-switch { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  html body #sectors-section.active .allocation-option { min-width: 0 !important; padding-inline: 4px !important; font-size: 12px !important; }
  html body #sectors-section.active :is(.allocation-charts, .allocation-panels, .allocation-content, .allocation-chart-grid) { grid-template-columns: minmax(0, 1fr) !important; width: 100% !important; }
  html body #withdrawals-section.active .withdrawals-summary { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 8px !important; }
  html body #withdrawals-section.active .withdrawals-summary-item { min-width: 0 !important; padding: 10px 6px !important; }
  html body #withdrawals-section.active .withdrawals-summary-item .label { font-size: 10px !important; }
  html body #withdrawals-section.active .withdrawals-summary-item .value { font-size: clamp(14px, 4vw, 19px) !important; overflow-wrap: anywhere !important; }
  html body #withdrawals-section.active .withdrawals-table-header { justify-content: stretch !important; padding: 0 !important; }
  html body #withdrawals-section.active #add-withdrawal-btn { width: 100% !important; }
  html body #withdrawals-section.active table.withdrawals-redesign-table { min-width: 660px !important; }

  /* Dividends, realised P&L and taxes. */
  html body #dividends-section.active .dividends-chart-card { min-width: 0 !important; padding: 12px !important; }
  html body #dividends-section.active .dividends-chart-card-header { align-items: flex-start !important; flex-direction: column !important; gap: 10px !important; }
  html body #dividends-section.active .dividends-chart-controls { display: flex !important; flex-wrap: wrap !important; width: 100% !important; }
  html body #dividends-section.active .dividends-chart-controls .allocation-switch { max-width: 100% !important; }
  html body #dividends-section.active .dividends-chart-canvas-wrap { width: 100% !important; height: 280px !important; min-height: 280px !important; }
  html body #dividends-section.active .dividends-page-header--actions-only { padding: 0 !important; }
  html body #dividends-section.active .dividends-page-action-row { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; width: 100% !important; }
  html body #dividends-section.active .dividends-page-action-row > * { min-width: 0 !important; }
  html body #stocks-gains-section.active .realized-pl-summary { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px !important; }
  html body #stocks-gains-section.active .realized-pl-card { min-width: 0 !important; padding: 12px !important; }
  html body #stocks-gains-section.active table { min-width: 760px !important; }
  html body #taxes-section.active .taxes-panels { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; gap: 12px !important; }

  /* Settings navigation becomes a swipeable tab rail; content stays single-column. */
  html body #settings-section.active { padding: 8px 10px 22px !important; }
  html body #settings-section.active .settings-page.settings-page--control-center { display: flex !important; flex-direction: column !important; gap: 10px !important; width: 100% !important; max-width: none !important; }
  html body #settings-section.active .settings-side-panel { width: 100% !important; min-width: 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important; }
  html body #settings-section.active .settings-side-title { display: none !important; }
  html body #settings-section.active .settings-side-nav { display: flex !important; flex-wrap: nowrap !important; gap: 6px !important; width: 100% !important; overflow-x: auto !important; padding: 2px 0 8px !important; scrollbar-width: none !important; -webkit-overflow-scrolling: touch !important; }
  html body #settings-section.active .settings-side-nav::-webkit-scrollbar { display: none !important; }
  html body #settings-section.active .settings-side-link { flex: 0 0 auto !important; min-height: 38px !important; width: auto !important; padding: 0 10px !important; white-space: nowrap !important; font-size: 12px !important; }
  html body #settings-section.active .settings-side-icon { display: none !important; }
  html body #settings-section.active .settings-main-panel { width: 100% !important; min-width: 0 !important; padding: 12px 0 !important; }
  html body #settings-section.active .settings-view-header { display: flex !important; flex-direction: column !important; align-items: stretch !important; gap: 10px !important; }
  html body #settings-section.active .settings-view-header h1 { font-size: 22px !important; }
  html body #settings-section.active .settings-primary-action { width: 100% !important; }
  html body #settings-section.active :is(.settings-card-stack, .settings-card, .settings-content, .settings-platform-layout, .settings-form-section, .settings-section-fields--three, .settings-section-fields--two, .account-grid, .billing-panel, .chart-history-panel, .contact-form, .fi-formula-library) { width: 100% !important; max-width: 100% !important; min-width: 0 !important; }
  html body #settings-section.active :is(.settings-form-section, .settings-section-fields--three, .settings-section-fields--two, .account-grid) { grid-template-columns: minmax(0, 1fr) !important; }
  html body #settings-section.active .download-data-actions { flex-wrap: wrap !important; }
  html body #settings-section.active #contact-us-card .contact-form--reference { width: 100% !important; margin: 8px auto 0 !important; padding: 18px 14px !important; }

  /* Leaderboard and Admin internal navigation/tables. */
  html body #leaderboard-section.active .leaderboard-page-heading { align-items: flex-start !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; }
  html body #leaderboard-section.active .leaderboard-heading-art { width: 48px !important; height: 48px !important; flex: 0 0 48px !important; }
  html body #leaderboard-section.active .leaderboard-summary-grid,
  html body #leaderboard-section.active .leaderboard-top-cards { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; gap: 8px !important; width: 100% !important; }
  html body #leaderboard-section.active .leaderboard-table-toolbar { display: flex !important; flex-direction: column !important; align-items: stretch !important; gap: 10px !important; }
  html body #leaderboard-section.active .leaderboard-filters { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; }
  html body #leaderboard-section.active .leaderboard-table table { min-width: 920px !important; }
  html body #leaderboard-section.active #leaderboard-pagination-wrapper[style*="display: none"] { display: none !important; }
  html body #leaderboard-section.active #leaderboard-pagination-wrapper:not([style*="display: none"]) { display: flex !important; flex-direction: column !important; gap: 8px !important; }
  html body #admin-section.active .admin-layout { display: flex !important; flex-direction: column !important; gap: 10px !important; width: 100% !important; min-width: 0 !important; }
  html body #admin-section.active .admin-sidebar { width: 100% !important; min-width: 0 !important; padding: 8px !important; }
  html body #admin-section.active .admin-sidebar-header { display: none !important; }
  html body #admin-section.active .admin-sidebar-nav { display: flex !important; flex-wrap: nowrap !important; gap: 6px !important; overflow-x: auto !important; scrollbar-width: none !important; }
  html body #admin-section.active .admin-sidebar-nav::-webkit-scrollbar { display: none !important; }
  html body #admin-section.active .admin-side-item { flex: 0 0 auto !important; min-height: 38px !important; width: auto !important; padding: 0 10px !important; white-space: nowrap !important; }
  html body #admin-section.active .admin-side-item svg { width: 17px !important; height: 17px !important; flex-basis: 17px !important; }
  html body #admin-section.active .admin-main { width: 100% !important; min-width: 0 !important; padding: 12px !important; }
  html body #admin-section.active :is(.admin-view--users, .admin-view--analytics, .admin-view--finance, .admin-view--system, .admin-view--settings) { width: 100% !important; min-width: 0 !important; }
  html body #admin-section.active :is(.admin-users-table, .admin-finance-table, .admin-system-table) { min-width: 780px !important; }
}

@media (max-width: 420px) {
  html body #withdrawals-section.active .withdrawals-summary { grid-template-columns: 1fr !important; }
  html body #leaderboard-section.active .leaderboard-card-stats { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  html body #leaderboard-section.active .leaderboard-card-stats > div { min-width: 0 !important; padding-inline: 4px !important; }
  html body #leaderboard-section.active .leaderboard-card-stats :is(span, strong) { font-size: 10px !important; overflow-wrap: anywhere !important; }
}

/* Compact mobile pass requested for the non-Dashboard portfolio summaries and Settings. */
@media (max-width: 760px) {
  html body.theme-blue :is(#sectors-section, #withdrawals-section, #dividends-section, #stocks-gains-section, #taxes-section).active > .portfolio-summary-strip {
    display: none !important;
  }

  html body #settings-section#settings-section.active {
    display: block !important;
    box-sizing: border-box !important;
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 8px 12px 22px !important;
    overflow-x: clip !important;
  }
  html body #settings-section#settings-section.active > .settings-page.settings-page--control-center {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    align-items: start !important;
    gap: 10px !important;
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  html body #settings-section#settings-section.active .settings-side-panel {
    display: block !important;
    box-sizing: border-box !important;
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 8px !important;
    border: 1px solid var(--mobile-outline, #263a46) !important;
    background: var(--mobile-surface, #0f1d25) !important;
  }
  html body #settings-section#settings-section.active .settings-side-title { display: none !important; }
  html body #settings-section#settings-section.active .settings-side-nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 6px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 0 2px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    overscroll-behavior-x: contain !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
  }
  html body #settings-section#settings-section.active .settings-side-nav::-webkit-scrollbar { display: none !important; }
  html body #settings-section#settings-section.active .settings-side-link {
    box-sizing: border-box !important;
    display: inline-flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 80vw !important;
    min-height: 40px !important;
    margin: 0 !important;
    padding: 0 11px !important;
    border: 1px solid transparent !important;
    background: transparent !important;
    color: var(--mobile-muted-ink, #a6b3c2) !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
  }
  html body #settings-section#settings-section.active .settings-side-link.is-active {
    border-color: var(--mobile-outline, #263a46) !important;
    background: color-mix(in srgb, var(--mobile-accent, #25d5df) 13%, transparent) !important;
    color: var(--mobile-accent, #25d5df) !important;
  }
  html body #settings-section#settings-section.active .settings-side-icon { display: inline-grid !important; place-items: center !important; width: 16px !important; height: 16px !important; flex: 0 0 16px !important; }
  html body #settings-section#settings-section.active .settings-side-icon svg { width: 16px !important; height: 16px !important; }
  html body #settings-section#settings-section.active .settings-main-panel {
    display: block !important;
    box-sizing: border-box !important;
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 10px 0 0 !important;
    overflow: visible !important;
  }
  html body #settings-section#settings-section.active .settings-view-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 0 8px !important;
    padding: 0 0 10px !important;
    border-bottom: 1px solid var(--mobile-outline, #263a46) !important;
  }
  html body #settings-section#settings-section.active .settings-view-copy { flex: 1 1 auto !important; min-width: 0 !important; }
  html body #settings-section#settings-section.active .settings-breadcrumb { display: none !important; }
  html body #settings-section#settings-section.active #settings-page-title {
    display: block !important;
    max-width: 100% !important;
    margin: 0 !important;
    color: var(--mobile-ink, #e8edf2) !important;
    font-size: clamp(18px, 5vw, 22px) !important;
    line-height: 1.2 !important;
    overflow-wrap: anywhere !important;
  }
  html body #settings-section#settings-section.active #settings-page-subtitle {
    margin: 3px 0 0 !important;
    color: var(--mobile-muted-ink, #a6b3c2) !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
  }
  html body #settings-section#settings-section.active #settings-primary-action {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 40px !important;
    margin: 0 !important;
    padding: 0 11px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
  }
  html body #settings-section#settings-section.active .settings-view-rule { display: none !important; }
  html body #settings-section#settings-section.active .settings-card-stack,
  html body #settings-section#settings-section.active .settings-card,
  html body #settings-section#settings-section.active .settings-content,
  html body #settings-section#settings-section.active .settings-platform-layout {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-inline: 0 !important;
  }
  html body #settings-section#settings-section.active .settings-card-stack { display: grid !important; gap: 10px !important; }
  html body #settings-section#settings-section.active .settings-card { overflow: hidden !important; }
  html body #settings-section#settings-section.active .settings-content { padding: 12px !important; }
  html body #settings-section#settings-section.active .settings-form-section { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; gap: 10px !important; padding: 14px 0 !important; }
  html body #settings-section#settings-section.active .settings-section-fields--three,
  html body #settings-section#settings-section.active .settings-section-fields--two,
  html body #settings-section#settings-section.active .account-grid { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; gap: 10px !important; }
  html body #settings-section#settings-section.active :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) { width: 100% !important; max-width: 100% !important; min-width: 0 !important; font-size: 16px !important; }
  html body #settings-section#settings-section.active :is(.settings-actions, .settings-actions--platform, .account-actions, .download-data-actions) { display: flex !important; flex-wrap: wrap !important; gap: 8px !important; }
  html body #settings-section#settings-section.active :is(.settings-actions, .settings-actions--platform, .account-actions) > button { flex: 1 1 120px !important; min-width: 0 !important; }
  html body #settings-section#settings-section.active #contact-us-card .contact-form--reference { margin-top: 0 !important; }
}

@media (max-width: 390px) {
  html body #settings-section#settings-section.active .settings-view-header { align-items: flex-start !important; flex-direction: column !important; }
  html body #settings-section#settings-section.active .settings-header-actions { width: 100% !important; }
  html body #settings-section#settings-section.active .settings-header-actions > button { flex: 1 1 0 !important; min-width: 0 !important; }
}

/* Settings editor actions: keep Save and Cancel together and visible on mobile. */
html body #settings-section.banymay-settings .settings-header-actions {
  display: flex !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  min-width: 0 !important;
}
html body #settings-section.banymay-settings .settings-header-actions #settings-primary-action { width: auto !important; }
html body #settings-section.banymay-settings .settings-secondary-action {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 92px !important;
  min-height: 44px !important;
  padding: 0 16px !important;
  border: 1px solid var(--settings-compact-outline, #263a46) !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: var(--settings-compact-ink, #e8edf2) !important;
  font: inherit !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  cursor: pointer !important;
}
html body #settings-section.banymay-settings .settings-secondary-action[hidden] { display: none !important; }
@media (max-width: 760px) {
  html body #settings-section#settings-section.active .settings-header-actions { align-self: flex-start !important; }
  html body #settings-section#settings-section.active .settings-header-actions #settings-primary-action { width: auto !important; }
}

/* Mobile repair pass for the layouts shown in the latest screenshots. */
@media (max-width: 760px) {
  html body #settings-section#settings-section#settings-section.active {
    display: block !important;
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
    inset-inline: 0 !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 8px 12px 22px !important;
    overflow-x: clip !important;
  }
  html body #settings-section#settings-section#settings-section.active > .settings-page.settings-page--control-center,
  html body #settings-section#settings-section#settings-section.active > .settings-page.settings-page--control-center > * {
    position: relative !important;
    inset: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    float: none !important;
    box-sizing: border-box !important;
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-inline: 0 !important;
  }
  html body #settings-section#settings-section#settings-section.active > .settings-page.settings-page--control-center {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    justify-items: stretch !important;
  }
  html body #settings-section#settings-section#settings-section.active .settings-side-panel { grid-row: 1 !important; }
  html body #settings-section#settings-section#settings-section.active .settings-main-panel { grid-row: 2 !important; }

  /* These older pages use fixed desktop minimum heights/columns in their base styles. */
  html body #profile-section#profile-section.active {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    overflow-x: clip !important;
  }
  html body #profile-section#profile-section.active > .profile-page.banymay-my-plan {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    align-items: start !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 12px !important;
    overflow: visible !important;
  }
  html body #profile-section#profile-section.active .my-plan-sidebar {
    position: relative !important;
    inset: auto !important;
    align-self: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 10px !important;
  }
  html body #profile-section#profile-section.active .my-plan-sidebar-title {
    margin: 0 0 8px !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
  }
  html body #profile-section#profile-section.active .my-plan-nav {
    display: flex !important;
    grid-template-columns: none !important;
    flex-flow: row nowrap !important;
    gap: 6px !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 0 0 2px !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
  }
  html body #profile-section#profile-section.active .my-plan-nav::-webkit-scrollbar { display: none !important; }
  html body #profile-section#profile-section.active .my-plan-nav-item {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: 78vw !important;
    height: 42px !important;
    min-height: 42px !important;
    gap: 7px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
  }
  html body #profile-section#profile-section.active .my-plan-nav-icon { width: 20px !important; height: 20px !important; font-size: 19px !important; }
  html body #profile-section#profile-section.active .my-plan-main {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-content: start !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  html body #profile-section#profile-section.active .my-plan-heading {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
  }
  html body #profile-section#profile-section.active .my-plan-heading h1 { font-size: clamp(24px, 7vw, 32px) !important; line-height: 1.1 !important; overflow-wrap: anywhere !important; }
  html body #profile-section#profile-section.active .my-plan-heading p { margin: 3px 0 0 !important; font-size: 13px !important; line-height: 1.4 !important; }
  html body #profile-section#profile-section.active .my-plan-primary-action { width: 100% !important; max-width: 100% !important; min-width: 0 !important; min-height: 42px !important; margin: 0 !important; white-space: normal !important; }
  html body #profile-section#profile-section.active .my-plan-view,
  html body #profile-section#profile-section.active .my-plan-overview,
  html body #profile-section#profile-section.active .my-plan-projections,
  html body #profile-section#profile-section.active .my-plan-financial-independence {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
  }
  html body #profile-section#profile-section.active .rr-assumptions,
  html body #profile-section#profile-section.active .rr-summary { width: 100% !important; max-width: 100% !important; min-width: 0 !important; }
  html body #profile-section#profile-section.active .my-plan-kpis,
  html body #profile-section#profile-section.active .my-plan-middle-grid,
  html body #profile-section#profile-section.active .my-plan-lifestyle-grid,
  html body #profile-section#profile-section.active .my-plan-indicator-grid,
  html body #profile-section#profile-section.active .my-plan-detail-grid,
  html body #profile-section#profile-section.active .my-plan-detail-grid--retirement,
  html body #profile-section#profile-section.active .my-plan-projection-tabs,
  html body #profile-section#profile-section.active .my-plan-projection-assumptions,
  html body #profile-section#profile-section.active .my-plan-projection-results,
  html body #profile-section#profile-section.active .profile-main,
  html body #profile-section#profile-section.active .rr-kpi-strip,
  html body #profile-section#profile-section.active .rr-dashboard-grid,
  html body #profile-section#profile-section.active .rr-column,
  html body #profile-section#profile-section.active .rr-assumption-fields,
  html body #profile-section#profile-section.active .rr-assumption-guides {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    gap: 8px !important;
  }
  html body #profile-section#profile-section.active .my-plan-kpi-card,
  html body #profile-section#profile-section.active .my-plan-panel,
  html body #profile-section#profile-section.active .rr-panel,
  html body #profile-section#profile-section.active .rr-kpi {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 12px !important;
  }
  html body #profile-section#profile-section.active .my-plan-fi-metrics { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px !important; }
  html body #profile-section#profile-section.active .my-plan-fi-metrics > div + div { border: 0 !important; padding: 0 !important; }
  html body #profile-section#profile-section.active .my-plan-retirement-row { grid-template-columns: 24px minmax(0, 1fr) auto !important; gap: 8px !important; min-width: 0 !important; }
  html body #profile-section#profile-section.active .my-plan-retirement-row strong { white-space: normal !important; text-align: right !important; }
  html body #profile-section#profile-section.active .rr-kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  html body #profile-section#profile-section.active .rr-kpi { padding: 10px !important; }
  html body #profile-section#profile-section.active :is(table, .table-scroll, .table-responsive) { max-width: 100% !important; }

  /* The dividend chart header and controls had large desktop spacing; keep the plot visible. */
  html body #dividends-section#dividends-section.active .dividends-chart-card {
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 0 10px !important;
    padding: 12px !important;
  }
  html body #dividends-section#dividends-section.active .dividends-chart-card-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    margin: 0 0 8px !important;
  }
  html body #dividends-section#dividends-section.active .dividends-chart-card-header h2 { margin: 0 !important; font-size: 22px !important; line-height: 1.15 !important; }
  html body #dividends-section#dividends-section.active .dividends-chart-controls {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    align-items: center !important;
    justify-content: stretch !important;
    gap: 7px !important;
    width: 100% !important;
    margin: 0 !important;
  }
  html body #dividends-section#dividends-section.active .dividends-chart-period-switch { grid-column: 1 / -1 !important; }
  html body #dividends-section#dividends-section.active .dividends-chart-controls .dividends-segment {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 40px !important;
    margin: 0 !important;
  }
  html body #dividends-section#dividends-section.active .dividends-chart-period-switch { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  html body #dividends-section#dividends-section.active .dividends-chart-controls .allocation-option { min-width: 0 !important; padding-inline: 5px !important; font-size: 12px !important; }
  html body #dividends-section#dividends-section.active .dividends-show-above-control { display: grid !important; grid-column: 1 / -1 !important; grid-template-columns: auto minmax(0, 1fr) !important; align-items: center !important; gap: 8px !important; width: 100% !important; margin: 0 !important; }
  html body #dividends-section#dividends-section.active .dividends-show-above-control .settings-select { width: 100% !important; min-width: 0 !important; }
  html body #dividends-section#dividends-section.active .dividends-chart-title { display: none !important; }
  html body #dividends-section#dividends-section.active .dividends-chart-canvas-wrap {
    position: relative !important;
    width: 100% !important;
    height: clamp(210px, 58vw, 270px) !important;
    min-height: 0 !important;
    max-height: 270px !important;
    margin: 6px 0 0 !important;
  }
  html body #dividends-section#dividends-section.active #dividendsChart { width: 100% !important; height: 100% !important; max-height: 270px !important; }
  html body #dividends-section#dividends-section.active #floating-add-dividend-btn { display: none !important; }
  html body #dividends-section#dividends-section.active .dividends-page-header--actions-only { margin: 0 0 8px !important; padding: 0 !important; }
  html body #dividends-section#dividends-section.active .dividends-page-action-row { gap: 7px !important; }

  /* A viewport-fixed build stamp obscures charts and controls on small screens. */
  html body > div[style*="position: fixed"][style*="z-index: 9999"] { display: none !important; }
}

/* Light-theme cleanup for legacy dark surfaces and saturated blue/green controls. */
html[data-appearance="light"][data-appearance="light"] body.theme-blue #deposits-section.deposits-redesign-page :is(.deposits-history-card, #deposits-table-view, .deposits-table-scroll, table.deposits-redesign-table, table.deposits-redesign-table > thead, table.deposits-redesign-table > thead > tr, table.deposits-redesign-table > thead > tr > th) {
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
  color: #193857 !important;
  border-color: #dce8f1 !important;
  box-shadow: none !important;
}
html[data-appearance="light"][data-appearance="light"] body.theme-blue #deposits-section.deposits-redesign-page table.deposits-redesign-table > thead > tr > th {
  color: #607c99 !important;
  border-bottom: 1px solid #dce8f1 !important;
}
html[data-appearance="light"][data-appearance="light"] body.theme-blue #sectors-section .allocation-switch {
  border: 1px solid #dce8f1 !important;
  background: #ffffff !important;
  box-shadow: 0 3px 12px rgba(55, 100, 133, .06) !important;
  backdrop-filter: none !important;
}
html[data-appearance="light"][data-appearance="light"] body.theme-blue #sectors-section .allocation-switch .switch-glow {
  background: #e5f6f4 !important;
  border: 1px solid #c5eae5 !important;
  box-shadow: none !important;
}
html[data-appearance="light"][data-appearance="light"] body.theme-blue #sectors-section .allocation-switch .allocation-option { color: #536f8a !important; text-shadow: none !important; }
html[data-appearance="light"][data-appearance="light"] body.theme-blue #sectors-section .allocation-switch .allocation-option.active { color: #008f89 !important; }

html[data-appearance="light"][data-appearance="light"] body.theme-blue #stocks-gains-section #stocks-gains-table thead,
html[data-appearance="light"][data-appearance="light"] body.theme-blue #stocks-gains-section #stocks-gains-table thead tr,
html[data-appearance="light"][data-appearance="light"] body.theme-blue #stocks-gains-section #stocks-gains-table thead th {
  background: #f2f7fb !important;
  background-color: #f2f7fb !important;
  background-image: none !important;
  color: #5e7993 !important;
  border-color: #dce8f1 !important;
  box-shadow: none !important;
  text-shadow: none !important;
}
html[data-appearance="light"][data-appearance="light"] body.theme-blue #stocks-gains-section #stocks-gains-table thead th { border-bottom: 1px solid #dce8f1 !important; }

html[data-appearance="light"][data-appearance="light"] body.theme-blue #dividends-section.dividends-page :is(#monthly-broker-filter, #dividends-show-above-select) {
  appearance: none !important;
  -webkit-appearance: none !important;
  background-color: #f7fafc !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23607c99' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 14px 14px !important;
  border: 1px solid #d8e5ee !important;
  border-radius: 8px !important;
  color: #193857 !important;
  box-shadow: 0 2px 7px rgba(45, 87, 119, .05) !important;
}
html[data-appearance="light"][data-appearance="light"] body.theme-blue #dividends-section.dividends-page :is(#monthly-broker-filter, #dividends-show-above-select) option {
  background: #ffffff !important;
  color: #193857 !important;
}

/* Stocks in Light: teal portfolio totals and quiet two-tone rows like Dashboard breakdown. */
html[data-appearance="light"][data-appearance="light"] body.theme-blue #stocks-section.stocks-redesign-page #stocks-summary-balance {
  color: #009e89 !important;
}
html[data-appearance="light"][data-appearance="light"] body.theme-blue #stocks-section.stocks-redesign-page #stocks-tbody > tr:nth-child(odd) {
  background: #f5f9fc !important;
  background-color: #f5f9fc !important;
  background-image: none !important;
  border-bottom-color: #e4edf4 !important;
  box-shadow: none !important;
}
html[data-appearance="light"][data-appearance="light"] body.theme-blue #stocks-section.stocks-redesign-page #stocks-tbody > tr:nth-child(even) {
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
  border-bottom-color: #e4edf4 !important;
  box-shadow: none !important;
}
html[data-appearance="light"][data-appearance="light"] body.theme-blue #stocks-section.stocks-redesign-page #stocks-tbody > tr > td {
  background: transparent !important;
  background-image: none !important;
}
html[data-appearance="light"][data-appearance="light"] body.theme-blue #stocks-section.stocks-redesign-page #stocks-tbody > tr:hover {
  background: #edf6f8 !important;
  background-color: #edf6f8 !important;
}
html[data-appearance="light"][data-appearance="light"] body.theme-blue #stocks-section.stocks-redesign-page #stocks-tbody td[data-field="allocation"] {
  color: #009e89 !important;
  text-shadow: none !important;
  filter: none !important;
}

/* Cash Flow rows: give every label the same left edge in both themes. */
html body #dashboard-section#dashboard-section#dashboard-section .dashboard-cash-flow .metric-row .metric-label {
  flex: 1 1 auto !important;
  max-width: none !important;
  text-align: left !important;
}

/* Allocation tabs: center four equal-width options and make the active underline visible. */
html body #sectors-section#sectors-section#sectors-section .allocation-switch-wrapper {
  display: flex !important;
  justify-content: center !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
html body #sectors-section#sectors-section#sectors-section .allocation-switch {
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  width: min(100%, 1328px) !important;
  max-width: 1328px !important;
  min-width: 0 !important;
  padding: 0 !important;
  gap: 0 !important;
  overflow: hidden !important;
  border-radius: 8px !important;
}
html body #sectors-section#sectors-section#sectors-section .allocation-switch .switch-glow {
  display: none !important;
}
html body #sectors-section#sectors-section#sectors-section .allocation-switch .allocation-option {
  box-sizing: border-box !important;
  display: flex !important;
  justify-content: center !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 46px !important;
  padding: 8px 12px !important;
  border: 0 !important;
  border-bottom: 3px solid transparent !important;
  border-radius: 0 !important;
  text-align: center !important;
  white-space: nowrap !important;
}
html body #sectors-section#sectors-section#sectors-section .allocation-switch .allocation-option + .allocation-option {
  border-left: 1px solid rgba(120, 150, 175, .22) !important;
}
html body #sectors-section#sectors-section#sectors-section .allocation-switch .allocation-option.active {
  border-bottom-color: #25d5df !important;
  background: rgba(37, 213, 223, .1) !important;
  color: #25d5df !important;
  text-shadow: none !important;
}
html[data-appearance="light"] body #sectors-section#sectors-section#sectors-section .allocation-switch .allocation-option.active {
  border-bottom-color: #00aaa5 !important;
  background: #e5f6f4 !important;
  color: #008f89 !important;
}

/* Cash Flow: lock all three rows to identical icon, label, and value columns. */
html body #dashboard-section#dashboard-section#dashboard-section .dashboard-cash-flow .metric-row {
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) max-content !important;
  column-gap: 14px !important;
  justify-content: initial !important;
  align-items: center !important;
}
html body #dashboard-section#dashboard-section#dashboard-section .dashboard-cash-flow .metric-row > .dashboard-cash-icon {
  grid-column: 1 !important;
  justify-self: start !important;
}
html body #dashboard-section#dashboard-section#dashboard-section .dashboard-cash-flow .metric-row > .metric-label {
  grid-column: 2 !important;
  justify-self: start !important;
  text-align: left !important;
}
html body #dashboard-section#dashboard-section#dashboard-section .dashboard-cash-flow .metric-row > .metric-value {
  grid-column: 3 !important;
  justify-self: end !important;
  text-align: right !important;
}
@media (max-width: 760px) {
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-cash-flow .metric-row {
    grid-template-columns: 34px minmax(0, 1fr) max-content !important;
    column-gap: 8px !important;
  }
}

/* All page info-bar Portfolio Balance figures use one teal in both themes. */
html body.theme-blue #dashboard-section#dashboard-section#dashboard-section #dashboard-summary-balance,
html body.theme-blue #stocks-section#stocks-section#stocks-section #stocks-summary-balance,
html body.theme-blue #sectors-section#sectors-section#sectors-section #allocation-summary-balance,
html body.theme-blue #deposits-section#deposits-section#deposits-section #deposits-summary-balance,
html body.theme-blue #withdrawals-section#withdrawals-section#withdrawals-section #withdrawals-summary-balance,
html body.theme-blue #dividends-section#dividends-section#dividends-section #dividends-summary-balance,
html body.theme-blue #stocks-gains-section#stocks-gains-section#stocks-gains-section #stock-gains-summary-balance,
html body.theme-blue #taxes-section#taxes-section#taxes-section #taxes-summary-balance {
  color: #25d5df !important;
  text-shadow: none !important;
  filter: none !important;
}

/* Final cascade: the Dashboard top balance matches Breakdown in Light too. */
html[data-appearance="light"][data-appearance="light"] body.theme-blue #dashboard-section#dashboard-section#dashboard-section #dashboard-summary-balance {
  color: #25d5df !important;
  text-shadow: none !important;
  filter: none !important;
}

/* Final paid-billing layout: real separate rows, no overlay layers over content. */
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-overview-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 26px !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-hero {
  position: relative !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px) !important;
  grid-template-rows: 28px minmax(100px, 1fr) !important;
  align-items: center !important;
  gap: 12px 24px !important;
  min-height: 196px !important;
  padding: 24px 32px !important;
  border: 1px solid #174252 !important;
  border-radius: 12px !important;
  background: linear-gradient(112deg, #0b2534 0%, #0d202d 58%, #0a1d28 100%) !important;
  box-shadow: none !important;
  overflow: visible !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-hero::before,
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-hero::after,
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-hero-glow {
  display: none !important;
  content: none !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-kicker {
  grid-column: 1 !important;
  grid-row: 1 !important;
  justify-self: start !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-status-pill {
  grid-column: 2 !important;
  grid-row: 1 !important;
  justify-self: end !important;
  margin: 0 !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-plan-copy {
  grid-column: 1 !important;
  grid-row: 2 !important;
  max-width: 620px !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-price-block {
  grid-column: 2 !important;
  grid-row: 2 !important;
  justify-self: end !important;
  width: 184px !important;
  min-height: 88px !important;
  box-sizing: border-box !important;
  padding: 12px 18px !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-actions {
  position: static !important;
  display: grid !important;
  grid-template-columns: max-content max-content minmax(0, 1fr) max-content !important;
  grid-template-rows: 52px !important;
  align-items: center !important;
  gap: 16px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 32px !important;
  box-sizing: border-box !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid #billing-manage-btn {
  grid-column: 1 !important;
  grid-row: 1 !important;
  min-width: 190px !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid #billing-cancel-btn {
  grid-column: 2 !important;
  grid-row: 1 !important;
  min-width: 232px !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-footnotes {
  grid-column: 4 !important;
  grid-row: 1 !important;
  justify-content: flex-end !important;
  gap: 12px !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-expired-features {
  margin-top: 20px !important;
  border-radius: 0 !important;
  background: rgba(7, 32, 45, .72) !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-feature-icon {
  flex-basis: 68px !important;
  width: 68px !important;
  height: 68px !important;
  background: rgba(12, 99, 124, .22) !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-expired-security {
  margin-top: 10px !important;
  border-radius: 0 !important;
}
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-hero {
  border-color: #d7e7ed !important;
  background: linear-gradient(112deg, #ffffff 0%, #f8fbfd 58%, #f1f8fa 100%) !important;
}
@media (max-width: 1050px) {
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-hero {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 240px) !important;
    min-height: 196px !important;
  }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-actions {
    grid-template-columns: max-content max-content minmax(0, 1fr) !important;
    padding: 0 20px !important;
  }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-footnotes {
    grid-column: 3 !important;
    justify-content: flex-end !important;
    flex-wrap: wrap !important;
  }
}
@media (max-width: 680px) {
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-hero {
    grid-template-columns: minmax(0, 1fr) max-content !important;
    grid-template-rows: auto auto auto !important;
    min-height: 0 !important;
    gap: 16px !important;
    padding: 20px !important;
  }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-plan-copy {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
  }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-price-block {
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
    justify-self: start !important;
  }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-actions {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto !important;
    gap: 10px !important;
    padding: 0 20px !important;
  }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid #billing-manage-btn,
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid #billing-cancel-btn,
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-footnotes {
    grid-column: 1 !important;
    grid-row: auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-footnotes {
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
  }
}

/* Paid billing state: match the supplied active-subscription layout. */
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-hero {
  position: relative !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px) !important;
  grid-template-rows: 28px minmax(100px, 1fr) 52px !important;
  align-items: center !important;
  gap: 12px 24px !important;
  min-height: 276px !important;
  padding: 24px 32px 20px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-hero::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 0 80px !important;
  border: 1px solid #174252 !important;
  border-radius: 12px !important;
  background: linear-gradient(112deg, #0b2534 0%, #0d202d 58%, #0a1d28 100%) !important;
  pointer-events: none !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-hero::after {
  content: "" !important;
  position: absolute !important;
  z-index: 1 !important;
  top: 64px !important;
  bottom: 112px !important;
  left: 67% !important;
  width: 1px !important;
  background: #183b4b !important;
  pointer-events: none !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-hero > :not(.billing-hero-glow) {
  position: relative !important;
  z-index: 2 !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid :is(.billing-kicker,.billing-status-pill,.billing-plan-copy,.billing-price-block,.billing-actions) {
  position: relative !important;
  z-index: 2 !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-kicker {
  grid-column: 1 !important;
  grid-row: 1 !important;
  justify-self: start !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-status-pill {
  grid-column: 2 !important;
  grid-row: 1 !important;
  justify-self: end !important;
  margin: 0 !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-plan-copy {
  grid-column: 1 !important;
  grid-row: 2 !important;
  max-width: 620px !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-price-block {
  grid-column: 2 !important;
  grid-row: 2 !important;
  justify-self: end !important;
  width: 184px !important;
  min-height: 88px !important;
  box-sizing: border-box !important;
  padding: 12px 18px !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-actions {
  grid-column: 1 / -1 !important;
  grid-row: 3 !important;
  display: grid !important;
  grid-template-columns: max-content max-content minmax(0, 1fr) max-content !important;
  grid-template-rows: 52px !important;
  align-items: center !important;
  gap: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid #billing-manage-btn {
  grid-column: 1 !important;
  grid-row: 1 !important;
  min-width: 190px !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid #billing-cancel-btn {
  grid-column: 2 !important;
  grid-row: 1 !important;
  min-width: 232px !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-footnotes {
  grid-column: 4 !important;
  grid-row: 1 !important;
  justify-content: flex-end !important;
  gap: 12px !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-expired-features {
  margin-top: 20px !important;
  border-radius: 0 !important;
  background: rgba(7, 32, 45, .72) !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-feature-icon {
  flex-basis: 68px !important;
  width: 68px !important;
  height: 68px !important;
  background: rgba(12, 99, 124, .22) !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-expired-security {
  margin-top: 10px !important;
  border-radius: 0 !important;
}
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-hero::before {
  border-color: #d7e7ed !important;
  background: linear-gradient(112deg, #ffffff 0%, #f8fbfd 58%, #f1f8fa 100%) !important;
}
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-hero::after {
  background: #dce8f1 !important;
}
@media (max-width: 1050px) {
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-hero {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 240px) !important;
    grid-template-rows: 28px minmax(100px, 1fr) auto auto !important;
    min-height: 340px !important;
  }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-hero::before {
    inset: 0 0 80px !important;
  }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-hero::after {
    display: none !important;
  }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-plan-copy { grid-column: 1 !important; }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-price-block { grid-column: 2 !important; }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-actions {
    grid-column: 1 / -1 !important;
    grid-row: 3 / 5 !important;
    grid-template-columns: max-content max-content !important;
    grid-template-rows: 52px 40px !important;
    align-content: end !important;
  }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-footnotes {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    justify-content: flex-start !important;
  }
}
@media (max-width: 680px) {
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-hero {
    grid-template-columns: minmax(0, 1fr) max-content !important;
    grid-template-rows: auto auto auto auto !important;
    gap: 16px !important;
    min-height: 0 !important;
    padding: 20px !important;
  }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-hero::before { inset: 0 0 0 !important; }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-kicker { grid-column: 1 !important; grid-row: 1 !important; }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-status-pill { grid-column: 2 !important; grid-row: 1 !important; }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-plan-copy { grid-column: 1 / -1 !important; grid-row: 2 !important; }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-price-block {
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
    justify-self: start !important;
  }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-actions {
    grid-column: 1 / -1 !important;
    grid-row: 4 !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto auto auto !important;
  }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid #billing-manage-btn,
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid #billing-cancel-btn,
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-footnotes {
    grid-column: 1 !important;
    grid-row: auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-footnotes { flex-wrap: wrap !important; justify-content: flex-start !important; }
}

/* Subscription & Billing finishing touches: lifetime price and expired CTA alignment. */
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-lifetime .billing-price-block,
html body #settings-section#settings-section#settings-section #billing-panel.billing-lifetime .billing-price-block {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: baseline !important;
  justify-content: center !important;
  gap: 8px !important;
  white-space: nowrap !important;
}
html body #settings-section#settings-section#settings-section #billing-panel:is(.billing-state-lifetime,.billing-lifetime) .billing-price,
html body #settings-section#settings-section#settings-section #billing-panel:is(.billing-state-lifetime,.billing-lifetime) .billing-price-period {
  display: inline-block !important;
  white-space: nowrap !important;
  margin: 0 !important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-expired-hero-icon,
html body #settings-section#settings-section#settings-section #billing-panel .billing-expired-features header h3 > svg {
  display: none !important;
}
@media (min-width: 1051px) {
  html body #settings-section#settings-section#settings-section #billing-panel:is(.billing-trial-expired,.billing-state-trial-expired) .billing-status-pill {
    grid-column: 3 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    margin: 0 !important;
  }
  html body #settings-section#settings-section#settings-section #billing-panel:is(.billing-trial-expired,.billing-state-trial-expired) :is(#billing-subscribe-btn,#billing-resubscribe-btn) {
    width: 100% !important;
    box-sizing: border-box !important;
  }
}
@media (max-width: 1050px) {
  html body #settings-section#settings-section#settings-section #billing-panel:is(.billing-trial-expired,.billing-state-trial-expired) .billing-status-pill {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    margin: 0 !important;
  }
}
@media (max-width: 680px) {
  html body #settings-section#settings-section#settings-section #billing-panel:is(.billing-trial-expired,.billing-state-trial-expired) .billing-status-pill {
    grid-column: 1 !important;
    justify-self: end !important;
  }
}

/* Account Settings and Subscription: card groups separated by theme surface. */
html body #settings-section#settings-section.banymay-settings #account-settings-card .settings-content,
html body #settings-section#settings-section.banymay-settings #billing-settings-card .settings-content {
  box-sizing: border-box !important;
  padding: 16px !important;
  background: #0b171e !important;
}
html body #settings-section#settings-section.banymay-settings #account-settings-card .settings-account-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 14px !important;
  margin: 0 !important;
  background: transparent !important;
}
html body #settings-section#settings-section.banymay-settings #account-settings-card .settings-form-section {
  box-sizing: border-box !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 22px 24px !important;
  border: 1px solid #20333d !important;
  border-radius: 12px !important;
  background: #101d25 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .12) !important;
}
html body #settings-section#settings-section.banymay-settings #account-settings-card .settings-section-intro {
  min-height: 0 !important;
}
html body #settings-section#settings-section.banymay-settings #account-settings-card .account-actions {
  grid-column: 1 / -1 !important;
  margin: 0 !important;
  padding: 4px 0 0 !important;
}
html body #settings-section#settings-section.banymay-settings #billing-settings-card #billing-panel {
  box-sizing: border-box !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
html body #settings-section#settings-section.banymay-settings #billing-settings-card #billing-panel .billing-hero,
html body #settings-section#settings-section.banymay-settings #billing-settings-card #billing-panel .billing-expired-features,
html body #settings-section#settings-section.banymay-settings #billing-settings-card #billing-panel .billing-expired-security,
html body #settings-section#settings-section.banymay-settings #billing-settings-card #billing-panel .billing-alert {
  border-radius: 12px !important;
}
html[data-appearance="light"] body #settings-section#settings-section.banymay-settings #account-settings-card .settings-content,
html[data-appearance="light"] body #settings-section#settings-section.banymay-settings #billing-settings-card .settings-content {
  background: #f2f7fb !important;
}
html[data-appearance="light"] body #settings-section#settings-section.banymay-settings #account-settings-card .settings-form-section {
  border-color: #dfeaf3 !important;
  background: #ffffff !important;
  box-shadow: 0 4px 14px rgba(107, 142, 170, .08) !important;
}
@media (max-width: 760px) {
  html body #settings-section#settings-section.banymay-settings #account-settings-card .settings-content,
  html body #settings-section#settings-section.banymay-settings #billing-settings-card .settings-content {
    padding: 10px !important;
  }
  html body #settings-section#settings-section.banymay-settings #account-settings-card .settings-form-section {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
    padding: 16px !important;
  }
  html body #settings-section#settings-section.banymay-settings #account-settings-card .settings-section-intro {
    padding-right: 0 !important;
    border-right: 0 !important;
  }
}

/* Platform settings: separate each preference group into its own card. */
html body #settings-section#settings-section.banymay-settings #platform-settings-card .settings-content {
  box-sizing: border-box !important;
  padding: 16px !important;
  background: #0b171e !important;
}
html body #settings-section#settings-section.banymay-settings #platform-settings-card .settings-platform-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 14px !important;
  margin: 0 !important;
  background: transparent !important;
}
html body #settings-section#settings-section.banymay-settings #platform-settings-card .settings-form-section {
  box-sizing: border-box !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 22px 24px !important;
  border: 1px solid #20333d !important;
  border-radius: 12px !important;
  background: #101d25 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .12) !important;
}
html body #settings-section#settings-section.banymay-settings #platform-settings-card .settings-section-intro {
  min-height: 0 !important;
}
html body #settings-section#settings-section.banymay-settings #platform-settings-card .settings-actions--platform,
html body #settings-section#settings-section.banymay-settings #platform-settings-card .settings-meta {
  grid-column: 1 / -1 !important;
}
html[data-appearance="light"] body #settings-section#settings-section.banymay-settings #platform-settings-card .settings-content {
  background: #f2f7fb !important;
}
html[data-appearance="light"] body #settings-section#settings-section.banymay-settings #platform-settings-card .settings-form-section {
  border-color: #dfeaf3 !important;
  background: #ffffff !important;
  box-shadow: 0 4px 14px rgba(107, 142, 170, .08) !important;
}
@media (max-width: 760px) {
  html body #settings-section#settings-section.banymay-settings #platform-settings-card .settings-content {
    padding: 10px !important;
  }
  html body #settings-section#settings-section.banymay-settings #platform-settings-card .settings-form-section {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
    padding: 16px !important;
  }
  html body #settings-section#settings-section.banymay-settings #platform-settings-card .settings-section-intro {
    padding-right: 0 !important;
    border-right: 0 !important;
  }
}

/* Subscription & Billing: premium card layout shared by every account status. */
html body #settings-section#settings-section#settings-section #billing-panel { display:grid!important; gap:16px!important; color:#e8f1f5!important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-overview-grid { display:block!important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-hero {
  display:grid!important; grid-template-columns:minmax(0,1fr) minmax(150px,205px) minmax(220px,270px)!important;
  grid-template-rows:auto 1fr!important; align-items:center!important; gap:14px 24px!important; min-height:184px!important;
  padding:20px 26px!important; border:1px solid #174252!important; border-radius:13px!important;
  background:linear-gradient(112deg,#0b2534,#0d202d 58%,#0a1d28)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025)!important; overflow:visible!important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-hero-top { grid-column:1/-1!important; grid-row:1!important; align-self:start!important; margin:0!important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-kicker {
  padding:7px 14px!important; border:1px solid rgba(37,213,223,.25)!important; border-radius:2px!important;
  background:rgba(14,119,145,.16)!important; color:#25d5df!important; font-size:13px!important; letter-spacing:.04em!important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-status-pill { position:static!important; margin-left:auto!important; padding:7px 14px!important; border-radius:2px!important; font-size:13px!important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-hero-main { display:contents!important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-plan-copy { grid-column:1!important; grid-row:2!important; max-width:580px!important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-plan-copy h3 { margin:0 0 8px!important; color:#f2f7fa!important; font-size:24px!important; line-height:1.2!important; font-weight:700!important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-plan-copy p { margin:0!important; color:#bbced9!important; font-size:16px!important; line-height:1.5!important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-price-block {
  grid-column:2!important; grid-row:2!important; min-width:0!important; margin:0!important; padding:14px 16px!important;
  border:1px solid #1c3a49!important; border-radius:2px!important; background:rgba(3,14,22,.34)!important; text-align:right!important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-price { color:#f4f8fa!important; font-size:30px!important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-price-period { color:#b4c7d2!important; font-size:14px!important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-actions {
  grid-column:3!important; grid-row:2!important; position:static!important; display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr))!important;
  align-content:center!important; align-items:center!important; gap:10px!important; margin:0!important; padding:0!important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-actions:has(#billing-subscribe-btn[style*="inline-flex"]) #billing-subscribe-btn,
html body #settings-section#settings-section#settings-section #billing-panel .billing-actions:has(#billing-resubscribe-btn[style*="inline-flex"]) #billing-resubscribe-btn { grid-column:1/-1!important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-actions .billing-btn { min-width:0!important; min-height:52px!important; padding:0 14px!important; border-radius:3px!important; font-size:15px!important; white-space:normal!important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-footnotes { grid-column:1/-1!important; display:flex!important; justify-content:center!important; gap:7px!important; margin:0!important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-footnotes span { padding:7px 9px!important; border:1px solid rgba(35,201,207,.2)!important; border-radius:2px!important; background:rgba(7,75,76,.18)!important; color:#c4d8df!important; font-size:12px!important; white-space:nowrap!important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-alert { border-radius:3px!important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-expired-features {
  display:block!important; padding:20px 24px 22px!important; border:1px solid #173e4c!important; border-radius:3px!important; background:rgba(7,32,45,.72)!important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-expired-features header { margin-bottom:18px!important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-expired-features h3 { color:#f0f6f9!important; font-size:21px!important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-expired-features header p,
html body #settings-section#settings-section#settings-section #billing-panel .billing-feature-grid p { color:#b1c7d3!important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-feature-grid h4 { color:#eef5f8!important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-feature-icon { flex-basis:58px!important; height:58px!important; border:0!important; border-radius:2px!important; background:rgba(12,99,124,.22)!important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-expired-security {
  display:flex!important; align-items:center!important; gap:18px!important; padding:18px 22px!important;
  border:1px solid #173e4c!important; border-radius:3px!important; background:rgba(7,32,45,.72)!important; color:#bfd1dc!important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-expired-security>div { flex:1 1 auto!important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-expired-security strong { color:#25d5df!important; }
html body #settings-section#settings-section#settings-section #billing-panel:is(.billing-state-trial,.billing-state-paid,.billing-state-lifetime) .billing-status-pill { border-color:rgba(52,211,153,.45)!important; background:rgba(52,211,153,.12)!important; color:#58e8b0!important; }
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-trial-expired .billing-status-pill { border-color:rgba(255,104,112,.45)!important; background:rgba(255,92,102,.12)!important; color:#ff969d!important; }
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-lifetime .billing-price-block { border-color:rgba(37,213,223,.35)!important; background:rgba(18,104,107,.13)!important; }
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-lifetime .billing-price { color:#43dbd3!important; }

html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-hero { border-color:#d7e7ed!important; background:linear-gradient(112deg,#fff,#f8fbfd 58%,#f1f8fa)!important; box-shadow:0 5px 20px rgba(35,84,115,.055)!important; }
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-kicker { border-color:#c5e9e5!important; background:#e8f8f5!important; color:#008f89!important; }
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-plan-copy h3,
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-expired-features h3,
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-feature-grid h4 { color:#183554!important; }
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-plan-copy p,
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-expired-features header p,
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-feature-grid p { color:#607c99!important; }
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-price-block { border-color:#dce8f1!important; background:#fff!important; }
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-price,
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-price-current { color:#183554!important; }
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-price-period { color:#607c99!important; }
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-expired-features,
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-expired-security { border-color:#dce8f1!important; background:#fff!important; color:#607c99!important; }
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-feature-icon { background:#e9f6f8!important; }
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-expired-security strong { color:#008f89!important; }
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-status-pill.active,
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-status-pill.paid,
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-status-pill.trialing { border-color:#b5e3d3!important; background:#e9f8f1!important; color:#087d5c!important; }
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-status-pill.expired { border-color:#f2c9ce!important; background:#fff0f1!important; color:#c73c4b!important; }
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel.billing-state-lifetime .billing-price-block { background:#eef9f7!important; border-color:#c8eae4!important; }
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel.billing-state-lifetime .billing-price { color:#008f89!important; }
@media(max-width:1050px) {
  html body #settings-section#settings-section#settings-section #billing-panel .billing-hero { grid-template-columns:minmax(0,1fr) minmax(145px,190px)!important; }
  html body #settings-section#settings-section#settings-section #billing-panel .billing-actions { grid-column:1/-1!important; grid-row:3!important; }
}
@media(max-width:680px) {
  html body #settings-section#settings-section#settings-section #billing-panel .billing-hero { grid-template-columns:minmax(0,1fr)!important; grid-template-rows:auto!important; gap:16px!important; padding:18px!important; }
  html body #settings-section#settings-section#settings-section #billing-panel .billing-hero-top,
  html body #settings-section#settings-section#settings-section #billing-panel .billing-plan-copy,
  html body #settings-section#settings-section#settings-section #billing-panel .billing-price-block,
  html body #settings-section#settings-section#settings-section #billing-panel .billing-actions { grid-column:1!important; grid-row:auto!important; }
  html body #settings-section#settings-section#settings-section #billing-panel .billing-price-block { text-align:left!important; }
  html body #settings-section#settings-section#settings-section #billing-panel .billing-expired-features { padding:16px!important; }
  html body #settings-section#settings-section#settings-section #billing-panel .billing-expired-features header { align-items:flex-start!important; flex-direction:column!important; }
  html body #settings-section#settings-section#settings-section #billing-panel .billing-feature-grid { grid-template-columns:1fr!important; }
  html body #settings-section#settings-section#settings-section #billing-panel .billing-feature-grid article { border-top:1px solid rgba(87,127,146,.23)!important; padding-top:12px!important; }
  html body #settings-section#settings-section#settings-section #billing-panel .billing-feature-grid article::after { display:none!important; }
  html body #settings-section#settings-section#settings-section #billing-panel .billing-expired-security { align-items:flex-start!important; flex-wrap:wrap!important; }
}

/* Subscription & Billing: consistent premium layout across all account states. */
html body #settings-section#settings-section#settings-section #billing-panel {
  display: grid !important; gap: 16px !important; color: #e8f1f5 !important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-overview-grid { display: block !important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-hero {
  display: grid !important; grid-template-columns: minmax(0,1fr) minmax(150px,205px) minmax(220px,270px) !important;
  grid-template-rows: auto 1fr !important; align-items: center !important; gap: 14px 24px !important;
  min-height: 184px !important; padding: 20px 26px !important; border: 1px solid #174252 !important;
  border-radius: 13px !important; background: linear-gradient(112deg,#0b2534,#0d202d 58%,#0a1d28) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025) !important; overflow: visible !important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-hero-top {
  grid-column: 1 / -1 !important; grid-row: 1 !important; align-self: start !important; margin: 0 !important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-kicker {
  padding: 7px 14px !important; border: 1px solid rgba(37,213,223,.25) !important; border-radius: 2px !important;
  background: rgba(14,119,145,.16) !important; color: #25d5df !important; font-size: 13px !important; letter-spacing: .04em !important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-status-pill {
  position: static !important; margin-left: auto !important; padding: 7px 14px !important; border-radius: 2px !important; font-size: 13px !important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-hero-main { display: contents !important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-plan-copy { grid-column: 1 !important; grid-row: 2 !important; max-width: 580px !important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-plan-copy h3 {
  margin: 0 0 8px !important; color: #f2f7fa !important; font-size: 24px !important; line-height: 1.2 !important; font-weight: 700 !important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-plan-copy p { margin: 0 !important; color: #bbced9 !important; font-size: 16px !important; line-height: 1.5 !important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-price-block {
  grid-column: 2 !important; grid-row: 2 !important; min-width: 0 !important; margin: 0 !important; padding: 14px 16px !important;
  border: 1px solid #1c3a49 !important; border-radius: 2px !important; background: rgba(3,14,22,.34) !important; text-align: right !important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-price { color: #f4f8fa !important; font-size: 30px !important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-price-period { color: #b4c7d2 !important; font-size: 14px !important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-actions {
  grid-column: 3 !important; grid-row: 2 !important; position: static !important; display: grid !important;
  grid-template-columns: repeat(2,minmax(0,1fr)) !important; align-content: center !important; align-items: center !important;
  gap: 10px !important; margin: 0 !important; padding: 0 !important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-actions:has(#billing-subscribe-btn[style*="inline-flex"]) #billing-subscribe-btn,
html body #settings-section#settings-section#settings-section #billing-panel .billing-actions:has(#billing-resubscribe-btn[style*="inline-flex"]) #billing-resubscribe-btn { grid-column: 1 / -1 !important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-actions .billing-btn { min-width: 0 !important; min-height: 52px !important; padding: 0 14px !important; border-radius: 3px !important; font-size: 15px !important; white-space: normal !important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-footnotes { grid-column: 1 / -1 !important; display: flex !important; justify-content: center !important; gap: 7px !important; margin: 0 !important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-footnotes span {
  padding: 7px 9px !important; border: 1px solid rgba(35,201,207,.2) !important; border-radius: 2px !important;
  background: rgba(7,75,76,.18) !important; color: #c4d8df !important; font-size: 12px !important; white-space: nowrap !important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-alert { border-radius: 3px !important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-expired-features {
  display: block !important; padding: 20px 24px 22px !important; border: 1px solid #173e4c !important;
  border-radius: 3px !important; background: rgba(7,32,45,.72) !important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-expired-features header { margin-bottom: 18px !important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-expired-features h3 { color: #f0f6f9 !important; font-size: 21px !important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-expired-features header p,
html body #settings-section#settings-section#settings-section #billing-panel .billing-feature-grid p { color: #b1c7d3 !important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-feature-grid h4 { color: #eef5f8 !important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-feature-icon { flex-basis: 58px !important; height: 58px !important; border: 0 !important; border-radius: 2px !important; background: rgba(12,99,124,.22) !important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-expired-security {
  display: flex !important; align-items: center !important; gap: 18px !important; padding: 18px 22px !important;
  border: 1px solid #173e4c !important; border-radius: 3px !important; background: rgba(7,32,45,.72) !important; color: #bfd1dc !important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-expired-security > div { flex: 1 1 auto !important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-expired-security strong { color: #25d5df !important; }
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-trial .billing-status-pill,
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-status-pill,
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-lifetime .billing-status-pill { border-color: rgba(52,211,153,.45) !important; background: rgba(52,211,153,.12) !important; color: #58e8b0 !important; }
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-trial-expired .billing-status-pill { border-color: rgba(255,104,112,.45) !important; background: rgba(255,92,102,.12) !important; color: #ff969d !important; }
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-lifetime .billing-price-block { border-color: rgba(37,213,223,.35) !important; background: rgba(18,104,107,.13) !important; }
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-lifetime .billing-price { color: #43dbd3 !important; }

html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-hero { border-color: #d7e7ed !important; background: linear-gradient(112deg,#fff,#f8fbfd 58%,#f1f8fa) !important; box-shadow: 0 5px 20px rgba(35,84,115,.055) !important; }
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-kicker { border-color: #c5e9e5 !important; background: #e8f8f5 !important; color: #008f89 !important; }
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-plan-copy h3,
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-expired-features h3,
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-feature-grid h4 { color: #183554 !important; }
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-plan-copy p,
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-expired-features header p,
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-feature-grid p { color: #607c99 !important; }
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-price-block { border-color: #dce8f1 !important; background: #fff !important; }
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-price,
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-price-current { color: #183554 !important; }
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-price-period { color: #607c99 !important; }
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-expired-features,
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-expired-security { border-color: #dce8f1 !important; background: #fff !important; color: #607c99 !important; }
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-feature-icon { background: #e9f6f8 !important; }
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-expired-security strong { color: #008f89 !important; }
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-status-pill.active,
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-status-pill.paid,
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-status-pill.trialing { border-color: #b5e3d3 !important; background: #e9f8f1 !important; color: #087d5c !important; }
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-status-pill.expired { border-color: #f2c9ce !important; background: #fff0f1 !important; color: #c73c4b !important; }
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel.billing-state-lifetime .billing-price-block { background: #eef9f7 !important; border-color: #c8eae4 !important; }
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel.billing-state-lifetime .billing-price { color: #008f89 !important; }

@media (max-width: 1050px) {
  html body #settings-section#settings-section#settings-section #billing-panel .billing-hero { grid-template-columns: minmax(0,1fr) minmax(145px,190px) !important; }
  html body #settings-section#settings-section#settings-section #billing-panel .billing-actions { grid-column: 1 / -1 !important; grid-row: 3 !important; }
}
@media (max-width: 680px) {
  html body #settings-section#settings-section#settings-section #billing-panel .billing-hero { grid-template-columns: minmax(0,1fr) !important; grid-template-rows: auto !important; gap: 16px !important; padding: 18px !important; }
  html body #settings-section#settings-section#settings-section #billing-panel .billing-hero-top,
  html body #settings-section#settings-section#settings-section #billing-panel .billing-plan-copy,
  html body #settings-section#settings-section#settings-section #billing-panel .billing-price-block,
  html body #settings-section#settings-section#settings-section #billing-panel .billing-actions { grid-column: 1 !important; grid-row: auto !important; }
  html body #settings-section#settings-section#settings-section #billing-panel .billing-price-block { text-align: left !important; }
  html body #settings-section#settings-section#settings-section #billing-panel .billing-expired-features { padding: 16px !important; }
  html body #settings-section#settings-section#settings-section #billing-panel .billing-expired-features header { align-items: flex-start !important; flex-direction: column !important; }
  html body #settings-section#settings-section#settings-section #billing-panel .billing-feature-grid { grid-template-columns: 1fr !important; }
  html body #settings-section#settings-section#settings-section #billing-panel .billing-feature-grid article { border-top: 1px solid rgba(87,127,146,.23) !important; padding-top: 12px !important; }
  html body #settings-section#settings-section#settings-section #billing-panel .billing-feature-grid article::after { display: none !important; }
  html body #settings-section#settings-section#settings-section #billing-panel .billing-expired-security { align-items: flex-start !important; flex-wrap: wrap !important; }
}

/* Guided tour: use the same calm teal/navy language as the app in both themes. */
html body .tour-highlight {
  border-radius: 12px !important;
  box-shadow: 0 0 0 9999px rgba(3, 11, 16, .72), 0 0 0 3px rgba(37, 213, 223, .86),
    0 0 24px rgba(37, 213, 223, .28), inset 0 0 0 1px rgba(37, 213, 223, .24) !important;
  animation: banymayTourPulse 2.8s ease-in-out infinite !important;
}
@keyframes banymayTourPulse {
  0%, 100% { box-shadow: 0 0 0 9999px rgba(3, 11, 16, .72), 0 0 0 3px rgba(37, 213, 223, .78), 0 0 20px rgba(37, 213, 223, .22), inset 0 0 0 1px rgba(37, 213, 223, .2); }
  50% { box-shadow: 0 0 0 9999px rgba(3, 11, 16, .72), 0 0 0 4px rgba(37, 213, 223, .95), 0 0 30px rgba(37, 213, 223, .34), inset 0 0 0 1px rgba(37, 213, 223, .3); }
}
html body .tour-bubble {
  box-sizing: border-box;
  width: min(410px, calc(100vw - 32px)) !important;
  max-width: 410px !important;
  padding: 22px 24px 20px !important;
  border: 1px solid #294550 !important;
  border-radius: 18px !important;
  background: linear-gradient(145deg, rgba(18, 34, 43, .985), rgba(11, 25, 33, .99)) !important;
  color: #e8f1f5 !important;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .42), 0 8px 26px rgba(0, 0, 0, .2), 0 0 0 1px rgba(37, 213, 223, .06) !important;
  backdrop-filter: blur(18px) saturate(1.12) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.12) !important;
  animation: tourBubbleIn .24s ease-out !important;
}
html body .tour-bubble--below::before,
html body .tour-bubble--above::after {
  background: #10232c !important;
  border-color: #294550 !important;
}
html body .tour-bubble-step {
  padding: 5px 10px !important;
  margin-bottom: 12px !important;
  border: 1px solid rgba(37, 213, 223, .25) !important;
  background: rgba(37, 213, 223, .1) !important;
  color: #45dce0 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .09em !important;
}
html body .tour-bubble-title { color: #f4f8fa !important; font-size: 20px !important; line-height: 1.3 !important; margin-bottom: 8px !important; }
html body .tour-bubble-text { color: #b7c8d1 !important; font-size: 14px !important; line-height: 1.65 !important; margin-bottom: 20px !important; }
html body .tour-bubble-text strong { color: #e8f1f5 !important; font-weight: 700 !important; }
html body .tour-bubble-actions { gap: 12px !important; }
html body .tour-btn-skip { color: #91a7b2 !important; font-size: 13px !important; font-weight: 600 !important; }
html body .tour-btn-skip:hover { color: #e1eef2 !important; }
html body .tour-btn-next {
  min-height: 42px;
  padding: 10px 18px !important;
  border: 1px solid rgba(255,255,255,.16) !important;
  border-radius: 11px !important;
  background: #23c9cf !important;
  color: #06252b !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  box-shadow: 0 5px 16px rgba(35, 201, 207, .2) !important;
  transition: background-color .16s ease, box-shadow .16s ease !important;
}
html body .tour-btn-next:hover { background: #35d7da !important; box-shadow: 0 7px 20px rgba(35, 201, 207, .28) !important; transform: none !important; }
html body .tour-progress { gap: 7px !important; }
html body .tour-progress-dot { width: 7px !important; height: 7px !important; background: #42545d !important; }
html body .tour-progress-dot.done { background: #248f95 !important; }
html body .tour-progress-dot.active { width: 20px !important; background: #28d0d4 !important; box-shadow: 0 0 10px rgba(40, 208, 212, .35) !important; }

html[data-appearance="light"] body .tour-bubble {
  border-color: #d7e7ed !important;
  background: linear-gradient(145deg, rgba(255, 255, 255, .99), rgba(246, 251, 252, .99)) !important;
  color: #183554 !important;
  box-shadow: 0 22px 56px rgba(30, 66, 91, .2), 0 0 0 1px rgba(0, 170, 165, .08) !important;
}
html[data-appearance="light"] body .tour-bubble--below::before,
html[data-appearance="light"] body .tour-bubble--above::after { background: #ffffff !important; border-color: #d7e7ed !important; }
html[data-appearance="light"] body .tour-bubble-step { border-color: #c8ece7 !important; background: #e8f8f5 !important; color: #008f89 !important; }
html[data-appearance="light"] body .tour-bubble-title { color: #183554 !important; }
html[data-appearance="light"] body .tour-bubble-text { color: #58738c !important; }
html[data-appearance="light"] body .tour-bubble-text strong { color: #254968 !important; }
html[data-appearance="light"] body .tour-btn-skip { color: #6f879b !important; }
html[data-appearance="light"] body .tour-btn-skip:hover { color: #183554 !important; }
html[data-appearance="light"] body .tour-progress-dot { background: #d5e1e7 !important; }
html[data-appearance="light"] body .tour-progress-dot.done { background: #70c9c0 !important; }
html[data-appearance="light"] body .tour-progress-dot.active { background: #00aaa5 !important; box-shadow: 0 0 9px rgba(0, 170, 165, .24) !important; }
@media (max-width: 520px) {
  html body .tour-bubble { padding: 18px 18px 16px !important; border-radius: 16px !important; }
  html body .tour-bubble-title { font-size: 18px !important; }
  html body .tour-bubble-text { font-size: 13px !important; }
  html body .tour-bubble-actions { gap: 6px !important; }
}
@media (prefers-reduced-motion: reduce) {
  html body .tour-highlight { animation: none !important; }
  html body .tour-bubble, html body .tour-btn-next { animation: none !important; transition: none !important; }
}

/* Leaderboard: remove medal/avatar art from summary cards; tighten rank marks in table. */
html body #leaderboard-section .leaderboard-card .leaderboard-award-icon { display: none !important; }
html body #leaderboard-section .leaderboard-card .leaderboard-award { justify-content: center !important; gap: 0 !important; }
html body #leaderboard-section .leaderboard-card .leaderboard-award > div { text-align: center !important; }
html body #leaderboard-section .leaderboard-table .leaderboard-medal { width: 38.4px !important; height: 38.4px !important; }
html body #leaderboard-section .leaderboard-table .leaderboard-rank-number { width: 32px !important; height: 32px !important; }

/* Keep leaderboard return metrics as plain text instead of colored pills. */
html body #leaderboard-section .leaderboard-table tbody td:nth-child(5) .leaderboard-pct,
html body #leaderboard-section .leaderboard-table tbody td:nth-child(11) .leaderboard-pct {
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Keep the My Plan Overview focused on its dashboard content. */
html body #profile-section .banymay-my-plan:has(.my-plan-overview.is-active) > .my-plan-main > .my-plan-heading .my-plan-primary-action,
html body #profile-section .banymay-my-plan .my-plan-overview.is-active .my-plan-secondary-action {
  display: none !important;
}

/* Final Light-theme Stocks table override: white + cool blue-gray alternating rows. */
html[data-appearance="light"] body.theme-blue #stocks-section#stocks-section#stocks-section .stocks-table tbody#stocks-tbody > tr:nth-child(odd),
html[data-appearance="light"] body.theme-blue #stocks-section#stocks-section#stocks-section .stocks-table tbody#stocks-tbody > tr:nth-child(odd) > td {
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
}
html[data-appearance="light"] body.theme-blue #stocks-section#stocks-section#stocks-section .stocks-table tbody#stocks-tbody > tr:nth-child(even),
html[data-appearance="light"] body.theme-blue #stocks-section#stocks-section#stocks-section .stocks-table tbody#stocks-tbody > tr:nth-child(even) > td {
  background: #f3f8fb !important;
  background-color: #f3f8fb !important;
  background-image: none !important;
}
html[data-appearance="light"] body.theme-blue #stocks-section#stocks-section#stocks-section .stocks-table tbody#stocks-tbody > tr:hover,
html[data-appearance="light"] body.theme-blue #stocks-section#stocks-section#stocks-section .stocks-table tbody#stocks-tbody > tr:hover > td {
  background: #eaf5f8 !important;
  background-color: #eaf5f8 !important;
}

/* Billing checkout CTAs: guarantee visible fill, border, and text contrast in both themes. */
html body #settings-section#settings-section #billing-panel :is(#billing-subscribe-btn, #billing-resubscribe-btn) {
  min-height: 48px !important;
  padding: 0 24px !important;
  border: 1px solid #23c9cf !important;
  border-radius: 11px !important;
  background: #23c9cf !important;
  background-image: none !important;
  color: #06252b !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  text-shadow: none !important;
  box-shadow: 0 5px 18px rgba(35, 201, 207, .24) !important;
  opacity: 1 !important;
  filter: none !important;
}
html body #settings-section#settings-section #billing-panel :is(#billing-subscribe-btn, #billing-resubscribe-btn):hover:not(:disabled) {
  border-color: #70eff0 !important;
  background: #42dadd !important;
  background-image: none !important;
  color: #06252b !important;
  box-shadow: 0 7px 22px rgba(35, 201, 207, .32) !important;
  transform: translateY(-1px);
}
html body #settings-section#settings-section #billing-panel :is(#billing-subscribe-btn, #billing-resubscribe-btn):focus-visible {
  outline: 3px solid rgba(35, 201, 207, .42) !important;
  outline-offset: 3px !important;
}
html[data-appearance="light"] body.theme-blue #settings-section#settings-section #billing-panel :is(#billing-subscribe-btn, #billing-resubscribe-btn) {
  border-color: #008e88 !important;
  background: #009e98 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(0, 142, 136, .2) !important;
}
html[data-appearance="light"] body.theme-blue #settings-section#settings-section #billing-panel :is(#billing-subscribe-btn, #billing-resubscribe-btn):hover:not(:disabled) {
  border-color: #007f7a !important;
  background: #008f89 !important;
  color: #ffffff !important;
  box-shadow: 0 6px 18px rgba(0, 142, 136, .25) !important;
}
html body #settings-section#settings-section #billing-panel :is(#billing-subscribe-btn, #billing-resubscribe-btn):disabled {
  opacity: .78 !important;
  cursor: wait !important;
  transform: none !important;
}

/* Subscription & Billing refreshed layout for trial, expired, paid and lifetime access. */
html body #settings-section#settings-section#settings-section #billing-panel {
  display: grid !important;
  gap: 16px !important;
  color: #e8f1f5 !important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-overview-grid {
  display: block !important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-hero {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 205px) minmax(220px, 270px) !important;
  grid-template-rows: auto 1fr !important;
  align-items: center !important;
  gap: 14px 24px !important;
  min-height: 184px !important;
  padding: 20px 26px !important;
  border: 1px solid #174252 !important;
  border-radius: 13px !important;
  background: linear-gradient(112deg, #0b2534 0%, #0d202d 58%, #0a1d28 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025) !important;
  overflow: visible !important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-hero-top {
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
  align-self: start !important;
  margin: 0 !important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-kicker {
  padding: 7px 14px !important;
  border: 1px solid rgba(37,213,223,.25) !important;
  border-radius: 0 !important;
  background: rgba(14,119,145,.16) !important;
  color: #25d5df !important;
  font-size: 13px !important;
  letter-spacing: .04em !important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-status-pill {
  position: static !important;
  margin-left: auto !important;
  padding: 7px 14px !important;
  border-radius: 0 !important;
  font-size: 13px !important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-hero-main {
  display: contents !important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-plan-copy {
  grid-column: 1 !important;
  grid-row: 2 !important;
  max-width: 580px !important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-plan-copy h3 {
  margin: 0 0 8px !important;
  color: #f2f7fa !important;
  font-size: 24px !important;
  line-height: 1.2 !important;
  font-weight: 700 !important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-plan-copy p {
  margin: 0 !important;
  color: #bbced9 !important;
  font-size: 16px !important;
  line-height: 1.5 !important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-price-block {
  grid-column: 2 !important;
  grid-row: 2 !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 14px 16px !important;
  border: 1px solid #1c3a49 !important;
  border-radius: 0 !important;
  background: rgba(3,14,22,.34) !important;
  text-align: right !important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-price {
  color: #f4f8fa !important;
  font-size: 30px !important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-price-period {
  color: #b4c7d2 !important;
  font-size: 14px !important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-actions {
  grid-column: 3 !important;
  grid-row: 2 !important;
  position: static !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-content: center !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 0 !important;
  padding: 0 !important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-actions:has(#billing-subscribe-btn[style*="inline-flex"]) #billing-subscribe-btn,
html body #settings-section#settings-section#settings-section #billing-panel .billing-actions:has(#billing-resubscribe-btn[style*="inline-flex"]) #billing-resubscribe-btn,
html body #settings-section#settings-section#settings-section #billing-panel .billing-actions > .billing-btn:only-of-type {
  grid-column: 1 / -1 !important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-actions .billing-btn {
  min-width: 0 !important;
  min-height: 52px !important;
  padding: 0 14px !important;
  border-radius: 2px !important;
  font-size: 15px !important;
  white-space: normal !important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-footnotes {
  grid-column: 1 / -1 !important;
  display: flex !important;
  justify-content: center !important;
  gap: 7px !important;
  margin: 0 !important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-footnotes span {
  padding: 7px 9px !important;
  border: 1px solid rgba(35, 201, 207, .2) !important;
  border-radius: 2px !important;
  background: rgba(7, 75, 76, .18) !important;
  color: #c4d8df !important;
  font-size: 12px !important;
  white-space: nowrap !important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-alert {
  border-radius: 3px !important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-expired-features {
  display: block !important;
  padding: 20px 24px 22px !important;
  border: 1px solid #173e4c !important;
  border-radius: 3px !important;
  background: rgba(7, 32, 45, .72) !important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-expired-features header {
  margin-bottom: 18px !important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-expired-features h3 {
  color: #f0f6f9 !important;
  font-size: 21px !important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-expired-features header p {
  color: #b5c8d3 !important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-feature-icon {
  flex-basis: 58px !important;
  height: 58px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: rgba(12, 99, 124, .22) !important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-feature-grid h4 {
  color: #eef5f8 !important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-feature-grid p {
  color: #b1c7d3 !important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-expired-security {
  display: flex !important;
  align-items: center !important;
  gap: 18px !important;
  padding: 18px 22px !important;
  border: 1px solid #173e4c !important;
  border-radius: 3px !important;
  background: rgba(7, 32, 45, .72) !important;
  color: #bfd1dc !important;
}
html body #settings-section#settings-section#settings-section #billing-panel .billing-expired-security > div { flex: 1 1 auto !important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-expired-security strong { color: #25d5df !important; }

html body #settings-section#settings-section#settings-section #billing-panel.billing-state-trial .billing-status-pill {
  border-color: rgba(52,211,153,.45) !important; background: rgba(52,211,153,.12) !important; color: #58e8b0 !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-trial-expired .billing-status-pill {
  border-color: rgba(255,104,112,.45) !important; background: rgba(255,92,102,.12) !important; color: #ff969d !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-status-pill,
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-lifetime .billing-status-pill {
  border-color: rgba(52,211,153,.45) !important; background: rgba(52,211,153,.12) !important; color: #58e8b0 !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-lifetime .billing-price-block {
  border-color: rgba(37,213,223,.35) !important; background: rgba(18,104,107,.13) !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-lifetime .billing-price { color: #43dbd3 !important; }

html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel { color: #183554 !important; }
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-hero {
  border-color: #d7e7ed !important;
  background: linear-gradient(112deg, #ffffff 0%, #f8fbfd 58%, #f1f8fa 100%) !important;
  box-shadow: 0 5px 20px rgba(35, 84, 115, .055) !important;
}
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-kicker {
  border-color: #c5e9e5 !important; background: #e8f8f5 !important; color: #008f89 !important;
}
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-plan-copy h3 { color: #183554 !important; }
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-plan-copy p { color: #607c99 !important; }
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-price-block {
  border-color: #dce8f1 !important; background: #ffffff !important;
}
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-price,
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-price-current { color: #183554 !important; }
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-price-period { color: #607c99 !important; }
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-expired-features,
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-expired-security {
  border-color: #dce8f1 !important; background: #ffffff !important; color: #607c99 !important;
}
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-expired-features h3,
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-feature-grid h4 { color: #183554 !important; }
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-expired-features header p,
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-feature-grid p { color: #607c99 !important; }
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-feature-icon { background: #e9f6f8 !important; }
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-expired-security strong { color: #008f89 !important; }
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-status-pill.active,
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-status-pill.paid,
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-status-pill.trialing {
  border-color: #b5e3d3 !important; background: #e9f8f1 !important; color: #087d5c !important;
}
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel .billing-status-pill.expired {
  border-color: #f2c9ce !important; background: #fff0f1 !important; color: #c73c4b !important;
}
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel.billing-state-lifetime .billing-price-block { background: #eef9f7 !important; border-color: #c8eae4 !important; }
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel.billing-state-lifetime .billing-price { color: #008f89 !important; }

@media (max-width: 1050px) {
  html body #settings-section#settings-section#settings-section #billing-panel .billing-hero {
    grid-template-columns: minmax(0, 1fr) minmax(145px, 190px) !important;
  }
  html body #settings-section#settings-section#settings-section #billing-panel .billing-actions {
    grid-column: 1 / -1 !important; grid-row: 3 !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  html body #settings-section#settings-section#settings-section #billing-panel .billing-plan-copy { grid-column: 1 !important; }
  html body #settings-section#settings-section#settings-section #billing-panel .billing-price-block { grid-column: 2 !important; }
}
@media (max-width: 680px) {
  html body #settings-section#settings-section#settings-section #billing-panel .billing-hero {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto !important;
    gap: 16px !important; padding: 18px !important;
  }
  html body #settings-section#settings-section#settings-section #billing-panel .billing-hero-top,
  html body #settings-section#settings-section#settings-section #billing-panel .billing-plan-copy,
  html body #settings-section#settings-section#settings-section #billing-panel .billing-price-block,
  html body #settings-section#settings-section#settings-section #billing-panel .billing-actions {
    grid-column: 1 !important; grid-row: auto !important;
  }
  html body #settings-section#settings-section#settings-section #billing-panel .billing-price-block { text-align: left !important; }
  html body #settings-section#settings-section#settings-section #billing-panel .billing-expired-features { padding: 16px !important; }
  html body #settings-section#settings-section#settings-section #billing-panel .billing-expired-features header { align-items: flex-start !important; flex-direction: column !important; }
  html body #settings-section#settings-section#settings-section #billing-panel .billing-feature-grid { grid-template-columns: 1fr !important; }
  html body #settings-section#settings-section#settings-section #billing-panel .billing-feature-grid article { border-top: 1px solid rgba(87,127,146,.23) !important; padding-top: 12px !important; }
  html body #settings-section#settings-section#settings-section #billing-panel .billing-feature-grid article::after { display: none !important; }
  html body #settings-section#settings-section#settings-section #billing-panel .billing-expired-security { align-items: flex-start !important; flex-wrap: wrap !important; }
  html body #settings-section#settings-section#settings-section #billing-panel .billing-stripe-mark,
  html body #settings-section#settings-section#settings-section #billing-panel .billing-security-lock { margin-left: 48px !important; }
}

/* Final cascade: Stocks Allocation uses Dashboard teal in Dark and Light. */
html body.theme-blue #stocks-section#stocks-section #stocks-tbody td[data-field="allocation"] {
  color: #25d5df !important;
  text-shadow: none !important;
  filter: none !important;
}

/* Billing hero alignment: put the status over its price and checkout notes under the CTA. */
html body #settings-section#settings-section#settings-section #billing-panel .billing-hero { grid-template-columns:minmax(0,1fr) minmax(220px,245px) minmax(285px,315px)!important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-hero-top { display:contents!important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-kicker { grid-column:1!important; grid-row:1!important; justify-self:start!important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-status-pill { grid-column:2!important; grid-row:1!important; justify-self:center!important; margin:0!important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-plan-copy { grid-column:1!important; grid-row:2!important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-price-block { grid-column:2!important; grid-row:2!important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-actions { grid-column:3!important; grid-row:2!important; grid-template-columns:minmax(0,1fr)!important; grid-template-rows:auto auto!important; align-content:center!important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-actions .billing-btn { grid-column:1!important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-footnotes { grid-column:1!important; flex-direction:row!important; flex-wrap:nowrap!important; align-items:center!important; justify-content:center!important; gap:6px!important; }
html body #settings-section#settings-section#settings-section #billing-panel .billing-footnotes span { padding:6px 7px!important; font-size:11px!important; }
@media(max-width:1050px) {
  html body #settings-section#settings-section#settings-section #billing-panel .billing-status-pill { grid-column:2!important; grid-row:1!important; }
  html body #settings-section#settings-section#settings-section #billing-panel .billing-actions { grid-column:1/-1!important; grid-row:3!important; grid-template-columns:repeat(2,minmax(0,1fr))!important; }
  html body #settings-section#settings-section#settings-section #billing-panel .billing-footnotes { grid-column:1/-1!important; }
}
@media(max-width:680px) {
  html body #settings-section#settings-section#settings-section #billing-panel .billing-kicker,
  html body #settings-section#settings-section#settings-section #billing-panel .billing-status-pill,
  html body #settings-section#settings-section#settings-section #billing-panel .billing-plan-copy,
  html body #settings-section#settings-section#settings-section #billing-panel .billing-price-block,
  html body #settings-section#settings-section#settings-section #billing-panel .billing-actions { grid-column:1!important; grid-row:auto!important; }
  html body #settings-section#settings-section#settings-section #billing-panel .billing-status-pill { justify-self:start!important; }
  html body #settings-section#settings-section#settings-section #billing-panel .billing-actions { grid-template-columns:minmax(0,1fr)!important; }
  html body #settings-section#settings-section#settings-section #billing-panel .billing-footnotes { flex-wrap:wrap!important; }
}

/* Stocks Allocation values share one teal across both appearance modes. */
html body.theme-blue #stocks-section#stocks-section#stocks-section#stocks-section #stocks-tbody td[data-field="allocation"] {
  color: #25d5df !important;
  text-shadow: none !important;
  filter: none !important;
}

/* Light Stocks table: remove legacy cream/gray fills; keep rows clean white. */
html[data-appearance="light"][data-appearance="light"] body.theme-blue #stocks-section#stocks-section#stocks-section .stocks-table-scroll,
html[data-appearance="light"][data-appearance="light"] body.theme-blue #stocks-section#stocks-section#stocks-section .stocks-table {
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
}
html[data-appearance="light"][data-appearance="light"] body.theme-blue #stocks-section#stocks-section#stocks-section .stocks-table tbody#stocks-tbody > tr,
html[data-appearance="light"][data-appearance="light"] body.theme-blue #stocks-section#stocks-section#stocks-section .stocks-table tbody#stocks-tbody > tr:nth-child(odd),
html[data-appearance="light"][data-appearance="light"] body.theme-blue #stocks-section#stocks-section#stocks-section .stocks-table tbody#stocks-tbody > tr:nth-child(even),
html[data-appearance="light"][data-appearance="light"] body.theme-blue #stocks-section#stocks-section#stocks-section .stocks-table tbody#stocks-tbody > tr > td {
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
  box-shadow: none !important;
}
html[data-appearance="light"][data-appearance="light"] body.theme-blue #stocks-section#stocks-section#stocks-section .stocks-table tbody#stocks-tbody > tr:hover,
html[data-appearance="light"][data-appearance="light"] body.theme-blue #stocks-section#stocks-section#stocks-section .stocks-table tbody#stocks-tbody > tr:hover > td {
  background: #f4faff !important;
  background-color: #f4faff !important;
}

/* Final cascade: the Dashboard top balance matches Breakdown in Light too. */
html[data-appearance="light"][data-appearance="light"] body.theme-blue #dashboard-section#dashboard-section#dashboard-section #dashboard-summary-balance {
  color: #25d5df !important;
  text-shadow: none !important;
  filter: none !important;
}

/* Match both Light Dashboard balance figures to the Dark Dashboard teal. */
html[data-appearance="light"][data-appearance="light"] body.theme-blue #dashboard-section.banymay-dashboard #dashboard-summary-balance,
html[data-appearance="light"][data-appearance="light"] body.theme-blue #dashboard-section.banymay-dashboard .dashboard-breakdown-table tbody td:nth-child(2) {
  color: #25d5df !important;
  text-shadow: none !important;
  filter: none !important;
}

/* Dark Dashboard balance uses the same teal as the selected navigation item. */
html:not([data-appearance="light"]) body.theme-blue #dashboard-section#dashboard-section#dashboard-section #dashboard-summary-balance,
html:not([data-appearance="light"]) body.theme-blue #dashboard-section.banymay-dashboard .dashboard-breakdown-table tbody td:nth-child(2) {
  color: #25d5df !important;
  text-shadow: none !important;
  filter: none !important;
}

/* Final Light overrides: beat legacy active-tab and dark inline-era table skins. */
html[data-appearance="light"][data-appearance="light"] body.theme-blue #sectors-section.active .allocation-switch .allocation-option.active {
  color: #008f89 !important;
  background: #e5f6f4 !important;
  background-color: #e5f6f4 !important;
  background-image: none !important;
  border: 1px solid #c5eae5 !important;
  box-shadow: none !important;
  filter: none !important;
  text-shadow: none !important;
}
html[data-appearance="light"][data-appearance="light"] body.theme-blue #deposits-section.deposits-redesign-page table.deposits-redesign-table > thead,
html[data-appearance="light"][data-appearance="light"] body.theme-blue #deposits-section.deposits-redesign-page table.deposits-redesign-table > thead > tr,
html[data-appearance="light"][data-appearance="light"] body.theme-blue #deposits-section.deposits-redesign-page table.deposits-redesign-table > thead > tr > th {
  background: #f2f7fb !important;
  background-color: #f2f7fb !important;
  background-image: none !important;
  color: #607c99 !important;
  border-color: #dce8f1 !important;
  box-shadow: none !important;
  text-shadow: none !important;
}
html[data-appearance="light"][data-appearance="light"] body.theme-blue #stocks-section.stocks-redesign-page #stocks-tbody > tr:nth-child(odd) {
  background: #f5f9fc !important;
  background-color: #f5f9fc !important;
}
html[data-appearance="light"][data-appearance="light"] body.theme-blue #stocks-section.stocks-redesign-page #stocks-tbody > tr:nth-child(even) {
  background: #ffffff !important;
  background-color: #ffffff !important;
}
html[data-appearance="light"][data-appearance="light"] body.theme-blue #stocks-section.stocks-redesign-page #stocks-tbody > tr > td {
  background: transparent !important;
  background-color: transparent !important;
}
html[data-appearance="light"][data-appearance="light"] body.theme-blue #stocks-section.stocks-redesign-page :is(#stocks-summary-balance, #stocks-tbody td[data-field="allocation"]) {
  color: #009e89 !important;
  text-shadow: none !important;
  filter: none !important;
}

/* My Plan Light palette: match the Dashboard's pale-blue canvas and white panels. */
html[data-appearance="light"][data-appearance="light"] body.theme-blue #profile-section .profile-page.banymay-my-plan {
  --plan-bg: var(--appearance-page) !important;
  --plan-surface: #ffffff !important;
  --plan-sidebar: #ffffff !important;
  --plan-surface-hover: #edf6fb !important;
  --plan-border: #dfeaf3 !important;
  --plan-divider: #e2edf5 !important;
  --plan-text: #142e50 !important;
  --plan-secondary: #607c99 !important;
  --plan-muted: #7891aa !important;
  --plan-accent: #00aaa5 !important;
  --plan-accent-border: #00aaa5 !important;
  --plan-active-bg: #e6f7f5 !important;
  --plan-progress-track: #e2edf5 !important;
  --plan-positive: #00a582 !important;
  --plan-negative: #e74762 !important;
  background: var(--appearance-page) !important;
  color: var(--appearance-text) !important;
}

/* Every app data table uses the same subtle two-tone body rows as Dashboard Breakdown. */
html[data-appearance="light"][data-appearance="light"] body.theme-blue :is(
  #dashboard-section#dashboard-section,
  #stocks-section#stocks-section,
  #sectors-section#sectors-section,
  #deposits-section#deposits-section,
  #withdrawals-section#withdrawals-section,
  #dividends-section#dividends-section,
  #stocks-gains-section#stocks-gains-section,
  #taxes-section#taxes-section,
  #profile-section#profile-section,
  #settings-section#settings-section,
  #leaderboard-section#leaderboard-section,
  #admin-section#admin-section
) table > tbody > tr:nth-child(odd) {
  background: #f5f9fc !important;
  background-color: #f5f9fc !important;
  background-image: none !important;
}
html[data-appearance="light"][data-appearance="light"] body.theme-blue :is(
  #dashboard-section#dashboard-section,
  #stocks-section#stocks-section,
  #sectors-section#sectors-section,
  #deposits-section#deposits-section,
  #withdrawals-section#withdrawals-section,
  #dividends-section#dividends-section,
  #stocks-gains-section#stocks-gains-section,
  #taxes-section#taxes-section,
  #profile-section#profile-section,
  #settings-section#settings-section,
  #leaderboard-section#leaderboard-section,
  #admin-section#admin-section
) table > tbody > tr:nth-child(even) {
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
}
html[data-appearance="light"][data-appearance="light"] body.theme-blue :is(
  #dashboard-section#dashboard-section,
  #stocks-section#stocks-section,
  #sectors-section#sectors-section,
  #deposits-section#deposits-section,
  #withdrawals-section#withdrawals-section,
  #dividends-section#dividends-section,
  #stocks-gains-section#stocks-gains-section,
  #taxes-section#taxes-section,
  #profile-section#profile-section,
  #settings-section#settings-section,
  #leaderboard-section#leaderboard-section,
  #admin-section#admin-section
) table > tbody > tr > td {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
}
html[data-appearance="light"][data-appearance="light"] body.theme-blue :is(
  #dashboard-section#dashboard-section,
  #stocks-section#stocks-section,
  #sectors-section#sectors-section,
  #deposits-section#deposits-section,
  #withdrawals-section#withdrawals-section,
  #dividends-section#dividends-section,
  #stocks-gains-section#stocks-gains-section,
  #taxes-section#taxes-section,
  #profile-section#profile-section,
  #settings-section#settings-section,
  #leaderboard-section#leaderboard-section,
  #admin-section#admin-section
) table > tbody > tr:hover {
  background: #edf6fb !important;
  background-color: #edf6fb !important;
}

/* Admin > Users: improve table readability in both appearance modes. */
html body #admin-section .admin-view--users .admin-users-table table {
  font-size: 13px !important;
}
html body #admin-section .admin-view--users .admin-users-table thead th {
  font-size: 12px !important;
  line-height: 1.3 !important;
}
html body #admin-section .admin-view--users .admin-users-table tbody td {
  font-size: 13px !important;
  line-height: 1.45 !important;
}
html body #admin-section .admin-view--users :is(.user-name, .user-email) {
  font-size: 13px !important;
  line-height: 1.4 !important;
}
html body #admin-section .admin-view--users :is(.plan-badge, .status-badge, .support-health-badge) {
  font-size: 11px !important;
}

/* Keep current portfolio balance figures teal throughout the application. */
html body.theme-blue #dashboard-section#dashboard-section #dashboard-summary-balance,
html body.theme-blue #stocks-section#stocks-section #stocks-summary-balance,
html body.theme-blue #deposits-section#deposits-section #deposits-summary-balance,
html body.theme-blue #withdrawals-section#withdrawals-section #withdrawals-summary-balance,
html body.theme-blue #dividends-section#dividends-section #dividends-summary-balance,
html body.theme-blue #stocks-gains-section#stocks-gains-section #stock-gains-summary-balance,
html body.theme-blue #taxes-section#taxes-section #taxes-summary-balance,
html body.theme-blue #sectors-section#sectors-section #allocation-summary-balance,
html body.theme-blue #total-balance,
html body.theme-blue #allocation-balance-total,
html body.theme-blue #profile-section #profile-current-balance,
html body.theme-blue #profile-section #my-plan-balance-copy {
  color: #00aaa5 !important;
  text-shadow: none !important;
  filter: none !important;
}

/* Light-theme Add actions: 25% white blend from #009c93 = #40b5ae. */
html[data-appearance="light"] body #stocks-section#stocks-section #add-row-btn,
html[data-appearance="light"] body #deposits-section#deposits-section #add-deposit-btn,
html[data-appearance="light"] body #deposits-section#deposits-section .deposits-primary-btn,
html[data-appearance="light"] body #deposits-section#deposits-section .deposits-history-add-btn,
html[data-appearance="light"] body #withdrawals-section#withdrawals-section #add-withdrawal-btn,
html[data-appearance="light"] body #withdrawals-section#withdrawals-section .withdrawal-primary-btn,
html[data-appearance="light"] body #dividends-section#dividends-section #add-dividend-btn,
html[data-appearance="light"] body #dividends-section#dividends-section .dividends-action-btn--primary,
html[data-appearance="light"] body #stocks-gains-section#stocks-gains-section #add-stock-gain-btn {
  background: #40b5ae !important;
  background-color: #40b5ae !important;
  background-image: none !important;
  border-color: #40b5ae !important;
  color: #173353 !important;
  box-shadow: 0 7px 17px rgba(64, 181, 174, .16) !important;
  filter: none !important;
}
html[data-appearance="light"] body #stocks-section#stocks-section #add-row-btn:hover,
html[data-appearance="light"] body #deposits-section#deposits-section :is(#add-deposit-btn, .deposits-primary-btn, .deposits-history-add-btn):hover,
html[data-appearance="light"] body #withdrawals-section#withdrawals-section :is(#add-withdrawal-btn, .withdrawal-primary-btn):hover,
html[data-appearance="light"] body #dividends-section#dividends-section :is(#add-dividend-btn, .dividends-action-btn--primary):hover,
html[data-appearance="light"] body #stocks-gains-section#stocks-gains-section #add-stock-gain-btn:hover {
  background: #52bfb8 !important;
  background-color: #52bfb8 !important;
  border-color: #52bfb8 !important;
}

/* Admin > Users: keep the activity feed contained and its text clear of the marker. */
html body #admin-section .admin-view--users .admin-support-timeline {
  max-height: 360px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 2px 8px 2px 2px !important;
}
html body #admin-section .admin-view--users .admin-support-timeline-item {
  box-sizing: border-box !important;
  min-width: 0 !important;
  padding: 12px 14px 12px 22px !important;
  border: 1px solid rgba(118, 154, 177, .12) !important;
  border-radius: 12px !important;
  overflow-wrap: anywhere;
}
html body #admin-section .admin-view--users .admin-support-timeline-item::before {
  left: 7px !important;
  top: 12px !important;
  height: calc(100% - 24px) !important;
}
html body #admin-section .admin-view--users .admin-support-timeline-item :is(strong, span, small) {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Realized P&L: use the available desktop width so every column is visible. */
@media (min-width: 761px) {
  html body #stocks-gains-section > .realized-pl-table-scroll {
    box-sizing: border-box !important;
    width: calc(100vw - 64px) !important;
    max-width: calc(100vw - 64px) !important;
    margin-left: 32px !important;
    margin-right: 32px !important;
    overflow-x: hidden !important;
  }
  html body #stocks-gains-section #stocks-gains-table {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    table-layout: auto !important;
  }
  html body #stocks-gains-section #stocks-gains-table col {
    width: auto !important;
  }
  html body #stocks-gains-section #stocks-gains-table :is(th, td) {
    padding-left: 7px !important;
    padding-right: 7px !important;
    white-space: nowrap !important;
  }
}

html body #stocks-gains-section #add-stock-gain-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  height: auto !important;
  min-height: 30px !important;
  height: 30px !important;
  min-width: 132px !important;
  padding: 0 12px !important;
  border-radius: 6px !important;
  white-space: nowrap !important;
  font-weight: 700 !important;
  font-size: 12px !important;
  line-height: 1 !important;
  transition: none !important;
  transform: none !important;
}
html:not([data-appearance="light"]) body.theme-blue #stocks-gains-section #add-stock-gain-btn {
  background: #23dee6 !important;
  background-color: #23dee6 !important;
  background-image: none !important;
  border: 0 !important;
  color: #06171e !important;
  box-shadow: 0 8px 18px rgba(35, 222, 230, .13) !important;
}
html body #stocks-gains-section #add-stock-gain-btn:hover {
  background: #23dee6 !important;
  background-color: #23dee6 !important;
  background-image: none !important;
  border-color: transparent !important;
  box-shadow: 0 8px 18px rgba(35, 222, 230, .13) !important;
  transform: none !important;
  filter: none !important;
}

/* Keep Add P&L fixed in every interaction state. */
html body #stocks-gains-section #add-stock-gain-btn,
html body #stocks-gains-section #add-stock-gain-btn:hover,
html body #stocks-gains-section #add-stock-gain-btn:focus-visible,
html body #stocks-gains-section #add-stock-gain-btn:active,
html body #stocks-gains-section #add-stock-gain-btn.add-btn-pulse {
  transform: none !important;
  translate: none !important;
  scale: none !important;
  animation: none !important;
  transition: none !important;
}

/* Realized P&L: fill the table frame and keep it truly centered. */
@media (min-width: 761px) {
  html body #stocks-gains-section {
    --realized-pl-table-width: 1280px !important;
    --realized-pl-grid-columns: repeat(12, minmax(0, 1fr)) !important;
  }

  html body #stocks-gains-section > .realized-pl-table-scroll {
    width: min(calc(100% - 64px), 1280px) !important;
    max-width: 1280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  html body #stocks-gains-section #stocks-gains-table,
  html body #stocks-gains-section #stocks-gains-table thead,
  html body #stocks-gains-section #stocks-gains-table tbody,
  html body #stocks-gains-section #stocks-gains-table thead tr,
  html body #stocks-gains-section #stocks-gains-table-body tr {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  html body #stocks-gains-section #stocks-gains-table,
  html body #stocks-gains-section #stocks-gains-table thead,
  html body #stocks-gains-section #stocks-gains-table tbody,
  html body #stocks-gains-section #stocks-gains-table thead tr,
  html body #stocks-gains-section #stocks-gains-table-body tr {
    max-width: 1280px !important;
  }
}

/* Light theme: consistent teal for portfolio balance figures and Stocks allocation. */
html[data-appearance="light"][data-appearance="light"] body.theme-blue :is(
  #total-balance,
  #dashboard-summary-balance,
  #stocks-summary-balance,
  #deposits-summary-balance,
  #withdrawals-summary-balance,
  #dividends-summary-balance,
  #stock-gains-summary-balance,
  #taxes-summary-balance,
  #allocation-summary-balance,
  #allocation-balance-total,
  #profile-current-balance,
  #my-plan-balance-copy
) {
  color: #009e89 !important;
  text-shadow: none !important;
  filter: none !important;
}
html[data-appearance="light"][data-appearance="light"] body.theme-blue #stocks-section.stocks-redesign-page #stocks-tbody td[data-field="allocation"] {
  color: #009e89 !important;
  text-shadow: none !important;
  filter: none !important;
}

/* Final cascade: the Dashboard top balance matches Breakdown in Light too. */
html[data-appearance="light"][data-appearance="light"] body.theme-blue #dashboard-section#dashboard-section#dashboard-section #dashboard-summary-balance {
  color: #25d5df !important;
  text-shadow: none !important;
  filter: none !important;
}


/* Final paid-billing layout: real separate rows, no overlay layers over content. */
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-overview-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 26px !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-hero {
  position: relative !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px) !important;
  grid-template-rows: 28px minmax(100px, 1fr) !important;
  align-items: center !important;
  gap: 12px 24px !important;
  min-height: 196px !important;
  padding: 24px 32px !important;
  border: 1px solid #174252 !important;
  border-radius: 12px !important;
  background: linear-gradient(112deg, #0b2534 0%, #0d202d 58%, #0a1d28 100%) !important;
  box-shadow: none !important;
  overflow: visible !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-hero::before,
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-hero::after,
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-hero-glow {
  display: none !important;
  content: none !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-kicker {
  grid-column: 1 !important;
  grid-row: 1 !important;
  justify-self: start !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-status-pill {
  grid-column: 2 !important;
  grid-row: 1 !important;
  justify-self: end !important;
  margin: 0 !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-plan-copy {
  grid-column: 1 !important;
  grid-row: 2 !important;
  max-width: 620px !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-price-block {
  grid-column: 2 !important;
  grid-row: 2 !important;
  justify-self: end !important;
  width: 184px !important;
  min-height: 88px !important;
  box-sizing: border-box !important;
  padding: 12px 18px !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-actions {
  position: static !important;
  display: grid !important;
  grid-template-columns: max-content max-content minmax(0, 1fr) max-content !important;
  grid-template-rows: 52px !important;
  align-items: center !important;
  gap: 16px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 32px !important;
  box-sizing: border-box !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid #billing-manage-btn {
  grid-column: 1 !important;
  grid-row: 1 !important;
  min-width: 190px !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid #billing-cancel-btn {
  grid-column: 2 !important;
  grid-row: 1 !important;
  min-width: 232px !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-footnotes {
  grid-column: 4 !important;
  grid-row: 1 !important;
  justify-content: flex-end !important;
  gap: 12px !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-expired-features {
  margin-top: 20px !important;
  border-radius: 0 !important;
  background: rgba(7, 32, 45, .72) !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-feature-icon {
  flex-basis: 68px !important;
  width: 68px !important;
  height: 68px !important;
  background: rgba(12, 99, 124, .22) !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-expired-security {
  margin-top: 10px !important;
  border-radius: 0 !important;
}
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-hero {
  border-color: #d7e7ed !important;
  background: linear-gradient(112deg, #ffffff 0%, #f8fbfd 58%, #f1f8fa 100%) !important;
}
@media (max-width: 1050px) {
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-hero {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 240px) !important;
    min-height: 196px !important;
  }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-actions {
    grid-template-columns: max-content max-content minmax(0, 1fr) !important;
    padding: 0 20px !important;
  }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-footnotes {
    grid-column: 3 !important;
    justify-content: flex-end !important;
    flex-wrap: wrap !important;
  }
}
@media (max-width: 680px) {
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-hero {
    grid-template-columns: minmax(0, 1fr) max-content !important;
    grid-template-rows: auto auto auto !important;
    min-height: 0 !important;
    gap: 16px !important;
    padding: 20px !important;
  }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-plan-copy {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
  }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-price-block {
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
    justify-self: start !important;
  }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-actions {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto !important;
    gap: 10px !important;
    padding: 0 20px !important;
  }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid #billing-manage-btn,
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid #billing-cancel-btn,
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-footnotes {
    grid-column: 1 !important;
    grid-row: auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-footnotes {
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
  }
}

/* Paid billing state: match the supplied active-subscription layout. */
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-hero {
  position: relative !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px) !important;
  grid-template-rows: 28px minmax(100px, 1fr) 52px !important;
  align-items: center !important;
  gap: 12px 24px !important;
  min-height: 276px !important;
  padding: 24px 32px 20px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-hero::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 0 80px !important;
  border: 1px solid #174252 !important;
  border-radius: 12px !important;
  background: linear-gradient(112deg, #0b2534 0%, #0d202d 58%, #0a1d28 100%) !important;
  pointer-events: none !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-hero::after {
  content: "" !important;
  position: absolute !important;
  z-index: 1 !important;
  top: 64px !important;
  bottom: 112px !important;
  left: 67% !important;
  width: 1px !important;
  background: #183b4b !important;
  pointer-events: none !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-hero > :not(.billing-hero-glow) {
  position: relative !important;
  z-index: 2 !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid :is(.billing-kicker,.billing-status-pill,.billing-plan-copy,.billing-price-block,.billing-actions) {
  position: relative !important;
  z-index: 2 !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-kicker {
  grid-column: 1 !important;
  grid-row: 1 !important;
  justify-self: start !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-status-pill {
  grid-column: 2 !important;
  grid-row: 1 !important;
  justify-self: end !important;
  margin: 0 !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-plan-copy {
  grid-column: 1 !important;
  grid-row: 2 !important;
  max-width: 620px !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-price-block {
  grid-column: 2 !important;
  grid-row: 2 !important;
  justify-self: end !important;
  width: 184px !important;
  min-height: 88px !important;
  box-sizing: border-box !important;
  padding: 12px 18px !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-actions {
  grid-column: 1 / -1 !important;
  grid-row: 3 !important;
  display: grid !important;
  grid-template-columns: max-content max-content minmax(0, 1fr) max-content !important;
  grid-template-rows: 52px !important;
  align-items: center !important;
  gap: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid #billing-manage-btn {
  grid-column: 1 !important;
  grid-row: 1 !important;
  min-width: 190px !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid #billing-cancel-btn {
  grid-column: 2 !important;
  grid-row: 1 !important;
  min-width: 232px !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-footnotes {
  grid-column: 4 !important;
  grid-row: 1 !important;
  justify-content: flex-end !important;
  gap: 12px !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-expired-features {
  margin-top: 20px !important;
  border-radius: 0 !important;
  background: rgba(7, 32, 45, .72) !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-feature-icon {
  flex-basis: 68px !important;
  width: 68px !important;
  height: 68px !important;
  background: rgba(12, 99, 124, .22) !important;
}
html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-expired-security {
  margin-top: 10px !important;
  border-radius: 0 !important;
}
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-hero::before {
  border-color: #d7e7ed !important;
  background: linear-gradient(112deg, #ffffff 0%, #f8fbfd 58%, #f1f8fa 100%) !important;
}
html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-hero::after {
  background: #dce8f1 !important;
}
@media (max-width: 1050px) {
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-hero {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 240px) !important;
    grid-template-rows: 28px minmax(100px, 1fr) auto auto !important;
    min-height: 340px !important;
  }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-hero::before {
    inset: 0 0 80px !important;
  }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-hero::after {
    display: none !important;
  }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-plan-copy { grid-column: 1 !important; }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-price-block { grid-column: 2 !important; }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-actions {
    grid-column: 1 / -1 !important;
    grid-row: 3 / 5 !important;
    grid-template-columns: max-content max-content !important;
    grid-template-rows: 52px 40px !important;
    align-content: end !important;
  }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-footnotes {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    justify-content: flex-start !important;
  }
}
@media (max-width: 680px) {
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-hero {
    grid-template-columns: minmax(0, 1fr) max-content !important;
    grid-template-rows: auto auto auto auto !important;
    gap: 16px !important;
    min-height: 0 !important;
    padding: 20px !important;
  }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-hero::before { inset: 0 0 0 !important; }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-kicker { grid-column: 1 !important; grid-row: 1 !important; }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-status-pill { grid-column: 2 !important; grid-row: 1 !important; }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-plan-copy { grid-column: 1 / -1 !important; grid-row: 2 !important; }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-price-block {
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
    justify-self: start !important;
  }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-actions {
    grid-column: 1 / -1 !important;
    grid-row: 4 !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto auto auto !important;
  }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid #billing-manage-btn,
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid #billing-cancel-btn,
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-footnotes {
    grid-column: 1 !important;
    grid-row: auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  html body #settings-section#settings-section#settings-section #billing-panel.billing-state-paid .billing-footnotes { flex-wrap: wrap !important; justify-content: flex-start !important; }
}
/* Keep the Taxes accordion header in the light page palette (not the dark
   shared table-header gradient used by other themes). */
html[data-appearance="light"] body #taxes-section .settings-card.taxes-card > summary {
  background: #f4f9fc !important;
  background-image: none !important;
  color: #173353 !important;
  border-bottom: 1px solid #dfeaf3 !important;
  box-shadow: none !important;
}
html[data-appearance="light"] body #taxes-section .settings-card.taxes-card > summary .settings-title {
  color: #173353 !important;
}
html[data-appearance="light"] body #taxes-section .settings-card.taxes-card > summary .settings-chevron {
  border-color: #dfeaf3 !important;
  background: #ffffff !important;
  color: #637f9a !important;
}

/* My Plan: all displayed portfolio-balance amounts use the Dashboard teal. */
html body #profile-section#profile-section :is(
  #profile-current-balance,
  #my-plan-balance-copy,
  #my-plan-projection-current-balance,
  #profile-balance-at-retirement,
  #profile-balance-at-retirement-contrib,
  #profile-chart-tooltip-balance,
  #profile-chart-tooltip-balance-contrib
) {
  color: #25d5df !important;
  text-shadow: none !important;
  filter: none !important;
}

/* Keep the S&P 500 benchmark yellow and give the chart tooltip a little more
   separation from the light chart background. */
html body #profile-section #profile-chart-tooltip-sp500,
html body #profile-section #profile-chart-tooltip-sp500-contrib {
  color: #c58b00 !important;
}
html[data-appearance="light"] body #profile-section :is(.profile-chart-tooltip, #profile-chart-tooltip-contrib) {
  background: #e6eef5 !important;
  border-color: #d2e0eb !important;
}
html:not([data-appearance="light"]) body #profile-section :is(#profile-chart-tooltip-sp500, #profile-chart-tooltip-sp500-contrib) {
  color: #ffd54a !important;
}
html[data-appearance="light"] body #profile-section :is(#profile-chart-tooltip-dividends, #profile-chart-tooltip-dividends-contrib) {
  color: #16804a !important;
}
html:not([data-appearance="light"]) body #profile-section :is(#profile-chart-tooltip-dividends, #profile-chart-tooltip-dividends-contrib) {
  color: #64e79e !important;
}

/* Projection hover card: compact, three-row layout with a plain year heading. */
html body #profile-section :is(.profile-chart-tooltip, #profile-chart-tooltip-contrib) {
  box-sizing: border-box !important;
  min-width: 190px !important;
  padding: 8px 11px !important;
  gap: 0 !important;
  border: 1px solid #52647e !important;
  border-radius: 12px !important;
  background: linear-gradient(145deg, rgba(17, 29, 43, .98), rgba(25, 37, 53, .98)) !important;
  color: #f3f6fb !important;
  box-shadow: 0 14px 32px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255,255,255,.06) !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
}
html body #profile-section .profile-tooltip-sub {
  display: block !important;
  padding: 0 0 5px !important;
  margin: 0 0 2px !important;
  border-bottom: 1px solid rgba(148, 166, 190, .22) !important;
  color: #9db1cb !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  text-align: center !important;
}
html body #profile-section .profile-tooltip-row {
  display: flex;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  padding: 4px 0 !important;
  border-bottom: 1px solid rgba(148, 166, 190, .22) !important;
  font-size: 12px !important;
}
html body #profile-section .profile-tooltip-row:last-child { border-bottom: 0 !important; }
html body #profile-section .profile-tooltip-value {
  flex: 0 0 auto !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}
html[data-appearance="light"] body #profile-section :is(.profile-chart-tooltip, #profile-chart-tooltip-contrib) {
  background: linear-gradient(145deg, #e1eaf2, #d7e2ec) !important;
  border-color: #bacbd9 !important;
  color: #173353 !important;
  box-shadow: 0 12px 28px rgba(35, 68, 96, .2), inset 0 1px 0 rgba(255,255,255,.8) !important;
}
@media (max-width: 520px) {
  html body #profile-section :is(.profile-chart-tooltip, #profile-chart-tooltip-contrib) {
    min-width: min(190px, calc(100vw - 48px)) !important;
    padding: 7px 9px !important;
  }
  html body #profile-section .profile-tooltip-row { font-size: 11px !important; gap: 8px !important; }
  html body #profile-section .profile-tooltip-value { font-size: 12px !important; }
}

/* Deposits column header uses the same surface as the Stocks column header. */
html:not([data-appearance="light"]) body #deposits-section.deposits-redesign-page table.stocks-table.deposits-redesign-table > thead {
  background: transparent !important;
  background-image: none !important;
}
html:not([data-appearance="light"]) body #deposits-section.deposits-redesign-page table.stocks-table.deposits-redesign-table > thead > tr {
  background: var(--app-page-surface-bg, rgb(20, 26, 38)) !important;
  background-color: var(--app-page-surface-bg, rgb(20, 26, 38)) !important;
  background-image: none !important;
  box-shadow: none !important;
}
html:not([data-appearance="light"]) body #deposits-section.deposits-redesign-page table.stocks-table.deposits-redesign-table > thead > tr > th {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
}
html[data-appearance="light"] body #deposits-section.deposits-redesign-page table.stocks-table.deposits-redesign-table > thead > tr {
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
  box-shadow: none !important;
}

/* Dark My Plan projections: distinguish dividend income and the 10% benchmark. */
html:not([data-appearance="light"]) body #profile-section#profile-section :is(
  #profile-dividends-at-retirement,
  #profile-dividends-at-retirement-contrib
) {
  color: #64e79e !important;
}
html:not([data-appearance="light"]) body #profile-section#profile-section :is(
  #profile-sp500-at-retirement,
  #profile-sp500-at-retirement-contrib
) {
  color: #ffd54a !important;
}

/* Let the Dashboard performance tooltip show the chart through its surface. */
html body #dashboard-section#dashboard-section#dashboard-section .performance-chart-tooltip {
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .14)) !important;
}
html body #dashboard-section#dashboard-section#dashboard-section .performance-chart-tooltip::after {
  background: rgba(8, 16, 31, .3) !important;
  border-color: rgba(54, 228, 255, .55) !important;
  backdrop-filter: blur(8px) saturate(125%) !important;
  box-shadow: none !important;
}
html body #dashboard-section#dashboard-section#dashboard-section .performance-chart-tooltip.is-below::after {
  border-color: rgba(54, 228, 255, .55) !important;
}
html body #dashboard-section#dashboard-section#dashboard-section .performance-tooltip-card {
  background: rgba(8, 16, 31, .3) !important;
  border: 1px solid rgba(54, 228, 255, .55) !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .05) !important;
  backdrop-filter: blur(8px) saturate(125%) !important;
}
html body #dashboard-section#dashboard-section#dashboard-section .performance-tooltip-card::before { content: none !important; }
html body #dashboard-section#dashboard-section#dashboard-section .performance-tooltip-card::after { content: none !important; }
html[data-appearance="light"][data-appearance="light"] body.theme-blue #dashboard-section#dashboard-section#dashboard-section .performance-chart-tooltip::after {
  background: rgba(255, 255, 255, .3) !important;
  border-color: rgba(0, 156, 147, .55) !important;
}
html[data-appearance="light"][data-appearance="light"] body.theme-blue #dashboard-section#dashboard-section#dashboard-section .performance-chart-tooltip.is-below::after {
  border-color: rgba(0, 156, 147, .55) !important;
}
html[data-appearance="light"][data-appearance="light"] body.theme-blue #dashboard-section#dashboard-section#dashboard-section .performance-tooltip-card {
  background: rgba(255, 255, 255, .3) !important;
  border-color: rgba(0, 156, 147, .55) !important;
  box-shadow: inset 0 1px rgba(107, 142, 170, .12) !important;
}

/* Keep the app version on the same footer row as its legal links. */
html body .app-footer-nav {
  align-items: center;
  flex-wrap: nowrap;
  gap: .75rem;
  white-space: nowrap;
}
html body .app-footer-version {
  color: var(--app-text-primary);
  font-size: .78em;
  font-weight: 500;
  opacity: .58;
  flex: 0 0 auto;
}
@media (max-width: 480px) {
  html body .app-footer-nav { gap: .5rem; font-size: .75rem; }
  html body .app-footer-version { font-size: .7rem; }
}

/* Shared compact three-dot menu for every data table with an Actions column. */
html body .action-menu-panel,
html body #deposits-section .deposits-action-menu-panel {
  box-sizing: border-box !important;
  width: 116px !important;
  min-width: 116px !important;
  max-width: calc(100vw - 24px) !important;
  padding: 4px !important;
  gap: 2px !important;
  border: 1px solid rgba(65, 205, 216, .42) !important;
  border-radius: 9px !important;
  background: linear-gradient(155deg, rgba(15, 39, 51, .98), rgba(7, 20, 30, .99)) !important;
  box-shadow: 0 10px 24px rgba(0, 7, 14, .42), inset 0 1px 0 rgba(154, 231, 239, .07) !important;
  backdrop-filter: blur(9px);
}
html body .action-menu-panel.open,
html body #deposits-section .deposits-action-menu-panel.open { display: grid !important; }
html body .action-menu-panel .action-menu-item,
html body #deposits-section .deposits-action-menu-panel .action-menu-item {
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 27px !important;
  margin: 0 !important;
  padding: 4px 7px !important;
  gap: 7px !important;
  border: 1px solid transparent !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: #e6f1f8 !important;
  font-size: .82rem !important;
  font-weight: 500 !important;
  line-height: 17px !important;
  text-align: left !important;
}
html body .action-menu-panel .menu-icon,
html body #deposits-section .deposits-action-menu-panel .menu-icon {
  display: inline-flex !important;
  flex: 0 0 16px !important;
  align-items: center !important;
  justify-content: center !important;
  width: 16px !important;
  height: 16px !important;
  color: #36d5e5 !important;
  font-size: 15px !important;
}
html body .action-menu-panel .menu-icon svg,
html body #deposits-section .deposits-action-menu-panel .menu-icon svg { display: block !important; width: 16px !important; height: 16px !important; }
html body .action-menu-panel .action-menu-item:hover,
html body #deposits-section .deposits-action-menu-panel .action-menu-item:hover {
  border-color: rgba(42, 199, 214, .25) !important;
  background: rgba(16, 116, 139, .22) !important;
  color: #f5fcff !important;
}
html body .action-menu-panel .delete-btn .menu-icon,
html body #deposits-section .deposits-action-menu-panel .delete-btn .menu-icon { color: #ff777f !important; }
html body .action-menu-panel .action-menu-item.delete-btn:hover,
html body #deposits-section .deposits-action-menu-panel .action-menu-item.delete-btn:hover {
  border-color: rgba(255, 105, 115, .25) !important;
  background: rgba(173, 47, 59, .18) !important;
  color: #ff9b9f !important;
}
html[data-appearance="light"] body .action-menu-panel,
html[data-appearance="light"] body #deposits-section .deposits-action-menu-panel {
  border-color: #b7dce5 !important;
  background: linear-gradient(155deg, rgba(255, 255, 255, .98), rgba(239, 248, 251, .98)) !important;
  box-shadow: 0 10px 24px rgba(29, 64, 83, .16), inset 0 1px 0 #fff !important;
}
html[data-appearance="light"] body .action-menu-panel .action-menu-item,
html[data-appearance="light"] body #deposits-section .deposits-action-menu-panel .action-menu-item { color: #193857 !important; }
/* Polished source selector for inline edits in the Withdrawals table. */
html body #withdrawals-section #withdrawals-table-body .withdrawal-source-select {
  appearance: none !important;
  -webkit-appearance: none !important;
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 40px !important;
  padding: 8px 38px 8px 13px !important;
  border: 1px solid #167e91 !important;
  border-radius: 12px !important;
  color: #e7f1f8 !important;
  background-color: rgba(11, 29, 40, .96) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%234bd7e7' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 18px 18px !important;
  font-size: .95rem !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  cursor: pointer !important;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease !important;
}
html body #withdrawals-section #withdrawals-table-body .withdrawal-source-select:focus {
  outline: none !important;
  border-color: #21d4e5 !important;
  box-shadow: 0 0 0 2px rgba(33, 212, 229, .16) !important;
}
html body #withdrawals-section #withdrawals-table-body .withdrawal-source-select option {
  color: #e7f1f8 !important;
  background: #10232e !important;
  font-weight: 500 !important;
}
html[data-appearance="light"] body #withdrawals-section #withdrawals-table-body .withdrawal-source-select {
  color: #193857 !important;
  border-color: #6bb9c5 !important;
  background-color: #f4fbfd !important;
}
html[data-appearance="light"] body #withdrawals-section #withdrawals-table-body .withdrawal-source-select option {
  color: #193857 !important;
  background: #fff !important;
}
/* Custom, theme-aware dropdown for the editable Withdrawal Source field. */
html body #withdrawals-section .withdrawal-source-picker { position: relative !important; width: 100% !important; min-width: 0 !important; }
html body #withdrawals-section .withdrawal-source-button {
  display: flex !important; align-items: center !important; justify-content: space-between !important; gap: 12px !important;
  box-sizing: border-box !important; width: 100% !important; min-width: 0 !important; min-height: 42px !important;
  padding: 8px 13px 8px 15px !important; border: 1px solid #167e91 !important; border-radius: 12px !important;
  color: #e7f1f8 !important; background: linear-gradient(145deg, rgba(14, 39, 51, .98), rgba(8, 23, 33, .98)) !important;
  font-family: inherit !important; font-size: .95rem !important; font-weight: 600 !important; line-height: 1.25 !important;
  text-align: left !important; cursor: pointer !important;
  box-shadow: inset 0 1px 0 rgba(176, 237, 244, .06) !important; transition: border-color .16s ease, box-shadow .16s ease !important;
}
html body #withdrawals-section .withdrawal-source-button:hover,
html body #withdrawals-section .withdrawal-source-button[aria-expanded="true"] {
  border-color: #20d4e5 !important; box-shadow: 0 0 0 2px rgba(32, 212, 229, .13), inset 0 1px 0 rgba(176, 237, 244, .08) !important;
}
html body #withdrawals-section .withdrawal-source-button-label { overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; }
html body #withdrawals-section .withdrawal-source-button svg { flex: 0 0 18px !important; width: 18px !important; height: 18px !important; fill: none !important; stroke: #62d9e9 !important; stroke-width: 2.5 !important; stroke-linecap: round !important; stroke-linejoin: round !important; transition: transform .16s ease !important; }
html body #withdrawals-section .withdrawal-source-button[aria-expanded="true"] svg { transform: rotate(180deg) !important; }
html body .withdrawal-source-menu {
  position: fixed !important; z-index: 2147483000 !important; display: grid !important; gap: 7px !important;
  box-sizing: border-box !important; max-width: calc(100vw - 24px) !important; max-height: min(300px, calc(100vh - 24px)) !important;
  padding: 10px !important; overflow-y: auto !important; border: 1px solid rgba(30, 156, 177, .8) !important; border-radius: 15px !important;
  background: linear-gradient(155deg, rgba(10, 32, 43, .98), rgba(8, 23, 33, .99)) !important;
  box-shadow: 0 16px 38px rgba(0, 7, 14, .42), inset 0 1px 0 rgba(154, 231, 239, .06) !important; backdrop-filter: blur(12px) !important;
}
html body .withdrawal-source-menu[hidden] { display: none !important; }
html body .withdrawal-source-menu .withdrawal-source-option {
  display: grid !important; grid-template-columns: 22px minmax(0, 1fr) !important; align-items: center !important; gap: 8px !important;
  width: 100% !important; min-height: 48px !important; padding: 9px 12px !important; border: 1px solid rgba(65, 139, 160, .3) !important;
  border-radius: 11px !important; color: #e5eef6 !important; background: rgba(26, 49, 62, .72) !important;
  font-family: inherit !important; font-size: 1rem !important; font-weight: 500 !important; line-height: 1.25 !important;
  text-align: left !important; cursor: pointer !important; transition: .15s ease !important;
}
html body .withdrawal-source-menu .withdrawal-source-option:hover,
html body .withdrawal-source-menu .withdrawal-source-option:focus-visible { outline: none !important; border-color: rgba(49, 191, 210, .62) !important; background: rgba(25, 78, 95, .72) !important; }
html body .withdrawal-source-menu .withdrawal-source-option.selected { border-color: rgba(37, 161, 182, .56) !important; color: #29d6e5 !important; background: linear-gradient(120deg, rgba(9, 86, 101, .6), rgba(20, 56, 72, .72)) !important; font-weight: 650 !important; }
html body .withdrawal-source-check { color: #2edbea !important; font-size: 1.2rem !important; font-weight: 700 !important; opacity: 0 !important; }
html body .withdrawal-source-option.selected .withdrawal-source-check { opacity: 1 !important; }
html[data-appearance="light"] body #withdrawals-section .withdrawal-source-button { color: #193857 !important; border-color: #6bb9c5 !important; background: linear-gradient(145deg, #fff, #f0f8fb) !important; }
html[data-appearance="light"] body .withdrawal-source-menu { border-color: #7abac5 !important; background: linear-gradient(155deg, rgba(255,255,255,.99), rgba(239,248,251,.99)) !important; box-shadow: 0 16px 38px rgba(29,64,83,.18) !important; }
html[data-appearance="light"] body .withdrawal-source-menu .withdrawal-source-option { color: #193857 !important; border-color: #d0e5ea !important; background: #f5fafc !important; }
html[data-appearance="light"] body .withdrawal-source-menu .withdrawal-source-option.selected { color: #007f91 !important; border-color: #72c4cf !important; background: linear-gradient(120deg, #e3fafd, #edf7fa) !important; }

/* Dividends Allocation mobile overrides: win over the generic narrow-table rules above. */
@media (max-width: 760px) {
  html body #sectors-section#sectors-section#sectors-section.active.allocation-view-dividends #allocation-view-subtitle {
    display: -webkit-box !important;
    max-width: 320px !important;
    margin: 0 auto !important;
    overflow: hidden !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
    text-align: center !important;
    text-wrap: balance !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
  }

  html body #sectors-section#sectors-section#sectors-section.active.allocation-view-dividends :is(.allocation-table-head, .allocation-item) {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    grid-template-columns: minmax(0, 1.35fr) minmax(64px, .9fr) minmax(70px, 1fr) minmax(42px, .62fr) !important;
    column-gap: 5px !important;
    padding-inline: 7px !important;
  }

  html body #sectors-section#sectors-section#sectors-section.active.allocation-view-dividends .allocation-table-head {
    min-height: 38px !important;
    padding-block: 4px !important;
    font-size: 8px !important;
    letter-spacing: .035em !important;
    line-height: 1.15 !important;
    white-space: normal !important;
  }

  html body #sectors-section#sectors-section#sectors-section.active.allocation-view-dividends .allocation-table-head span {
    min-width: 0 !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    white-space: normal !important;
  }

  html body #sectors-section#sectors-section#sectors-section.active.allocation-view-dividends .allocation-table-head span:first-child {
    padding-left: 0 !important;
  }

  html body #sectors-section#sectors-section#sectors-section.active.allocation-view-dividends .allocation-item {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    grid-auto-rows: 38px !important;
    padding-block: 0 !important;
    overflow: hidden !important;
  }

  html body #sectors-section#sectors-section#sectors-section.active.allocation-view-dividends .allocation-item .allocation-name {
    min-width: 0 !important;
    gap: 5px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: keep-all !important;
    font-size: 11px !important;
  }

  html body #sectors-section#sectors-section#sectors-section.active.allocation-view-dividends .allocation-item .allocation-name i {
    flex: 0 0 10px !important;
    width: 10px !important;
    height: 10px !important;
  }

  html body #sectors-section#sectors-section#sectors-section.active.allocation-view-dividends :is(.allocation-value, .allocation-percentage, .allocation-holdings) {
    min-width: 0 !important;
    font-size: 10px !important;
    white-space: nowrap !important;
  }

  html body #sectors-section#sectors-section#sectors-section.active.allocation-view-dividends .allocation-pie-wrapper.square-pie {
    position: relative !important;
    justify-self: center !important;
    width: min(100%, 360px) !important;
    height: auto !important;
    min-height: 0 !important;
    max-width: 360px !important;
    max-height: none !important;
    aspect-ratio: 1 / 1 !important;
    margin: 8px auto 0 !important;
  }

  html body #sectors-section#sectors-section#sectors-section.active.allocation-view-dividends .allocation-pie-wrapper.square-pie canvas {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
  }
}

/* Allocation chart popup: allow native vertical list scrolling and touch dismissal. */
@media (max-width: 760px) {
  html body #sectors-section#sectors-section#sectors-section.active.allocation-view-dividends .allocation-hover-popup:not(.is-account-summary) {
    box-sizing: border-box !important;
    max-height: min(62vh, 560px) !important;
    overflow: hidden !important;
    overscroll-behavior: contain !important;
    touch-action: pan-y !important;
  }

  html body #sectors-section#sectors-section#sectors-section.active.allocation-view-dividends .allocation-hover-popup:not(.is-account-summary) .allocation-hover-popup-table {
    min-height: 0 !important;
    overflow: hidden !important;
  }

  html body #sectors-section#sectors-section#sectors-section.active.allocation-view-dividends .allocation-hover-popup:not(.is-account-summary) .allocation-hover-popup-body {
    box-sizing: border-box !important;
    min-height: 0 !important;
    max-height: min(45vh, 380px) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
  }
}

/* Keep Allocation breakdown columns readable on narrow screens. */
@media (max-width: 760px) {
  html body #sectors-section#sectors-section#sectors-section.active .allocation-stats.vertical-list {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
  }
  html body #sectors-section#sectors-section#sectors-section.active.allocation-view-sectors :is(.allocation-table-head, .allocation-item) {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    grid-template-columns: minmax(0, 1.4fr) minmax(68px, .95fr) minmax(56px, .8fr) minmax(28px, .4fr) !important;
    column-gap: 2px !important;
    padding-inline: 4px !important;
  }
  html body #sectors-section#sectors-section#sectors-section.active.allocation-view-countries :is(.allocation-table-head, .allocation-item) {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 350px !important;
    grid-template-columns: minmax(160px, 1.7fr) 82px 80px !important;
    column-gap: 4px !important;
  }
  html body #sectors-section#sectors-section#sectors-section.active .allocation-table-head {
    padding-inline: 4px !important;
    letter-spacing: .06em !important;
    white-space: nowrap !important;
  }
  html body #sectors-section#sectors-section#sectors-section.active.allocation-view-sectors .allocation-table-head span:first-child { padding-left: 0 !important; }
  html body #sectors-section#sectors-section#sectors-section.active .allocation-item {
    height: auto !important;
    min-height: 42px !important;
    max-height: none !important;
    grid-auto-rows: auto !important;
    padding: 6px 8px !important;
    overflow: visible !important;
  }
  html body #sectors-section#sectors-section#sectors-section.active .allocation-item .allocation-name {
    min-width: 0 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.2 !important;
    overflow-wrap: anywhere !important;
  }
}

/* Match the full mobile width of the separate Portfolio Insights panel. */
@media (max-width: 760px) {
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-content > .dashboard-main-grid {
    width: 100% !important;
    min-width: 0 !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-content > .dashboard-main-grid > .dashboard-cash-flow {
    grid-column: 1 / -1 !important;
    justify-self: stretch !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    margin-inline: 0 !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-cash-flow > .dashboard-cash-flow-list {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-cash-flow > .dashboard-panel-title {
    padding-inline: 0 !important;
  }
}

/* On phones, keep the performance chart tooltip pinned to the panel's top-right corner. */
@media (max-width: 760px) {
  html body #dashboard-section#dashboard-section#dashboard-section .performance-chart-container #performance-chart-tooltip {
    position: absolute !important;
    inset: 10px 10px auto auto !important;
    width: min(128px, calc(100% - 20px)) !important;
    max-width: calc(100% - 20px) !important;
    transform-origin: top right !important;
    z-index: 30 !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section .performance-chart-container #performance-chart-tooltip .performance-tooltip-card {
    padding: 4px 6px !important;
    border-radius: 8px !important;
    text-align: center !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section .performance-chart-container #performance-chart-tooltip .performance-tooltip-date {
    overflow: hidden !important;
    font-size: 9px !important;
    line-height: 11px !important;
    text-align: center !important;
    text-overflow: ellipsis !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section .performance-chart-container #performance-chart-tooltip .performance-tooltip-balance {
    justify-content: center !important;
    gap: 6px !important;
    margin-top: 2px !important;
    padding-bottom: 2px !important;
    font-size: 8px !important;
    text-align: center !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section .performance-chart-container #performance-chart-tooltip .performance-tooltip-balance span { font-size: 7px !important; letter-spacing: .03em !important; }
  html body #dashboard-section#dashboard-section#dashboard-section .performance-chart-container #performance-chart-tooltip .performance-tooltip-balance strong { font-size: 9px !important; }
  html body #dashboard-section#dashboard-section#dashboard-section .performance-chart-container #performance-chart-tooltip .performance-tooltip-series-list { margin-top: 1px !important; }
  html body #dashboard-section#dashboard-section#dashboard-section .performance-chart-container #performance-chart-tooltip .performance-tooltip-row { justify-content: center !important; min-height: 16px !important; gap: 0 !important; padding: 2px 0 !important; text-align: center !important; }
  html body #dashboard-section#dashboard-section#dashboard-section .performance-chart-container #performance-chart-tooltip .performance-tooltip-series { flex: 0 0 auto !important; gap: 3px !important; font-size: 9px !important; }
  html body #dashboard-section#dashboard-section#dashboard-section .performance-chart-container #performance-chart-tooltip .performance-tooltip-dot { width: 5px !important; height: 5px !important; }
  html body #dashboard-section#dashboard-section#dashboard-section .performance-chart-container #performance-chart-tooltip .performance-tooltip-percent { margin-left: 6px !important; font-size: 9px !important; }
  html body #dashboard-section#dashboard-section#dashboard-section .performance-chart-container #performance-chart-tooltip::after { content: none !important; }
}

/* Deposits phone layout follows the supplied compact summary and card table. */
@media (max-width: 760px) {
  html body #deposits-section#deposits-section#deposits-section .deposits-page-shell {
    gap: 12px !important;
    padding-top: 0 !important;
  }
  html body #deposits-section#deposits-section#deposits-section .deposits-invested-band {
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    align-items: stretch !important;
    min-height: 154px !important;
    padding: 14px 12px !important;
    border-radius: 14px !important;
  }
  html body #deposits-section#deposits-section#deposits-section .deposits-total-deposits {
    justify-content: center !important;
    gap: 6px !important;
    padding: 0 10px 0 2px !important;
    border: 0 !important;
    border-right: 1px solid var(--mobile-deposits-border) !important;
  }
  html body #deposits-section#deposits-section#deposits-section .deposits-total-deposits .deposits-summary-title {
    font-size: 16px !important;
    white-space: nowrap !important;
  }
  html body #deposits-section#deposits-section#deposits-section .deposits-total-deposits #total-deposits-embedded {
    font-size: clamp(28px, 8vw, 38px) !important;
    letter-spacing: -.04em !important;
  }
  html body #deposits-section#deposits-section#deposits-section .deposits-breakdown {
    display: flex !important;
    justify-content: center !important;
    min-height: 0 !important;
    padding: 0 0 0 10px !important;
  }
  html body #deposits-section#deposits-section#deposits-section #deposits-money-invested-list {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 0 !important;
    height: 100% !important;
  }
  html body #deposits-section#deposits-section#deposits-section #deposits-money-invested-list .breakdown-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 5px !important;
    min-height: 26px !important;
    padding: 3px 0 !important;
    border: 0 !important;
    border-bottom: 1px solid var(--mobile-deposits-border) !important;
  }
  html body #deposits-section#deposits-section#deposits-section #deposits-money-invested-list .breakdown-item:last-child { border-bottom: 0 !important; }
  html body #deposits-section#deposits-section#deposits-section #deposits-money-invested-list .breakdown-label {
    flex: 1 1 auto !important;
    font-size: 11px !important;
    text-overflow: clip !important;
  }
  html body #deposits-section#deposits-section#deposits-section #deposits-money-invested-list .breakdown-value {
    flex: 0 0 auto !important;
    font-size: 14px !important;
    font-weight: 750 !important;
  }
  html body #deposits-section#deposits-section#deposits-section .deposits-history-actions {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) !important;
    gap: 8px !important;
  }
  html body #deposits-section#deposits-section#deposits-section .deposits-history-add-btn,
  html body #deposits-section#deposits-section#deposits-section .deposits-view-switch { height: 50px !important; min-height: 50px !important; }
  html body #deposits-section#deposits-section#deposits-section .deposits-history-add-btn { border-radius: 12px !important; font-weight: 750 !important; }
  html body #deposits-section#deposits-section#deposits-section .deposits-view-switch { border-radius: 12px !important; }
  html body #deposits-section#deposits-section#deposits-section .deposits-table-scroll {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    overflow: visible !important;
  }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table,
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table tbody {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table colgroup,
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table thead { display: none !important; }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table tbody {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
  }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table #deposits-tbody tr {
    display: grid !important;
    grid-template-columns: 26px 24px minmax(68px, 1fr) minmax(72px, 1.15fr) minmax(48px, .9fr) 34px 24px !important;
    align-items: center !important;
    gap: 3px !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 52px !important;
    box-sizing: border-box !important;
    padding: 0 8px !important;
    border: 1px solid var(--mobile-deposits-border) !important;
    border-radius: 10px !important;
    background: var(--mobile-deposits-panel) !important;
  }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table #deposits-tbody td {
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    padding: 8px 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    font-size: 11px !important;
    line-height: 1.25 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table tbody tr > :nth-child(2) { display: block !important; color: var(--mobile-deposits-muted) !important; }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table tbody tr > :first-child { grid-column: 1 !important; }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table tbody tr > :nth-child(2) { grid-column: 2 !important; }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table tbody tr > :nth-child(3) { grid-column: 3 !important; }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table tbody tr > :nth-child(4) { grid-column: 4 !important; }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table tbody tr > :nth-child(5) { grid-column: 5 !important; text-align: right !important; font-weight: 700 !important; }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table tbody tr > :nth-child(6) { grid-column: 6 !important; text-align: center !important; color: var(--mobile-deposits-muted) !important; }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table tbody tr > :nth-child(7) { grid-column: 7 !important; text-align: center !important; }
  html body #deposits-section#deposits-section#deposits-section #deposits-pagination-wrapper {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    padding: 10px 12px !important;
    border-radius: 14px !important;
  }
  html body #deposits-section#deposits-section#deposits-section #deposits-pagination-wrapper .monthly-pagination-left {
    display: grid !important;
    grid-template-columns: auto 76px 1fr !important;
    justify-content: stretch !important;
    width: 100% !important;
    gap: 8px !important;
  }
  html body #deposits-section#deposits-section#deposits-section #deposits-pagination-wrapper .monthly-pagination-left label { grid-column: 1 / -1 !important; text-align: left !important; }
  html body #deposits-section#deposits-section#deposits-section #deposits-page-size { width: 76px !important; }
  html body #deposits-section#deposits-section#deposits-section #deposits-pagination-wrapper .monthly-pagination-info { text-align: left !important; white-space: nowrap !important; }
  html body #deposits-section#deposits-section#deposits-section #deposits-pagination-wrapper .monthly-pagination-right { flex-wrap: nowrap !important; justify-content: space-between !important; gap: 5px !important; }
  html body #deposits-section#deposits-section#deposits-section #deposits-pagination-wrapper .monthly-page-btn { flex: 0 1 32px !important; min-width: 28px !important; width: 32px !important; }
}

@media (max-width: 380px) {
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table #deposits-tbody tr {
    grid-template-columns: 22px 20px minmax(58px, 1fr) minmax(60px, 1.1fr) minmax(42px, .9fr) 30px 20px !important;
    gap: 2px !important;
    padding-inline: 6px !important;
  }
}

/* Keep the mobile Deposits table header and pagination in normal document flow. */
@media (max-width: 760px) {
  html body #deposits-section#deposits-section#deposits-section,
  html body #deposits-section#deposits-section#deposits-section .deposits-page-shell,
  html body #deposits-section#deposits-section#deposits-section .deposits-history-card,
  html body #deposits-section#deposits-section#deposits-section #deposits-table-view {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    position: static !important;
    transform: none !important;
  }
  html body #deposits-section#deposits-section#deposits-section #deposits-table-view {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }
  html body #deposits-section#deposits-section#deposits-section .deposits-table-scroll {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table {
    height: auto !important;
    min-height: 0 !important;
  }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table colgroup {
    display: none !important;
  }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table thead {
    display: block !important;
    position: static !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 0 4px !important;
    overflow: visible !important;
    background: transparent !important;
  }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table thead tr,
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table #deposits-tbody tr {
    display: grid !important;
    grid-template-columns: 26px 24px minmax(68px, 1fr) minmax(72px, 1.15fr) minmax(48px, .9fr) 34px 24px !important;
    gap: 3px !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table thead tr {
    min-height: 34px !important;
    height: auto !important;
    padding: 0 8px 5px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--mobile-deposits-border) !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table thead th {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 28px !important;
    padding: 2px 0 !important;
    overflow: hidden !important;
    color: var(--mobile-deposits-muted) !important;
    font-size: 8px !important;
    font-weight: 700 !important;
    line-height: 1.05 !important;
    text-align: center !important;
    text-overflow: clip !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table thead th:nth-child(1) { grid-column: 1 !important; }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table thead th:nth-child(2) { grid-column: 2 !important; }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table thead th:nth-child(3) { grid-column: 3 !important; }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table thead th:nth-child(4) { grid-column: 4 !important; }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table thead th:nth-child(5) { grid-column: 5 !important; }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table thead th:nth-child(6) { grid-column: 6 !important; }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table thead th:nth-child(7) { grid-column: 7 !important; }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table thead th .deposits-header-info,
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table thead th .column-filter-toggle,
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table thead th .column-filter-menu,
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table thead th .sort-icon { display: none !important; }
  html body #deposits-section#deposits-section#deposits-section #deposits-pagination-wrapper {
    display: grid !important;
    position: static !important;
    inset: auto !important;
    clear: both !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    transform: none !important;
    z-index: auto !important;
  }
  html body #deposits-section#deposits-section#deposits-section #deposits-pagination-wrapper[style*="display: none"] {
    display: none !important;
  }
}

@media (max-width: 380px) {
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table thead tr,
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table #deposits-tbody tr {
    grid-template-columns: 22px 20px minmax(58px, 1fr) minmax(60px, 1.1fr) minmax(42px, .9fr) 30px 20px !important;
    gap: 2px !important;
    padding-inline: 6px !important;
  }
}

@media (max-width: 760px) {
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table thead tr,
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table #deposits-tbody tr {
    grid-template-columns: 30px 20px minmax(60px, 1fr) minmax(70px, 1.15fr) minmax(52px, .9fr) 44px 32px !important;
  }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table thead th {
    justify-content: flex-start !important;
    overflow: visible !important;
    font-size: 9px !important;
    line-height: 1 !important;
    text-align: left !important;
    white-space: nowrap !important;
  }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table thead th:nth-child(1),
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table thead th:nth-child(2),
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table thead th:nth-child(7) {
    justify-content: center !important;
    text-align: center !important;
  }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table thead th:nth-child(5) { justify-content: flex-end !important; text-align: right !important; }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table thead th:nth-child(6) { justify-content: center !important; text-align: center !important; }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table #deposits-tbody td[data-field="date"]:not(:has(input)) {
    position: relative !important;
    font-size: 0 !important;
  }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table #deposits-tbody td[data-field="date"]:not(:has(input))::before {
    content: attr(data-mobile-date-label) !important;
    display: block !important;
    overflow: hidden !important;
    color: var(--mobile-deposits-text) !important;
    font-size: 11px !important;
    line-height: 1.25 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  html body #deposits-section#deposits-section#deposits-section #deposits-tbody tr.action-menu-open,
  html body #deposits-section#deposits-section#deposits-section #deposits-tbody tr.action-menu-open td.action-buttons,
  html body #deposits-section#deposits-section#deposits-section #deposits-tbody tr.action-menu-open .action-menu {
    position: relative !important;
    z-index: 9530 !important;
    overflow: visible !important;
  }
  html body #deposits-section#deposits-section#deposits-section #deposits-tbody tr.action-menu-open .deposits-action-menu-panel.open {
    z-index: 9540 !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
  html body #mobile-deposit-editor {
    --mobile-deposits-panel: #0f1d25;
    --mobile-deposits-border: #263a46;
    --mobile-deposits-text: #e8edf2;
    --mobile-deposits-muted: #a6b3c2;
    --mobile-deposits-accent: #25d5df;
  }
  html[data-appearance="light"] body #mobile-deposit-editor {
    --mobile-deposits-panel: #fff;
    --mobile-deposits-border: var(--appearance-border);
    --mobile-deposits-text: var(--appearance-text);
    --mobile-deposits-muted: var(--appearance-secondary);
    --mobile-deposits-accent: var(--appearance-teal);
  }
  html body #mobile-deposit-editor:not([hidden]) {
    position: fixed !important;
    inset: 0 !important;
    z-index: 12000 !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    overflow-y: auto !important;
    padding: max(20px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom)) !important;
    background: rgba(3, 10, 15, .88) !important;
    backdrop-filter: blur(8px) !important;
  }
  html body #mobile-deposit-editor[hidden] { display: none !important; }
  html body #mobile-deposit-editor .mobile-deposit-editor-card {
    box-sizing: border-box !important;
    display: grid !important;
    gap: 15px !important;
    width: min(100%, 460px) !important;
    margin: auto 0 !important;
    padding: 20px !important;
    border: 1px solid var(--mobile-deposits-border) !important;
    border-radius: 14px !important;
    background: var(--mobile-deposits-panel) !important;
    color: var(--mobile-deposits-text) !important;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .45) !important;
  }
  html body #mobile-deposit-editor .mobile-deposit-editor-card h2 { margin: 0 0 2px !important; font-size: 20px !important; }
  html body #mobile-deposit-editor .mobile-deposit-editor-card label { display: grid !important; gap: 6px !important; color: var(--mobile-deposits-muted) !important; font-size: 13px !important; font-weight: 650 !important; }
  html body #mobile-deposit-editor .mobile-deposit-editor-card input,
  html body #mobile-deposit-editor .mobile-deposit-editor-card select {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 46px !important;
    padding: 0 12px !important;
    border: 1px solid var(--mobile-deposits-border) !important;
    border-radius: 9px !important;
    background: rgba(5, 16, 23, .8) !important;
    color: var(--mobile-deposits-text) !important;
    font-size: 16px !important;
  }
  html body #mobile-deposit-editor .mobile-deposit-editor-row { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
  html body #mobile-deposit-editor .mobile-deposit-editor-back { min-height: 48px !important; border: 0 !important; border-radius: 9px !important; background: var(--mobile-deposits-accent) !important; color: #06222b !important; font-size: 15px !important; font-weight: 750 !important; }
  html body #mobile-deposit-editor .mobile-deposit-editor-error { margin: 0 !important; color: #ff777f !important; font-size: 13px !important; }
}

@media (max-width: 380px) {
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table thead tr,
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table #deposits-tbody tr {
    grid-template-columns: 28px 18px minmax(58px, 1fr) minmax(64px, 1.15fr) minmax(48px, .9fr) 40px 30px !important;
    gap: 2px !important;
  }
}

/* Align the first three Cash Flow labels with the Net Invested Capital row on mobile. */
@media (max-width: 760px) {
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-cash-flow-list > .metric-row {
    grid-template-columns: 22px minmax(0, 1fr) max-content !important;
    column-gap: 7px !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-cash-flow-list > .metric-row > .metric-label {
    grid-column: 2 !important;
    justify-self: start !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
  }
}

/* Mobile Deposits: cleaner amount alignment and contained date input in the editor. */
@media (max-width: 760px) {
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table thead th:nth-child(7) {
    font-size: 0 !important;
  }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table thead th:nth-child(5) {
    justify-content: flex-start !important;
    text-align: left !important;
  }
  html body #deposits-section#deposits-section#deposits-section table.deposits-redesign-table #deposits-tbody td:nth-child(5) {
    justify-self: stretch !important;
    text-align: left !important;
    padding-left: 0 !important;
  }
  html body #mobile-deposit-editor .mobile-deposit-editor-card label:has(input[name="date"]) {
    box-sizing: border-box !important;
    width: 95% !important;
    justify-self: start !important;
    margin-left: 0 !important;
  }
  html body #mobile-deposit-editor .mobile-deposit-editor-card input[name="date"] {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    justify-self: start !important;
    margin-left: 0 !important;
  }
}

/* Keep the mobile deposit editor above the on-screen keyboard, near the app header. */
@media (max-width: 760px) {
  html body #mobile-deposit-editor:not([hidden]) {
    align-items: flex-start !important;
    justify-content: center !important;
    padding-top: max(10px, env(safe-area-inset-top)) !important;
    padding-bottom: 12px !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
  }
  html body #mobile-deposit-editor .mobile-deposit-editor-card {
    margin: 0 !important;
    max-height: calc(100dvh - max(22px, env(safe-area-inset-top)) - 12px) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
  }
}

@media (max-width: 760px) {
  html body #sectors-section#sectors-section#sectors-section.active.allocation-view-sectors .allocation-item .allocation-name {
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 6px !important;
    text-align: left !important;
  }
  html body #sectors-section#sectors-section#sectors-section.active.allocation-view-sectors .allocation-item .allocation-name i {
    flex: 0 0 16px !important;
  }
}

@media (max-width: 760px) {
  html body #deposits-section#deposits-section#deposits-section .deposits-invested-band {
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr) !important;
    min-height: 0 !important;
    padding: 8px 10px !important;
  }
  html body #deposits-section#deposits-section#deposits-section .deposits-total-deposits {
    padding: 0 8px 0 0 !important;
    gap: 4px !important;
  }
  html body #deposits-section#deposits-section#deposits-section .deposits-total-deposits #total-deposits-embedded {
    font-size: clamp(20px, 6.4vw, 30px) !important;
  }
  html body #deposits-section#deposits-section#deposits-section .deposits-breakdown {
    padding-left: 8px !important;
  }
  html body #deposits-section#deposits-section#deposits-section #deposits-money-invested-list .breakdown-item {
    min-height: 23px !important;
    padding-block: 1px !important;
  }
}

/* Compact spacing around the Allocation summary, tabs, and content on phones. */
@media (max-width: 760px) {
  html body #sectors-section#sectors-section#sectors-section.active {
    padding-top: 1mm !important;
    gap: 1mm !important;
  }
  html body #sectors-section#sectors-section#sectors-section > :is(.portfolio-summary-strip, .allocation-switch-wrapper, .allocation-container) {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }
  html body #sectors-section#sectors-section#sectors-section .allocation-account-panel-heading {
    grid-template-columns: 36px minmax(0, 1fr) !important;
    column-gap: 10px !important;
  }
  html body #sectors-section#sectors-section#sectors-section .allocation-account-panel-heading > div {
    grid-column: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    text-align: left !important;
  }
  html body #sectors-section#sectors-section#sectors-section .allocation-account-panel-heading p {
    font-size: 11px !important;
    line-height: 1.25 !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    overflow: hidden !important;
  }
  html body #sectors-section#sectors-section#sectors-section .allocation-account-panel-icon {
    grid-column: 1 !important;
    width: 36px !important;
    height: 36px !important;
    flex-basis: 36px !important;
  }
}

/* Dashboard mobile density: compact summary cards, square panel corners, and content-fit breakdown. */
@media (max-width: 760px) {
  html body #dashboard-section#dashboard-section#dashboard-section :is(.dashboard-summary-item, .dashboard-summary-rankscore) {
    border-radius: 0 !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-summary-item {
    height: 61px !important;
    min-height: 61px !important;
    padding: 5px !important;
    gap: 1px 6px !important;
  }
  html body.theme-blue #dashboard-section.banymay-dashboard .dashboard-summary-item {
    height: 61px !important;
    min-height: 61px !important;
    padding: 5px !important;
    grid-template-columns: 31px minmax(0, 1fr) !important;
    column-gap: 6px !important;
    row-gap: 1px !important;
  }
  html body.theme-blue #dashboard-section.banymay-dashboard .dashboard-summary-icon {
    width: 31px !important;
    height: 31px !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-summary-rankscore,
  html body.theme-blue #dashboard-section.banymay-dashboard .dashboard-summary-rankscore {
    height: 45px !important;
    min-height: 45px !important;
    padding: 5px 10px !important;
    gap: 7px !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-summary-badge-row strong {
    font-size: 14px !important;
    line-height: 18px !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section :is(
    .dashboard-panel,
    .dashboard-summary-item,
    .dashboard-summary-rankscore,
    .dashboard-mobile-metric-rows,
    .dashboard-advanced-metrics-panel,
    .dashboard-advanced-metric-card,
    .dashboard-insight-card,
    .dashboard-performance,
    .dashboard-risk,
    .dashboard-breakdown,
    .dashboard-cash-flow,
    .chart-container,
    .performance-chart-container
  ) {
    border-radius: 0 !important;
    clip-path: none !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-breakdown {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    align-self: start !important;
    grid-row: auto !important;
    grid-template-rows: auto auto !important;
    overflow: visible !important;
  }
  html body #dashboard-section#dashboard-section#dashboard-section .dashboard-breakdown-table-wrap {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    flex: 0 0 auto !important;
    overflow: visible !important;
  }
}

/* Withdrawal mobile layout matching the current card reference. */
.withdrawals-mobile-sort,
.withdrawals-mobile-overview { display: none; }

@media (max-width: 760px) {
  html body #withdrawals-section#withdrawals-section#withdrawals-section.withdrawals-mobile-editing .withdrawals-mobile-edit-header {
    grid-template-columns: 1fr !important;
    min-height: 34px !important;
    margin: 0 0 10px !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section.withdrawals-mobile-editing .withdrawals-mobile-edit-header h2 {
    display: none !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section.withdrawals-mobile-editing #withdrawals-mobile-edit-back {
    min-height: 38px !important;
    gap: 5px !important;
    font-size: 27px !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section.withdrawals-mobile-editing #withdrawals-mobile-edit-back span {
    font-size: 15px !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section.withdrawals-mobile-editing .withdrawals-mobile-edit-form {
    gap: 15px !important;
    padding: 15px 12px 17px !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section.withdrawals-mobile-editing .withdrawals-mobile-edit-type legend,
  html body #withdrawals-section#withdrawals-section#withdrawals-section.withdrawals-mobile-editing .withdrawals-mobile-edit-field > label {
    margin-bottom: 6px !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section.withdrawals-mobile-editing .withdrawals-mobile-type-options {
    gap: 8px !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section.withdrawals-mobile-editing .withdrawals-mobile-type-options label {
    min-height: 42px !important;
    gap: 7px !important;
    padding: 6px 9px !important;
    font-size: 14px !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section.withdrawals-mobile-editing .withdrawals-type-icon {
    width: 21px !important;
    flex-basis: 21px !important;
    font-size: 24px !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section.withdrawals-mobile-editing .withdrawals-mobile-amount-row {
    gap: 8px !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section.withdrawals-mobile-editing .withdrawals-mobile-edit-form :is(input[type="number"], input[type="date"], select) {
    min-height: 42px !important;
    padding: 0 10px !important;
    font-size: 15px !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section.withdrawals-mobile-editing .withdrawals-mobile-date-wrap > span,
  html body #withdrawals-section#withdrawals-section#withdrawals-section.withdrawals-mobile-editing .withdrawals-mobile-country-wrap > span {
    flex-basis: 36px !important;
    font-size: 19px !important;
  }

  html body #withdrawals-section#withdrawals-section#withdrawals-section.active {
    padding: 14px 10px 24px !important;
    background: #03141c !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section .withdrawals-mobile-intro {
    margin-bottom: 17px !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section .withdrawals-mobile-intro h1 {
    margin-bottom: 5px !important;
    font-size: clamp(30px, 8vw, 38px) !important;
    font-weight: 800 !important;
    letter-spacing: -.035em !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section .withdrawals-mobile-intro p {
    font-size: clamp(14px, 3.6vw, 16px) !important;
    color: #9abfe3 !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section .withdrawals-mobile-intro {
    display: none !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section .withdrawals-table-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr) !important;
    gap: 9px !important;
    margin-bottom: 13px !important;
  }
  /* Keep the compact total summary first, with add/sort controls directly below it. */
  html body #withdrawals-section#withdrawals-section#withdrawals-section .withdrawals-mobile-overview {
    order: 1 !important;
    margin: 0 0 10px !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section .withdrawals-table-header {
    order: 2 !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section .withdrawals-mobile-toolbar {
    order: 3 !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section .withdrawals-table-scroll {
    order: 4 !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section .withdrawals-table-header .withdrawals-mobile-sort {
    position: relative !important;
    box-sizing: border-box !important;
    justify-content: flex-start !important;
    padding: 0 27px 0 10px !important;
    border: 1px solid #234959 !important;
    border-radius: 8px !important;
    background: #0b1c25 !important;
    color: #b8cfda !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section .withdrawals-table-header .withdrawals-mobile-sort::after {
    content: '⌄' !important;
    position: absolute !important;
    top: 50% !important;
    right: 9px !important;
    transform: translateY(-58%) !important;
    color: #adc5d0 !important;
    font-size: 16px !important;
    pointer-events: none !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section .withdrawals-table-header .withdrawals-sort-icon {
    display: none !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section .withdrawals-table-header .withdrawals-mobile-sort select {
    appearance: none !important;
    padding: 0 !important;
    color: #b8cfda !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section #add-withdrawal-btn {
    min-height: 47px !important;
    border-radius: 11px !important;
    font-size: clamp(13px, 3.5vw, 16px) !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section .withdrawals-mobile-sort {
    display: flex !important;
    min-width: 0 !important;
    min-height: 47px !important;
    margin: 0 !important;
    border: 1px solid #14637a !important;
    border-radius: 11px !important;
    background: #071e29 !important;
    color: #c7e7ff !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section .withdrawals-sort-icon {
    font-size: 22px !important;
    line-height: 1 !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section .withdrawals-mobile-sort select {
    flex: 1 1 auto !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    font-size: 15px !important;
    color: #d0eaff !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section .withdrawals-mobile-overview {
    display: grid !important;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.15fr) !important;
    align-items: center !important;
    gap: 0 !important;
    width: 100% !important;
    min-height: 80px !important;
    margin: 0 0 12px !important;
    padding: 12px 14px !important;
    border: 1px solid #145168 !important;
    border-radius: 11px !important;
    background: linear-gradient(120deg, #071d28, #031923) !important;
    box-sizing: border-box !important;
  }
  #withdrawals-section .withdrawals-mobile-total {
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    padding-right: 10px !important;
    border-right: 1px solid #246079 !important;
  }
  #withdrawals-section .withdrawals-mobile-total span,
  #withdrawals-section .withdrawals-mobile-source span { color: #a8c9e8 !important; font-size: 12px !important; white-space: nowrap !important; }
  #withdrawals-section .withdrawals-mobile-total strong {
    color: #19e1e8 !important;
    font-size: clamp(19px, 5vw, 26px) !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
  }
  #withdrawals-section .withdrawals-mobile-sources { display: grid !important; gap: 8px !important; min-width: 0 !important; padding-left: 14px !important; }
  #withdrawals-section .withdrawals-mobile-source { display: flex !important; align-items: center !important; justify-content: space-between !important; gap: 5px !important; min-width: 0 !important; }
  #withdrawals-section .withdrawals-mobile-source span { display: inline-flex !important; align-items: center !important; gap: 5px !important; }
  #withdrawals-section .withdrawals-mobile-source strong { color: #19e1e8 !important; font-size: clamp(11px, 3.1vw, 15px) !important; white-space: nowrap !important; }
  #withdrawals-section .withdrawals-mobile-source span::before {
    content: '';
    width: 15px;
    height: 17px;
    flex: 0 0 15px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cellipse cx='12' cy='5' rx='8' ry='3' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M4 5v7c0 1.7 3.6 3 8 3s8-1.3 8-3V5M4 12v7c0 1.7 3.6 3 8 3s8-1.3 8-3v-7' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cellipse cx='12' cy='5' rx='8' ry='3' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M4 5v7c0 1.7 3.6 3 8 3s8-1.3 8-3V5M4 12v7c0 1.7 3.6 3 8 3s8-1.3 8-3v-7' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E") center/contain no-repeat;
  }
  #withdrawals-section .withdrawals-mobile-source-dividend span::before { color: #53cd8b !important; }
  #withdrawals-section .withdrawals-mobile-source-gain span::before { color: #399cff !important; }
  html body #withdrawals-section#withdrawals-section#withdrawals-section .withdrawals-mobile-toolbar {
    min-height: 27px !important;
    margin-bottom: 9px !important;
    color: #a9cbed !important;
    font-size: 15px !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section #withdrawals-table-body tr {
    position: relative !important;
    z-index: 0 !important;
    grid-template-columns: 37% 33% 30% !important;
    grid-template-rows: 36px 22px !important;
    min-height: 75px !important;
    margin-bottom: 6px !important;
    padding: 9px 12px !important;
    border-color: #104559 !important;
    border-radius: 12px !important;
    background: linear-gradient(110deg, #061923, #03141c) !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section #withdrawals-table-body tr:has(.action-menu-panel.open) { z-index: 20 !important; }
  html body #withdrawals-section#withdrawals-section#withdrawals-section #withdrawals-table-body td[data-field="nr"] {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 38px !important;
    height: 38px !important;
    background: #03404b !important;
    color: #18dbe7 !important;
    font-size: 16px !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section #withdrawals-table-body td[data-field="amount"] {
    grid-column: 1 / 3 !important;
    grid-row: 1 !important;
    margin-left: 52px !important;
    font-size: clamp(19px, 5.2vw, 24px) !important;
    color: #18e1e7 !important;
  }
  html body #withdrawals-section#withdrawals-section#withdrawals-section #withdrawals-table-body td.action-buttons { grid-column: 3 !important; grid-row: 1 !important; justify-self: end !important; }
  html body #withdrawals-section#withdrawals-section#withdrawals-section #withdrawals-table-body td[data-field="date"] { display: none !important; }
  html body #withdrawals-section#withdrawals-section#withdrawals-section #withdrawals-table-body td[data-field="month"] { grid-column: 1 !important; grid-row: 2 !important; }
  html body #withdrawals-section#withdrawals-section#withdrawals-section #withdrawals-table-body td[data-field="source"] { grid-column: 2 !important; grid-row: 2 !important; }
  html body #withdrawals-section#withdrawals-section#withdrawals-section #withdrawals-table-body td[data-field="country"] { grid-column: 3 !important; grid-row: 2 !important; }
  html body #withdrawals-section#withdrawals-section#withdrawals-section #withdrawals-table-body td:is([data-field="month"],[data-field="source"],[data-field="country"]) {
    color: #a8c9e8 !important;
    font-size: clamp(10px, 2.8vw, 13px) !important;
  }
  #withdrawals-section #withdrawals-table-body td:is([data-field="month"],[data-field="source"],[data-field="country"])::before {
    content: '';
    width: 15px;
    height: 16px;
    flex: 0 0 15px;
    margin-right: 4px;
    background: #92bff1;
  }
  #withdrawals-section #withdrawals-table-body td[data-field="month"]::before {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='5' width='18' height='16' rx='2' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M7 2v6M17 2v6M3 10h18' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='5' width='18' height='16' rx='2' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M7 2v6M17 2v6M3 10h18' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E") center/contain no-repeat;
  }
  #withdrawals-section #withdrawals-table-body td[data-field="source"]::before {
    background: #399cff;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cellipse cx='12' cy='5' rx='8' ry='3' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M4 5v7c0 1.7 3.6 3 8 3s8-1.3 8-3V5M4 12v7c0 1.7 3.6 3 8 3s8-1.3 8-3v-7' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cellipse cx='12' cy='5' rx='8' ry='3' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M4 5v7c0 1.7 3.6 3 8 3s8-1.3 8-3V5M4 12v7c0 1.7 3.6 3 8 3s8-1.3 8-3v-7' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E") center/contain no-repeat;
  }
  #withdrawals-section #withdrawals-table-body tr[data-withdrawal-source="dividend"] td[data-field="source"]::before { background: #53cd8b; }
  #withdrawals-section #withdrawals-table-body td[data-field="country"]::before {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 22s7-7 7-13a7 7 0 0 0-14 0c0 6 7 13 7 13Z' fill='none' stroke='black' stroke-width='2'/%3E%3Ccircle cx='12' cy='9' r='2.5' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 22s7-7 7-13a7 7 0 0 0-14 0c0 6 7 13 7 13Z' fill='none' stroke='black' stroke-width='2'/%3E%3Ccircle cx='12' cy='9' r='2.5' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E") center/contain no-repeat;
  }
}

/* Desktop tables share the exact compact Edit/Delete popup used by Deposits. */
@media (min-width: 761px) {
  html body .section:is(#deposits-section, #stocks-section, #withdrawals-section, #dividends-section, #stocks-gains-section, .section) .action-menu-panel {
    box-sizing: border-box !important;
    display: none !important;
    width: 116px !important;
    min-width: 116px !important;
    max-width: calc(100vw - 24px) !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 4px !important;
    gap: 2px !important;
    border: 1px solid rgba(65, 205, 216, .42) !important;
    border-radius: 9px !important;
    background: linear-gradient(155deg, rgba(15, 39, 51, .98), rgba(7, 20, 30, .99)) !important;
    box-shadow: 0 10px 24px rgba(0, 7, 14, .42), inset 0 1px 0 rgba(154, 231, 239, .07) !important;
    backdrop-filter: blur(9px);
  }
  html body .section:is(#deposits-section, #stocks-section, #withdrawals-section, #dividends-section, #stocks-gains-section, .section) .action-menu-panel.open { display: grid !important; }
  html body .section:is(#deposits-section, #stocks-section, #withdrawals-section, #dividends-section, #stocks-gains-section, .section) .action-menu-panel .action-menu-item {
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 27px !important;
    margin: 0 !important;
    padding: 4px 7px !important;
    gap: 7px !important;
    border: 1px solid transparent !important;
    border-radius: 6px !important;
    background: transparent !important;
    color: #e6f1f8 !important;
    font-size: .82rem !important;
    font-weight: 500 !important;
    line-height: 17px !important;
    text-align: left !important;
  }
  html body .section:is(#deposits-section, #stocks-section, #withdrawals-section, #dividends-section, #stocks-gains-section, .section) .action-menu-panel .menu-icon {
    display: inline-flex !important;
    flex: 0 0 16px !important;
    align-items: center !important;
    justify-content: center !important;
    width: 16px !important;
    height: 16px !important;
    color: #36d5e5 !important;
    font-size: 0 !important;
  }
  html body .section:is(#deposits-section, #stocks-section, #withdrawals-section, #dividends-section, #stocks-gains-section, .section) .action-menu-panel .menu-icon svg {
    display: block !important;
    width: 16px !important;
    height: 16px !important;
  }
  html body .section:is(#deposits-section, #stocks-section, #withdrawals-section, #dividends-section, #stocks-gains-section, .section) .action-menu-panel .menu-icon:not(:has(svg))::before {
    content: '';
    display: block;
    width: 16px;
    height: 16px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m14%205%205%205%22%2F%3E%3Cpath%20d%3D%22M4%2020l4.5-1%2011-11a2.12%202.12%200%200%200-3-3l-11%2011L4%2020Z%22%2F%3E%3Cpath%20d%3D%22M13%206l5%205%22%2F%3E%3C%2Fsvg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m14%205%205%205%22%2F%3E%3Cpath%20d%3D%22M4%2020l4.5-1%2011-11a2.12%202.12%200%200%200-3-3l-11%2011L4%2020Z%22%2F%3E%3Cpath%20d%3D%22M13%206l5%205%22%2F%3E%3C%2Fsvg%3E") center / contain no-repeat;
  }
  html body .section:is(#deposits-section, #stocks-section, #withdrawals-section, #dividends-section, #stocks-gains-section, .section) .action-menu-panel .delete-btn .menu-icon { color: #ff777f !important; }
  html body .section:is(#deposits-section, #stocks-section, #withdrawals-section, #dividends-section, #stocks-gains-section, .section) .action-menu-panel .delete-btn .menu-icon:not(:has(svg))::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%206h18%22%2F%3E%3Cpath%20d%3D%22M8%206V4h8v2%22%2F%3E%3Cpath%20d%3D%22m19%206-1%2014H6L5%206%22%2F%3E%3Cpath%20d%3D%22M10%2011v5M14%2011v5%22%2F%3E%3C%2Fsvg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%206h18%22%2F%3E%3Cpath%20d%3D%22M8%206V4h8v2%22%2F%3E%3Cpath%20d%3D%22m19%206-1%2014H6L5%206%22%2F%3E%3Cpath%20d%3D%22M10%2011v5M14%2011v5%22%2F%3E%3C%2Fsvg%3E");
  }
  html body .section:is(#deposits-section, #stocks-section, #withdrawals-section, #dividends-section, #stocks-gains-section, .section) .action-menu-panel .action-menu-item:hover {
    border-color: rgba(42, 199, 214, .25) !important;
    background: rgba(16, 116, 139, .22) !important;
    color: #f5fcff !important;
  }
  html body .section:is(#deposits-section, #stocks-section, #withdrawals-section, #dividends-section, #stocks-gains-section, .section) .action-menu-panel .action-menu-item.delete-btn:hover {
    border-color: rgba(255, 105, 115, .25) !important;
    background: rgba(173, 47, 59, .18) !important;
    color: #ff9b9f !important;
  }
  html[data-appearance="light"] body .section:is(#deposits-section, #stocks-section, #withdrawals-section, #dividends-section, #stocks-gains-section, .section) .action-menu-panel {
    border-color: #b7dce5 !important;
    background: linear-gradient(155deg, rgba(255, 255, 255, .98), rgba(239, 248, 251, .98)) !important;
    box-shadow: 0 10px 24px rgba(29, 64, 83, .16), inset 0 1px 0 #fff !important;
  }
  html[data-appearance="light"] body .section:is(#deposits-section, #stocks-section, #withdrawals-section, #dividends-section, #stocks-gains-section, .section) .action-menu-panel .action-menu-item { color: #193857 !important; }
}
/* Allocation mobile: compact rows, keep all four columns visible, and enforce
   a square plotting box so the donut never stretches into an oval. */
@media (max-width: 760px) {
  html body #sectors-section#sectors-section#sectors-section.active.allocation-view-sectors :is(.allocation-table-head,.allocation-item) {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    grid-template-columns: minmax(0, 1.45fr) minmax(68px, .9fr) minmax(72px, .95fr) minmax(48px, .62fr) !important;
    column-gap: 4px !important;
    padding-inline: 6px !important;
  }
  html body #sectors-section#sectors-section#sectors-section.active .allocation-table-head {
    min-height: 32px !important;
    padding-block: 3px !important;
    font-size: 8px !important;
    letter-spacing: .035em !important;
    line-height: 1.1 !important;
  }
  html body #sectors-section#sectors-section#sectors-section.active .allocation-item {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    padding-block: 3px !important;
    overflow: hidden !important;
  }
  html body #sectors-section#sectors-section#sectors-section.active .allocation-item .allocation-name {
    min-width: 0 !important;
    gap: 6px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    font-size: 12px !important;
    line-height: 1 !important;
  }
  html body #sectors-section#sectors-section#sectors-section.active .allocation-item .allocation-name i {
    flex: 0 0 13px !important;
    width: 13px !important;
    height: 13px !important;
  }
  html body #sectors-section#sectors-section#sectors-section.active :is(.allocation-value,.allocation-percentage,.allocation-holdings) {
    min-width: 0 !important;
    font-size: 11px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }
  html body #sectors-section#sectors-section#sectors-section.active .allocation-pie-wrapper.square-pie {
    position: relative !important;
    box-sizing: border-box !important;
    justify-self: center !important;
    width: min(100%, 360px) !important;
    height: auto !important;
    min-height: 0 !important;
    max-width: 360px !important;
    max-height: none !important;
    aspect-ratio: 1 / 1 !important;
    margin: 8px auto 0 !important;
    transform: none !important;
  }
  html body #sectors-section#sectors-section#sectors-section.active .allocation-pie-wrapper.square-pie canvas {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    aspect-ratio: 1 / 1 !important;
  }
}
