/* ==========================================================================
   Lista de Compras styles, after WEDPLANNER's look. Brand colours: keep in sync with Components/Layout/AppTheme.cs
   ========================================================================== */
html.wp-dark { color-scheme: dark; } /* native scrollbars and form controls follow the theme */
:root {
    --wp-gold: #B08D57;
    --wp-gold-dark: #8E6F3F;
    --wp-gold-light: #D9BE8E;
    --wp-ink: #1C1B1A;
    --wp-cream: #F7F5F2;
    --wp-line: #ECE8E2;
    --wp-muted: #6B6762;
    /* The one corner radius for everything rounded (cards, inputs, buttons, dialogs, chips, labels, images); keep in
       sync with DefaultBorderRadius in AppTheme.cs. Only true circles (avatars, icon buttons, dots, counters) differ. */
    --wp-radius: 6px;
    --wp-bottom-nav: 64px;
}

html, body { font-family: "Titillium Web", system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-tap-highlight-color: transparent; }
body { background: var(--mud-palette-background, var(--wp-cream)); }
/* Dark from the first paint: the page streams in, and MudBlazor's palette can arrive a frame after the body. */
html.wp-dark, html.wp-dark body { background: var(--mud-palette-background, #121110); color: var(--mud-palette-text-primary, #EDE9E3); }
html.wp-neon, html.wp-neon body { background: var(--mud-palette-background, #060C26); color: var(--mud-palette-text-primary, #EEF3FF); }

/* Scrollbars stay hidden and show only while something scrolls, fading out smoothly once it stops: app.js puts
   .is-scrolling on the scrolling element for a moment. The thumb colour is a registered property so it can fade. */
@property --wp-sb { syntax: '<color>'; inherits: false; initial-value: transparent; }
/* MudBlazor's theme injects "html, body * { scrollbar-color }" inline, so this needs a little more specificity. */
html:root, body :not(:root) { scrollbar-color: var(--wp-sb) transparent; }
:where(*) { transition: --wp-sb .6s ease; }
.mud-paper { transition: box-shadow 300ms cubic-bezier(.4, 0, .2, 1), --wp-sb .6s ease; } /* keeps Mud's own transition (menus, dropdown lists) */
:where(.is-scrolling) { --wp-sb: rgba(28, 27, 26, .38); transition-duration: .15s; }
:where(html.wp-dark .is-scrolling, html.wp-dark.is-scrolling) { --wp-sb: rgba(255, 255, 255, .34); }
/* Browsers without scrollbar-color (older Safari): same idea, without the fade. */
@supports not (scrollbar-color: auto) {
    :root ::-webkit-scrollbar-thumb, :root::-webkit-scrollbar-thumb { background: transparent; border-radius: 999px; }
    .is-scrolling::-webkit-scrollbar-thumb { background: rgba(128, 124, 120, .5); }
}

/* Every badge is one size, as in WEDPLANNER: chips and tags take the same height, text and icon; the width follows the
   text. Counters stay small circles. MudBlazor hard-codes pill-shaped chips in three sizes, hence its size classes here. */
:root { --wp-badge-h: 40px; --wp-badge-font: .88rem; --wp-badge-icon: 20px; }
.mud-chip, .mud-chip.mud-chip-size-small, .mud-chip.mud-chip-size-medium, .mud-chip.mud-chip-size-large, .tag {
    display: inline-flex; align-items: center; gap: 8px; box-sizing: border-box; height: var(--wp-badge-h); padding: 0 12px;
    border-radius: var(--wp-radius); font-size: var(--wp-badge-font); font-weight: 600; line-height: 1.2; white-space: nowrap; }
:is(.mud-chip, .tag) .mud-icon-root { width: var(--wp-badge-icon); height: var(--wp-badge-icon); font-size: var(--wp-badge-icon); flex: none; }
.mud-chip .mud-chip-icon { margin: 0; } /* the gap spaces it */
/* A category's picture in its badge, in place of the icon. */
.mud-chip .mud-chip-content:has(> .chip-photo) { display: inline-flex; align-items: center; gap: 8px; }
.mud-chip .chip-photo { width: 28px; height: 28px; margin-left: -6px; border-radius: calc(var(--wp-radius) * .75); object-fit: cover; flex: none; display: block; }
.tag { background: color-mix(in srgb, var(--wp-gold) 12%, transparent); color: var(--wp-gold-dark); }
html.wp-dark .tag { color: var(--wp-gold-light); }

/* Counters are always round: a circle for one digit, a pill with round ends for more. */
.mud-badge:not(.mud-badge-dot):not(.mud-badge-icon), .section-count, .nav-count {
    display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
    min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
    font-size: 11px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums;
}

/* Clickable icons sit on a soft accent-tinted circle so they read as buttons. Icons inside inputs (clock, clear,
   dropdown) and chips stay bare, and filled icon buttons keep their own colour. */
.mud-icon-button:not(.mud-button-filled):not(.mud-switch-base):not(.mud-input-adornment *):not(.mud-input-clear-button):not(.mud-chip *) { background-color: color-mix(in srgb, var(--mud-palette-primary) 11%, transparent); border-radius: 50%; }
.mud-icon-button:not(.mud-button-filled):not(.mud-switch-base):not(.mud-input-adornment *):not(.mud-input-clear-button):not(.mud-chip *):hover { background-color: color-mix(in srgb, var(--mud-palette-primary) 22%, transparent); }
.mud-icon-button:disabled { background-color: transparent !important; }
.mud-input-adornment .mud-icon-button, .mud-chip .mud-icon-button, .mud-input-control .mud-input-adornment .mud-icon-button:hover { background-color: transparent; }
/* With a mouse, every clickable icon fills with its colour on hover: the accent by default, red for delete. */
.row-delete { --wp-hover-fill: var(--mud-palette-error); --wp-hover-ink: #fff; }
@media (hover: hover) {
    .mud-icon-button:not(.mud-button-filled):not(.mud-switch-base):not(.mud-input-adornment *):not(.mud-input-clear-button):not(.mud-chip *):not(:disabled) { transition: background-color .15s ease, color .15s ease; }
    .mud-icon-button:not(.mud-button-filled):not(.mud-switch-base):not(.mud-input-adornment *):not(.mud-input-clear-button):not(.mud-chip *):not(:disabled):hover {
        background-color: var(--wp-hover-fill, var(--mud-palette-primary)) !important; color: var(--wp-hover-ink, var(--mud-palette-primary-text)) !important; }
    .mud-input-adornment .mud-icon-button:not(:disabled):hover { color: var(--mud-palette-primary) !important; }
}
/* Keyboard focus shows as a ring on the same icons. */
.mud-icon-button:focus-visible { outline: 2px solid var(--wp-hover-fill, var(--mud-palette-primary)); outline-offset: 2px; }
/* One control height: buttons, inputs (all dense outlined, 40px) and icon buttons line up side by side. */
.mud-button-root.mud-button { min-height: 40px; }
.new-btn { text-transform: uppercase; letter-spacing: .04em; }
/* Dialog buttons in upper case, like the other buttons that act. */
.mud-dialog .mud-dialog-actions .mud-button-root { text-transform: uppercase; letter-spacing: .04em; }
/* ...and every round icon button is the same 40px, whatever the icon size. */
.mud-icon-button:not(.mud-input-adornment *):not(.mud-chip *):not(.mud-switch-base), .avatar-btn { width: 40px; height: 40px; min-width: 40px; padding: 0; flex: none; }
/* Switches: no halo around the thumb; red when off, green when on, in both themes. A focus ring stays for keyboard users. */
.mud-switch .mud-switch-base, .mud-switch .mud-switch-base:hover { background-color: transparent !important; }
.mud-switch .mud-ripple::after { display: none; }
.mud-switch [class*="mud-switch-thumb"] { background-color: var(--mud-palette-error) !important; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.mud-switch .mud-switch-base.mud-checked [class*="mud-switch-thumb"] { background-color: var(--mud-palette-success) !important; }
.mud-switch .mud-switch-track { background-color: var(--mud-palette-error) !important; opacity: .35 !important; }
.mud-switch .mud-switch-base.mud-checked + .mud-switch-track { background-color: var(--mud-palette-success) !important; opacity: .45 !important; }
.mud-switch:has(.mud-switch-input:focus-visible) .mud-switch-track { outline: 2px solid var(--mud-palette-primary); outline-offset: 2px; }
a { color: var(--mud-palette-primary, var(--wp-gold)); text-decoration: none; }
a:hover { text-decoration: underline; }

.muted { color: var(--mud-palette-text-secondary) !important; }
.small { font-size: .82rem; }
.min-w-0 { min-width: 0; }
.nowrap { white-space: nowrap; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.cursor-pointer { cursor: pointer; }
.text-warning { color: var(--mud-palette-warning) !important; }
.text-error, .text-danger { color: var(--mud-palette-error) !important; }
.text-success { color: var(--mud-palette-success) !important; }
.text-center { text-align: center; }

/* ---------- Layout ---------- */
.app-main { min-height: 100vh; min-height: 100dvh; }
/* Every page uses the whole width beside the menu, like an app, never a centred column (Bruno, 2026-11-01 22:14: "as
   páginas devem utilizar todo o espaço disponível sempre"). */
.app-container { padding-top: 20px; padding-bottom: 40px; max-width: none; }
.app-bar { border-bottom: 1px solid var(--mud-palette-lines-default); backdrop-filter: saturate(1.4) blur(8px); }
.app-bar .mud-toolbar { gap: 10px; }
@media (max-width: 599px) { .app-bar .mud-toolbar { gap: 6px; } }
@media (max-width: 419px) { .app-bar .theme-toggle, .app-bar .theme-menu { display: none !important; } .app-bar .mud-toolbar-gutters { padding-left: 12px; padding-right: 12px; } }
.brand { display: flex; align-items: center; min-width: 0; margin-left: 4px; color: var(--mud-palette-appbar-text); }
.brand:hover { text-decoration: none; }

/* The wordmark: a basket on an accent circle (40px like the bar's round buttons), a gold rule, then the app's name above
   "SB STUDIO", as in WEDPLANNER's. */
.brand-mark { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: inherit; }
.brand-icon { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center;
    background: var(--wp-gold); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
.brand-icon .mud-icon-root { width: 22px; height: 22px; }
.brand-text { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; padding-left: 10px; border-left: 1.5px solid var(--wp-gold); line-height: 1.1; }
.brand-name { font-size: .8rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: .6rem; letter-spacing: .24em; color: var(--wp-gold); white-space: nowrap; }
/* Phones with several lists: the open list's name takes the wordmark's place. */
@media (max-width: 599.98px) { .app-bar:has(.list-switch) .brand-text { display: none; } }
@media (max-width: 379.98px) { .app-bar .brand-text { display: none; } }

/* The open list's name, which opens the others. */
.list-switch { min-width: 0; }
.list-switch-btn { display: inline-flex; align-items: center; gap: 2px; height: 36px; max-width: min(260px, 42vw); padding: 0 6px 0 12px; box-sizing: border-box;
    border: 1px solid var(--mud-palette-lines-default); border-radius: var(--wp-radius); background: transparent; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.list-switch-btn:hover { background: var(--mud-palette-action-default-hover); }
.list-switch-btn:focus-visible { outline: 2px solid var(--mud-palette-primary); outline-offset: 2px; }
.list-switch-btn .mud-icon-root { flex: none; }

.file-pick { position: relative; cursor: pointer; }
.file-pick-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 0; }
.file-pick-input::-webkit-file-upload-button { cursor: pointer; }
.avatar-btn { background: none; border: 0; padding: 0; margin: 0; cursor: pointer; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: inherit; }
.avatar-btn:focus-visible { outline: 2px solid var(--mud-palette-primary); outline-offset: 2px; }
/* Browser autofill paints a rectangular background that pokes out of the rounded outline. */
.mud-input input:-webkit-autofill,
.mud-input input:-webkit-autofill:hover,
.mud-input input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--mud-palette-surface) inset;
    box-shadow: 0 0 0 1000px var(--mud-palette-surface) inset;
    -webkit-text-fill-color: var(--mud-palette-text-primary);
    caret-color: var(--mud-palette-text-primary);
    transition: background-color 9999s ease-out 0s;
}
.mud-input.mud-input-outlined input:-webkit-autofill { border-radius: var(--mud-default-borderradius); }

.app-drawer .mud-drawer-content { display: flex; flex-direction: column; }
.app-drawer { border-right: 1px solid var(--mud-palette-lines-default); }
/* The first item touches the top bar (Bruno). */
.nav-wrap { display: flex; flex-direction: column; height: 100%; padding: 0 8px 12px; }
/* Side menu: every item a square band across the whole menu; the open one in the highlight green, on a faint green band
   with a bar on its left edge. */
.app-nav .mud-nav-item { margin: 0 -8px; width: auto; }
.app-nav .mud-nav-link { border-radius: 0 !important; margin: 0 !important; padding: 10px 24px; color: var(--mud-palette-drawer-text); }
.app-nav .mud-nav-link.active { background: color-mix(in srgb, var(--mud-palette-success) 12%, transparent) !important; box-shadow: inset 3px 0 0 var(--mud-palette-success); font-weight: 700; }
.app-nav .mud-nav-link.active, .app-nav .mud-nav-link.active :is(.mud-nav-link-text, .mud-nav-link-icon) { color: var(--mud-palette-success) !important; }
.app-nav .mud-nav-link.active .mud-nav-link-text { font-weight: 700; }
/* The counter on Compras sits at the right end of the item, red like the ones on the top bar icons (as in WedPlanner). */
.app-nav .mud-nav-link-text { display: flex; align-items: center; gap: 6px; }
.nav-count { background: var(--mud-palette-error); color: #fff; margin-left: auto; }
.bottom-nav a .mud-badge-root { display: flex; }
/* On the cart itself, not out at the corner of the green pill around it. */
.bottom-nav a .mud-badge.mud-badge-top.right.mud-badge-overlap { inset: auto auto calc(100% - 14px) calc(100% - 28px); }
.logout-form { margin: 0; }
.logout-btn { all: unset; display: flex; gap: 10px; align-items: center; padding: 8px 16px; width: 100%; box-sizing: border-box; cursor: pointer; font-size: .875rem; }
.logout-btn:hover { background: var(--mud-palette-action-default-hover); }

/* Bottom navigation (phones) */
.bottom-nav { display: none; }
/* The room the bottom bar keeps under itself for the iPhone's home indicator. Installed on an iPhone with iOS 26 the
   page's viewport stops about the status bar's height short of the screen's foot (WebKit bug 301994) and nothing on the
   page can draw below it, so the bar can't reach the foot. There (app.js sets "vp-gap") the strip under the viewport
   already lies over the home indicator: the bar keeps no extra room, and the strip takes the bar's colour so it reads as
   part of the bar (Bruno, 2026-11-05). */
/* Normally (the page has the whole screen: app.css's iOS 26 rule below sees to it) not the whole 34 pt the iPhone keeps
   clear for its home line (the buttons then floated high, ~44 pt of empty bar under their names), only what keeps them
   off the line itself (it takes the lowest ~13 pt): 10 pt, the names ~18 pt above the screen's edge (Bruno, 2026-11-05,
   as in the CCTV app). 0 where there is no home line. */
:root { --wp-nav-safe: max(0px, calc(env(safe-area-inset-bottom, 0px) - 24px)); }
html.vp-gap { --wp-nav-safe: 0px; }
html.vp-gap:root { background: var(--mud-palette-surface); }
html.vp-gap.wp-neon:root { background: rgb(7, 13, 42); }
@media (max-width: 959.98px) {
    .bottom-nav {
        display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1200;
        height: calc(var(--wp-bottom-nav) + var(--wp-nav-safe)); padding-bottom: var(--wp-nav-safe);
        background: var(--mud-palette-surface); border-top: 1px solid var(--mud-palette-lines-default);
    }
    .bottom-nav a {
        flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0;
        color: var(--mud-palette-text-secondary); font-size: .68rem; text-decoration: none;
    }
    .bottom-nav a > span:not(.mud-badge-root) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    /* The open item in the highlight green, its icon on a green pill. */
    .bottom-nav a.active { color: var(--mud-palette-success); font-weight: 700; }
    .bottom-nav a .mud-icon-root { box-sizing: content-box; padding: 3px 16px; border-radius: 999px; transition: background-color .15s ease; }
    .bottom-nav a.active .mud-icon-root { background: color-mix(in srgb, var(--mud-palette-success) 20%, transparent); }
    .app-container { padding-bottom: calc(var(--wp-bottom-nav) + 32px + var(--wp-nav-safe)); }
    .app-drawer { display: none; }
    /* The keyboard is up (app.js sets kb-open): the bottom bar steps aside so the field being typed in stays in view. */
    html.kb-open .bottom-nav { display: none; }
}
/* Phones and tablets: no double-tap zoom, and text fields at 16px so iOS doesn't zoom in when one is tapped. */
html.is-phone, html.is-phone body { touch-action: manipulation; }
html.is-phone :is(input:not([type=checkbox]):not([type=radio]), textarea, select) { font-size: 16px; }

/* Installed on a phone the page runs under the status bar (viewport-fit=cover, black-translucent): the app bar grows
   by the status bar's height and everything under it moves down with it. */
:root { --wp-safe-top: env(safe-area-inset-top, 0px); }
:root { --wp-main-top: calc(var(--mud-appbar-height) - var(--mud-appbar-height) / 8 + var(--wp-safe-top)); } /* the app bar's height, as MudBlazor sizes it */
@media (orientation: landscape) { :root { --wp-main-top: calc(var(--mud-appbar-height) - var(--mud-appbar-height) / 4 + var(--wp-safe-top)); } }
@media (min-width: 600px) { :root { --wp-main-top: calc(var(--mud-appbar-height) + var(--wp-safe-top)); } }
/* iOS 26, installed: while the page is shorter than the screen, iOS gives it a window shorter than the screen by the
   status bar's height (the WebKit bug the "vp-gap" above works around), so the bottom bar stopped that high and left a
   strip under it. A page at least as tall as the screen gets the whole screen: so the page is made the screen's height,
   the window plus the status bar, never more than the screen itself (100lvh). Then the window is the whole screen and
   "vp-gap" stays off; it remains as the fallback should the strip ever come back. Without a status bar over the page
   (a computer, Android) the inset is 0 and nothing changes. (Bruno, 2026-11-05, as in the CCTV app.) */
@media (display-mode: standalone) {
    html { min-height: min(100lvh, calc(100% + env(safe-area-inset-top, 0px))); }
}
.app-bar.mud-appbar { padding-top: var(--wp-safe-top); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
.mud-layout .mud-main-content.app-main { padding-top: var(--wp-main-top); }
.mud-drawer-fixed.mud-drawer-responsive.mud-drawer-clipped-always.app-drawer { top: var(--wp-main-top); height: calc(100% - var(--wp-main-top)); }
/* The status bar's clock is always white: in the light theme it gets a dark strip behind it. */
html:not(.wp-dark) .app-bar::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: var(--wp-safe-top); background: rgba(18, 17, 16, .6); pointer-events: none; }

/* ---------- Page chrome ---------- */
/* The title, with the page's search or add box under it, stays under the app bar while the page scrolls. It spans the
   container's gutters so what scrolls beneath is hidden edge to edge; once the page has scrolled, a line marks its lower
   edge (app.js sets "scrolled"). */
.page-top { position: sticky; top: var(--wp-main-top); z-index: 6; margin: -12px -16px 8px; padding: 12px 16px 10px; background: var(--mud-palette-background); }
@media (min-width: 600px) { .page-top { margin-left: -24px; margin-right: -24px; padding-left: 24px; padding-right: 24px; } }
html.scrolled .page-top { border-bottom: 1px solid var(--mud-palette-lines-default); }
.page-top > * + * { margin-top: 12px; }
.page-top > :is(.quick-add, .toolbar) { margin-bottom: 0; }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-header-text { display: flex; align-items: center; gap: 4px; min-width: 0; }
.page-header-text > div { min-width: 0; }
.page-header-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.page-title { font-size: 1.9rem !important; line-height: 1.15 !important; overflow-wrap: anywhere; }
@media (max-width: 599.98px) {
    .page-title { font-size: 1.5rem !important; }
    /* Header buttons shrink to their icon next to the title. */
    .page-header-actions .btn-text { display: none; }
    .page-header-actions .new-btn { min-width: 40px; padding: 0 10px; }
    .page-header-actions .new-btn .mud-button-icon-start { margin: 0; }
}
/* Titles are upper case: page, section, card and dialog titles. The strings stay normally written (they translate as
   usual); names shown as a title (a person, a list) keep their case with .keep-case. */
.page-title, .mud-typography-h5, .mud-typography-h6, .mud-typography-subtitle2, .mud-dialog-title, .auth-title, .auth-hero h2,
.month-header { text-transform: uppercase !important; letter-spacing: .04em; }
.keep-case, .mud-dialog-title .keep-case { text-transform: none !important; letter-spacing: normal; }
.section-label { margin: 0 0 8px 2px; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--mud-palette-text-secondary); }
.field-label { margin: 6px 0 6px 2px; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--mud-palette-text-secondary); }
.month-header { font-weight: 600; color: var(--mud-palette-text-secondary); margin: 18px 4px 8px; font-size: .82rem; }

.card { border: 1px solid var(--mud-palette-lines-default); border-radius: var(--wp-radius) !important; background: var(--mud-palette-surface); overflow: hidden; }
.card-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }

/* Titles that stay: a card's (or a day's) title sticks at the top of the list that scrolls it while its rows scroll
   beneath, until its card has gone by and the next one takes its place. Where the window scrolls instead, it sticks
   under the page's title (app.js keeps --wp-top-h at that title's height). app.js puts "stuck" on a title while it is
   held, which draws its lower edge. A card holding one clips with overflow: clip,
   which unlike hidden doesn't stop it sticking. */
:root { --wp-stick: calc(var(--wp-main-top) + var(--wp-top-h, 0px)); }
.stick { position: sticky; top: var(--wp-stick); z-index: 3; background: var(--mud-palette-surface); }
.stick.stuck { box-shadow: 0 1px 0 var(--mud-palette-lines-default); }
/* In a list that scrolls on its own, a held title also covers the few pixels above it, in its own colour: the iPhone
   draws the scrolling rows and the held title separately and can leave the title a hair below the list's edge, with a
   line of the rows passing beneath showing above it (Bruno, 2026-10-30). The list's edge cuts it off, so it never shows
   above the list. */
:is(.fill-scroll, .pick-rows) .stick.stuck::before { content: ''; position: absolute; left: 0; right: 0; bottom: 100%; height: 4px;
    background: inherit; -webkit-backdrop-filter: inherit; backdrop-filter: inherit; pointer-events: none; }
.card:has(.stick) { overflow: clip; }
/* In a padded card the title spans the card's whole width, so nothing shows beside it as rows pass beneath. */
.card.pa-4 > .stick { margin-top: -16px; margin-inline: -16px; padding: 16px 16px 8px; }
.card-head > .mud-button-root { flex: none; }

.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
/* MudBlazor repeats Class on inner elements, so size only the outer ones. */
.toolbar > .toolbar-search { max-width: 420px; flex: 1 1 240px; }
/* MudSelect doesn't put Class on its outer element, so the order box is found as the toolbar's select. */
.toolbar > .mud-select { flex: 0 0 210px; }
@media (max-width: 599.98px) {
    /* Search and order share one row, so the part that stays at the top is short. */
    .toolbar { gap: 8px; flex-wrap: nowrap; }
    .toolbar > .toolbar-search { flex: 1 1 auto; min-width: 0; max-width: none; }
    .toolbar > .mud-select { flex: 0 0 40%; min-width: 0; }
    .toolbar-sort input { text-overflow: ellipsis; }
}
/* Artigos: which categories to show, beside the search and the order; on phones, on the row under them. */
.toolbar > .mud-select.toolbar-cats { flex: 0 0 260px; }
@media (max-width: 599.98px) {
    .toolbar:has(> .toolbar-cats) { flex-wrap: wrap; }
    .toolbar:has(> .toolbar-cats) > .toolbar-search { flex: 1 1 0; }
    .toolbar > .mud-select.toolbar-cats { flex: 1 1 100%; }
}
.cat-option, .section-cat { display: inline-flex; align-items: center; gap: 8px; }
:is(.cat-option, .section-cat) > .mud-icon-root { color: var(--mud-palette-primary); flex: none; }
.cats-popover .cat-option .section-photo { width: 24px; height: 24px; }
/* Artigos' section titles: an item in several categories is headed by all of them. */
.section-name.section-cats { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 16px; white-space: normal; }
.group-chips .mud-chip { margin: 0 8px 8px 0; }

/* ---------- Lists ---------- */
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--mud-palette-lines-default); color: inherit; }
.list-row:last-child { border-bottom: none; }
a.list-row:hover { text-decoration: none; }
.list-row-main { flex: 1; min-width: 0; color: inherit; }
a.list-row-main:hover { text-decoration: none; }
.list-row-title { display: block; font-weight: 600; overflow-wrap: anywhere; }
.list-row-sub { display: block; font-size: .8rem; color: var(--mud-palette-text-secondary); }
.row-actions { display: flex; gap: 4px; flex: none; }

.kv-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--mud-palette-lines-default); font-size: .9rem; }
.kv-list > div:last-child { border-bottom: none; }
.kv-list > div > span:first-child { color: var(--mud-palette-text-secondary); }
.kv-list > div > b { text-align: right; overflow-wrap: anywhere; }
.kv-list .kv-block { flex-direction: column; gap: 0; }
.kv-list .kv-block p { margin: 4px 0 0; white-space: pre-line; }

