/* Narrow screens use the available width without shrinking text or touch targets. */
@media (max-width: 800px) {
 .shell { min-width: 0; }
 main { padding: 18px 14px; }
 .shell > header { margin: 10px 14px 0; padding: 0 10px; min-height: 54px; height: auto; gap: 6px; }
 .breadcrumb { min-width: 0; margin-left: 0; overflow-wrap: anywhere; }
 .header-right { gap: 6px; }
 #menu, #privacy, #closeModal { min-width: 44px; min-height: 44px; }
 #sidebar { max-width: calc(100vw - 24px); max-height: calc(100dvh - 16px); }
 .page-head { flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
 .toolbar, .panel { min-width: 0; }
 .panel { --mobile-panel-padding: 16px; padding: var(--mobile-panel-padding); }
 .toolbar > #search { width: 100%; min-width: 0; }
 .toolbar > .segmented, .dashboard-toolbar > .segmented { max-width: 100%; height: auto; flex-wrap: wrap; }
 .segmented button { min-height: 36px; }
 .panel-heading, .cashflow-context, .setting-line { flex-wrap: wrap; gap: 10px; }
 .cashflow-controls { flex-wrap: wrap; }
 .summary-stats > .summary-card { min-width: 0; }
 .summary-stats .summary-value, .analytics-kpi strong { overflow-wrap: anywhere; }
 dialog#modal { width: min(480px, calc(100% - 20px)); max-width: none; max-height: calc(100dvh - 20px); padding: 16px; overflow-y: auto; overscroll-behavior: contain; }
 #form :is(input:not([type=hidden]), textarea), .toolbar > #search { font-size: 16px; }
 #form[data-finance-type="transaction"] label:has(input[name="name"]) {
  --transaction-description-label-size: 13px;
  font-size: var(--transaction-description-label-size);
 }
 #form[data-finance-type="transaction"] input[name="name"]::placeholder {
  font-size: var(--transaction-description-label-size);
 }
 #form .finance-form-grid > * { min-width: 0; }

 .transaction-panel .table-wrap { overflow: visible; }
 .transaction-panel .transaction-table { display: block; min-width: 0; width: 100%; }
 .transaction-table colgroup { display: none; }
 .transaction-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
 .transaction-table tbody { display: block; }
 .transaction-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--nexo-surface-border); }
 .transaction-table tbody tr:last-child { border-bottom: 0; }
 .transaction-table tbody tr > td:nth-child(n) { display: block; min-width: 0; padding: 0; border: 0; text-align: left; overflow-wrap: anywhere; }
 .transaction-table tbody td:nth-child(-n+2) { grid-column: 1 / -1; }
 .transaction-table .tx-category-account { align-items: flex-start; }
 .transaction-table :is(.tx-invoice, .tx-timing-note) { align-items: flex-start; justify-content: flex-start; }
 .transaction-table .tx-row-actions { justify-content: flex-start; }
 .transaction-table .tx-row-actions button, .transaction-table .tx-status-button { min-height: 44px; min-width: 44px; }
 .transaction-table td[data-mobile-label]::before { content: attr(data-mobile-label); display: block; font-size: 11px; color: var(--text-secondary); margin-bottom: 5px; }
 .tx-filter-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
 .tx-filter-metrics > div:first-child { grid-column: 1 / -1; }
 .tx-filter-metrics strong { white-space: normal; overflow-wrap: anywhere; }
}

@media (max-width: 380px) {
 main { padding-inline: 10px; }
 .panel { --mobile-panel-padding: 12px; }
 #form .finance-form-grid { grid-template-columns: minmax(0, 1fr); }
 .cashflow-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
 .cashflow-totals > div:last-child { grid-column: 1 / -1; }
}

/* Prevent tap zoom while keeping pinch-to-zoom available. */
@media (max-width: 800px), (pointer: coarse) {
 html, body, button, a, summary, label, input, select, textarea { touch-action: manipulation; }
 :is(input:not([type=hidden],[type=checkbox],[type=radio],[type=file]),select,textarea,[contenteditable=true]) { font-size: 16px !important; }
}

.writing-field { position: relative; min-width: 0; }
.writing-field > input { width: 100%; }
.writing-mirror {
 position: absolute; display: flex; align-items: center; overflow: hidden;
 white-space: pre; color: transparent; pointer-events: none;
}
.writing-mirror > span { display: block; flex: none; }
.writing-mark { text-decoration: underline wavy #df2525; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.writing-popup {
 position: absolute; bottom: calc(100% + 4px); z-index: 5; max-width: 100%;
 padding: 7px 14px; border: 0; border-radius: 999px;
 background: #e7eef4; color: #24465f; box-shadow: 0 4px 12px #20304426; font-size: 14px;
}
.writing-popup::after { content: ""; position: absolute; top: 100%; left: var(--writing-tail, 50%); transform: translateX(-50%); border: 6px solid transparent; border-top-color: #e7eef4; border-bottom: 0; }
.writing-popup[hidden] { display: none; }
#form label:has(> .required-label-text > .required-marker) > .writing-field > input {
 background: var(--segment-surface); border-color: var(--segment-border);
}

[data-picker=category] > .control-trigger .control-label,
[data-picker=category] .control-options .option-label {
 display: flex; align-items: center; gap: 9px; line-height: 1.5;
}
[data-picker=category] :is(.control-label,.option-label) > .category-emoji {
 width: 24px; height: 24px; flex: 0 0 24px; font-size: 19px; line-height: 1;
}
[data-picker=category] :is(.control-label,.option-label) > .nexo-icon {
 width: 24px; height: 24px; flex: 0 0 24px;
}
#form :is(input[type=text],input[type=number],input[type=email],input[type=tel],input[type=url],textarea),
#profileForm :is(input[type=text],input[type=number],input[type=email],input[type=tel],textarea),
#form .filter-picker:not(.workspace-picker) > .control-trigger {
 background: #e9eef3;
 border-color: #d1dce6;
}
#form label:has(.required-marker) :is(input[type=text],input[type=number],input[type=email],input[type=tel],textarea,.control-trigger) {
 background: #dfe8f0;
 border-color: #b9cddd;
}
#form :is(input,textarea):focus-visible, #profileForm input:focus-visible { border-color: #758fa7; }
.modal-heading-title { display: flex; align-items: center; gap: 9px; }
#modalGoalHelp { display: none; }
#modal:has(#form[data-finance-type=goal]) #modalGoalHelp { display: inline-flex; }
.goal-monthly-plan[hidden] { display: none; }

