/* Shared presentation system. No account, payment or budget rules live here. */
body.mbc-ux-review {
  --ui-space-1:4px; --ui-space-2:8px; --ui-space-3:12px; --ui-space-4:16px;
  --ui-space-6:24px; --ui-space-8:32px; --ui-space-12:48px;
  --ui-text-small:.75rem; --ui-text-label:.875rem; --ui-text-body:1rem;
  --ui-text-section:1.25rem; --ui-text-title:1.75rem; --ui-text-amount:1.5rem;
  --ui-weight-normal:400; --ui-weight-medium:500; --ui-weight-strong:600;
  --ui-line-body:1.5; --ui-line-heading:1.3;
  --ui-radius-control:8px; --ui-radius-card:12px; --ui-radius-dialog:16px;
  --ui-control-height:44px; --ui-icon-size:20px;
  --ui-action:#075ecf; --ui-action-text:#fff; --ui-focus:#075ecf;
  --ui-shadow:0 12px 32px #15283f26;
  --ux-blue:#075ecf; --ux-text:#17263b; --ux-muted:#536278;
  font-size:var(--ui-text-label); line-height:var(--ui-line-body);
}
:root { --mbc-safe-top:var(--safe-area-inset-top,env(safe-area-inset-top,0px)); --mbc-safe-bottom:var(--safe-area-inset-bottom,env(safe-area-inset-bottom,0px)); }
body.mbc-ux-review[data-ux-theme=dark] {
  --ux-text:#f0f4f8; --ux-muted:#bac6d3; --ux-blue:#9bc8ff; --ui-focus:#9bc8ff;
  --ui-action:#075ecf; --ui-shadow:0 12px 32px #0006;
}
body.mbc-ux-review :is(button,input,select,textarea,summary,a) { font-family:inherit; touch-action:manipulation; }
body.mbc-ux-review :is(button,input,select,textarea,summary,a,[tabindex]):focus-visible { outline:3px solid var(--ui-focus); outline-offset:3px; }
body.mbc-ux-review :is(button,input,select,textarea) { max-width:100%; }
body.mbc-ux-review :is(.primary,.secondary,.danger,.file-btn,.link-btn,.auth-submit,.auth-tab,.auth-link,.mbc-picker-trigger,.mbc-picker-nav,.mbc-picker-close,.mbc-picker-cancel) {
  min-height:var(--ui-control-height); font-size:var(--ui-text-label); line-height:var(--ui-line-body);
  border-radius:var(--ui-radius-control); white-space:normal; overflow-wrap:anywhere;
}
body.mbc-ux-review :is(.primary,.auth-submit) { background:var(--ui-action); border-color:var(--ui-action); color:var(--ui-action-text); }
body.mbc-ux-review :is(.secondary,.file-btn) { background:var(--ux-card); color:var(--ux-text); border-color:var(--ux-border); }
body.mbc-ux-review .danger { color:var(--ux-red); background:var(--ux-red-bg); border:1px solid var(--ux-red); }
body.mbc-ux-review button:disabled { opacity:.55; cursor:not-allowed; }
@media(hover:hover) {
 body.mbc-ux-review :is(.primary,.auth-submit):hover:not(:disabled) { filter:brightness(.93); }
 body.mbc-ux-review :is(.secondary,.file-btn,.link-btn):hover:not(:disabled) { background:var(--ux-selection); }
}
body.mbc-ux-review button:active:not(:disabled) { filter:brightness(.94); }
body.mbc-ux-review :is(input:not([type=checkbox]):not([type=radio]):not([type=file]),select,textarea) {
  min-height:var(--ui-control-height); min-width:0; font-size:var(--ui-text-body);
  line-height:1.5; border:1px solid var(--ux-border); border-radius:var(--ui-radius-control);
  background:var(--ux-card); color:var(--ux-text); padding:var(--ui-space-2) var(--ui-space-3);
}
body.mbc-ux-review input::placeholder,body.mbc-ux-review textarea::placeholder { color:var(--ux-muted); opacity:1; }
body.mbc-ux-review :is(input[type=checkbox],input[type=radio]) { width:20px; height:20px; min-height:20px; flex-shrink:0; accent-color:var(--ui-action); }
body.mbc-ux-review .check-row { min-height:44px; align-items:center; padding:8px 0; }
body.mbc-ux-review .ui-field-label { display:block; flex-basis:100%; font-size:var(--ui-text-label); font-weight:600; margin:0 0 8px; color:var(--ux-text); }
body.mbc-ux-review .ui-file-trigger { cursor:pointer; }
body.mbc-ux-review .mobile-nav-ai { display:none; }
body.mbc-ux-review.mbc-keyboard-open :is(.app-shell,.auth-screen,.billing-gate) { height:var(--mbc-viewport-height,100dvh); }
body.mbc-ux-review :is(.card,.panel,.settings-card,.ux-tx-summary-card) { border-radius:var(--ui-radius-card); box-shadow:none; }
body.mbc-ux-review .panel { padding:var(--ui-space-6); }
body.mbc-ux-review .panel h3,body.mbc-ux-review #settingsView.ux-settings .settings-card h3 { font-size:var(--ui-text-section); line-height:var(--ui-line-heading); font-weight:600; overflow-wrap:anywhere; }
body.mbc-ux-review .panel-head { gap:12px; margin-bottom:16px; }
body.mbc-ux-review .topbar { gap:16px; margin-bottom:24px; flex-wrap:wrap; }
body.mbc-ux-review :is(#viewTitle,#monthLabel) { overflow-wrap:anywhere; }
body.mbc-ux-review .icon-btn { width:44px; height:44px; min-width:44px; min-height:44px; }
body.mbc-ux-review .month-row>div { min-width:0; }
body.mbc-ux-review #uxCurrentMonth { min-height:44px; font-size:var(--ui-text-small); }
body.mbc-ux-review :is(.cards,.dashboard-insight-grid,.settings-grid) { gap:16px; }
body.mbc-ux-review .card { padding:16px; }
body.mbc-ux-review .ux-kpi-label { font-size:var(--ui-text-label); line-height:1.4; min-height:2.8em; padding-right:32px; }
body.mbc-ux-review .card .sub { font-size:var(--ui-text-small); line-height:1.5; }
body.mbc-ux-review .card .value { --ux-kpi-font-size:1.5rem; font-variant-numeric:tabular-nums; letter-spacing:-.025em; min-width:0; }
body.mbc-ux-review .cards.ui-wide-amounts { grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr)); }
body.mbc-ux-review .cards.ui-wide-amounts .card { grid-column:auto; }
body.mbc-ux-review .cards.ui-wide-amounts .card .value { white-space:normal; overflow-wrap:anywhere; }
body.mbc-ux-review :is(.ux-budget-guidance strong,.ux-budget-guidance p,.ux-result-row small,.ux-result-caption,#expenseTotalLabel) { font-size:var(--ui-text-label); line-height:1.5; }
body.mbc-ux-review .ux-budget-guidance { padding:16px; flex-wrap:wrap; }
body.mbc-ux-review .ux-budget-guidance>div { min-width:0; overflow-wrap:anywhere; }
body.mbc-ux-review .ux-result-row { flex-wrap:wrap; gap:8px 16px; font-size:var(--ui-text-label); }
body.mbc-ux-review .forecast-list { grid-template-columns:minmax(0,1fr); }
body.mbc-ux-review .ux-result-row>* { min-width:0; max-width:100%; overflow-wrap:anywhere; }
body.mbc-ux-review #expenseTotalLabel { overflow-wrap:anywhere; }
body.mbc-ux-review .ux-result-row>strong:last-child { margin-left:auto; overflow-wrap:anywhere; white-space:normal; font-variant-numeric:tabular-nums; text-align:right; }
body.mbc-ux-review .ux-result-total strong:last-child { font-size:var(--ui-text-amount); }
body.mbc-ux-review .ux-distribution-tabs { flex-wrap:wrap; gap:4px; }
body.mbc-ux-review .ux-distribution-tabs button { min-height:44px; font-size:var(--ui-text-small); padding:8px 12px; }
body.mbc-ux-review .ux-category-row { grid-template-columns:minmax(0,1fr) auto; min-height:48px; gap:4px 12px; font-size:var(--ui-text-label); padding:12px 0; }
body.mbc-ux-review .ux-category-row strong { grid-column:1/-1; justify-self:end; font-variant-numeric:tabular-nums; font-size:var(--ui-text-label); overflow-wrap:anywhere; }
body.mbc-ux-review .ux-category-row>span:nth-child(2) { font-size:var(--ui-text-small); }
/* Financial panels keep their own content height; wide rows align numbers in one scan line. */
body.mbc-ux-review .dashboard-insight-grid { align-items:start; }
@media(min-width:701px) {
 body.mbc-ux-review .ux-category-row { grid-template-columns:minmax(0,1fr) minmax(32px,max-content) minmax(84px,max-content); gap:12px; padding:8px 0; }
 body.mbc-ux-review .ux-category-row strong { grid-column:auto; }
}
body.mbc-ux-review .ux-recent-row { flex-wrap:wrap; gap:8px 12px; padding:12px 0; }
body.mbc-ux-review .ux-transaction-text { flex:1 1 160px; }
body.mbc-ux-review .ux-transaction-text :is(strong,small) { overflow-wrap:anywhere; }
body.mbc-ux-review .txn .amount { max-width:100%; font-size:var(--ui-text-body); font-weight:600; font-variant-numeric:tabular-nums; white-space:normal; overflow-wrap:anywhere; text-align:right; }
body.mbc-ux-review .ux-tx-filters { gap:16px; }
body.mbc-ux-review :is(.ux-tx-filters>label,.ux-tx-date-range label) { font-size:var(--ui-text-label); }
body.mbc-ux-review .ux-tx-actions { font-size:var(--ui-text-small); gap:8px; }
body.mbc-ux-review .ux-tx-actions button { min-height:44px; padding:8px 12px; font-size:var(--ui-text-label); color:var(--ux-blue); background:var(--ux-card); }
body.mbc-ux-review :is(.ux-tx-summary-card h3,.ux-tx-summary-card p,.ux-tx-summary-card>div,.ux-tx-summary-period) { font-size:var(--ui-text-label); }
body.mbc-ux-review .ux-tx-summary-card>strong { font-size:var(--ui-text-amount); font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
body.mbc-ux-review :is(.ux-tx-table-panel th,.ux-tx-table-panel td) { font-size:var(--ui-text-label); }
body.mbc-ux-review :is(.ux-tx-budget-month,.ux-tx-table-panel .status-pill,.ux-recurring-row small,.ux-recurring-group h4,.ux-recurring-disclosure) { font-size:var(--ui-text-small)!important; }
body.mbc-ux-review :is(.ux-recurring-row>div>strong,.ux-recurring-amount) { font-size:var(--ui-text-label); overflow-wrap:anywhere; }
body.mbc-ux-review .ux-recurring-row { grid-template-columns:minmax(0,1fr) auto 44px; gap:12px; }
body.mbc-ux-review .ux-recurring-row>div { min-width:0; overflow-wrap:anywhere; }
body.mbc-ux-review .ux-row-menu { width:44px; }
body.mbc-ux-review .ux-row-menu summary { width:44px; height:44px; color:var(--ux-muted); }
body.mbc-ux-review .ux-row-menu-items { top:48px; min-width:min(240px,calc(100vw - 64px)); max-width:calc(100vw - 64px); box-shadow:var(--ui-shadow); }
body.mbc-ux-review .ux-row-menu-items button { min-height:44px; white-space:normal; overflow-wrap:anywhere; font-size:var(--ui-text-label); }
body.mbc-ux-review #settingsView.ux-settings :is(.settings-card p,.cloud-info,.settings-card button,.file-btn,.chip) { font-size:var(--ui-text-label); line-height:1.5; }
body.mbc-ux-review #settingsView.ux-settings .settings-grid>.settings-card { padding:24px; }
@media(min-width:1001px) {
 body.mbc-ux-review #settingsView.ux-settings .settings-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 body.mbc-ux-review #settingsView.ux-settings #uxSettingsCategories { grid-column:1/-1; }
}
body.mbc-ux-review .ux-settings-action>p { font-size:var(--ui-text-small)!important; }
body.mbc-ux-review #settingsView.ux-settings .inline-form input { font-size:var(--ui-text-body); }
body.mbc-ux-review #settingsView.ux-settings .chip { min-height:44px; display:flex; align-items:center; gap:8px; max-width:100%; }
body.mbc-ux-review #settingsView.ux-settings .chip-delete { min-width:44px; min-height:44px; flex-shrink:0; color:var(--ux-muted); }
body.mbc-ux-review .ux-category-used { font-size:var(--ui-text-small); white-space:normal; }
body.mbc-ux-review .auth-card { background:var(--ux-card); color:var(--ux-text); border-color:var(--ux-border); box-shadow:var(--ui-shadow); }
body.mbc-ux-review .billing-gate-card { background:var(--ux-card); color:var(--ux-text); border-color:var(--ux-border); box-shadow:var(--ui-shadow); }
body.mbc-ux-review .auth-mark { background:var(--ui-action); color:var(--ui-action-text); }
body.mbc-ux-review .auth-message.success { background:var(--ux-green-bg); color:var(--ux-green); }
body.mbc-ux-review :is(.auth-language-option,.auth-currency-option):is(:hover,.active) { background:var(--ux-selection); color:var(--ux-text); }
body.mbc-ux-review :is(.auth-language-menu,.auth-currency-menu) { top:48px!important; }
body.mbc-ux-review :is(.auth-screen,.billing-gate) { background:var(--ux-bg); padding-bottom:calc(24px + var(--mbc-safe-bottom)); }
body.mbc-ux-review :is(.auth-language-btn,.auth-currency-btn) { min-height:44px; background:var(--ux-card); color:var(--ux-text); border-color:var(--ux-border); }
body.mbc-ux-review :is(.auth-language-menu,.auth-currency-menu) { background:var(--ux-card); border-color:var(--ux-border); box-shadow:var(--ui-shadow); max-height:min(420px,60dvh); overflow:auto; }
body.mbc-ux-review :is(.auth-language-option,.auth-currency-option) { min-height:44px; color:var(--ux-text); }
body.mbc-ux-review .auth-tabs { background:var(--ux-subtle); }
body.mbc-ux-review .auth-tab { color:var(--ux-muted); }
body.mbc-ux-review .auth-tab.active { color:var(--ux-blue); background:var(--ux-selection); }
body.mbc-ux-review :is(.form-error,.auth-message.error) { color:var(--ux-red); background:var(--ux-red-bg); padding:12px; border-radius:8px; overflow-wrap:anywhere; }
body.mbc-ux-review dialog { max-width:calc(100vw - 24px); max-height:calc(var(--mbc-viewport-height,100dvh) - 24px - var(--mbc-safe-top) - var(--mbc-safe-bottom)); overflow:auto; overscroll-behavior:contain; }
body.mbc-ux-review :is(.form-grid,.form-actions,.ux-confirm-actions) { gap:16px; }
body.mbc-ux-review .form-actions { flex-wrap:wrap; }
body.mbc-ux-review :is(.form-head h2,.ux-confirm-dialog h2) { overflow-wrap:anywhere; }
body.mbc-ux-review :is(.close-btn,.ai-chat-close) { min-width:44px; min-height:44px; flex-shrink:0; color:var(--ux-text); }
body.mbc-ux-review .mbc-picker-trigger { background:var(--ux-card); color:var(--ux-text); border-color:var(--ux-border); }
body.mbc-ux-review .mbc-picker-trigger-value { white-space:normal; overflow:visible; overflow-wrap:anywhere; }
body.mbc-ux-review .mbc-picker-dialog { overflow:auto; padding:0; }
body.mbc-ux-review :is(.mbc-picker-nav,.mbc-picker-close,.mbc-picker-month,.mbc-picker-cancel) { background:var(--ux-card); color:var(--ux-text); border-color:var(--ux-border); min-height:44px; }
body.mbc-ux-review :is(.mbc-picker-nav,.mbc-picker-close) { min-width:44px; }
body.mbc-ux-review .mbc-picker-top { flex-wrap:wrap; gap:8px; }
body.mbc-ux-review .mbc-picker-shell { padding:12px; }
body.mbc-ux-review :is(.mbc-picker-days,.mbc-picker-weekdays) { gap:0; }
body.mbc-ux-review .mbc-picker-day { min-height:44px; font-size:var(--ui-text-label); color:var(--ux-text); aspect-ratio:auto; }
body.mbc-ux-review .mbc-picker-day.other { color:var(--ux-muted); }
body.mbc-ux-review :is(.mbc-picker-day.selected,.mbc-picker-month.selected) { background:var(--ui-action); color:var(--ui-action-text); }
body.mbc-ux-review :is(.mbc-picker-day,.mbc-picker-month):hover:not(.selected) { background:var(--ux-selection); }
body.mbc-ux-review .ux-ai-panel { height:var(--mbc-viewport-height,100dvh); max-height:var(--mbc-viewport-height,100dvh); }
body.mbc-ux-review .ai-chat-shell { display:flex; flex-direction:column; min-height:0; }
body.mbc-ux-review .ai-chat-head { color:var(--ux-text); padding-top:max(16px,var(--mbc-safe-top)); flex-shrink:0; }
body.mbc-ux-review .ai-chat-head :is(h2,p) { color:var(--ux-text); }
body.mbc-ux-review .ai-chat-messages { min-height:80px; flex:1 1 auto; overflow:auto; }
body.mbc-ux-review .ai-msg { background:var(--ux-card); color:var(--ux-text); border-color:var(--ux-border); overflow-wrap:anywhere; font-size:var(--ui-text-label); box-shadow:none; }
body.mbc-ux-review .ai-msg.user { background:var(--ux-selection); color:var(--ux-text); }
body.mbc-ux-review .ai-chat-title span { color:var(--ux-muted); font-size:var(--ui-text-small); }
body.mbc-ux-review .ai-chat-note { background:var(--ux-card); color:var(--ux-muted); font-size:var(--ui-text-small); }
body.mbc-ux-review .ai-chat-send { min-height:44px; background:var(--ui-action); color:var(--ui-action-text); }
body.mbc-ux-review .dialog-actions { display:flex; gap:12px; flex-wrap:wrap; }
body.mbc-ux-review .ai-chat-form { padding-bottom:max(16px,var(--mbc-safe-bottom)); flex-shrink:0; }
body.mbc-ux-review .ux-ai-suggestions { flex-shrink:0; padding:12px; }
body.mbc-ux-review .ux-ai-suggestions button { font-size:var(--ui-text-label); }
body.mbc-ux-review #toast { max-width:calc(100vw - 32px); white-space:normal; overflow-wrap:anywhere; font-size:var(--ui-text-label); background:var(--ux-text); color:var(--ux-card); }
body.mbc-ux-review #uiSettingsLogout { display:none; }
body.mbc-ux-review .topbar #addButton:not(.ux-add-circle) { min-height:44px!important; }
@media(min-width:1001px) and (max-width:1199px) {
 body.mbc-ux-review #summaryCards:not(.ui-wide-amounts) { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media(max-width:1000px) and (min-width:701px) {
 body.mbc-ux-review .nav-btn span { display:block!important; position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
}
@media(max-width:700px) {
 body.mbc-ux-review main { order:1; padding:16px 16px 24px!important; }
 body.mbc-ux-review .app-shell>.sidebar { position:static!important; inset:auto!important; order:2; flex:0 0 auto; width:auto!important; height:auto!important; max-height:45dvh; overflow:auto!important; }
 body.mbc-ux-review .sidebar nav { grid-template-columns:minmax(44px,1.1fr) minmax(44px,1.1fr) minmax(44px,1.25fr) minmax(44px,1.15fr) minmax(44px,.8fr)!important; gap:2px!important; }
 body.mbc-ux-review .sidebar nav>#mobileLogoutBtn { display:none!important; }
 body.mbc-ux-review #uiSettingsLogout { display:inline-flex; margin-top:16px; }
 body.mbc-ux-review .sidebar nav>button { min-width:44px; min-height:56px; height:auto; display:flex; flex-direction:column; justify-content:flex-start; align-items:center; gap:4px; padding:8px 0!important; background:transparent; color:var(--ux-muted); }
 body.mbc-ux-review .sidebar .mobile-nav-ai { display:flex!important; border:0; border-radius:var(--ui-radius-control); box-shadow:none; }
 body.mbc-ux-review .sidebar .mobile-nav-ai>span { display:block!important; font-size:var(--ui-text-small)!important; line-height:1.3!important; white-space:normal!important; overflow-wrap:anywhere; }
 body.mbc-ux-review .sidebar .mobile-nav-ai :is(svg,img) { width:20px; height:20px; }
 body.mbc-ux-review .sidebar { padding-bottom:max(8px,var(--mbc-safe-bottom))!important; }
 body.mbc-ux-review .nav-btn span,body.mbc-ux-review .mobile-nav-logout span { font-size:var(--ui-text-small)!important; line-height:1.3!important; }
 body.mbc-ux-review .sidebar nav>button>span { hyphens:none; word-break:break-all; overflow-wrap:anywhere; text-wrap:balance; }
 body.mbc-ux-review .panel,body.mbc-ux-review #settingsView.ux-settings .settings-grid>.settings-card { padding:16px; }
 body.mbc-ux-review .cards { gap:12px; }
 body.mbc-ux-review #transactionsView.ux-transactions .ux-tx-filters>label:has(#uxPeriodFilter) { grid-column:1/-1; }
 body.mbc-ux-review #transactionsView.ux-transactions .ux-tx-filters>label:has(#uxStatusFilter) { grid-column:auto; }
 body.mbc-ux-review #transactionsView.ux-transactions .ux-tx-filters select {
  min-height:44px; font-size:var(--ui-text-label); font-weight:500; padding-inline:10px 24px;
  appearance:none; -webkit-appearance:none;
  background-image:linear-gradient(45deg,transparent 50%,var(--ux-muted) 50%),linear-gradient(135deg,var(--ux-muted) 50%,transparent 50%);
  background-position:calc(100% - 15px) 50%,calc(100% - 11px) 50%; background-size:4px 4px; background-repeat:no-repeat;
 }
 body.mbc-ux-review .card { padding:12px; }
 body.mbc-ux-review .cards .card:last-child .ux-kpi-label { min-height:0; }
 body.mbc-ux-review .topbar :is(h1,#monthLabel) { font-size:var(--ui-text-section); line-height:1.4; }
 body.mbc-ux-review .month-row>div { gap:4px; }
 body.mbc-ux-review .ux-recurring-row { grid-template-columns:minmax(0,1fr) 44px; }
 body.mbc-ux-review .ux-recurring-row>div:first-child { grid-column:1; }
 body.mbc-ux-review .ux-recurring-amount { grid-column:1; grid-row:2; font-size:var(--ui-text-body); }
 body.mbc-ux-review .ux-recurring-row .ux-row-menu { grid-column:2; grid-row:1/3; }
 body.mbc-ux-review #transactionsView.ux-transactions .table-wrap tr[data-ux-id] { grid-template-columns:minmax(0,1fr) 44px; padding:16px!important; gap:8px 12px; }
 body.mbc-ux-review #transactionsView.ux-transactions .table-wrap td:nth-child(-n+6) { grid-column:1; grid-row:auto; padding-right:0!important; text-align:left; white-space:normal!important; font-size:var(--ui-text-label)!important; }
 body.mbc-ux-review #transactionsView.ux-transactions .table-wrap td:nth-child(5) { grid-column:1/-1; grid-row:auto; font-size:var(--ui-text-body)!important; font-weight:600; }
 body.mbc-ux-review #transactionsView.ux-transactions .table-wrap td:nth-child(7) { position:static; grid-column:2; grid-row:1/3; justify-self:end; }
 body.mbc-ux-review .ux-ai-panel { width:100%; max-width:100%; border-radius:0; }
 body.mbc-ux-review #toast { bottom:calc(var(--mbc-nav-height,100px) + 16px); }
 body.mbc-ux-review.mbc-native main { padding:16px calc(16px + var(--mbc-safe-right,0px)) 24px calc(16px + var(--mbc-safe-left,0px))!important; }
}
@media(max-width:360px) {
 body.mbc-ux-review .cards { grid-template-columns:1fr; }
 body.mbc-ux-review .ux-kpi-label { min-height:0; }
 body.mbc-ux-review .ux-tx-filters { grid-template-columns:1fr; }
 body.mbc-ux-review .ux-tx-date-range { flex-direction:column; }
 body.mbc-ux-review .ux-tx-date-range label { width:100%; }
}
@media(max-width:700px) and (forced-colors:active) {
 body.mbc-ux-review #transactionsView.ux-transactions .ux-tx-filters select { appearance:auto; -webkit-appearance:auto; background-image:none; padding-inline:10px 4px; }
}
@media(max-height:600px) {
 body.mbc-ux-review .ux-ai-suggestions { max-height:160px; overflow:auto; }
 body.mbc-ux-review .auth-screen { align-items:start!important; }
}
@media(max-width:700px) and (orientation:landscape) {
 body.mbc-ux-review.mbc-native main { padding-top:calc(16px + var(--mbc-safe-top))!important; }
}
body.mbc-ux-review.mbc-native .topbar #addButton.ux-add-circle.add-button-placeholder { display:inline-flex!important; visibility:visible!important; pointer-events:auto!important; }

/* Settings follow available content width; DOM and keyboard order stay equal. */
body.mbc-ux-review #settingsView.ux-settings { container-type:inline-size; container-name:settings; }
body.mbc-ux-review #settingsView.ux-settings .settings-grid { grid-template-columns:minmax(0,1fr); align-items:stretch; gap:16px; }
body.mbc-ux-review #settingsView.ux-settings .settings-grid>.settings-card { grid-column:auto; min-width:0; }
body.mbc-ux-review #settingsView.ux-settings :is(#billingStatusCard,#appTrialCard,#uxSettingsCategories,#uxSettingsData) { grid-column:1/-1; }
body.mbc-ux-review #settingsView.ux-settings #uxSettingsData { container-type:inline-size; container-name:settings-data; }
body.mbc-ux-review #settingsView.ux-settings .ux-theme-settings select { width:100%; min-width:0; max-width:100%; }
body.mbc-ux-review #settingsView.ux-settings :is(.ux-settings-safe-actions,.ux-settings-danger-actions) { grid-template-columns:minmax(0,1fr); gap:16px; }
body.mbc-ux-review #settingsView.ux-settings .ux-settings-danger-actions { padding-top:20px; margin-top:24px; border-top:1px solid var(--ux-border); }
body.mbc-ux-review #settingsView.ux-settings .ux-settings-action>button,
body.mbc-ux-review #settingsView.ux-settings .ux-settings-action>.file-btn { display:flex; align-items:center; justify-content:center; width:100%; min-height:44px; }
@container settings (min-width:650px) {
 body.mbc-ux-review #settingsView.ux-settings .settings-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@container settings (min-width:1160px) {
 body.mbc-ux-review #settingsView.ux-settings .settings-grid { grid-template-columns:minmax(0,3fr) repeat(2,minmax(0,2fr)); }
 body.mbc-ux-review #settingsView.ux-settings #uxSettingsData { grid-column:auto; }
}
@container settings-data (min-width:360px) {
 body.mbc-ux-review #settingsView.ux-settings .ux-settings-danger-actions { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@container settings-data (min-width:540px) {
 body.mbc-ux-review #settingsView.ux-settings .ux-settings-safe-actions { grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); }
}
/* Give the forecast labels hierarchy without changing any calculation. */
body.mbc-ux-review #monthStatus .ux-result-row>span{font-weight:600}
body.mbc-ux-review #monthStatus .ux-result-row small,body.mbc-ux-review #monthStatus .ux-result-caption{font-size:.8125rem;font-weight:400;line-height:1.55;color:var(--ux-muted)}

/* The payment review owns its spacing; generic dialogs expect an inner form. */
body.mbc-ux-review #billingManualConfirmation {
  width:min(560px,calc(100vw - 24px)); max-width:calc(100vw - 24px);
  max-height:calc(var(--mbc-viewport-height,100dvh) - 24px - var(--mbc-safe-top,0px) - var(--mbc-safe-bottom,0px));
  padding:24px; overflow:auto; overscroll-behavior:contain; overflow-wrap:anywhere;
}
body.mbc-ux-review #billingManualConfirmation h2 {
  margin:0 0 16px; font-size:1.25rem; line-height:1.3; font-weight:700;
}
body.mbc-ux-review #billingManualConfirmation p {
  margin:0 0 16px; font-size:.875rem; line-height:1.6;
}
body.mbc-ux-review #billingManualConfirmation>p:nth-of-type(1) { color:var(--ux-muted); }
body.mbc-ux-review #billingManualConfirmation>p:nth-of-type(2) { font-size:1rem; font-weight:600; }
body.mbc-ux-review #billingManualConfirmation #billingManualConfirmTerms { color:var(--ux-muted); font-size:.8125rem; }
body.mbc-ux-review #billingManualConfirmation .settings-actions {
  display:flex; justify-content:flex-end; flex-wrap:wrap; gap:12px; margin:24px 0 0;
}
body.mbc-ux-review #billingManualConfirmation .settings-actions button {
  min-height:44px; max-width:100%; white-space:normal; overflow-wrap:anywhere;
}
@media(max-width:480px) {
  body.mbc-ux-review #billingManualConfirmation { padding:16px; }
  body.mbc-ux-review #billingManualConfirmation .settings-actions button { flex:1 1 180px; }
}

/* Keep available spending prominent in either orientation. Use the dashboard's
   actual content width, including when a sidebar or safe-area reduces it. */
body.mbc-ux-review #dashboardView { container:budget-dashboard / inline-size; }
body.mbc-ux-review #dashboardView #summaryCards:not(.ui-wide-amounts) {
 grid-template-columns:repeat(4,minmax(0,1fr));
}
body.mbc-ux-review #dashboardView #summaryCards .card:last-child {
 grid-column:1/-1;
}
@container budget-dashboard (max-width:600px) {
 body.mbc-ux-review #dashboardView #summaryCards:not(.ui-wide-amounts) {
  grid-template-columns:repeat(2,minmax(0,1fr));
 }
}
@supports not (container-type:inline-size) {
 @media(max-width:600px) {
  body.mbc-ux-review #dashboardView #summaryCards:not(.ui-wide-amounts) {
   grid-template-columns:repeat(2,minmax(0,1fr));
  }
 }
}