/* Dialogs get a visible edge in the accent colour and a deeper shadow, so they stand apart from the page behind. */
.mud-dialog { border: 1px solid color-mix(in srgb, var(--mud-palette-primary) 80%, transparent); box-shadow: 0 18px 50px rgba(0, 0, 0, .28) !important; }
html.wp-dark .mud-dialog { box-shadow: 0 18px 50px rgba(0, 0, 0, .7) !important; }
/* Installed on an iPhone, no window goes under the status bar and the Dynamic Island (Bruno, 2026-10-28). */
.mud-dialog-container { padding-top: var(--wp-safe-top); padding-bottom: env(safe-area-inset-bottom, 0px); box-sizing: border-box; }
.mud-dialog-container .mud-dialog { max-height: calc(100dvh - var(--mud-appbar-height) - var(--wp-safe-top) - env(safe-area-inset-bottom, 0px)); }
/* The green cart's window opens just under the app bar, not at the very top, and takes the rest of the page's height
   (Bruno, 2026-10-28); with the keyboard up it ends above the keyboard. Its list fills what the box leaves. */
.mud-dialog-container.mud-dialog-topcenter:has(.quick-add-dialog) { padding-top: calc(var(--wp-main-top) + 12px); }
.mud-dialog-container .mud-dialog.quick-add-dialog { height: calc(100dvh - var(--wp-main-top) - 24px - env(safe-area-inset-bottom, 0px)); max-height: none; }
html.kb-open .mud-dialog-container .mud-dialog.quick-add-dialog { height: max(240px, calc(var(--wp-vvh) - var(--wp-main-top) - 24px)); }
.quick-add-dialog .mud-dialog-content { display: flex; flex-direction: column; overflow: hidden; }
.mud-overlay-dialog .mud-overlay-scrim.mud-overlay-dark { background-color: rgba(20, 18, 16, .6); }