.monthly-forecast > .panel-heading { border-bottom: 0; padding-bottom: 0; margin-bottom: 14px; }
.monthly-forecast-totals { padding: 4px 0 12px; }
.forecast-sources { border-top: 1px solid var(--nexo-surface-border); padding-top: 7px; }
.forecast-sources > summary {
 display: flex; align-items: center; justify-content: space-between; gap: 8px;
 cursor: pointer; list-style: none; color: var(--option-ink); min-height: 40px; font-size: 12px;
}
.forecast-sources > summary::-webkit-details-marker { display: none; }
.forecast-sources[open] > summary > svg { transform: rotate(180deg); }
.forecast-source-groups { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,220px),1fr)); gap: 12px; }
.forecast-source-groups > section { background: #e9eef3; border-radius: var(--control-radius); padding: 12px 14px; min-width: 0; }
.forecast-source-groups h3 { margin: 0; font-size: 13px; }
.forecast-source-groups ul { margin: 4px 0 0; padding: 0; list-style: none; }
.forecast-source-groups li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--option-border); }
.forecast-source-groups li:last-child { border-bottom: 0; }
.forecast-source-groups li > span { min-width: 0; overflow-wrap: anywhere; }
.forecast-source-groups small { display: block; color: var(--option-ink); margin-top: 2px; }
.forecast-source-groups strong { flex: 0 0 auto; }

