/* r323: clear category labels and a shared, quiet financial entry form. */
.family-sharing-hint { margin:6px 0 16px; color:var(--ux-muted); font-size:12px; line-height:1.5; }
:is(#familyCreateVisibility,#familyWalletVisibility,#familyInviteVisibility) { width:100%; min-width:0; min-height:48px; padding:12px; background:var(--ux-bg); color:var(--ux-text); border:1px solid var(--ux-line); border-radius:var(--r-sm); }
#page-wallet .wallet-row-meta { display:flex; align-items:center; gap:8px; min-width:0; font-size:12px; }
#page-wallet .wallet-row-category { display:block; min-width:0; overflow:hidden; text-overflow:ellipsis; font-weight:500; color:var(--ux-text); }
#page-wallet .wallet-row-date { flex:0 1 auto; max-width:50%; overflow:hidden; text-overflow:ellipsis; font-size:11px; color:var(--ux-muted); }
#page-wallet .wallet-row-date::before { content:'·'; margin-right:8px; }
body.ux-r311 :is(#txForm,#businessTxForm) { --entry-tone:var(--brand-secondary); }
body.ux-r311 :is(#txForm,#businessTxForm)[data-entry-tone=expense] { --entry-tone:var(--expense); }
body.ux-r311 :is(#txForm,#businessTxForm)[data-entry-tone=income] { --entry-tone:var(--income); }
body.ux-r311 #txModal #txForm.sheet { width:min(560px,100%); flex-basis:auto; height:auto; padding:16px 20px 0!important; }
body.ux-r311 #txModal .sheet-close-btn { position:absolute!important; right:16px; top:24px!important; margin:0!important; width:44px; height:44px; z-index:7!important; }
body.ux-r311 #txModal .sheet-handle { flex:0 0 24px; height:24px; margin:0 auto; }
body.ux-r311 .entry-head { flex:0 0 auto; padding:0 44px 16px 0; }
body.ux-r311 .entry-head small { color:var(--entry-tone); font-size:11px; font-weight:600; letter-spacing:.04em; }
body.ux-r311 #txModal .entry-head #txTitle { margin:5px 0!important; font:600 24px/1.25 'DM Sans',sans-serif; letter-spacing:-.025em; }
body.ux-r311 .entry-head p { margin:0; font-size:12px; line-height:1.45; color:var(--ux-muted); }
body.ux-r311 #txModal .tx-sheet-scroll { display:flex; flex-direction:column; padding:0 2px 16px; }
body.ux-r311 #txModal .tx-sheet-scroll label { margin:0 0 6px; font-size:12px; line-height:1.4; font-weight:500; letter-spacing:0; text-transform:none; color:var(--ux-muted); }
body.ux-r311 #txModal :is(input:not(.tx-native-visual-select),textarea,.tx-category-picker-btn) { min-height:48px; height:auto; padding:12px 14px; font:400 16px/1.4 'DM Sans',sans-serif; border-radius:var(--r-sm); }
body.ux-r311 #txModal :is(.two-cols,.entry-details,#installmentWrap) { margin-top:16px; }
body.ux-r311 #txModal .two-cols { gap:12px; align-items:end; }
body.ux-r311 #txModal .two-cols > div { min-width:0; }
body.ux-r311 #txModal .tx-category-picker-main b { font-weight:500; font-size:14px; }
body.ux-r311 #txModal .tx-category-picker-icon { display:none; }
/* Options retain their icon column; the compact trigger alone hides its icon. */
body.ux-r311 #txModal .tx-category-option .tx-category-picker-icon { display:grid; grid-column:1; }
body.ux-r311 .tx-category-option > span:nth-child(2) { grid-column:2; word-break:normal; }
body.ux-r311 .tx-category-option > i { grid-column:3; }
body.ux-r311 #txModal .tx-category-picker-btn { background:var(--ux-bg); border-color:var(--ux-line); box-shadow:none; }
body.ux-r311 :is(#txModal .entry-amount,#businessTxForm .entry-amount) { padding:12px 14px; background:var(--ux-bg); border:1px solid var(--ux-line); border-radius:var(--r); border-top:2px solid var(--entry-tone); }
body.ux-r311 :is(#txModal #txValue,#businessTxForm #businessTxAmount) { min-width:0; width:100%; min-height:44px; margin:0; padding:4px 0!important; border:0!important; border-radius:0; box-shadow:none!important; background:transparent!important; color:var(--ux-text)!important; font:600 28px/1.3 'DM Sans',sans-serif!important; letter-spacing:-.025em; }
body.ux-r311 :is(#txModal .entry-amount,#businessTxForm .entry-amount):focus-within { outline:2px solid var(--primary-light); outline-offset:2px; }
body.ux-r311 :is(.entry-details,#businessTxForm .business-tx-more) { border:0; border-top:1px solid var(--ux-line); border-radius:0; background:transparent!important; padding:0; }
body.ux-r311 :is(.entry-details,.business-tx-more) summary { min-height:48px; padding:14px 0; font-size:13px; line-height:1.5; color:var(--ux-text); font-weight:500; cursor:pointer; }
body.ux-r311 .entry-details summary span { display:block; font-size:11px; color:var(--ux-muted); padding-left:15px; }
body.ux-r311 .entry-details .repeat-wrap { margin:0 0 16px; padding:0; border:0; background:transparent; }
body.ux-r311 .entry-details small { display:block; margin:6px 0; font-size:11px; line-height:1.45; color:var(--ux-muted); }
body.ux-r311 #txModal .sheet-actions { margin:0 -20px!important; padding:12px 20px max(12px,var(--oliver-safe-bottom,env(safe-area-inset-bottom)))!important; background:var(--ux-panel)!important; box-shadow:none!important; border-color:var(--ux-line)!important; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.6fr); gap:10px; }
body.ux-r311 :is(#txModal .sheet-actions,#businessTxForm .business-tx-actions) .btn { width:100%; min-width:0; min-height:48px; padding:12px 16px!important; font:500 14px/1.4 'DM Sans',sans-serif; white-space:normal; }
body.ux-r311 #businessTxForm .business-tx-head { padding:8px 20px 16px; }
body.ux-r311 #businessTxForm .business-tx-head small { color:var(--entry-tone); letter-spacing:.04em; font-size:11px; }
body.ux-r311 #businessTxForm .business-tx-head > button { width:44px; height:44px; flex-basis:44px; }
body.ux-r311 #businessTxForm .business-tx-scroll { gap:16px; }
body.ux-r311 #businessTxForm .business-tx-scroll label { min-width:0; font-weight:500; font-size:12px; color:var(--ux-muted); }
body.ux-r311 #businessTxForm :is(input:not(.tx-native-visual-select),textarea,.tx-category-picker-btn) { min-height:48px; height:auto; padding:12px 14px; font:400 16px/1.4 'DM Sans',sans-serif; border-radius:var(--r-sm); background:var(--ux-bg); border-color:var(--ux-line); box-shadow:none; }
body.ux-r311 #businessTxForm .tx-category-picker-btn { position:relative; z-index:2; touch-action:manipulation; }
body.ux-r311 #businessTxForm .tx-category-picker-main { min-width:0; }
body.ux-r311 #businessTxForm .tx-category-picker-main b { font-weight:500; font-size:16px; }
body.ux-r311 #businessTxForm .tx-category-picker-icon { display:none; }
body.ux-r311 #businessTxForm .entry-value-date { align-items:end; }
body.ux-r311 #businessTxForm .business-tx-actions { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.6fr); background:var(--ux-panel); }
body.ux-r311 #businessTxForm .business-tx-more { margin-top:2px; padding:0!important; border:0!important; border-top:1px solid var(--ux-line)!important; border-radius:0!important; background:transparent!important; box-shadow:none!important; overflow:visible; }
body.ux-r311 #businessTxForm .business-tx-more summary { margin:0!important; padding:14px 0; background:transparent!important; list-style-position:inside; }
body.ux-r311 #businessTxForm .business-tx-more[open] { display:grid; gap:14px; }
body.ux-r311 #businessTxForm .business-tx-more[open] summary { margin-bottom:0!important; }
body.ux-r311 #businessTxForm .business-tx-more > label { margin:0; }
body.ux-r311 #businessTxForm .business-tx-more .business-form-grid { gap:12px; }
@media(min-width:900px) { body.ux-r311 #txModal #txForm.sheet { max-width:560px; border-radius:var(--r); } }
@media(max-width:359px) {
  body.ux-r311 #txModal .two-cols,body.ux-r311 #businessTxForm .entry-value-date { grid-template-columns:minmax(0,1fr); }
  #page-wallet .wallet-row-meta { gap:4px; }
  #page-wallet .wallet-row-date::before { margin-right:4px; }
}
@media(prefers-reduced-motion:reduce) { body.ux-r311 :is(#txForm,#businessTxForm) * { scroll-behavior:auto; } }
/* r324: one scrollport and a compact header when the keyboard reduces height. */
body.ux-r311 #businessTxModal .business-tx-sheet { max-height:var(--tx-sheet-height,92dvh); }
body.ux-r311 :is(#txModal,#businessTxModal) :is(.tx-sheet-scroll,.business-tx-scroll) { overflow-anchor:none; scroll-behavior:auto!important; }
body.ux-r311 #txModal .tx-sheet-scroll > * { flex-shrink:0; }
body.ux-r311 :is(#txModal,#businessTxModal).entry-compact-viewport .sheet-handle { height:12px; flex-basis:12px; margin-bottom:0; }
body.ux-r311 :is(#txModal,#businessTxModal).entry-compact-viewport :is(.entry-head,.business-tx-head) { padding-block:4px 10px; }
body.ux-r311 :is(#txModal,#businessTxModal).entry-compact-viewport :is(.entry-head,.business-tx-head) :is(p,small) { display:none; }
body.ux-r311 #txModal.entry-compact-viewport .entry-head #txTitle { font-size:20px; margin-block:4px!important; }
body.ux-r311 #txModal.entry-compact-viewport .sheet-close-btn { top:16px!important; }
body.ux-r311 #txModal.entry-compact-viewport .sheet-actions { padding-bottom:12px!important; }
body.ux-r311 #businessTxModal.entry-compact-viewport .business-tx-sheet { padding-bottom:0!important; }
body.ux-r311 #txModal #txValue:focus { outline:none!important; }
/* r325: selected labels and options keep their full names at every width. */
body.ux-r311 :is(.tx-category-picker-main b,.tx-category-option > span:nth-child(2),.oliver-themed-select-option > span:nth-child(2)) {
  white-space:normal!important; overflow:visible; text-overflow:clip; overflow-wrap:anywhere; line-height:1.45; min-width:0;
}
body.ux-r311 .tx-category-picker-main { flex:1; }
body.ux-r311 .tx-category-option { height:auto; min-height:48px; padding:12px; font-size:14px; font-weight:500; }
body.ux-r311 .tx-category-picker-menu { background:var(--ux-panel); border-color:var(--ux-line); box-shadow:none; }
body.ux-r311 .tx-category-option.active { background:var(--primary-dim); color:var(--ux-text); }
body.ux-r311 .tx-category-option i { color:var(--primary-light); }
body.ux-r311 .tx-category-create { margin:8px 4px 2px; padding-top:8px; border-top:1px solid var(--ux-line); }
body.ux-r311 .tx-category-create-button { width:100%; min-height:44px; border:1px dashed var(--primary-light); border-radius:var(--r-sm); background:var(--primary-dim); color:var(--primary-light); font:600 14px/1.3 'DM Sans',sans-serif; }
body.ux-r311 .tx-category-create-form { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; }
body.ux-r311 .tx-category-create-form input { min-width:0; min-height:44px; padding:10px 12px; background:var(--ux-bg); border:1px solid var(--ux-line); border-radius:var(--r-sm); color:var(--ux-text); }
body.ux-r311 .tx-category-create-form button { min-height:44px; padding:10px 12px; border:0; border-radius:var(--r-sm); background:var(--primary); color:#fff; font-weight:700; }
body.ux-r311 .tx-category-quick-create { margin-top:8px; }
body.ux-r311 .tx-category-quick-open { min-height:36px; padding:6px 2px; border:0; background:transparent; color:var(--primary-light); font:600 13px/1.3 'DM Sans',sans-serif; }
body.ux-r311 .tx-category-quick-form { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:8px; align-items:center; padding:10px; border:1px solid var(--ux-line); border-radius:var(--r-sm); background:var(--ux-bg); }
body.ux-r311 .tx-category-quick-form input { min-width:0; min-height:42px; padding:10px 12px; border:1px solid var(--ux-line); border-radius:var(--r-sm); background:var(--ux-panel); color:var(--ux-text); }
body.ux-r311 .tx-category-quick-form button { min-height:42px; padding:8px 10px; border:0; border-radius:var(--r-sm); background:var(--primary); color:#fff; font:700 13px/1.2 'DM Sans',sans-serif; }
body.ux-r311 .tx-category-quick-form [data-category-quick-cancel] { background:transparent; color:var(--ux-muted); border:1px solid var(--ux-line); }
@media (max-width:360px) { body.ux-r311 .tx-category-quick-form { grid-template-columns:1fr 1fr; } body.ux-r311 .tx-category-quick-form input { grid-column:1 / -1; } }
body.ux-r311 .tx-category-picker-chevron { width:18px; flex-basis:18px; }
body.ux-r311 #txModal.tx-investment-modal .investment-extra { gap:10px; margin-block:12px 16px; }
body.ux-r311 #txModal.tx-investment-modal :is(.investment-note,.investment-quote-hint) { background:var(--ux-bg); border-color:var(--ux-line); color:var(--ux-muted); font-size:12px; margin-block:8px; }
body.ux-r311 #txModal.tx-investment-modal :is(.selected-bank-card,.selected-asset-card,.selic-card) { background:var(--ux-bg); border-color:var(--ux-line); padding:12px; }
body.ux-r311 #txModal.tx-investment-modal :is(.asset-selected-main,.asset-selected-main > div) { min-width:0; }
body.ux-r311 #txModal.tx-investment-modal :is(.selected-bank-card,.selected-asset-card) :is(b,span) { white-space:normal; overflow-wrap:anywhere; }
body.ux-r311 #txModal.tx-investment-modal .bank-grid { grid-template-columns:repeat(3,minmax(0,1fr)); max-height:190px; }
body.ux-r311 #txModal.tx-investment-modal .bank-btn span { white-space:normal; overflow-wrap:anywhere; font-size:11px; }
body.ux-r311 #txModal.tx-investment-modal #txDateWrap { margin-bottom:12px; }
body.ux-r311 #txModal.tx-investment-modal #txNoteLabel { display:block; }
body.ux-r311 #txModal.tx-investment-modal :is(.asset-results,.bank-grid):empty { display:none; }
body.ux-r311 #txModal .investment-lookup { min-width:0; border-bottom:1px solid var(--ux-line); }
body.ux-r311 #txModal .investment-lookup summary { min-height:44px; padding:12px 0; color:var(--primary-light); font-size:13px; cursor:pointer; }
body.ux-r311 #txModal .investment-lookup[open] { padding-bottom:12px; }
body.ux-r311 #txModal .investment-lookup > :is(input,.bank-grid,.asset-results) { margin-block:8px; }