/* Tabs: upper case labels; the open tab in the highlight green, with a line between tabs. */
.mud-tab { text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.history-tabs .mud-tabs-tabbar { background: var(--mud-palette-background); border-bottom: 1px solid var(--mud-palette-lines-default); border-radius: 0 !important; }
/* The tabs stay put under the month's numbers; only the open tab's list scrolls, each day's title held at its top. */
.fill-page > .history-tabs { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.history-tabs > .mud-tabs-tabbar { flex: none; }
.history-tabs > .mud-tabs-panels { flex: 1 1 auto; min-height: 0; }
/* No padding above the lists (Bruno, 2026-10-30): a date held at the top stops at the list's padding, so rows showed in the
   gap between the tabs and the date. A card first in a tab keeps that little space as a margin instead. */
.history-tabs .mud-tab-panel > .card:first-child { margin-top: 4px; }
.history-tabs .mud-tabs-tabbar-wrapper > .mud-tooltip-root + .mud-tooltip-root { border-left: 1px solid var(--mud-palette-lines-default); }
.history-tabs .mud-tab.mud-tab-active, .history-tabs .mud-tab.mud-tab-active .mud-icon-root { color: var(--mud-palette-success) !important; }
.history-tabs .mud-tab-slider { background: var(--mud-palette-success) !important; }
/* MudTabs wraps each tab in a tooltip root, so that is the flex item: the tabs share the row and their labels wrap. */
.wrap-tabs .mud-tabs-tabbar-content, .wrap-tabs .mud-tabs-tabbar-wrapper { width: 100%; }
.wrap-tabs .mud-tabs-tabbar-wrapper > .mud-tooltip-root { flex: 1 1 0; min-width: 0; }
.wrap-tabs .mud-tabs-scroll-button { display: none; }
.wrap-tabs .mud-tab { white-space: normal; line-height: 1.2; width: 100%; min-width: 0 !important; min-height: 48px; height: 100%; padding: 6px 8px; }

/* ---------- Shopping list ---------- */
/* Adding: one box, whose matches (or the new name typed) are put on the list with a tap, or Enter. */
.quick-add { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 16px; }
.quick-add > .quick-add-name { flex: 1 1 auto; min-width: 0; }
/* The + beside it opens a whole new item; as tall as the box. */
.quick-add > .quick-add-new { width: 40px; height: 40px; }
/* Fields in a row with a button: no outer margins, so the field and the button line up exactly. */
:is(.quick-add, .barcode-row, .toolbar, .setup-grid .d-flex, .mud-dialog .d-flex) > .mud-input-control,
.quick-add > .mud-autocomplete .mud-input-control { margin-top: 0; margin-bottom: 0; }
/* Compras' one box for searching and for the articles (Bruno, 2026-11-05): the arrow at its end opens every article in a
   dropdown as wide as the box and its +, reaching down to the bottom of the screen (or to the keyboard); the group titles
   are held at the top of its own scroll. */
.quick-add { position: relative; }
/* In the title's place (Bruno, 2026-11-05): the box fills the row up to the page's buttons, and the list's name is its
   label, held on the box's top edge, upper case like a title. */
.page-header:has(> .has-box) { flex-wrap: nowrap; }
.page-header-text.has-box { flex: 1 1 auto; }
.page-top > .pick-anchor { margin: 0 !important; height: 0; }
.page-header-text.has-box > .quick-add { align-items: center; }
.page-header:has(> .has-box) > .page-header-actions { flex-wrap: nowrap; flex: none; }
.page-header-text.has-box > .quick-add { flex: 1 1 auto; min-width: 0; margin-bottom: 0; }
.quick-add-name .mud-input-label { text-transform: uppercase !important; letter-spacing: .06em; font-weight: 700; color: var(--mud-palette-text-primary); }
.quick-add-name .mud-input-label { max-width: calc(133% - 32px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-add-name .mud-input-control { margin-top: 0; margin-bottom: 0; }
.quick-add-name .mud-input-adornment-end .mud-icon-button { margin-right: -6px; }
.mud-popover.pick-popover { margin-top: 6px; border: 1px solid var(--mud-palette-lines-default); border-radius: var(--wp-radius); overflow: hidden; }
.pick-popover .pick-list { max-height: max(180px, calc(100dvh - var(--wp-main-top) - var(--wp-top-h, 120px) - 12px)); }
@media (max-width: 959.98px) {
    .pick-popover .pick-list { max-height: max(180px, calc(100dvh - var(--wp-main-top) - var(--wp-top-h, 120px) - 12px - var(--wp-bottom-nav) - var(--wp-nav-safe))); }
}
html.kb-open .pick-popover .pick-list { max-height: max(160px, calc(var(--wp-vvh) - var(--wp-main-top) - var(--wp-top-h, 120px) - 8px)); }
.pick-list > .suggest-row:first-child { border-top: 0; }
.pick-list > .search-new + .list-section > .section-bar { border-top: 1px solid var(--mud-palette-lines-default); }

/* What is probably running out: one tap puts it on the list. Due today in amber, late in red. */
.suggest-card { margin-bottom: 16px; border-color: color-mix(in srgb, var(--mud-palette-warning) 45%, var(--mud-palette-lines-default)) !important; }
.suggest-card .card-head .section-count { margin-left: auto; }
/* Folded (html.due-collapsed, remembered on the device): only the title, its arrow pointing down. */
.suggest-card .card-head[data-due-toggle] { cursor: pointer; user-select: none; -webkit-user-select: none; }
.due-toggle { flex: none; width: 32px; height: 32px; margin: -4px -8px -4px -2px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center;
    background: none; color: var(--mud-palette-text-secondary); cursor: pointer; }
.due-toggle .mud-icon-root { transition: transform .2s; }
@media (hover: hover) { .due-toggle:hover { background: color-mix(in srgb, var(--mud-palette-text-primary) 8%, transparent); } }
.due-toggle:focus-visible { outline: 2px solid var(--mud-palette-primary); outline-offset: 1px; }
html.due-collapsed .suggest-card .suggest-rows { display: none; }
html.due-collapsed .suggest-card .card-head { padding-bottom: 12px !important; }
html.due-collapsed .due-toggle .mud-icon-root { transform: rotate(180deg); }
/* One item per row across the card; the green + on the right (or anywhere on the row) puts it on the list. Three rows
   show; the rest scroll inside the card, or are found by typing in the add box. */
.suggest-rows { display: flex; flex-direction: column; max-height: 180px; overflow-y: auto; overscroll-behavior: contain; }
.suggest-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 8px 16px; box-sizing: border-box;
    border: 0; border-top: 1px solid var(--mud-palette-lines-default); background: none; color: inherit; font: inherit; text-align: left;
    cursor: pointer; transition: background-color .15s; }
/* The item's photo, or its category's icon, so the rows can be told apart at a glance. */
.suggest-thumb { flex: none; width: 40px; height: 40px; border-radius: max(4px, calc(var(--wp-radius) - 3px)); object-fit: cover; display: block; background: var(--mud-palette-background-gray); }
.suggest-thumb.empty { display: grid; place-items: center; background: color-mix(in srgb, var(--mud-palette-primary) 10%, transparent); color: var(--mud-palette-primary); }
.suggest-text { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.suggest-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.suggest-when { font-size: .75rem; color: var(--mud-palette-text-secondary); white-space: nowrap; }
.suggest-add { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
    background: var(--mud-palette-success); color: #fff; transition: transform .15s, filter .15s; }
/* Due today in amber, late in red: the date, and a bar on the row's left edge. */
.suggest-row.today, .quick-hit.today { box-shadow: inset 3px 0 0 var(--mud-palette-warning); }
:is(.suggest-row, .quick-hit).today .suggest-when { color: var(--mud-palette-warning); font-weight: 600; }
.suggest-row.late, .quick-hit.late { box-shadow: inset 3px 0 0 var(--mud-palette-error); }
:is(.suggest-row, .quick-hit).late .suggest-when { color: var(--mud-palette-error); font-weight: 600; }
@media (hover: hover) { .suggest-row:hover .suggest-add { filter: brightness(1.1); } }
.suggest-row:active .suggest-add { transform: scale(.92); }
/* The matches under "O que falta comprar?": photo, how many and the price, and the same green + (or a tick when the
   item is already on the list). The whole row is the button that puts it on the list. */
.search-popover { width: min(420px, calc(100vw - 32px)); }
.search-popover .search-item { padding: 0 !important; }
.search-popover .search-item .mud-list-item-text { margin: 0; }
.search-hit { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; padding: 6px 16px; box-sizing: border-box;
    border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.search-hit:active .suggest-add { transform: scale(.92); }
/* The Dashboard's green cart: the same matches in a window, across its whole width, scrolling under the box. */
.quick-add-hits { flex: 1 1 auto; min-height: 0; margin: 10px -24px 0; overflow-y: auto; overscroll-behavior: contain; }
.quick-hit.search-hit { min-height: 56px; padding: 8px 24px; transition: background-color .15s; }
.quick-add-hint { padding: 14px 24px 4px; color: var(--mud-palette-text-secondary); font-size: .88rem; }
.search-on { color: var(--mud-palette-success); font-weight: 600; }
.search-done { flex: none; width: 36px; height: 36px; display: grid; place-items: center; color: var(--mud-palette-success); }
.suggest-row:focus-visible { outline: 2px solid var(--mud-palette-primary); outline-offset: -2px; }
/* Compras' articles card (Bruno, 2026-10-30): every article, what should be running out in its own group first, then
   the rest by category. The group titles are held at the top of the card's own scroll (1px under its edge, as in a
   .fill-scroll), with three rows under them; a line above each title after the first, none between a title and its
   first row. */
.pick-rows { max-height: 218px; --wp-stick: -1px; }
/* The line under the card's title is the title's own, opaque in every theme, and it lies over the list's first pixel:
   on the iPhone a held group title sits a hair below the list's top edge, not 1px above it, and the rows passing
   beneath showed in that hair (Bruno, 2026-10-30 and 2026-11-04). Only the line may cover the list: the title itself is
   see-through in Néon and over a picture, and rows showed through it where it covered more. Folded, it's just the
   title. */
.suggest-card > .card-head { position: relative; z-index: 4; margin-bottom: -1px !important; border-bottom: 1px solid var(--mud-palette-lines-default); }
html:not(.wp-neon):not(:has(.app-bg)) .suggest-card > .card-head { background: var(--mud-palette-surface); }
html.due-collapsed .suggest-card > .card-head { margin-bottom: 0 !important; border-bottom: 0; }
.pick-rows > .list-section + .list-section > .section-bar { border-top: 1px solid var(--mud-palette-lines-default); }
.pick-rows .section-bar + .suggest-row { border-top: 0; }
.pick-due > .section-bar > .mud-icon-root { color: var(--mud-palette-warning); }

/* Artigos: one card per category in the shop's order, each across the whole width: never side by side, not even on a
   tablet turned sideways (Bruno, 2026-10-28). */
.list-sections { display: flex; flex-direction: column; gap: 14px; }
/* Compras: the categories in one card, so the whole list scrolls as one (Bruno, 2026-10-30); a line above each title
   after the first, and none under the last row of a category. */
.list-one > .list-section + .list-section > .section-bar { border-top: 1px solid var(--mud-palette-lines-default); }
.list-one > .list-section > .list-row:last-child { border-bottom: 0; }
.section-bar { display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-bottom: 1px solid var(--mud-palette-lines-default);
    background: color-mix(in srgb, var(--mud-palette-primary) 7%, transparent); color: var(--mud-palette-text-secondary);
    font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
/* Its tint over the card's own colour, so rows passing beneath don't show through it. */
.section-bar.stick { background: linear-gradient(color-mix(in srgb, var(--mud-palette-primary) 7%, transparent), color-mix(in srgb, var(--mud-palette-primary) 7%, transparent)) var(--mud-palette-surface); }
.section-bar > .mud-icon-root { flex: none; color: var(--mud-palette-primary); }
.section-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.section-count { background: color-mix(in srgb, var(--mud-palette-primary) 18%, transparent); color: var(--mud-palette-text-primary); }
.section-photo { width: 26px; height: 26px; border-radius: var(--wp-radius); object-fit: cover; flex: none; display: block; }
.section-photo.big { width: 44px; height: 44px; }

/* One item: the round tick (bought) or cart toggle on the left, picture, name and details, who added it, edit. */
.list-row.item-row { gap: 10px; padding: 8px 10px 8px 12px; min-height: 64px; box-sizing: border-box; }
.item-check { flex: none; width: 40px; height: 40px; padding: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
    border: 2px solid color-mix(in srgb, var(--mud-palette-primary) 55%, transparent); background: transparent; color: var(--mud-palette-success);
    transition: background-color .15s, border-color .15s, color .15s; }
.item-check .mud-icon-root { opacity: 0; transition: opacity .15s; }
.item-check:focus-visible { outline: 2px solid var(--mud-palette-primary); outline-offset: 2px; }
@media (hover: hover) {
    .item-check:hover { border-color: var(--mud-palette-success); background: color-mix(in srgb, var(--mud-palette-success) 12%, transparent); }
    .item-check:hover .mud-icon-root { opacity: .8; }
}
.item-check:active { background: var(--mud-palette-success); border-color: var(--mud-palette-success); color: #fff; }
.item-check:active .mud-icon-root { opacity: 1; }
/* On the shopping list: a white cart on a green circle (like the + of "Deve estar a acabar"), which asks whether the
   item was bought. */
.item-check.cart { border: 0; background: var(--mud-palette-success); color: #fff; transition: transform .15s, filter .15s; }
.item-check.cart .mud-icon-root { opacity: 1; width: 22px; height: 22px; }
@media (hover: hover) { .item-check.cart:hover { background: var(--mud-palette-success); filter: brightness(1.1); } }
.item-check.cart:active { background: var(--mud-palette-success); transform: scale(.92); }
.buy-question { margin-bottom: 14px; color: var(--mud-palette-text-secondary); }
.buy-choices { display: grid; gap: 10px; padding-bottom: 8px; }
.buy-choices .mud-button-root { min-height: 44px; }
/* In the catalogue, at the end of the row: the green + of "Deve estar a acabar" puts the item on the list; while it is
   on the list a soft green tick takes it off again. */
.item-put { flex: none; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
    background: var(--mud-palette-success); color: #fff; transition: transform .15s, filter .15s, background-color .15s; }
.item-put.on { background: color-mix(in srgb, var(--mud-palette-success) 15%, transparent); color: var(--mud-palette-success); }
@media (hover: hover) { .item-put:hover { filter: brightness(1.1); } }
.item-put:active { transform: scale(.92); }
.item-put:focus-visible { outline: 2px solid var(--mud-palette-primary); outline-offset: 2px; }
.item-open { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 12px; color: inherit;
    background: none; border: 0; padding: 0; margin: 0; font: inherit; text-align: left; cursor: pointer; }
.item-open:hover { text-decoration: none; }
.item-open:hover .item-name { text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
.item-thumb { width: 44px; height: 44px; border-radius: var(--wp-radius); object-fit: cover; flex: none; display: block; background: var(--mud-palette-background-gray); }
.item-thumb.empty { display: grid; place-items: center; background: color-mix(in srgb, var(--mud-palette-primary) 10%, transparent); color: var(--mud-palette-primary); }
.item-thumb.empty.big { width: 120px; height: 120px; }
.item-thumb.empty.big .mud-icon-root { width: 48px; height: 48px; }
.item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; margin-top: 1px; }
.item-meta:empty { display: none; }
.item-meta > .ellipsis { max-width: 100%; min-width: 0; }
.item-qty { font-weight: 700; color: var(--mud-palette-text-primary); }
.item-by { flex: none; display: inline-flex; }
.item-by .mud-avatar { width: 28px; height: 28px; font-size: .7rem; }
.item-edit { flex: none; }
/* The pencil stands out (Bruno, 2026-11-05: "O botão editar precisa estar mais visível"): a solid circle in the theme's
   main colour, the size of the green cart beside it. */
.item-row .item-edit.mud-icon-button { background-color: var(--mud-palette-primary) !important; color: var(--mud-palette-primary-text) !important;
    transition: transform .15s, filter .15s; }
@media (hover: hover) { .item-row .item-edit.mud-icon-button:hover { background-color: var(--mud-palette-primary) !important; filter: brightness(1.1); } }
.item-row .item-edit.mud-icon-button:active { transform: scale(.92); }
.item-row .item-edit .mud-icon-root { width: 22px; height: 22px; }
html.wp-neon .item-row .item-edit.mud-icon-button { color: #04122E !important; box-shadow: 0 0 12px color-mix(in srgb, var(--mud-palette-primary) 55%, transparent); }
.item-row.on-list { background: color-mix(in srgb, var(--mud-palette-success) 6%, transparent); }
.item-due { display: inline-flex; align-items: center; gap: 3px; }
.item-due .mud-icon-root { width: 15px; height: 15px; }
.item-due.due { color: var(--mud-palette-warning); font-weight: 600; }

/* ---------- Item dialog and page ---------- */
.item-form > * + * { margin-top: 12px; }
.item-form .mud-grid { margin-top: 0; }
.item-form-photo { display: flex; align-items: center; gap: 14px; }
.item-form-photo > img { width: 96px; height: 96px; border-radius: var(--wp-radius); object-fit: cover; flex: none; border: 1px solid var(--mud-palette-lines-default); }
.item-form-photo > .item-thumb.empty.big { width: 96px; height: 96px; }
.btn-col { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.barcode-row { display: flex; align-items: center; gap: 8px; }
/* Item dialog tabs (Artigo · Produto · Nutrição) share the width, with no scroll arrows on a phone. */
.item-tabs .mud-tabs-scroll-button { display: none; }
.item-tabs .mud-tabs-tabbar { background: transparent; }
.item-tabs .mud-tabs-tabbar-inner { min-height: 0; }
.item-tabs .mud-tabs-tabbar-wrapper { width: 100% !important; transform: none !important; gap: 4px; align-items: flex-end; }
.item-tabs :is(.mud-tabs-slider, .mud-tab-slider) { display: none; }
/* Folder tabs: each header framed, the active one joins the framed area below. */
.item-tabs .mud-tabs-tabbar .mud-tab { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 6px 4px; gap: 6px;
    border: 1px solid var(--mud-palette-lines-default); border-bottom: none; border-radius: 10px 10px 0 0;
    color: var(--mud-palette-text-secondary); background: color-mix(in srgb, var(--mud-palette-text-primary) 4%, transparent);
    font-size: .8rem; letter-spacing: .02em; white-space: nowrap; overflow: hidden; }
.item-tabs .mud-tabs-tabbar .mud-tab .mud-icon-root { font-size: 1.25rem; margin: 0 !important; }
.item-tabs .mud-tabs-tabbar .mud-tab.mud-tab-active { color: var(--mud-palette-primary); border-color: var(--mud-palette-primary);
    background: var(--mud-palette-surface); position: relative; z-index: 1; margin-bottom: -1px; padding-bottom: 7px; }
.item-tabs .mud-tabs-tabbar .mud-tab { padding-right: 12px; }
.item-tabs .mud-tabs-tabbar .mud-tab .mud-badge.mud-badge-dot { margin-left: 2px; }
@media (max-width: 420px) { .item-tabs .mud-tabs-tabbar .mud-tab { flex-direction: column; gap: 2px; font-size: .72rem; padding-right: 4px; } }
/* The framed area keeps one size on every tab (the window never jumps) and scrolls inside. */
.item-tab-panels { border: 1px solid var(--mud-palette-primary); border-radius: 0 0 var(--wp-radius) var(--wp-radius);
    padding: 14px 12px; height: min(56dvh, 600px); overflow-y: auto; overscroll-behavior: contain; }
.barcode-row > .mud-input-control { flex: 1 1 auto; min-width: 0; }

.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 14px; align-items: start; }
.item-hero { display: flex; flex-direction: column; gap: 14px; }
.item-hero-photo { display: block; width: 100%; max-height: 320px; object-fit: contain; border-radius: var(--wp-radius); background: color-mix(in srgb, var(--mud-palette-primary) 5%, transparent); }
.item-hero > .item-thumb.empty.big { width: 100%; height: 160px; }

.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.mini-stat { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--mud-palette-lines-default); border-radius: var(--wp-radius); min-width: 0; }
.mini-stat b { font-size: 1.3rem; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.mini-stat span:where(:not(.count-up, .paid-ring, .paid-ring *)) { font-size: .72rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--mud-palette-text-secondary); }
.mini-stat.due b { color: var(--mud-palette-warning); }
/* On a phone the History's three numbers share one short row, leaving the screen to the purchases. */
@media (max-width: 599.98px) {
    .fill-page > .stats-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px !important; }
    .fill-page > .stats-row .mini-stat { padding: 8px 10px; }
    .fill-page > .stats-row .mini-stat b { font-size: 1.05rem; }
    .fill-page > .stats-row .mini-stat span:where(:not(.count-up, .paid-ring, .paid-ring *)) { font-size: .6rem; letter-spacing: .03em; }
}
.purchase-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--mud-palette-lines-default); font-size: .9rem; }
.purchase-row:last-child { border-bottom: none; }
.purchase-row > .mud-icon-root { flex: none; }
.purchase-date { flex: none; font-weight: 600; }
.purchase-row > .ellipsis { flex: 1 1 auto; min-width: 0; }
.purchase-price { margin-left: auto; flex: none; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Nutri-Score, NOVA and Eco-Score: each in its own grade colour (Ui.GradeColor / NovaColor). */
.score-row { display: flex; flex-wrap: wrap; gap: 10px; }
.score { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 88px; padding: 8px 12px; box-sizing: border-box;
    border: 2px solid var(--score); border-radius: var(--wp-radius); color: var(--score); background: color-mix(in srgb, var(--score) 10%, transparent); }
.score small { font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.score b { font-size: 1.6rem; font-weight: 700; line-height: 1; }
.nutrition > div { font-variant-numeric: tabular-nums; }

/* ---------- Categories ---------- */
.group-row > .item-thumb, .group-row > .section-photo { flex: none; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 6px; }
.icon-pick { height: 48px; border-radius: var(--wp-radius); border: 1px solid var(--mud-palette-lines-default); background: none; color: var(--mud-palette-text-secondary);
    display: grid; place-items: center; cursor: pointer; transition: border-color .15s, background-color .15s, color .15s; }
.icon-pick:hover { border-color: var(--mud-palette-primary); color: var(--mud-palette-primary); }
.icon-pick.active { border: 2px solid var(--mud-palette-primary); background: color-mix(in srgb, var(--mud-palette-primary) 12%, transparent); color: var(--mud-palette-primary); }
.icon-pick:focus-visible { outline: 2px solid var(--mud-palette-primary); outline-offset: 2px; }

/* ---------- History ---------- */
.day-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.day-head.stick { margin: 10px 0 0; padding: 8px 4px; background: var(--mud-palette-background); }
.day-total { color: var(--mud-palette-text-primary); font-weight: 700; font-variant-numeric: tabular-nums; }
/* The activity feed: the person's face with what they did in a small badge on its corner. */
.notif-actor { position: relative; flex: none; display: inline-flex; }
.notif-kind { position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
    background: var(--mud-palette-surface); color: var(--mud-palette-primary); box-shadow: 0 0 0 1px var(--mud-palette-lines-default); }
.notif-kind .mud-icon-root { width: 13px; height: 13px; }

/* ---------- Lists (households) ---------- */
.household-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.household-head.stick { margin-bottom: 8px; }
.household-photo { width: 56px; height: 56px; border-radius: var(--wp-radius); object-fit: cover; flex: none; display: block; }
.household-photo.empty { display: grid; place-items: center; background: color-mix(in srgb, var(--mud-palette-primary) 12%, transparent); color: var(--mud-palette-primary); }
.open-tag { color: var(--mud-palette-success); font-weight: 600; }
.invite-box { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 16px; padding: 14px 16px; border-radius: var(--wp-radius);
    background: color-mix(in srgb, var(--mud-palette-primary) 7%, transparent); border: 1px dashed color-mix(in srgb, var(--mud-palette-primary) 45%, transparent); }
.invite-box > div { min-width: 0; flex: 1 1 220px; }
.invite-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.7rem; font-weight: 700; letter-spacing: .14em; line-height: 1.3; user-select: all; }
.household-card .list-row { padding: 10px 8px; margin-inline: -8px; }
.request-row { flex-wrap: wrap; }
.request-row > .list-row-main { flex: 1 1 160px; }
.owner-tag { flex: none; }
.suggest-setting { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--mud-palette-lines-default); border-radius: var(--wp-radius); }
.suggest-setting > .mud-icon-root { flex: none; }
.suggest-setting > .days-field { flex: 0 0 88px; }
.days-field input { text-align: center; font-weight: 700; }
@media (max-width: 599.98px) {
    .suggest-setting { flex-wrap: wrap; }
    .suggest-setting > .mud-icon-root { display: none; }
    .suggest-setting > .flex-grow-1 { flex: 1 1 100%; }
}

/* First list: create one or join someone's with a code. */
.setup { display: flex; flex-direction: column; gap: 8px; }
.setup-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.setup-grid .mud-button-root { flex: none; white-space: nowrap; }
.code-input input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; text-transform: uppercase; letter-spacing: .14em; }

/* ---------- Barcode scanner ---------- */
.scan-view { position: relative; aspect-ratio: 4 / 3; border-radius: var(--wp-radius); overflow: hidden; background: #000; }
.scan-view video { display: block; width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; inset: 24% 10%; border: 2px solid rgba(255, 255, 255, .9); border-radius: 10px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .35); pointer-events: none; }
.scan-frame::after { content: ""; position: absolute; left: 8px; right: 8px; top: 50%; height: 2px; background: var(--mud-palette-error); box-shadow: 0 0 8px var(--mud-palette-error);
    animation: gl-scan-line 1.8s ease-in-out infinite alternate; }
@keyframes gl-scan-line { from { transform: translateY(-38px); } to { transform: translateY(38px); } }
@media (prefers-reduced-motion: reduce) { .scan-frame::after { animation: none; } }
.scan-message { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px;
    text-align: center; color: #fff; background: rgba(0, 0, 0, .75); }
.scan-message .mud-icon-root { width: 40px; height: 40px; opacity: .8; }
.scan-view:has(.scan-message) .scan-frame { display: none; }

/* ---------- Misc ---------- */
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 40px 16px; color: var(--mud-palette-text-primary); }
.empty-state > .muted { max-width: 460px; }
.empty-icon { font-size: 48px !important; width: 48px !important; height: 48px !important; color: var(--wp-gold); opacity: .75; margin-bottom: 4px; }
.install-banner .mud-alert-message { flex: 1; min-width: 0; }
.more-head { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.flag { width: 20px; height: 15px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); flex-shrink: 0; vertical-align: middle; }
/* The language button is the flag itself, filling the whole 40px circle. */
.lang-menu-item { display: flex; align-items: center; gap: 10px; padding: 8px 18px; color: inherit; white-space: nowrap; }
.lang-menu-item:hover { text-decoration: none; background: var(--mud-palette-action-default-hover); }
.lang-menu-item.active { font-weight: 600; color: var(--wp-gold); }
.lang-menu-item.active .mud-icon-root { color: inherit; }
/* The top bar's theme and list menus use the same rows as buttons. */
button.lang-menu-item { width: 100%; border: 0; background: none; font: inherit; cursor: pointer; text-align: left; justify-content: flex-start; }
.lang-option { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: var(--wp-radius); border: 1px solid var(--mud-palette-lines-default); text-align: center; color: inherit; font-weight: 600; }
.lang-option:hover { text-decoration: none; border-color: var(--wp-gold); }
.lang-option.active { border-color: var(--wp-gold); background: color-mix(in srgb, var(--wp-gold) 10%, transparent); color: var(--wp-gold-dark); }
.lang-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.theme-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 599.98px) { .theme-grid { grid-template-columns: repeat(2, 1fr); } }
/* The user menu's row of themes (Claro, Escuro, Néon, Automático). */
.menu-themes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 6px 10px 8px; }
.menu-theme { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border: 1px solid transparent; border-radius: var(--wp-radius);
    background: none; color: inherit; font: inherit; font-size: .7rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.menu-theme:hover { background: var(--mud-palette-action-default-hover); }
.menu-theme.active { border-color: var(--wp-gold); color: var(--wp-gold-dark); background: color-mix(in srgb, var(--wp-gold) 10%, transparent); }
.theme-option { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; border-radius: var(--wp-radius); border: 1px solid var(--mud-palette-lines-default); background: none; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.theme-option:hover { border-color: var(--wp-gold); }
.theme-option.active { border-color: var(--wp-gold); background: color-mix(in srgb, var(--wp-gold) 10%, transparent); color: var(--wp-gold-dark); }
html.wp-dark :is(.menu-theme, .theme-option, .lang-option).active { color: var(--wp-gold-light); }
.profile-avatar { width: 72px !important; height: 72px !important; font-size: 1.6rem !important; }
.user-avatar { font-weight: 600; font-size: .85rem; }
/* Profile: accent colour swatches. */
.accent-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.accent-swatch { width: 36px; height: 36px; border-radius: 50%; border: 2px solid transparent; display: grid; place-items: center; cursor: pointer; padding: 0; box-shadow: 0 0 0 1px var(--mud-palette-lines-default); }
.accent-swatch.active { box-shadow: 0 0 0 2px var(--mud-palette-surface), 0 0 0 4px var(--mud-palette-text-primary); }
.accent-swatch.custom { background: conic-gradient(#e57373, #ffd54f, #81c784, #64b5f6, #ba68c8, #e57373); color: #fff; }
.accent-swatch .mud-icon-root { width: 18px; height: 18px; }
.accent-preview { display: flex; align-items: center; justify-content: center; gap: 12px; }
/* Steps to put the app on the home screen by hand. */
.install-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; counter-reset: step; }
.install-steps li { display: flex; align-items: center; gap: 12px; counter-increment: step; }
.install-step-icon { position: relative; flex: none; width: 40px; height: 40px; border-radius: var(--wp-radius); display: grid; place-items: center;
    background: color-mix(in srgb, var(--mud-palette-primary) 12%, transparent); color: var(--mud-palette-primary); }
.install-step-icon::after { content: counter(step); position: absolute; top: -6px; left: -6px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
    font-size: .68rem; font-weight: 700; background: var(--mud-palette-primary); color: var(--mud-palette-primary-text); }

/* The screen stays put and only the lists scroll, each on its own: a page is a column as tall as the screen, with its
   title (and its search, filters or tabs) on top and its list in a .fill-scroll under them. Card titles stick to the
   top of that list, and once it has scrolled a line marks its top edge (app.js sets "scrolled"). The list reaches a
   little past the page's edges so the cards' glow isn't cut off.
   A held title sits 1px above the list's top edge, hidden under it (--wp-stick -1px): the iPhone scrolls by fractions
   of a pixel and left a hairline of the rows passing beneath showing above the title (Bruno, 2026-10-30). */
html:has(.fill-page), html:has(.fill-page) body { overscroll-behavior: none; }
.app-container:has(.fill-page) { padding-bottom: 0; }
.fill-page { display: flex; flex-direction: column; height: calc(100dvh - var(--wp-main-top) - 20px); }
.fill-page > * { flex: none; }
.fill-page > .fill-scroll { flex: 1 1 auto; min-height: 0; margin-inline: -8px; padding-inline: 8px; }
.fill-scroll { overflow-y: auto; overscroll-behavior: contain; padding-bottom: 24px; --wp-stick: -1px;
    border-top: 1px solid transparent; transition: border-color .15s; }
.fill-scroll.scrolled { border-top-color: var(--mud-palette-lines-default); }
/* While a list has more rows above or below than are in sight (app.js sets more-up / more-down), a small round arrow
   sits at that edge, in the middle. It stays put while the rows scroll under it, takes no room and lets taps through. */
:root { --wp-more-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%23857D74' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
html.wp-dark { --wp-more-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%23B9B1A7' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
html.wp-neon { --wp-more-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%239DB4FF' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
:is(.fill-scroll, .suggest-rows)::before, :is(.fill-scroll, .suggest-rows)::after {
    content: ''; position: sticky; z-index: 4; display: block; flex: none; width: 22px; height: 22px; box-sizing: border-box;
    border-radius: 50%; pointer-events: none; opacity: 0; transition: opacity .2s;
    background: var(--wp-more-arrow) center / 18px no-repeat, color-mix(in srgb, var(--mud-palette-surface) 90%, transparent);
    border: 1px solid var(--mud-palette-lines-default); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
:is(.fill-scroll, .suggest-rows)::before { top: 6px; margin: 0 auto -22px; transform: scaleY(-1); }
:is(.fill-scroll, .suggest-rows)::after { bottom: 6px; margin: -22px auto 0; }
:is(.fill-scroll, .suggest-rows).more-up::before, :is(.fill-scroll, .suggest-rows).more-down::after { opacity: .9; }
/* A form on a MudGrid: the scroller gives the grid room for its negative margins, so nothing scrolls sideways. */
.fill-page > .fill-scroll.form-scroll { margin-inline: -12px; padding-inline: 12px; }
.fill-scroll.form-scroll > .mud-grid { margin-inline: -12px; }
@media (max-width: 959.98px) {
    .fill-page { height: calc(100dvh - var(--wp-main-top) - 20px - var(--wp-bottom-nav) - var(--wp-nav-safe)); }
}
/* Compras on a phone or tablet (Bruno, 2026-11-05: "No telemóvel a lista de compras não deve ter margens"): the list
   runs edge to edge and down to the bottom bar, with no rounded corners or side borders, even when it is short. */
/* The list's card is itself the scroller: its edges never move, only its rows, and they don't bounce at either end. */
.fill-page > .card.list-frame.fill-scroll { margin: 0; padding: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: none; }
@media (min-width: 960px) { .fill-page > .card.list-frame.fill-scroll { margin-bottom: 16px; } }
@media (max-width: 959.98px) {
    .compras-page > .fill-scroll { margin-inline: -24px; padding-inline: 0; padding-bottom: 0; }
    .compras-page > .fill-scroll:not(.card) { display: flex; flex-direction: column; }
    .compras-page > .fill-scroll:not(.card) > .card { flex: 1 0 auto; }
    .compras-page > .fill-scroll > .card, .compras-page > .card.list-frame { margin: 0; border-radius: 0 !important; border-inline: 0; border-bottom: 0; }
    .fill-page.compras-page > .card.list-frame.fill-scroll { margin-inline: -24px; }
}
@media (max-width: 599.98px) {
    .compras-page > .fill-scroll, .fill-page.compras-page > .card.list-frame.fill-scroll { margin-inline: -16px; }
}
/* The keyboard is up: the page ends where the keyboard starts (iOS doesn't shrink 100dvh for it, only the part on
   screen, --wp-vvh), so what sits at its foot, like the box to write in Mensagens, comes up above the keyboard
   (Bruno, 2026-10-28). */
html.kb-open .fill-page { height: calc(var(--wp-vvh, 100dvh) - var(--wp-main-top) - 20px); }

#blazor-error-ui {
    background: #fff4e5; color: #663c00; bottom: 0; box-shadow: 0 -1px 4px rgba(0, 0, 0, .15); display: none; left: 0;
    padding: .7rem 1.25rem; position: fixed; width: 100%; z-index: 3000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }

/* ==========================================================================
   Sign-in / registration (static pages, no MudBlazor interactivity)
   ========================================================================== */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--wp-cream); }
.auth-hero {
    background: radial-gradient(120% 120% at 10% 10%, #2e2a26 0%, var(--wp-ink) 55%, #0f0e0d 100%);
    color: #F3EEE6; display: flex; align-items: flex-end; padding: 56px; position: relative; overflow: hidden;
}
.auth-hero::before, .auth-hero::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--wp-gold) 35%, transparent); }
.auth-hero::before { width: 520px; height: 520px; right: -180px; top: -160px; }
.auth-hero::after { width: 300px; height: 300px; right: -40px; top: -20px; }
.auth-hero-inner { position: relative; max-width: 460px; }
.brand-mark.auth-hero-logo { margin-bottom: 32px; gap: 14px; }
.auth-hero-logo .brand-icon { width: 56px; height: 56px; }
.auth-hero-logo .brand-icon .mud-icon-root { width: 30px; height: 30px; }
.auth-hero-logo .brand-text { padding-left: 14px; }
.auth-hero-logo .brand-name { font-size: 1rem; }
.auth-hero-logo .brand-sub { font-size: .7rem; }
.auth-hero h2 { font-family: "Titillium Web", sans-serif; font-weight: 600; font-size: 2.4rem; line-height: 1.2; margin: 0 0 12px; }
.auth-hero p { opacity: .75; line-height: 1.6; margin: 0; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 400px; }
.brand-mark.auth-logo { display: none; margin-bottom: 28px; color: var(--wp-ink); }
.auth-title { font-family: "Titillium Web", sans-serif; font-weight: 600; font-size: 2rem; margin: 0 0 6px; color: var(--wp-ink); }
.auth-sub { color: var(--wp-muted); margin: 0 0 24px; }
.auth-label { display: block; font-size: .82rem; font-weight: 600; color: var(--wp-ink); margin-bottom: 14px; }
.auth-input {
    display: block; width: 100%; box-sizing: border-box; margin-top: 6px; padding: 12px 14px; font: inherit; font-size: 1rem;
    border: 1px solid #DDD6CC; border-radius: var(--wp-radius); background: #fff; color: var(--wp-ink); outline: none; transition: border-color .15s, box-shadow .15s;
}
.auth-input:focus { border-color: var(--wp-gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--wp-gold) 18%, transparent); }
.auth-hint { display: block; font-weight: 400; color: var(--wp-muted); font-size: .76rem; margin-top: 4px; }
.auth-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 20px; font-size: .86rem; }
.auth-check { display: flex; gap: 6px; align-items: center; color: var(--wp-ink); }
.auth-check input { accent-color: var(--wp-gold); width: 16px; height: 16px; }
.auth-btn {
    width: 100%; padding: 13px; border: none; border-radius: var(--wp-radius); background: var(--wp-ink); color: #fff; font: inherit; font-weight: 600;
    font-size: 1rem; cursor: pointer; transition: background .15s, transform .05s;
}
.auth-btn:hover { background: #33302c; }
.auth-btn:active { transform: translateY(1px); }
.auth-foot { text-align: center; margin-top: 22px; color: var(--wp-muted); font-size: .9rem; }
.auth-error { background: #fbeceb; color: #9b3b32; border: 1px solid #f1c9c4; padding: 10px 14px; border-radius: var(--wp-radius); margin-bottom: 14px; font-size: .9rem; }
.auth-ok { background: #ecf5ef; color: #2f6b45; border: 1px solid #c9e3d1; padding: 10px 14px; border-radius: var(--wp-radius); margin-bottom: 14px; font-size: .9rem; }
/* Profile > Linked accounts */
.linked-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--mud-palette-lines-default); }
.linked-row:first-of-type { border-top: none; padding-top: 0; }
.linked-row .provider-logo { width: 22px; height: 22px; }
.linked-row .provider-logo.apple { color: var(--mud-palette-text-primary); }
/* "Continue with Google / Apple / Microsoft": white outlined buttons with each provider's own mark, as their guidelines allow. */
.auth-ext { display: grid; gap: 10px; }
.auth-ext-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 11px 14px; font: inherit; font-weight: 600;
    font-size: .95rem; color: #1f1f1f; background: #fff; border: 1px solid #DDD6CC; border-radius: var(--wp-radius); cursor: pointer;
    transition: background .15s, border-color .15s, transform .05s;
}
.auth-ext-btn:hover { background: #faf8f5; border-color: #c9c0b3; }
.auth-ext-btn:active { transform: translateY(1px); }
.provider-logo { width: 18px; height: 18px; flex: 0 0 auto; }
.provider-logo.apple { color: #000; height: 20px; margin-top: -2px; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--wp-muted); font-size: .82rem; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; border-top: 1px solid #E4DDD3; }
/* Install offer on the sign-in pages (InstallHint), shown by app.js on a phone or tablet without the app. */
.auth-install { border: 1px solid color-mix(in srgb, var(--wp-gold) 45%, #DDD6CC); background: color-mix(in srgb, var(--wp-gold) 7%, #fff);
    border-radius: var(--wp-radius); padding: 14px; margin-bottom: 22px; font-size: .9rem; color: var(--wp-ink); }
.auth-install[hidden], .auth-install [hidden] { display: none; }
.auth-install-text { display: flex; gap: 10px; align-items: flex-start; line-height: 1.45; }
.auth-install-text .mud-icon-root { flex: none; color: var(--wp-gold-dark); margin-top: 1px; }
.auth-install .install-steps { margin-top: 14px; }
.auth-install .install-step-icon { background: color-mix(in srgb, var(--wp-gold) 14%, transparent); color: var(--wp-gold-dark); }
.auth-install .install-step-icon::after { background: var(--wp-gold); color: #fff; }
.auth-install-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.auth-install-actions button { font: inherit; font-weight: 600; font-size: .86rem; border-radius: var(--wp-radius); padding: 8px 14px; cursor: pointer; border: none; }
.auth-install-later { background: transparent; color: var(--wp-muted); }
.auth-install-go { background: var(--wp-ink); color: #fff; }
.auth-langs { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 14px; margin-top: 32px; font-size: .8rem; }
.auth-langs a { display: inline-flex; align-items: center; gap: 6px; color: var(--wp-muted); }
.auth-langs a.active { color: var(--wp-gold-dark); font-weight: 600; }
@media (max-width: 899.98px) {
    .auth-page { grid-template-columns: 1fr; }
    .auth-hero { display: none; }
    .brand-mark.auth-logo { display: inline-flex; }
    .auth-panel { align-items: flex-start; padding-top: calc(48px + var(--wp-safe-top)); }
}

/* ==========================================================================
   Néon theme (from WEDPLANNER): a deep navy page with a faint grid, translucent cards with a thin luminous outline
   and a soft glow, section titles followed by a rule, and numbers that shine. Corners are rounder than in the light
   theme. The colours are MudBlazor's neon dark palette (AppTheme.cs) plus the tokens below.
   ========================================================================== */
html.wp-neon {
    --wp-radius: 14px; --mud-default-borderradius: 14px;
    --nx-line: rgba(125, 170, 255, .40);
    --nx-line-soft: rgba(125, 170, 255, .20);
    --nx-glow: rgba(70, 130, 255, .28);
    --nx-fill: linear-gradient(160deg, rgba(48, 88, 200, .32), rgba(10, 20, 66, .66));
    --nx-fill-in: rgba(16, 32, 96, .42);
    --nx-well: rgba(5, 11, 38, .55);
    --nx-bar: rgba(7, 14, 44, .80);
    --nx-stick: rgb(14, 28, 82); /* solid: rows passing under a held title don't show through it (Bruno, 2026-11-04) */
    --nx-glass: rgba(7, 14, 44, .94);
    --nx-text-glow: 0 0 14px rgba(140, 185, 255, .50);
    --nx-ok: #4FE3B0; --nx-warn: #FFC857; --nx-bad: #FF5C7A;
}
/* The page: navy, lighter towards the top, under a faint grid. A fixed layer, so it stays put while lists scroll. */
html.wp-neon body::before {
    content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background:
        linear-gradient(rgba(110, 150, 255, .055) 1px, transparent 1px) 0 0 / 36px 36px,
        linear-gradient(90deg, rgba(110, 150, 255, .055) 1px, transparent 1px) 0 0 / 36px 36px,
        radial-gradient(120% 70% at 50% 0%, #16337F 0%, #0B1A4C 42%, #050A22 100%);
}
/* The body stays see-through so this layer shows. */
html.wp-neon body, html.wp-neon .mud-main-content, html.wp-neon .mud-layout { background: transparent; }

/* The title at the top: see-through over the grid until something scrolls under it, then dark glass like the bars. */
html.wp-neon .page-top { background: transparent; }
html.wp-neon.scrolled .page-top { background: var(--nx-glass); -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3);
    border-bottom-color: var(--nx-line-soft); box-shadow: 0 1px 16px rgba(70, 130, 255, .14); }
/* Bars: dark glass with a glowing edge. */
html.wp-neon :is(.app-bar, .bottom-nav, .mud-drawer.app-drawer) {
    background: var(--nx-bar) !important; -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3);
}
html.wp-neon .app-bar { border-bottom: 1px solid var(--nx-line-soft); box-shadow: 0 1px 16px rgba(70, 130, 255, .18); }
html.wp-neon .bottom-nav { border-top: 1px solid var(--nx-line-soft); box-shadow: 0 -1px 16px rgba(70, 130, 255, .18); }
html.wp-neon .mud-drawer.app-drawer { border-right: 1px solid var(--nx-line-soft); }
html.wp-neon :is(.bottom-nav a.active, .app-nav .mud-nav-link.active) { text-shadow: 0 0 10px color-mix(in srgb, var(--mud-palette-success) 60%, transparent); }
html.wp-neon :is(.bottom-nav a.active, .app-nav .mud-nav-link.active) .mud-icon-root { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--mud-palette-success) 80%, transparent)); }
html.wp-neon .bottom-nav a.active .mud-icon-root { box-shadow: 0 0 12px color-mix(in srgb, var(--mud-palette-success) 30%, transparent); }
html.wp-neon .brand-icon { box-shadow: 0 0 14px color-mix(in srgb, var(--wp-gold) 55%, transparent); }

/* Cards: translucent navy with a thin luminous outline, a soft outer glow and a faint inner one. */
html.wp-neon .card {
    background: var(--nx-fill); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    border: 1px solid var(--nx-line) !important;
    box-shadow: 0 0 18px var(--nx-glow), inset 0 0 18px rgba(90, 140, 255, .08), inset 0 1px 0 rgba(255, 255, 255, .06);
}
html.wp-neon .suggest-card { border-color: color-mix(in srgb, var(--nx-warn) 55%, transparent) !important; box-shadow: 0 0 18px rgba(255, 200, 87, .18), inset 0 0 18px rgba(255, 200, 87, .06); }
/* The bright mint needs a dark + to stay legible. */
html.wp-neon .suggest-add { color: #04122E; box-shadow: 0 0 12px color-mix(in srgb, var(--mud-palette-success) 55%, transparent); }
html.wp-neon .section-bar { border-color: var(--nx-line-soft); }
html.wp-neon .section-bar { background: rgba(90, 140, 255, .08); color: color-mix(in srgb, var(--mud-palette-primary) 45%, white); text-shadow: var(--nx-text-glow); }
/* Titles that stay: deep navy inside cards; over the page (tabs, days) see-through until held, then dark glass. */
html.wp-neon .stick { background: var(--nx-stick); }
html.wp-neon .section-bar.stick { background: linear-gradient(rgba(90, 140, 255, .08), rgba(90, 140, 255, .08)) var(--nx-stick); }
html.wp-neon .stick.stuck { box-shadow: 0 1px 0 var(--nx-line-soft), 0 6px 14px rgba(3, 8, 30, .45); }
html.wp-neon .day-head.stick { background: transparent; }
html.wp-neon .day-head.stick.stuck { background: var(--nx-glass) !important; -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3); }
html.wp-neon .tag { color: color-mix(in srgb, var(--mud-palette-primary) 55%, white); background: color-mix(in srgb, var(--mud-palette-primary) 12%, transparent); }
/* Wells: value boxes and settings sit in dark wells with a soft outline. */
html.wp-neon :is(.mini-stat:not(.card), .invite-box, .suggest-setting, .icon-pick:not(.active), .theme-option:not(.active)) { background: var(--nx-well); border-color: var(--nx-line-soft); }
html.wp-neon .item-check:not(.cart) { border-color: var(--nx-line); }
html.wp-neon .item-check.cart { color: #04122E; box-shadow: 0 0 12px color-mix(in srgb, var(--mud-palette-success) 55%, transparent); }
html.wp-neon .item-check:active { box-shadow: 0 0 12px color-mix(in srgb, var(--mud-palette-success) 55%, transparent); }
html.wp-neon .item-put:not(.on) { color: #04122E; box-shadow: 0 0 12px color-mix(in srgb, var(--mud-palette-success) 55%, transparent); }
html.wp-neon .score { box-shadow: 0 0 14px color-mix(in srgb, var(--score) 35%, transparent); text-shadow: 0 0 8px color-mix(in srgb, var(--score) 50%, transparent); }

/* Buttons: filled ones glow in the accent; outlined ones get a luminous edge; round ones a faint ring. */
html.wp-neon .mud-button-filled.mud-button-filled-primary {
    background: color-mix(in srgb, var(--mud-palette-primary) 26%, rgba(10, 20, 66, .6)) !important; color: color-mix(in srgb, var(--mud-palette-primary) 35%, white) !important;
    border: 1px solid color-mix(in srgb, var(--mud-palette-primary) 80%, transparent);
    box-shadow: 0 0 16px color-mix(in srgb, var(--mud-palette-primary) 40%, transparent), inset 0 0 12px color-mix(in srgb, var(--mud-palette-primary) 18%, transparent);
}
html.wp-neon .mud-button-filled.mud-button-filled-primary:hover { background: color-mix(in srgb, var(--mud-palette-primary) 38%, rgba(10, 20, 66, .6)) !important; }
html.wp-neon .mud-button-outlined { box-shadow: 0 0 10px rgba(70, 130, 255, .16); }
html.wp-neon .mud-icon-button:not(.mud-button-filled):not(.mud-switch-base):not(.mud-input-adornment *):not(.mud-input-clear-button):not(.mud-chip *) {
    box-shadow: inset 0 0 0 1px var(--nx-line-soft), 0 0 10px rgba(70, 130, 255, .16);
}

/* Fields: dark wells with a luminous outline that brightens on focus. */
html.wp-neon .mud-input-outlined { background: var(--nx-well); border-radius: var(--wp-radius); }
html.wp-neon .mud-input-outlined .mud-input-outlined-border { border-color: var(--nx-line-soft); }
html.wp-neon .mud-input-outlined:hover .mud-input-outlined-border { border-color: var(--nx-line); }
html.wp-neon .mud-input-outlined:focus-within .mud-input-outlined-border { box-shadow: 0 0 12px color-mix(in srgb, var(--mud-palette-primary) 40%, transparent); }

/* Tabs: a glowing bar, the active tab and its indicator shine. */
html.wp-neon .history-tabs .mud-tabs-tabbar { background: rgba(90, 140, 255, .06) !important; border-bottom: 1px solid var(--nx-line-soft); }
html.wp-neon .history-tabs .mud-tabs-tabbar-wrapper > .mud-tooltip-root + .mud-tooltip-root { border-left-color: var(--nx-line-soft); }
html.wp-neon .mud-tab.mud-tab-active { text-shadow: var(--nx-text-glow); }
html.wp-neon .history-tabs .mud-tab.mud-tab-active .mud-icon-root { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--mud-palette-success) 70%, transparent)); }
html.wp-neon .history-tabs .mud-tab-slider { box-shadow: 0 0 10px var(--mud-palette-success); }

/* Section titles: glowing, upper case, followed by a thin rule. */
html.wp-neon :is(.card-head > .mud-typography-h6, .card > .mud-typography-h6:first-child, .section-label, .month-header:not(.day-head)) {
    display: flex; align-items: center; gap: 12px; flex: 1 1 auto; min-width: 0;
    color: color-mix(in srgb, var(--mud-palette-primary) 45%, white); text-shadow: var(--nx-text-glow); letter-spacing: .08em;
}
html.wp-neon :is(.card-head > .mud-typography-h6, .card > .mud-typography-h6:first-child, .section-label, .month-header:not(.day-head))::after {
    content: ""; flex: 1 1 0; min-width: 0; height: 1px; background: linear-gradient(90deg, var(--nx-line), transparent);
}
html.wp-neon .day-head { color: color-mix(in srgb, var(--mud-palette-primary) 45%, white); text-shadow: var(--nx-text-glow); }

/* Numbers and names that shine. */
html.wp-neon :is(.page-title, .mini-stat b, .invite-code, .day-total) { text-shadow: var(--nx-text-glow); }

/* ==========================================================================
   Reconnecting
   ========================================================================== */
/* Reconnecting quietly (ReconnectModal.razor.js): the page stays as it was, with a thin moving bar under the status bar. */
html.wp-reconnecting body::after { content: ""; position: fixed; z-index: 3000; left: 0; right: 0; top: var(--wp-safe-top, 0px); height: 3px; pointer-events: none;
    background: linear-gradient(90deg, transparent, var(--mud-palette-primary), transparent) 0 0 / 40% 100% no-repeat; animation: wp-reconnect-bar 1.1s ease-in-out infinite; }
@keyframes wp-reconnect-bar { from { background-position: -40% 0; } to { background-position: 140% 0; } }
@keyframes wp-reconnect-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes wp-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes wp-spin { to { transform: rotate(360deg); } }
/* Reconnect dialog (ReconnectModal.razor), shown while the live connection is down, usually during an update: the app's
   look, centred, with the page behind it in black and white. ReconnectModal.razor.js toggles the state classes. */
.components-reconnect-first-attempt-visible, .components-reconnect-repeated-attempt-visible, .components-reconnect-failed-visible,
.components-pause-visible, .components-resume-failed-visible, .components-rejoining-animation { display: none; }
#components-reconnect-modal.components-reconnect-show .components-reconnect-first-attempt-visible,
#components-reconnect-modal.components-reconnect-show .components-rejoining-animation,
#components-reconnect-modal.components-reconnect-paused .components-pause-visible,
#components-reconnect-modal.components-reconnect-resume-failed .components-resume-failed-visible,
#components-reconnect-modal.components-reconnect-retrying .components-reconnect-repeated-attempt-visible,
#components-reconnect-modal.components-reconnect-retrying .components-rejoining-animation,
#components-reconnect-modal.components-reconnect-failed .components-reconnect-failed-visible { display: block; }
/* A retry hides the first-attempt text, so only one message shows at a time. */
#components-reconnect-modal.components-reconnect-retrying .components-reconnect-first-attempt-visible,
#components-reconnect-modal.components-reconnect-failed .components-reconnect-first-attempt-visible,
#components-reconnect-modal.components-reconnect-failed .components-rejoining-animation { display: none; }
#components-reconnect-modal {
    position: fixed; inset: 0; margin: auto; height: fit-content; max-height: calc(100dvh - 32px);
    width: min(22rem, calc(100vw - 32px)); box-sizing: border-box; padding: 28px 24px 24px;
    background: var(--mud-palette-surface, #fff); color: var(--mud-palette-text-primary, #222);
    border: 1px solid color-mix(in srgb, var(--mud-palette-primary) 45%, transparent); border-radius: var(--wp-radius);
    box-shadow: 0 18px 48px rgba(0, 0, 0, .28); font-family: "Titillium Web", system-ui, sans-serif;
}
#components-reconnect-modal:focus, #components-reconnect-modal:focus-visible { outline: none; }
#components-reconnect-modal[open] { animation: wp-reconnect-in .4s cubic-bezier(.05, .89, .25, 1.02) .3s both; }
#components-reconnect-modal::backdrop { background: rgba(0, 0, 0, .18); -webkit-backdrop-filter: grayscale(1); backdrop-filter: grayscale(1); animation: wp-fade-in .5s ease-in-out; }
.components-reconnect-container { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.components-reconnect-container .reconnect-logo { color: var(--mud-palette-text-primary, #222); }
#components-reconnect-modal p { margin: 0; text-align: center; line-height: 1.45; }
#components-reconnect-modal p span { font-size: .875rem; color: var(--mud-palette-text-secondary, #666); }
#components-reconnect-modal button {
    min-height: 40px; padding: 0 22px; border: 0; border-radius: var(--wp-radius); cursor: pointer;
    background: var(--mud-palette-primary); color: var(--mud-palette-primary-text, #fff); font: inherit; font-weight: 600;
}
#components-reconnect-modal button:hover { filter: brightness(.92); }
.components-rejoining-animation {
    width: 40px; height: 40px; box-sizing: border-box; border-radius: 50%;
    border: 3px solid color-mix(in srgb, var(--mud-palette-primary) 20%, transparent); border-top-color: var(--mud-palette-primary);
    animation: wp-spin .9s linear infinite;
}

/* Contas correntes: the period (month/year and arrows), the totals, and the lines with the green circle that pays. */
.finance-period { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.finance-nav { display: flex; align-items: center; gap: 2px; }
.finance-when { border: 0; background: none; color: inherit; font: inherit; font-weight: 700; font-size: 1rem; min-width: 128px; text-align: center; cursor: pointer; padding: 4px 6px; border-radius: var(--wp-radius); }
.finance-when:hover { background: var(--mud-palette-action-default-hover); }
.finance-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* The saldo contabilístico beside the saldo autorizado (Bruno, 2026-11-01 19:47): five cards, and on a phone the last
   of them takes the whole row. */
.finance-stats:has(> .book-stat) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 599.98px) {
    .fill-page > .stats-row.finance-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .fill-page > .stats-row.finance-stats > .mini-stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.mini-stat small { font-size: .72rem; color: var(--mud-palette-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Contas correntes: on a narrow phone a card note takes a second line rather than losing its end. */
.finance-stats .mini-stat small { white-space: normal; }
/* Contas correntes cards (Bruno, 2026-11-01): the title on top, the real value under it and bigger, then the estimate in
   the value's colour, smaller and lighter. The value shrinks with the card (cqi) so a long amount stays on one line. */
.finance-stats .mini-stat { --stat: var(--mud-palette-text-primary); container-type: inline-size; gap: 3px; }
.finance-stats .mini-stat.pos { --stat: var(--mud-palette-success); }
.finance-stats .mini-stat.neg { --stat: var(--mud-palette-error); }
.finance-stats .mini-stat.due, .finance-stats .mini-stat.zero { --stat: var(--mud-palette-warning); }
.stats-row.finance-stats .mini-stat b { font-size: min(1.85rem, 14cqi); line-height: 1.15; color: var(--stat); overflow-wrap: normal; white-space: nowrap; }
.finance-stats .mini-stat small { font-size: .75rem; font-weight: 600; color: color-mix(in srgb, var(--stat) 60%, transparent); }
/* A note coloured by its own sign (Saldo final, Bruno 2026-11-01): green above zero, red below, yellow at zero. */
.finance-stats .mini-stat small.pos { --stat: var(--mud-palette-success); }
.finance-stats .mini-stat small.neg { --stat: var(--mud-palette-error); }
.finance-stats .mini-stat small.zero { --stat: var(--mud-palette-warning); }
/* An amount that can be below zero (a bank saldo, Bruno 2026-11-01 16:18): a round +/− button before the field, as a
   phone's number pad has no minus; red while the amount is negative. */
.money-signed { display: flex; align-items: center; gap: 8px; }
.money-signed > .mud-input-control { flex: 1; min-width: 0; }
.money-sign { flex: none; width: 40px; height: 40px; margin-top: 6px; border-radius: 50%; border: 1px solid var(--mud-palette-lines-inputs);
    background: transparent; color: var(--mud-palette-success); font: inherit; font-size: 1.35rem; font-weight: 700; line-height: 1; cursor: pointer; }
.money-sign.neg { color: var(--mud-palette-error); border-color: color-mix(in srgb, var(--mud-palette-error) 60%, transparent);
    background: color-mix(in srgb, var(--mud-palette-error) 12%, transparent); }
.money-sign:focus-visible { outline: 2px solid var(--mud-palette-primary); outline-offset: 2px; }
/* "Acertar" (Bruno, 2026-11-01): the two saldos one under the other, the contabilístico on top (19:09); then the app's
   Saldo and the correction the bank's saldo makes. */
.adjust-fields { display: flex; flex-direction: column; gap: 12px; }
.adjust-sums { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin-top: 12px; font-size: .9rem; }
.adjust-sums span { color: var(--mud-palette-text-secondary); }
.adjust-sums b { text-align: right; font-variant-numeric: tabular-nums; }
.adjust-sums b.pos { color: var(--mud-palette-success); }
.adjust-sums b.neg { color: var(--mud-palette-error); }
/* The linked bank account (Bruno, 2026-11-01 20:03): a row on top of "Acertar" that opens its window, and the window. */
button.bank-row { display: flex; align-items: center; gap: 10px; width: 100%; margin-bottom: 12px; padding: 10px 12px; border: 1px solid var(--mud-palette-lines-default);
    border-radius: 12px; background: transparent; font: inherit; color: inherit; text-align: left; cursor: pointer; }
button.bank-row:hover { background: color-mix(in srgb, var(--mud-palette-text-primary) 6%, transparent); }
.bank-row-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.bank-row-text small { color: var(--mud-palette-text-secondary); }
/* Paying a bill, the bank's movements to pay it with (Bruno, 2026-11-04): day, what the bank says, amount; the likely
   ones first with the accent at their edge, the one picked ticked in green. Scrolls inside the window. */
.pay-moves { margin-top: 14px; }
.pay-moves-head { font-weight: 600; font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; color: var(--mud-palette-text-secondary); margin-bottom: 6px; }
.pay-moves-list { max-height: 232px; overflow-y: auto; border: 1px solid var(--mud-palette-lines-default); border-radius: 10px; }
html.wp-dark .pay-moves-list { border-color: color-mix(in srgb, var(--mud-palette-text-primary) 22%, transparent); }
.pay-move { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 6px 10px;
    margin: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; box-shadow: inset 3px 0 0 transparent; }
.pay-move + .pay-move { border-top: .5px solid var(--wp-row-line); }
.pay-move:hover { background: var(--mud-palette-action-default-hover); }
.pay-move.likely { box-shadow: inset 3px 0 0 var(--mud-palette-primary); }
.pay-move.on { background: color-mix(in srgb, var(--mud-palette-success) 14%, transparent); }
.pay-move-day { font-size: .8rem; font-weight: 600; color: var(--mud-palette-text-secondary); white-space: nowrap; min-width: 44px; }
.pay-move-text { font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pay-move-amount { font-size: .9rem; white-space: nowrap; }
.pay-move-tick { color: var(--mud-palette-text-disabled); }
.pay-move.on .pay-move-tick { color: var(--mud-palette-success); }
.pay-move:focus-visible { outline: 2px solid var(--mud-palette-primary); outline-offset: -2px; }
.pay-move:disabled { cursor: progress; }
/* The bill's own window lists the bank's statement (Bruno, 2026-11-10): a tap ties a movement to the bill; the month it paid
   shows under its text, in green. */
.entry-moves { margin-top: 18px; }
.entry-moves .pay-moves-list { max-height: 300px; }
.entry-moves .pay-move-text { white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; line-height: 1.3; }
.pay-move-month { display: block; font-size: .72rem; font-weight: 600; color: var(--mud-palette-success); overflow: hidden; text-overflow: ellipsis; }
.entry-moves-empty { padding: 14px 12px; font-size: .85rem; text-align: center; }
.bank-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.bank-head > div { display: flex; flex-direction: column; }
.bank-head span { color: var(--mud-palette-text-secondary); font-size: .9rem; }
.bank-facts { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; font-size: .9rem; color: var(--mud-palette-text-secondary); }
.bank-pick { display: flex; flex-direction: column; gap: 12px; }
/* The overdraft typed by hand, for a bank that sends no saldo autorizado (2026-11-01 22:36): the field and its Guardar. */
.bank-limit { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.bank-limit > .mud-input-control { flex: 1 1 auto; min-width: 0; }
.bank-limit > .mud-button-root { flex: none; }
.bank-shops { margin-top: 18px; }
.bank-shop-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.bank-shop-chips .mud-chip { margin: 0; }
/* Saúde financeira (Bruno, 2026-11-01 14:58): its face in a round tint on the right, beside the share and the amount,
   in the card's colour, like the round icons of the Dashboard cards. */
.finance-stats .health-stat { position: relative; }
.finance-stats .health-stat .health-face { position: absolute; right: 12px; bottom: 12px; width: 40px; height: 40px; padding: 8px;
    box-sizing: border-box; border-radius: 50%; background: color-mix(in srgb, var(--stat) 16%, transparent); color: var(--stat); }
@media (max-width: 599.98px) {
    .fill-page > .stats-row .health-stat .health-face { right: 8px; bottom: 8px; width: 32px; height: 32px; padding: 6px; }
}
.mini-stat.pos b { color: var(--mud-palette-success); }
.mini-stat.neg b { color: var(--mud-palette-error); }
.finance-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-inline: 0; padding: 6px 4px; }
/* Contas correntes: each list's title is inside its card, as the shopping list's categories (Bruno, 2026-11-02 10:12),
   so the cards sit apart by a gap of their own. */
.finance-section { margin-top: 14px; }
.finance-row { gap: 10px; padding: 8px 12px; min-height: 60px; box-sizing: border-box; }
.finance-row .list-row-main { cursor: pointer; }
.finance-row.late .list-row-sub { color: var(--mud-palette-error); }
.finance-row.done .list-row-title { color: var(--mud-palette-text-secondary); }
.finance-amount { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.amount { white-space: nowrap; font-variant-numeric: tabular-nums; }
.amount.pos { color: var(--mud-palette-success); }
.amount.neg { color: var(--mud-palette-error); }
.item-check.finance-done { border: 0; background: color-mix(in srgb, var(--mud-palette-success) 18%, transparent); color: var(--mud-palette-success); }
.item-check.finance-done .mud-icon-root { opacity: 1; }
.finance-icon { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
    background: color-mix(in srgb, var(--mud-palette-text-secondary) 14%, transparent); color: var(--mud-palette-text-secondary); }
.finance-icon.in { background: color-mix(in srgb, var(--mud-palette-success) 16%, transparent); color: var(--mud-palette-success); }
/* A bill the bank pays by itself (Bruno, 2026-11-02 10:32): the bank in blue, in place of the green button; not a button,
   so a tap does nothing. */
:is(.finance-icon, .suggest-add).debit, .year-detail-row.debit .finance-icon {
    background: color-mix(in srgb, var(--mud-palette-info) 18%, transparent); color: var(--mud-palette-info); box-shadow: none; cursor: default; }
html.wp-neon :is(.finance-icon, .suggest-add).debit, html.wp-neon .year-detail-row.debit .finance-icon { color: var(--mud-palette-info); box-shadow: none; }
span.dash-bill-pay.debit .mud-icon-root { width: 22px; height: 22px; }
.finance-year-head { font-size: .72rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--mud-palette-text-secondary); padding-block: 8px; }
.finance-year-head > span, .finance-year-row > .amount { flex: none; width: 92px; text-align: right; }
button.list-row.finance-year-row { width: 100%; border: 0; border-bottom: .5px solid var(--wp-row-line); background: none; font: inherit; text-align: left; cursor: pointer; }
.finance-year-row.current .list-row-title { color: var(--mud-palette-primary); }
.finance-year-row.total { font-weight: 700; background: color-mix(in srgb, var(--mud-palette-primary) 6%, transparent); }
.list-row-sub.warn { color: var(--mud-palette-warning); }
@media (max-width: 599.98px) {
    .finance-year-head > span, .finance-year-row > .amount { width: auto; min-width: 64px; font-size: .8rem; }
    .finance-year-head, .finance-year-row { gap: 6px; padding-inline: 10px; }
}
/* Mês / Ano: big enough to hit with a thumb, in upper case (Bruno, 2026-10-28). */
.finance-view .mud-toggle-item { min-width: 84px; padding: 10px 22px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; font-size: .9rem; }
@media (max-width: 599.98px) {
    .finance-view .mud-toggle-item { min-width: 64px; padding: 10px 14px; }
    .finance-when { min-width: 0; padding-inline: 2px; }
    .finance-period { flex-wrap: nowrap; }
}

/* The top bar's bell (as in WEDPLANNER): latest notices in a popover, all of them on /notifications. */
.bell-popover { width: 360px; max-width: calc(100vw - 24px); }
.bell-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px 8px 16px; }
.bell-empty { padding: 24px 16px; text-align: center; color: var(--mud-palette-text-secondary); }
.bell-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px 10px 16px; cursor: pointer; border-top: 1px solid var(--mud-palette-lines-default); }
.bell-item.unread, .notif-row.unread { background: color-mix(in srgb, var(--mud-palette-primary) 8%, transparent); }
.bell-kind { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; margin-top: 2px;
    color: var(--mud-palette-primary); background: color-mix(in srgb, var(--mud-palette-primary) 12%, transparent); }
.bell-kind.big { width: 40px; height: 40px; margin-top: 0; }
.bell-text { flex: 1 1 auto; min-width: 0; }
.bell-title, .notif-title { font-weight: 600; font-size: .9rem; }
.bell-body { font-size: .82rem; color: var(--mud-palette-text-secondary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bell-time { font-size: .72rem; color: var(--mud-palette-text-secondary); margin-top: 2px; }
.bell-item.unread .bell-title, .notif-row.unread .notif-title { font-weight: 700; }
.notif-panel { overflow: hidden; }
.notif-panel > .notif-row:last-child { border-bottom: 0; }
.notif-row { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-bottom: 1px solid var(--mud-palette-lines-default); cursor: pointer; }
.notif-read-slot { align-self: center; flex: none; }
.notif-read { color: var(--mud-palette-text-secondary) !important; }
.notif-read.unread { color: var(--mud-palette-error) !important; background: color-mix(in srgb, var(--mud-palette-error) 14%, transparent) !important; }
/* Header choices shown as buttons from tablet width up, folded into a "⋮" menu on phones. */
@media (max-width: 599.98px) { .wide-only { display: none !important; } }
@media (min-width: 600px) { .phone-only { display: none !important; } }

/* ==========================================================================
   Chat (ported from WEDPLANNER): the conversations and the open one side by side, or one at a time on phones. Only
   the conversations and the messages scroll; the title, the conversation's header and the box to write stay put.
   ========================================================================== */
/* Unread messages in a conversation's row: round, like the other counters. */
.unread-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; display: inline-grid; place-items: center; flex: none;
    font-size: .68rem; font-weight: 700; line-height: 1; background: var(--mud-palette-error); color: #fff; box-shadow: 0 0 0 1.5px var(--mud-palette-surface); }

.chat-page .page-top { margin-bottom: 4px; }
.chat-layout { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 320px 1fr; gap: 14px; padding-bottom: 8px; }
.chat-list, .chat-conv { display: flex; flex-direction: column; min-height: 0; }
.chat-list-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--mud-palette-lines-default); flex: none; }
.chat-list-items { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.round-add { width: 36px; height: 36px; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer; flex: none;
    background: var(--mud-palette-success); color: #fff; transition: filter .15s; }
.round-add:hover { filter: brightness(1.08); }
/* Dashboard: new expense (red) and new income (green) beside the title. */
.round-add.dash-add { width: 40px; height: 40px; }
.round-add.dash-add.expense { background: var(--mud-palette-error); }
/* The green cart: a grey round like the full-screen and settings buttons', the cart itself green (Bruno, 2026-10-31). */
.round-add.dash-add.cart-add { background: color-mix(in srgb, var(--mud-palette-text-primary) 12%, transparent); color: var(--mud-palette-success); }
.chat-item { display: flex; gap: 12px; align-items: center; padding: 10px 14px; color: inherit; border-left: 3px solid transparent; }
.chat-item:hover { text-decoration: none; }
.chat-item.active { background: color-mix(in srgb, var(--mud-palette-success) 10%, transparent); border-left-color: var(--mud-palette-success); }
.chat-item + .chat-item { border-top: 1px solid var(--mud-palette-lines-default); }
.chat-item-main { flex: 1; min-width: 0; }
.chat-item-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.chat-item-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-item-bottom { display: flex; justify-content: space-between; gap: 8px; align-items: center; min-height: 20px; }
.chat-avatar { flex: none; }
.list-avatar { background: color-mix(in srgb, var(--mud-palette-success) 16%, transparent) !important; color: var(--mud-palette-success) !important; }

.chat-conv-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--mud-palette-lines-default); flex: none; }
.chat-conv-title { font-weight: 700; font-size: 1.02rem; line-height: 1.3; }
.chat-head-members { display: flex; align-items: center; gap: 4px 12px; margin-top: 3px; overflow: hidden; white-space: nowrap; }
.chat-head-member { display: inline-flex; align-items: center; gap: 5px; flex: none; font-size: .8rem; color: var(--mud-palette-text-secondary); }
.chat-head-member .mud-avatar { width: 22px; height: 22px; font-size: .58rem; }
.chat-head-members.compact { gap: 4px; }
.chat-head-members.compact .chat-head-name { display: none; }
.chat-back { display: none !important; }
.chat-messages { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px; display: flex; flex-direction: column; gap: 4px; background: var(--mud-palette-background); }
.chat-empty { margin: auto; text-align: center; padding: 24px; }
.chat-day { align-self: center; font-size: .72rem; color: var(--mud-palette-text-secondary); background: var(--mud-palette-surface); padding: 3px 10px;
    border-radius: var(--wp-radius); margin: 10px 0; border: 1px solid var(--mud-palette-lines-default); }
.chat-day::first-letter { text-transform: uppercase; }
.msg { display: flex; flex-direction: column; max-width: 80%; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg.theirs { align-self: flex-start; }
.msg-sender { font-size: .72rem; color: var(--mud-palette-success); margin: 0 0 2px 2px; font-weight: 700; }
.msg.in-group { flex-direction: row; align-items: flex-start; gap: 8px; }
.msg.in-group.first { margin-top: 6px; }
.msg-av { width: 32px; flex: none; }
.msg-av .mud-avatar { width: 32px; height: 32px; }
.msg-col { display: flex; flex-direction: column; min-width: 0; }
@media (max-width: 599px) { .msg-av, .msg-av .mud-avatar { width: 26px; height: 26px; } .msg.in-group { gap: 6px; } }
.msg-unit { display: flex; flex-direction: column; min-width: 0; max-width: 100%; }
.msg.mine .msg-unit { align-items: flex-end; }
.msg-bubble { padding: 7px 10px 5px 12px; border-radius: var(--wp-radius); word-break: break-word; line-height: 1.4; font-size: .93rem; cursor: pointer;
    -webkit-user-select: none; user-select: none; }
@media (hover: hover) { .msg-bubble { -webkit-user-select: text; user-select: text; } }
.msg.theirs .msg-bubble { background: var(--mud-palette-surface); border: 1px solid var(--mud-palette-lines-default); border-bottom-left-radius: 2px; }
.msg.mine .msg-bubble { background: color-mix(in srgb, var(--mud-palette-success) 22%, var(--mud-palette-surface)); border-bottom-right-radius: 2px; }
html.wp-dark .msg.mine .msg-bubble { background: color-mix(in srgb, var(--mud-palette-success) 45%, #000); color: #F3EEE6; }
.msg-unit.selected .msg-bubble { box-shadow: 0 0 0 2px var(--mud-palette-success); }
.msg-text { white-space: pre-wrap; }
.msg-time { float: right; margin: 4px 0 0 10px; font-size: .68rem; line-height: 1.6; opacity: .65; font-variant-numeric: tabular-nums; }
.msg-img { display: block; margin: 2px -4px 4px -6px; border-radius: max(3px, calc(var(--wp-radius) - 2px)); overflow: hidden; width: min(260px, 60vw); max-height: 340px; background: rgba(127, 127, 127, .15); }
.msg-img img { display: block; width: 100%; height: 100%; max-height: 340px; object-fit: cover; }
.msg-quote { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; min-width: 0; margin: 2px 0 4px; padding: 4px 8px; border: 0;
    border-left: 3px solid var(--mud-palette-success); border-radius: var(--wp-radius); background: rgba(127, 127, 127, .14); color: inherit; font: inherit;
    font-size: .82rem; line-height: 1.35; text-align: left; cursor: pointer; }
.msg-quote b { font-size: .75rem; color: var(--mud-palette-success); }
.msg-quote span { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .85; }
.msg-unit.flash .msg-bubble { animation: msg-flash 1.6s ease; }
@keyframes msg-flash { 0%, 45% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--mud-palette-success) 60%, transparent); } 100% { box-shadow: 0 0 0 0 transparent; } }
.msg-reactions { display: flex; flex-wrap: wrap; gap: 4px; margin: -4px 6px 2px; position: relative; z-index: 1; }
.reaction { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-surface); color: inherit; font: inherit; font-size: .85rem; line-height: 1.4; cursor: pointer; }
.reaction span { font-size: .72rem; font-weight: 700; }
.reaction.me { border-color: var(--mud-palette-success); background: color-mix(in srgb, var(--mud-palette-success) 14%, var(--mud-palette-surface)); }
/* A tapped message: the quick reactions and what can be done with it, right under it. */
.msg-menu { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 6px; padding: 6px; border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--wp-radius); background: var(--mud-palette-surface); box-shadow: 0 6px 18px rgba(0, 0, 0, .14); }
.react-strip { display: flex; gap: 2px; }
.react-pick { width: 38px; height: 38px; border: 0; border-radius: 50%; background: none; font-size: 1.35rem; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.react-pick:hover, .react-pick.me { background: color-mix(in srgb, var(--mud-palette-success) 16%, transparent); }
.msg-menu-actions { display: flex; flex-wrap: wrap; gap: 2px; border-top: 1px solid var(--mud-palette-lines-default); padding-top: 4px; }
.msg-menu-actions button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 0; border-radius: var(--wp-radius); background: none;
    color: inherit; font: inherit; font-size: .88rem; cursor: pointer; }
.msg-menu-actions button:hover { background: var(--mud-palette-action-default-hover); }
.msg-menu-actions button.danger { color: var(--mud-palette-error); }

.chat-input { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--mud-palette-lines-default); background: var(--mud-palette-surface); flex: none; }
.chat-input-row { display: flex; gap: 6px; align-items: flex-end; }
.chat-input textarea { flex: 1; min-width: 0; resize: none; min-height: 40px; max-height: 140px; padding: 9px 12px; border: 1px solid var(--mud-palette-lines-inputs, var(--mud-palette-lines-default));
    border-radius: 20px; background: var(--mud-palette-background); color: inherit; font: inherit; font-size: 1rem; line-height: 1.35; outline: none; overflow-y: hidden; }
.chat-input textarea:focus { border-color: var(--mud-palette-success); }
.chat-tool { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; color: var(--mud-palette-primary); display: grid; place-items: center; cursor: pointer;
    position: relative; overflow: hidden; background-color: color-mix(in srgb, var(--mud-palette-primary) 11%, transparent); }
.chat-tool:hover { background-color: color-mix(in srgb, var(--mud-palette-primary) 22%, transparent); }
.send-btn { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--mud-palette-success); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.send-btn:disabled { background: var(--mud-palette-action-disabled-background); color: var(--mud-palette-action-disabled); box-shadow: none; cursor: default; }
.chat-reply, .chat-pending { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 10px; border-left: 3px solid var(--mud-palette-success); border-radius: var(--wp-radius); background: var(--mud-palette-background); }
.chat-reply-quote { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: .82rem; line-height: 1.35; }
.chat-reply-quote b { font-size: .75rem; color: var(--mud-palette-success); }
.chat-pending { justify-content: space-between; }
.chat-pending img { height: 64px; max-width: 120px; object-fit: cover; border-radius: max(3px, calc(var(--wp-radius) - 2px)); }
.emoji-pop { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 2px; max-height: 190px; overflow-y: auto; padding: 4px;
    border: 1px solid var(--mud-palette-lines-default); border-radius: var(--wp-radius); background: var(--mud-palette-background); }
.emoji-pick { height: 40px; border: 0; border-radius: var(--wp-radius); background: none; font-size: 1.4rem; cursor: pointer; }
.emoji-pick:hover { background: var(--mud-palette-action-default-hover); }

/* Phones and narrow tablets: the conversations, or the open one with a way back. */
@media (max-width: 799.98px) {
    .chat-layout { grid-template-columns: 1fr; }
    .chat-page.show-list .chat-conv, .chat-page.show-conv .chat-list, .chat-page.show-conv .chat-page-head { display: none; }
    .chat-back { display: inline-flex !important; }
    .chat-conv-head { padding: 8px 10px; }
    .chat-messages { padding: 10px; }
}
html.wp-neon .chat-messages, html.wp-neon .chat-input textarea, html.wp-neon .emoji-pop, html.wp-neon :is(.chat-reply, .chat-pending) { background: transparent; }

/* Dashboard (Bruno, 2026-10-28): everything on one screen, no scrolling. The grid takes what is left under the
   numbers; each card shows only as many rows as fit. */
.dash-page { gap: 12px; }
.dash-page > .page-top { margin-bottom: 0; }
/* The date and the time, large, in the middle of the title row on a computer or a tablet (Bruno, 2026-10-30), sized to
   the row's width; where the row is too narrow for the title, the clock and the buttons side by side, the clock gets a
   row of its own under them. On a phone the day goes under the title and the buttons, across the whole width. */
.dash-clock { display: none; }
@media (max-width: 599.98px) {
    .dash-page .page-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title actions" "sub sub"; row-gap: 0; }
    .dash-page .page-header-text, .dash-page .page-header-text > div { display: contents; }
    .dash-page .page-title { grid-area: title; }
    .dash-page .page-header-text .muted { grid-area: sub; }
    .dash-page .page-header-actions { grid-area: actions; }
}
@media (min-width: 600px) {
    .dash-page > .page-top { container-type: inline-size; }
    .dash-page .page-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title actions" "clock clock"; row-gap: 6px; }
    .dash-page .page-header-text { grid-area: title; }
    .dash-page .page-header-text .muted { max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .dash-page .page-header-actions { grid-area: actions; justify-self: end; }
    .dash-clock { grid-area: clock; display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.1; white-space: nowrap; }
    .dash-clock b { font-size: clamp(2.2rem, 5.2cqi, 3rem); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
    .dash-clock span { font-size: clamp(1rem, 2.2cqi, 1.3rem); font-weight: 600; }
    .dash-subdate { display: none; }
}
@container (min-width: 720px) {
    .dash-page .page-header { grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr); grid-template-areas: "title clock actions"; }
}
html.wp-neon .dash-clock b { text-shadow: var(--nx-text-glow); }
/* The figures on top (Bruno, 2026-10-30): the card's title, the figure big, and a second figure under it a little
   smaller, as on Contas correntes (2026-11-01): Saldo, Pagar, Saúde financeira and Total poupado. The card opens its
   lists in a window (2026-10-31). Three cards a row, four with Total poupado. */
.dash-top { container: dash-top / inline-size; }
.dash-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.dash-stats:has(> .dash-savings) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* With the saldo contabilístico beside the saldo autorizado (Bruno, 2026-11-01 19:47), one card more. */
.dash-stats:has(> .dash-book-stat) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dash-stats:has(> .dash-savings):has(> .dash-book-stat) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.dash-stat { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px; min-width: 0; color: inherit; }
.dash-stat:hover { background: var(--mud-palette-action-default-hover); }
.dash-stat > .mud-icon-root { flex: none; width: 40px; height: 40px; padding: 8px; border-radius: 50%; box-sizing: border-box;
    background: color-mix(in srgb, var(--mud-palette-primary) 14%, transparent); color: var(--mud-palette-primary); }
.dash-stat > span { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.dash-stat-link { display: flex; flex-direction: column; min-width: 0; color: inherit; text-decoration: none; }
.dash-stat-link:hover { text-decoration: none; }
.dash-stat-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.dash-stat-link:focus-visible { outline: none; }
.dash-stat-link:focus-visible::after { outline: 2px solid var(--mud-palette-primary); outline-offset: -2px; }
.dash-stat b { font-size: 1.3rem; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-stat small { font-size: .68rem; font-weight: 600; letter-spacing: .04em; line-height: 1.4; text-transform: uppercase; color: var(--mud-palette-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-stat.due .dash-stat-link b { color: var(--mud-palette-warning); }
.dash-stat.due > .mud-icon-root { background: color-mix(in srgb, var(--mud-palette-warning) 16%, transparent); color: var(--mud-palette-warning); }
.dash-stat.pos .dash-stat-link b { color: var(--mud-palette-success); }
.dash-stat.pos > .mud-icon-root { background: color-mix(in srgb, var(--mud-palette-success) 16%, transparent); color: var(--mud-palette-success); }
.dash-stat.neg .dash-stat-link b { color: var(--mud-palette-error); }
.dash-stat.neg > .mud-icon-root { background: color-mix(in srgb, var(--mud-palette-error) 14%, transparent); color: var(--mud-palette-error); }
/* The year's line is only a figure: it neither lights up under the mouse nor opens anything of its own; the card's
   button lies over the whole card and opens one window, the month and the year on two tabs (Bruno, 2026-10-31). */
.dash-stat .dash-stat-year { position: static; display: flex; align-items: center; justify-content: flex-start; min-width: 0; margin: 1px -6px -3px; padding: 2px 6px;
    border: 0; border-radius: 6px; background: none; font: inherit; color: var(--mud-palette-text-secondary);
    text-align: left; -webkit-tap-highlight-color: transparent; }
.dash-stat .dash-stat-year b { flex: 0 1 auto; font-size: .95rem; font-weight: 650; color: var(--mud-palette-info); }
/* Under Pagar what is overdue, green at zero and red when something is late; under Saldo what it comes to with what is
   still to come in, in the card's colour; under Saúde financeira what is left of the month's income, green above zero,
   red below, yellow at zero. Lighter, as in Contas correntes (Bruno, 2026-11-01). */
.dash-stat .dash-stat-note { --note: var(--mud-palette-text-primary); }
.dash-stat .dash-stat-note b { color: color-mix(in srgb, var(--note) 60%, transparent); }
.dash-stat .dash-stat-note.pos { --note: var(--mud-palette-success); }
.dash-stat .dash-stat-note.neg { --note: var(--mud-palette-error); }
.dash-stat .dash-stat-note.zero { --note: var(--mud-palette-warning); }
/* Total poupado's second line is this month's, not the year's (Bruno, 2026-10-31): green for money in, red for money
   out, with the words "este mês" beside it. */
.dash-stat .dash-stat-month b { color: var(--mud-palette-text-secondary); }
.dash-stat .dash-stat-month.up b { color: var(--mud-palette-success); }
.dash-stat .dash-stat-month.down b { color: var(--mud-palette-error); }
/* The figure always shows in full; the words only where they fit beside it (else they wrap to a line that is cut off).
   The line is the figure's own height, as the year's line in the other cards. */
.dash-stat .dash-stat-month { flex-wrap: wrap; align-items: baseline; row-gap: 1em; column-gap: 5px; overflow: hidden; box-sizing: content-box; max-height: 1lh;
    font-size: .95rem; line-height: 1.2; }
.dash-stats .dash-stat .dash-stat-month.dash-stat-year b { flex: none; font-size: inherit; line-height: inherit; }
.dash-stat-when { flex: none; white-space: nowrap; font-size: .68rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--mud-palette-text-secondary); }
/* Narrower, the cards' marks go before the figures do; then two cards a row, with their marks back. */
@container dash-top (max-width: 1100px) { .dash-stats:has(> .dash-savings):has(> .dash-book-stat) .dash-stat > .mud-icon-root { display: none; } }
@container dash-top (max-width: 860px) { .dash-stats:is(:has(> .dash-savings), :has(> .dash-book-stat)) .dash-stat > .mud-icon-root { display: none; } }
@container dash-top (max-width: 640px) {
    .dash-stats, .dash-stats:has(> .dash-savings), .dash-stats:has(> .dash-book-stat), .dash-stats:has(> .dash-savings):has(> .dash-book-stat) {
        grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dash-stats > .dash-stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
    /* The saldos and Pagar keep their marks too (Bruno, 2026-11-02 12:52: "têm espaço para mostrar ícones no
       telemóvel? Se sim mostra"): "Saldo contabilístico", the longest name, still shows in full down to here. */
    .dash-stats:is(:has(> .dash-savings), :has(> .dash-book-stat)) .dash-stat > .mud-icon-root,
    .dash-stats:has(> .dash-savings):has(> .dash-book-stat) .dash-stat > .mud-icon-root { display: block; }
}
/* A narrow phone keeps the figures and the (i), and lets the cards' marks go: there the saldo's name would be cut. */
@container dash-top (max-width: 345px) {
    .dash-stats .dash-stat > .mud-icon-root, .dash-stats:is(:has(> .dash-savings), :has(> .dash-book-stat)) .dash-stat > .mud-icon-root,
    .dash-stats:has(> .dash-savings):has(> .dash-book-stat) .dash-stat > .mud-icon-root { display: none; } }
/* Five cards in a row this narrow (a tablet standing up, or a small laptop with the menu open) cut or shrank their
   figures: there they go three and two a row instead, with their marks back. */
@container dash-top (min-width: 641px) and (max-width: 860px) {
    .dash-stats:has(> .dash-savings):has(> .dash-book-stat) { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .dash-stats:has(> .dash-savings):has(> .dash-book-stat) > .dash-stat { grid-column: span 2; }
    .dash-stats:has(> .dash-savings):has(> .dash-book-stat) > .dash-stat:nth-child(n + 4) { grid-column: span 3; }
    .dash-stats:has(> .dash-savings):has(> .dash-book-stat) .dash-stat > .mud-icon-root { display: block; }
}

.fill-page > .dash-grid { flex: 1 1 auto; min-height: 0; }
/* What is running out has the tall column and the agenda sits beside it (Bruno, 2026-10-30): there are always more items
   running out than things on in the next ten days. */
.dash-grid { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "due agenda bills month" "due trend trend cats"; padding-bottom: 12px; }
.dash-agenda { grid-area: agenda; } .dash-due { grid-area: due; } .dash-bills { grid-area: bills; } .dash-month { grid-area: month; } .dash-trend { grid-area: trend; } .dash-cats { grid-area: cats; }
.dash-card { display: flex; flex-direction: column; min-height: 0; }
.dash-head { flex: none; display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-weight: 600; font-size: .8rem; letter-spacing: .05em;
    text-transform: uppercase; color: var(--mud-palette-text-secondary); border-bottom: 1px solid var(--mud-palette-lines-default); text-decoration: none; }
a.dash-head:hover, button.dash-head:hover { text-decoration: none; background: var(--mud-palette-action-default-hover); }
/* The cards open their lists in a window over the Dashboard (Bruno, 2026-10-31), so their titles, rows and figures are
   buttons that look as the links did. Without weight, so the cards' own rules (padding, lines, type) still win. */
:where(button.dash-head, button.dash-bill-open, button.dash-stat-link) { width: 100%; margin: 0; padding: 0; border: 0; background: none; font: inherit; color: inherit;
    text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
/* The app's buttons centre what is in them; these lay it out as the links did. */
button:is(.dash-head, .dash-bill-open, .dash-stat-link) { justify-content: flex-start; }
/* The app's buttons are positioned, which kept the cover over the whole card inside the button: unpositioned, it
   covers the card again, so a tap anywhere on it opens the window. */
button.dash-stat-link { position: static; align-items: stretch; }
button.dash-head:focus-visible, button.dash-bill-open:focus-visible { outline: 2px solid var(--mud-palette-primary); outline-offset: -2px; }
.dash-tap { cursor: pointer; }
/* In the dark themes the line under a card's title is light, like the lines between its rows (Bruno, 2026-10-28):
   the theme's own line colour is almost black there. */
html.wp-dark .dash-head { border-bottom-color: color-mix(in srgb, var(--mud-palette-text-primary) 22%, transparent); }
.dash-head .dash-go { margin-left: auto; }
.dash-head .section-count + .dash-go { margin-left: 0; }
.dash-head .section-count { margin-left: auto; }
/* Rows that don't fit whole wrap into a second column, out of sight: a card never shows half a row. */
.dash-rows { flex: 1 1 auto; min-height: 0; overflow: hidden; display: flex; flex-direction: column; flex-wrap: wrap; align-content: flex-start; }
.dash-rows > * { flex: none; width: 100%; }
/* The Dashboard's rows: a hairline between them (see "Every list's rows"), none above the first, which sits under the
   card's title line. */
.dash-card .suggest-row { border-radius: 0; border: 0; }
.dash-card .suggest-row + .suggest-row, .dash-rows > * + * { border-top: .5px solid var(--wp-row-line); }
.dash-empty { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 16px; color: var(--mud-palette-text-secondary); font-size: .9rem; text-align: center; }

.dash-bill { display: flex; align-items: center; gap: 12px; padding: 8px 14px; min-height: 52px; box-sizing: border-box; color: inherit; text-decoration: none; }
.dash-bill:hover { text-decoration: none; }
/* 48px, so the longest label (AMANHÃ, MAÑANA) has some room on each side (Bruno, 2026-11-01 23:58: "texto sem margem não
   fica bem"); it was 40px. */
.dash-day { flex: none; width: 48px; height: 48px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
    background: color-mix(in srgb, var(--mud-palette-primary) 12%, transparent); color: var(--mud-palette-primary); }
.dash-day b { font-size: 1rem; }
.dash-day small { font-size: .62rem; text-transform: uppercase; font-weight: 600; }
/* An overdue bill's tile is solid red with white type, to stand out (Bruno, 2026-11-02 00:01: "fundo opaco com o texto a
   amarelo ou branco"). Each theme's red is deep enough for white: 4.5:1 or more. */
.dash-bill.late .dash-day { background: var(--wp-late-tile); color: #fff; }
.dash-bill.late .suggest-when { color: var(--mud-palette-error); }
.dash-bill-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
/* A row is two buttons: the bill, which opens the window, and the green notes at its end, which pay it. */
.dash-bill-open { flex: 1 1 auto; min-width: 0; align-self: stretch; display: flex; align-items: center; gap: 12px; }
button.dash-bill-pay { border: 0; padding: 0; margin: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button.dash-bill-pay .mud-icon-root { width: 22px; height: 22px; }
@media (hover: hover) { button.dash-bill-pay:hover { filter: brightness(1.1); } }
button.dash-bill-pay:active { transform: scale(.92); }
button.dash-bill-pay:focus-visible { outline: 2px solid var(--mud-palette-primary); outline-offset: 2px; }
.dash-bill-text .suggest-name, .dash-cat .suggest-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.dash-bill-text .suggest-when { font-size: .78rem; color: var(--mud-palette-text-secondary); }

.dash-donut-wrap { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 20px; padding: 10px 16px; }
.dash-donut { flex: none; height: 100%; max-height: 150px; min-height: 90px; aspect-ratio: 1; overflow: visible; }
.dash-donut circle { fill: none; stroke-width: 12; }
/* In Pagar's colours (Bruno, 2026-11-02 16:47): red below half paid, yellow from half, green only at 100%, on the same
   faint track as Pagar's ring, the share in its colour. */
.dash-donut { --ring: var(--mud-palette-success); }
.dash-donut.low { --ring: var(--mud-palette-error); }
.dash-donut.half { --ring: var(--mud-palette-warning); }
.dash-donut .ring-bg { stroke: color-mix(in srgb, var(--mud-palette-text-primary) 14%, transparent); }
.dash-donut .ring { stroke: var(--ring); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 60px 60px; transition: stroke-dasharray .4s; }
.dash-donut:is(.low, .half, .full) .ring-num { fill: var(--ring); }
.dash-donut .ring-num { text-anchor: middle; font-size: 24px; font-weight: 700; fill: var(--mud-palette-text-primary); }
.dash-donut .ring-sub { text-anchor: middle; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; fill: var(--mud-palette-text-secondary); }
.dash-legend { margin: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dash-legend > div { display: flex; flex-direction: column; }
.dash-legend dt { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--mud-palette-text-secondary); display: flex; align-items: center; gap: 6px; }
.dash-legend dd { margin: 0 0 0 14px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot.in { background: var(--mud-palette-success); }
.dot.out { background: var(--mud-palette-error); }
.dot.todo { background: var(--mud-palette-warning); }
.dot.wait { background: color-mix(in srgb, var(--mud-palette-success) 40%, transparent); }
.dash-key { margin-left: auto; display: flex; align-items: center; gap: 6px; text-transform: none; letter-spacing: 0; font-weight: 500; }
.dash-key .dot:not(:first-child) { margin-left: 8px; }

.dash-bars { flex: 1 1 auto; min-height: 0; display: flex; align-items: stretch; gap: 10px; padding: 12px 16px 8px; }

.dash-cat { display: flex; align-items: center; gap: 10px; padding: 7px 14px; }
.dash-cat > .mud-icon-root { color: var(--mud-palette-text-secondary); }
.dash-cat-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.dash-cat-line { display: flex; justify-content: space-between; gap: 8px; font-size: .88rem; }
.dash-meter { height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--mud-palette-primary) 12%, transparent); overflow: hidden; }
.dash-meter > span { display: block; height: 100%; border-radius: 3px; background: var(--mud-palette-primary); }

/* Tablet: two columns, what is running out beside the agenda and the next bills, the trend across the bottom. */
@media (max-width: 1099.98px) {
    .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(4, minmax(0, 1fr));
        grid-template-areas: "due agenda" "due bills" "month cats" "trend trend"; }
}
/* Phone: the numbers, then what is running out, the agenda and the next bills; the charts stay on bigger screens. */
@media (max-width: 599.98px) {
    .dash-page { gap: 10px; }
    .dash-stats, .dash-stats:has(> .dash-savings) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .dash-stats:not(:has(> .dash-savings)) > .dash-stat:last-child { grid-column: 1 / -1; }
    .dash-stat { padding: 5px 9px; gap: 8px; }
    .dash-stat > .mud-icon-root { width: 30px; height: 30px; padding: 5px; }
    .dash-stat b { font-size: 1.02rem; line-height: 1.15; }
    .dash-stat small { font-size: .6rem; letter-spacing: .02em; line-height: 1.3; }
    .dash-stat .dash-stat-year { margin: 0 -6px -2px; padding-block: 1px; }
    .dash-stat .dash-stat-year b { font-size: .84rem; }
    .dash-stat .dash-stat-month { font-size: .84rem; line-height: 1.15; }
    .dash-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(120px, 1fr) fit-content(55%) minmax(120px, 1fr);
        grid-template-areas: "due" "agenda" "bills"; gap: 10px; }
    .dash-month, .dash-trend, .dash-cats { display: none !important; }
    /* No Total poupado card on a phone, and Saúde financeira takes the whole row when it is left alone (Bruno,
       2026-11-02 12:32: "no telemóvel o cartão da poupança não deve aparecer"). */
    .dash-stats > .dash-savings { display: none; }
    .dash-stats:not(:has(> .dash-book-stat)) > .dash-health { grid-column: 1 / -1; }
}
.dash-head > span:not(.section-count):not(.dash-key) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-head .section-count, .dash-key { flex: none; white-space: nowrap; }

/* Perfil > Siri e CarPlay: the personal link (selectable, and a button that copies it), the steps, the install buttons. */
.siri-link { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border-radius: var(--wp-radius);
    background: color-mix(in srgb, var(--mud-palette-text-primary) 6%, transparent); }
.siri-link code { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; font-size: .82rem; user-select: all; -webkit-user-select: all; background: none; }
.siri-link .mud-button-root { flex: none; }
.siri-steps { margin: 14px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; font-size: .92rem; }
.siri-install { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.siri-manual { margin-top: 12px; font-size: .86rem; color: var(--mud-palette-text-secondary); }
.siri-manual summary { cursor: pointer; font-weight: 600; color: var(--mud-palette-text-primary); }
.siri-manual p { margin: 8px 0 0; }

/* ==========================================================================
   Every list's rows (Bruno, 2026-10-28): a hairline in a light tint of the text colour between them, every other row
   faintly shaded so a long list is easy to follow, and the row under the mouse lit up (lighter in Escuro and Néon, a
   light tint of the accent in Claro). The shade is a layer over the row's own colour, so a row that stands out
   (unread, on the list, the open conversation, the year's total) keeps it, and still alternates.
   ========================================================================== */
:root {
    --wp-row-line: color-mix(in srgb, var(--mud-palette-text-primary) 14%, transparent);
    --wp-row-alt: color-mix(in srgb, var(--mud-palette-text-primary) 4%, transparent);
    --wp-row-hover: color-mix(in srgb, var(--mud-palette-primary) 12%, transparent);
}
html.wp-dark { --wp-row-alt: color-mix(in srgb, var(--mud-palette-text-primary) 5%, transparent); --wp-row-hover: color-mix(in srgb, var(--mud-palette-text-primary) 11%, transparent); }
html.wp-neon { --wp-row-line: var(--nx-line-soft); --wp-row-alt: rgba(125, 170, 255, .09); --wp-row-hover: rgba(125, 170, 255, .18); }
.list-row, .notif-row, .purchase-row, .kv-list > div { border-bottom: .5px solid var(--wp-row-line); }
.suggest-row, .bell-item, .chat-item + .chat-item, .linked-row, .quick-hit + .quick-hit { border-top: .5px solid var(--wp-row-line); }
/* Rows that sit in a padded card reach a little past the text, so their shade doesn't touch it. */
.purchase-row, .kv-list > div { padding-inline: 8px; margin-inline: -8px; }
:is(.list-row:not(.finance-year-head), .suggest-row, .notif-row, .bell-item, .chat-item, .dash-bill, .dash-cat, .purchase-row, .quick-hit):nth-child(even of .list-row:not(.finance-year-head), .suggest-row, .notif-row, .bell-item, .chat-item, .dash-bill, .dash-cat, .purchase-row, .quick-hit) { background-image: linear-gradient(var(--wp-row-alt), var(--wp-row-alt)); }
.kv-list > :nth-child(even) { background-image: linear-gradient(var(--wp-row-alt), var(--wp-row-alt)); }
@media (hover: hover) {
    .list-row:not(.finance-year-head):hover, button.list-row.finance-year-row:hover, .suggest-row:hover, .notif-row:hover, .bell-item:hover,
    .chat-item:hover, .dash-bill:hover, .dash-cat:hover, .purchase-row:hover, .kv-list > div:hover, .quick-hit:hover { background-color: var(--wp-row-hover); }
}

/* ==========================================================================
   Background picture (Perfil): a fixed layer behind the app, a ready-made one or the user's own photo, dimmed in the
   theme's page colour so text stays readable in Claro, Escuro and Néon. Cards keep their own colour on top of it.
   ========================================================================== */
.app-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; background-position: center; background-size: cover; background-repeat: no-repeat; }
.app-bg::after { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--mud-palette-background) 38%, transparent); }
html.wp-dark .app-bg::after { background: color-mix(in srgb, var(--mud-palette-background) 55%, transparent); }
/* The page itself turns see-through so the layer shows (as Néon does for its grid). */
html:has(.app-bg) body, html:has(.app-bg) .mud-layout, html:has(.app-bg) .mud-main-content { background: transparent !important; }
/* Glass, as on the Mac: over a picture everything that had a solid colour (bars, side menu, cards, sticky titles,
   menus, dialogs) turns see-through and blurs what is behind it, so the picture shows as soft colour. The tint keeps
   enough of the theme's colour for text to read in Claro and Escuro; Néon keeps its own navy glass, just clearer. */
html:has(.app-bg) {
    --wp-glass-blur: blur(24px) saturate(1.8);
    --wp-glass-card: color-mix(in srgb, var(--mud-palette-surface) 60%, transparent);
    --wp-glass-bar: color-mix(in srgb, var(--mud-palette-surface) 58%, transparent);
    --wp-glass-stick: color-mix(in srgb, var(--mud-palette-surface) 62%, transparent);
    --wp-glass-pop: color-mix(in srgb, var(--mud-palette-surface) 74%, transparent);
    --wp-glass-edge: rgba(255, 255, 255, .55);
}
html.wp-dark:has(.app-bg) {
    --wp-glass-card: color-mix(in srgb, var(--mud-palette-surface) 52%, transparent);
    --wp-glass-bar: color-mix(in srgb, var(--mud-palette-surface) 56%, transparent);
    --wp-glass-stick: color-mix(in srgb, var(--mud-palette-surface) 60%, transparent);
    --wp-glass-pop: color-mix(in srgb, var(--mud-palette-surface) 72%, transparent);
    --wp-glass-edge: rgba(255, 255, 255, .10);
}
html.wp-neon:has(.app-bg) {
    --nx-fill: linear-gradient(160deg, rgba(48, 88, 200, .26), rgba(10, 20, 66, .52));
    --nx-bar: rgba(7, 14, 44, .58); --nx-glass: rgba(7, 14, 44, .62); --nx-stick: rgba(14, 28, 82, .62);
    --wp-glass-pop: rgba(10, 20, 62, .72);
}
/* The picture shows more now that the glass does the softening. */
html:has(.app-bg) .app-bg::after { background: color-mix(in srgb, var(--mud-palette-background) 18%, transparent); }
html.wp-dark:has(.app-bg) .app-bg::after { background: color-mix(in srgb, var(--mud-palette-background) 35%, transparent); }

html:has(.app-bg) :is(.app-bar, .bottom-nav, .mud-drawer.app-drawer) {
    -webkit-backdrop-filter: var(--wp-glass-blur); backdrop-filter: var(--wp-glass-blur);
}
html:has(.app-bg):not(.wp-neon) :is(.app-bar, .bottom-nav, .mud-drawer.app-drawer) { background: var(--wp-glass-bar) !important; }
html:has(.app-bg):not(.wp-neon) .app-bar { border-bottom-color: var(--wp-glass-edge); }
html:has(.app-bg):not(.wp-neon) .bottom-nav { border-top-color: var(--wp-glass-edge); }
html:has(.app-bg):not(.wp-neon) .mud-drawer.app-drawer { border-right: 1px solid var(--wp-glass-edge); }

html:has(.app-bg) .card { -webkit-backdrop-filter: var(--wp-glass-blur); backdrop-filter: var(--wp-glass-blur); }
html:has(.app-bg):not(.wp-neon) .card {
    background: var(--wp-glass-card); border-color: var(--wp-glass-edge);
    box-shadow: 0 8px 28px rgba(0, 0, 0, .10), inset 0 1px 0 color-mix(in srgb, var(--wp-glass-edge) 80%, transparent);
}

/* Titles that stick inside a card, and at the top of the page: glass too, blurring the rows that scroll under them. */
html:has(.app-bg) :is(.stick, .page-top, .history-tabs .mud-tabs-tabbar, .day-head.stick.stuck) {
    -webkit-backdrop-filter: var(--wp-glass-blur); backdrop-filter: var(--wp-glass-blur);
}
html:has(.app-bg):not(.wp-neon) :is(.stick, .page-top, .history-tabs .mud-tabs-tabbar, .day-head.stick.stuck) { background: var(--wp-glass-stick) !important; }
html:has(.app-bg):not(.wp-neon) .section-bar.stick { background: linear-gradient(color-mix(in srgb, var(--mud-palette-primary) 7%, transparent), color-mix(in srgb, var(--mud-palette-primary) 7%, transparent)) var(--wp-glass-stick) !important; }
html:has(.app-bg) .day-head.stick:not(.stuck) { background: transparent !important; -webkit-backdrop-filter: none; backdrop-filter: none; }
/* Category titles in Escuro: just a little darker than their rows (Bruno, 2026-10-28), a light shade over the card's
   own glass. While held at the top, with rows passing under, they must be solid (a blur inside the card's own glass
   isn't drawn everywhere), so they take the colour the glass shows on average: the picture's average colour
   (--wp-bg-avg, from app.js) under the page's veil and the card's tint, the same shade darker. Their line is light. */
html.wp-dark:has(.app-bg):not(.wp-neon) {
    --wp-glass-seen: color-mix(in srgb, var(--mud-palette-surface) 52%, color-mix(in srgb, var(--mud-palette-background) 35%, var(--wp-bg-avg, #6E6862)));
}
html.wp-dark:has(.app-bg):not(.wp-neon) .list-section > .section-bar.stick {
    background: linear-gradient(color-mix(in srgb, var(--mud-palette-primary) 7%, transparent), color-mix(in srgb, var(--mud-palette-primary) 7%, transparent))
        rgba(0, 0, 0, .15) !important;
    /* No blur of its own: on the iPhone a blur inside the card's glass sees only the card's dark tint, not the picture,
       which made the title a dark band (Bruno, 2026-10-28). Shaded glass at rest and solid when held need none. */
    -webkit-backdrop-filter: none; backdrop-filter: none;
}
html.wp-dark:has(.app-bg):not(.wp-neon) .list-section > .section-bar.stick.stuck {
    background: linear-gradient(color-mix(in srgb, var(--mud-palette-primary) 7%, transparent), color-mix(in srgb, var(--mud-palette-primary) 7%, transparent))
        color-mix(in srgb, var(--wp-glass-seen) 85%, black) !important;
}
html.wp-dark:not(.wp-neon) :is(.list-section > .section-bar, .fill-scroll.scrolled) { border-color: color-mix(in srgb, var(--mud-palette-text-primary) 22%, transparent); }

/* Menus, pickers and dialogs float over the page as clearer glass. */
html:has(.app-bg) :is(.mud-popover, .mud-dialog) {
    background: var(--wp-glass-pop) !important; -webkit-backdrop-filter: var(--wp-glass-blur); backdrop-filter: var(--wp-glass-blur);
}
/* Compras recentes' held day title over a picture is solid, or the rows would show through it (a blur inside the
   window's own glass isn't drawn): the colour the window's glass shows on average, over the dark veil behind windows. */
html:has(.app-bg):not(.wp-neon) :is(.recent-buys, .detail-groups) .day-head.stick.stuck {
    background: color-mix(in srgb, var(--mud-palette-surface) 74%, color-mix(in srgb, rgb(20, 18, 16) 60%, var(--wp-bg-avg, #6E6862))) !important;
    -webkit-backdrop-filter: none; backdrop-filter: none;
}
html.wp-neon:has(.app-bg) :is(.recent-buys, .detail-groups) .day-head.stick.stuck { background: rgba(7, 14, 44, .97) !important; -webkit-backdrop-filter: none; backdrop-filter: none; }

/* Chat: the conversation sits on the glass of its card instead of a solid page colour. */
html:has(.app-bg) .chat-messages { background: transparent; }
html:has(.app-bg) :is(.chat-input, .msg.theirs .msg-bubble, .chat-day) { background: var(--wp-glass-stick); }

/* The ready-made backgrounds; the same classes paint the swatches in Perfil. */
.bg-mercearia { background-color: #FBF6EC; background-size: 132px 132px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='132' height='132' font-size='26' opacity='.42'%3E%3Ctext x='8' y='34'%3E🍎%3C/text%3E%3Ctext x='74' y='30'%3E🥖%3C/text%3E%3Ctext x='40' y='76'%3E🧀%3C/text%3E%3Ctext x='98' y='86'%3E🍋%3C/text%3E%3Ctext x='6' y='118'%3E🥕%3C/text%3E%3Ctext x='68' y='126'%3E🥦%3C/text%3E%3C/svg%3E"); }
.app-bg.bg-mercearia { background-size: 132px 132px; background-repeat: repeat; }
.bg-menta { background-image: radial-gradient(60% 50% at 15% 10%, #E8FFF1 0%, transparent 70%), linear-gradient(160deg, #CDEFD9 0%, #8FD1AE 55%, #4FA97F 100%); }
.bg-pessego { background-image: radial-gradient(55% 45% at 85% 15%, #FFF3C4 0%, transparent 70%), radial-gradient(60% 55% at 10% 90%, #FFB4A2 0%, transparent 70%), linear-gradient(150deg, #FFE0C2, #FFC8B0); }
.bg-lavanda { background-image: radial-gradient(60% 50% at 80% 10%, #F6E8FF 0%, transparent 70%), linear-gradient(160deg, #E0C3FC 0%, #B9C9FB 55%, #8EC5FC 100%); }
.bg-oceano { background-image: radial-gradient(70% 50% at 50% 0%, #B8F1FF 0%, transparent 70%), linear-gradient(180deg, #6DD5ED 0%, #2B95C4 60%, #155E8C 100%); }
.bg-pordosol { background-image: radial-gradient(45% 35% at 50% 78%, #FFE29A 0%, transparent 70%), linear-gradient(180deg, #4B3F8F 0%, #A14E8C 38%, #F06A5C 72%, #FFB067 100%); }
.bg-floresta { background-image: radial-gradient(60% 45% at 75% 0%, #C9E6A6 0%, transparent 70%), linear-gradient(170deg, #71B280 0%, #2F7A5B 55%, #134E3E 100%); }
.bg-noite { background-color: #0B1430; background-image:
    radial-gradient(1.5px 1.5px at 20px 30px, #fff 50%, transparent 51%), radial-gradient(1px 1px at 90px 70px, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 150px 20px, #DDE6FF 50%, transparent 51%), radial-gradient(1px 1px at 60px 140px, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 170px 120px, #fff 50%, transparent 51%), radial-gradient(80% 60% at 70% 0%, #2B3F86 0%, transparent 70%),
    linear-gradient(180deg, #13215A, #070C22);
    background-size: 200px 160px, 200px 160px, 200px 160px, 200px 160px, 200px 160px, 100% 100%, 100% 100%; }
.app-bg.bg-noite { background-repeat: repeat, repeat, repeat, repeat, repeat, no-repeat, no-repeat; }
.bg-photo { background-position: center; background-size: cover; }

/* Perfil: the choices as small tiles with their name. */
.bg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.bg-option { display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 4px 4px 6px; border-radius: var(--wp-radius); border: 1px solid var(--mud-palette-lines-default);
    background: none; color: inherit; font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer; text-align: center; }
.bg-option:hover { border-color: var(--wp-gold); }
.bg-option.active { border-color: var(--wp-gold); box-shadow: 0 0 0 1px var(--wp-gold); background: color-mix(in srgb, var(--wp-gold) 10%, transparent); }
.bg-swatch { display: grid; place-items: center; height: 56px; border-radius: max(4px, calc(var(--wp-radius) - 3px)); background-size: cover; background-position: center; color: var(--mud-palette-text-secondary); }
.bg-swatch.bg-mercearia { background-size: 66px 66px; background-repeat: repeat; }
.bg-swatch.bg-noite { background-size: 100px 80px, 100px 80px, 100px 80px, 100px 80px, 100px 80px, 100% 100%, 100% 100%; }
.bg-none .bg-swatch { border: 1px dashed var(--mud-palette-lines-default); }
html.wp-neon .bg-option:not(.active) { background: var(--nx-well); border-color: var(--nx-line-soft); }
/* The dashboard: the same 16px gap on all four sides (Bruno, 2026-10-28). */
.app-container:has(.dash-page) { padding: 16px !important; }
.fill-page.dash-page { height: calc(100dvh - var(--wp-main-top) - 32px); }
.dash-page > .page-top { margin-inline: -16px; padding-inline: 16px; }
@media (max-width: 959.98px) {
    .app-container:has(.dash-page) { padding-bottom: calc(16px + var(--wp-bottom-nav) + var(--wp-nav-safe)) !important; }
    .fill-page.dash-page { height: calc(100dvh - var(--wp-main-top) - 32px - var(--wp-bottom-nav) - var(--wp-nav-safe)); }
}
.dash-card .suggest-rows.dash-scroll { flex: 1 1 auto; min-height: 0; max-height: none; }
.dash-card .suggest-rows.dash-scroll > .suggest-row { flex: none; }
/* The year: twelve months, the months still ahead paler (an estimate). */
.dash-trend .dash-bars { gap: 6px; }
/* Its value axis (Bruno, 2026-11-01 22:14): round amounts on the left, each with a faint dashed line across the chart
   (drawn under them, cut at the card's edge). The hidden top label gives the column its width; the hidden 0 under it
   stands in for the month names, so the axis and the lines share the same height. */
.dash-bars { position: relative; overflow: hidden; }
.dash-axis { flex: none; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dash-axis-ticks { flex: 1; position: relative; min-height: 0; }
.dash-axis-size, .dash-tick { font-size: .68rem; line-height: 1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dash-axis-size { display: block; height: 0; visibility: hidden; }
.dash-tick { position: absolute; right: 0; transform: translateY(50%); color: var(--mud-palette-text-secondary); }
.dash-tick::after { content: ""; position: absolute; top: 50%; left: calc(100% + 6px); width: 400vw; pointer-events: none;
    border-top: 1px dashed color-mix(in srgb, var(--mud-palette-text-primary) 14%, transparent); }
.dash-axis-size + .dash-tick::after { content: none; }
.dash-axis > small { font-size: .7rem; visibility: hidden; }
.year-detail-rows { margin: 0 -24px; border-top: .5px solid var(--wp-row-line); }
.year-detail-row { padding: 10px 24px; }
.year-detail-row.late .list-row-sub { color: var(--mud-palette-error); }
.year-detail-row.est .list-row-title, .year-detail-row.est .amount { color: var(--mud-palette-text-secondary); font-style: italic; }
.year-detail-row.est .finance-icon { opacity: .6; }
.year-detail-row .amount { flex: none; }
.year-detail-row.neg .amount { color: var(--mud-palette-error); }
/* The saldo autorizado in the saldo contabilístico window: yellow, as on its card, since part of it is the bank's money. */
.year-detail-row.lent .amount { color: var(--saldo-lent); }
.year-detail-row.lent .finance-icon { background: color-mix(in srgb, var(--saldo-lent) 16%, transparent); color: var(--saldo-lent); }
/* Compras recentes, from the Dashboard's Supermercado card (Bruno, 2026-10-31): the days scroll inside the window, each
   day's title held at the top while its rows pass beneath. */
:is(.recent-buys-dialog, .detail-groups-dialog) .mud-dialog-content { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 0; }
:is(.recent-buys, .detail-groups) { flex: 1 1 auto; min-height: 0; max-height: min(64dvh, 620px); margin-inline: -24px; padding-bottom: 12px; border-top: .5px solid var(--wp-row-line); }
:is(.recent-buys, .detail-groups) .day-head.stick { margin: 0; padding: 10px 24px 6px; background: var(--mud-palette-surface); }
:is(.recent-buys-dialog, .detail-groups-dialog) .year-detail-total { padding-bottom: 12px; }
/* A top card's window: the month and the year on two tabs across the window's width. */
.detail-view { display: flex; flex: none; margin-bottom: 12px; }
.detail-view .mud-toggle-item { flex: 1 1 0; }
.recent-buys .recent-buy { padding-inline: 24px; }
.year-detail-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 -24px; padding: 12px 24px 4px;
    border-top: 1px solid color-mix(in srgb, var(--mud-palette-text-primary) 22%, transparent); font-weight: 700; }
.year-detail-total .amount { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
/* The year as two lines (Bruno, 2026-11-02 22:14: "no gráfico de barras usa gráfico de linhas"): incomes green and
   expenses red, a dot on each month; from this month on, an estimate, dashed and paler. The plot shares the axis's
   height: both sit over a row of month names of the same size. */
.dash-lines { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.dash-plot { flex: 1; min-height: 0; position: relative; z-index: 1; border-bottom: 1px solid var(--mud-palette-lines-default); }
.dash-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.dash-plot polyline { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.dash-plot svg.in { color: var(--mud-palette-success); }
.dash-plot svg.out { color: var(--mud-palette-error); }
.dash-plot polyline { stroke: currentColor; }
.dash-plot polyline.ahead { stroke-dasharray: 5 5; opacity: .45; }
html.wp-neon .dash-plot svg { filter: drop-shadow(0 0 4px color-mix(in srgb, currentColor 70%, transparent)); }
.dash-month-col { position: absolute; top: 0; bottom: 0; }
.dash-month-col .pt { position: absolute; left: 50%; width: 8px; height: 8px; margin: 0 0 -4px -4px; border-radius: 50%; transition: bottom .4s; }
.dash-month-col .pt.in { background: var(--mud-palette-success); }
.dash-month-col .pt.out { background: var(--mud-palette-error); }
.dash-month-col.future .pt { opacity: .45; }
.dash-month-col.now .pt { width: 10px; height: 10px; margin: 0 0 -5px -5px; }
.dash-months { display: flex; }
.dash-months small { flex: 1 1 0; min-width: 0; text-align: center; font-size: .7rem; text-transform: uppercase; color: var(--mud-palette-text-secondary); }
.dash-months small.now { color: var(--mud-palette-primary); font-weight: 700; }
.dot.est { background: var(--mud-palette-text-secondary); opacity: .35; }

/* A card squeezed into a thin strip is no use (Bruno, 2026-10-28): the grid sits in a box that knows its height, and
   cards drop out, least useful first, until the rest each have room for a heading and a few rows. */
.fill-page > .dash-area { flex: 1 1 auto; min-height: 0; container: dash / size; }
.dash-area > .dash-grid { height: 100%; box-sizing: border-box; }
@media (min-width: 1100px) {
    /* A laptop beside the side menu has room for three columns: the agenda takes where the money goes's place. */
    @container dash (max-width: 1249.98px) {
        .dash-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: "due agenda bills" "month trend trend"; }
        .dash-cats { display: none !important; }
    }
    @container dash (max-height: 440px) {
        .dash-grid { grid-template-rows: minmax(0, 1fr); grid-template-areas: "due agenda bills month"; }
        .dash-trend, .dash-cats { display: none !important; }
    }
    @container dash (max-width: 1249.98px) and (max-height: 440px) {
        .dash-grid { grid-template-areas: "due agenda bills"; }
        .dash-month { display: none !important; }
    }
}
@media (min-width: 600px) and (max-width: 1099.98px) {
    @container dash (max-height: 880px) {
        .dash-grid { grid-template-rows: repeat(3, minmax(0, 1fr)); grid-template-areas: "due agenda" "due bills" "trend trend"; }
        .dash-month, .dash-cats { display: none !important; }
    }
    @container dash (max-height: 660px) {
        .dash-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); grid-template-areas: "due agenda bills" "trend trend trend"; }
    }
    @container dash (max-height: 440px) {
        .dash-grid { grid-template-rows: minmax(0, 1fr); grid-template-areas: "due agenda bills"; }
        .dash-trend { display: none !important; }
    }
}
/* On a phone, what is running out gets smaller so the next days' events fit (Bruno, 2026-11-02 12:32: "a lista de
   compras fica mais pequena para caber os próximos eventos"): the agenda takes the room its events need, leaving what
   is running out the rest, at least its title and one item. The next bills only come in on a very tall screen. */
@media (max-width: 599.98px) {
    @container dash (max-height: 680px) {
        .dash-grid { grid-template-rows: minmax(104px, 1fr) fit-content(80%); grid-template-areas: "due" "agenda"; }
        .dash-bills { display: none !important; }
    }
    /* With no room for both (a small phone), the events stay and what is running out goes. */
    @container dash (max-height: 250px) {
        .dash-grid { grid-template-rows: minmax(0, 1fr); grid-template-areas: "agenda"; }
        .dash-due { display: none !important; }
    }
}
/* With nothing running out, that card goes (Bruno, 2026-11-03 11:29: "o cartão deve estar a acabar só deve estar visível
   se existirem itens na lista"): the agenda takes its tall column and the next bills widen into the agenda's place. On a
   phone the agenda and the next bills share the screen, the bills taking the room the items had. */
@media (min-width: 600px) {
    .dash-grid.no-due > .dash-agenda { grid-area: due; }
    .dash-grid.no-due > .dash-bills { grid-area: agenda-start / agenda-start / bills-end / bills-end; }
}
@media (max-width: 599.98px) {
    .dash-grid.no-due { grid-template-rows: fit-content(55%) minmax(120px, 1fr); grid-template-areas: "agenda" "bills"; }
    @container dash (max-height: 680px) {
        .dash-grid.no-due { grid-template-rows: fit-content(80%) minmax(104px, 1fr); }
        .dash-grid.no-due > .dash-bills { display: flex !important; }
    }
    @container dash (max-height: 250px) {
        .dash-grid.no-due { grid-template-rows: minmax(0, 1fr); grid-template-areas: "agenda"; }
        .dash-grid.no-due > .dash-bills { display: none !important; }
    }
}
@container dash (max-height: 200px) { .dash-grid { display: none; } }

/* The agenda (Bruno, 2026-10-30): one block per day with something on, the day's tile on the left (today's filled) and
   its events beside it, each with its calendar's mark; a ShootPlanner booking opens there. */
.dash-head-btn { margin-left: auto; display: grid; place-items: center; width: 28px; height: 28px; margin-block: -4px; padding: 0; border: 0;
    border-radius: 50%; background: none; color: var(--mud-palette-primary); cursor: pointer; }
.dash-head-btn:hover { background: var(--mud-palette-action-default-hover); }
.dash-card .dash-agenda-rows { flex: 1 1 auto; min-height: 0; max-height: none; }
/* Próximas despesas: every bill to the month's end, scrolling inside the card (Bruno, 2026-11-01 23:38). */
.dash-bill-rows > .dash-bill { flex: none; }
.dash-bill-rows > .dash-bill + .dash-bill { border-top: .5px solid var(--wp-row-line); }
.dash-agenda-day { flex: none; display: flex; align-items: flex-start; gap: 12px; padding: 8px 14px; }
.dash-agenda-day + .dash-agenda-day { border-top: .5px solid var(--wp-row-line); }
.dash-agenda-day > .dash-day { margin-top: 2px; }
/* Room above the letters too, or the hidden overflow cuts the tilde of AMANHÃ. */
.dash-agenda-day > .dash-day small { font-size: .56rem; line-height: 1.35; max-width: 100%; padding-inline: 5px; box-sizing: border-box; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-agenda-day.today > .dash-day { background: var(--mud-palette-primary); color: var(--mud-palette-primary-text); }
.dash-agenda-events { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dash-event { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 0; box-sizing: border-box; color: inherit; text-decoration: none; }
.dash-event + .dash-event { border-top: .5px dashed var(--wp-row-line); }
a.dash-event:not(.link) { cursor: default; }
a.dash-event.link:hover { text-decoration: none; }
a.dash-event.link:hover .suggest-name { text-decoration: underline; }
.dash-event-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dash-event-text .suggest-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.dash-event-text .suggest-when { font-size: .78rem; color: var(--mud-palette-text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-event-src { flex: none; color: var(--mud-palette-text-secondary); opacity: .7; }
/* An event of today whose time has passed, in grey, its icon too (Bruno, 2026-11-02 16:02 and 16:13).
   Solid neutral greys rather than opacity: with opacity the coloured background showed through
   and left the icon brownish or bluish instead of grey. */
.dash-event.over { --over-text: #A8A8A8; --over-soft: #BDBDBD; }
html:is(.wp-dark, .wp-neon) .dash-event.over { --over-text: #7E7E7E; --over-soft: #686868; }
.dash-event.over .suggest-name { color: var(--over-text); }
.dash-event.over :is(.suggest-when, .dash-event-src) { color: var(--over-soft); }
.dash-event.over .dash-event-src { opacity: 1; filter: grayscale(1); }
.dash-agenda-empty { flex-direction: column; }

/* Perfil > Calendários and the window that links them (as in the ShootPlanner). */
.cal-links { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.cal-link-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--mud-palette-lines-default); border-radius: var(--wp-radius); }
.cal-link-row.has-error { border-color: color-mix(in srgb, var(--mud-palette-error) 60%, transparent); }
.cal-link-icon { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; color: var(--mud-palette-primary);
    background: color-mix(in srgb, var(--mud-palette-primary) 12%, transparent); }
.cal-link-icon .mud-icon-root { width: 20px; height: 20px; }
.cal-link-main { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.cal-link-main small { font-size: .78rem; }
.cal-link-add-title { font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; margin-bottom: 8px; }
.cal-link-sources { width: 100%; margin-bottom: 10px; }
.cal-link-sources .mud-toggle-item { flex: 1 1 0; }
.cal-view-item { display: inline-flex; align-items: center; gap: 6px; }
.cal-link-steps { margin: 0 0 12px; padding-left: 20px; font-size: .88rem; line-height: 1.45; }
.cal-link-steps li + li { margin-top: 4px; }
.cal-link-secret { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: .78rem; color: var(--mud-palette-text-secondary); }
.cal-link-secret .mud-icon-root { width: 16px; height: 16px; }
/* Linking by signing in (Bruno, 2026-10-31): one big button, and the address way as a quiet second choice. */
.cal-link-signin-hint { margin: 0 0 12px; font-size: .88rem; line-height: 1.45; }
.cal-link-signin.mud-button-root { min-height: 48px; text-transform: none; font-weight: 700; }
.cal-link-other.mud-button-root { margin-top: 10px; text-transform: none; }
.cal-shoot { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 14px; font-size: .85rem; color: var(--mud-palette-text-secondary); }
.cal-shoot .mud-icon-root { flex: none; margin-top: 1px; }
@media (max-width: 599.98px) { .cal-link-sources .cal-view-item > span { display: none; } }

/* ==========================================================================
   Ecrã inteiro (Bruno, 2026-10-28): the Dashboard alone on a tablet on the fridge. app.js (wp.kiosk) puts "kiosk" on
   html: no app bar, side menu or bottom bar, the page from edge to edge; "kiosk-dimmed" lays the dark layer over it
   and "kiosk-cam" says the camera is watching for movement. Nothing on the screen shows it (no camera mark, no red
   dot): the camera records nothing, and those confused people (Bruno, 2026-10-31).
   ========================================================================== */
.round-add.dash-add.kiosk-btn { background: color-mix(in srgb, var(--mud-palette-text-primary) 12%, transparent); color: var(--mud-palette-text-primary); }
/* The full-screen marks are drawn smaller inside their box than the other buttons' (14px of 24 against about 19): drawn
   bigger, they look the same size (Bruno, 2026-10-31). */
.round-add.dash-add[data-kiosk-toggle] .mud-icon-root { width: 32px; height: 32px; }
/* Atualizar (Bruno, 2026-11-08): the bank read's button beside Ecrã inteiro; its arrow turns while the bank is read. */
.round-add.dash-add.bank-read[disabled] { opacity: 1; cursor: progress; }
.round-add.dash-add.bank-read.reading .mud-icon-root { animation: wp-bank-spin 1s linear infinite; }
@keyframes wp-bank-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .round-add.dash-add.bank-read.reading .mud-icon-root { animation: none; opacity: .5; } }
.kiosk-only { display: none !important; }
html.kiosk .kiosk-only { display: grid !important; }
html.kiosk .kiosk-off { display: none !important; }
/* Dimming and the camera are for a phone or tablet (Bruno, 2026-10-28): a computer gets no options to set. */
html.kiosk:not(.is-handheld) .kiosk-options { display: none !important; }
html.kiosk { --wp-main-top: var(--wp-safe-top); }
html.kiosk :is(.app-bar, .app-drawer, .bottom-nav) { display: none !important; }
html.kiosk .mud-layout .mud-main-content.app-main { margin-left: 0 !important; margin-right: 0 !important; }
html.kiosk .app-container:has(.dash-page) { padding: 16px max(16px, env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)) !important; }
html.kiosk .fill-page.dash-page { height: calc(100dvh - var(--wp-main-top) - 32px - env(safe-area-inset-bottom)); }
/* Darkened, not off: the screen's real brightness is out of a web page's reach. A touch on it only wakes the screen. */
.kiosk-dim { position: fixed; inset: 0; z-index: 3000; background: #000; opacity: 0; pointer-events: none; transition: opacity .3s ease; }
html.kiosk-dimmed .kiosk-dim { opacity: .92; pointer-events: auto; transition-duration: 2s; }
/* The camera's picture is only read, never shown; Safari only plays it on the page, so it sits there, unseen. */
.kiosk-video { position: fixed; left: 0; bottom: 0; width: 4px; height: 3px; opacity: .01; pointer-events: none; z-index: 1; }
/* The options' camera check: the tiny picture the camera is compared by (mirrored, as in a selfie), and a bar of how
   much of it is moving, which wakes the screen once it passes the line. */
.kiosk-check { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: var(--wp-radius); background: color-mix(in srgb, var(--mud-palette-text-primary) 6%, transparent); }
.kiosk-check canvas { flex: none; width: 120px; height: 90px; border-radius: 8px; background: #000; image-rendering: pixelated; transform: scaleX(-1); }
.kiosk-check-side { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; font-size: .8rem; }
.kiosk-check-side > span { display: none; color: var(--mud-palette-text-secondary); }
.kiosk-check[data-state="on"] [data-for="on"], .kiosk-check[data-state="starting"] [data-for="starting"], .kiosk-check[data-state="dark"] [data-for="dark"],
.kiosk-check[data-state="paused"] [data-for="paused"], .kiosk-check[data-state="frozen"] [data-for="frozen"], .kiosk-check[data-state="denied"] [data-for="denied"],
.kiosk-check[data-state="error"] [data-for="error"], .kiosk-check[data-state="off"] [data-for="off"] { display: block; }
.kiosk-check:is([data-state="paused"], [data-state="frozen"], [data-state="denied"], [data-state="error"], [data-state="dark"]) .kiosk-check-side > span { color: var(--mud-palette-warning); }
.kiosk-meter { position: relative; height: 10px; border-radius: 5px; background: color-mix(in srgb, var(--mud-palette-text-primary) 12%, transparent); overflow: hidden; }
.kiosk-meter-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--mud-palette-warning); transition: width .2s; }
.kiosk-meter-bar.over { background: var(--mud-palette-success); }
.kiosk-meter-mark { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 2px; background: var(--mud-palette-text-primary); }

/* ==========================================================================
   Poupanças (Bruno, 2026-10-29): the totals on top, one row per saving with its goal's bar, and on a saving its
   credits (green, going up) and debits (red, going down) by month.
   ========================================================================== */
.savings-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 599.98px) { .fill-page > .stats-row.savings-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }
.saving-meter { display: block; }
.mini-stat .saving-meter { margin-top: 6px; }
.saving-row { gap: 12px; padding: 10px 12px; color: inherit; text-decoration: none; }
.saving-row:hover { text-decoration: none; }
.saving-row .saving-meter { display: block; margin-top: 6px; max-width: 320px; }
.saving-meter > span { background: var(--mud-palette-success); }
.finance-icon.out { background: color-mix(in srgb, var(--mud-palette-error) 14%, transparent); color: var(--mud-palette-error); }
button.list-row.saving-move { width: 100%; border: 0; border-bottom: .5px solid var(--wp-row-line); background-color: transparent; font: inherit; color: inherit; text-align: left; cursor: pointer; }

/* The saldo autorizado, part of it money the bank lends (Bruno, 2026-11-01 22:46), in a true yellow of its own, not the
   orange of Pagar (22:59: "a cor do saldo autorizado não pode ser laranja mas amarelo para não ficar igual à cor do
   cartão pagar"); a deeper one on the light theme so it stays readable on white. */
:root { --saldo-lent: #B89A00; }
html.wp-dark { --saldo-lent: #F5D93A; }
html.wp-neon { --saldo-lent: #FFEE58; }
.mini-stat.lent b, .dash-stat.lent .dash-stat-link b { color: var(--saldo-lent); }
.finance-stats .mini-stat.lent { --stat: var(--saldo-lent); }
.dash-stat.lent > .mud-icon-root { background: color-mix(in srgb, var(--saldo-lent) 16%, transparent); color: var(--saldo-lent); }
.dash-stat .dash-stat-note.lent { --note: var(--saldo-lent); }

/* The day tiles in Próximos 10 dias and Próximas despesas: yellow on the dark themes, where an accent colour such as a
   dark blue was hard to read on the navy (Bruno, 2026-11-01 23:53: "a cor do texto dos dias nestas listas é pouco
   vísivel, talvez amarelo seja mais visível"); today's tile filled with it. Overdue bills stay red. The light theme
   keeps the accent colour, as yellow would not read on white. */
html.wp-dark { --wp-day: #F2D04B; }
html.wp-neon { --wp-day: #FFE066; }
html.wp-dark .dash-day { background: color-mix(in srgb, var(--wp-day) 14%, transparent); color: var(--wp-day); }
html.wp-dark .dash-agenda-day.today > .dash-day { background: var(--wp-day); color: #1C1700; }
/* Today's tile in grey once every event of today is over, like the events themselves (Bruno, 2026-11-02 16:45:
   "é o quadrado da data"). */
.dash-agenda-day.today.over > .dash-day { background: #B5B5B5; color: #FFFFFF; }
html.wp-dark .dash-agenda-day.today.over > .dash-day { background: #7E7E7E; color: #1C1C1C; }
:root { --wp-late-tile: #C0564B; }
html.wp-dark { --wp-late-tile: #B9473D; }
html.wp-neon { --wp-late-tile: #D81B47; }
html.wp-neon .dash-bill.late .dash-day { box-shadow: 0 0 10px color-mix(in srgb, var(--wp-late-tile) 60%, transparent); }
/* Saúde financeira in two columns (Bruno, 2026-11-02 00:21: "corrente à esquerda, prevista à direita com uma linha a
   separar"): today's health and the month's end, each with its face, its share in its colour and its amount under it. */
.dash-health-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-width: 0; }
.dash-health-col { display: flex; flex-direction: column; min-width: 0; padding-right: 10px; }
.dash-health-col + .dash-health-col { padding: 0 0 0 10px; border-left: 1px solid color-mix(in srgb, var(--mud-palette-text-primary) 22%, transparent); }
/* No column names, and the title centred over both (Bruno, 2026-11-02 00:40). */
.dash-health .dash-stat-link { align-items: center; text-align: center; }
.dash-stat .dash-health-col > b { display: flex; align-items: center; gap: 4px; }
.dash-health-col .dash-health-face { flex: none; width: 1.05em; height: 1.05em; }
.dash-health-col.pos > b { color: var(--mud-palette-success); }
.dash-health-col.due > b { color: var(--mud-palette-warning); }
.dash-health-col.neg > b { color: var(--mud-palette-error); }
.dash-stat .dash-health-col .dash-stat-note b { font-size: .95rem; font-weight: 650; }
/* In a narrow card (five cards on a tablet) the share and the amount shrink to fit their column rather than be cut. */
.dash-health-col { container-type: inline-size; }
.dash-stat .dash-health-col > b { font-size: min(1.3rem, calc((100cqi - 4px) / 3.4)); }
.dash-stat .dash-health-col .dash-stat-note b { font-size: min(.95rem, calc(100cqi / 4.9)); }
@media (max-width: 599.98px) { .dash-stat .dash-health-col > b { font-size: min(1.02rem, calc((100cqi - 4px) / 3.4)); } }
/* The same two columns on Contas correntes: the faces go beside the shares instead of in the corner. */
.health-two .health-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-width: 0; }
.health-two .health-col { --stat: var(--mud-palette-text-primary); display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-right: 8px; container-type: inline-size; }
.health-two .health-col + .health-col { padding: 0 0 0 8px; border-left: 1px solid color-mix(in srgb, var(--mud-palette-text-primary) 22%, transparent); }
.health-two .health-col.pos { --stat: var(--mud-palette-success); }
.health-two .health-col.neg { --stat: var(--mud-palette-error); }
.health-two .health-col.due { --stat: var(--mud-palette-warning); }
.finance-stats .health-two > span { text-align: center; }
.stats-row.finance-stats .health-two .health-col > b { display: flex; align-items: center; gap: 4px; font-size: min(1.5rem, 20cqi); color: var(--stat); }
.health-two .health-col-face { flex: none; width: 1em; height: 1em; }

/* Depositar (Bruno, 2026-11-02 09:39): the green round button at the end of an income received in cash puts it into the
   bank, so it no longer counts on top of the bank's saldo; grey once deposited, where it takes that back. */
button.finance-deposit { border: 0; padding: 0; margin: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button.finance-deposit .mud-icon-root { width: 22px; height: 22px; }
@media (hover: hover) { button.finance-deposit:hover { filter: brightness(1.1); } }
button.finance-deposit:active { transform: scale(.92); }
button.finance-deposit:focus-visible { outline: 2px solid var(--mud-palette-primary); outline-offset: 2px; }
html button.finance-deposit.done { background: color-mix(in srgb, var(--mud-palette-text-secondary) 18%, transparent);
    color: var(--mud-palette-text-secondary); box-shadow: none; }

/* Débito direto (Bruno, 2026-11-02 09:44) is a badge with its toggle (10:09: "deve ser um badge com toggle"): a tap
   anywhere on it turns it on or off; green while on, a plain outline while off. The app's badge size, text and icon. */
.mud-input-control.finance-debit-badge { display: inline-flex; width: auto; max-width: 100%; margin: 0; }
.finance-debit-badge .mud-input-control-input-container { width: auto; }
.finance-debit-badge label.mud-switch { display: inline-flex; align-items: center; gap: 2px; box-sizing: border-box; height: var(--wp-badge-h);
    margin: 0; padding: 0 0 0 12px; border: 1px solid color-mix(in srgb, var(--mud-palette-text-primary) 22%, transparent);
    border-radius: var(--wp-radius); color: var(--mud-palette-text-secondary); cursor: pointer; -webkit-tap-highlight-color: transparent;
    transition: background-color .15s, border-color .15s, color .15s; }
.finance-debit-badge label.mud-switch > .mud-typography { display: inline-flex; align-items: center; gap: 8px; margin: 0;
    font-size: var(--wp-badge-font); font-weight: 600; line-height: 1.2; white-space: nowrap; color: inherit; }
.finance-debit-badge label.mud-switch > .mud-typography .mud-icon-root { width: var(--wp-badge-icon); height: var(--wp-badge-icon); flex: none; }
.finance-debit-badge .mud-switch-span { margin: 0; }
@media (hover: hover) { .finance-debit-badge:not(.on) label.mud-switch:hover { background: var(--wp-row-hover); } }
.finance-debit-badge.on label.mud-switch { background: color-mix(in srgb, var(--mud-palette-success) 14%, transparent);
    border-color: color-mix(in srgb, var(--mud-palette-success) 60%, transparent); color: var(--mud-palette-success); }
.finance-debit-badge label.mud-switch:has(input:focus-visible) { outline: 2px solid var(--mud-palette-primary); outline-offset: 2px; }
.finance-debit-hint { margin: 6px 0 0 2px; }
/* Débito direto and Valor variável side by side, one under the other when there is no room (Bruno, 2026-11-02 10:58). */
.finance-badges { display: flex; flex-wrap: wrap; gap: 8px; }

/* Pagar's ring (Bruno, 2026-11-02 11:36): how much of the period's bills is paid, green on a faint track, the share
   inside. --paid is registered so a new share turns the ring smoothly, at the pace of the counting figures. */
@property --paid { syntax: "<percentage>"; inherits: true; initial-value: 0%; }
.paid-ring { --ring: var(--mud-palette-success); position: relative; flex: none; display: grid; place-items: center;
    width: 48px; height: 48px; border-radius: 50%; transition: --paid 1.2s cubic-bezier(.25, 1, .5, 1); }
.paid-ring::before { content: ""; position: absolute; inset: 0; border-radius: 50%;
    background: conic-gradient(var(--ring) var(--paid), color-mix(in srgb, var(--mud-palette-text-primary) 14%, transparent) 0);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px)); }
/* Red below half paid, yellow from half, green only when all is paid (Bruno, 12:29); the share inside takes the colour. */
.paid-ring.low { --ring: var(--mud-palette-error); }
.paid-ring.half { --ring: var(--mud-palette-warning); }
.paid-ring.full { --ring: var(--mud-palette-success); }
/* Above the Dashboard cards' own span rule (.dash-stat > span), which would stretch it. */
:is(.dash-stat, .mini-stat) > .paid-ring { flex: none; display: grid; }
.paid-ring .paid-ring-pct, .paid-ring .paid-ring-pct .count-up { position: relative; font-size: .72rem; font-weight: 700; line-height: 1;
    letter-spacing: -.01em; text-transform: none; font-variant-numeric: tabular-nums; color: var(--ring); white-space: nowrap; }
html.wp-neon .paid-ring::before { filter: drop-shadow(0 0 3px color-mix(in srgb, var(--ring) 55%, transparent)); }
@media (prefers-reduced-motion: reduce) { .paid-ring { transition: none; } }
/* On Contas correntes, at the card's lower right, as Saúde financeira's face was. */
.finance-stats .pay-stat { position: relative; }
.finance-stats .pay-stat .paid-ring { position: absolute; right: 12px; bottom: 12px; }
@media (max-width: 599.98px) {
    .fill-page > .stats-row .pay-stat .paid-ring { right: 8px; bottom: 8px; width: 40px; height: 40px; }
    .fill-page > .stats-row .pay-stat .paid-ring .paid-ring-pct, .fill-page > .stats-row .pay-stat .paid-ring .count-up { font-size: .62rem; }
}
/* On the Dashboard, on the right of Pagar, with the card's own icon kept on the left (Bruno, 2026-11-02 12:07). A little
   smaller there, and in a narrow card the figure shrinks to fit rather than be cut: its size follows the room left
   between the icon and the ring. */
.dash-pay-stat > .paid-ring { width: 40px; height: 40px; }
.dash-pay-stat > .paid-ring .paid-ring-pct, .dash-pay-stat > .paid-ring .paid-ring-pct .count-up { font-size: .62rem; }
.dash-pay-stat > span { container-type: inline-size; }
.dash-pay-stat .dash-stat-link b { font-size: min(1.3rem, 21cqi); }
@media (max-width: 599.98px) {
    .dash-pay-stat > .paid-ring { width: 36px; height: 36px; }
    .dash-pay-stat > .paid-ring .paid-ring-pct, .dash-pay-stat > .paid-ring .paid-ring-pct .count-up { font-size: .56rem; }
    .dash-pay-stat .dash-stat-link b { font-size: min(1.02rem, 21cqi); }
}

/* A card that shows an alert (Bruno, 2026-11-02 11:41 and 11:53: "qualquer cartão que apresente informação de alerta deve
   ter uma animação de pulsar no neon e o icon deve animar também"): a red glow that fades in and out smoothly, with no
   jumps (11:54: "suave ... um fade sem saltos"), stronger in Néon; its icon breathes with it. The two ends of each fade
   have the same shadows, so the browser can blend them (a mismatch makes it jump). Saldos below zero, Pagar with a bill
   overdue, Saldo final below zero, Saúde financeira in the red (its red face trembles "sob pressão") and Próximas
   despesas with an overdue bill. Still red, without the movement, for reduced motion. */
@keyframes alert-glow {
    from { box-shadow: 0 0 0 1px color-mix(in srgb, var(--mud-palette-error) 30%, transparent), 0 0 6px 0 color-mix(in srgb, var(--mud-palette-error) 8%, transparent), inset 0 0 12px color-mix(in srgb, var(--mud-palette-error) 0%, transparent); }
    to { box-shadow: 0 0 0 1px color-mix(in srgb, var(--mud-palette-error) 85%, transparent), 0 0 24px 3px color-mix(in srgb, var(--mud-palette-error) 45%, transparent), inset 0 0 22px color-mix(in srgb, var(--mud-palette-error) 14%, transparent); }
}
@keyframes alert-glow-neon {
    from { box-shadow: 0 0 0 1px color-mix(in srgb, var(--mud-palette-error) 35%, transparent), 0 0 12px 0 color-mix(in srgb, var(--mud-palette-error) 22%, transparent), inset 0 0 14px color-mix(in srgb, var(--mud-palette-error) 5%, transparent); }
    to { box-shadow: 0 0 0 1px var(--mud-palette-error), 0 0 32px 5px color-mix(in srgb, var(--mud-palette-error) 75%, transparent), inset 0 0 30px color-mix(in srgb, var(--mud-palette-error) 26%, transparent); }
}
@keyframes alert-icon {
    from { transform: scale(1); box-shadow: 0 0 0 0 color-mix(in srgb, var(--mud-palette-error) 0%, transparent); }
    to { transform: scale(1.08); box-shadow: 0 0 14px 2px color-mix(in srgb, var(--mud-palette-error) 55%, transparent); }
}
@keyframes alert-ring {
    from { transform: scale(1); filter: drop-shadow(0 0 0 color-mix(in srgb, var(--mud-palette-error) 0%, transparent)); }
    to { transform: scale(1.06); filter: drop-shadow(0 0 8px color-mix(in srgb, var(--mud-palette-error) 65%, transparent)); }
}
/* Under pressure: a short tremble, then still, again and again. */
@keyframes alert-tremble {
    0%, 36%, 100% { transform: none; }
    4% { transform: translate(-1px, 0) rotate(-3deg); }
    8% { transform: translate(1px, -.5px) rotate(3deg); }
    12% { transform: translate(-1px, .5px) rotate(-2deg); }
    16% { transform: translate(1px, 0) rotate(2deg); }
    20% { transform: translate(-.5px, -.5px) rotate(-1deg); }
    24% { transform: translate(.5px, .5px) rotate(1deg); }
    28% { transform: translate(-.5px, 0); }
}
.card.alert { animation: alert-glow 1.8s ease-in-out infinite alternate; }
html.wp-neon .card.alert { border-color: color-mix(in srgb, var(--mud-palette-error) 70%, transparent) !important; animation-name: alert-glow-neon; }
.dash-stat.alert > .mud-icon-root { background: color-mix(in srgb, var(--mud-palette-error) 16%, transparent); color: var(--mud-palette-error);
    animation: alert-icon 1.8s ease-in-out infinite alternate; }
.card.alert .paid-ring { animation: alert-ring 1.8s ease-in-out infinite alternate; }
.card.alert > .dash-head > .mud-icon-root:first-child { color: var(--mud-palette-error) !important; border-radius: 50%; animation: alert-icon 1.8s ease-in-out infinite alternate; }
.card.alert .neg :is(.dash-health-face, .health-col-face) { animation: alert-tremble 1.6s linear infinite; }
html.wp-neon .card.alert :is(.dash-stat > .mud-icon-root, .neg .dash-health-face, .neg .health-col-face) { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--mud-palette-error) 70%, transparent)); }
@media (prefers-reduced-motion: reduce) {
    .card.alert, .card.alert :is(.mud-icon-root, .paid-ring, .dash-health-face, .health-col-face) { animation: none !important; }
    .card.alert { box-shadow: 0 0 0 1px color-mix(in srgb, var(--mud-palette-error) 70%, transparent); }
}


/* Despesas (Bruno, 2026-11-04): from and to, then the search; on phones the two days share a row and the search goes
   under them. */
.toolbar.expenses-tools > .expenses-day { flex: 0 0 170px; }
@media (max-width: 599.98px) {
    .toolbar.expenses-tools { flex-wrap: wrap; }
    .toolbar.expenses-tools > .expenses-day { flex: 1 1 0; min-width: 0; }
    .toolbar.expenses-tools > .toolbar-search { flex: 1 1 100%; }
}
.expense-row .list-row-title { white-space: normal; overflow-wrap: anywhere; }
/* Despesas: what the bank hasn't booked yet, greyed and tagged, outside the totals (Bruno, 2026-11-04 14:58). */
.expense-pending { opacity: .62; }
.expense-pending .finance-icon { background: color-mix(in srgb, var(--mud-palette-text-primary) 10%, transparent); color: var(--mud-palette-text-secondary); }
.expense-pending .amount { color: var(--mud-palette-text-secondary); }
.pending-tag { display: inline-block; padding: 0 6px; margin-right: 4px; border-radius: 6px; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
    border: 1px solid currentColor; line-height: 1.5; }
/* Despesas · Estatísticas (Bruno, 2026-11-04 15:59): a bar under each name, the largest full width. */
.stats-row-bar .list-row-main { gap: 4px; }
.stats-meter { display: block; width: 100%; height: 8px; border-radius: 4px; }
.stats-meter > span { border-radius: 4px; background: var(--mud-palette-error); }
button.list-row.stats-place { width: 100%; border: 0; border-bottom: .5px solid var(--wp-row-line); background-color: transparent; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.expenses-view { width: max-content; }
/* Despesas' list: the card is what scrolls, so held titles stay inside its rounded corners (Bruno, 2026-11-04 19:53). */
.fill-page > .expenses-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding-bottom: 16px; }
.expenses-body > .card.fill-scroll.expenses-card { flex: 0 1 auto; min-height: 0; overflow-y: auto; padding-bottom: 0; margin-inline: 0;
    border-top: 1px solid var(--mud-palette-lines-default); --wp-stick: 0px; }

/* ---------- A list's picture (Bruno, 2026-11-13) ----------
   Wherever a list is picked or named: the top bar's list menu, Compras before its box, the Dashboard's subtitle and
   Listas, where a tap on it picks a new one. The basket in the accent colour when the list has none. */
.list-photo { flex: none; display: block; object-fit: cover; border-radius: 50%; width: 28px; height: 28px; }
.list-photo.empty { display: grid; place-items: center; background: color-mix(in srgb, var(--mud-palette-primary) 14%, transparent); color: var(--mud-palette-primary); }
.list-photo.empty .mud-icon-root { width: 62%; height: 62%; }
.list-photo-xxs { width: 18px; height: 18px; }
.list-photo-xs { width: 24px; height: 24px; margin-right: 6px; }
.list-photo-sm { width: 30px; height: 30px; }
.list-photo-md { width: 40px; height: 40px; border-radius: var(--wp-radius); }
.list-switch-btn { padding-left: 6px; }
.list-switch-btn .list-photo.empty .mud-icon-root { width: 62%; height: 62%; }
.lang-menu-item .ellipsis { min-width: 0; }
.lang-menu-item.active .list-photo:not(.empty) { box-shadow: 0 0 0 2px var(--wp-gold); }
.sub-list { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; }
.quick-add > .quick-add-photo { flex: none; display: block; border-radius: var(--wp-radius); margin-top: 0; }
.quick-add > .quick-add-photo:focus-visible { outline: 2px solid var(--mud-palette-primary); outline-offset: 2px; }
.list-photo.household-photo { width: 56px; height: 56px; border-radius: var(--wp-radius); }
.household-photo-pick { position: relative; flex: none; cursor: pointer; border-radius: var(--wp-radius); }
.household-photo-pick .photo-badge { position: absolute; right: -5px; bottom: -5px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
    background: var(--mud-palette-success); color: #fff; box-shadow: 0 0 0 2px var(--mud-palette-surface); pointer-events: none; }
.household-photo-pick .photo-badge .mud-icon-root { width: 13px; height: 13px; }
.household-photo-pick:focus-within { outline: 2px solid var(--mud-palette-primary); outline-offset: 2px; }

/* Framing a new picture: a square that is dragged and zoomed (gl.crop in app.js). */
.crop-frame { position: relative; width: min(100%, 320px); aspect-ratio: 1; margin: 4px auto 12px; overflow: hidden; border-radius: var(--wp-radius);
    background: color-mix(in srgb, var(--mud-palette-text-primary) 8%, transparent); touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.crop-frame:active { cursor: grabbing; }
.crop-frame img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; opacity: 0; transition: opacity .15s; pointer-events: none; }
.crop-frame.ready img { opacity: 1; }
.crop-frame::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mud-palette-text-primary) 22%, transparent); }
.crop-zoom { display: flex; align-items: center; gap: 10px; width: min(100%, 320px); margin: 0 auto 8px; color: var(--mud-palette-text-secondary); }
.crop-zoom input { flex: 1 1 auto; accent-color: var(--mud-palette-primary); }
/* On a phone the top bar already shows the open list's picture when there are several: the box keeps its width. */
@media (max-width: 599.98px) { body:has(.list-switch) .quick-add > .quick-add-photo { display: none; } }