:root {
 --navigation-glass: linear-gradient(155deg,#ffffffeb,#edf4faf2);
 --navigation-glass-edge: #f9fdffe0;
 --navigation-glass-shadow: 0 8px 24px #31465c2c;
}
@supports ((backdrop-filter: blur(16px)) or (-webkit-backdrop-filter: blur(16px))) {
 :root { --navigation-glass: linear-gradient(155deg,#ffffffae,#eaf1f99e); }
}
.mobile-dock, .mobile-menu-overlay { display: none; }
.shell > header .header-brand { display: none; }
@media (max-width: 800px) {
 @supports (-webkit-touch-callout: none) {
  html { -webkit-text-size-adjust: 100%; }
  html body :is(input:not([type=hidden],[type=checkbox],[type=radio],[type=file]),select,textarea,[contenteditable=true]) { font-size: 17px !important; }
 }
 .shell { padding-bottom: calc(88px + env(safe-area-inset-bottom,0px)); }
 .shell > header { margin-top: max(10px,env(safe-area-inset-top,0px)); }
 .shell > header .breadcrumb { display: none; }
 .shell > header .header-brand { display: inline-flex; align-items: center; margin-right: auto; white-space: nowrap; text-decoration: none; font-size: 23px; }
 .page-head.is-overview .subtitle { display: none; }
 .shell > header .header-brand .logo { width: 24px; height: 26px; font-size: 22px; translate: 4px 0; }
 #menu { display: none; }
 .cloud-status-label { max-width: 85px; }
 .page-head.has-action { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; column-gap: 8px; }
 .page-head > div { min-width: 0; }
 .page-head h1 { overflow-wrap: anywhere; }
 .page-head.has-action .primary { font-size: 11px; padding: 6px 9px; min-height: 42px; gap: 6px; }
 .page-head.has-action .primary > span { width: 20px; height: 20px; flex-basis: 20px; }
 .page-head.is-centered { justify-content: center; text-align: center; }
 .dashboard-toolbar > .segmented { justify-self: center; }
 .dashboard-grid .panel-heading:has(.cashflow-controls) { flex-direction: column; align-items: center; }
 .cashflow-controls { justify-content: center; width: 100%; }
 .mobile-dock {
  position: fixed; z-index: 65; left: 50%; transform: translateX(-50%);
  bottom: calc(10px + env(safe-area-inset-bottom,0px)); width: min(calc(100% - 20px),490px);
  display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 3px;
  align-items: center; padding: 5px; border-radius: 999px;
  border: 1px solid #ffffffcf; background: #f8fbfbed;
  box-shadow: 0 8px 32px #21354b24, inset 0 1px 0 #fff;
 }
 @supports ((backdrop-filter: blur(16px)) or (-webkit-backdrop-filter: blur(16px))) {
  .mobile-dock { background: #f8fbfbd1; -webkit-backdrop-filter: blur(18px) saturate(1.35); backdrop-filter: blur(18px) saturate(1.35); }
 }
 .mobile-dock button {
  display: grid; justify-items: center; align-content: center; gap: 3px; min-width: 0; min-height: 49px;
  padding: 4px 2px; border: 0; border-radius: 999px; background: transparent; color: var(--text-secondary);
  font: 500 10px/1.2 Inter,sans-serif; white-space: nowrap;
 }
 .mobile-dock button[aria-current=page],.mobile-dock button[aria-expanded=true] { background: #ffe8e8; color: #a80000; }
 .mobile-dock button > svg { width: 21px; height: 21px; }
 .mobile-dock .dock-create { place-self: center; width: 45px; min-height: 45px; background: #ec0000; color: #fff; }
 .guest-mode .mobile-dock { grid-template-columns: repeat(4,minmax(0,1fr)); }
 .mobile-menu-overlay {
  display: block; position: fixed; inset: 0; z-index: 66; border: 0;
  visibility: hidden; pointer-events: none; background: transparent;

 }
 body:has(#sidebar.open) .mobile-menu-overlay {
  visibility: visible; pointer-events: auto; background: #223c531f;

 }
 #sidebar.open ~ .shell { filter: blur(var(--overlay-blur)); }
 #sidebar.open { z-index: 67; padding-bottom: max(14px,env(safe-area-inset-bottom,0px)); }
 .transaction-panel .transaction-table tbody tr {
  grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); gap: 8px 12px; padding: 14px 0;
 }
 .transaction-panel .transaction-table tbody tr > td:nth-child(n) { grid-column: auto; border: 0; }
 .transaction-panel .transaction-table tbody tr > td:nth-child(1) { grid-area: 1 / 1; }
 .transaction-panel .transaction-table tbody tr > td:nth-child(2) { grid-area: 2 / 1 / span 2; }
 .transaction-panel .transaction-table tbody tr > td:nth-child(3) { grid-area: 2 / 2; }
 .transaction-panel .transaction-table tbody tr > td:nth-child(4) { grid-area: 3 / 2; }
 .transaction-panel .transaction-table tbody tr > td:nth-child(5) { grid-area: 4 / 1; align-self: center; }
 .transaction-panel .transaction-table tbody tr > td:nth-child(6) { grid-area: 1 / 2; align-self: start; text-align: right !important; }
 .transaction-table tbody tr > td:nth-child(7) { grid-area: 4 / 2; }
 .transaction-table .tx-row-actions { justify-content: flex-end; gap: 3px; }
 .transaction-table .tx-meta { flex-wrap: wrap; }
 .transaction-table .tx-account { min-width: 0; justify-content: flex-start; }
}

.mobile-filter-toggle, .tx-mobile-date, .tx-mobile-expand { display: none; }
.transaction-tools { display: contents; }

@media (max-width: 800px) {
 #app [data-new=transaction] { display: none; }
 .page-head.has-action:has([data-new=transaction]) { grid-template-columns: minmax(0,1fr); }
 .page-head:has(+ [aria-controls=transaction-tools]) .subtitle { display: none; }
 .mobile-filter-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; min-height: 44px; padding: 8px 13px; margin: 0 0 12px;
  border: 1px solid var(--option-border); border-radius: var(--control-radius);
  background: var(--nexo-surface); color: var(--text-secondary); text-align: left; font: inherit;
 }
 .mobile-filter-toggle > span { flex: 1; }
 .mobile-filter-toggle > svg { width: 16px; height: 16px; flex-shrink: 0; }
 .mobile-filter-toggle small { padding: 1px 6px; border-radius: 9px; background: #e0e9f1; }
 .mobile-filter-toggle[aria-expanded=true] { background: #e7eef4; }
 .mobile-filter-toggle[aria-expanded=true] > svg:last-child,
 .tx-mobile-expand[aria-expanded=true] > svg { transform: rotate(180deg); }
 .mobile-filter-toggle[aria-expanded=false] + :is(.refined-filters,.transaction-tools) { display: none; }
 .dashboard-toolbar > .mobile-filter-toggle, .analytics-toolbar > .mobile-filter-toggle { margin: 0; }
 .transaction-tools { display: block; }

 .mobile-dock, #sidebar.open {
  border: 1px solid var(--navigation-glass-edge);
  background: var(--navigation-glass);
 }
 @supports ((backdrop-filter: blur(16px)) or (-webkit-backdrop-filter: blur(16px))) {
  .mobile-dock, #sidebar.open {
   -webkit-backdrop-filter: blur(24px) saturate(1.65);
   backdrop-filter: blur(24px) saturate(1.65);
  }
 }
 .mobile-dock { z-index: 68; }
 .mobile-dock button[aria-current=page], .mobile-dock button[aria-expanded=true] {
  background: linear-gradient(160deg,#ffececdb,#ffc8c88c);
  box-shadow: inset 0 1px 0 #fff9, 0 2px 6px #a8000014;
 }
 .mobile-dock .dock-create { border-radius: 50%; box-shadow: inset 0 1px 1px #ffffff6b, 0 4px 12px #a8000033; }
 #sidebar.open {
  top: max(10px,env(safe-area-inset-top,0px));
  bottom: calc(79px + env(safe-area-inset-bottom,0px));
  max-height: none; border-radius: 27px; padding-bottom: 12px;
 }
 #sidebar.open .profile-link {
  border-radius: 20px; border-color: #f9fdffe0; background: linear-gradient(160deg,#ffffffb0,#edf4fb7a);
  box-shadow: inset 0 1px 1px #fff, 0 3px 10px #23364b12;
 }
 #sidebar.open .profile-link b { color: var(--text-primary); }

 .transaction-panel .transaction-table tbody tr { padding: 14px 4px; gap: 5px 10px; }
 .transaction-panel .transaction-table tbody tr:not(.tx-expanded) > :is(td:nth-child(2),td:nth-child(3),td:nth-child(4),td:nth-child(7)),
 .transaction-panel .transaction-table tbody tr:not(.tx-expanded) .tx-description > :is(.tx-meta,.tx-card-detail) { display: none; }
 .transaction-panel .transaction-table tbody tr:not(.tx-expanded) > td:nth-child(1) { grid-area: 1 / 1 / span 2; }
 .transaction-panel .transaction-table tbody tr:not(.tx-expanded) > td:nth-child(5) { grid-area: 2 / 2; justify-self: end; }
 .transaction-panel .transaction-table tbody tr:not(.tx-expanded) > td:nth-child(6) { grid-area: 1 / 2; }
 .transaction-panel .transaction-table .tx-title { line-height: 1.35; }
 .transaction-panel .transaction-table .tx-amount { font-size: 14px; }
 .transaction-panel .transaction-table tr.tx-expanded { background: #f4f8fb; border-radius: 13px; }
 .transaction-panel .transaction-table .tx-mobile-date { display: block; color: var(--text-secondary); font-size: 11px; margin-top: 3px; }
 .transaction-panel .transaction-table tr.tx-expanded .tx-mobile-date { display: none; }
 .tx-mobile-expand {
  display: inline-flex; align-items: center; gap: 5px; padding: 0 5px 0 0; min-height: 32px;
  border: 0; background: transparent; color: var(--text-secondary); font: 500 11px/1.3 Inter,sans-serif;
 }
 .tx-mobile-expand > svg { width: 13px; height: 13px; }
}

/* One surface for period and mode selectors in the web and installed app. */
.shell .segmented {
 background: var(--segment-surface) !important;
 border-color: var(--segment-border);
}
.shell .segmented > button:is(.selected,[aria-pressed=true]) {
 background: #fff;
 border-color: #fff;
 color: var(--text-primary);
}

@media (max-width: 800px) {
 .page-head, .page-head.has-action { display: grid; grid-template-columns: minmax(0,1fr); text-align: center; }
 #app .page-head > [data-new] { display: none; }
 .page-head:is([data-heading-page="Dashboard"],[data-heading-page="Dívidas"],[data-heading-page="Metas"],[data-heading-page="Família"],[data-heading-page="Cadastros"]) :is(.eyebrow,.subtitle) { display: none; }
 .mobile-dock:not(.has-dock-action),.guest-mode .mobile-dock { grid-template-columns: repeat(4,minmax(0,1fr)); }
 .mobile-dock,#sidebar.open,#sidebar.open .profile-link {
  border-top-color: transparent;
  box-shadow: var(--navigation-glass-shadow);
 }
 .mobile-filter-toggle {
  position: relative; display: grid; place-items: center;
  width: 44px; height: 44px; padding: 0; margin: 0 0 10px auto;
  border-radius: 14px; background: var(--segment-surface);
 }
 .mobile-filter-toggle > svg { width: 20px; height: 20px; }
 .mobile-filter-toggle[aria-expanded=true] { background: #d3e2ef; border-color: #adc6db; }
 .mobile-filter-toggle small {
  position: absolute; top: 0; right: 0; display: grid; place-items: center;
  width: 16px; height: 16px; padding: 0; border: 0; border-radius: 50%;
  background: #b60000; color: #fff; font-size: 10px; line-height: 1;
 }
 .analytics-toolbar {
  display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: center;
 }
 .analytics-toolbar > .segmented { grid-area: 1 / 1; justify-self: start; }
 .analytics-toolbar > .mobile-filter-toggle { grid-area: 1 / 2; }
 .analytics-toolbar > .refined-filters { grid-area: 2 / 1 / 3 / -1; }
 .dashboard-toolbar > .mobile-filter-toggle { justify-self: end; }
 .transaction-tools { margin-bottom: 14px; padding: 12px; border-radius: 18px; border: 1px solid var(--nexo-surface-border); background: var(--nexo-surface); }
 .transaction-tools > .toolbar { margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
 .transaction-tools > .transaction-period-toolbar { margin-bottom: 10px; }
 .transaction-period-toolbar .segmented { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); width: 100%; height: auto; }
 .transaction-period-toolbar .segmented button { padding: 5px; min-height: 38px; height: auto; white-space: normal; line-height: 1.2; }
}

.shell > header:has(.header-account-picker[open]) { position: relative; z-index: 73; }
.header-right .header-account-picker { min-width: 0; position: static; flex: 0 0 auto; }
.header-account-trigger {
 display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px;
 padding: 3px 6px; border: 1px solid var(--option-border); border-radius: 999px;
 background: var(--nexo-surface); color: var(--text-secondary); cursor: pointer; list-style: none;
}
.header-account-trigger::-webkit-details-marker { display: none; }
.header-account-trigger > svg { width: 16px; height: 16px; }
.header-account-picker[open] > summary > svg { transform: rotate(180deg); }
.header-account-stack {
 display: flex; align-items: center;
 --account-stack-overlap: -15px;
 --account-stack-gap: 3px;
}
.header-account-stack > :is(.bank-logo,.avatar) {
 width: 36px; height: 36px; min-width: 36px; flex: 0 0 36px;
 border: 2px solid #f8fbfd; border-radius: 50%; box-sizing: border-box;
}
.header-account-stack > .avatar { position: relative; z-index: 5; width: 38px; height: 38px; min-width: 38px; flex-basis: 38px; }
.header-account-stack > .bank-logo { position: relative; z-index: 1; }
.header-account-stack > .bank-logo:nth-child(2) { z-index: 2; }
.header-account-stack > :is(.bank-logo,.avatar) + :is(.bank-logo,.avatar) {
 margin-left: var(--account-stack-overlap);
}
.header-account-picker[open] .header-account-stack > :is(.bank-logo,.avatar) + :is(.bank-logo,.avatar) { margin-left: var(--account-stack-gap); }
@media (min-width: 801px) {
 .header-account-stack { --account-stack-overlap: -15px; --account-stack-gap: 5px; }
}
.header-account-stack > .bank-logo img { width: 100%; height: 100%; object-fit: cover; }
.header-account-picker > .header-account-menu {
 position: absolute; top: calc(100% + 8px); left: 0; right: 0; margin-inline: auto;
 width: min(330px,calc(100vw - 28px)); min-width: 0; max-height: min(570px,70dvh);
 overflow-y: auto; padding: 13px; z-index: 90;
}
.header-account-menu h2 { padding: 2px 6px 8px; margin: 0; color: var(--option-ink); text-transform: uppercase; font-size: 11px; letter-spacing: .08em; }
.header-account-list { display: grid; gap: 3px; }
.header-account-list p { margin: 4px 6px 10px; color: var(--option-ink); }
.header-account-row, .header-account-links > button {
 display: flex; align-items: center; gap: 9px; width: 100%; min-height: 42px;
 padding: 6px; border: 0; border-radius: 11px; background: transparent;
 color: var(--text-primary); text-align: left; font: inherit; overflow-wrap: anywhere;
}
.header-account-links > button { border-radius: 999px !important; }
.header-account-row:is(:hover,[aria-pressed=true]), .header-account-links > button:hover { background: var(--segment-surface); }
.header-account-row > span:not(.bank-logo) { flex: 1; min-width: 0; display: grid; gap: 2px; }
.header-account-row strong { font-weight: 550; }
.header-account-row small { color: var(--option-ink); }
.header-account-row .bank-logo { flex-shrink: 0; border-radius: 50%; }
.header-account-actions { display: grid; gap: 7px; margin: 10px 0; }
.header-account-actions > button { width: 100%; justify-content: center; text-align: center; min-height: 44px; }
.header-account-actions > .header-account-add {
 display: flex; align-items: center; justify-content: center; gap: 8px;
 padding-inline: 12px;
}
.header-account-add > .nexo-icon { width: 18px; height: 18px; flex: 0 0 18px; }
.header-account-links { display: grid; gap: 2px; border-top: 1px solid var(--nexo-surface-border); padding-top: 6px; }
#nexo-feedback label { display: grid; gap: 7px; margin-top: 14px; }
#nexo-feedback textarea { width: 100%; padding: 10px; resize: vertical; }
#nexo-feedback p { margin: 10px 0; color: var(--option-ink); }
.feedback-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
@media (max-width: 800px) {
 .header-account-stack > :is(.bank-logo,.avatar) { width: 30px; height: 30px; min-width: 30px; flex-basis: 30px; }
 .header-account-stack > .avatar { width: 34px; height: 34px; min-width: 34px; flex-basis: 34px; }
 .header-account-trigger { gap: 4px; padding-inline: 4px; }
 .header-right:has(.header-account-picker[open] .bank-logo) .cloud-status-label { display: none; }
 .header-right:has(.header-account-stack > .bank-logo) .cloud-status-label { max-width: 68px; }
}
@media (max-width: 360px) {
 .header-right:has(.header-account-stack > .bank-logo) .cloud-status-label { display: none; }
}

/* Motion for menus and in-page disclosures. */
:root { --expand-time: 260ms; --expand-ease: cubic-bezier(.22,.72,.24,1); }
:root { --overlay-time: 310ms; --overlay-blur: 9px; }
.shell:has(.header-account-picker[open]) > :is(main,.app-footer) { filter: blur(var(--overlay-blur)); }
body:has(> #mobile-filters-dialog[open]) > .shell { filter: blur(var(--overlay-blur)); }
@media (prefers-reduced-motion: no-preference) ,(min-width:801px) {
 .shell { transition: filter var(--overlay-time) var(--expand-ease); }
 .shell > :is(main,.app-footer) { transition: filter var(--overlay-time) var(--expand-ease); }
 .header-account-stack > .bank-logo {
  transform: scale(.94);
  transition: transform 290ms cubic-bezier(.2,.8,.26,1.12);
 }
 .header-account-stack > :is(.bank-logo,.avatar) + :is(.bank-logo,.avatar) {
  transition: margin-left var(--overlay-time) var(--expand-ease);
 }
 .header-account-picker[open] .header-account-stack > .bank-logo { transform: scale(1); }
 .header-account-picker[open] .header-account-stack > :nth-child(3) { transition-delay: 25ms; }
 .header-account-trigger > svg, .category-expand > svg, .forecast-sources > summary > svg,
 .family-member > summary > svg, .tx-mobile-expand > svg {
  transition: transform var(--expand-time) var(--expand-ease);
 }
 .filter-picker[open] > .control-menu,
 :is(.forecast-sources,.summary-details,.family-member,.tx-category-disclosure,.goal-form-options)[open] > :not(summary),
 .category-filter-children:not([hidden]) {
  animation: nexo-expand-enter var(--expand-time) var(--expand-ease) both;
 }
 @keyframes nexo-expand-enter {
  from { opacity: 0; translate: 0 -7px; }
  to { opacity: 1; translate: none; }
 }

 @supports selector(details::details-content) {
  .filter-picker::details-content {
   transition: content-visibility var(--expand-time) allow-discrete;
  }
  .filter-picker > .control-menu {
   animation: none;
   opacity: 0;
   translate: 0 -7px;
   transition: opacity var(--expand-time) var(--expand-ease), translate var(--expand-time) var(--expand-ease);
  }
  .filter-picker[open] > .control-menu { animation: none; opacity: 1; translate: none; }
  @starting-style {
   .filter-picker[open] > .control-menu { opacity: 0; translate: 0 -7px; }
  }

  @supports (interpolate-size: allow-keywords) {
   :is(.forecast-sources,.family-member,.tx-category-disclosure,.category-overview-group,.category-expense-group)::details-content {
    interpolate-size: allow-keywords;
    block-size: 0;
    opacity: 0;
    overflow: clip;
    transition: block-size var(--expand-time) var(--expand-ease), opacity var(--expand-time) var(--expand-ease), content-visibility var(--expand-time) allow-discrete;
   }
   :is(.forecast-sources,.family-member,.tx-category-disclosure,.category-overview-group,.category-expense-group)[open]::details-content {
    block-size: auto;
    opacity: 1;
   }
   :is(.forecast-sources,.family-member,.tx-category-disclosure)[open] > :not(summary) { animation: none; }
  }
 }
 @media (max-width: 800px) {
  #sidebar { transition: transform var(--overlay-time) var(--expand-ease), visibility var(--overlay-time) allow-discrete; }
  .mobile-menu-overlay { transition: background var(--overlay-time) var(--expand-ease), visibility var(--overlay-time); }
  .mobile-filter-toggle[aria-expanded=true] + :is(.refined-filters,.transaction-tools),
  .transaction-panel tr.tx-expanded > :is(td:nth-child(2),td:nth-child(3),td:nth-child(4),td:nth-child(7)) {
   animation: nexo-expand-enter var(--expand-time) var(--expand-ease) both;
  }
 }
}

.header-account-picker[open] > .header-account-menu {
 animation: none;
 opacity: 1;
 translate: none;
}
@media (prefers-reduced-motion: no-preference),(min-width:801px), (min-width: 801px) {
 .header-account-picker[open] > .header-account-menu {
  animation: account-menu-slide var(--overlay-time) var(--expand-ease) both;
 }
 @keyframes account-menu-slide {
  from { opacity: 0; translate: 0 -16px; }
  to { opacity: 1; translate: none; }
 }
}
@media (min-width: 801px) and (prefers-reduced-motion: reduce)  and (max-width:800px){
 .header-account-picker[open] > .header-account-menu {
  animation: account-menu-slide var(--overlay-time) var(--expand-ease) both !important;
 }
 .shell > :is(main,.app-footer) {
  transition: filter var(--overlay-time) var(--expand-ease) !important;
 }
}

@media (prefers-reduced-motion: no-preference) and (max-width: 800px) ,(min-width:801px) and (max-width: 800px) {
 @supports (transition-behavior: allow-discrete) {
  .mobile-filter-toggle + :is(.refined-filters,.transaction-tools) {
   animation: none;
   opacity: 1;
   translate: none;
   transition: opacity var(--expand-time) var(--expand-ease), translate var(--expand-time) var(--expand-ease), display var(--expand-time) allow-discrete;
  }
  .mobile-filter-toggle[aria-expanded=true] + :is(.refined-filters,.transaction-tools) { animation: none; }
  .mobile-filter-toggle[aria-expanded=false] + :is(.refined-filters,.transaction-tools) { opacity: 0; translate: 0 -7px; }
  @starting-style {
   .mobile-filter-toggle[aria-expanded=true] + :is(.refined-filters,.transaction-tools) { opacity: 0; translate: 0 -7px; }
  }
 }
}

.overview-intro { display: contents; }
.shell > header #privacy[hidden] { display: none; }
:is(.mobile-privacy,.overview-privacy) { display: none; }
@media (max-width: 800px) {
 #app .analytics-toolbar { grid-template-columns: minmax(0,1fr) auto; column-gap: 6px; }
 #app .analytics-toolbar > .mobile-filter-toggle { grid-area: 1 / 2; }
 .overview-intro {
  display: grid; grid-template-columns: minmax(0,1fr) auto;
  align-items: center; gap: 10px 6px; margin-bottom: 17px;
 }
 .overview-intro .dashboard-toolbar { display: contents; }
 .overview-intro .dashboard-toolbar > .segmented {
  grid-area: 1 / 1 / 2 / -1;
  justify-self: stretch; width: 100%;
  grid-auto-columns: minmax(0, 1fr);
 }
 .overview-intro .dashboard-toolbar > .segmented > button {
  gap: 4px; padding-inline: 4px; font-size: clamp(10px, 3.2vw, 12px);
 }
 .overview-intro .dashboard-toolbar > .segmented > button > svg { width: 15px; height: 15px; flex: 0 0 15px; }
 .overview-intro > .page-head.is-overview { grid-area: 2 / 1; margin: 0; text-align: left; }
 .overview-intro .page-head.is-overview .eyebrow { display: none; }
 .overview-intro .mobile-filter-toggle { grid-area: 2 / 2; }
 .overview-intro .refined-filters {
  grid-area: 3 / 1 / 4 / -1; padding: 10px;
  border: 1px solid var(--nexo-surface-border); border-radius: var(--control-radius); background: var(--nexo-surface);
 }
}

@media (max-width: 800px) {
 .mobile-filter-toggle { justify-content: center; align-content: center; }
 .header-right .cloud-status { position: relative; justify-content: center; width: 24px; min-width: 24px; }
 .header-right .cloud-status-label {
  display: block !important; position: absolute; width: 1px; height: 1px;
  padding: 0; clip-path: inset(50%); white-space: nowrap;
 }
 .header-right .cloud-status .cloud-status-mark { display: none; }
 .header-right .cloud-status-mark i { display: none; }
 .header-right .cloud-status[data-mobile-state=synced] .cloud-status-mark {
  display: inline-flex;
  animation: nexo-sync-check .24s ease-out both;
 }
 .header-right .cloud-status-mark .nexo-icon { width: 18px; height: 18px; }
 .cloud-status[data-mobile-state=working]::before {
  content: ""; width: 15px; height: 15px; box-sizing: border-box; border-radius: 50%;
  border: 2px solid #c4d8e7; border-top-color: #527d9b;
  animation: nexo-sync-spin .85s linear infinite;
 }
 .cloud-status[data-mobile-state=pending]::before,.cloud-status[data-mobile-state=error]::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: #ae6b27;
 }
 .cloud-status[data-mobile-state=error]::before { background: #bd3f42; }
 @keyframes nexo-sync-spin { to { transform: rotate(360deg); } }
 @keyframes nexo-sync-check { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: scale(1); } }
 @media (prefers-reduced-motion: reduce)  and (max-width:800px){
  .cloud-status[data-mobile-state=working]::before,.header-right .cloud-status[data-mobile-state=synced] .cloud-status-mark { animation: none; }
 }
}
.mobile-transactions { display: none; }
.transaction-page-heading { display: contents; }

@media (max-width: 800px) {
 .overview-intro .refined-filters, .analytics-toolbar > .refined-filters,
 #transaction-tools, #app .transaction-panel { display: none; }
 #app .transaction-page-heading {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px;
 }
 #app .transaction-page-heading .page-head { display: block; text-align: left; margin: 0; padding: 0; }
 .transaction-page-heading :is(.eyebrow,.subtitle,[data-new]) { display: none; }
 .transaction-page-heading .mobile-filter-toggle { flex-shrink: 0; margin: 0; border-radius: 50%; }
 .mobile-transactions { display: grid; gap: 14px; min-width: 0; }
 .mobile-tx-calendar, .mobile-tx-months, .mobile-tx-tabs { display: flex; align-items: center; gap: 6px; min-width: 0; }
 .mobile-tx-months, .mobile-tx-tabs { overflow-x: auto; scrollbar-width: none; }
 .mobile-tx-calendar > .universal-picker { flex: 0 0 86px; min-width: 0; }
 .mobile-tx-calendar > .universal-picker .control-trigger { min-height: 42px; padding-inline: 9px; }
 .mobile-tx-calendar > select, .mobile-tx-months > button {
  flex: none; width: auto; min-height: 42px; border: 1px solid var(--nexo-surface-border);
  border-radius: 22px; background: var(--nexo-surface); color: var(--text-secondary); padding: 0 12px; font: inherit;
 }
 .mobile-tx-months > button { text-transform: capitalize; }
 .mobile-tx-months > button[aria-pressed=true] { background: #d50000; color: white; border-color: transparent; }
 .mobile-tx-search {
  display: flex; align-items: center; gap: 10px; padding: 0 13px;
  border: 1px solid var(--nexo-surface-border); border-radius: 17px; background: #e7eef4; color: var(--text-secondary);
 }
 .mobile-tx-search > svg { flex: none; width: 19px; height: 19px; }
 .mobile-tx-search:focus-within { outline: 2px solid #98aec2; outline-offset: 2px; }
 .mobile-tx-search > #mobile-tx-search {
  appearance: none; -webkit-appearance: none; flex: 1; min-width: 0; min-height: 46px;
  padding: 0; border: 0; background: transparent; box-shadow: none; outline: none;
 }
 .mobile-tx-tabs { background: #e7eef4; border-radius: 22px; padding: 4px; gap: 2px; }
 .mobile-tx-tabs > button {
  flex: 1 0 auto; min-height: 40px; padding: 0 8px; border: 0; border-radius: 18px;
  background: transparent; color: var(--text-secondary); font-size: .78rem;
 }
 .mobile-tx-tabs > button[aria-pressed=true] { background: white; color: var(--text-primary); }
 .mobile-tx-results { color: var(--text-secondary); }
 .mobile-tx-results > summary { cursor: pointer; padding: 5px 0; font-size: .9rem; }
 .mobile-tx-results .transaction-filter-totals { margin: 7px 0 0; }
 .mobile-tx-day > h2 {
  display: flex; justify-content: space-between; gap: 8px; margin: 2px 0 4px;
  color: var(--text-secondary); font-size: .88rem; font-weight: 600;
 }
 .mobile-tx-row { border-bottom: 1px solid var(--nexo-surface-border); }
 .mobile-tx-row > button {
  display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: start;
  gap: 11px; padding: 13px 0; width: 100%; border: 0; background: transparent;
  color: inherit; text-align: left;
 }
 .mobile-tx-icon {
  position: relative; display: grid; place-items: center; width: 42px; height: 42px;
  background: #e7eef4; border-radius: 50%;
 }
 .mobile-tx-icon > .bank-logo {
  position: absolute; right: -2px; bottom: -3px; width: 22px; height: 22px; min-width: 0;
  border: 2px solid #f6f8fa; border-radius: 50%;
 }
 .mobile-tx-icon > .bank-logo > :is(img,svg) { width: 13px; height: 13px; }
 .mobile-tx-name, .mobile-tx-value { display: grid; gap: 4px; overflow-wrap: anywhere; }
 .mobile-tx-value { text-align: right; font-variant-numeric: tabular-nums; }
 .mobile-tx-value > b { font-size: .91rem; }
 .mobile-tx-row small { font-size: .78rem; }
 .mobile-tx-status.is-pending { color: #a25212; }
 .mobile-tx-status.is-paid { color: #157a59; }
 html:has(#mobile-tx-sheet[open]), body:has(> #mobile-tx-sheet[open]) { background: #fff; }
 #mobile-tx-sheet {
  position: fixed; inset: auto 0 0; width: min(100%,560px); max-width: 100%; max-height: 85dvh;
  margin: 0 auto; padding: 23px 19px calc(20px + env(safe-area-inset-bottom)); overflow: auto;
  overscroll-behavior: contain; border: 0; border-radius: 25px 25px 0 0; background: #fff;
 }
 #mobile-tx-sheet::before {
  content: ""; display: block; width: 34px; height: 4px; margin: -12px auto 17px;
  border-radius: 3px; background: #c8d5e0;
 }
 #mobile-tx-sheet::backdrop {
  background: linear-gradient(to top,#fff 0 env(safe-area-inset-bottom,0px),#25374955 env(safe-area-inset-bottom,0px) 100%);
  -webkit-backdrop-filter: blur(var(--overlay-blur)); backdrop-filter: blur(var(--overlay-blur));
 }
 .tx-sheet-close { position: absolute; top: 12px; right: 10px; width: 40px; height: 40px; }
 .tx-sheet-header { display: grid; grid-template-columns: 52px minmax(0,1fr); gap: 6px 13px; }
 .tx-sheet-header > div { padding-right: 34px; }
 .tx-sheet-header .mobile-tx-icon { width: 52px; height: 52px; }
 .tx-sheet-header h2 { margin: 0 0 4px; font-size: 1.15rem; overflow-wrap: anywhere; }
 .tx-sheet-header strong { font-size: 1.45rem; }
 .tx-sheet-header p {
  grid-column: 1 / -1; margin: 3px 0 0; color: var(--text-secondary); font-size: clamp(.75rem,3.4vw,.85rem);
  white-space: nowrap;
 }
 .tx-sheet-recurring {
  display: flex; align-items: center; gap: 9px; min-height: 48px; margin-top: 14px;
  padding: 9px 12px; border: 1px solid var(--nexo-surface-border); border-radius: var(--control-radius,17px);
  color: var(--text-primary); cursor: pointer;
 }
 .guest-mode .tx-sheet-recurring { display: none; }
 .tx-sheet-recurring input {
  appearance: none; -webkit-appearance: none; position: relative; margin: 0 0 0 auto;
  width: 42px; height: 24px; flex: none; border: 0; border-radius: 14px; background: #d8e3ed;
 }
 .tx-sheet-recurring input::before {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; transition: transform .2s ease;
 }
 .tx-sheet-recurring input:checked { background: #d50000; }
 .tx-sheet-recurring input:checked::before { transform: translateX(18px); }
 .tx-sheet-recurring input:focus-visible { outline: 2px solid #597990; outline-offset: 2px; }
 .tx-sheet-fields { margin: 14px 0; }
 .tx-sheet-fields > div {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.7fr); gap: 8px; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--nexo-surface-border);
 }
 .tx-sheet-fields dt { color: var(--text-secondary); }
 .tx-sheet-fields dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
 .tx-sheet-fields dd, .tx-sheet-fields dd .tx-category {
  color: var(--text-primary); font-size: .9rem; font-weight: 500;
 }
 .tx-sheet-fields dd .tx-category { justify-content: flex-end; }
 .tx-sheet-fields dd .tx-category-disclosure { align-items: flex-end; }
 .tx-sheet-fields dd > .bank-logo { vertical-align: middle; }
 .tx-sheet-actions { display: flex; gap: 8px; flex-wrap: wrap; }
 .tx-sheet-actions button { min-height: 44px; }
 .tx-sheet-actions .tx-sheet-icon-action { display: grid; place-items: center; width: 44px; padding: 0; }
 .tx-sheet-actions .tx-sheet-delete { color: #b52222; }
 @media (prefers-reduced-motion: no-preference) ,(min-width:801px) {
  #mobile-tx-sheet[open] { animation: tx-sheet-enter var(--overlay-time) var(--expand-ease); }
  @keyframes tx-sheet-enter { from { transform: translateY(100%); } to { transform: translateY(0); } }
 }
 #mobile-filters-dialog {
  width: min(480px, calc(100% - 24px)); max-height: calc(100dvh - 36px);
  padding: 16px; border: 1px solid var(--nexo-surface-border); border-radius: 23px; overflow: visible;
 }
 #mobile-filters-form { max-height: calc(100dvh - 116px); overflow-y: auto; }
 #mobile-filters-form .universal-picker > .control-menu {
  box-sizing: border-box;
  left: 0; right: auto; width: 100%; min-width: 0;
  overflow: auto; overscroll-behavior: contain;
 }
 #mobile-filters-form .control-options { grid-template-columns: minmax(0,1fr); max-height: none; overflow: visible; }
 #mobile-filters-form .control-options button { min-width: 0; padding-inline: 8px; gap: 4px; }
 #mobile-filters-dialog::backdrop {
  background: rgba(37,55,73,.24);
 }
 .mobile-filters-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
 .mobile-filters-head h2 { margin: 0; }
 #mobile-filters-title:focus { outline: none; }
 .mobile-filters-actions { margin-top: 12px; }
 /* Botão Limpar: traço vermelho mais delicado, sem alterar os demais botões. */
 #mobile-filters-form .mobile-filters-actions > button[data-reset-mobile-filters] {
  border-width: 1px;
  border-style: solid;
  border-color: var(--red);
  text-align: center;
  justify-content: center;
 }
}

:is(.mobile-filters-actions,.goal-form-actions,.feedback-actions), #about-nexo .about-actions {
 display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: stretch; gap: 8px;
}
.about-actions > form { display: grid; margin: 0; }
:is(.mobile-filters-actions,.goal-form-actions,.feedback-actions,.about-actions) > :is(.primary,.secondary),
.about-actions > form > .secondary {
 width: 100%; min-width: 0; min-height: 46px; margin: 0; padding: 8px;
 justify-content: center; text-align: center; border-radius: var(--control-radius,17px);
 font-size: 13px; line-height: 1.25;
}
.header-account-actions > .header-account-add,
:is(.mobile-filters-actions,.goal-form-actions,.feedback-actions,.about-actions) > .secondary,
.about-actions > form > .secondary {
 border: 2px solid var(--red); color: var(--red);
}

.profile-settings[data-profile-tab=account] > [data-profile-panel]:not([data-profile-panel=account]),
.profile-settings[data-profile-tab=app] > [data-profile-panel]:not([data-profile-panel=app]),
.profile-settings[data-profile-tab=data] > [data-profile-panel]:not([data-profile-panel=data]) { display: none; }
.profile-settings .profile-hero { display: grid; justify-items: center; text-align: center; gap: 14px; }
.profile-settings .profile-title-row { justify-content: center; }
.profile-settings .profile-hero p { margin: 4px 0 0; color: var(--text-secondary); overflow-wrap: anywhere; }
.profile-settings .profile-portrait { position: relative; width: 100px; }
.profile-portrait .avatar { width: 100px; height: 100px; font-size: 32px; }
.profile-photo-action {
 position: absolute; right: -3px; bottom: -2px; display: grid; place-items: center; width: 38px; height: 38px;
 border: 1px solid #d5e1eb; border-radius: 50%; background: #fff; color: var(--text-primary); cursor: pointer; overflow: hidden;
}
.profile-photo-action input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.profile-photo-action:focus-within { outline: 2px solid #7896ad; outline-offset: 2px; }
.profile-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin: 18px 0 14px; border-block: 1px solid #dce6ef; }
.profile-metrics > div { display: grid; gap: 5px; padding: 12px 5px; text-align: center; }
.profile-metrics > div + div { border-left: 1px solid #dce6ef; }
.profile-metrics strong { color: #157a59; font-size: clamp(.88rem,3.6vw,1.15rem); }
.profile-metrics > div:nth-child(2) strong { color: #2469ae; }
.profile-metrics > div:nth-child(3) strong { color: #7441b5; }
.profile-metrics span { color: var(--text-secondary); font-size: .76rem; }
.profile-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); width: 100%; }
.profile-tabs > button { justify-content: center; }
.profile-settings .settings-grid { display: block; }
#profileForm .profile-field {
 display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.15fr); align-items: center;
 gap: 10px; margin: 0; padding: 20px 0; border-bottom: 1px solid var(--line);
}
.profile-field > span { display: flex; align-items: center; gap: 9px; color: var(--text-primary); }
.profile-field > span > svg { flex: none; width: 18px; height: 18px; }
#profileForm .profile-field > .writing-field { min-width: 0; }
#profileForm .profile-field input {
 width: 100%; min-width: 0; height: 42px; min-height: 42px; text-align: left; padding: 6px 12px;
 border: 1px solid #cbdbe9; border-radius: var(--control-radius,17px);
 background: var(--nexo-surface); box-shadow: none;
}
#profileForm .profile-field input:focus { border-color: #758fa7; }

@media (max-width: 800px) {
 .mobile-dock { box-shadow: inset 0 1px 1px #fff,0 2px 12px #31465c18; }
 .shell::after {
  content: ""; position: fixed; inset: auto 0 0; height: env(safe-area-inset-bottom,0px);
  background: #f8fbfd; pointer-events: none; z-index: 64;
 }
}
@media (max-width: 800px) and (display-mode: standalone) {
 .shell::after { content: none; }
}
@media (min-width: 801px) {
 .profile-settings .profile-title-row { flex-direction: column; align-items: center; gap: 4px; }
 .cloud-status[data-mobile-state=working] .cloud-status-mark { display: none; }
 .cloud-status[data-mobile-state=working]::before {
  content: ""; flex: none; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid #c4d8e7; border-top-color: #527d9b; animation: desktop-sync-spin .9s linear infinite;
 }
 @keyframes desktop-sync-spin { to { transform: rotate(360deg); } }
}

@media (max-width: 800px) {
 .mobile-dock {
  --dock-columns: 5;
  --dock-position: 0;
  --dock-selection-width: calc((100% - 10px) / var(--dock-columns));
  isolation: isolate;
  gap: 0;
  border-radius: 999px;
 }
 .mobile-dock:not(.has-dock-action), .guest-mode .mobile-dock { --dock-columns: 4; }
 .mobile-dock::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 50%;
  left: calc(6px + var(--dock-selection-width) * var(--dock-position));
  width: calc(var(--dock-selection-width) - 2px);
  height: 50px;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  background: #fff;
  box-shadow: var(--control-lens-shadow);
  transform: translateY(-50%);
  transition: left 380ms cubic-bezier(.22,.72,.24,1), opacity 180ms ease;
 }
 .mobile-dock:has(> button[aria-current="page"], > button[aria-expanded="true"])::before { opacity: 1; }
 .mobile-dock:has(> button:nth-child(2)[aria-current="page"]) { --dock-position: 1; }
 .mobile-dock:has(> button:nth-child(3)[aria-current="page"]) { --dock-position: 2; }
 .mobile-dock:has(> button:nth-child(4)[aria-current="page"]) { --dock-position: 3; }
 .mobile-dock:has(> button:last-child[aria-expanded="true"]) { --dock-position: calc(var(--dock-columns) - 1); }
 .mobile-dock > button {
  position: relative;
  color: var(--text-primary);
  transition: color 180ms ease, transform 180ms cubic-bezier(.25,.8,.3,1.15);
 }
 .mobile-dock > button:is([aria-current="page"], [aria-expanded="true"]) {
  background: transparent;
  box-shadow: none;
  color: var(--text-primary);
 }
 .mobile-dock:has(> button[aria-expanded="true"]) > button[aria-current="page"] { color: var(--text-primary); }
 .mobile-dock > button > span {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
 }
 .mobile-dock > button > svg { width: 23px; height: 23px; }
 .mobile-dock > button:active { transform: scale(.9); }
 .mobile-dock > button.dock-create {
  place-self: center;
  width: 50px;
  height: 50px;
  min-height: 50px;
  border-radius: 50% !important;
  background: #ec0000;
  box-shadow: 0 4px 12px #a8000033;
  color: white;
 }
 .mobile-dock > button.dock-create > svg { width: 26px; height: 26px; }
}
@media (max-width: 800px) and (prefers-reduced-motion: reduce)  and (max-width:800px){
 .mobile-dock::before, .mobile-dock > button, .mobile-menu-overlay, .shell { transition: none; }
 .mobile-dock > button:active { transform: none; }
}
@media (max-width: 800px) and ((prefers-reduced-transparency: reduce) or (prefers-contrast: more)) {
 .mobile-dock, #sidebar.open { background: #f4f8fb; -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* Match the glass on the mobile drawer across navigation controls. */
#mobile-filters-dialog,
.header-account-picker > :is(.header-account-menu,.header-account-trigger),
#sidebar :is(.profile-link,.workspace-picker > .control-trigger,.workspace-picker > .control-menu) {
 background: var(--navigation-glass);
 border: 1px solid var(--navigation-glass-edge);
 border-top-color: transparent;
 box-shadow: var(--navigation-glass-shadow);
 -webkit-backdrop-filter: blur(24px) saturate(1.65);
 backdrop-filter: blur(24px) saturate(1.65);
}
#sidebar .workspace-picker > .control-menu {
 box-sizing: border-box;
 width: 100%;
 border-radius: var(--control-radius);
}
#sidebar .workspace-picker .control-options {
 grid-template-columns: minmax(0, 1fr);
 padding: 5px 6px 8px;
 overflow-x: hidden;
}
#sidebar .workspace-picker .control-option {
 min-width: 0;
 height: var(--option-height);
 padding-inline: 9px;
 gap: 8px;
 border-radius: 999px !important;
 font-size: .875rem;
}
#sidebar .workspace-picker .control-option > span:not(.bank-logo) {
 white-space: nowrap;
}
#sidebar .workspace-picker .control-option > :is(.bank-logo,.nexo-icon:first-child) {
 box-sizing: border-box;
 width: 24px;
 height: 24px;
 flex: 0 0 24px;
}
#sidebar .workspace-picker .control-option > .bank-logo img {
 width: 18px;
 height: 18px;
 object-fit: contain;
}
#sidebar .workspace-picker .control-option[aria-checked="true"] {
 background: #fff;
 border-color: transparent;
 box-shadow: var(--control-lens-shadow);
}
@media (max-width: 800px) {
 #sidebar .workspace-picker > .control-menu { padding-inline: 6px; }
 #sidebar .workspace-picker .control-option { padding-inline: 6px; gap: 6px; font-size: .8125rem; }
 .goals-main-panel .empty button[data-new="goal"] { white-space: nowrap; }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
 #mobile-filters-dialog,
 .header-account-picker > :is(.header-account-menu,.header-account-trigger),
 #sidebar :is(.profile-link,.workspace-picker > .control-trigger,.workspace-picker > .control-menu) {
  background: #f4f8fb;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
 }
}

@media (max-width: 800px) {
 #app .profile-settings .profile-overview > .profile-metrics {
  margin-inline: calc(-1 * var(--mobile-panel-padding));
 }
}
