:root {
  color-scheme: dark;
  --bg: #050b14;
  --bg-2: #081323;
  --panel: rgba(13, 25, 43, .92);
  --panel-2: rgba(17, 31, 52, .88);
  --line: rgba(145, 167, 205, .18);
  --text: #f7f9ff;
  --muted: #9eacc2;
  --blue: #3285ff;
  --blue-2: #0d55da;
  --green: #32d06d;
  --red: #ff5d5d;
  --purple: #a55cff;
  --gold: #ffbd37;
  --orange: #ff8f1f;
  --shadow: 0 18px 45px rgba(0, 0, 0, .28);
  --radius: 22px;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 50% -20%, #17325a 0, #081322 36%, var(--bg) 70%); color: var(--text); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(50,133,255,.55); outline-offset: 2px; }
.app-shell { width: min(100%, 760px); min-height: 100vh; margin: 0 auto; padding: 28px 22px calc(170px + env(safe-area-inset-bottom)); position: relative; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.brand-row { display: flex; align-items: center; min-width: 0; gap: 16px; }
.logo { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font-size: 36px; color: var(--gold); border: 1px solid rgba(255,189,55,.45); background: radial-gradient(circle at 30% 30%, rgba(255,189,55,.18), rgba(255,189,55,.05)); box-shadow: inset 0 0 20px rgba(255,189,55,.08); }
.brand-copy h1 { margin: 0; font-size: clamp(30px, 7vw, 42px); letter-spacing: -.04em; }
.brand-copy p { margin: 3px 0 0; color: #c3cce0; font-size: 18px; }
.top-actions { display: flex; gap: 10px; }
.icon-button { width: 50px; height: 50px; border: 1px solid var(--line); border-radius: 17px; background: rgba(14,26,45,.75); display: grid; place-items: center; cursor: pointer; position: relative; }
.icon { width: 23px; height: 23px; position: relative; display: block; }
.icon-eye::before { content: ""; position: absolute; inset: 4px 1px; border: 2px solid currentColor; border-radius: 50% 0 50% 0; transform: rotate(45deg); }
.icon-eye::after { content: ""; position: absolute; width: 7px; height: 7px; border-radius: 50%; background: currentColor; left: 8px; top: 8px; }
.privacy-on .icon-eye::after { width: 28px; height: 2px; border-radius: 2px; left: -2px; top: 11px; transform: rotate(-45deg); background: currentColor; }
.icon-bell::before { content:""; position:absolute; left:5px; top:2px; width:13px; height:15px; border:2px solid currentColor; border-radius:9px 9px 5px 5px; }
.icon-bell::after { content:""; position:absolute; left:9px; top:19px; width:6px; height:2px; border-radius:2px; background:currentColor; }
.icon-settings::before { content:"⚙"; font-size: 25px; line-height: 1; position:absolute; inset:-1px; }
.notify-dot { position:absolute; right:7px; top:6px; width:10px; height:10px; border-radius:50%; background:var(--red); box-shadow:0 0 0 3px rgba(255,93,93,.14); }
.section-heading { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:16px; }
.compact-heading { margin-bottom: 12px; }
.heading-with-icon { display:flex; align-items:center; gap:10px; }
h2 { font-size: 22px; margin: 0; letter-spacing: -.02em; }
.eyebrow { color:var(--muted); font-size:13px; letter-spacing:.06em; text-transform:uppercase; }
.text-button { border:0; background:transparent; color:#65a7ff; padding:8px; cursor:pointer; }
.summary-grid { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:14px; }
.summary-card { min-height: 210px; border:1px solid var(--line); border-radius:24px; padding:18px; display:flex; flex-direction:column; overflow:hidden; position:relative; box-shadow:var(--shadow); }
.summary-card::after { content:""; position:absolute; inset:auto -12% -42% -12%; height:75%; filter:blur(10px); opacity:.18; }
.summary-card.green { background:linear-gradient(160deg, rgba(13,73,46,.95), rgba(7,27,23,.95)); border-color:rgba(50,208,109,.38); }
.summary-card.green::after { background:var(--green); }
.summary-card.red { background:linear-gradient(160deg, rgba(86,28,39,.96), rgba(31,13,22,.96)); border-color:rgba(255,93,93,.38); }
.summary-card.red::after { background:var(--red); }
.summary-card.blue { background:linear-gradient(160deg, rgba(14,61,124,.95), rgba(8,24,55,.98)); border-color:rgba(50,133,255,.42); }
.summary-card.blue::after { background:var(--blue); }
.summary-card.purple { background:linear-gradient(160deg, rgba(76,36,112,.95), rgba(29,14,52,.98)); border-color:rgba(165,92,255,.4); }
.summary-card.purple::after { background:var(--purple); }
.summary-card.gold { background:linear-gradient(160deg, rgba(104,67,10,.95), rgba(42,28,8,.98)); border-color:rgba(255,189,55,.4); }
.summary-card.gold::after { background:var(--gold); }
.summary-card .summary-top { display:flex; align-items:center; justify-content:space-between; gap:10px; color:inherit; }
.summary-card .summary-title { font-size:18px; font-weight:650; }
.summary-card .summary-icon { width:38px; height:38px; border-radius:50%; display:grid; place-items:center; background:rgba(255,255,255,.09); font-size:21px; }
.summary-card .summary-value { font-size:clamp(27px,5vw,38px); font-weight:760; letter-spacing:-.04em; margin-top:25px; position:relative; z-index:1; white-space:nowrap; }
.summary-card .summary-sub { margin-top:auto; color:#b8c2d7; font-size:14px; position:relative; z-index:1; }
.sparkline { width:100%; height:50px; margin-top:14px; opacity:.95; position:relative; z-index:1; }
.sparkline polyline { fill:none; stroke:currentColor; stroke-width:3; stroke-linecap:round; stroke-linejoin:round; }
.pager-dots { display:flex; justify-content:center; gap:8px; padding:12px 0 4px; }
.pager-dots i { width:8px; height:8px; border-radius:50%; background:#56647a; }
.pager-dots i.active { width:22px; border-radius:5px; background:var(--blue); }
.panel { background:linear-gradient(180deg, rgba(14,28,48,.95), rgba(10,20,35,.96)); border:1px solid var(--line); border-radius:var(--radius); padding:18px; box-shadow:var(--shadow); }
.favorites-panel { margin-top: 16px; }
.small-icon { width:26px; height:26px; position:relative; display:inline-block; }
.icon-wallet::before { content:""; position:absolute; inset:5px 2px 3px; border:2px solid currentColor; border-radius:5px; }
.icon-wallet::after { content:""; position:absolute; right:0; top:10px; width:8px; height:7px; border:2px solid currentColor; border-radius:3px; background:var(--panel); }
.icon-clock::before { content:""; position:absolute; inset:2px; border:2px solid currentColor; border-radius:50%; }
.icon-clock::after { content:""; position:absolute; width:2px; height:8px; background:currentColor; left:12px; top:6px; box-shadow:3px 6px 0 -0.5px currentColor; transform-origin:bottom; }
.favorite-grid { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap:12px; }
.favorite-card { border:1px solid var(--line); border-radius:19px; min-height:170px; padding:15px; text-align:left; background:linear-gradient(160deg, rgba(24,60,110,.9), rgba(12,27,51,.95)); display:flex; flex-direction:column; cursor:pointer; position:relative; }
.favorite-card.green { background:linear-gradient(160deg, rgba(19,92,60,.88), rgba(9,39,29,.95)); border-color:rgba(50,208,109,.4); }
.favorite-card.purple { background:linear-gradient(160deg, rgba(82,43,126,.9), rgba(32,19,61,.96)); border-color:rgba(165,92,255,.4); }
.favorite-card.gold { background:linear-gradient(160deg, rgba(104,67,10,.9), rgba(42,28,8,.96)); border-color:rgba(255,189,55,.38); }
.favorite-card.add { align-items:center; justify-content:center; color:var(--muted); text-align:center; background:rgba(255,255,255,.025); }
.account-dot { width:42px; height:42px; border-radius:50%; display:grid; place-items:center; background:rgba(255,255,255,.12); font-size:21px; margin-bottom:15px; }
.favorite-card strong { font-size:17px; }
.favorite-card small { color:#c0cada; margin-top:5px; line-height:1.3; }
.favorite-card b { font-size:24px; margin-top:auto; letter-spacing:-.03em; }
.star { position:absolute; top:13px; right:13px; color:var(--gold); font-size:20px; }
.reimbursement-banner { width:100%; margin:14px 0; padding:17px 18px; border-radius:20px; border:1px solid rgba(255,189,55,.5); background:linear-gradient(90deg, rgba(97,57,5,.86), rgba(52,33,8,.7)); display:grid; grid-template-columns:auto 1fr auto auto; align-items:center; gap:13px; text-align:left; cursor:pointer; box-shadow:var(--shadow); }
.reimbursement-icon { width:45px; height:45px; border-radius:50%; display:grid; place-items:center; font-size:28px; background:rgba(255,189,55,.18); color:var(--gold); }
.reimbursement-copy { display:flex; flex-direction:column; gap:3px; }
.reimbursement-copy strong { font-size:19px; color:#ffd26f; }
.reimbursement-copy small { color:#c9c2b3; }
#reimbursementTotal { color:#ffd05d; font-size:23px; }
.chevron { font-size:33px; color:#91a1ba; line-height:1; }
.movements-heading { align-items:flex-start; }
.movement-tools { display:flex; align-items:center; gap:8px; }
.movement-tools select { width:auto; min-width:130px; }
.movement-list { display:flex; flex-direction:column; gap:8px; }
.movement-row { display:grid; grid-template-columns:auto 1fr auto auto; gap:12px; align-items:center; border:1px solid rgba(145,167,205,.13); background:rgba(255,255,255,.025); padding:12px 13px; border-radius:16px; cursor:pointer; }
.movement-icon { width:42px; height:42px; border-radius:50%; display:grid; place-items:center; background:rgba(50,133,255,.22); color:#ddebff; font-size:21px; }
.movement-icon.green { background:rgba(50,208,109,.23); }
.movement-icon.purple { background:rgba(165,92,255,.24); }
.movement-icon.orange { background:rgba(255,143,31,.24); }
.movement-copy { min-width:0; }
.movement-copy strong { display:block; font-size:16px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.movement-copy small { display:block; color:var(--muted); margin-top:4px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.movement-amount { text-align:right; font-size:18px; font-weight:730; }
.movement-amount.income { color:#53dd7d; }
.reimburse-tag { display:inline-block; margin-top:5px; padding:3px 8px; border-radius:999px; background:rgba(255,143,31,.22); color:#ffb44d; font-size:11px; }
.monthly-progress { width:100%; margin-top:12px; padding:14px; display:grid; grid-template-columns:auto auto 1fr auto auto; gap:12px; align-items:center; border:1px solid var(--line); border-radius:16px; background:rgba(255,255,255,.025); text-align:left; cursor:pointer; }
.progress-icon { color:var(--blue); font-size:24px; }
.bar { height:10px; border-radius:10px; overflow:hidden; display:flex; background:#22314a; }
.bar i:first-child { background:var(--green); }
.bar i:last-child { background:var(--red); }
#monthRatio { color:var(--muted); font-size:13px; }
.quick-actions { position:fixed; z-index:25; left:50%; bottom:calc(76px + env(safe-area-inset-bottom)); transform:translateX(-50%); width:min(calc(100% - 28px), 730px); display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; padding:12px; border:1px solid var(--line); border-radius:24px; background:rgba(7,16,29,.94); backdrop-filter:blur(18px); box-shadow:0 -12px 32px rgba(0,0,0,.34); }
.quick-action { min-width:0; min-height:76px; border:1px solid var(--line); border-radius:18px; display:grid; grid-template-columns:auto 1fr; grid-template-rows:auto auto; column-gap:9px; align-items:center; text-align:left; padding:12px; cursor:pointer; overflow:hidden; }
.quick-action > span { grid-row:1 / 3; width:42px; height:42px; border-radius:50%; display:grid; place-items:center; font-size:29px; background:rgba(255,255,255,.12); }
.quick-action strong { font-size:16px; white-space:nowrap; }
.quick-action small { font-size:11px; color:#d2d8e5; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.quick-action.expense { background:linear-gradient(145deg, rgba(128,35,42,.9), rgba(60,17,26,.9)); border-color:rgba(255,93,93,.36); }
.quick-action.income { background:linear-gradient(145deg, rgba(23,111,53,.9), rgba(10,49,27,.9)); border-color:rgba(50,208,109,.36); }
.quick-action.photo { background:linear-gradient(145deg, rgba(89,37,153,.9), rgba(40,17,73,.9)); border-color:rgba(165,92,255,.38); }
.quick-action.transfer { background:linear-gradient(145deg, rgba(22,82,168,.9), rgba(10,42,93,.9)); border-color:rgba(50,133,255,.42); }
.camera-glyph { position:relative; font-size:0 !important; }
.camera-glyph::before { content:""; width:23px; height:16px; border:2px solid #fff; border-radius:4px; }
.camera-glyph::after { content:""; position:absolute; width:8px; height:8px; border:2px solid #fff; border-radius:50%; }
.bottom-nav { position:fixed; z-index:24; left:0; bottom:0; width:100%; height:calc(76px + env(safe-area-inset-bottom)); padding:6px max(16px, calc((100% - 760px)/2 + 18px)) env(safe-area-inset-bottom); background:rgba(6,14,25,.97); border-top:1px solid var(--line); display:grid; grid-template-columns:repeat(5,1fr); backdrop-filter:blur(18px); }
.nav-item { border:0; background:transparent; color:#9aa7bb; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; cursor:pointer; }
.nav-item.active { color:#4aa0ff; }
.nav-item span { width:25px; height:25px; position:relative; }
.nav-home::before { content:"⌂"; font-size:30px; position:absolute; left:-2px; top:-7px; }
.nav-list::before { content:"☷"; font-size:27px; position:absolute; left:0; top:-5px; }
.nav-wallet::before { content:"▱"; font-size:30px; position:absolute; left:-2px; top:-7px; }
.nav-chart::before { content:"◔"; font-size:30px; position:absolute; left:-2px; top:-7px; }
.nav-more::before { content:""; position:absolute; left:50%; top:9px; width:5px; height:5px; border-radius:50%; background:currentColor; box-shadow:-8px 0 0 currentColor,8px 0 0 currentColor; transform:translateX(-50%); }
.modal { border:0; padding:0; background:transparent; color:var(--text); max-width:none; max-height:none; }
.modal::backdrop { background:rgba(0,0,0,.72); backdrop-filter:blur(5px); }
.modal-card { width:min(calc(100vw - 28px), 570px); max-height:min(90vh, 900px); overflow:auto; border:1px solid var(--line); border-radius:26px; background:linear-gradient(180deg, #0f1d31, #08111f); padding:22px; box-shadow:0 28px 80px rgba(0,0,0,.55); }
.large-modal-card { width:min(calc(100vw - 28px), 690px); }
.sheet-modal { align-items:end; justify-content:center; margin:auto auto 0; }
.sheet-modal .modal-card { width:min(100vw,760px); border-radius:28px 28px 0 0; max-height:88vh; }
.modal-header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:20px; }
.modal-header h2 { margin-top:4px; font-size:26px; }
.close-button { width:44px; height:44px; min-width:44px; min-height:44px; border-radius:50%; border:1px solid var(--line); background:rgba(255,255,255,.04); font-size:26px; line-height:1; cursor:pointer; }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
label { display:flex; flex-direction:column; gap:7px; color:#cbd4e3; margin-bottom:14px; }
label > span { font-size:13px; color:#aebacf; }
input, select, textarea { width:100%; color:var(--text); border:1px solid var(--line); border-radius:14px; background:#081523; padding:13px 14px; min-height:48px; }
textarea { resize:vertical; }
.amount-field { grid-column:1 / -1; }
.amount-field > div { display:flex; align-items:center; border:1px solid var(--line); border-radius:16px; background:#081523; padding-right:16px; }
.amount-field input { border:0; background:transparent; font-size:35px; font-weight:760; }
.amount-field b { color:var(--purple); font-size:28px; }
.selected-account-card { width:100%; display:grid; grid-template-columns:auto 1fr auto auto; align-items:center; gap:12px; border:1px solid var(--line); border-radius:18px; background:rgba(255,255,255,.035); padding:14px; text-align:left; cursor:pointer; margin-bottom:12px; }
.account-symbol { width:50px; height:50px; border-radius:50%; display:grid; place-items:center; font-weight:800; background:rgba(50,208,109,.24); color:#bff8d0; }
.account-symbol.blue { background:rgba(50,133,255,.24); color:#c5ddff; }
.selected-account-card > span:nth-child(2) { display:flex; flex-direction:column; min-width:0; }
.selected-account-card small { color:var(--muted); }
.selected-account-card strong { margin-top:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.selected-account-card em { color:#92a1b8; font-size:12px; font-style:normal; margin-top:3px; }
.selected-account-card b { white-space:nowrap; }
.selected-account-card i { font-style:normal; font-size:27px; color:#8fa1ba; }
.recognition { display:flex; gap:11px; align-items:center; padding:13px; border:1px solid rgba(50,208,109,.25); border-radius:15px; background:rgba(50,208,109,.08); margin:12px 0; }
.recognition > span { width:34px; height:34px; border-radius:50%; display:grid; place-items:center; background:rgba(50,208,109,.22); color:#75eb99; }
.recognition div { display:flex; flex-direction:column; }
.recognition small { color:var(--muted); }
.recognition strong { color:#75eb99; }
.transfer-preview { border:1px solid var(--line); border-radius:15px; padding:13px; margin-bottom:13px; }
.preview-row { display:grid; grid-template-columns:1fr auto auto; gap:10px; padding:8px 0; color:#cbd4e3; }
.preview-row + .preview-row { border-top:1px solid var(--line); }
.preview-row b { color:#75eb99; }
.advanced-toggle { width:100%; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.035); padding:13px; text-align:left; display:flex; justify-content:space-between; cursor:pointer; margin-bottom:12px; }
.switch-row { flex-direction:row; align-items:center; gap:10px; }
.switch-row input { width:20px; min-height:20px; margin:0; }
.hidden { display:none !important; }
.photo-status { padding:12px; border-radius:14px; border:1px solid rgba(165,92,255,.3); background:rgba(165,92,255,.08); color:#dac7f8; margin-bottom:12px; }
.form-error { min-height:20px; color:#ff8585; }
.modal-actions { display:flex; justify-content:flex-end; margin-top:14px; }
.inline-actions { gap:10px; }
.primary-button, .secondary-button, .file-label { border-radius:14px; min-height:48px; padding:12px 18px; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; }
.primary-button { border:1px solid rgba(50,133,255,.7); background:linear-gradient(135deg,#5164ff,#285eff); color:#fff; font-weight:720; }
.secondary-button, .file-label { border:1px solid var(--line); background:rgba(255,255,255,.035); color:#dce5f3; }
.search-field { position:relative; margin-bottom:13px; }
.search-field input { padding-left:44px; }
.icon-search::before { content:"⌕"; position:absolute; left:14px; top:9px; font-size:25px; color:var(--muted); }
.recent-choices { display:flex; gap:8px; overflow-x:auto; padding-bottom:10px; }
.recent-chip { flex:0 0 auto; min-width:160px; border:1px solid var(--line); border-radius:15px; background:rgba(255,255,255,.035); padding:10px; text-align:left; cursor:pointer; }
.recent-chip strong, .recent-chip small { display:block; }
.recent-chip small { color:var(--muted); margin-top:3px; }
.filter-chips { display:flex; gap:8px; overflow-x:auto; margin:5px 0 15px; }
.filter-chip { border:1px solid var(--line); border-radius:999px; background:transparent; padding:8px 13px; cursor:pointer; white-space:nowrap; }
.filter-chip.active { background:rgba(50,133,255,.18); border-color:rgba(50,133,255,.45); color:#85b9ff; }
.account-choice-group h3 { font-size:14px; color:#a8b5c9; margin:18px 0 8px; }
.account-choice { width:100%; display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:12px; border:1px solid rgba(145,167,205,.13); background:rgba(255,255,255,.025); border-radius:15px; padding:12px; margin-bottom:7px; text-align:left; cursor:pointer; }
.account-choice span:nth-child(2) { display:flex; flex-direction:column; }
.account-choice small { color:var(--muted); margin-top:3px; }
.selector-stack { display:flex; flex-direction:column; gap:12px; }
.summary-selector { border:1px solid var(--line); border-radius:16px; padding:13px; background:rgba(255,255,255,.025); }
.summary-selector strong { display:block; margin-bottom:8px; }
.helper { color:var(--muted); line-height:1.55; }
.management-list { display:flex; flex-direction:column; gap:8px; margin-bottom:13px; }
.management-row { display:grid; grid-template-columns:auto 1fr auto auto; align-items:center; gap:10px; border:1px solid var(--line); border-radius:15px; padding:12px; background:rgba(255,255,255,.025); }
.management-row small { color:var(--muted); display:block; margin-top:3px; }
.management-row button { border:1px solid var(--line); border-radius:10px; background:transparent; padding:8px; cursor:pointer; }
.account-editor { margin-top:15px; padding:15px; border:1px solid var(--line); border-radius:18px; background:rgba(255,255,255,.025); }
.settings-actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:10px; }
.info-content { color:#cbd4e3; line-height:1.6; }
.toast { position:fixed; left:50%; bottom:calc(175px + env(safe-area-inset-bottom)); transform:translate(-50%,30px); opacity:0; z-index:60; border:1px solid var(--line); border-radius:999px; background:#14243a; padding:11px 17px; pointer-events:none; transition:.22s ease; box-shadow:var(--shadow); }
.toast.show { opacity:1; transform:translate(-50%,0); }
.privacy-hidden .privacy-value, .privacy-hidden .summary-value, .privacy-hidden .favorite-card b, .privacy-hidden .movement-amount { color:transparent !important; text-shadow:0 0 10px rgba(255,255,255,.55); user-select:none; }
@media (max-width: 670px) {
  .app-shell { padding:20px 14px calc(166px + env(safe-area-inset-bottom)); }
  .topbar { align-items:flex-start; }
  .logo { width:46px; height:46px; font-size:28px; }
  .brand-row { gap:11px; }
  .brand-copy h1 { font-size:30px; }
  .brand-copy p { font-size:15px; }
  .icon-button { width:42px; height:42px; border-radius:14px; }
  .top-actions { gap:6px; }
  .summary-grid { gap:8px; overflow-x:auto; scroll-snap-type:x mandatory; }
  .summary-card { min-width:72vw; min-height:185px; scroll-snap-align:start; }
  .favorite-grid { grid-template-columns:repeat(4, minmax(145px,1fr)); overflow-x:auto; padding-bottom:4px; }
  .favorites-panel { padding:15px; }
  .movement-tools select { display:none; }
  .quick-actions { gap:6px; padding:8px; border-radius:20px; bottom:calc(68px + env(safe-area-inset-bottom)); }
  .quick-action { min-height:72px; padding:8px 5px; grid-template-columns:1fr; grid-template-rows:auto auto; text-align:center; gap:3px; }
  .quick-action > span { grid-row:auto; margin:auto; width:36px; height:36px; font-size:25px; }
  .quick-action strong { font-size:13px; }
  .quick-action small { display:none; }
  .bottom-nav { height:calc(68px + env(safe-area-inset-bottom)); }
  .nav-item small { font-size:10px; }
  .movement-row { grid-template-columns:auto 1fr auto; }
  .movement-row > .chevron { display:none; }
  .monthly-progress { grid-template-columns:auto 1fr auto; }
  .monthly-progress .bar, .monthly-progress #monthRatio { display:none; }
  .form-grid { grid-template-columns:1fr; }
  .amount-field { grid-column:auto; }
  .settings-actions { grid-template-columns:1fr; }
  .reimbursement-banner { grid-template-columns:auto 1fr auto; }
  .reimbursement-banner .chevron { display:none; }
}
@media (max-width: 390px) {
  .top-actions .icon-button:nth-child(2) { display:none; }
  .quick-action strong { font-size:12px; }
  .panel { padding:14px; }
}

/* v0.4 — Report, backup e ripristino */
.backup-reminder { width:100%; display:grid; grid-template-columns:auto 1fr auto auto; align-items:center; gap:12px; margin:14px 0; padding:14px 16px; border:1px solid rgba(255,189,55,.35); border-radius:18px; background:linear-gradient(100deg,rgba(255,189,55,.12),rgba(255,143,31,.045)); text-align:left; cursor:pointer; }
.backup-reminder > span:first-child { width:43px; height:43px; border-radius:50%; display:grid; place-items:center; background:rgba(255,189,55,.18); color:var(--gold); font-size:22px; }
.backup-reminder > span:nth-child(2) { display:flex; flex-direction:column; gap:3px; }
.backup-reminder small { color:var(--muted); }
.backup-reminder b { color:var(--gold); }
.backup-reminder i { font-style:normal; font-size:25px; color:#8797ae; }
.xlarge-modal-card { width:min(calc(100vw - 28px),920px); }
.report-filters { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; padding:14px; border:1px solid var(--line); border-radius:18px; background:rgba(255,255,255,.025); }
.report-filters label { margin:0; }
.report-toolbar, .backup-actions { display:flex; flex-wrap:wrap; gap:10px; margin:14px 0; }
.report-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:16px 0; }
.report-kpi { border:1px solid var(--line); border-radius:17px; padding:14px; background:rgba(255,255,255,.03); }
.report-kpi small { color:var(--muted); display:block; margin-bottom:7px; }
.report-kpi strong { font-size:21px; }
.report-kpi.income strong { color:#72e99a; }
.report-kpi.expense strong { color:#ff8585; }
.report-kpi.reimburse strong { color:#c892ff; }
.report-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.report-section { border:1px solid var(--line); border-radius:18px; padding:15px; background:rgba(255,255,255,.025); margin-top:14px; }
.report-section h3 { margin:0 0 13px; font-size:17px; }
.report-bar-row { display:grid; grid-template-columns:minmax(110px,1fr) minmax(90px,2fr) auto; align-items:center; gap:10px; padding:8px 0; }
.report-bar-row small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#cbd4e3; }
.report-bar-track { height:10px; border-radius:999px; overflow:hidden; background:rgba(255,255,255,.07); }
.report-bar-track i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--purple),var(--blue)); }
.report-bar-row b { font-size:13px; white-space:nowrap; }
.report-movements { display:flex; flex-direction:column; }
.report-movement { display:grid; grid-template-columns:100px 1fr auto; align-items:center; gap:12px; padding:10px 0; border-bottom:1px solid rgba(145,167,205,.12); }
.report-movement:last-child { border-bottom:0; }
.report-movement small { color:var(--muted); }
.report-movement span { min-width:0; }
.report-movement span strong, .report-movement span small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.backup-status-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-bottom:15px; }
.backup-status-grid article { border:1px solid var(--line); border-radius:17px; padding:14px; background:rgba(255,255,255,.03); }
.backup-status-grid small { display:block; color:var(--muted); margin-bottom:8px; }
.backup-status-grid strong { display:block; }
.backup-section { border:1px solid var(--line); border-radius:19px; padding:16px; background:rgba(255,255,255,.022); margin-top:13px; }
.backup-section h3 { margin:0 0 8px; font-size:18px; }
.backup-section .file-label { width:max-content; }
.restore-preview { border:1px solid rgba(50,208,109,.3); border-radius:16px; padding:14px; background:rgba(50,208,109,.07); margin:12px 0; }
.restore-preview dl { display:grid; grid-template-columns:1fr auto; gap:8px 16px; margin:0; }
.restore-preview dt { color:var(--muted); }
.restore-preview dd { margin:0; font-weight:700; }
.danger-button { min-height:48px; border:1px solid rgba(255,93,93,.55); border-radius:14px; padding:12px 18px; background:rgba(255,93,93,.14); color:#ffb0b0; font-weight:750; cursor:pointer; }
.snapshot-list { display:flex; flex-direction:column; gap:8px; }
.snapshot-row { display:grid; grid-template-columns:1fr auto auto; align-items:center; gap:9px; border:1px solid var(--line); border-radius:14px; padding:11px; }
.snapshot-row small { color:var(--muted); display:block; margin-top:3px; }
.snapshot-row button { border:1px solid var(--line); border-radius:10px; padding:8px 10px; background:transparent; cursor:pointer; }
.more-grid { display:grid; gap:10px; }
.more-grid button { display:grid; grid-template-columns:auto 1fr; gap:3px 12px; align-items:center; border:1px solid var(--line); border-radius:17px; padding:14px; background:rgba(255,255,255,.03); text-align:left; cursor:pointer; }
.more-grid button > span { width:44px; height:44px; border-radius:14px; grid-row:1 / 3; display:grid; place-items:center; background:rgba(50,133,255,.14); color:#8bbcff; font-size:21px; }
.more-grid button small { color:var(--muted); }
a.secondary-button { text-decoration:none; }
.backup-ok .notify-dot { display:none; }
.attachment-pill { display:inline-flex; align-items:center; gap:6px; margin-top:7px; padding:5px 8px; border-radius:999px; background:rgba(165,92,255,.12); color:#d6b8ff; font-size:11px; }
@media (max-width:700px) {
  .report-filters { grid-template-columns:1fr 1fr; }
  .report-kpis { grid-template-columns:1fr 1fr; }
  .report-grid { grid-template-columns:1fr; }
  .backup-status-grid { grid-template-columns:1fr; }
  .report-movement { grid-template-columns:76px 1fr auto; gap:8px; }
  .xlarge-modal-card { width:min(calc(100vw - 16px),920px); }
}
@media (max-width:410px) {
  .report-filters { grid-template-columns:1fr; }
  .report-toolbar .primary-button, .report-toolbar .secondary-button, .backup-actions .primary-button, .backup-actions .secondary-button { width:100%; }
  .backup-reminder { grid-template-columns:auto 1fr auto; }
  .backup-reminder i { display:none; }
}
@media print {
  body * { visibility:hidden !important; }
  #reportsDialog, #reportsDialog * { visibility:visible !important; }
  #reportsDialog { position:absolute; inset:0; width:100%; max-height:none; overflow:visible; background:#fff; color:#111; display:block; }
  #reportsDialog .modal-card { width:100%; max-height:none; border:0; box-shadow:none; background:#fff; color:#111; }
  #reportsDialog .modal-header .close-button, #reportsDialog .report-filters, #reportsDialog .report-toolbar { display:none !important; }
  #reportsDialog .report-print-summary { display:block !important; margin:0 0 16px; padding:0 0 12px; border-bottom:2px solid #222; }
  #reportsDialog .report-print-summary h1 { margin:0 0 8px; font-size:24px; }
  #reportsDialog .report-print-summary p { margin:4px 0; color:#222 !important; }
  #reportsDialog .report-section, #reportsDialog .report-kpi { background:#fff; color:#111; border-color:#bbb; }
  #reportsDialog small, #reportsDialog .eyebrow { color:#555 !important; }
}

/* v0.4.3 — Inserimento guidato e categorie esplicite */
.movement-guidance { display:flex; flex-direction:column; gap:5px; margin:-4px 0 16px; padding:13px 14px; border:1px solid rgba(50,133,255,.28); border-radius:16px; background:rgba(50,133,255,.075); }
.movement-guidance strong { color:#dceaff; }
.movement-guidance span { color:#9fb0c8; font-size:13px; line-height:1.45; }
.full-field { width:100%; }
.field-help { color:#899ab2; font-size:12px; line-height:1.4; margin-top:-1px; }
.category-card { grid-template-columns:auto 1fr auto; border-color:rgba(165,92,255,.35); background:linear-gradient(100deg,rgba(165,92,255,.11),rgba(255,255,255,.025)); }
.category-card:hover, .category-card:focus-visible { border-color:rgba(165,92,255,.7); }
.category-card.selected { border-color:rgba(50,208,109,.42); background:linear-gradient(100deg,rgba(50,208,109,.1),rgba(255,255,255,.025)); }
.category-symbol { background:rgba(165,92,255,.24); color:#eadbff; }
.category-card.selected .category-symbol { background:rgba(50,208,109,.22); color:#c8f7d6; }
.category-choice-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; padding-bottom:8px; }
.category-choice { min-height:62px; display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:11px; border:1px solid rgba(145,167,205,.16); border-radius:16px; background:rgba(255,255,255,.03); padding:10px 12px; text-align:left; cursor:pointer; }
.category-choice:hover, .category-choice:focus-visible { border-color:rgba(165,92,255,.55); background:rgba(165,92,255,.09); }
.category-choice > span { width:40px; height:40px; border-radius:13px; display:grid; place-items:center; background:rgba(165,92,255,.17); color:#dec8ff; font-size:19px; }
.category-choice strong { overflow:hidden; text-overflow:ellipsis; }
.category-choice i { color:#8697af; font-size:23px; font-style:normal; }
#movementScope:invalid { color:#9aa8bc; }
#saveMovement { min-width:190px; }

@media (max-width:520px) {
  .category-choice-list { grid-template-columns:1fr; }
  #saveMovement { width:100%; }
  .movement-guidance { margin-top:0; }
}

/* v0.4.4 — Percorso del denaro: Per chi + Con cosa */
.money-flow-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin:4px 0 14px;
}
.flow-field {
  min-width:0;
  margin:0;
  padding:14px;
  border:1px solid rgba(145,167,205,.18);
  border-radius:18px;
  background:linear-gradient(145deg,rgba(255,255,255,.045),rgba(255,255,255,.018));
}
.flow-field > span {
  color:#dce5f3;
  font-size:14px;
  font-weight:720;
}
.flow-field select,
.flow-field input {
  min-height:54px;
  font-size:15px;
  font-weight:650;
  border-color:rgba(145,167,205,.26);
  background:#071421;
}
.flow-field select:focus,
.flow-field input:focus {
  border-color:rgba(50,133,255,.72);
  outline:2px solid rgba(50,133,255,.16);
}
.flow-field optgroup { color:#99abd0; font-weight:750; }
.flow-field option { color:#eef4ff; background:#0b1828; }
.cross-scope-notice {
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:12px;
  align-items:center;
  margin:4px 0 14px;
  padding:13px 14px;
  border:1px solid rgba(255,173,62,.38);
  border-radius:17px;
  background:linear-gradient(120deg,rgba(255,160,35,.12),rgba(255,255,255,.025));
}
.cross-scope-notice > span:first-child {
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:rgba(255,160,35,.18);
  color:#ffc66f;
  font-size:22px;
}
.cross-scope-notice > div { display:flex; flex-direction:column; gap:4px; }
.cross-scope-notice strong { color:#ffe0aa; }
.cross-scope-notice small { color:#b9c4d5; line-height:1.35; }
.compact-switch {
  margin:0;
  padding:8px 10px;
  border:1px solid rgba(255,173,62,.28);
  border-radius:12px;
  background:rgba(0,0,0,.12);
  white-space:nowrap;
}
#transferKindField {
  padding:13px 14px;
  border:1px solid rgba(50,133,255,.25);
  border-radius:16px;
  background:rgba(50,133,255,.07);
}

@media (max-width:620px) {
  .money-flow-grid { grid-template-columns:1fr; }
  .cross-scope-notice { grid-template-columns:auto 1fr; }
  .cross-scope-notice .compact-switch { grid-column:1 / -1; width:100%; justify-content:center; }
}


/* v0.4.5 — Linguaggio naturale: niente “disponibilità” nell'interfaccia */
.inline-add-money {
  appearance:none; border:0; background:transparent; color:#62a9ff; font:inherit;
  font-weight:750; padding:2px 4px 14px; cursor:pointer; text-align:left;
}
.inline-add-money:hover { text-decoration:underline; }
.inline-add-money:focus-visible { outline:2px solid #62a9ff; outline-offset:4px; border-radius:6px; }

/* v0.4.6 — configurazione autonoma e aggiunta rapida */
.select-with-add { display:grid; grid-template-columns:minmax(0,1fr) 50px; gap:8px; align-items:stretch; }
.select-with-add select { min-width:0; }
.inline-plus { width:50px; min-width:50px; min-height:48px; border:1px solid rgba(70,143,255,.42); border-radius:14px; background:rgba(50,133,255,.13); color:#bcd7ff; font-size:28px; line-height:1; display:grid; place-items:center; cursor:pointer; }
.inline-plus:hover { background:rgba(50,133,255,.23); }
.choice-with-add { display:grid; grid-template-columns:minmax(0,1fr) 54px; gap:9px; align-items:stretch; margin-bottom:12px; }
.choice-with-add .selected-account-card { margin-bottom:0; }
.large-plus { width:54px; min-width:54px; min-height:100%; border-radius:18px; }
.full-add-button { width:100%; margin:10px 0 12px; }
.compact-modal-card { max-width:520px; }
.config-sections { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.config-section { border:1px solid var(--line); border-radius:18px; background:rgba(255,255,255,.025); padding:15px; min-width:0; }
.config-section .section-heading { align-items:flex-start; margin-bottom:10px; }
.config-section h3 { margin:0 0 3px; }
.config-section small { color:var(--muted); }
.compact-management .management-row { grid-template-columns:minmax(0,1fr) auto auto; padding:10px 0; }
.compact-management .management-row > span { min-width:0; }
.compact-management .management-row strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.compact-management .management-row button { padding:8px 10px; min-width:auto; }
#counterpartyField, #descriptionNoteField { display:block; margin-bottom:12px; }
#counterpartyField > span:first-child, #descriptionNoteField > span:first-child { display:block; margin-bottom:7px; color:var(--muted); }

@media (max-width:720px) {
  .config-sections { grid-template-columns:1fr; }
  .select-with-add { grid-template-columns:minmax(0,1fr) 48px; }
  .inline-plus { width:48px; min-width:48px; }
  .choice-with-add { grid-template-columns:minmax(0,1fr) 50px; }
  .large-plus { width:50px; min-width:50px; }
}


/* v0.4.9 — azione “Aggiungi” dentro gli elenchi aperti */
.select-with-inline-action { width:100%; }
#categoryFieldRow { margin-bottom:12px; }
#categoryFieldRow .selected-account-card { margin-bottom:0; }
.picker-add-action {
  position:sticky;
  bottom:0;
  z-index:3;
  margin:14px 0 0;
  border-color:rgba(70,143,255,.46);
  background:linear-gradient(180deg,rgba(13,31,51,.97),rgba(8,21,35,.99));
  box-shadow:0 -12px 22px rgba(5,11,20,.85);
}
.category-picker-card .category-choice-list,
.account-picker-card .account-choice-list { padding-bottom:4px; }


/* v0.4.9 — tendine pulite: segnaposto nascosto nell’elenco e azione diretta in fondo */


/* v0.5.0 — Home realmente smartphone e card navigabili */
.summary-card { color:inherit; text-align:left; cursor:pointer; appearance:none; }
.summary-card:active, .favorite-card:active { transform:scale(.985); }
.favorite-card { transition:transform .12s ease, border-color .18s ease; }
.favorite-card em { margin-top:9px; color:#9fc5ff; font-size:12px; font-style:normal; }
.movement-browser-context { display:flex; align-items:flex-end; justify-content:space-between; gap:14px; padding:14px 16px; margin-bottom:12px; border:1px solid var(--line); border-radius:17px; background:rgba(255,255,255,.035); }
.movement-browser-context > div { display:flex; flex-direction:column; gap:5px; min-width:0; }
.movement-browser-context small { color:var(--muted); }
.movement-browser-context strong { font-size:22px; }
.movement-type-chips { margin-bottom:14px; overflow-x:auto; flex-wrap:nowrap; padding-bottom:3px; }
.movement-type-chips button { flex:0 0 auto; }
.movement-type-chips button.active { background:rgba(50,133,255,.24); color:#d9e9ff; border-color:rgba(70,143,255,.55); }
.movement-browser-list { max-height:min(62vh,620px); overflow:auto; padding-right:2px; }
.empty-browser { padding:34px 18px; text-align:center; border:1px dashed rgba(145,167,205,.23); border-radius:17px; color:var(--muted); display:flex; flex-direction:column; gap:6px; }
.empty-browser strong { color:var(--text); }

@media (max-width:670px) {
  html, body { overflow-x:hidden; }
  .app-shell { width:100%; padding:14px 12px calc(150px + env(safe-area-inset-bottom)); overflow:hidden; }
  .topbar { gap:10px; margin-bottom:16px; align-items:center; }
  .brand-row { gap:9px; }
  .logo { width:40px; height:40px; font-size:24px; flex:0 0 40px; }
  .brand-copy h1 { font-size:27px; }
  .brand-copy p { font-size:14px; margin-top:1px; }
  .icon-button { width:44px; height:44px; border-radius:14px; }
  .icon { transform:scale(.9); }
  .top-actions { gap:5px; }
  .section-heading { gap:8px; margin-bottom:11px; }
  .section-heading h2 { font-size:19px; line-height:1.15; }
  .eyebrow { font-size:11px; }
  .text-button { padding:7px 4px; }

  .summary-section { min-width:0; overflow:hidden; }
  .summary-grid { display:flex; grid-template-columns:none; gap:12px; width:100%; overflow-x:auto; overflow-y:hidden; scroll-snap-type:x mandatory; scroll-behavior:smooth; overscroll-behavior-inline:contain; scrollbar-width:none; padding:1px 0 2px; }
  .summary-grid::-webkit-scrollbar, .favorite-grid::-webkit-scrollbar { display:none; }
  .summary-card { flex:0 0 100%; width:100%; min-width:100%; min-height:174px; padding:17px; border-radius:22px; scroll-snap-align:center; scroll-snap-stop:always; }
  .summary-card .summary-title { font-size:17px; }
  .summary-card .summary-value { margin-top:18px; font-size:clamp(29px,10vw,38px); max-width:100%; overflow:hidden; text-overflow:ellipsis; }
  .summary-card .summary-sub { font-size:12px; }
  .sparkline { height:42px; margin-top:10px; }
  .pager-dots { padding:9px 0 3px; }

  .favorites-panel { padding:14px; margin-top:13px; overflow:hidden; }
  .favorite-grid { display:flex; grid-template-columns:none; gap:10px; width:100%; overflow-x:auto; scroll-snap-type:x mandatory; scrollbar-width:none; padding:1px 0 5px; }
  .favorite-card { flex:0 0 78%; min-width:78%; min-height:158px; padding:14px; scroll-snap-align:start; }
  .favorite-card.add { flex-basis:55%; min-width:55%; }
  .favorite-card b { font-size:22px; }

  .quick-actions { width:calc(100% - 16px); bottom:calc(62px + env(safe-area-inset-bottom)); gap:5px; padding:6px; border-radius:18px; }
  .quick-action { min-height:58px; padding:6px 3px; border-radius:14px; grid-template-columns:1fr; grid-template-rows:auto auto; gap:2px; text-align:center; }
  .quick-action > span { width:30px; height:30px; font-size:21px; margin:auto; grid-row:auto; }
  .quick-action strong { font-size:11.5px; }
  .quick-action small { display:none; }
  .bottom-nav { height:calc(62px + env(safe-area-inset-bottom)); padding-top:4px; }
  .nav-item { gap:2px; }
  .nav-item span { width:22px; height:22px; transform:scale(.86); }
  .nav-item small { font-size:9.5px; line-height:1.05; }
  .toast { bottom:calc(140px + env(safe-area-inset-bottom)); max-width:calc(100% - 24px); text-align:center; }

  .modal-card { width:calc(100vw - 12px); max-height:94dvh; border-radius:22px; padding:18px 16px; }
  .movement-browser-context { align-items:flex-start; flex-direction:column; gap:7px; }
  .movement-browser-context strong { font-size:20px; }
  .movement-browser-list { max-height:66dvh; }
  .browser-movement-row { grid-template-columns:auto 1fr auto; }
  .browser-movement-row .chevron { display:none; }
}
@media (max-width:390px) {
  .top-actions .icon-button:nth-child(2) { display:none; }
  .summary-card { min-height:166px; }
  .favorite-card { flex-basis:84%; min-width:84%; }
  .quick-action strong { font-size:10.5px; }
}

/* v0.5.0 — filtri movimenti touch-friendly */
.filter-chips button {
  border:1px solid rgba(145,167,205,.24);
  border-radius:999px;
  background:rgba(255,255,255,.045);
  color:#c8d2e2;
  padding:8px 12px;
  line-height:1;
  cursor:pointer;
}
.filter-chips button:hover { background:rgba(255,255,255,.085); }


/* v0.5.3 — ambiti, conti ed estratto conto semplice */
.scope-card { cursor:default; }
.scope-card:active { transform:none; }
.scope-card .scope-accounts-link { margin-top:10px; align-self:stretch; display:flex; align-items:center; justify-content:space-between; border:0; border-top:1px solid rgba(255,255,255,.13); padding:10px 0 0; background:transparent; color:#a9caff; font-weight:750; font-size:14px; }
.scope-card .scope-accounts-link span { font-size:20px; line-height:1; }
.scope-accounts-list { display:flex; flex-direction:column; gap:9px; max-height:min(68vh,620px); overflow:auto; padding-right:2px; }
.scope-account-row { display:grid; grid-template-columns:auto minmax(0,1fr) auto auto; gap:12px; align-items:center; width:100%; padding:14px; border:1px solid var(--line); border-radius:17px; background:rgba(255,255,255,.035); color:var(--text); text-align:left; }
.scope-account-row > span:nth-child(2) { display:flex; flex-direction:column; min-width:0; gap:3px; }
.scope-account-row strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.scope-account-row small { color:var(--muted); }
.scope-account-row b { white-space:nowrap; font-size:17px; }
.scope-account-row i { color:#8290a8; font-style:normal; font-size:24px; }
.statement-mode .movement-browser-context { margin-bottom:10px; }
.statement-mode .movement-browser-list { max-height:min(68vh,660px); }
.statement-row { display:grid; grid-template-columns:94px minmax(0,1fr) auto; gap:12px; align-items:center; width:100%; padding:14px 12px; border:0; border-bottom:1px solid rgba(145,167,205,.16); background:transparent; color:var(--text); text-align:left; }
.statement-row:first-child { border-top:1px solid rgba(145,167,205,.16); }
.statement-row time { color:#b4c0d3; font-variant-numeric:tabular-nums; font-size:13px; }
.statement-row > span { display:flex; flex-direction:column; min-width:0; gap:4px; }
.statement-row strong { font-size:15px; }
.statement-row small { color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.statement-row b { white-space:nowrap; font-size:16px; }
.statement-row b.income { color:var(--green); }
@media (max-width:670px) {
  .app-shell { padding-bottom:calc(190px + env(safe-area-inset-bottom)); }
  .scope-account-row { grid-template-columns:auto minmax(0,1fr) auto; }
  .scope-account-row i { display:none; }
  .statement-row { grid-template-columns:82px minmax(0,1fr) auto; gap:9px; padding:13px 7px; }
  .statement-row time { font-size:11.5px; }
  .statement-row strong { font-size:14px; }
  .statement-row small { white-space:normal; line-height:1.25; }
  .statement-row b { font-size:14px; }
}
@media (max-width:390px) {
  .statement-row { grid-template-columns:72px minmax(0,1fr); }
  .statement-row b { grid-column:2; justify-self:end; }
}


/* v0.5.4 — esportazione, condivisione e stampa del Report */
.report-print-summary { display:none; }
.report-export-card { width:min(calc(100vw - 24px),620px); }
.report-export-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:16px; }
.report-export-grid button { min-height:84px; display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:6px; text-align:left; }
.report-export-grid button strong { font-size:16px; }
.report-export-grid button small { color:var(--muted); line-height:1.35; }
@media (max-width:520px) {
  .report-export-grid { grid-template-columns:1fr; }
  .report-export-grid button { min-height:72px; }
  .report-toolbar { display:grid; grid-template-columns:1fr 1fr; }
  .report-toolbar #applyReportFilters { grid-column:1 / -1; }
  .report-toolbar .primary-button, .report-toolbar .secondary-button { width:100%; }
}


/* v0.5.9 — accesso smartphone automatico sulla rete locale */
.smartphone-access-panel { display:grid; grid-template-columns:auto 1fr; gap:14px; align-items:center; padding:16px; border:1px solid rgba(50,133,255,.28); border-radius:18px; background:rgba(50,133,255,.08); margin-bottom:16px; }
.smartphone-access-icon { width:54px; height:54px; border-radius:17px; display:grid; place-items:center; background:rgba(50,133,255,.18); color:#9bc6ff; font-size:26px; }
.smartphone-access-panel strong { display:block; margin-bottom:4px; font-size:18px; }
.smartphone-access-panel p { margin:0; }
.smartphone-url-field input { font-family:ui-monospace,SFMono-Regular,Consolas,monospace; font-size:15px; }
.smartphone-actions { margin-top:14px; }
.smartphone-help { margin:14px 0 0; line-height:1.5; }
@media (max-width:520px) { .smartphone-actions { grid-template-columns:1fr; } .smartphone-actions button { width:100%; } }


/* v0.5.9 — fotocamera e allegati PDF/immagine */
.document-source-card { width:min(calc(100vw - 24px),620px); }
.document-source-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:16px; }
.document-source-option { min-height:142px; display:grid; grid-template-columns:auto 1fr; grid-template-rows:auto auto; align-items:center; gap:5px 13px; padding:18px; border:1px solid var(--line); border-radius:19px; background:rgba(255,255,255,.035); color:var(--text); text-align:left; cursor:pointer; }
.document-source-option > span { grid-row:1 / 3; width:54px; height:54px; display:grid; place-items:center; border-radius:17px; background:rgba(165,92,255,.14); color:#d8c0ff; font-size:27px; }
.document-source-option strong { font-size:17px; }
.document-source-option small { color:var(--muted); line-height:1.4; }
.document-attachment-panel { margin:14px 0 4px; padding:14px; border:1px solid rgba(165,92,255,.28); border-radius:17px; background:rgba(165,92,255,.055); }
.document-attachment-heading { display:grid; grid-template-columns:auto 1fr; gap:11px; align-items:center; }
.document-attachment-heading .document-glyph { width:38px; height:38px; display:grid; place-items:center; border-radius:12px; background:rgba(165,92,255,.14); color:#d6bdff; }
.document-attachment-heading strong, .document-attachment-heading small { display:block; }
.document-attachment-heading small { color:var(--muted); margin-top:3px; line-height:1.35; }
.document-attachment-actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:12px; }
.compact-document-action { min-height:44px; justify-content:center; }
.photo-status { display:grid; grid-template-columns:auto minmax(0,1fr); gap:10px; align-items:center; margin:12px 0 0; }
.photo-status strong, .photo-status small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.photo-status small { color:#b7a5d4; margin-top:3px; }
.document-status-icon { min-width:40px; height:32px; display:grid; place-items:center; border-radius:9px; background:rgba(165,92,255,.18); font-size:11px; font-weight:850; letter-spacing:.04em; }
.text-action { margin:9px 0 0 auto; padding:6px 2px; border:0; background:transparent; color:#ffb1b1; cursor:pointer; font-weight:700; }
.movement-documents { display:flex; flex-direction:column; gap:8px; margin-top:14px; }
.movement-documents > button { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:10px; align-items:center; width:100%; padding:11px 12px; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.035); color:var(--text); text-align:left; cursor:pointer; }
.movement-documents > button > span:first-child { width:34px; height:34px; display:grid; place-items:center; border-radius:10px; background:rgba(165,92,255,.14); }
.movement-documents b, .movement-documents small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.movement-documents small { color:var(--muted); margin-top:2px; }
.movement-documents i { color:#aecdff; font-style:normal; font-weight:700; }
@media (max-width:520px) {
  .document-source-grid { grid-template-columns:1fr; }
  .document-source-option { min-height:96px; }
  .document-attachment-actions { grid-template-columns:1fr; }
}


/* v0.6.5 — nuova Home premium, menu centrale e aggiornamenti */
body.access-gated { overflow:hidden; }
body.access-gated .app-shell { filter:blur(10px); opacity:.34; pointer-events:none; user-select:none; }
.security-dialog::backdrop { background:rgba(1,6,14,.88); backdrop-filter:blur(8px); }
.security-card { width:min(calc(100vw - 24px),560px); border-color:rgba(50,133,255,.32); }
.security-brand { display:flex; align-items:center; gap:13px; margin-bottom:16px; }
.security-brand .logo { width:48px; height:48px; font-size:29px; flex:0 0 auto; }
.security-brand h2 { font-size:27px; }
.security-card .intro-copy { color:#c7d2e4; line-height:1.55; margin:0 0 15px; }
.security-benefits { display:grid; gap:8px; margin:14px 0 16px; }
.security-benefits div { display:grid; grid-template-columns:auto 1fr; gap:9px; align-items:start; color:#d5dfed; }
.security-benefits b { color:#79b1ff; }
.pin-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.pin-input { letter-spacing:.28em; text-align:center; font-size:22px; font-weight:800; }
.security-consent { margin-top:12px; padding:12px; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.025); }
.security-consent span { line-height:1.45; }
.security-error { min-height:22px; margin:8px 0 0; color:#ff9696; }
.lock-card { text-align:center; width:min(calc(100vw - 24px),420px); }
.lock-card .logo { margin:0 auto 12px; }
.lock-card .pin-input { max-width:220px; margin:12px auto 0; }
.lock-card .primary-button { width:100%; margin-top:10px; }
.lock-help { border:0; background:transparent; color:#79b1ff; cursor:pointer; margin-top:10px; }
.account-security-section { margin-top:16px; padding:15px; border:1px solid var(--line); border-radius:17px; background:rgba(255,255,255,.022); }
.account-security-section h3 { margin:0 0 10px; font-size:17px; }
.account-status-row { display:grid; grid-template-columns:auto 1fr auto; gap:11px; align-items:center; padding:12px; border:1px solid rgba(145,167,205,.13); border-radius:14px; background:rgba(255,255,255,.025); }
.account-status-icon { width:39px; height:39px; border-radius:12px; display:grid; place-items:center; background:rgba(50,133,255,.13); color:#8bbaff; font-weight:850; }
.account-status-row strong, .account-status-row small { display:block; }
.account-status-row small { color:var(--muted); margin-top:3px; }
.account-status-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:11px; }
.account-status-actions button { flex:1 1 150px; }
.google-note { margin:13px 0 0; padding:12px; border:1px solid rgba(255,189,55,.25); border-radius:14px; background:rgba(255,189,55,.055); color:#d8c8a4; line-height:1.45; }
@media (max-width:520px) { .pin-grid { grid-template-columns:1fr; } .account-status-row { grid-template-columns:auto 1fr; } .account-status-row > button { grid-column:1 / -1; } }


/* v0.6.5 — Home premium adattata ai dati reali */
:root {
  --bg:#020914;
  --bg-2:#06152a;
  --panel:rgba(8,25,50,.92);
  --panel-2:rgba(11,33,64,.9);
  --line:rgba(105,154,225,.18);
  --text:#f7fbff;
  --muted:#8fa3c1;
  --blue:#2987ff;
  --green:#27ddb0;
  --red:#ff5d6c;
  --purple:#a447ff;
  --shadow:0 18px 52px rgba(0,0,0,.34);
}
html { background:#020914; }
body { background:radial-gradient(circle at 65% -8%,rgba(21,84,176,.3),transparent 35%),linear-gradient(180deg,#030d1d 0%,#020914 78%); }
.app-shell { width:min(100%,820px); padding:24px 22px calc(112px + env(safe-area-inset-bottom)); }
.topbar { margin-bottom:20px; }
.logo { display:none; }
.brand-copy h1 { font-size:clamp(31px,6vw,42px); }
.brand-copy p { font-size:19px; color:#d7e1f1; }
.icon-button { background:rgba(8,25,50,.82); border-color:rgba(105,154,225,.2); box-shadow:0 10px 28px rgba(0,0,0,.22); }
.summary-section .section-heading,.pager-dots { display:none; }
.summary-grid { display:block; }
.finance-balance-card { width:100%; min-height:280px; border:1px solid rgba(57,137,255,.32); border-radius:26px; padding:24px; background:linear-gradient(145deg,rgba(10,39,80,.98),rgba(4,18,40,.98)); box-shadow:0 24px 60px rgba(0,0,0,.34),inset 0 1px rgba(255,255,255,.04); position:relative; overflow:hidden; text-align:left; cursor:pointer; }
.finance-balance-card::before { content:""; position:absolute; width:330px; height:330px; right:-140px; top:-190px; border-radius:50%; background:rgba(36,132,255,.16); filter:blur(20px); }
.balance-card-top { display:flex; align-items:center; justify-content:space-between; gap:14px; position:relative; z-index:1; }
.balance-card-label { color:#aebed6; font-size:17px; }
.balance-period { padding:9px 12px; border:1px solid rgba(105,154,225,.18); border-radius:13px; color:#d8e6fa; background:rgba(255,255,255,.035); font-size:14px; }
.balance-card-value { margin-top:18px; font-size:clamp(40px,8vw,58px); line-height:1; font-weight:780; letter-spacing:-.045em; position:relative; z-index:1; }
.balance-card-delta { margin-top:12px; color:#b9c7db; font-size:14px; position:relative; z-index:1; }
.balance-card-delta b { color:var(--green); }
.balance-card-delta b.negative { color:var(--red); }
.balance-chart { width:100%; height:104px; display:block; margin-top:20px; overflow:visible; position:relative; z-index:1; }
.balance-chart .grid-line { stroke:rgba(143,163,193,.12); stroke-width:1; }
.balance-chart .area { fill:url(#balanceAreaGradient); }
.balance-chart .line { fill:none; stroke:var(--green); stroke-width:3.2; stroke-linecap:round; stroke-linejoin:round; filter:drop-shadow(0 0 7px rgba(39,221,176,.42)); }
.balance-chart .end { fill:#fff; stroke:var(--green); stroke-width:3; }
.favorites-panel,.movements-panel { margin-top:24px; padding:0; border:0; background:transparent; box-shadow:none; }
.favorites-panel .section-heading,.movements-panel .section-heading { padding:0 2px; margin-bottom:12px; }
#favoritesTitle { font-size:23px; }
.favorites-panel .heading-with-icon .small-icon { display:none; }
.favorite-grid { display:flex; gap:12px; overflow-x:auto; scroll-snap-type:x mandatory; padding:2px 2px 9px; scrollbar-width:none; }
.favorite-grid::-webkit-scrollbar { display:none; }
.favorite-card { min-width:215px; min-height:152px; scroll-snap-align:start; padding:16px; border-radius:20px; background:linear-gradient(145deg,rgba(11,43,86,.96),rgba(5,21,45,.98)); border-color:rgba(46,133,255,.32); box-shadow:0 15px 34px rgba(0,0,0,.24); }
.favorite-card.green { background:linear-gradient(145deg,rgba(5,73,71,.94),rgba(4,29,42,.98)); border-color:rgba(39,221,176,.3); }
.favorite-card.purple { background:linear-gradient(145deg,rgba(65,29,116,.94),rgba(22,15,54,.98)); border-color:rgba(164,71,255,.34); }
.favorite-card.gold { background:linear-gradient(145deg,rgba(91,58,10,.94),rgba(35,25,8,.98)); }
.favorite-card b { font-size:23px; }
.scope-accounts-link { color:#83b6ff; }
.month-overview { margin-top:19px; border:1px solid rgba(105,154,225,.18); border-radius:22px; background:linear-gradient(145deg,rgba(9,30,59,.94),rgba(5,20,40,.98)); padding:17px 18px; box-shadow:0 15px 35px rgba(0,0,0,.22); }
.month-overview-heading { display:flex; justify-content:space-between; align-items:center; gap:14px; margin-bottom:13px; }
.month-overview-heading h2 { font-size:21px; }
.month-overview-heading button { color:#6daeff; }
.month-kpis { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
.month-kpi { padding:4px 14px; text-align:center; border-right:1px solid rgba(105,154,225,.14); }
.month-kpi:first-child { padding-left:0; }
.month-kpi:last-child { padding-right:0; border-right:0; }
.month-kpi small { display:block; color:var(--muted); margin-bottom:7px; }
.month-kpi strong { display:block; font-size:clamp(17px,3.5vw,23px); white-space:nowrap; }
.month-kpi.income strong,.month-kpi.result.positive strong { color:var(--green); }
.month-kpi.expense strong,.month-kpi.result.negative strong { color:var(--red); }
.reimbursement-banner,.backup-reminder { margin-top:15px; }
.movements-panel { padding-bottom:8px; }
.movements-panel .heading-with-icon .small-icon { display:none; }
#movementsTitle { font-size:23px; }
.movement-tools select { display:none; }
.movement-list { overflow:hidden; border:1px solid rgba(105,154,225,.17); border-radius:22px; background:linear-gradient(145deg,rgba(8,27,53,.95),rgba(4,18,37,.98)); box-shadow:0 15px 35px rgba(0,0,0,.22); gap:0; }
.movement-row { border:0; border-bottom:1px solid rgba(105,154,225,.12); border-radius:0; background:transparent; padding:14px 15px; }
.movement-row:last-child { border-bottom:0; }
.bottom-nav { height:calc(72px + env(safe-area-inset-bottom)); background:rgba(3,14,31,.96); border-color:rgba(105,154,225,.16); box-shadow:0 -16px 38px rgba(0,0,0,.32); }
.nav-item small { font-size:11px; }
.quick-action-fab { position:fixed; z-index:48; left:50%; bottom:calc(81px + env(safe-area-inset-bottom)); transform:translateX(-50%); width:70px; height:70px; border-radius:50%; border:1px solid rgba(111,255,223,.68); background:linear-gradient(145deg,#43ecc1,#08b88c); color:#fff; display:grid; place-items:center; cursor:pointer; box-shadow:0 0 0 8px rgba(7,31,55,.9),0 12px 35px rgba(17,221,173,.4); transition:transform .2s ease,filter .2s ease; }
.quick-action-fab span { font-size:45px; line-height:1; font-weight:250; transform:translateY(-2px); transition:transform .22s ease; }
body.quick-actions-open .quick-action-fab span { transform:rotate(45deg) translate(-1px,-1px); }
.quick-action-fab:active { transform:translateX(-50%) scale(.96); }
.quick-action-overlay { position:fixed; inset:0; z-index:46; display:flex; align-items:flex-end; justify-content:center; padding:20px 20px calc(166px + env(safe-area-inset-bottom)); background:rgba(0,7,18,.56); backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px); opacity:1; transition:opacity .2s ease; }
.quick-action-overlay.hidden { display:none; }
.quick-action-backdrop { position:absolute; inset:0; border:0; background:transparent; cursor:default; }
.quick-action-menu { position:relative; z-index:1; width:min(100%,360px); display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; animation:quickMenuIn .2s ease both; }
.quick-action { min-height:116px; border-radius:22px; padding:16px 10px; border:1px solid rgba(255,255,255,.2); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:9px; text-align:center; cursor:pointer; box-shadow:0 18px 40px rgba(0,0,0,.34); }
.quick-action > span { width:49px; height:49px; border-radius:50%; display:grid; place-items:center; background:rgba(255,255,255,.14); font-size:34px; }
.quick-action strong { font-size:17px; }
.quick-action small { display:none; }
.quick-action.expense { background:linear-gradient(145deg,rgba(204,59,73,.98),rgba(121,26,42,.98)); }
.quick-action.income { background:linear-gradient(145deg,rgba(35,184,102,.98),rgba(14,102,62,.98)); }
.quick-action.photo { background:linear-gradient(145deg,rgba(151,66,235,.98),rgba(82,31,153,.98)); }
.quick-action.transfer { background:linear-gradient(145deg,rgba(48,128,240,.98),rgba(19,70,164,.98)); }
.quick-action.reminder { grid-column:1 / -1; min-height:88px; flex-direction:row; background:linear-gradient(145deg,rgba(213,146,28,.98),rgba(137,82,12,.98)); border-color:rgba(255,202,84,.5); }
.quick-action.reminder > span { flex:0 0 auto; }
.quick-action.reminder small { display:block; color:rgba(255,255,255,.82); }
@keyframes quickMenuIn { from { transform:translateY(18px) scale(.96); opacity:0; } to { transform:none; opacity:1; } }
@media (max-width:620px) {
  .app-shell { padding:17px 14px calc(104px + env(safe-area-inset-bottom)); }
  .topbar { align-items:flex-start; }
  .top-actions { gap:6px; }
  .icon-button { width:44px; height:44px; border-radius:15px; }
  .finance-balance-card { min-height:246px; padding:20px; border-radius:23px; }
  .balance-card-value { font-size:43px; }
  .balance-chart { height:88px; }
  .favorite-card { min-width:178px; min-height:144px; }
  .month-overview { padding:15px 12px; }
  .month-kpi { padding:3px 8px; }
  .month-kpi small { font-size:12px; }
  .month-kpi strong { font-size:16px; }
  .movement-row { padding:13px 12px; }
  .quick-action-fab { width:66px; height:66px; bottom:calc(74px + env(safe-area-inset-bottom)); }
  .quick-action-overlay { padding-bottom:calc(151px + env(safe-area-inset-bottom)); }
}
@media (max-width:390px) {
  .brand-copy h1 { font-size:29px; }
  .brand-copy p { font-size:16px; }
  .top-actions .badge-button { display:none; }
  .balance-card-value { font-size:38px; }
  .balance-card-delta { font-size:12px; }
  .favorite-card { min-width:166px; }
  .month-kpi strong { font-size:14px; }
  .nav-item small { font-size:10px; }
}


/* v0.6.5 — pulsante + integrato nella fascia inferiore */
.app-shell { padding-bottom:calc(130px + env(safe-area-inset-bottom)); }
.bottom-nav {
  z-index:47;
  height:calc(94px + env(safe-area-inset-bottom));
  grid-template-columns:repeat(6,minmax(0,1fr));
  align-items:center;
  padding-top:8px;
  padding-bottom:env(safe-area-inset-bottom);
}
.quick-action-fab {
  position:relative;
  z-index:3;
  left:auto;
  bottom:auto;
  transform:none;
  justify-self:center;
  align-self:center;
  width:70px;
  height:70px;
  margin:0;
  border:1px solid rgba(255,231,154,.95);
  background:linear-gradient(145deg,#ffe477,#f4b51f 58%,#d98b05);
  color:#2c1b00;
  box-shadow:0 0 0 5px rgba(65,45,6,.56),0 9px 27px rgba(244,181,31,.38),inset 0 1px rgba(255,255,255,.68);
}
.quick-action-fab span { font-size:46px; font-weight:320; text-shadow:0 1px rgba(255,255,255,.35); }
.quick-action-fab:active { transform:scale(.96); }
body.quick-actions-open .quick-action-fab span { transform:rotate(45deg) translate(-1px,-1px); }
body.quick-actions-open .bottom-nav .nav-item { opacity:.24; filter:blur(1px); pointer-events:none; }
.quick-action-overlay { z-index:46; padding-bottom:calc(112px + env(safe-area-inset-bottom)); }
@media (max-width:620px) {
  .app-shell { padding-bottom:calc(118px + env(safe-area-inset-bottom)); }
  .bottom-nav { height:calc(88px + env(safe-area-inset-bottom)); padding-top:6px; }
  .quick-action-fab { width:66px; height:66px; }
  .quick-action-overlay { padding-bottom:calc(104px + env(safe-area-inset-bottom)); }
}
@media (max-width:390px) {
  .bottom-nav { height:calc(86px + env(safe-area-inset-bottom)); padding-left:5px; padding-right:5px; }
  .quick-action-fab { width:62px; height:62px; }
  .quick-action-fab span { font-size:42px; }
  .nav-item small { font-size:9px; }
}


/* v0.6.5 — centro aggiornamenti */
.update-card { width:min(760px,calc(100vw - 24px)); }
.update-overview { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:4px 0 14px; }
.update-version-card { border:1px solid var(--line); border-radius:18px; padding:15px; background:rgba(255,255,255,.025); }
.update-version-card small { display:block; color:var(--muted); margin-bottom:7px; }
.update-version-card strong { display:block; font-size:22px; }
.update-state-line { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; margin:10px 0 15px; }
.update-status-badge { display:inline-flex; align-items:center; gap:8px; min-height:34px; padding:7px 12px; border-radius:999px; border:1px solid rgba(95,212,177,.34); background:rgba(49,186,143,.12); color:#83e8c5; font-weight:750; }
.update-status-badge.available { border-color:rgba(255,198,65,.46); background:rgba(255,190,37,.13); color:#ffd873; }
.update-status-badge.error { border-color:rgba(255,105,122,.42); background:rgba(205,55,73,.13); color:#ff9fac; }
.update-state-line small { color:var(--muted); }
.update-release-panel { border:1px solid var(--line); border-radius:18px; padding:16px; background:rgba(255,255,255,.025); margin-bottom:14px; }
.update-release-panel h3 { margin:0 0 5px; font-size:18px; }
.update-release-panel p { margin:0 0 10px; color:var(--muted); }
.update-release-panel ul { margin:0; padding-left:20px; display:grid; gap:7px; color:#dce8f7; }
.update-options { display:grid; gap:9px; margin:14px 0; }
.update-option-row { display:flex; align-items:flex-start; gap:11px; padding:12px 13px; border:1px solid var(--line); border-radius:15px; background:rgba(255,255,255,.02); cursor:pointer; }
.update-option-row input { margin-top:3px; accent-color:#f4bd28; }
.update-option-row span { display:flex; flex-direction:column; gap:3px; }
.update-option-row small { color:var(--muted); }
.update-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:14px; }
.update-message { min-height:22px; margin:12px 0 0; color:var(--muted); }
.update-message.good { color:#78ddb9; }
.update-message.warn { color:#ffd477; }
.update-message.bad { color:#ff9fac; }
@media (max-width:620px) {
  .update-overview { grid-template-columns:1fr; }
  .update-actions > * { width:100%; }
}


/* Agenda e promemoria locali — v0.6.8 */
.agenda-home-panel { margin:16px 0; overflow:hidden; }
.agenda-home-heading { margin-bottom:12px; }
.agenda-home-heading .heading-with-icon > div { display:flex; flex-direction:column; gap:2px; }
.agenda-home-heading small { color:var(--muted); }
.agenda-heading-icon { width:42px; height:42px; border-radius:14px; display:grid; place-items:center; color:#ffd15c; background:rgba(255,189,55,.12); border:1px solid rgba(255,189,55,.26); font-size:23px; }
.agenda-home-list { display:grid; gap:8px; }
.agenda-home-row { width:100%; display:grid; grid-template-columns:auto minmax(0,1fr) auto auto; gap:11px; align-items:center; padding:12px 13px; border:1px solid rgba(145,167,205,.14); border-radius:16px; background:rgba(255,255,255,.025); text-align:left; cursor:pointer; }
.agenda-home-row:hover { border-color:rgba(50,133,255,.42); background:rgba(50,133,255,.06); }
.agenda-item-icon { width:38px; height:38px; border-radius:13px; display:grid; place-items:center; font-size:18px; background:rgba(50,133,255,.12); color:#72adff; }
.agenda-item-icon.financial { color:#54d783; background:rgba(50,208,109,.12); }
.agenda-item-icon.voice { color:#c58cff; background:rgba(165,92,255,.12); }
.agenda-item-icon.reimbursement { color:#ffd05d; background:rgba(255,189,55,.12); }
.agenda-item-copy { min-width:0; display:flex; flex-direction:column; gap:3px; }
.agenda-item-copy strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.agenda-item-copy small { color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.agenda-item-date { display:flex; flex-direction:column; align-items:flex-end; gap:2px; color:#d8e4f6; font-size:13px; white-space:nowrap; }
.agenda-item-date b { font-size:14px; }
.agenda-item-amount { font-size:15px; color:#dbe9f7; white-space:nowrap; }
.agenda-empty { padding:17px; border:1px dashed rgba(145,167,205,.2); border-radius:17px; text-align:center; color:var(--muted); }
.agenda-empty strong { display:block; color:#e7eef8; margin-bottom:4px; }
.agenda-home-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top:12px; }
.agenda-add-button { display:inline-flex; gap:7px; align-items:center; justify-content:center; }
.agenda-add-button span { color:#ffd15c; font-size:18px; }
.agenda-security-alert { width:100%; margin-top:11px; padding:10px 12px; display:grid; grid-template-columns:auto 1fr auto; gap:10px; align-items:center; border:1px solid rgba(255,189,55,.28); border-radius:14px; background:rgba(103,67,11,.18); text-align:left; cursor:pointer; }
.agenda-security-alert > span:first-child { width:27px; height:27px; border-radius:50%; display:grid; place-items:center; background:rgba(255,189,55,.15); color:#ffd15c; font-weight:800; }
.agenda-security-alert > span:nth-child(2) { display:flex; flex-direction:column; gap:2px; }
.agenda-security-alert small { color:#c9c2b3; }
.agenda-security-alert b { color:#ffd15c; }
.agenda-card { max-width:860px; }
.agenda-privacy-note { display:flex; gap:12px; align-items:flex-start; padding:13px 14px; border:1px solid rgba(50,208,109,.24); border-radius:17px; background:rgba(50,208,109,.06); margin-bottom:14px; }
.agenda-privacy-note > span { color:#52da84; font-size:24px; }
.agenda-privacy-note p { margin:0; display:flex; flex-direction:column; gap:3px; }
.agenda-privacy-note small { color:var(--muted); }
.agenda-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:14px; }
.agenda-filters { display:flex; flex-wrap:wrap; gap:7px; }
.agenda-filters button { border:1px solid var(--line); border-radius:999px; background:rgba(255,255,255,.025); padding:9px 13px; color:var(--muted); cursor:pointer; }
.agenda-filters button.active { color:#08111f; background:#ffd15c; border-color:#ffd15c; font-weight:750; }
.agenda-toolbar-actions { display:flex; gap:8px; }
.agenda-list { display:grid; gap:9px; max-height:min(58vh,620px); overflow:auto; padding-right:2px; }
.agenda-list-row { display:grid; grid-template-columns:auto minmax(0,1fr) auto auto; align-items:center; gap:12px; padding:13px; border:1px solid rgba(145,167,205,.15); border-radius:17px; background:rgba(255,255,255,.025); cursor:pointer; text-align:left; }
.agenda-list-row:hover { border-color:rgba(50,133,255,.42); }
.agenda-list-row.completed { opacity:.56; }
.agenda-list-row.overdue { border-color:rgba(255,93,93,.32); }
.agenda-list-copy { min-width:0; display:flex; flex-direction:column; gap:4px; }
.agenda-list-copy strong { font-size:16px; }
.agenda-list-copy small { color:var(--muted); }
.agenda-list-copy em { display:inline-flex; width:max-content; border-radius:999px; padding:3px 8px; font-size:11px; font-style:normal; color:#ffd15c; background:rgba(255,189,55,.1); }
.agenda-notification-note { margin:13px 0 0; color:var(--muted); font-size:12px; }
.agenda-notification-button { padding-left:0; }
.agenda-type-switch { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-bottom:15px; }
.agenda-type-switch button { border:1px solid var(--line); border-radius:15px; padding:12px; background:rgba(255,255,255,.02); color:var(--muted); cursor:pointer; }
.agenda-type-switch button.active { border-color:rgba(255,189,55,.52); color:#fff3cf; background:rgba(255,189,55,.09); }
.agenda-form-grid { align-items:start; }
.voice-recorder-panel { margin:14px 0; padding:15px; border:1px solid rgba(165,92,255,.24); border-radius:18px; background:rgba(165,92,255,.055); }
.voice-recorder-heading { display:flex; align-items:center; gap:11px; }
.voice-recorder-heading > span:last-child { display:flex; flex-direction:column; gap:2px; }
.voice-recorder-heading small { color:var(--muted); }
.voice-recorder-icon { width:34px; height:34px; border-radius:50%; display:grid; place-items:center; color:#d4a9ff; background:rgba(165,92,255,.13); }
.voice-recorder-actions { display:flex; gap:9px; flex-wrap:wrap; margin-top:12px; }
.voice-recording-status { margin-top:10px; color:var(--muted); font-size:13px; }
.voice-recording-status.recording { color:#ff9dac; }
.voice-recorder-panel audio, .agenda-detail-card audio { width:100%; margin-top:11px; }
.agenda-financial-fields { margin-top:14px; padding-top:14px; border-top:1px solid var(--line); }
.agenda-editor-actions .modal-spacer { flex:1; }
.agenda-detail-content { display:grid; gap:9px; }
.agenda-detail-line { display:grid; grid-template-columns:130px 1fr; gap:12px; padding-bottom:9px; border-bottom:1px solid rgba(145,167,205,.11); }
.agenda-detail-line span { color:var(--muted); }
.agenda-detail-note { padding:13px; border-radius:15px; background:rgba(255,255,255,.025); color:#dce7f5; white-space:pre-wrap; }
.agenda-detail-actions { flex-wrap:wrap; }
@media (max-width:620px) {
  .agenda-home-row, .agenda-list-row { grid-template-columns:auto minmax(0,1fr) auto; }
  .agenda-item-amount { grid-column:2 / -1; justify-self:start; }
  .agenda-home-actions > * { flex:1 1 100%; }
  .agenda-toolbar-actions { width:100%; }
  .agenda-toolbar-actions > * { flex:1; }
  .agenda-type-switch { grid-template-columns:1fr; }
  .agenda-detail-line { grid-template-columns:1fr; gap:3px; }
}


/* Calendario Agenda — v0.6.8 */
.agenda-calendar-card { max-width:1120px; width:min(96vw,1120px); }
.agenda-privacy-note.compact { margin-bottom:12px; padding:10px 12px; }
.agenda-calendar-toolbar { display:grid; grid-template-columns:minmax(260px,1fr) auto auto; gap:12px; align-items:center; margin-bottom:12px; }
.agenda-period-controls { display:flex; align-items:center; gap:8px; min-width:0; }
.agenda-period-controls > strong { min-width:170px; text-align:center; font-size:17px; text-transform:none; }
.compact-button { min-height:40px; padding:8px 13px; }
.agenda-nav-button { width:40px; height:40px; border:1px solid var(--line); border-radius:13px; background:rgba(255,255,255,.025); font-size:25px; line-height:1; cursor:pointer; }
.agenda-nav-button:disabled { opacity:.35; cursor:not-allowed; }
.agenda-view-switch { display:flex; gap:4px; padding:4px; border:1px solid var(--line); border-radius:15px; background:rgba(255,255,255,.02); }
.agenda-view-switch button { border:0; border-radius:11px; padding:8px 12px; color:var(--muted); background:transparent; cursor:pointer; }
.agenda-view-switch button.active { color:#07111f; background:#ffd15c; font-weight:800; }
.agenda-active-filters { display:flex; flex-wrap:wrap; gap:7px; margin:0 0 12px; }
.agenda-active-filters button { display:inline-flex; gap:8px; align-items:center; border:1px solid rgba(50,133,255,.28); border-radius:999px; padding:7px 10px; color:#cfe0fa; background:rgba(50,133,255,.08); cursor:pointer; }
.agenda-active-filters span { color:#8fb6ef; font-size:17px; }
.agenda-filter-panel { margin:0 0 13px; padding:14px; border:1px solid rgba(145,167,205,.18); border-radius:18px; background:rgba(5,13,25,.72); }
.agenda-filter-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:11px; }
.agenda-filter-grid label { display:grid; gap:6px; color:var(--muted); font-size:12px; }
.agenda-filter-grid select { width:100%; min-width:0; }
.agenda-filter-actions { display:flex; align-items:center; justify-content:flex-end; gap:10px; margin-top:12px; }
.agenda-create-actions { display:flex; justify-content:flex-end; gap:8px; margin-bottom:12px; }
.agenda-calendar-content { min-height:360px; max-height:min(66vh,760px); overflow:auto; padding-right:3px; }
.agenda-view-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:14px; margin:2px 0 13px; }
.agenda-view-heading h3 { margin:3px 0 0; font-size:21px; text-transform:none; }
.agenda-view-heading.compact h3 { font-size:18px; }
.agenda-view-count { min-width:34px; height:30px; padding:0 9px; border-radius:999px; display:grid; place-items:center; color:#ffd15c; background:rgba(255,189,55,.1); }
.agenda-weekdays { display:grid; grid-template-columns:repeat(7,1fr); gap:6px; margin-bottom:6px; color:var(--muted); text-align:center; font-size:12px; font-weight:700; }
.agenda-month-grid { display:grid; grid-template-columns:repeat(7,minmax(100px,1fr)); gap:6px; min-width:760px; }
.agenda-month-day { min-height:126px; padding:7px; border:1px solid rgba(145,167,205,.14); border-radius:15px; background:rgba(255,255,255,.018); overflow:hidden; }
.agenda-month-day.outside { opacity:.38; }
.agenda-month-day.today { border-color:rgba(255,189,55,.55); }
.agenda-month-day.selected { box-shadow:inset 0 0 0 2px rgba(50,133,255,.6); background:rgba(50,133,255,.055); }
.agenda-date-button { width:100%; display:flex; justify-content:space-between; align-items:center; border:0; padding:0 1px 5px; color:#dce8f7; background:transparent; cursor:pointer; }
.agenda-date-button strong { width:28px; height:28px; border-radius:50%; display:grid; place-items:center; }
.agenda-month-day.today .agenda-date-button strong { color:#08111f; background:#ffd15c; }
.agenda-date-button span { color:var(--muted); font-size:11px; }
.agenda-day-totals { display:block; margin:0 1px 5px; color:#9eb3cc; font-size:10px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.agenda-month-events,.agenda-week-events { display:grid; gap:4px; }
.agenda-calendar-event { width:100%; min-width:0; display:grid; grid-template-columns:auto auto minmax(0,1fr); gap:5px; align-items:center; border:1px solid rgba(50,133,255,.18); border-radius:9px; padding:5px 6px; color:#dce9fb; background:rgba(50,133,255,.07); text-align:left; cursor:pointer; overflow:hidden; }
.agenda-calendar-event.financial { border-color:rgba(50,208,109,.2); background:rgba(50,208,109,.065); }
.agenda-calendar-event.reimbursement { border-color:rgba(255,189,55,.23); background:rgba(255,189,55,.065); }
.agenda-calendar-event.voice { border-color:rgba(165,92,255,.22); background:rgba(165,92,255,.065); }
.agenda-calendar-event.completed { opacity:.48; text-decoration:line-through; }
.agenda-calendar-event > span { font-size:11px; }
.agenda-calendar-event > b { color:#a9bdd7; font-size:9px; font-weight:700; }
.agenda-calendar-event > em { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:10px; font-style:normal; }
.agenda-calendar-event > strong { grid-column:2/-1; color:#d9e7f7; font-size:9px; font-weight:700; }
.agenda-more-events,.agenda-no-events { color:var(--muted); font-size:10px; padding:3px 4px; }
.agenda-selected-day { margin-top:14px; padding-top:14px; border-top:1px solid var(--line); }
.agenda-week-grid { display:grid; grid-template-columns:repeat(7,minmax(140px,1fr)); gap:7px; min-width:980px; }
.agenda-week-day { min-height:390px; padding:8px; border:1px solid rgba(145,167,205,.14); border-radius:16px; background:rgba(255,255,255,.018); }
.agenda-week-day.selected { border-color:rgba(50,133,255,.62); background:rgba(50,133,255,.05); }
.agenda-week-day.today { box-shadow:inset 0 3px 0 #ffd15c; }
.agenda-week-heading { width:100%; display:grid; grid-template-columns:1fr auto; align-items:center; gap:3px; border:0; padding:4px 3px 9px; color:#dce8f7; background:transparent; text-align:left; cursor:pointer; }
.agenda-week-heading > span { color:var(--muted); font-size:11px; text-transform:uppercase; }
.agenda-week-heading > strong { grid-row:1/3; grid-column:2; width:31px; height:31px; border-radius:50%; display:grid; place-items:center; font-size:16px; }
.agenda-week-day.today .agenda-week-heading > strong { color:#08111f; background:#ffd15c; }
.agenda-week-heading .agenda-day-totals { margin:0; }
.agenda-day-view,.agenda-list-view { max-width:820px; margin:0 auto; }
.agenda-list-group { margin-bottom:18px; }
.agenda-list-group-heading { display:flex; justify-content:space-between; align-items:center; margin:0 0 8px; padding:0 3px; }
.agenda-list-group-heading h3 { margin:0; font-size:16px; text-transform:none; }
.agenda-list-group-heading span { color:var(--muted); }
.agenda-view-empty { min-height:120px; display:grid; place-content:center; }
@media (max-width:850px) {
  .agenda-calendar-toolbar { grid-template-columns:1fr auto; }
  .agenda-view-switch { grid-column:1/-1; order:3; justify-content:stretch; }
  .agenda-view-switch button { flex:1; }
  .agenda-filter-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:620px) {
  .agenda-calendar-card { width:100%; max-width:none; min-height:100dvh; border-radius:0; }
  .agenda-calendar-toolbar { grid-template-columns:1fr auto; }
  .agenda-period-controls > strong { min-width:0; flex:1; font-size:15px; }
  .agenda-period-controls .secondary-button { display:none; }
  .agenda-view-switch { overflow:auto; }
  .agenda-view-switch button { min-width:max-content; padding:8px 11px; }
  .agenda-filter-grid { grid-template-columns:1fr; }
  .agenda-create-actions > * { flex:1; }
  .agenda-calendar-content { max-height:none; overflow:visible; }
  .agenda-month-grid { min-width:0; grid-template-columns:repeat(7,minmax(0,1fr)); gap:3px; }
  .agenda-weekdays { gap:3px; }
  .agenda-month-day { min-height:72px; padding:4px 3px; border-radius:10px; }
  .agenda-date-button strong { width:24px; height:24px; font-size:12px; }
  .agenda-date-button span { display:none; }
  .agenda-month-day .agenda-day-totals { display:none; }
  .agenda-month-events { display:flex; gap:3px; padding:2px; }
  .agenda-month-events .agenda-calendar-event { width:7px; height:7px; min-height:0; padding:0; border:0; border-radius:50%; background:#3285ff; }
  .agenda-month-events .agenda-calendar-event.financial { background:#32d06d; }
  .agenda-month-events .agenda-calendar-event.reimbursement { background:#ffbd37; }
  .agenda-month-events .agenda-calendar-event.voice { background:#a55cff; }
  .agenda-month-events .agenda-calendar-event > * { display:none; }
  .agenda-month-events .agenda-more-events { font-size:8px; padding:0; }
  .agenda-week-grid { min-width:0; display:flex; overflow-x:auto; scroll-snap-type:x mandatory; padding-bottom:5px; }
  .agenda-week-day { flex:0 0 82%; min-height:360px; scroll-snap-align:start; }
}


/* v0.7.0 — Local Foundation e rimborsi collegati */
.bottom-nav {
  grid-template-columns:repeat(7,minmax(0,1fr));
}
.nav-item { min-width:0; }
.nav-item small { white-space:nowrap; }
.nav-agenda::before { content:"◷"; font-size:29px; position:absolute; left:-1px; top:-6px; }
.notification-center-list { display:flex; flex-direction:column; gap:10px; }
.notification-center-empty { margin:0; padding:18px; border:1px solid var(--line); border-radius:16px; color:var(--muted); background:rgba(255,255,255,.025); }
.notification-center-card { width:100%; display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:12px; padding:13px 14px; border:1px solid var(--line); border-radius:17px; background:rgba(255,255,255,.03); color:var(--text); text-align:left; }
.notification-center-card > span:first-child { width:40px; height:40px; border-radius:13px; display:grid; place-items:center; background:rgba(50,133,255,.14); color:#8bbcff; font-size:20px; }
.notification-center-card > span:nth-child(2) { min-width:0; display:flex; flex-direction:column; gap:4px; }
.notification-center-card strong { color:#eaf2ff; }
.notification-center-card small { color:var(--muted); line-height:1.35; }
.notification-center-card b { color:#89b9ff; font-size:13px; }
button.notification-center-card { cursor:pointer; }
.notification-center-card.backup { border-color:rgba(255,189,55,.3); background:linear-gradient(100deg,rgba(255,189,55,.1),rgba(255,143,31,.035)); }
.notification-center-card.backup > span:first-child { background:rgba(255,189,55,.17); color:#ffd66d; }
.notification-center-card.backup b { color:#ffd66d; }
@media (max-width:390px) {
  .top-actions .icon-button.badge-button:nth-child(2) { display:grid; }
  .top-actions { gap:3px; }
  .icon-button { width:44px; height:44px; border-radius:14px; }
  .bottom-nav { padding-left:2px; padding-right:2px; }
  .nav-item small { font-size:8px; }
}

/* v0.7.0 — Local Foundation e rimborsi collegati */
.reimbursement-details { margin-top: 14px; padding: 16px; border: 1px solid rgba(255,189,55,.28); border-radius: 18px; background: rgba(255,189,55,.07); }
.reimbursement-details-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.reimbursement-details-heading > span { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--gold); background: rgba(255,189,55,.12); font-size: 22px; }
.reimbursement-details-heading strong, .reimbursement-details-heading small { display: block; }
.reimbursement-details-heading small { color: var(--muted); margin-top: 3px; }
.reimburse-tag.completed { color: var(--green); border-color: rgba(50,208,109,.28); background: rgba(50,208,109,.08); }
.reimbursement-summary { margin-top: 18px; padding: 16px; border-radius: 18px; border: 1px solid rgba(255,189,55,.25); background: rgba(255,189,55,.06); }
.reimbursement-summary h3 { margin: 0 0 10px; }
.reimbursement-summary p { margin: 8px 0; }
.reimbursement-summary .primary-button { width: 100%; margin-top: 10px; }
.reimbursement-complete-note { color: var(--green); font-weight: 700; }
.deployment-mode-section { margin-top: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: rgba(50,133,255,.06); }
.deployment-mode-section h3 { margin: 0 0 12px; }
.deployment-mode-card { display: flex; align-items: center; gap: 13px; }
.deployment-mode-card > span:first-child { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(50,133,255,.14); color: var(--blue); font-size: 22px; }
.deployment-mode-card strong, .deployment-mode-card small { display: block; }
.deployment-mode-card small { margin-top: 4px; color: var(--muted); line-height: 1.4; }
.migration-section { border-color: rgba(50,133,255,.28); background: rgba(50,133,255,.05); }
@media (max-width: 520px) {
  .reimbursement-details { padding: 14px; }
  .backup-status-grid { grid-template-columns: 1fr 1fr; }
}

/* v0.7.1 — Correzione impaginazione Agenda su smartphone */
@media (max-width: 760px) {
  #agendaDialog {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    padding: 0;
    overflow: hidden;
  }

  #agendaDialog .agenda-calendar-card {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    margin: 0;
    padding: max(16px, env(safe-area-inset-top)) 16px max(22px, env(safe-area-inset-bottom));
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  #agendaDialog .modal-header {
    gap: 10px;
    margin-bottom: 16px;
  }

  #agendaDialog .modal-header > div {
    min-width: 0;
  }

  #agendaDialog .modal-header h2 {
    font-size: clamp(25px, 7vw, 31px);
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

  #agendaDialog .close-button {
    flex: 0 0 38px;
  }

  #agendaDialog .agenda-privacy-note {
    width: 100%;
    min-width: 0;
  }

  #agendaDialog .agenda-privacy-note p {
    min-width: 0;
  }

  #agendaDialog .agenda-calendar-toolbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 10px;
  }

  #agendaDialog .agenda-period-controls {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    align-items: center;
    width: 100%;
    gap: 8px;
  }

  #agendaDialog .agenda-period-controls > strong {
    min-width: 0;
    width: 100%;
    font-size: 15px;
    line-height: 1.25;
    text-align: center;
    white-space: normal;
  }

  #agendaDialog .agenda-period-controls .secondary-button {
    display: none;
  }

  #agendaDialog .agenda-view-switch {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  #agendaDialog .agenda-view-switch button {
    min-width: 0;
    padding: 10px 3px;
    font-size: 13px;
    line-height: 1.1;
    white-space: normal;
  }

  #agendaDialog #agendaToggleFilters {
    width: 100%;
  }

  #agendaDialog .agenda-create-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 8px;
  }

  #agendaDialog .agenda-create-actions > * {
    width: 100%;
    min-width: 0;
    white-space: normal;
  }

  #agendaDialog .agenda-calendar-content {
    width: 100%;
    min-width: 0;
    min-height: 0;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  #agendaDialog .agenda-week-grid {
    display: grid;
    grid-template-columns: 1fr;
    min-width: 0;
    width: 100%;
    gap: 8px;
    overflow: visible;
    scroll-snap-type: none;
    padding-bottom: 0;
  }

  #agendaDialog .agenda-week-day {
    width: 100%;
    min-width: 0;
    min-height: 96px;
    padding: 9px 10px;
    scroll-snap-align: none;
  }

  #agendaDialog .agenda-week-events:empty::after {
    content: "";
    display: block;
    padding: 5px 3px 3px;
    color: var(--muted);
    font-size: 12px;
  }

  #agendaDialog .agenda-notification-note {
    width: 100%;
    margin-top: 16px;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  #agendaDialog .agenda-notification-button {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 10px 0 2px;
    line-height: 1.35;
    white-space: normal;
    text-align: left;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 390px) {
  #agendaDialog .agenda-calendar-card {
    padding-left: 13px;
    padding-right: 13px;
  }

  #agendaDialog .agenda-view-switch button {
    font-size: 12px;
    padding-left: 1px;
    padding-right: 1px;
  }
}



/* v0.7.3 — Filtri espliciti e linea unica HTTPS */
#agendaToggleFilters { display:inline-flex; align-items:center; justify-content:center; gap:8px; }
.agenda-filter-toggle-icon { font-size:18px; line-height:1; }
.agenda-filter-panel-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:13px; }
.agenda-filter-panel-heading strong { font-size:16px; }
.agenda-filter-close { display:inline-flex; align-items:center; gap:7px; border:1px solid var(--line); border-radius:12px; padding:8px 11px; background:rgba(255,255,255,.035); color:#dce8f7; cursor:pointer; }
.agenda-filter-close span { font-size:18px; line-height:1; }
.https-preview-note { border-color:rgba(50,133,255,.28)!important; background:rgba(50,133,255,.07)!important; }
.https-preview-note > span { color:#65a6ff!important; }
.install-platform-list { margin:13px 0 0; padding-left:20px; color:var(--muted); line-height:1.55; }
.install-platform-list strong { color:var(--text); }
@media (max-width:760px) {
  #agendaDialog .agenda-filter-panel { scroll-margin-top:12px; }
  #agendaDialog .agenda-filter-panel-heading { position:sticky; top:-1px; z-index:2; margin:-4px -4px 13px; padding:8px 4px 10px; background:rgba(5,13,25,.97); }
  #agendaDialog .agenda-filter-actions { margin-top:14px; }
  #agendaDialog .agenda-filter-actions > * { flex:1; }
}


/* v0.7.4 — Movimenti semplici, verticali e coerenti */
#movementDialog .modal-card { width:min(94vw,720px); max-width:720px; }
#movementDialog .movement-guidance { margin-bottom:14px; padding:12px 14px; border-radius:16px; }
#movementDialog .movement-guidance strong { display:block; margin-bottom:2px; }
#movementDialog .movement-guidance span { color:var(--muted); }
.movement-core-flow { display:grid; grid-template-columns:1fr; gap:12px; margin:14px 0; }
.movement-core-flow .flow-field { margin:0; }
.movement-primary-field { padding:14px; border:1px solid rgba(76,137,221,.22); border-radius:18px; background:rgba(15,31,53,.55); }
.movement-primary-field > span:first-child { color:#e8f1ff; font-size:15px; font-weight:800; }
.movement-primary-field select { min-height:54px; margin-top:8px; font-size:16px; font-weight:700; }
.movement-profile-summary { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 14px; border:1px solid rgba(145,167,205,.16); border-radius:15px; background:rgba(255,255,255,.018); }
.movement-profile-summary > span { display:grid; gap:2px; min-width:0; }
.movement-profile-summary small { color:var(--muted); }
.movement-profile-summary strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.movement-profile-summary button { border:0; border-radius:11px; padding:8px 11px; color:#86b7ff; background:rgba(50,133,255,.09); font-weight:750; cursor:pointer; }
.movement-profile-summary button:disabled { opacity:.38; cursor:default; }
.movement-profile-summary.different-profile { border-color:rgba(255,189,55,.35); background:rgba(255,189,55,.055); }
.movement-scope-editor { padding:12px 14px; border:1px solid rgba(255,189,55,.24); border-radius:15px; background:rgba(255,189,55,.045); }
#movementDialog #categoryFieldRow, #movementDialog #counterpartyField, #movementDialog #descriptionNoteField { margin-top:12px; }
#movementDialog #categoryCard { min-height:78px; }
#movementDialog .modal-actions { z-index:3; }
#movementDialog .modal-actions .primary-button { min-height:52px; font-size:16px; }
@media (max-width:620px) {
  #movementDialog { padding:0; }
  #movementDialog .modal-card { width:100%; max-width:none; min-height:100dvh; border-radius:0; padding:18px 16px calc(18px + env(safe-area-inset-bottom)); }
  #movementDialog .modal-header { position:sticky; top:-18px; z-index:4; margin:-18px -16px 12px; padding:18px 16px 12px; background:linear-gradient(180deg,#0d1d32 82%,rgba(13,29,50,0)); }
  #movementDialog .movement-guidance { padding:10px 12px; }
  #movementDialog .movement-guidance span { font-size:13px; }
  #movementDialog .movement-amount-date { grid-template-columns:1fr; }
  #movementDialog .movement-primary-field { padding:12px; }
  #movementDialog .movement-profile-summary { padding:10px 12px; }
  #movementDialog .modal-actions { position:sticky; bottom:calc(-18px - env(safe-area-inset-bottom)); margin:16px -16px calc(-18px - env(safe-area-inset-bottom)); padding:12px 16px calc(12px + env(safe-area-inset-bottom)); background:linear-gradient(0deg,#0d1d32 82%,rgba(13,29,50,0)); }
  #movementDialog #saveMovement { width:100%; }
}


/* v0.7.5 — profilo, conto, beneficiario e rimborso immediato */
.reimbursement-choice-panel { margin:14px 0 4px; padding:14px; border:1px solid rgba(255,189,55,.25); border-radius:17px; background:rgba(255,189,55,.045); }
.reimbursement-choice-panel > label { display:grid; gap:7px; }
.reimbursement-choice-panel select { width:100%; }
.reimbursement-details { margin-top:12px; display:grid; gap:12px; padding-top:12px; border-top:1px solid rgba(255,189,55,.18); }
.reimbursement-association { margin:0; padding:10px 12px; border-radius:13px; color:#dce8f7; background:rgba(255,255,255,.035); line-height:1.4; }
#movementDialog .movement-core-flow { display:grid; gap:12px; }
#movementDialog .flow-field { margin:0; }
#movementDialog #beneficiaryField { padding:12px; border:1px solid rgba(145,167,205,.14); border-radius:16px; background:rgba(255,255,255,.018); }
@media (max-width:620px){
  #movementDialog .movement-core-flow { gap:10px; }
  #movementDialog .movement-primary-field,#movementDialog #beneficiaryField { padding:11px; }
  .reimbursement-choice-panel { padding:12px; }
}


/* v0.7.8 — Modifica movimenti */
.movement-detail-actions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; margin-top:18px; padding-top:15px; border-top:1px solid var(--line); }
.movement-detail-actions button { min-height:46px; }
.movement-audit { display:grid; gap:3px; margin-top:15px; padding:10px 12px; border-radius:13px; background:rgba(255,255,255,.025); color:var(--muted); }
.report-movement { width:100%; border:0; color:inherit; font:inherit; text-align:left; cursor:pointer; }
.report-movement:hover { background:rgba(50,133,255,.07); }
@media (max-width:520px) { .movement-detail-actions { grid-template-columns:1fr 1fr; } .movement-detail-actions .danger-button { grid-column:1/-1; } }


/* v0.7.8 — Benvenuto ContAnt e accesso guidato */
.welcome-dialog::backdrop { background:#020811; }
.welcome-card {
  width:min(calc(100vw - 24px),480px);
  min-height:min(720px,calc(100dvh - 24px));
  display:flex; flex-direction:column; justify-content:center; align-items:stretch;
  overflow:hidden; padding:0; border:1px solid rgba(50,133,255,.34);
  background:
    radial-gradient(circle at 85% 5%,rgba(30,104,255,.32),transparent 34%),
    radial-gradient(circle at 8% 35%,rgba(30,215,184,.12),transparent 30%),
    linear-gradient(165deg,#071a36 0%,#061224 48%,#030a14 100%);
  box-shadow:0 28px 90px rgba(0,0,0,.58);
}
.welcome-hero { padding:34px 28px 20px; text-align:center; }
.welcome-brand-image {
  width:min(100%,390px); max-height:185px; object-fit:cover; object-position:left top;
  border-radius:22px; mix-blend-mode:screen; margin:0 auto 12px; display:block;
}
.welcome-kicker { display:block; color:#77aefc; font-size:12px; letter-spacing:.13em; text-transform:uppercase; }
.welcome-title { margin:9px 0 8px; font-size:clamp(28px,8vw,43px); line-height:1.04; text-transform:none; }
.welcome-copy { margin:0 auto; max-width:360px; color:#b8c8df; font-size:16px; line-height:1.55; }
.welcome-features { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; padding:0 22px 24px; }
.welcome-feature { min-width:0; padding:12px 8px; border:1px solid rgba(145,167,205,.14); border-radius:15px; background:rgba(255,255,255,.025); text-align:center; }
.welcome-feature b { display:block; color:#52dfae; font-size:18px; margin-bottom:4px; }
.welcome-feature span { color:#c9d6e8; font-size:11px; line-height:1.25; }
.welcome-standard-content { display:contents; }
.welcome-install-invite {
  margin:0 28px 24px; padding:20px; border:1px solid rgba(82,223,174,.32); border-radius:18px;
  background:linear-gradient(145deg,rgba(16,43,68,.96),rgba(6,25,43,.96)); text-align:center;
}
.welcome-install-eyebrow { display:block; color:#7fe9c4; font-size:11px; font-weight:800; letter-spacing:.11em; text-transform:uppercase; }
.welcome-install-invite h3 { margin:7px 0 8px; color:#f5f8ff; font-size:22px; line-height:1.15; }
.welcome-install-invite p { margin:0 auto; max-width:350px; color:#b8c8df; font-size:13px; line-height:1.45; }
.welcome-install-actions { display:grid; gap:8px; margin-top:16px; }
.welcome-install-actions button { width:100%; min-height:47px; font-size:14px; font-weight:800; }
.welcome-actions { display:grid; gap:10px; padding:0 28px 30px; }
.welcome-actions button { width:100%; min-height:54px; font-size:16px; font-weight:800; }
.welcome-register { border-color:rgba(82,223,174,.48); color:#8ff0cc; background:rgba(45,203,150,.08); }
.welcome-message { min-height:20px; margin:0 28px 12px; color:#ffbf6e; font-size:13px; line-height:1.4; text-align:center; }
.welcome-foot { margin:0; padding:0 28px 24px; color:#8295b0; font-size:11px; line-height:1.45; text-align:center; }
@media (max-width:520px) {
  .welcome-card { width:100%; min-height:100dvh; border-radius:0; }
  .welcome-hero { padding:calc(24px + env(safe-area-inset-top)) 20px 17px; }
  .welcome-brand-image { max-height:155px; border-radius:17px; }
  .welcome-features { padding:0 14px 20px; gap:6px; }
  .welcome-feature { padding:10px 5px; }
  .welcome-install-invite { margin:0 20px 20px; padding:17px; }
  .welcome-actions { padding:0 20px 24px; }
  .welcome-message { margin-inline:20px; }
}

/* v1.0 RC40 — benvenuto completo e logo proporzionale con altezza utile ridotta */
@media (min-width:521px) and (max-height:900px) {
  .welcome-card {
    min-height:min(640px,calc(100dvh - 16px));
    max-height:calc(100dvh - 16px);
    justify-content:flex-start;
    overflow-x:hidden;
    overflow-y:auto;
    overscroll-behavior:contain;
  }
  .welcome-hero { padding:14px 24px 10px; }
  .welcome-brand-image {
    width:min(100%,300px);
    max-height:none;
    height:auto;
    object-fit:contain;
    object-position:center;
    margin-bottom:7px;
    border-radius:18px;
  }
  .welcome-kicker { font-size:11px; }
  .welcome-title { margin:5px 0 6px; font-size:clamp(28px,5.2vh,36px); }
  .welcome-copy { font-size:14px; line-height:1.35; }
  .welcome-features { padding:0 20px 12px; }
  .welcome-feature { padding:8px 6px; }
  .welcome-feature b { margin-bottom:2px; font-size:16px; }
  .welcome-install-invite { margin:0 24px 12px; padding:14px 16px; }
  .welcome-install-invite h3 { margin:5px 0 6px; font-size:20px; }
  .welcome-install-actions { margin-top:11px; gap:7px; }
  .welcome-install-actions button { min-height:44px; }
  .welcome-actions { gap:7px; padding:0 24px 12px; }
  .welcome-actions button { min-height:46px; font-size:15px; }
  .welcome-message { min-height:0; margin:0 24px 7px; }
  .welcome-message:empty { display:none; }
  .welcome-foot { padding:0 24px 12px; line-height:1.35; }
}

@media (max-width:520px) and (max-height:760px) {
  .welcome-card {
    min-height:100dvh;
    max-height:100dvh;
    justify-content:flex-start;
    overflow-x:hidden;
    overflow-y:auto;
    overscroll-behavior:contain;
  }
  .welcome-hero { padding:calc(12px + env(safe-area-inset-top)) 16px 9px; }
  .welcome-brand-image {
    width:min(100%,260px);
    max-height:none;
    height:auto;
    object-fit:contain;
    object-position:center;
    margin-bottom:7px;
  }
  .welcome-kicker { font-size:10.5px; }
  .welcome-title { margin:5px 0 6px; font-size:clamp(27px,7vw,34px); }
  .welcome-copy { font-size:14px; line-height:1.35; }
  .welcome-features { padding:0 12px 11px; }
  .welcome-feature { padding:7px 4px; }
  .welcome-feature b { margin-bottom:2px; font-size:16px; }
  .welcome-install-invite { margin:0 16px 11px; padding:13px 14px; }
  .welcome-install-invite h3 { margin:4px 0 5px; font-size:19px; }
  .welcome-install-invite p { font-size:12.5px; line-height:1.35; }
  .welcome-install-actions { margin-top:10px; gap:7px; }
  .welcome-install-actions button { min-height:43px; }
  .welcome-actions { gap:7px; padding:0 16px 11px; }
  .welcome-actions button { min-height:45px; font-size:15px; }
  .welcome-message { min-height:0; margin:0 16px 7px; }
  .welcome-message:empty { display:none; }
  .welcome-foot {
    padding:0 16px calc(10px + env(safe-area-inset-bottom));
    font-size:10.5px;
    line-height:1.35;
  }
}

/* v0.7.8 — branding ContAnt nella Home */
.brand-home-title{display:flex;align-items:baseline;gap:0;letter-spacing:-.04em}
.brand-home-title span{color:#f7f9ff}
.brand-home-title strong{color:#58d99c;font-weight:800}

/* v0.9.0 — maschere compatte e aiuti contestuali */
#movementDialog .field-help,
#movementDialog #categoryHint,
#movementDialog .document-attachment-heading small {
  display:none !important;
}
.field-label-with-info {
  display:flex;
  align-items:center;
  gap:7px;
  min-width:0;
  color:#e8f1ff;
  font-size:14px;
  font-weight:780;
  line-height:1.25;
}
.field-label-with-info > span,
.field-label-with-info > small,
.field-label-with-info > strong { min-width:0; }
.field-info-button {
  flex:0 0 auto;
  --field-info-visual-size:22px;
  --field-info-border-color:rgba(142,184,239,.55);
  --field-info-background:rgba(50,133,255,.08);
  width:44px;
  height:44px;
  margin:-11px;
  position:relative;
  display:inline-grid;
  place-items:center;
  padding:0;
  border:0;
  border-radius:50%;
  color:#aecdff;
  background:transparent;
  font-size:13px;
  font-weight:850;
  line-height:1;
  cursor:pointer;
}
.field-info-button::before {
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  width:var(--field-info-visual-size);
  height:var(--field-info-visual-size);
  border:1px solid var(--field-info-border-color);
  border-radius:50%;
  background:var(--field-info-background);
}
.field-info-button:hover { color:#fff; }
.field-info-button:hover::before { background:rgba(50,133,255,.18); }
.field-info-button:focus-visible { outline:3px solid rgba(50,133,255,.55); outline-offset:-8px; }
#movementDialog .movement-primary-field > .field-label-with-info:first-child { color:#e8f1ff; font-size:15px; font-weight:800; }
#movementDialog .movement-profile-summary .field-label-with-info { color:var(--muted); font-size:12px; font-weight:650; }
#movementDialog .movement-profile-summary .field-info-button { --field-info-visual-size:20px; font-size:12px; }
#movementDialog #categoryFieldRow > .field-label-with-info { margin:0 0 7px 3px; }
#movementDialog #categoryCard { min-height:64px; }
#movementDialog #categoryCard > span:nth-child(2) { gap:0; }
#movementDialog #counterpartyField,
#movementDialog #descriptionNoteField { display:grid; gap:7px; }
#movementDialog .reimbursement-choice-panel > label,
#movementDialog .reimbursement-details label { display:grid; gap:7px; }
.document-attachment-title-row { display:flex; align-items:center; gap:7px; }
.field-help-dialog .modal-card { width:min(92vw,520px); }
.field-help-content { color:#dce8f7; line-height:1.55; }
.field-help-content > p { margin:0; }
.field-help-examples { margin-top:16px; padding:13px 14px; border:1px solid rgba(50,133,255,.22); border-radius:15px; background:rgba(50,133,255,.065); }
.field-help-examples strong { color:#72e0a0; }
.field-help-examples ul { margin:9px 0 0; padding-left:19px; color:#cbd9ec; }
.field-help-examples li + li { margin-top:5px; }
@media (max-width:620px) {
  #movementDialog .movement-guidance { margin-bottom:11px; }
  #movementDialog .movement-core-flow { gap:9px; margin:11px 0; }
  #movementDialog .movement-primary-field { padding:10px 11px; }
  #movementDialog .movement-primary-field select { min-height:50px; margin-top:7px; }
  #movementDialog #beneficiaryField { padding:10px 11px; }
  #movementDialog #categoryCard { min-height:60px; }
  .field-help-dialog { align-items:flex-end; padding:0; }
  .field-help-dialog .modal-card { width:100%; max-width:none; margin:0; border-radius:24px 24px 0 0; padding:20px 18px calc(22px + env(safe-area-inset-bottom)); }
}



/* v0.9.0 — layout coerente delle maschere movimento */
#movementDialog label { margin-bottom:0; }
#movementDialog .movement-guidance { margin-bottom:10px; }
#movementDialog .movement-amount-date { gap:12px; margin-bottom:12px; }
#movementDialog .movement-core-flow { gap:14px; margin:0 0 14px; }
#movementDialog .movement-primary-field,
#movementDialog #beneficiaryField,
#movementDialog #scopeField,
#movementDialog #categoryFieldRow,
#movementDialog #counterpartyField,
#movementDialog #descriptionNoteField,
#movementDialog .reimbursement-choice-panel,
#movementDialog #documentAttachmentPanel {
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
#movementDialog .movement-primary-field > .field-label-with-info:first-child,
#movementDialog #beneficiaryField > .field-label-with-info:first-child,
#movementDialog #scopeField > .field-label-with-info:first-child,
#movementDialog #counterpartyField > .field-label-with-info:first-child,
#movementDialog #descriptionNoteField > .field-label-with-info:first-child,
#movementDialog .reimbursement-choice-panel label > .field-label-with-info:first-child,
#movementDialog #categoryFieldRow > .field-label-with-info:first-child,
#movementDialog .document-attachment-title-row {
  margin:0 0 7px 2px;
}
#movementDialog .movement-primary-field select,
#movementDialog #beneficiaryField select,
#movementDialog #scopeField select,
#movementDialog #counterpartyField select,
#movementDialog #movementReimbursableSelect,
#movementDialog #movementDescription,
#movementDialog #reimbursementDueDate {
  min-height:50px;
}
#movementDialog .movement-profile-summary {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:end;
  gap:10px;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
}
#movementDialog .movement-profile-summary > span { display:grid; gap:7px; min-width:0; }
#movementDialog .movement-profile-summary .field-label-with-info {
  margin:0 0 0 2px;
  color:#e8f1ff;
  font-size:14px;
  font-weight:780;
}
#movementDialog .movement-profile-summary strong {
  min-height:50px;
  display:flex;
  align-items:center;
  padding:13px 14px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#081523;
  color:#f1f6ff;
  font-size:15px;
  font-weight:720;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
#movementDialog .movement-profile-summary button {
  min-height:50px;
  border:1px solid var(--line);
  border-radius:14px;
  padding:0 15px;
  color:#aecdff;
  background:rgba(255,255,255,.035);
  font-weight:760;
}
#movementDialog .movement-profile-summary.different-profile { background:transparent; border:0; }
#movementDialog .movement-profile-summary.different-profile strong { border-color:var(--line); }
#movementDialog .category-card,
#movementDialog .category-card.selected {
  min-height:50px;
  border-color:var(--line);
  background:#081523;
}
#movementDialog .category-card:hover,
#movementDialog .category-card:focus-visible {
  border-color:rgba(142,184,239,.32);
  background:#0a192a;
}
#movementDialog .category-symbol {
  width:44px;
  height:44px;
  background:rgba(145,167,205,.16);
  color:#dce8f7;
}
#movementDialog .category-card.selected .category-symbol {
  background:rgba(50,208,109,.16);
  color:#cbf6da;
}
#movementDialog .category-card i { color:#8fa1ba; font-size:24px; }
#movementDialog .reimbursement-choice-panel { margin-top:2px; }
#movementDialog .reimbursement-details {
  margin-top:10px;
  padding-top:10px;
  border-top:1px solid rgba(145,167,205,.16);
}
#movementDialog .reimbursement-association {
  border:1px solid rgba(145,167,205,.16);
  background:#081523;
}
#movementDialog #documentAttachmentPanel { display:grid; gap:10px; }
#movementDialog .document-attachment-heading {
  display:grid;
  grid-template-columns:24px 1fr;
  gap:10px;
  align-items:start;
}
#movementDialog .document-glyph {
  width:24px;
  height:24px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:rgba(145,167,205,.16);
  color:#dce8f7;
  font-size:12px;
}
#movementDialog .document-attachment-actions {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
#movementDialog .document-attachment-actions .secondary-button {
  min-height:50px;
  background:#081523;
}
#movementDialog #removeDocument { margin-top:-2px; }
@media (max-width:620px){
  #movementDialog .movement-core-flow { gap:12px; margin-bottom:12px; }
  #movementDialog .movement-profile-summary { grid-template-columns:1fr auto; gap:8px; }
  #movementDialog .movement-profile-summary strong,
  #movementDialog .movement-profile-summary button,
  #movementDialog .category-card,
  #movementDialog .document-attachment-actions .secondary-button { min-height:48px; }
}


/* v0.9.0 — conti attivi e storico */
.account-management-section { display:grid; gap:9px; margin-bottom:18px; }
.account-management-section > h3 { margin:0 0 3px; color:#dbe7f7; font-size:15px; text-transform:none; }
.account-management-section.inactive-section { padding-top:15px; border-top:1px solid var(--line); }
.management-row.inactive-account { opacity:.68; }
.management-row-actions { display:flex; gap:7px; flex-wrap:wrap; justify-content:flex-end; }
.management-row-actions button { min-height:36px; }
@media (max-width:620px){
  .management-row-actions { grid-column:2/-1; justify-content:flex-start; }
}


/* v0.9.0 — gerarchia visiva tra titolo del campo e valore selezionato */
#movementDialog .field-label-with-info,
#movementDialog .movement-profile-summary .field-label-with-info,
#movementDialog .document-attachment-title-row {
  color:#8fb7d8;
  font-size:12px;
  font-weight:820;
  line-height:1.2;
  letter-spacing:.075em;
  text-transform:uppercase;
}
#movementDialog .field-label-with-info > span,
#movementDialog .field-label-with-info > small,
#movementDialog .field-label-with-info > strong,
#movementDialog .document-attachment-title-row strong {
  color:inherit;
  font-size:inherit;
  font-weight:inherit;
  letter-spacing:inherit;
  text-transform:inherit;
}
#movementDialog .field-info-button {
  --field-info-visual-size:20px;
  --field-info-border-color:rgba(143,183,216,.58);
  --field-info-background:rgba(91,151,204,.08);
  color:#a9ccec;
  background:transparent;
  font-size:11px;
  font-weight:900;
}
#movementDialog .movement-primary-field > .field-label-with-info:first-child,
#movementDialog .movement-profile-summary .field-label-with-info {
  color:#8fb7d8;
  font-size:12px;
  font-weight:820;
}
#movementDialog select,
#movementDialog input[type="text"],
#movementDialog input[type="date"],
#movementDialog input[type="number"],
#movementDialog textarea,
#movementDialog .movement-profile-summary strong,
#movementDialog .category-card strong {
  color:#f5f8ff;
  font-size:16px;
  font-weight:720;
  letter-spacing:0;
  text-transform:none;
}
#movementDialog select:invalid,
#movementDialog input::placeholder,
#movementDialog textarea::placeholder {
  color:#b5c1d1;
  opacity:1;
  font-weight:620;
}
#movementDialog .category-card em {
  color:#90a3bc;
  font-size:12px;
  font-weight:540;
}
#movementDialog .movement-primary-field > .field-label-with-info:first-child,
#movementDialog #beneficiaryField > .field-label-with-info:first-child,
#movementDialog #scopeField > .field-label-with-info:first-child,
#movementDialog #counterpartyField > .field-label-with-info:first-child,
#movementDialog #descriptionNoteField > .field-label-with-info:first-child,
#movementDialog .reimbursement-choice-panel label > .field-label-with-info:first-child,
#movementDialog #categoryFieldRow > .field-label-with-info:first-child,
#movementDialog .document-attachment-title-row {
  margin-bottom:9px;
}
@media (max-width:620px){
  #movementDialog .field-label-with-info,
  #movementDialog .movement-profile-summary .field-label-with-info,
  #movementDialog .document-attachment-title-row {
    font-size:11.5px;
    letter-spacing:.07em;
  }
  #movementDialog select,
  #movementDialog input[type="text"],
  #movementDialog input[type="date"],
  #movementDialog input[type="number"],
  #movementDialog textarea,
  #movementDialog .movement-profile-summary strong,
  #movementDialog .category-card strong {
    font-size:15.5px;
  }
}


/* v0.9.0 — titoli dei campi stile Home */
#movementDialog .field-label-with-info,
#movementDialog .movement-profile-summary .field-label-with-info,
#movementDialog .document-attachment-title-row {
  color:#f7f9ff;
  font-size:15px;
  font-weight:800;
  line-height:1.25;
  letter-spacing:0;
  text-transform:none;
}
#movementDialog .field-label-with-info > span,
#movementDialog .field-label-with-info > small,
#movementDialog .field-label-with-info > strong,
#movementDialog .document-attachment-title-row strong {
  color:inherit;
  font-size:inherit;
  font-weight:inherit;
  letter-spacing:inherit;
  text-transform:inherit;
}
#movementDialog .field-info-button {
  --field-info-visual-size:21px;
  --field-info-border-color:rgba(151,184,220,.55);
  --field-info-background:rgba(105,145,190,.08);
  color:#a8c2df;
  background:transparent;
  font-size:11px;
  font-weight:900;
}
#movementDialog select,
#movementDialog input[type="text"],
#movementDialog input[type="date"],
#movementDialog input[type="number"],
#movementDialog textarea,
#movementDialog .movement-profile-summary strong,
#movementDialog .category-card strong {
  color:#eef3fb;
  font-size:16px;
  font-weight:680;
  letter-spacing:0;
  text-transform:none;
}
#movementDialog select:invalid,
#movementDialog select.placeholder,
#movementDialog input::placeholder,
#movementDialog textarea::placeholder,
#movementDialog .movement-profile-summary strong:empty,
#movementDialog .category-card em {
  color:#91a6c0;
  opacity:1;
  font-weight:580;
}
#movementDialog .movement-primary-field > .field-label-with-info:first-child,
#movementDialog #beneficiaryField > .field-label-with-info:first-child,
#movementDialog #scopeField > .field-label-with-info:first-child,
#movementDialog #counterpartyField > .field-label-with-info:first-child,
#movementDialog #descriptionNoteField > .field-label-with-info:first-child,
#movementDialog .reimbursement-choice-panel label > .field-label-with-info:first-child,
#movementDialog #categoryFieldRow > .field-label-with-info:first-child,
#movementDialog .document-attachment-title-row {
  margin-bottom:10px;
}
@media (max-width:620px){
  #movementDialog .field-label-with-info,
  #movementDialog .movement-profile-summary .field-label-with-info,
  #movementDialog .document-attachment-title-row {
    font-size:14.5px;
    line-height:1.25;
  }
  #movementDialog select,
  #movementDialog input[type="text"],
  #movementDialog input[type="date"],
  #movementDialog input[type="number"],
  #movementDialog textarea,
  #movementDialog .movement-profile-summary strong,
  #movementDialog .category-card strong {
    font-size:15.5px;
  }
}


/* v0.9.0 — coerenza tipografica e segni cromatici */
.amount-positive { color:#55df8a; }
.amount-negative { color:#ff6b75; }
.amount-neutral { color:#d9e3f0; }
.privacy-hidden .amount-positive,
.privacy-hidden .amount-negative,
.privacy-hidden .amount-neutral { color:transparent !important; }

#movementDialog .field-label-with-info,
#movementDialog .movement-profile-summary .field-label-with-info,
#movementDialog .document-attachment-title-row {
  color:#ffffff !important;
  font-size:17px !important;
  font-weight:820 !important;
  line-height:1.22 !important;
  letter-spacing:-.01em !important;
  text-transform:none !important;
  opacity:1 !important;
}
#movementDialog .field-label-with-info > span,
#movementDialog .field-label-with-info > small,
#movementDialog .field-label-with-info > strong,
#movementDialog .document-attachment-title-row strong {
  color:inherit !important;
  font-size:inherit !important;
  font-weight:inherit !important;
  line-height:inherit !important;
  opacity:1 !important;
}
#movementDialog .field-info-button {
  --field-info-visual-size:22px;
  font-size:11px;
  vertical-align:middle;
}
#movementDialog select,
#movementDialog input[type="text"],
#movementDialog input[type="date"],
#movementDialog input[type="number"],
#movementDialog textarea,
#movementDialog .movement-profile-summary strong,
#movementDialog .category-card strong,
#movementDialog .document-attachment-actions .secondary-button {
  color:#cbd8e8;
  font-size:16px;
  font-weight:520;
  line-height:1.3;
  letter-spacing:0;
  text-transform:none;
}
#movementDialog select:focus,
#movementDialog input:focus,
#movementDialog textarea:focus,
#movementDialog .category-card:focus-visible,
#movementDialog .document-attachment-actions .secondary-button:focus-visible {
  color:#f4f7fc;
}
#movementDialog select:invalid,
#movementDialog input::placeholder,
#movementDialog textarea::placeholder,
#movementDialog .category-card em {
  color:#8fa5c0;
  opacity:1;
  font-weight:500;
}
#movementDialog .document-attachment-actions .secondary-button > span {
  color:#a9bdd4;
}
@media (max-width:620px){
  #movementDialog .field-label-with-info,
  #movementDialog .movement-profile-summary .field-label-with-info,
  #movementDialog .document-attachment-title-row {
    font-size:16.5px !important;
  }
  #movementDialog select,
  #movementDialog input[type="text"],
  #movementDialog input[type="date"],
  #movementDialog input[type="number"],
  #movementDialog textarea,
  #movementDialog .movement-profile-summary strong,
  #movementDialog .category-card strong,
  #movementDialog .document-attachment-actions .secondary-button {
    font-size:15.5px;
  }
}
@media print {
  #reportsDialog .amount-positive { color:#12833d !important; }
  #reportsDialog .amount-negative { color:#c5202f !important; }
  #reportsDialog .amount-neutral { color:#111 !important; }
}

/* v0.9.0 — fondazione beta pubblicabile */
.startup-error-banner {
  position:fixed;left:16px;right:16px;top:16px;z-index:99999;padding:16px;
  border:1px solid #ff6b6b;border-radius:14px;background:#32151c;color:#fff;
  font:600 15px/1.45 system-ui,-apple-system,"Segoe UI",sans-serif;
  box-shadow:0 18px 45px rgba(0,0,0,.38);
}
.welcome-foot a { color:#d7e7fb;text-decoration:underline;text-underline-offset:3px; }
.onboarding-account-section {
  margin:18px 0 6px;padding:16px;border:1px solid rgba(113,158,210,.28);
  border-radius:16px;background:rgba(14,35,61,.58);
}
.onboarding-account-section h3 { margin:0;color:#fff;font-size:17px; }
.onboarding-account-section .section-heading { margin-bottom:12px; }
.onboarding-account-section .section-heading small { color:#9fb2c9; }
.privacy-data-card { max-width:900px; }
.privacy-facts-grid { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:18px; }
.privacy-facts-grid article { min-height:88px;padding:14px;border:1px solid rgba(113,158,210,.25);border-radius:14px;background:rgba(10,29,52,.72);display:flex;flex-direction:column;gap:8px; }
.privacy-facts-grid small { color:#9eb2c9;font-size:12px;text-transform:uppercase;letter-spacing:.055em;font-weight:720; }
.privacy-facts-grid strong { color:#f5f8ff;font-size:15px;line-height:1.35; }
.privacy-data-section { padding:18px 0;border-top:1px solid rgba(113,158,210,.2); }
.privacy-data-section h3 { margin:0 0 8px;color:#fff; }
.privacy-data-section p { color:#afc1d5;line-height:1.55; }
.privacy-data-section .backup-actions { margin-top:12px;display:flex;flex-wrap:wrap;gap:10px; }
.privacy-data-section.danger-zone { border:1px solid rgba(255,92,105,.42);border-radius:16px;padding:16px;background:rgba(96,20,31,.18); }
.privacy-data-section.danger-zone label { margin:12px 0; }
.privacy-data-section.danger-zone input { text-transform:uppercase;letter-spacing:.08em;font-weight:750; }
@media (max-width:760px){
  .privacy-facts-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .privacy-data-section .backup-actions > * { width:100%;justify-content:center;text-align:center; }
}
@media (max-width:430px){
  .privacy-facts-grid { grid-template-columns:1fr; }
  .onboarding-account-section .form-grid { grid-template-columns:1fr; }
}
.cloud-account-card{max-width:720px}.cloud-configuration-notice{display:flex;flex-direction:column;gap:5px;padding:14px 16px;border-radius:14px;margin-bottom:16px}.cloud-configuration-notice.ready{border:1px solid rgba(77,210,133,.4);background:rgba(22,87,50,.24)}.cloud-configuration-notice.pending{border:1px solid rgba(236,184,75,.42);background:rgba(94,69,18,.24)}.cloud-configuration-notice strong{color:#fff}.cloud-configuration-notice span{color:#b9c9da;line-height:1.45}.cloud-auth-section,.cloud-backup-section{padding:16px 0;border-top:1px solid rgba(113,158,210,.2)}.cloud-backup-section h3{margin:0 0 8px;color:#fff}.cloud-backup-section p{color:#afc1d5;line-height:1.55}.cloud-delete-account{margin-top:18px}.cloud-account-card .account-status-row{margin:0}.cloud-account-card .backup-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px}@media(max-width:560px){.cloud-account-card .backup-actions>*{width:100%;justify-content:center}}

/* v1.0 RC6 — Posta del Denaro, cifratura e sincronizzazione */
.money-inbox-panel{overflow:hidden}.money-inbox-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:12px;background:rgba(255,205,49,.14);color:#ffd35a;font-size:18px}.inline-badge{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:#ffd35a;color:#111827;font-size:11px;font-weight:850}.money-inbox-home{display:grid;gap:9px}.money-inbox-home>button,.money-inbox-row{width:100%;display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:11px;align-items:center;text-align:left;border:1px solid rgba(143,183,216,.16);background:rgba(10,28,47,.72);border-radius:15px;padding:11px;color:#f7fbff}.money-inbox-home>button span:nth-child(2),.money-inbox-row span:nth-child(2){display:grid;gap:3px;min-width:0}.money-inbox-home strong,.money-inbox-row strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.money-inbox-home small,.money-inbox-row small{color:#91abc2;line-height:1.35}.money-inbox-item-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:rgba(255,205,49,.12);color:#ffd35a;font-weight:850}.money-inbox-empty{display:grid;gap:4px;padding:13px 3px}.money-inbox-empty small{color:#91abc2;line-height:1.45}.money-inbox-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin:14px 0}.money-inbox-actions button{min-height:50px}.inbox-filter-row{display:flex;gap:8px;overflow:auto;margin:4px 0 12px}.inbox-filter-row button{border:1px solid rgba(143,183,216,.18);background:rgba(10,28,47,.62);color:#9ab4ca;border-radius:999px;padding:8px 12px;white-space:nowrap}.inbox-filter-row button.active{background:rgba(255,205,49,.14);color:#ffe08a;border-color:rgba(255,205,49,.38)}.money-inbox-list{display:grid;gap:9px}.money-inbox-row.filed{opacity:.76}.inbox-review-preview{display:grid;gap:12px;margin-bottom:14px}.inbox-review-preview>div{display:grid;gap:3px;padding:11px 13px;border-radius:13px;background:rgba(46,160,86,.1);border:1px solid rgba(46,160,86,.22)}.inbox-review-preview small{color:#9ab4ca}.inbox-review-preview img{width:100%;max-height:240px;object-fit:contain;border-radius:14px;background:#06101d}.ocr-progress{position:relative;overflow:hidden;border-radius:12px;background:rgba(143,183,216,.1);padding:12px;margin-bottom:12px}.ocr-progress span{position:absolute;inset:0 auto 0 0;width:5%;background:rgba(255,205,49,.2);transition:width .25s}.ocr-progress strong{position:relative}.ocr-debug-panel{display:grid;gap:10px;margin:14px 0;padding:12px;border:1px solid rgba(255,205,49,.32);background:rgba(255,205,49,.06);border-radius:8px}.ocr-debug-panel header{display:flex;align-items:center;justify-content:space-between;gap:12px}.ocr-debug-panel p{margin:0;color:#9ab4ca;font-size:12px;line-height:1.45}.ocr-debug-panel img{width:100%;max-height:280px;object-fit:contain;background:#06101d;border-radius:6px}.ocr-debug-panel pre{max-height:360px;overflow:auto;margin:0;padding:10px;background:#06101d;border-radius:6px;color:#d9e8f4;font:11px/1.45 ui-monospace,SFMono-Regular,Consolas,monospace;white-space:pre-wrap;overflow-wrap:anywhere}.cloud-sync-status{display:flex;align-items:center;min-height:42px;padding:10px 12px;border-radius:12px;margin:10px 0;font-weight:750}.cloud-sync-status.idle,.cloud-sync-status.ok{background:rgba(46,160,86,.12);color:#70dc9a}.cloud-sync-status.pending,.cloud-sync-status.syncing{background:rgba(255,205,49,.12);color:#ffe08a}.cloud-sync-status.error{background:rgba(217,72,72,.13);color:#ff9696}
@media(max-width:700px){.money-inbox-actions{grid-template-columns:1fr 1fr}.money-inbox-dialog .modal-card{padding-bottom:calc(22px + env(safe-area-inset-bottom))}.inbox-review-card .form-grid{grid-template-columns:1fr}}
.cloud-recovery-actions{display:flex;gap:.55rem;align-items:center;flex-wrap:wrap;margin-top:-.25rem}.cloud-recovery-actions .text-button{padding:.55rem .7rem}.cloud-auth-section input#cloudRecoveryKey{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.04em}


/* RC6: stato di avvio visibile; evita schermate apparentemente vuote durante preflight/migrazioni. */
.boot-splash{position:fixed;inset:0;z-index:10000;display:grid;place-items:center;background:#030d1d;color:#f5f8ff;padding:24px}
.boot-splash-card{display:grid;gap:9px;text-align:center}.boot-splash-card strong{font-size:32px;font-weight:850}.boot-splash-card span{color:#91a9c3;font-size:15px}


/* RC6 Report charts: SVG/CSS nativi, nessuna libreria esterna. */
.report-chart-section { overflow:hidden; }
.report-chart-heading { align-items:end; gap:16px; }
.report-chart-controls { width:min(100%,620px); display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.report-chart-picker { width:100%; margin:0; }
.report-chart-picker > span { display:block; margin-bottom:6px; color:var(--muted); font-size:12px; }
.report-chart { min-height:290px; display:flex; align-items:center; justify-content:center; padding:8px 0 2px; }
.report-chart-empty { color:var(--muted); text-align:center; padding:42px 16px; }
.report-donut-layout { width:100%; display:grid; grid-template-columns:minmax(220px,320px) 1fr; gap:22px; align-items:center; }
.report-donut-svg { width:100%; max-width:300px; height:auto; display:block; margin:auto; overflow:visible; }
.report-donut-center-value { fill:#f5f8ff; font-size:15px; font-weight:800; text-anchor:middle; }
.report-donut-center-label { fill:#8fa8c5; font-size:8px; font-weight:700; text-anchor:middle; letter-spacing:.06em; text-transform:uppercase; }
.report-chart-legend { display:flex; flex-direction:column; gap:8px; min-width:0; }
.report-chart-legend-row { display:grid; grid-template-columns:12px minmax(0,1fr) auto; gap:9px; align-items:center; padding:5px 0; }
.report-chart-dot { width:10px; height:10px; border-radius:50%; }
.report-chart-legend-row span:nth-child(2) { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#dbe5f3; }
.report-chart-legend-row b { font-size:13px; white-space:nowrap; }
.report-native-bars { width:100%; display:flex; flex-direction:column; gap:12px; padding:8px 2px; }
.report-native-bar { display:grid; grid-template-columns:minmax(100px,1fr) minmax(120px,2.2fr) auto; gap:10px; align-items:center; }
.report-native-bar > span:first-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#dbe5f3; }
.report-native-bar-track { height:18px; border-radius:999px; background:rgba(255,255,255,.07); overflow:hidden; }
.report-native-bar-track i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#5c9dff,#8a7dff); }
.report-native-bars.income .report-native-bar-track i { background:linear-gradient(90deg,#2dcf8f,#62e7b5); }
.report-native-bar b { font-size:13px; white-space:nowrap; }
.report-trend-wrap { width:100%; }
.report-trend-svg { width:100%; height:auto; min-height:260px; display:block; }
.report-trend-grid { stroke:rgba(160,181,214,.16); stroke-width:1; }
.report-trend-income { fill:none; stroke:#55d98a; stroke-width:3; stroke-linecap:round; stroke-linejoin:round; }
.report-trend-expense { fill:none; stroke:#ff7272; stroke-width:3; stroke-linecap:round; stroke-linejoin:round; }
.report-trend-income-area { fill:url(#reportIncomeArea); stroke:none; }
.report-trend-expense-area { fill:url(#reportExpenseArea); stroke:none; }
.report-trend-label { fill:#8fa8c5; font-size:10px; }
.report-trend-legend { display:flex; justify-content:center; gap:18px; flex-wrap:wrap; margin-top:4px; color:#cbd8e9; }
.report-trend-legend span { display:flex; align-items:center; gap:7px; font-size:13px; }
.report-trend-legend i { width:18px; height:3px; border-radius:99px; display:inline-block; }
.report-trend-legend .income i { background:#55d98a; }
.report-trend-legend .expense i { background:#ff7272; }
/* RC31 — confronto Entrate/Uscite per profilo. */
.report-profile-bars { width:100%; display:grid; gap:13px; padding:4px 0; }
.report-profile-row { display:grid; gap:10px; padding:14px; border:1px solid rgba(145,167,205,.16); border-radius:16px; background:rgba(255,255,255,.025); }
.report-profile-heading { display:flex; align-items:center; justify-content:space-between; gap:14px; }
.report-profile-heading > strong { color:#f3f7ff; font-size:16px; }
.report-profile-heading > span { display:flex; align-items:baseline; gap:8px; white-space:nowrap; }
.report-profile-heading small { color:#8fa8c5; }
.report-profile-heading b { font-size:15px; }
.report-profile-measure { display:grid; grid-template-columns:72px minmax(120px,1fr) auto; gap:10px; align-items:center; }
.report-profile-measure > span:first-child { color:#b9c8da; font-size:13px; }
.report-profile-measure > b { min-width:88px; text-align:right; font-size:13px; white-space:nowrap; }
.report-profile-track { height:12px; overflow:hidden; border-radius:999px; background:rgba(255,255,255,.075); }
.report-profile-track i { display:block; height:100%; border-radius:inherit; }
.report-profile-measure.income .report-profile-track i { background:linear-gradient(90deg,#2dcf8f,#62e7b5); }
.report-profile-measure.expense .report-profile-track i { background:linear-gradient(90deg,#ff6675,#ff8a91); }
.report-profile-transfer-note { display:flex; align-items:center; gap:7px; margin:1px 2px 0; color:#9fb2c9; font-size:12px; }
.report-profile-transfer-note > span { color:#79b1ff; font-size:18px; }
.report-profile-transfer-note strong { color:#c9d7e7; }
/* RC32 — Vista e tipo di grafico separati; Colonne e Area native. */
.report-column-scroll { width:100%; overflow-x:auto; padding:5px 1px 8px; }
.report-category-columns { min-height:286px; display:grid; align-items:end; gap:10px; }
.report-category-column { min-width:0; display:grid; grid-template-rows:auto 210px auto; gap:8px; align-items:end; text-align:center; }
.report-category-column > b { font-size:12px; white-space:nowrap; }
.report-category-column > span:last-child { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#b9c8da; font-size:11px; }
.report-vertical-track { height:100%; min-height:80px; display:flex; align-items:flex-end; justify-content:center; overflow:hidden; border-radius:10px 10px 4px 4px; background:rgba(255,255,255,.055); }
.report-vertical-track i { display:block; width:min(60%,42px); min-height:0; border-radius:9px 9px 3px 3px; background:linear-gradient(180deg,#8a7dff,#5c9dff); }
.report-category-columns.income .report-vertical-track i { background:linear-gradient(180deg,#62e7b5,#2dcf8f); }
.report-category-columns.expense .report-vertical-track i { background:linear-gradient(180deg,#ff8a91,#ff6675); }
.report-grouped-columns { min-height:310px; display:grid; gap:12px; align-items:stretch; }
.report-grouped-column { min-width:0; display:grid; grid-template-rows:auto 1fr; gap:10px; padding:12px; border:1px solid rgba(145,167,205,.16); border-radius:15px; background:rgba(255,255,255,.025); }
.report-grouped-heading { min-height:42px; display:flex; align-items:flex-start; justify-content:space-between; gap:8px; }
.report-grouped-heading > strong { min-width:0; overflow:hidden; text-overflow:ellipsis; color:#f3f7ff; font-size:14px; }
.report-grouped-heading > span { display:grid; justify-items:end; gap:2px; white-space:nowrap; }
.report-grouped-heading small { color:#8fa8c5; font-size:10px; }
.report-grouped-heading b { font-size:12px; }
.report-grouped-column-bars { display:grid; grid-template-columns:1fr 1fr; gap:9px; align-items:end; }
.report-grouped-series { height:230px; display:grid; grid-template-rows:auto 1fr auto; gap:7px; min-width:0; text-align:center; }
.report-grouped-series > b { min-width:0; overflow:hidden; text-overflow:ellipsis; font-size:11px; white-space:nowrap; }
.report-grouped-series > small { color:#9fb2c9; font-size:10px; }
.report-grouped-series.income .report-vertical-track i { background:linear-gradient(180deg,#62e7b5,#2dcf8f); }
.report-grouped-series.expense .report-vertical-track i { background:linear-gradient(180deg,#ff8a91,#ff6675); }
.report-profile-columns-wrap { width:100%; display:grid; gap:10px; }
@media (max-width:720px) {
  .report-chart-heading { align-items:stretch; }
  .report-chart-controls { width:100%; grid-template-columns:1fr; }
  .report-chart-picker { width:100%; }
  .report-donut-layout { grid-template-columns:1fr; gap:8px; }
  .report-chart { min-height:250px; }
  .report-native-bar { grid-template-columns:minmax(85px,1fr) minmax(90px,1.8fr) auto; gap:7px; }
  .report-profile-measure { grid-template-columns:64px minmax(70px,1fr) auto; gap:7px; }
  .report-profile-measure > b { min-width:76px; }
  .report-category-column { grid-template-rows:auto 180px auto; }
  .report-grouped-series { height:205px; }
}
@media print {
  #reportsDialog .report-chart-section { break-inside:avoid; }
  #reportsDialog .report-chart-controls { display:none !important; }
  #reportsDialog .report-chart-section, #reportsDialog .report-chart { color:#111; background:#fff; }
  #reportsDialog .report-chart-legend-row span:nth-child(2), #reportsDialog .report-native-bar > span:first-child { color:#111 !important; }
  #reportsDialog .report-profile-row { color:#111; background:#fff; border-color:#bbb; break-inside:avoid; }
  #reportsDialog .report-profile-heading > strong, #reportsDialog .report-profile-measure > span:first-child { color:#111 !important; }
  #reportsDialog .report-profile-track { background:#e3e7ec; }
  #reportsDialog .report-profile-transfer-note, #reportsDialog .report-profile-transfer-note strong { color:#555 !important; }
  #reportsDialog .report-grouped-column { color:#111; background:#fff; border-color:#bbb; break-inside:avoid; }
  #reportsDialog .report-grouped-heading > strong, #reportsDialog .report-category-column > span:last-child { color:#111 !important; }
  #reportsDialog .report-vertical-track { background:#e3e7ec; }
  #reportsDialog .report-donut-center-value { fill:#111; }
  #reportsDialog .report-donut-center-label, #reportsDialog .report-trend-label { fill:#555; }
}

/* RC18 · storage breakdown + first-upgrade shell */
.storage-breakdown-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin:14px 0}.storage-breakdown-grid article{background:rgba(10,22,42,.58);border:1px solid rgba(150,190,224,.18);border-radius:14px;padding:13px 14px;display:flex;flex-direction:column;gap:6px}.storage-breakdown-grid small{color:#8fb7d8;font-size:.78rem;font-weight:700}.storage-breakdown-grid strong{color:#f5f8ff;font-size:1rem}.storage-detail-section .helper.warning{color:#ffb4b4}.startup-placeholder-card{min-height:190px;display:flex;flex-direction:column;justify-content:center}.startup-placeholder-card .balance-card-value{opacity:.8}

/* RC18 — visualizzazione spazio stile composizione */
.storage-visual-card{margin:16px 0 18px;padding:18px;border:1px solid rgba(150,190,224,.2);border-radius:18px;background:rgba(7,18,34,.72)}
.storage-visual-head{display:flex;justify-content:space-between;gap:14px;align-items:baseline;margin-bottom:12px}.storage-visual-head strong{font-size:1.15rem;color:#f5f8ff}.storage-visual-head span{font-size:1.05rem;color:#afc1d5;text-align:right}
.storage-quota-track,.storage-composition-track{height:20px;border-radius:999px;overflow:hidden;background:rgba(255,255,255,.11)}.storage-quota-track{margin-bottom:9px}.storage-quota-track>span{display:block;height:100%;width:0;background:linear-gradient(90deg,#36d399,#52e2b8);transition:width .35s ease}.storage-composition-track{display:flex;height:15px}.storage-segment{display:block;height:100%;width:0;transition:width .35s ease}.storage-segment.database,.storage-legend .database i{background:#438964}.storage-segment.documents,.storage-legend .documents i{background:#31c864}.storage-segment.audio,.storage-legend .audio i{background:#87dc77}.storage-segment.backups,.storage-legend .backups i{background:#b6eaa9}.storage-segment.cache,.storage-legend .cache i{background:#d9ecd5}.storage-legend{display:flex;flex-wrap:wrap;gap:10px 18px;margin-top:13px}.storage-legend span{display:inline-flex;align-items:center;gap:7px;color:#d5dfeb;font-size:.9rem}.storage-legend i{width:12px;height:12px;border-radius:50%;display:inline-block}.storage-legend b{color:#fff;font-weight:800}.storage-visual-available{display:block;margin-top:12px;color:#8fb7d8}
@media(max-width:620px){.storage-visual-head{align-items:flex-start;flex-direction:column;gap:3px}.storage-visual-head span{text-align:left}.storage-legend{gap:9px 13px}}

/* RC18 · profili preferiti Entrate/Uscite */
.profile-defaults-section{margin:8px 0 4px;padding:14px;border:1px solid rgba(130,168,210,.22);border-radius:16px;background:rgba(10,28,50,.32)}
.profile-defaults-section h3{margin:0 0 6px}.profile-defaults-section .helper{margin:0 0 12px}
.profile-defaults-section label+label{margin-top:10px}


/* RC21 — Aspetto: Scuro / Chiaro */
.settings-section { margin: 18px 0; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-soft, rgba(255,255,255,.025)); }
.settings-section h3 { margin: 0 0 8px; }
.appearance-settings .helper { margin-top: 0; }
.theme-preview-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:8px; }
.theme-preview { min-height:72px; border:1px solid var(--line); border-radius:14px; padding:10px; display:flex; flex-direction:column; gap:8px; justify-content:center; }
.theme-preview span { height:24px; border-radius:8px; border:1px solid rgba(120,140,170,.22); }
.theme-preview b { font-size:12px; }
.theme-preview.light { background:#eef3fa; color:#172237; }
.theme-preview.light span { background:linear-gradient(180deg,#102038,#081523); border-color:rgba(54,103,165,.28); box-shadow:0 5px 12px rgba(35,55,82,.16),inset 0 0 0 4px #172b48; }
.theme-preview.dark { background:#08111f; color:#f7f9ff; }
.theme-preview.dark span { background:#102038; box-shadow:inset 0 0 0 4px #172b48; }
.settings-menu-row { width:100%; display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:12px; text-align:left; border:1px solid var(--line); border-radius:15px; background:var(--surface-soft,rgba(255,255,255,.025)); padding:13px; color:var(--text); cursor:pointer; }
.settings-menu-row > span:nth-child(2) { display:flex; flex-direction:column; gap:3px; }
.settings-menu-row small { color:var(--muted); line-height:1.35; }
.settings-menu-row > b { font-size:26px; color:var(--muted); }
.settings-menu-icon { width:38px; height:38px; border-radius:50%; display:grid; place-items:center; font-weight:800; background:rgba(50,133,255,.16); color:var(--blue); }
.app-info-hero { display:flex; align-items:center; gap:14px; padding:4px 0 18px; }
.app-info-logo { width:58px; height:58px; border-radius:18px; display:grid; place-items:center; font-size:34px; color:var(--gold); border:1px solid rgba(255,189,55,.38); background:rgba(255,189,55,.08); }
.app-info-hero > div:last-child { display:flex; flex-direction:column; gap:4px; }
.app-info-hero strong { font-size:24px; }
.app-info-hero span { color:var(--muted); }
.app-info-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.app-info-grid article { min-height:88px; border:1px solid var(--line); border-radius:15px; padding:13px; background:var(--surface-soft,rgba(255,255,255,.025)); display:flex; flex-direction:column; gap:7px; }
.app-info-grid small { color:var(--muted); }
.app-info-grid strong { overflow-wrap:anywhere; }
.app-info-section { margin-top:18px; padding-top:16px; border-top:1px solid var(--line); }
.app-info-section h3 { margin:0 0 12px; }
.app-info-actions,.app-info-links { display:flex; flex-wrap:wrap; gap:10px; }
.report-donut-track { stroke:var(--chart-track,rgba(255,255,255,.07)); }

/* RC21 — Tema Chiaro ibrido: cambia il fondale, non le maschere operative. */
html[data-theme-resolved="light"] {
  /* I controlli restano scuri perché card, form e modali conservano il tema originale. */
  color-scheme: dark;
  background:#eaf1fa;
  --page-light:#eef4fb;
  --page-light-2:#f9fbff;
  --page-ink:#0b1930;
  --page-muted:#50627a;
}
html[data-theme-resolved="light"] body {
  background:
    radial-gradient(circle at 58% -12%,rgba(255,255,255,.98) 0,rgba(247,250,255,.94) 25%,transparent 48%),
    linear-gradient(180deg,var(--page-light-2) 0%,var(--page-light) 72%,#e8f0f9 100%);
}
/* Testi che vivono direttamente sul fondale chiaro. Le superfici interne non vengono schiarite. */
html[data-theme-resolved="light"] .topbar .brand-copy h1 { color:var(--page-ink); }
html[data-theme-resolved="light"] .topbar .brand-copy p { color:#344860; }
html[data-theme-resolved="light"] .favorites-panel > .section-heading h2,
html[data-theme-resolved="light"] .movements-panel > .section-heading h2 { color:var(--page-ink); }
html[data-theme-resolved="light"] .favorites-panel > .section-heading .heading-with-icon,
html[data-theme-resolved="light"] .movements-panel > .section-heading .heading-with-icon { color:var(--page-ink); }
html[data-theme-resolved="light"] .favorites-panel > .section-heading .text-button,
html[data-theme-resolved="light"] .movements-panel > .section-heading .text-button { color:#176fd8; }

/* Ombre appena più leggibili sul fondale chiaro, senza cambiare i colori delle card. */
html[data-theme-resolved="light"] .finance-balance-card,
html[data-theme-resolved="light"] .favorite-card,
html[data-theme-resolved="light"] .month-overview,
html[data-theme-resolved="light"] .panel,
html[data-theme-resolved="light"] .movement-list { box-shadow:0 16px 38px rgba(35,55,82,.20); }

/* Splash: fondale chiaro, card di avvio ancora ContAnt scura. */
html[data-theme-resolved="light"] .boot-splash { background:linear-gradient(180deg,#f9fbff,#eaf1fa); color:var(--page-ink); }
html[data-theme-resolved="light"] .boot-splash-card { background:linear-gradient(180deg,rgba(14,28,48,.98),rgba(8,20,36,.99)); color:#f7fbff; border-color:rgba(105,154,225,.22); box-shadow:0 18px 48px rgba(35,55,82,.22); }

/* Il pulsante centrale resta integrato nella barra scura ma si stacca bene dal canvas chiaro. */
html[data-theme-resolved="light"] .bottom-nav { box-shadow:0 -14px 34px rgba(35,55,82,.22); }
html[data-theme-resolved="light"] .quick-action-overlay { background:rgba(17,31,52,.38); }

/* RC22 — Home uniforme e campi delle azioni rapide più leggibili. */
.home-content-section {
  margin-top:24px;
  padding:0;
  border:0;
  background:transparent;
  box-shadow:none;
}
.home-external-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin:0 2px 10px;
}
.home-external-heading h2 { font-size:23px; }
.month-overview-card,
.home-content-card {
  border:1px solid rgba(105,154,225,.18);
  border-radius:22px;
  background:linear-gradient(145deg,rgba(9,30,59,.94),rgba(5,20,40,.98));
  padding:17px 18px;
  box-shadow:0 15px 35px rgba(0,0,0,.22);
}
.home-card-intro {
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:13px;
  color:var(--muted);
}
.home-card-intro small { color:var(--muted); font-size:14px; }
.home-card-intro .money-inbox-icon { flex:0 0 auto; }
.home-card-intro .agenda-heading-icon { flex:0 0 auto; width:34px; height:34px; border-radius:12px; font-size:19px; }
.home-heading-main { min-width:0; flex:1 1 auto; display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.home-title-with-info { min-width:0; display:inline-flex; align-items:center; gap:8px; flex-wrap:nowrap; }
.home-title-with-info h2 { margin:0; min-width:0; }
.home-title-info { flex:0 0 auto; --field-info-visual-size:22px; font-size:12px; }
#openAgenda { white-space:nowrap; flex:0 0 auto; }
.home-heading-spec { min-width:0; display:inline-flex; align-items:center; gap:7px; color:var(--page-muted,var(--muted)); font-weight:500; }
.home-heading-spec small { color:inherit; font-size:14px; line-height:1.3; }
.home-heading-spec .money-inbox-icon,
.home-heading-spec .agenda-heading-icon { flex:0 0 auto; width:26px; height:26px; border-radius:9px; font-size:14px; }
.month-overview { border:0; border-radius:0; background:transparent; box-shadow:none; }
.month-overview-heading { margin-bottom:10px; }
.agenda-home-panel { overflow:visible; }
.agenda-home-heading { margin-bottom:10px; }
.money-inbox-panel { overflow:visible; }

#movementDialog .field-label-with-info,
#movementDialog .movement-profile-summary .field-label-with-info,
#movementDialog .document-attachment-title-row,
#agendaEditorDialog label > span {
  font-family:inherit;
  color:#fff !important;
  font-size:18px !important;
  font-weight:700 !important;
  line-height:1.22 !important;
  letter-spacing:-.01em !important;
}
#movementDialog .movement-primary-field > .field-label-with-info:first-child,
#movementDialog #beneficiaryField > .field-label-with-info:first-child,
#movementDialog #scopeField > .field-label-with-info:first-child,
#movementDialog #counterpartyField > .field-label-with-info:first-child,
#movementDialog #descriptionNoteField > .field-label-with-info:first-child,
#movementDialog .reimbursement-choice-panel label > .field-label-with-info:first-child,
#movementDialog #categoryFieldRow > .field-label-with-info:first-child,
#movementDialog .document-attachment-title-row {
  margin-bottom:8px;
}
#movementDialog .movement-primary-field select { margin-top:0; }
#agendaEditorDialog label { gap:8px; }

html[data-theme-resolved="light"] .home-external-heading h2 { color:var(--page-ink); }
html[data-theme-resolved="light"] .home-external-heading .text-button { color:#176fd8; }
html[data-theme-resolved="light"] .home-heading-spec { color:var(--page-muted); }
html[data-theme-resolved="light"] .month-overview-card,
html[data-theme-resolved="light"] .home-content-card { box-shadow:0 16px 38px rgba(35,55,82,.20); }

@media (max-width:620px) {
  .home-content-section { margin-top:20px; }
  .home-external-heading { margin-bottom:9px; }
  .home-external-heading h2 { font-size:21px; }
  .home-title-with-info { gap:7px; }
  #openAgenda { white-space:nowrap; }
  .month-overview-card,.home-content-card { padding:16px; }
  #movementDialog .field-label-with-info,
  #movementDialog .movement-profile-summary .field-label-with-info,
  #movementDialog .document-attachment-title-row,
  #agendaEditorDialog label > span { font-size:18px !important; }
}

/* Nessuna regola RC21 converte panel, modal, form, input, report o card in superfici bianche. */
@media (max-width:520px){.app-info-grid{grid-template-columns:1fr}.app-info-actions,.app-info-links{display:grid;grid-template-columns:1fr}}


/* RC21 — Aspetto semplificato: solo Scuro / Chiaro, con Scuro predefinito. */
.theme-choice-group{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}
.theme-choice-button{min-height:68px;border:1px solid rgba(117,145,181,.34);border-radius:14px;background:#0e1c30;color:#f7f9ff;padding:10px 12px;display:flex;align-items:center;gap:10px;justify-content:flex-start;cursor:pointer;box-shadow:none}
.theme-choice-button:hover{border-color:rgba(91,159,240,.58)}
.theme-choice-button.selected,.theme-choice-button[aria-pressed="true"]{border-color:#58d99c;box-shadow:0 0 0 2px rgba(88,217,156,.18)}
.theme-choice-swatch{width:31px;height:31px;flex:0 0 31px;border-radius:9px;border:1px solid rgba(130,154,184,.35)}
.theme-choice-swatch.dark{background:linear-gradient(180deg,#07111f,#12243b)}
.theme-choice-swatch.light{background:linear-gradient(180deg,#eef4fb 0 46%,#102038 46% 100%)}
.theme-choice-button strong{font-size:14px}
/* Sul canvas chiaro il prefisso del marchio non può restare bianco. */
html[data-theme-resolved="light"] .brand-home-title span{color:var(--page-ink)}
html[data-theme-resolved="light"] .brand-home-title strong{color:#58d99c}
@media(max-width:420px){.theme-choice-button{min-height:62px;padding:9px 10px}.theme-choice-swatch{width:28px;height:28px;flex-basis:28px}}

/* RC25 — la navigazione resta ancorata al viewport e non viene ritagliata dall'app-shell. */
.bottom-nav {
  position:fixed;
  inset:auto 0 0 0;
  width:100%;
  display:grid;
  visibility:visible;
  opacity:1;
  z-index:120;
}
body.access-gated .bottom-nav { display:none; }

/* RC27 — il viewport del browser esclude già la taskbar: nessun secondo rialzo desktop. */
@media (hover:hover) and (pointer:fine) and (min-width:700px) {
  .bottom-nav { bottom:0; }
  .app-shell { padding-bottom:calc(130px + env(safe-area-inset-bottom)); }
  .quick-action-overlay { padding-bottom:calc(112px + env(safe-area-inset-bottom)); }
  .toast { bottom:calc(175px + env(safe-area-inset-bottom)); }
}

/* RC28 — titoli nitidi e coerenti con la tipografia della Home. */
#movementDialog .field-label-with-info,
#movementDialog .movement-profile-summary .field-label-with-info,
#movementDialog .document-attachment-title-row,
#agendaEditorDialog label > span {
  font-family:inherit !important;
  font-size:20px !important;
  font-weight:700 !important;
  font-style:normal !important;
  font-synthesis:none;
  font-kerning:normal;
  line-height:1.3 !important;
  letter-spacing:0 !important;
  text-shadow:none !important;
  filter:none !important;
}

/* RC29 — il canvas chiaro della Home prosegue in tutte le maschere. */
html[data-theme-resolved="light"] .modal::backdrop {
  background:rgba(25,40,61,.42);
  backdrop-filter:blur(4px);
}
html[data-theme-resolved="light"] .modal-card {
  background:linear-gradient(180deg,#fbfdff 0%,#eef4fb 100%);
  color:var(--page-ink);
  border-color:rgba(74,111,156,.25);
  box-shadow:0 28px 80px rgba(35,55,82,.28);
}
html[data-theme-resolved="light"] .modal-header h2,
html[data-theme-resolved="light"] .modal-card > h2,
html[data-theme-resolved="light"] .modal-card > h3,
html[data-theme-resolved="light"] .agenda-view-heading h3,
html[data-theme-resolved="light"] .agenda-list-group-heading h3 {
  color:var(--page-ink);
}
html[data-theme-resolved="light"] .modal-card .eyebrow,
html[data-theme-resolved="light"] .modal-card > .helper,
html[data-theme-resolved="light"] .modal-card > p:not(.form-error),
html[data-theme-resolved="light"] .agenda-notification-note {
  color:var(--page-muted);
}
html[data-theme-resolved="light"] .modal-card .close-button {
  color:var(--page-ink);
  background:#fff;
  border-color:rgba(74,111,156,.28);
  box-shadow:0 5px 15px rgba(35,55,82,.10);
}
html[data-theme-resolved="light"] .modal-card label > span {
  color:var(--page-ink);
}
html[data-theme-resolved="light"] .modal-card .secondary-button,
html[data-theme-resolved="light"] .modal-card .file-label {
  color:#e7eef8;
  background:#10223a;
  border-color:#304967;
}

/* Superfici operative: restano blu/scure come le card della Home. */
html[data-theme-resolved="light"] .modal-card :is(
  .summary-selector,.recent-chip,.account-choice,.scope-account-row,.management-row,.account-editor,
  .selected-account-card,.cross-scope-notice,.recognition,.transfer-preview,
  .movement-browser-context,.movement-list,.movement-row,.filter-chips button,
  .report-filters,.report-kpi,.report-section,
  .backup-status-grid article,.backup-section,.snapshot-row,.more-grid button,
  .config-section,.settings-section,.settings-menu-row,.account-security-section,.account-status-row,
  .app-info-grid article,.privacy-facts-grid article,.storage-breakdown-grid article,
  .onboarding-account-section,.security-benefits div,.smartphone-access-panel,
  .agenda-privacy-note,.agenda-view-switch,.agenda-active-filters button,.agenda-nav-button,
  .agenda-filter-panel,.agenda-month-day,.agenda-week-day,.agenda-list-row,.agenda-empty,
  .agenda-detail-note,.update-version-card,.update-release-panel,.update-option-row,
  .document-source-option,.category-choice,.money-inbox-row,.money-inbox-home > button,
  .storage-visual-card,.profile-defaults-section,.cloud-configuration-notice
) {
  color:#f7fbff;
  background:linear-gradient(145deg,#10243f,#09182b);
  border-color:rgba(105,154,225,.24);
  box-shadow:0 10px 24px rgba(35,55,82,.12);
}
html[data-theme-resolved="light"] .modal-card :is(
  .summary-selector,.recent-chip,.account-choice,.scope-account-row,.management-row,.account-editor,
  .selected-account-card,.cross-scope-notice,.recognition,.transfer-preview,
  .movement-browser-context,.movement-list,.movement-row,.filter-chips button,
  .report-filters,.report-kpi,.report-section,
  .backup-status-grid article,.backup-section,.snapshot-row,.more-grid button,
  .config-section,.settings-section,.settings-menu-row,.account-security-section,.account-status-row,
  .app-info-grid article,.privacy-facts-grid article,.storage-breakdown-grid article,
  .onboarding-account-section,.security-benefits div,.smartphone-access-panel,
  .agenda-privacy-note,.agenda-view-switch,.agenda-active-filters button,.agenda-nav-button,
  .agenda-filter-panel,.agenda-month-day,.agenda-week-day,.agenda-list-row,.agenda-empty,
  .agenda-detail-note,.update-version-card,.update-release-panel,.update-option-row,
  .document-source-option,.category-choice,.money-inbox-row,.money-inbox-home > button,
  .storage-visual-card,.profile-defaults-section,.cloud-configuration-notice
) :is(h2,h3,h4,strong,label > span) {
  color:#f7fbff;
}
html[data-theme-resolved="light"] .modal-card :is(
  .summary-selector,.recent-chip,.account-choice,.scope-account-row,.management-row,.account-editor,
  .selected-account-card,.cross-scope-notice,.recognition,.transfer-preview,
  .movement-browser-context,.movement-list,.movement-row,.filter-chips button,
  .report-filters,.report-kpi,.report-section,
  .backup-status-grid article,.backup-section,.snapshot-row,.more-grid button,
  .config-section,.settings-section,.settings-menu-row,.account-security-section,.account-status-row,
  .app-info-grid article,.privacy-facts-grid article,.storage-breakdown-grid article,
  .onboarding-account-section,.security-benefits div,.smartphone-access-panel,
  .agenda-privacy-note,.agenda-view-switch,.agenda-active-filters button,.agenda-nav-button,
  .agenda-filter-panel,.agenda-month-day,.agenda-week-day,.agenda-list-row,.agenda-empty,
  .agenda-detail-note,.update-version-card,.update-release-panel,.update-option-row,
  .document-source-option,.category-choice,.money-inbox-row,.money-inbox-home > button,
  .storage-visual-card,.profile-defaults-section,.cloud-configuration-notice
) :is(small,.helper,p) {
  color:#9fb2c9;
}
html[data-theme-resolved="light"] .modal-card .security-benefits div {
  padding:11px 12px;
  border:1px solid rgba(105,154,225,.24);
  border-radius:14px;
}

/* Testi di contesto: scuri sul canvas, distinti dai riquadri operativi. */
html[data-theme-resolved="light"] .modal-card :is(
  .field-help-content,.info-content,.account-choice-group h3,
  .account-management-section > h3,.security-brand h2,
  .privacy-data-section h3,.cloud-backup-section h3,
  .app-info-hero strong,.agenda-period-controls > strong
) {
  color:var(--page-ink);
}
html[data-theme-resolved="light"] .modal-card :is(
  .security-card .intro-copy,.privacy-data-section p,.cloud-backup-section p,
  .app-info-hero span,.install-platform-list,.agenda-detail-line span,
  .agenda-list-group-heading span,.agenda-weekdays,.update-state-line small,.update-message
) {
  color:var(--page-muted);
}
html[data-theme-resolved="light"] .modal-card .install-platform-list strong {
  color:var(--page-ink);
}

/* Uscita, Entrata e Trasferimento: titolo sul canvas, controllo nella card scura. */
html[data-theme-resolved="light"] #movementDialog .field-label-with-info,
html[data-theme-resolved="light"] #movementDialog .document-attachment-title-row,
html[data-theme-resolved="light"] #agendaEditorDialog label > span {
  color:var(--page-ink) !important;
}
html[data-theme-resolved="light"] #movementDialog :is(.movement-primary-field,#beneficiaryField,.movement-scope-editor) {
  background:transparent;
  border-color:transparent;
}
html[data-theme-resolved="light"] #movementDialog :is(.movement-guidance,.movement-profile-summary,.category-card),
html[data-theme-resolved="light"] #agendaEditorDialog :is(.agenda-type-switch,.voice-recorder-panel) {
  color:#f7fbff;
  background:linear-gradient(145deg,#10243f,#09182b);
  border-color:rgba(105,154,225,.24);
}
html[data-theme-resolved="light"] #movementDialog .movement-profile-summary .field-label-with-info {
  color:#f7fbff !important;
}
html[data-theme-resolved="light"] #movementDialog :is(.reimbursement-choice-panel,.document-attachment-panel) {
  background:rgba(255,255,255,.48);
  border-color:rgba(74,111,156,.24);
}
html[data-theme-resolved="light"] #movementDialog .movement-guidance span,
html[data-theme-resolved="light"] #agendaEditorDialog .voice-recorder-panel small,
html[data-theme-resolved="light"] #agendaEditorDialog .voice-recording-status {
  color:#9fb2c9;
}
html[data-theme-resolved="light"] #agendaEditorDialog .agenda-type-switch button {
  color:#aebed1;
  background:#10223a;
  border-color:#304967;
}
html[data-theme-resolved="light"] #agendaEditorDialog .agenda-type-switch button.active {
  color:#fff3cf;
  background:rgba(133,91,14,.92);
  border-color:rgba(204,148,39,.72);
}

/* Accesso e benvenuto seguono lo stesso canvas chiaro con riquadri scuri. */
html[data-theme-resolved="light"] .welcome-dialog::backdrop { background:rgba(25,40,61,.52); }
html[data-theme-resolved="light"] .welcome-card { background:linear-gradient(180deg,#fbfdff,#eef4fb); }
html[data-theme-resolved="light"] .welcome-brand-image { mix-blend-mode:normal; }
html[data-theme-resolved="light"] .welcome-title { color:var(--page-ink); }
html[data-theme-resolved="light"] .welcome-copy,
html[data-theme-resolved="light"] .welcome-foot { color:var(--page-muted); }
html[data-theme-resolved="light"] .welcome-install-invite {
  background:linear-gradient(145deg,#10243f,#09182b);
  border-color:rgba(46,159,125,.42);
}
html[data-theme-resolved="light"] .welcome-feature {
  background:linear-gradient(145deg,#10243f,#09182b);
  border-color:rgba(105,154,225,.24);
}

/* RC30 — esempi degli aiuti rapidi leggibili sul canvas chiaro. */
html[data-theme-resolved="light"] .field-help-examples {
  color:#e7eef8;
  background:linear-gradient(145deg,#10243f,#09182b);
  border-color:rgba(105,154,225,.34);
  box-shadow:0 10px 24px rgba(35,55,82,.14);
}
html[data-theme-resolved="light"] .field-help-examples strong {
  color:#69e6a3;
}
html[data-theme-resolved="light"] .field-help-examples ul {
  color:#e7eef8;
}
html[data-theme-resolved="light"] .field-help-examples li::marker {
  color:#79b1ff;
}

/* RC33 — righe dei movimenti Report trasparenti sulle superfici operative scure. */
#reportsDialog .report-movement {
  -webkit-appearance:none;
  appearance:none;
  background:transparent;
  color:inherit;
  border:0;
  border-bottom:1px solid rgba(145,167,205,.12);
  border-radius:0;
  box-shadow:none;
}
#reportsDialog .report-movement:last-child {
  border-bottom:0;
}
#reportsDialog .report-movement:hover,
#reportsDialog .report-movement:focus-visible {
  background:rgba(50,133,255,.09);
}
#reportsDialog .report-movement:focus-visible {
  outline:2px solid rgba(101,167,255,.72);
  outline-offset:-2px;
}

/* RC34 — trial beta di 14 giorni e rinnovo manuale firmato. */
.license-banner {
  width:calc(100% - 44px);
  max-width:1180px;
  margin:0 auto 14px;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:11px;
  padding:10px 13px;
  border:1px solid rgba(255,189,55,.36);
  border-radius:15px;
  color:#f7fbff;
  background:linear-gradient(135deg,rgba(92,68,15,.94),rgba(40,35,27,.98));
  box-shadow:0 12px 28px rgba(0,0,0,.18);
}
.license-banner.hidden { display:none; }
.license-banner.expired { border-color:rgba(255,102,117,.58); background:linear-gradient(135deg,rgba(91,29,39,.96),rgba(39,20,29,.99)); }
.license-banner.clock-problem { border-color:rgba(200,146,255,.58); background:linear-gradient(135deg,rgba(61,35,91,.96),rgba(30,22,43,.99)); }
.license-banner-icon { width:34px; height:34px; display:grid; place-items:center; border-radius:50%; background:rgba(255,255,255,.10); color:#ffd96a; font-size:18px; }
.license-banner > span:nth-child(2) { min-width:0; display:grid; gap:2px; }
.license-banner small { color:#d5ddec; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.license-banner .secondary-button { min-height:38px; color:#f7fbff; background:rgba(255,255,255,.08); border-color:rgba(255,255,255,.18); }
.license-card { width:min(calc(100vw - 24px),650px); }
.license-status-card { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:13px; padding:15px; border:1px solid rgba(255,189,55,.30); border-radius:17px; background:rgba(255,189,55,.08); }
.license-status-card.expired { border-color:rgba(255,102,117,.40); background:rgba(255,102,117,.10); }
.license-status-card.clock-problem { border-color:rgba(200,146,255,.40); background:rgba(200,146,255,.10); }
.license-status-icon { width:44px; height:44px; display:grid; place-items:center; border-radius:14px; color:#ffd35a; background:rgba(255,189,55,.12); font-size:22px; }
.license-status-card > span:last-child { display:grid; gap:4px; }
.license-status-card small { color:var(--muted); line-height:1.35; }
.license-installation-section,.license-renewal-section { margin-top:14px; padding:15px; border:1px solid var(--line); border-radius:17px; background:rgba(255,255,255,.025); }
.license-installation-section h3 { margin:0 0 6px; }
.license-installation-section p { margin:0 0 12px; color:var(--muted); }
.license-code-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:9px; }
.license-code-row input,#licenseRenewalCode { font-family:ui-monospace,SFMono-Regular,Consolas,monospace; letter-spacing:.035em; }
.license-renewal-section label { margin:0 0 11px; }
.license-renewal-section .primary-button { width:100%; min-height:48px; }
.license-readonly-note { margin:14px 2px 0; color:var(--muted); line-height:1.5; }
.license-readonly-note strong { color:var(--text); }
body.license-read-only .quick-action-fab { filter:saturate(.45); }
body.license-read-only [data-license-write="true"] { opacity:.62; }
html[data-theme-resolved="light"] .license-banner { box-shadow:0 12px 28px rgba(35,55,82,.18); }
html[data-theme-resolved="light"] #licenseDialog :is(.license-status-card,.license-installation-section,.license-renewal-section) { color:#f7fbff; background:linear-gradient(145deg,#10243f,#09182b); border-color:rgba(105,154,225,.24); }
html[data-theme-resolved="light"] #licenseDialog :is(.license-status-card,.license-installation-section,.license-renewal-section) :is(h3,strong,label > span) { color:#f7fbff; }
html[data-theme-resolved="light"] #licenseDialog :is(.license-status-card,.license-installation-section,.license-renewal-section) :is(small,p) { color:#9fb2c9; }
html[data-theme-resolved="light"] #licenseDialog .license-readonly-note { color:var(--page-muted); }
html[data-theme-resolved="light"] #licenseDialog .license-readonly-note strong { color:var(--page-ink); }
@media(max-width:620px){
  .license-banner { width:calc(100% - 24px); margin-bottom:10px; padding:9px 10px; }
  .license-banner small { white-space:normal; }
  .license-code-row { grid-template-columns:1fr; }
  .license-code-row .secondary-button { width:100%; }
}

/* RC66 — logo formica ufficiale nell’interfaccia */
.contant-app-logo {
  display:block; object-fit:contain; background:#fff; border:1px solid rgba(105,154,225,.22);
  box-shadow:0 8px 24px rgba(0,0,0,.22);
}
.contant-home-logo { width:48px; height:48px; flex:0 0 48px; border-radius:14px; }
.security-brand .contant-security-logo { width:48px; height:48px; flex:0 0 48px; border-radius:14px; }
.lock-card .contant-security-logo { width:58px; height:58px; margin:0 auto 12px; border-radius:16px; }
.app-info-hero .contant-info-logo { width:58px; height:58px; flex:0 0 58px; border-radius:18px; }
@media (max-width:670px) {
  .contant-home-logo { width:40px; height:40px; flex-basis:40px; border-radius:12px; }
  .security-brand .contant-security-logo { width:44px; height:44px; flex-basis:44px; border-radius:12px; }
}


/* RC66 — Home: stesso logo completo della schermata Accedi / Registrati */
.contant-home-brand-row { gap:14px; align-items:center; }
.contant-home-brand-image {
  display:block; width:clamp(190px,25vw,265px); height:auto; max-height:128px; object-fit:cover; object-position:left top;
  border-radius:16px; mix-blend-mode:screen; flex:0 1 auto;
}
.contant-home-greeting { margin:0; color:#d7e1f1; font-size:18px; white-space:nowrap; }
html[data-theme-resolved="light"] .contant-home-brand-image { mix-blend-mode:normal; }
html[data-theme-resolved="light"] .contant-home-greeting { color:#344860; }
@media (max-width:670px) {
  .contant-home-brand-row { gap:8px; align-items:flex-start; flex-direction:column; }
  .contant-home-brand-image { width:min(76vw,235px); max-height:114px; border-radius:14px; }
  .contant-home-greeting { font-size:16px; }
}

/* RC66 — smartphone: testata senza sovrapposizioni e pulsante + con colonna dedicata */
.bottom-nav {
  grid-template-columns:repeat(3,minmax(0,1fr)) minmax(78px,1.16fr) repeat(3,minmax(0,1fr));
  column-gap:0;
}
.quick-action-fab {
  grid-column:auto;
  min-width:0;
  max-width:72px;
}
@media (max-width:670px) {
  .topbar {
    display:grid;
    grid-template-columns:minmax(0,1fr);
    align-items:start;
    justify-items:stretch;
    gap:10px;
  }
  .contant-home-brand-row {
    width:100%;
    min-width:0;
  }
  .contant-home-brand-image {
    width:min(82vw,260px);
    max-width:100%;
    height:auto;
  }
  .top-actions {
    width:100%;
    justify-content:flex-end;
    align-items:center;
    flex-wrap:nowrap;
    position:static;
    z-index:auto;
  }
  .bottom-nav {
    grid-template-columns:repeat(3,minmax(0,1fr)) minmax(70px,1.12fr) repeat(3,minmax(0,1fr));
    padding-left:4px;
    padding-right:4px;
  }
  .quick-action-fab {
    width:64px;
    height:64px;
    max-width:64px;
    justify-self:center;
    margin:0 3px;
    box-shadow:0 0 0 4px rgba(65,45,6,.5),0 8px 22px rgba(244,181,31,.34),inset 0 1px rgba(255,255,255,.68);
  }
  .quick-action-fab span { font-size:43px; }
  .nav-item { min-width:0; overflow:hidden; }
  .nav-item small { max-width:100%; overflow:hidden; text-overflow:ellipsis; }
}
@media (max-width:390px) {
  .contant-home-brand-image { width:min(80vw,238px); }
  .bottom-nav {
    grid-template-columns:repeat(3,minmax(0,1fr)) 64px repeat(3,minmax(0,1fr));
    padding-left:2px;
    padding-right:2px;
  }
  .quick-action-fab { width:58px; height:58px; max-width:58px; margin:0 2px; }
  .quick-action-fab span { font-size:39px; }
  .nav-item small { font-size:8.5px; }
}

/* RC66 — Google Drive backup */
.google-drive-backup-card {
  margin-top:12px;
  padding:13px 14px;
  border:1px solid rgba(105,154,225,.2);
  border-radius:16px;
  background:rgba(50,133,255,.055);
  display:grid;
  gap:10px;
}
.google-drive-backup-card > div:first-child { display:flex; flex-direction:column; gap:3px; }
.google-drive-backup-card small { color:var(--muted); }
.google-drive-card { width:min(620px,calc(100vw - 24px)); }
.google-drive-account-section,.google-drive-explain { margin-top:12px; padding:14px; border:1px solid var(--line); border-radius:16px; background:rgba(255,255,255,.025); }
.google-drive-explain p { margin:0 0 8px; line-height:1.5; }
.google-drive-explain p:last-child { margin-bottom:0; }
@media (max-width:520px) {
  .google-drive-backup-card .backup-actions { grid-template-columns:1fr; }
  .google-drive-card .backup-actions { display:grid; grid-template-columns:1fr; }
}

/* RC66 — backup e ripristino Google Drive */
.google-drive-restore-card{margin-top:14px;padding:14px;border:1px solid rgba(82,161,255,.28);border-radius:16px;background:rgba(35,96,164,.10)}
.google-drive-restore-card>div:first-child{display:flex;flex-direction:column;gap:4px}.google-drive-restore-card strong{color:#fff}.google-drive-restore-card small{color:var(--muted)}
@media(max-width:560px){.google-drive-restore-card .backup-actions>*{width:100%;justify-content:center}}


/* RC66 — password backup sempre visibile e controllo Mostra/Nascondi */
.backup-password-panel {
  margin:12px 0 16px;
  padding:14px;
  border:1px solid rgba(77,160,255,.28);
  border-radius:17px;
  background:linear-gradient(180deg,rgba(16,39,69,.97),rgba(8,24,43,.97));
}
.backup-password-panel .backup-password-label { margin:0; }
.backup-password-panel > small { display:block; margin-top:8px; color:var(--muted); line-height:1.4; }
.backup-password-input-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; align-items:center; }
.backup-password-input-row input { min-width:0; }
.backup-password-toggle {
  min-height:48px;
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px 13px;
  background:rgba(255,255,255,.055);
  color:var(--text);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  font-weight:750;
  cursor:pointer;
}
.backup-password-toggle[aria-pressed="true"] { border-color:rgba(77,160,255,.5); background:rgba(50,133,255,.13); }
@media (max-width:700px) {
  #backupDialog .backup-password-panel {
    position:sticky;
    top:0;
    z-index:8;
    box-shadow:0 10px 22px rgba(0,0,0,.34);
  }
}
@media (max-width:390px) {
  .backup-password-input-row { grid-template-columns:1fr; }
  .backup-password-toggle { width:100%; }
}


/* RC66 — feedback operativo persistente per backup/ripristino */
.backup-operation-status {
  position:sticky;
  top:0;
  z-index:12;
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  align-items:center;
  gap:11px;
  margin:0 0 14px;
  padding:12px 14px;
  border:1px solid rgba(88,164,255,.38);
  border-radius:16px;
  background:rgba(10,29,52,.96);
  box-shadow:0 10px 24px rgba(0,0,0,.30);
  backdrop-filter:blur(12px);
}
.backup-operation-status strong { display:block; color:var(--text); font-size:15px; line-height:1.25; }
.backup-operation-status small { display:block; margin-top:3px; color:var(--muted); line-height:1.4; }
.backup-operation-indicator {
  width:20px; height:20px; border-radius:50%; flex:none;
  border:3px solid rgba(255,255,255,.24); border-top-color:#72a7ff;
}
.backup-operation-status.working .backup-operation-indicator { animation:contantBackupSpin .8s linear infinite; }
.backup-operation-status.success { border-color:rgba(58,205,126,.46); background:rgba(12,62,48,.96); }
.backup-operation-status.success .backup-operation-indicator { border:0; width:24px; height:24px; }
.backup-operation-status.success .backup-operation-indicator::before { content:'✓'; display:grid; place-items:center; width:24px; height:24px; font-weight:900; font-size:19px; }
.backup-operation-status.error { border-color:rgba(255,104,104,.52); background:rgba(74,26,34,.97); }
.backup-operation-status.error .backup-operation-indicator { border:0; width:24px; height:24px; }
.backup-operation-status.error .backup-operation-indicator::before { content:'!'; display:grid; place-items:center; width:24px; height:24px; font-weight:900; font-size:19px; }
.backup-operation-status.action { border-color:rgba(96,164,255,.62); background:rgba(18,53,91,.97); }
.backup-operation-status.action .backup-operation-indicator { border:0; width:24px; height:24px; }
.backup-operation-status.action .backup-operation-indicator::before { content:'↓'; display:grid; place-items:center; width:24px; height:24px; font-weight:900; font-size:20px; }
#backupDialog button.is-busy { cursor:progress; opacity:.72; }
.restore-next-step { margin:-2px -2px 14px; padding:12px 13px; border-radius:12px; background:rgba(50,133,255,.12); border:1px solid rgba(82,161,255,.32); }
.restore-next-step strong,.restore-next-step small { display:block; }
.restore-next-step small { margin-top:4px; color:var(--muted); line-height:1.4; }
#confirmRestore:not(.hidden) { box-shadow:0 0 0 3px rgba(255,96,96,.12); }
@keyframes contantBackupSpin { to { transform:rotate(360deg); } }
@media (max-width:700px) {
  #backupOperationStatus:not(.hidden) ~ .backup-section .backup-password-panel { top:88px; }
  .backup-operation-status { border-radius:14px; padding:11px 12px; }
}
#backupMessage { color:var(--muted); }
#backupMessage.status-working,#backupMessage.status-action { color:#9fc3ff; }
#backupMessage.status-success { color:#79dfa7; }
#backupMessage.status-error { color:#ff8585; }

/* RC66 — conferma finale ripristino */
.restore-completed-panel{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:14px;margin-top:16px;padding:18px;border:1px solid rgba(92,211,142,.45);border-radius:18px;background:rgba(22,113,67,.16)}
.restore-completed-panel.hidden{display:none}
.restore-completed-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:50%;font-size:24px;font-weight:800;background:rgba(92,211,142,.18)}
.restore-completed-panel strong,.restore-completed-panel small{display:block}
.restore-completed-panel small{margin-top:4px}
@media (max-width:700px){.restore-completed-panel{grid-template-columns:auto 1fr}.restore-completed-panel .primary-button{grid-column:1/-1;width:100%}}

/* RC66 — comandi backup/ripristino disponibili solo dopo password esplicita */
#backupDialog button:disabled,
#backupDialog .file-label.is-disabled {
  opacity:.46;
  cursor:not-allowed;
  filter:saturate(.45);
}
#backupDialog .primary-button:disabled {
  background:rgba(255,255,255,.055);
  border-color:var(--line);
  color:var(--muted);
  box-shadow:none;
}
#backupDialog .file-label.is-disabled { pointer-events:none; }
.restore-password-panel { margin-top:14px; }


/* RC66 — Home mobile: brand più presente e voce Altro mai ritagliata */
@media (max-width:670px) {
  .contant-home-brand-image {
    width:min(92vw,340px);
    max-width:100%;
    max-height:164px;
    border-radius:16px;
  }
  .bottom-nav {
    padding-left:max(6px, env(safe-area-inset-left));
    padding-right:max(6px, env(safe-area-inset-right));
  }
  .nav-item[data-view="more"] { overflow:visible; }
  .nav-item[data-view="more"] .nav-more {
    width:34px;
    min-width:34px;
    overflow:visible;
    transform:none;
  }
  .nav-item[data-view="more"] .nav-more::before {
    left:50%;
    top:9px;
    transform:translateX(-50%);
  }
}
@media (max-width:390px) {
  .contant-home-brand-image { width:min(92vw,320px); max-height:154px; }
  .bottom-nav {
    padding-left:max(4px, env(safe-area-inset-left));
    padding-right:max(4px, env(safe-area-inset-right));
  }
  .nav-item[data-view="more"] .nav-more { width:32px; min-width:32px; }
}

/* RC68 — i riepiloghi sotto il grafico principale seguono Torta/Barre/Colonne quando compatibile. */
/* RC71 — Altro usa tre cerchi grafici reali: distanza controllata e coerente su tutti i font/dispositivi. */
.report-summary-donut{display:grid;grid-template-columns:minmax(120px,155px) minmax(0,1fr);gap:14px;align-items:center}.report-summary-donut svg{width:100%;height:auto}.report-summary-legend{display:grid;gap:7px;min-width:0}.report-summary-legend-row{display:grid;grid-template-columns:10px minmax(0,1fr) auto;gap:7px;align-items:center}.report-summary-legend-row i{width:9px;height:9px;border-radius:50%}.report-summary-legend-row span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#cbd4e3;font-size:12px}.report-summary-legend-row b{white-space:nowrap;font-size:12px}.report-summary-columns{display:grid;gap:8px;align-items:end;min-height:190px;overflow-x:auto;padding:4px 0 8px}.report-summary-columns article{display:grid;grid-template-rows:auto 135px auto;gap:6px;align-items:end;text-align:center}.report-summary-columns article>b{font-size:11px;white-space:nowrap}.report-summary-columns article>span{height:135px;display:flex;align-items:flex-end;justify-content:center;border-radius:8px 8px 3px 3px;background:rgba(255,255,255,.055);overflow:hidden}.report-summary-columns article>span i{display:block;width:min(58%,34px);min-height:3px;border-radius:7px 7px 2px 2px;background:linear-gradient(180deg,#8a7dff,#5c9dff)}.report-summary-columns article>small{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#b9c8da;font-size:10px}@media(max-width:720px){.report-summary-donut{grid-template-columns:1fr}.report-summary-donut svg{max-width:170px;margin:auto}}


/* RC76 — Posta del Denaro: azioni mobile senza overflow e RAW compatto */
.inbox-review-card #inboxRecognizedText{min-height:150px;resize:vertical}
@media(max-width:700px){
  .inbox-review-card{overflow-x:hidden}
  .inbox-review-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;width:100%;align-items:stretch}
  .inbox-review-actions>*{min-width:0;width:100%;margin:0;white-space:normal;text-align:center}
  .inbox-review-actions #retryInboxAnalysis{grid-column:1;grid-row:1}
  .inbox-review-actions #saveInboxForLater{grid-column:2;grid-row:1}
  .inbox-review-actions #registerInboxMovement{grid-column:1/-1;grid-row:2;min-height:56px;font-size:16px;font-weight:800}
  .inbox-review-actions #deleteInboxItem{grid-column:1/-1;grid-row:3;justify-self:start;width:auto;min-height:42px;padding:8px 14px}
  .inbox-review-card #inboxRecognizedText{min-height:96px;max-height:220px}
}
@media(max-width:380px){
  .inbox-review-actions{grid-template-columns:1fr}
  .inbox-review-actions #retryInboxAnalysis,.inbox-review-actions #saveInboxForLater,.inbox-review-actions #registerInboxMovement,.inbox-review-actions #deleteInboxItem{grid-column:1}
  .inbox-review-actions #retryInboxAnalysis{grid-row:1}.inbox-review-actions #saveInboxForLater{grid-row:2}.inbox-review-actions #registerInboxMovement{grid-row:3}.inbox-review-actions #deleteInboxItem{grid-row:4}
}

/* RC79 — sblocco biometrico / autenticatore del dispositivo */
.biometric-unlock-button{width:100%;margin-top:12px;display:flex;align-items:center;justify-content:center;gap:9px;font-weight:800}
.biometric-unlock-button.hidden{display:none}
.biometric-glyph{font-size:24px;line-height:1}
.biometric-lock-hint{margin:8px auto 0;max-width:320px;text-align:center}
.security-divider{display:flex;align-items:center;gap:10px;margin:14px 0 4px;color:var(--muted);font-size:12px;text-transform:uppercase;letter-spacing:.08em}
.security-divider::before,.security-divider::after{content:"";height:1px;flex:1;background:var(--line)}
.biometric-status-row{margin-bottom:10px}
.biometric-status-icon{font-size:20px}
.biometric-privacy-note{margin:0 0 14px;padding:10px 12px;border:1px solid var(--line);border-radius:13px;background:rgba(255,255,255,.018);color:var(--muted);font-size:13px;line-height:1.45}
.biometric-setup-card .pin-input{max-width:220px;margin:8px auto 0}
@media(max-width:520px){.biometric-status-row{align-items:flex-start;flex-wrap:wrap}.biometric-status-row>button{width:100%;margin-top:4px}.biometric-setup-card .modal-actions{grid-template-columns:1fr}}

/* RC80 — Cassaforte cifrata con PIN separato */
.quick-action.vault { grid-column:1 / -1; min-height:88px; flex-direction:row; background:linear-gradient(145deg,rgba(31,45,76,.99),rgba(12,22,43,.99)); border-color:rgba(121,166,255,.46); }
.quick-action.vault > span { flex:0 0 auto; color:#dce8ff; background:rgba(95,142,235,.17); font-size:25px; }
.quick-action.vault small { display:block; color:rgba(255,255,255,.78); }
.vault-card { width:min(920px,calc(100vw - 22px)); }
.vault-security-banner { display:flex; align-items:flex-start; gap:12px; padding:14px 15px; margin-bottom:15px; border:1px solid rgba(93,139,232,.26); border-radius:18px; background:rgba(54,92,166,.08); }
.vault-security-banner > span { width:40px; height:40px; flex:0 0 auto; display:grid; place-items:center; border-radius:13px; color:#d7e5ff; background:rgba(83,129,222,.16); font-size:21px; }
.vault-security-banner p { margin:0; display:flex; flex-direction:column; gap:4px; }
.vault-security-banner small { color:var(--muted); line-height:1.45; }
.vault-gate-panel { max-width:610px; margin:8px auto 0; padding:18px; border:1px solid var(--line); border-radius:20px; background:rgba(255,255,255,.025); }
.vault-gate-panel h3 { margin:0 0 7px; }
.vault-pin-grid,.vault-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.vault-warning { margin:13px 0; padding:11px 12px; border-radius:14px; border:1px solid rgba(255,189,55,.24); background:rgba(255,189,55,.06); color:#ead7a0; }
.vault-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin:3px 0 12px; }
.vault-search { flex:1 1 320px; margin:0; }
.vault-search input { width:100%; }
.vault-toolbar-actions { display:flex; gap:8px; flex-wrap:wrap; }
.vault-search-summary { min-height:20px; margin:0 2px 9px; color:var(--muted); font-size:13px; }
.vault-list { display:grid; gap:9px; max-height:min(55vh,620px); overflow:auto; padding-right:2px; }
.vault-empty { padding:22px 15px; text-align:center; border:1px dashed rgba(145,167,205,.22); border-radius:18px; color:var(--muted); }
.vault-empty strong { display:block; margin-bottom:5px; color:#e9f0fb; }
.vault-list-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; align-items:center; padding:13px 14px; border:1px solid rgba(145,167,205,.16); border-radius:17px; background:rgba(255,255,255,.025); }
.vault-list-row.favorite { border-color:rgba(255,190,55,.28); }
.vault-list-copy { min-width:0; display:flex; flex-direction:column; gap:4px; }
.vault-list-copy strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:16px; }
.vault-list-copy small { color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.vault-kind-pill { display:inline-flex; width:max-content; max-width:100%; border-radius:999px; padding:3px 8px; background:rgba(90,138,235,.12); color:#a9c7ff; font-size:11px; }
.vault-list-actions { display:flex; gap:7px; flex-wrap:wrap; justify-content:flex-end; }
.vault-list-actions button { min-width:auto; }
.vault-management { display:flex; gap:9px; flex-wrap:wrap; justify-content:space-between; margin-top:15px; padding-top:14px; border-top:1px solid var(--line); }
.vault-backup-note { margin-top:10px; }
.vault-editor-card { width:min(760px,calc(100vw - 22px)); }
.vault-secret-input { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; }
.vault-secret-input .secondary-button { white-space:nowrap; }
.vault-custom-section { margin-top:14px; padding:14px; border:1px solid var(--line); border-radius:17px; background:rgba(255,255,255,.02); }
.section-heading.compact { margin:0 0 10px; }
.section-heading.compact h3 { margin:0; font-size:16px; }
.section-heading.compact small { color:var(--muted); }
.vault-custom-fields { display:grid; gap:8px; }
.vault-custom-row { display:grid; grid-template-columns:minmax(0,.75fr) minmax(0,1.25fr) auto; gap:8px; align-items:center; }
.vault-custom-row input { min-width:0; }
.vault-custom-row button { width:42px; min-width:42px; height:42px; padding:0; border-radius:12px; }
.danger-button.compact { width:auto; min-height:42px; }
.sr-only { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important; }
@media (max-width:620px) {
  .quick-action.reminder,.quick-action.vault { min-height:78px; }
  .vault-pin-grid,.vault-form-grid { grid-template-columns:1fr; }
  .vault-toolbar { align-items:stretch; }
  .vault-toolbar-actions { display:grid; grid-template-columns:1fr 1fr; width:100%; }
  .vault-toolbar-actions #lockVaultNow { grid-column:1 / -1; }
  .vault-list-row { grid-template-columns:1fr; }
  .vault-list-actions { justify-content:flex-start; }
  .vault-list-actions > * { flex:1 1 auto; }
  .vault-custom-row { grid-template-columns:1fr auto; }
  .vault-custom-row input[data-vault-custom-value] { grid-column:1 / -1; grid-row:2; }
  .vault-management > * { width:100%; }
}

/* RC80.2 — UX Cassaforte compatta + allegati cifrati */
.vault-title-with-info{display:flex;align-items:center;gap:8px}
.vault-title-with-info h2{margin:0}
.vault-list-name{min-width:0;display:flex;flex-direction:column;gap:2px}
.vault-list-name strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:16px}
.vault-list-name small{color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
.vault-list-actions{display:flex;gap:5px;flex-wrap:nowrap;justify-content:flex-end;align-items:center}
.vault-row-action{padding:6px 7px!important;min-height:34px!important;white-space:nowrap;font-size:13px}
.vault-delete-with-info{display:flex;align-items:center;gap:8px}
.vault-attachments-section{margin-top:14px;padding:14px;border:1px solid var(--line);border-radius:17px;background:rgba(255,255,255,.02)}
.vault-attachment-list{display:grid;gap:8px}
.vault-attachment-empty{margin:0;color:var(--muted);font-size:13px}
.vault-attachment-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 10px;border:1px solid rgba(145,167,205,.14);border-radius:13px;background:rgba(255,255,255,.018)}
.vault-attachment-row>span{min-width:0;display:flex;flex-direction:column;gap:2px}
.vault-attachment-row strong,.vault-attachment-row small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.vault-attachment-row small{color:var(--muted);font-size:12px}
.vault-viewer-card{width:min(720px,calc(100vw - 22px))}
.vault-viewer-content{display:grid;gap:10px}
.vault-view-kind{display:inline-flex;width:max-content;max-width:100%;padding:4px 9px;border-radius:999px;background:rgba(90,138,235,.12);color:#a9c7ff;font-size:12px}
.vault-view-field{padding:11px 12px;border:1px solid rgba(145,167,205,.14);border-radius:14px;background:rgba(255,255,255,.018)}
.vault-view-field small{display:block;margin-bottom:4px;color:var(--muted)}
.vault-view-field>div{overflow-wrap:anywhere}
.vault-view-notes>div{white-space:pre-wrap}
.vault-view-secret-row{display:flex!important;align-items:center;gap:7px;flex-wrap:wrap}
.vault-view-secret-row>span{min-width:90px;flex:1 1 auto;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;overflow-wrap:anywhere}
.vault-view-attachments{display:grid;gap:8px;margin-top:4px}
.vault-view-attachments h3{margin:5px 0 0;font-size:16px}
.vault-view-attachment{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 11px;border:1px solid rgba(145,167,205,.14);border-radius:14px;background:rgba(255,255,255,.018)}
.vault-view-attachment>span{min-width:0;display:flex;flex-direction:column;gap:2px}
.vault-view-attachment strong,.vault-view-attachment small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.vault-view-attachment small{color:var(--muted);font-size:12px}
@media(max-width:620px){
  .vault-list-row{grid-template-columns:minmax(0,1fr) auto!important;gap:6px;padding:10px 9px}
  .vault-list-actions{justify-content:flex-end!important;gap:1px}
  .vault-list-actions>*{flex:0 0 auto!important}
  .vault-row-action{padding:5px 4px!important;font-size:12px}
  .vault-management>*{width:auto!important}
  .vault-management{align-items:center}
  .vault-delete-with-info{width:auto!important}
  .vault-attachments-section .section-heading.compact{align-items:stretch;gap:10px}
  .vault-attachments-section .section-heading.compact>button{width:100%}
  .vault-view-secret-row .secondary-button{flex:1 1 auto}
}
@media(max-width:390px){
  .vault-list-name strong{font-size:15px}
  .vault-list-name small{font-size:10.5px}
  .vault-row-action{padding:4px 2px!important;font-size:11.5px}
}

/* RC80.3 — visualizzatore interno allegati Cassaforte */
.vault-attachment-viewer-card{width:min(980px,calc(100vw - 18px));max-height:min(94vh,980px)}
.vault-attachment-preview-body{min-height:220px;max-height:72vh;overflow:auto;display:flex;align-items:flex-start;justify-content:center;padding:10px;border:1px solid var(--line);border-radius:16px;background:#08111f}
.vault-attachment-preview-loading{margin:auto;color:var(--muted);text-align:center}
.vault-attachment-preview-image{display:block;max-width:100%;height:auto;max-height:68vh;object-fit:contain;border-radius:10px;background:#fff}
.vault-attachment-preview-canvas{display:block;max-width:100%;height:auto;margin:0 auto;border-radius:6px;background:#fff;box-shadow:0 8px 28px rgba(0,0,0,.28)}
.vault-attachment-pdf-nav{display:flex;align-items:center;justify-content:center;gap:10px;margin-top:10px}
.vault-attachment-pdf-nav span{min-width:94px;text-align:center;color:var(--muted);font-size:13px}
@media(max-width:620px){.vault-attachment-viewer-card{width:calc(100vw - 10px);max-height:96vh}.vault-attachment-preview-body{min-height:180px;max-height:69vh;padding:6px}.vault-attachment-pdf-nav{display:grid;grid-template-columns:1fr auto 1fr}.vault-attachment-pdf-nav button{min-width:0;padding-inline:8px}}
/* RC80.6 — diagnostica viewer Cassaforte, visibile solo con ?vault-debug=1 */
.vault-attachment-debug{width:100%;margin:10px 0 0;padding:10px;border:1px dashed rgba(145,167,205,.25);border-radius:12px;background:#050b13;color:var(--muted);font:11px/1.45 ui-monospace,SFMono-Regular,Consolas,monospace;white-space:pre-wrap;overflow-wrap:anywhere}


/* RC82 — Conto del Tempo / ContoLavoro */
.form-grid-span{grid-column:1/-1}.account-kind-fields>.form-grid{margin-top:2px}.time-account-config{border:1px solid var(--line);border-radius:18px;padding:14px;background:rgba(255,255,255,.025)}
.time-rule-switches{display:grid;gap:8px;margin-top:12px}.work-days{border:1px solid var(--line);border-radius:14px;padding:10px 12px;margin:12px 0 0;display:flex;gap:10px;flex-wrap:wrap}.work-days legend{padding:0 6px;color:var(--muted);font-size:13px}.work-days label{display:flex;gap:5px;align-items:center;font-size:13px}.time-account-badge{font-size:11px;letter-spacing:.08em;border:1px solid var(--line);border-radius:999px;padding:5px 8px;color:var(--muted)}
.time-toolbar{display:flex;justify-content:space-between;align-items:end;gap:14px;margin-bottom:16px}.time-toolbar label{max-width:220px}.time-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:10px 0 18px}.time-summary-card{border:1px solid var(--line);border-radius:16px;padding:12px;background:rgba(255,255,255,.035)}.time-summary-card small{display:block;color:var(--muted);margin-bottom:5px}.time-summary-card strong{font-size:19px}.time-summary-card.wide{grid-column:span 2}.time-section{margin-top:18px}.time-section-head{display:flex;justify-content:space-between;align-items:end;gap:12px;margin-bottom:10px}.time-section h3{margin:4px 0 0}.time-entry-list{display:grid;gap:9px}.time-entry-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:11px;width:100%;text-align:left;color:var(--text);background:rgba(255,255,255,.03);border:1px solid var(--line);border-radius:15px;padding:12px;cursor:pointer}.time-entry-date{width:52px;text-align:center}.time-entry-date b,.time-entry-date small{display:block}.time-entry-date b{font-size:18px}.time-entry-date small{color:var(--muted);text-transform:uppercase;font-size:11px}.time-entry-copy{min-width:0}.time-entry-copy strong,.time-entry-copy small{display:block}.time-entry-copy small{color:var(--muted);margin-top:3px;white-space:normal}.time-entry-hours{text-align:right}.time-entry-hours strong,.time-entry-hours small{display:block;white-space:nowrap}.time-entry-hours small{color:var(--muted);font-size:11px}.time-entry-chevron{font-size:22px;color:var(--muted)}.time-calculation-preview{margin-top:14px;border:1px solid var(--line);border-radius:15px;padding:12px;background:rgba(56,189,248,.06);display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 12px}.time-calculation-preview strong{grid-column:1/-1}.time-calc-line{display:flex;justify-content:space-between;gap:10px;font-size:13px}.time-vehicle-summary{display:grid;gap:7px;margin-top:8px}.time-vehicle-row{display:flex;justify-content:space-between;gap:12px;padding:9px 11px;border:1px solid var(--line);border-radius:12px}.modal-spacer{flex:1}.time-entry-card .danger-button{margin-right:auto}.time-account-card .helper{margin-top:16px}.time-account-card .modal-header small{color:var(--muted)}
@media(max-width:700px){.time-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.time-toolbar,.time-section-head{align-items:stretch;flex-direction:column}.time-toolbar label{max-width:none;width:100%}.time-toolbar>div,.time-toolbar button{width:100%}.time-entry-row{grid-template-columns:auto minmax(0,1fr) auto}.time-entry-chevron{display:none}.time-calculation-preview{grid-template-columns:1fr}.time-calculation-preview strong{grid-column:auto}}

/* RC82.4 — azioni esplicite registrazioni Conto del Tempo */
.time-entry-open{min-width:0;border:0;background:transparent;color:inherit;text-align:left;padding:0;cursor:pointer}.time-entry-actions{display:flex;gap:6px;align-items:center}.time-entry-action{min-height:34px;padding:6px 9px;border:1px solid var(--line);border-radius:10px;background:rgba(255,255,255,.045);color:var(--text);font-size:12px;font-weight:700;cursor:pointer}.time-entry-action:hover{border-color:rgba(50,133,255,.45);background:rgba(50,133,255,.08)}@media(max-width:700px){.time-entry-row{grid-template-columns:auto minmax(0,1fr) auto}.time-entry-actions{grid-column:2/-1;justify-content:flex-end}.time-entry-action{flex:1;max-width:120px}}

/* RC82.4 · cartellino mensile compatto */
.time-entry-list{display:block;border:1px solid var(--line);border-radius:16px;overflow:hidden;background:rgba(255,255,255,.018)}
.time-ledger-head,.time-ledger-row{display:grid;grid-template-columns:138px minmax(0,1fr) 116px;align-items:center;gap:12px;width:100%;text-align:left}
.time-ledger-head{padding:9px 14px;border-bottom:1px solid var(--line);color:var(--muted);font-size:11px;font-weight:800;letter-spacing:.07em;text-transform:uppercase}
.time-ledger-head span:last-child{text-align:right}.time-ledger-row{min-height:54px;padding:10px 14px;border:0;border-bottom:1px solid var(--line);color:var(--text);background:transparent}
.time-ledger-row:last-child{border-bottom:0}.time-ledger-entry{cursor:pointer}.time-ledger-entry:hover,.time-ledger-entry:focus-visible{background:rgba(50,133,255,.08);outline:none}
.time-ledger-date{font-size:14px;white-space:nowrap;letter-spacing:.01em}.time-ledger-kind{min-width:0;font-weight:720}.time-ledger-kind small{display:block;margin-top:2px;color:var(--muted);font-size:11px;font-weight:500}.time-ledger-total{text-align:right;white-space:nowrap;font-size:15px}
.time-ledger-holiday{background:rgba(255,255,255,.025);color:var(--muted)}.time-ledger-holiday .time-ledger-date,.time-ledger-holiday .time-ledger-kind{font-weight:650}.time-ledger-holiday .time-ledger-total{font-weight:500}
.time-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:8px}.time-detail-row{border:1px solid var(--line);border-radius:13px;padding:10px 12px;background:rgba(255,255,255,.025);min-width:0}.time-detail-row small,.time-detail-row strong{display:block}.time-detail-row small{color:var(--muted);margin-bottom:4px}.time-detail-row strong{overflow-wrap:anywhere}
@media(max-width:700px){.time-ledger-head,.time-ledger-row{grid-template-columns:102px minmax(0,1fr) 92px;gap:8px}.time-ledger-head{padding:8px 10px}.time-ledger-row{padding:10px;min-height:50px}.time-ledger-date{font-size:12px}.time-ledger-kind{font-size:14px}.time-ledger-total{font-size:13px}.time-detail-grid{grid-template-columns:1fr}}


/* RC82.5 — browser movimenti mobile, stampa Tempo e orari rapidi */
.movement-browser-card{display:flex;flex-direction:column;overflow:hidden}
.movement-browser-card>.modal-header,.movement-browser-card>.movement-browser-context,.movement-browser-card>.movement-type-chips{flex:0 0 auto}
.movement-browser-card>.movement-browser-list{flex:1 1 auto;min-height:0;max-height:none;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.time-clock-help{display:block;margin:-4px 2px 12px;color:var(--muted);font-size:12px;line-height:1.4}
.time-clock-input{font-variant-numeric:tabular-nums;letter-spacing:.04em}
#timePrintSheet{display:none}
@media(max-width:670px){
  #movementBrowserDialog{margin:auto;padding:0;max-width:none;max-height:none}
  #movementBrowserDialog .movement-browser-card{width:calc(100vw - 12px);height:min(94dvh,900px);max-height:94dvh;padding:16px 14px;border-radius:22px}
  #movementBrowserDialog .modal-header{margin:0 0 12px;padding:0;position:relative;top:auto;background:none}
  #movementBrowserDialog .modal-header h2{font-size:25px;line-height:1.1;margin-top:3px}
  #movementBrowserDialog .movement-browser-context{padding:12px 14px;margin-bottom:10px}
  #movementBrowserDialog .movement-type-chips{margin-bottom:10px}
  #movementBrowserDialog .movement-browser-list{padding-bottom:calc(10px + env(safe-area-inset-bottom))}
  #movementBrowserDialog .browser-movement-row{padding:12px 8px;gap:9px}
  #movementBrowserDialog .movement-icon{width:42px;height:42px;min-width:42px}
  #movementBrowserDialog .movement-copy strong{font-size:16px}
  #movementBrowserDialog .movement-copy small{font-size:12px}
  #movementBrowserDialog .movement-amount{font-size:17px;white-space:nowrap}
}
@media print{
  body> :not(#timePrintSheet){display:none!important}
  #timePrintSheet{display:block!important;position:static!important;width:auto!important;height:auto!important;margin:0!important;padding:0!important;background:#fff!important;color:#111!important;font:12px/1.35 Arial,sans-serif!important}
  #timePrintSheet h1{font-size:22px;margin:0 0 4px}
  #timePrintSheet p{margin:4px 0 10px}
  #timePrintSheet .time-print-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin:14px 0}
  #timePrintSheet .time-print-summary div{border:1px solid #bbb;padding:7px}
  #timePrintSheet small{color:#555}
  #timePrintSheet table{border-collapse:collapse;width:100%;font-size:11px}
  #timePrintSheet th,#timePrintSheet td{border:1px solid #bbb;padding:5px;text-align:left;vertical-align:top}
  #timePrintSheet th{background:#eee}
}

/* RC82.6 — Registra tempo + giornate aggregate */
.quick-action.time{background:linear-gradient(145deg,rgba(21,139,132,.98),rgba(10,79,84,.98));border-color:rgba(89,232,220,.45)}
.quick-action.time>span{background:rgba(119,255,240,.14)}
.quick-action.reminder,.quick-action.time{grid-column:auto;min-height:92px;flex-direction:column}
.quick-action.reminder small,.quick-action.time small{display:none}
.quick-time-account-list{display:grid;gap:9px;margin-top:8px}.quick-time-account-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;width:100%;padding:13px;border:1px solid var(--line);border-radius:16px;background:rgba(255,255,255,.025);color:var(--text);text-align:left}.quick-time-account-row span:nth-child(2){min-width:0}.quick-time-account-row strong,.quick-time-account-row small{display:block}.quick-time-account-row small{color:var(--muted);margin-top:3px}.quick-time-account-row i{font-style:normal;color:var(--muted);font-size:22px}
.time-ledger-kind .time-day-components-inline{display:block;margin-top:2px;color:var(--muted);font-size:11px;font-weight:600;white-space:normal}
.time-day-components{display:grid;gap:10px}.time-day-component{border:1px solid var(--line);border-radius:16px;padding:12px;background:rgba(255,255,255,.025)}.time-day-component-head{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:start}.time-day-component-head strong,.time-day-component-head small{display:block}.time-day-component-head small{color:var(--muted);margin-top:3px}.time-day-component-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.time-day-component-actions button{min-height:38px}
@media(max-width:700px){.quick-action.reminder,.quick-action.time{min-height:82px}.time-day-component-head{grid-template-columns:1fr}.time-day-component-head>b{justify-self:start}}

/* RC82.7 — export allegati e comunicazione aggiornamenti */
.report-export-attachments { margin:14px 0 2px; }
.report-export-attachment-row { display:flex; gap:12px; align-items:flex-start; border:1px solid var(--line); border-radius:16px; padding:14px; background:rgba(255,255,255,.025); cursor:pointer; }
.report-export-attachment-row input { width:20px; height:20px; margin:2px 0 0; flex:0 0 auto; }
.report-export-attachment-row span { display:grid; gap:4px; min-width:0; }
.report-export-attachment-row small { color:var(--muted); line-height:1.4; }
.more-updates-button { position:relative; }
.update-new-badge { position:absolute; top:9px; right:10px; padding:3px 7px; border-radius:999px; background:var(--accent,#3285ff); color:#fff; font-size:10px; font-style:normal; font-weight:800; letter-spacing:.04em; }
.update-history-panel { border:1px solid var(--line); border-radius:18px; padding:0 16px; margin-bottom:14px; background:rgba(255,255,255,.02); }
.update-history-panel summary { cursor:pointer; padding:14px 0; font-weight:750; }
.update-release-history { display:grid; gap:12px; padding:0 0 15px; }
.update-history-item { border-top:1px solid var(--line); padding-top:12px; }
.update-history-item:first-child { border-top:0; padding-top:0; }
.update-history-item header { display:flex; gap:10px; align-items:baseline; justify-content:space-between; flex-wrap:wrap; }
.update-history-item header strong { font-size:15px; }
.update-history-item header small { color:var(--muted); }
.update-history-item ul { margin:8px 0 0; padding-left:20px; display:grid; gap:5px; color:var(--muted); }
.whats-new-card { width:min(620px,calc(100vw - 24px)); }
.whats-new-version { display:inline-flex; margin:2px 0 12px; padding:5px 9px; border-radius:999px; background:rgba(50,133,255,.13); color:#a9ceff; font-weight:750; }
.whats-new-notes { margin:0 0 16px; padding-left:22px; display:grid; gap:9px; line-height:1.45; }
@media (max-width:520px){
  .update-new-badge { top:8px; right:8px; }
  .report-export-attachment-row { padding:12px; }
}

/* RC82.8 — novità cumulative e registrazione Tempo continua */
.whats-new-release-group { list-style:none; margin:2px 0 8px; padding:0; }
.whats-new-release-group > strong { display:block; margin-bottom:7px; color:var(--text); font-size:15px; }
.whats-new-release-group > ul { margin:0; padding-left:21px; display:grid; gap:7px; }
.time-entry-saved-card { width:min(540px,calc(100vw - 24px)); }
.time-entry-followup-note { margin:14px 0 4px; padding:14px 16px; border:1px solid var(--line); border-radius:16px; background:rgba(255,255,255,.035); display:grid; gap:4px; }
.time-entry-followup-note small { color:var(--muted); line-height:1.45; }
@media(max-width:520px){.time-entry-saved-card .modal-actions{display:grid;grid-template-columns:1fr}.time-entry-saved-card .modal-actions button{width:100%}}

/* RC82.9 — export selection + explicit confirmation */
.report-export-choice { position:relative; transition:border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.report-export-choice[aria-pressed="true"], .report-export-choice.selected { border-color:rgba(77,160,255,.78); background:rgba(50,133,255,.13); box-shadow:inset 0 0 0 1px rgba(77,160,255,.22); }
.report-export-choice[aria-pressed="true"]::after { content:'✓'; position:absolute; top:12px; right:14px; width:24px; height:24px; border-radius:999px; display:grid; place-items:center; background:rgba(77,160,255,.2); color:#dcecff; font-weight:800; }
.report-export-confirmation { display:grid; gap:10px; margin-top:16px; padding-top:14px; border-top:1px solid var(--line); }
.report-export-confirmation .helper { margin:0; }
.report-export-confirmation .primary-button { width:100%; }
.report-export-confirmation .primary-button:disabled { opacity:.48; cursor:not-allowed; filter:saturate(.45); }
@media (max-width:700px){
  .report-export-choice[aria-pressed="true"]::after { top:10px; right:12px; }
  .report-export-confirmation { position:sticky; bottom:0; background:linear-gradient(180deg,transparent,var(--panel) 22%); padding-top:24px; }
}

/* RC82.10 — azioni Conto del Tempo responsive su smartphone */
@media (max-width:520px){
  #timeEntryDialog .modal-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;justify-content:stretch;align-items:stretch}
  #timeEntryDialog .modal-actions .modal-spacer{display:none}
  #timeEntryDialog .modal-actions button{width:100%;min-width:0;white-space:normal;overflow-wrap:anywhere}
  #timeEntryDetailDialog .modal-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;justify-content:stretch;align-items:stretch}
  #timeEntryDetailDialog .modal-actions .modal-spacer{display:none}
  #timeEntryDetailDialog .modal-actions button{width:100%;min-width:0;white-space:normal}
  #editTimeEntryDetail{grid-column:1/-1}
}

/* RC82.14 — Scanner documenti locale */
.quick-action.scan > span:first-child{display:grid;place-items:center;width:38px;height:38px;border-radius:13px;background:rgba(255,205,49,.14);color:#ffd45a;font-size:20px}
.scanner-modal{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;padding:0;border:0;background:rgba(3,10,18,.88)}
.scanner-modal::backdrop{background:rgba(0,0,0,.72)}
.scanner-card{width:min(100vw,1080px);height:100dvh;max-height:100dvh;margin:0 auto;border-radius:0;display:flex;flex-direction:column;overflow:hidden;padding:18px 18px calc(18px + env(safe-area-inset-bottom));background:#07111f}
.scanner-helper{margin:0 0 10px;color:#9ab4ca;line-height:1.45;font-size:13px}
.scanner-stage{flex:1;min-height:260px;display:grid;place-items:center;overflow:hidden;border:1px solid rgba(143,183,216,.18);border-radius:16px;background:#020812;padding:4px}
#documentScannerCanvas{display:block;max-width:100%;max-height:100%;border-radius:12px;touch-action:none;user-select:none;-webkit-user-select:none;background:#020812}
.scanner-controls{display:grid;grid-template-columns:auto auto minmax(150px,1fr);gap:9px;align-items:end;margin-top:10px}
.scanner-controls label{display:grid;gap:6px}.scanner-controls label span{font-size:12px;color:#9ab4ca}.scanner-controls select{min-height:46px}
.scanner-actions{margin-top:10px}.scanner-actions button{min-height:48px}
@media(max-width:700px){.scanner-card{padding:12px 12px calc(14px + env(safe-area-inset-bottom))}.scanner-helper{font-size:12px}.scanner-stage{min-height:240px}.scanner-controls{grid-template-columns:1fr 1fr}.scanner-controls label{grid-column:1/-1}.scanner-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px}.money-inbox-actions{grid-template-columns:1fr 1fr}}
@media(min-width:701px){.money-inbox-actions{grid-template-columns:repeat(5,minmax(0,1fr))}}


/* RC82.14 — menu +: Nuovo promemoria a larghezza piena come Cassaforte */
.quick-action.reminder{grid-column:1 / -1;min-height:88px;flex-direction:row}
.quick-action.reminder small{display:block;color:rgba(255,255,255,.82)}
@media(max-width:620px){.quick-action.reminder{min-height:78px}}
