:root {
  /* --family-font-heading / --family-font-body vivono nella sezione
     "FAMILY HOME — TYPOGRAPHY SYSTEM" qui sotto, insieme al resto dei
     token tipografici, per avere un'unica source of truth. */
  --ca-primary: #4f46ff;
  --ca-primary-soft: #f1f0ff;
  --ca-border: #e4e8f1;
  --ca-text: #10172f;
  --family-mobile-bottom-nav-height: 68px;
  --ca-z-mobile-nav: 1030;
  --ca-z-mobile-cta: 1040;
  --ca-z-more-overlay: 1050;
  --ca-z-more-sheet: 1055;
  --ca-z-quick-overlay: 1060;
  --ca-z-quick-sheet: 1065;
}

/* ============================================================
   FAMILY HOME — TYPOGRAPHY SYSTEM
   Fondamenta ufficiali: famiglie, pesi, scala dimensioni, line-height,
   letter-spacing. Le 20 pagine dell'app continuano a contenere font-size
   locali "legacy": la migrazione a questi token è progressiva (Step 3+).
   Questa sezione è l'unica sorgente di verità per la tipografia — non
   aggiungere token equivalenti altrove nel file.
   ============================================================ */
:root {
  /* Famiglie — invariate rispetto allo Step 1, solo spostate qui */
  --family-font-heading: "Poppins", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --family-font-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Pesi ufficiali — da preferire ai numeri sparsi nei nuovi componenti */
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;

  /* Scala dimensioni — calibrata sui valori realmente più ricorrenti nel
     CSS esistente (vedi commento di mappatura in fondo alla sezione).
     --text-2xs aggiunto nello Step 3, solo per badge/contatori compatti dei
     componenti condivisi: non scende sotto i 10px richiesti. */
  --text-2xs: 10px;
  --text-xs: 11px;
  --text-sm: 12px;
  --text-md: 13px;
  --text-lg: 14px;
  --text-xl: 16px;

  --title-sm: 18px;
  --title-md: 22px;
  --title-lg: 28px;
  --title-xl: 32px;

  --display-sm: clamp(28px, 2.2vw, 32px);
  --display-lg: clamp(32px, 3.4vw, 40px);

  /* Line-height */
  --leading-tight: 1.15;   /* titoli grandi (title-lg/xl, display) */
  --leading-snug: 1.3;     /* titoli piccoli, card title */
  --leading-normal: 1.5;   /* body */
  --leading-relaxed: 1.6;  /* descrizioni lunghe */

  /* Letter-spacing — quasi sempre neutro per scelta */
  --tracking-normal: normal;
  --tracking-tight: -0.02em;  /* solo su title-lg/xl e display */
  --tracking-wide: 0.04em;    /* solo su label uppercase */
}

/* Family Home non vuole una UI che rimpicciolisce solo perché lo schermo è
   piccolo: sotto i 991.98px il tema Metronic sottostante forza html/body a
   12px !important. Su mobile cambia il layout, non la leggibilità del
   testo: manteniamo la stessa base del desktop a ogni breakpoint. */
@media (max-width: 991.98px) {
  html, body { font-size: 13px !important; }
}

/* ------------------------------------------------------------
   Gerarchia semantica (source of truth — non ogni riga ha una classe
   dedicata: i componenti condivisi consumano questi token direttamente).

   Ruolo             Famiglia   Peso                  Dimensione
   ----------------- ---------- --------------------- --------------------
   Page Title        heading    --font-bold (700)     title-lg/xl (28-32)
   Page Description  body       --font-regular (400)  text-md/lg (13-14)
   Section Title      heading    --font-semibold/bold  title-sm/md (18-22)
   Card Title         heading*   --font-semibold (600) text-lg/title-sm
   Body               body       --font-regular (400)  text-md (13)
   Body Secondary     body       --font-regular (400)  text-sm (12)
   Label              body       --font-medium/semibold text-xs/sm (11-12)
   Badge              body       --font-medium/semibold text-xs (10-11)
   Button             body       --font-semibold (600) text-sm/lg (12-14)
   Metric             heading    --font-bold (700)     contestuale
   Display Metric     heading    --font-bold/extrabold display-sm/lg
   * Card Title può restare Inter semibold quando è un titolo di secondo
     piano (vedi punto 7 dell'audit): la scelta è del componente, non del
     token.
   ------------------------------------------------------------

   Mappatura legacy → nuovo token (informativa, per la migrazione Step 3+):
   7.5–10px  → da verificare singolarmente (micro-testo, spesso badge)
   10–10.5px → vicino a text-xs, valutare caso per caso
   11px      → text-xs        12px      → text-sm
   12.5px    → tra text-sm e text-md (arrotondare a text-sm o text-md)
   13px      → text-md        13.5–14px → text-lg
   15–16px   → text-xl        17–18px   → title-sm
   19–22px   → title-md       23–28px   → title-lg
   29–32px   → title-xl       clamp() display esistenti → display-sm/lg
   ------------------------------------------------------------ */

/* .min-w-0 is used throughout the markup (flex children that must be allowed to
   shrink/truncate) but this trimmed Bootstrap build never defines the utility. */
.min-w-0 { min-width: 0 !important; }

/* Avviso aggiornamento PWA: su mobile resta sopra la barra inferiore senza coprire l'header della pagina. */
.ca-pwa-update-toast { position: fixed; z-index: 1070; top: 18px; left: 50%; width: min(calc(100% - 32px), 560px); transform: translateX(-50%); }
.ca-pwa-update-toast-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid #b9d8ff; border-radius: 15px; background: #edf6ff; box-shadow: 0 10px 28px rgba(32, 83, 145, .16); color: #22599a; }
.ca-pwa-update-toast-icon { width: 21px; height: 21px; color: #6b7890; font-size: 21px; }
.ca-pwa-update-toast-copy { min-width: 0; color: #276db8; font-size: 14px; font-weight: 600; line-height: 1.35; }
.ca-pwa-update-toast-action { min-height: 38px; padding-inline: 14px; border-radius: 10px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
@media (max-width: 767.98px) {
  .ca-pwa-update-toast { top: auto; right: 12px; bottom: 12px; left: 12px; width: auto; transform: none; }
  body.has-mobile-bottom-nav .ca-pwa-update-toast { bottom: calc(var(--family-mobile-bottom-nav-height) + env(safe-area-inset-bottom) + 12px); }
  .ca-pwa-update-toast-card { gap: 10px; padding: 11px 12px; border-radius: 14px; }
  .ca-pwa-update-toast-copy { font-size: 13px; }
  .ca-pwa-update-toast-action { min-height: 36px; padding-inline: 12px; }
}

/* Motion System — fondazione condivisa, intenzionalmente discreta. */
:root {
  --ca-motion-micro: 160ms;
  --ca-motion-ui: 260ms;
  --ca-motion-page: 360ms;
  --ca-motion-delight: 700ms;
  --ca-motion-enter: cubic-bezier(0.16, 1, 0.3, 1);
  --ca-motion-exit: cubic-bezier(0.4, 0, 1, 1);
}

.ca-motion-page { opacity: 0; transform: translateY(12px); transition: opacity 420ms var(--ca-motion-enter), transform 420ms var(--ca-motion-enter); }
.ca-motion-page.is-entered { opacity: 1; transform: translateY(0); }
#caPage.ca-motion-page,
#caPage.ca-motion-page.is-entered { transform: none; }
.ca-motion-item { opacity: 0; transform: translateY(10px); transition: opacity 320ms var(--ca-motion-enter) var(--ca-motion-delay, 0ms), transform 320ms var(--ca-motion-enter) var(--ca-motion-delay, 0ms); }
.ca-motion-item.is-animated { opacity: 1; transform: translateY(0); }
.ca-motion-progress { transform: scaleX(0); transform-origin: left center; transition: transform 620ms var(--ca-motion-enter); will-change: transform; }
.ca-motion-progress.is-animated { transform: scaleX(1); }
.ca-motion-chart-line { transition: stroke-dashoffset 720ms var(--ca-motion-enter); }

/* Dashboard: ingresso volutamente piÃ¹ leggibile, senza introdurre movimento continuo. */
body[data-dashboard-hero] .ca-dashboard-hero.ca-motion-item { transform: translateY(16px); }
body[data-dashboard-hero] .ca-dashboard-row-main > .ca-motion-item,
body[data-dashboard-hero] .ca-dashboard-row-secondary > .ca-motion-item { transform: translateY(14px); }

body.ca-app .btn:not(:disabled),
body.ca-app button:not(:disabled),
body.ca-app [role="tab"]:not(:disabled),
body.ca-app .ca-mobile-nav-item,
body.ca-app .ca-quick-action-row { transition: transform var(--ca-motion-micro) ease-out, background-color var(--ca-motion-micro) ease-out, border-color var(--ca-motion-micro) ease-out, color var(--ca-motion-micro) ease-out, opacity var(--ca-motion-micro) ease-out; }
body.ca-app .btn:not(:disabled):active,
body.ca-app button:not(:disabled):active,
body.ca-app .ca-mobile-nav-item:active { transform: scale(.98); }
body.ca-app .btn.btn-icon:not(:disabled):active { transform: scale(.96); }

@media (hover: hover) and (pointer: fine) {
  body.ca-app .ca-budget-recurring-edit-row,
  body.ca-app .ca-settings-hub-row,
  body.ca-app .ca-quick-action-row,
  body.ca-app .ca-update-card-admin-actions .btn { transition: transform var(--ca-motion-micro) ease-out, border-color var(--ca-motion-micro) ease-out, background-color var(--ca-motion-micro) ease-out; }
  body.ca-app .ca-budget-recurring-edit-row:hover,
  body.ca-app .ca-settings-hub-row:hover,
  body.ca-app .ca-quick-action-row:hover { transform: translateY(-2px); }
}

.ca-budget-tabs { isolation: isolate; }
.ca-budget-tab { transition: transform var(--ca-motion-micro) ease-out, color var(--ca-motion-micro) ease-out, background-color var(--ca-motion-ui) var(--ca-motion-enter), box-shadow var(--ca-motion-ui) var(--ca-motion-enter); }
.ca-budget-tab:active { transform: scale(.98); }
.ca-budget-tab-panel { animation: ca-motion-tab-enter var(--ca-motion-ui) var(--ca-motion-enter) both; }

.modal.fade .modal-dialog { transform: translateY(8px) scale(.97); transition: transform var(--ca-motion-ui) var(--ca-motion-enter), opacity var(--ca-motion-ui) ease-out; }
.modal.show .modal-dialog { transform: translateY(0) scale(1); }
.modal-backdrop.fade { transition: opacity var(--ca-motion-ui) ease-out; }

body.ca-quick-open .ca-mobile-nav-fab i { display: inline-block; transform: rotate(45deg); transition: transform var(--ca-motion-ui) var(--ca-motion-enter); }
.ca-mobile-nav-fab i { transition: transform var(--ca-motion-ui) var(--ca-motion-enter); }
.ca-quick-sheet.is-open .ca-quick-action-row { animation: ca-motion-quick-action var(--ca-motion-ui) var(--ca-motion-enter) both; }
.ca-quick-sheet.is-open .ca-quick-action-row:nth-child(2) { animation-delay: 35ms; }
.ca-quick-sheet.is-open .ca-quick-action-row:nth-child(3) { animation-delay: 70ms; }

.ca-motion-celebrate { animation: ca-motion-celebrate var(--ca-motion-delight) var(--ca-motion-enter); }
.ca-motion-task-completing { animation: ca-motion-task-complete 420ms var(--ca-motion-enter) both; }
@keyframes ca-motion-tab-enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ca-motion-quick-action { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ca-motion-celebrate { 0%,100% { transform: scale(1); } 32% { transform: scale(1.025); } 58% { transform: scale(.992); } }
@keyframes ca-motion-task-complete { 0% { transform: scale(1); opacity: 1; } 42% { transform: scale(1.008); } 100% { transform: scale(1); opacity: .72; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .ca-motion-page, .ca-motion-item { opacity: 1; transform: none; }
  .ca-motion-progress { transform: scaleX(1); }
}

/* Refinement pagina Amministratore: coerenza visuale Family Home */
body.ca-admin-page .ca-page { background: #f6f8fc; }
.ca-admin-page .ca-admin-heading { position: relative; min-height: 156px; margin-bottom: 24px; padding: 28px 32px; overflow: hidden; border: 1px solid #dfe5f2; border-radius: 24px; background: radial-gradient(circle at 80% 15%,rgba(255,255,255,.9),transparent 19%),linear-gradient(112deg,#f8f9ff 0%,#f0f3ff 47%,#fff1e9 100%); box-shadow: 0 10px 32px rgba(31,42,68,.055); }
.ca-admin-page .ca-admin-heading-copy { position: relative; z-index: 2; }
.ca-admin-page .ca-admin-heading-icon { width: 54px; height: 54px; border: 1px solid rgba(79,70,255,.12); border-radius: 17px; background: rgba(255,255,255,.8); box-shadow: 0 10px 28px rgba(79,70,255,.11); font-size: 1.55rem; }
.ca-admin-eyebrow { display: block; margin-bottom: 5px; color: var(--ca-primary); font-size: var(--text-2xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.ca-admin-page .ca-admin-heading h1 { margin-bottom: 5px; color: #101828; font-size: var(--title-lg); letter-spacing: -.035em; }
.ca-admin-page .ca-admin-heading p { color: #667085; font-size: var(--text-md); }
.ca-admin-page .ca-admin-refresh { position: relative; z-index: 3; min-height: 46px; padding-inline: 20px; border: 0; border-radius: 12px; color: #fff; background: var(--ca-primary); box-shadow: 0 10px 24px rgba(47,111,237,.2); }
.ca-admin-page .ca-admin-refresh:hover { color: #fff; background: var(--bs-primary-active,#1f6fe5); transform: translateY(-1px); }
.ca-admin-hero-art { position: absolute; right: 145px; bottom: -52px; width: 210px; height: 210px; border: 1px solid rgba(79,70,255,.1); border-radius: 48% 52% 45% 55%; color: #7188f2; background: rgba(255,255,255,.34); transform: rotate(-9deg); }
.ca-admin-hero-art i { position: absolute; top: 46px; left: 68px; font-size: 4.8rem; opacity: .68; transform: rotate(9deg); }
.ca-admin-hero-art span { position: absolute; border-radius: 50%; background: currentColor; opacity: .1; }.ca-admin-hero-art span:first-child { width: 42px; height: 42px; left: -25px; top: 70px; }.ca-admin-hero-art span:nth-child(2) { width: 26px; height: 26px; right: 6px; top: 25px; }
.ca-admin-page .ca-admin-table-card,.ca-admin-page .ca-admin-future-card { border-color: #e3e8f1; border-radius: 20px; box-shadow: 0 8px 25px rgba(31,42,68,.045); }
.ca-admin-page .ca-admin-empty { padding: 30px 20px 34px; }.ca-admin-page .ca-admin-empty > span { width: 48px; height: 48px; border-radius: 15px; font-size: 1.45rem; }.ca-admin-page .ca-admin-empty h3 { margin-top: 12px; font-size: var(--text-md); }.ca-admin-page .ca-admin-empty p { font-size: var(--text-xs); }
.ca-admin-page .ca-admin-future-card { min-height: 235px; }.ca-admin-page .ca-admin-future-card .card-body { padding: 22px; }.ca-admin-page .ca-future-art { width: 135px; height: 82px; margin: 24px auto 4px; }.ca-admin-page .ca-future-art > i { font-size: 3.25rem; }
.ca-admin-page .ca-admin-table { width: 100%; min-width: 920px; table-layout: fixed; }
.ca-admin-page .ca-admin-table > thead > tr > th,
.ca-admin-page .ca-admin-table > tbody > tr > td { padding: 18px 24px !important; vertical-align: middle !important; }
.ca-admin-page .ca-admin-table > thead > tr > th { padding-top: 14px !important; padding-bottom: 14px !important; }
.ca-admin-page .ca-admin-table > thead > tr > th:nth-child(1),
.ca-admin-page .ca-admin-table > tbody > tr > td:nth-child(1) { width: 31%; }
.ca-admin-page .ca-admin-table > thead > tr > th:nth-child(2),
.ca-admin-page .ca-admin-table > tbody > tr > td:nth-child(2) { width: 17%; }
.ca-admin-page .ca-admin-table > thead > tr > th:nth-child(3),
.ca-admin-page .ca-admin-table > tbody > tr > td:nth-child(3) { width: 18%; }
.ca-admin-page .ca-admin-table > thead > tr > th:nth-child(4),
.ca-admin-page .ca-admin-table > tbody > tr > td:nth-child(4) { width: 18%; }
.ca-admin-page .ca-admin-table > thead > tr > th:nth-child(5),
.ca-admin-page .ca-admin-table > tbody > tr > td:nth-child(5) { width: 16%; }
.ca-admin-page .ca-admin-table > thead > tr > th:first-child { padding-left: 74px !important; }
.ca-admin-page .ca-admin-table .ca-admin-person { min-height: 42px; }
.ca-admin-page .ca-admin-table .ca-admin-actions { width: 100%; justify-content: flex-end; }
.ca-admin-page .ca-admin-heading,
.ca-admin-page .ca-admin-table-card,
.ca-admin-page .ca-admin-future-card { box-shadow: none !important; }
.ca-admin-page .ca-admin-heading { border-radius: 22px !important; }
.ca-admin-page .ca-admin-table-card,
.ca-admin-page .ca-admin-future-card { border-radius: 16px !important; }
.ca-admin-page .ca-status-pill.is-rejected { color: var(--bs-danger) !important; background: var(--bs-danger-light) !important; border-color: transparent !important; }
.ca-status-pill.is-pending { color: #d39d13 !important; background: #fff7d9 !important; border-color: transparent !important; }
.ca-request-logout { min-width: 72px; min-height: 50px; border-radius: 10px; color: var(--bs-danger) !important; background: var(--bs-danger-light) !important; font-weight: 600; }
.ca-request-logout:hover { color: #fff !important; background: var(--bs-danger) !important; }
.ca-admin-page .ca-admin-table-card .card-header { min-height: 76px; padding: 17px 20px; }
.ca-admin-page .ca-admin-table-card .card-title,
.ca-admin-page .ca-admin-future-card h3 { font-family: var(--family-font-heading); font-weight: 600; }
.ca-admin-request-list { display: flex; flex-direction: column; }
.ca-admin-request-item { padding: 18px 20px; border-bottom: 1px solid #edf0f5; }.ca-admin-request-item:last-child { border-bottom: 0; }
.ca-admin-request-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.ca-admin-request-meta { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-top: 17px; padding: 14px 0; border-top: 1px solid #f0f2f6; border-bottom: 1px solid #f0f2f6; }
.ca-admin-request-meta > div { display: flex; min-width: 0; flex-direction: column; gap: 4px; }.ca-admin-request-meta small { color: #98a2b3; font-size: var(--text-xs); }.ca-admin-request-meta strong,.ca-admin-request-meta span { overflow: hidden; color: #344054; font-size: var(--text-xs); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }.ca-admin-request-meta a { font-weight: 500; }
.ca-admin-request-actions { display: flex; gap: 8px; margin-top: 14px; }.ca-admin-request-actions.is-end { justify-content: flex-end; }.ca-admin-request-actions .btn { min-width: 105px; border-radius: 9px; }
.ca-admin-request-actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; line-height: 1; }
.ca-admin-request-actions .btn svg { display: block; flex: 0 0 auto; margin: 0 !important; }
.ca-active-families-card .card-body { padding-bottom: 16px !important; }
.ca-active-families-list { display: flex; flex-direction: column; margin-top: 18px; border-top: 1px solid #edf0f5; }
.ca-active-family-row { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 13px 0; border-bottom: 1px solid #edf0f5; }.ca-active-family-row:last-child { border-bottom: 0; }
.ca-active-family-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: #17a673; background: #eaf9f3; }.ca-active-family-icon svg { width: 19px; height: 19px; }
.ca-active-family-row > div { display: flex; min-width: 0; flex-direction: column; }.ca-active-family-row strong { overflow: hidden; color: #101828; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }.ca-active-family-row small { margin-top: 3px; color: #98a2b3; font-size: .7rem; }.ca-active-family-row time { color: #98a2b3; font-size: .68rem; white-space: nowrap; }.ca-active-families-empty { padding: 22px 0 6px; color: #98a2b3; font-size: .8rem; text-align: center; }
.ca-admin-page .ca-admin-heading-icon svg,
.ca-admin-page .ca-future-icon svg { width: 22px; height: 22px; stroke-width: 1.7; }
.ca-admin-page .ca-admin-refresh svg,
.ca-admin-page .ca-admin-request-actions svg,
.ca-admin-page .ca-admin-future-card footer svg { width: 16px; height: 16px; stroke-width: 1.8; }
.ca-admin-page .ca-admin-hero-art svg { position: absolute; top: 46px; left: 68px; width: 76px; height: 76px; opacity: .68; stroke-width: 1.35; transform: rotate(9deg); }
.ca-admin-page .ca-future-art > svg { position: relative; z-index: 2; width: 52px; height: 52px; stroke-width: 1.35; }
.ca-admin-page .ca-admin-empty svg { width: 24px; height: 24px; stroke-width: 1.7; }
.ca-admin-page .ca-admin-refresh { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.ca-active-families-section { margin-bottom: 24px; }
.ca-active-families-section .card-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.ca-active-families-tools { display: flex; align-items: center; gap: 12px; }
.ca-admin-search { display: flex; width: 230px; height: 40px; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid #dfe5ef; border-radius: 11px; background: #fff; }.ca-admin-search svg { width: 17px; height: 17px; color: #98a2b3; }.ca-admin-search input { width: 100%; border: 0; outline: 0; color: #344054; background: transparent; font-size: var(--text-xs); }
.ca-results-count { color: #98a2b3; font-size: .75rem; white-space: nowrap; }
.ca-families-table { margin: 0; }.ca-families-table .btn { display: inline-flex; align-items: center; gap: 6px; }.ca-families-table .btn svg { width: 15px; height: 15px; }
.ca-feedback-row-new { background: #fff9f0; box-shadow: inset 3px 0 0 #e5495f; }
.ca-feedback-row-new:hover { background: #fff4e6; }
.ca-feedback-new-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #e5495f; }
.ca-admin-page .ca-families-table { width: 100%; table-layout: fixed; }
.ca-admin-page .ca-families-table > thead > tr > th { padding: 9px 10px !important; border-bottom: 1px solid #e9edf4; color: #77819a; background: #fff; font-size: 10px; font-weight: 600; }
.ca-admin-page .ca-families-table > tbody > tr > td { height: 48px; padding: 7px 10px !important; border-bottom-color: #edf1f6; color: #344054; font-size: var(--text-sm); vertical-align: middle !important; }
.ca-admin-page .ca-families-table > thead > tr > th:nth-child(1),.ca-admin-page .ca-families-table > tbody > tr > td:nth-child(1) { width: 14%; }
.ca-admin-page .ca-families-table > thead > tr > th:nth-child(2),.ca-admin-page .ca-families-table > tbody > tr > td:nth-child(2) { width: 15%; }
.ca-admin-page .ca-families-table > thead > tr > th:nth-child(3),.ca-admin-page .ca-families-table > tbody > tr > td:nth-child(3) { width: 27%; }
.ca-admin-page .ca-families-table > thead > tr > th:nth-child(4),.ca-admin-page .ca-families-table > tbody > tr > td:nth-child(4) { width: 8%; text-align: center; }
.ca-admin-page .ca-families-table > thead > tr > th:nth-child(5),.ca-admin-page .ca-families-table > tbody > tr > td:nth-child(5) { width: 15%; }
.ca-admin-page .ca-families-table > thead > tr > th:nth-child(6),.ca-admin-page .ca-families-table > tbody > tr > td:nth-child(6) { width: 8%; }
.ca-admin-page .ca-families-table > thead > tr > th:nth-child(7),.ca-admin-page .ca-families-table > tbody > tr > td:nth-child(7) { width: 13%; text-align: right; }
.ca-admin-page .ca-families-table > tbody > tr > td:nth-child(1) strong { color: #101828; font-weight: 600; }
.ca-admin-page .ca-families-table > tbody > tr > td:nth-child(2),.ca-admin-page .ca-families-table > tbody > tr > td:nth-child(3) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-admin-page .ca-families-table > tbody > tr { transition: background-color .15s ease; }.ca-admin-page .ca-families-table > tbody > tr:hover { background: #fafcff; }
.ca-admin-page .ca-families-table > tbody > tr > td:last-child .btn { min-width: 92px; justify-content: center; }
.ca-family-detail-summary { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }.ca-family-detail-summary > div { display: flex; min-width: 0; flex-direction: column; gap: 4px; padding: 13px; border-radius: 11px; background: #f8fafc; }.ca-family-detail-summary small { color: #98a2b3; font-size: var(--text-xs); }.ca-family-detail-summary strong { overflow-wrap: anywhere; color: #344054; font-size: var(--text-xs); }
.ca-family-members { display: flex; flex-direction: column; border-top: 1px solid #edf0f5; }.ca-family-members > div { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid #edf0f5; }.ca-family-members > div > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #6d3bd1; background: #f1eafe; font-size: var(--text-xs); font-weight: 700; }.ca-family-members > div > div { display: flex; min-width: 0; flex-direction: column; }.ca-family-members small { color: #98a2b3; font-size: var(--text-xs); }.ca-family-members em { padding: 4px 8px; border-radius: 999px; color: #59657a; background: #f0f2f6; font-size: var(--text-xs); font-style: normal; }
.ca-admin-toast { position: fixed; z-index: 1100; right: 24px; bottom: 24px; display: flex; align-items: center; gap: 9px; min-height: 46px; padding: 0 16px; border: 1px solid #ccebdd; border-radius: 12px; color: #13795b; background: #effbf6; box-shadow: 0 12px 30px rgba(31,42,68,.12); opacity: 0; transform: translateY(12px); transition: opacity .2s ease,transform .2s ease; }.ca-admin-toast.is-visible { opacity: 1; transform: translateY(0); }.ca-admin-toast.is-danger { border-color: #f3c7cf; color: var(--bs-danger); background: var(--bs-danger-light); }.ca-admin-toast svg { width: 18px; height: 18px; }
.ca-family-modal .modal-dialog { max-width: 700px; }.ca-family-modal .modal-content { overflow: hidden; border: 1px solid #e3e8f1; border-radius: 16px; }.ca-family-modal .modal-header { padding: 22px 26px; }.ca-family-modal .modal-body { padding: 22px 26px; }.ca-family-modal .modal-footer { padding: 16px 26px; }.ca-family-modal .modal-title { font-family: var(--family-font-heading); font-size: var(--title-sm); font-weight: 600; }
.ca-family-hero { display: grid; grid-template-columns: 74px minmax(0,1fr) auto; align-items: center; gap: 18px; margin-bottom: 20px; }.ca-family-hero-icon { display: grid; place-items: center; width: 74px; height: 74px; border-radius: 18px; color: #7257e8; background: linear-gradient(145deg,#f1edff,#f7f5ff); }.ca-family-hero-icon svg { width: 42px; height: 42px; stroke-width: 1.5; }.ca-family-hero h3 { margin: 0 0 5px; color: #101828; font-family: var(--family-font-heading); font-size: var(--title-sm); }.ca-family-hero p { margin: 0; color: #667085; }.ca-family-status { display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 999px; font-size: var(--text-xs); font-weight: 700; }.ca-family-status i { width: 8px; height: 8px; border-radius: 50%; }.ca-family-status.is-active { color: #14835f; background: #e9f8f1; }.ca-family-status.is-active i { background: #17a673; }.ca-family-status.is-suspended { color: #b7791f; background: #fff7d9; }.ca-family-status.is-suspended i { background: #d39d13; }
.ca-family-detail-summary.is-three { grid-template-columns: repeat(3,minmax(0,1fr)); margin-bottom: 20px; }.ca-family-detail-summary.is-three > div { display: grid; grid-template-columns: 42px 1fr; grid-template-rows: auto auto; column-gap: 11px; padding: 14px; border: 1px solid #e6ebf2; background: #fff; }.ca-family-detail-summary.is-three > div > span { display: grid; grid-row: 1/3; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: #7257e8; background: #f1edff; }.ca-family-detail-summary.is-three > div > span.is-green { color: #17a673; background: #e9f8f1; }.ca-family-detail-summary.is-three svg { width: 21px; height: 21px; }
.ca-family-members-section { overflow: hidden; margin-top: 4px; border: 1px solid #e3e8f1; border-radius: 13px; }.ca-family-members-section > header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid #edf0f5; }.ca-family-members-section h3 { margin: 0; font-family: var(--family-font-heading); font-size: var(--text-sm); }.ca-family-members-section > header > span { padding: 4px 9px; border-radius: 999px; color: #59657a; background: #f0f2f6; font-size: var(--text-xs); font-weight: 600; }
.ca-family-members-section:has(.ca-row-menu[open]) { overflow: visible; }
.ca-family-modal .modal-content:has(.ca-row-menu[open]) { overflow: visible; }
.ca-family-members > div:has(.ca-row-menu[open]) { position: relative; z-index: 5; }
.ca-row-menu-note { margin: 0; padding: 9px 10px; color: #98a2b3; font-size: 11px; font-style: italic; }
.ca-family-modal .ca-family-members { padding: 0 16px; }.ca-family-modal .ca-family-members > div { grid-template-columns: 38px minmax(0,1fr) auto auto 88px 32px; min-height: 62px; }.ca-family-modal .ca-family-members > div > span { width: 38px; height: 38px; }.ca-family-modal .ca-family-members b { display: inline-flex; align-items: center; gap: 6px; color: #475467; font-size: var(--text-xs); font-weight: 500; }.ca-family-modal .ca-family-members b i { width: 7px; height: 7px; border-radius: 50%; background: #17a673; }.ca-family-modal .ca-family-members time { color: #667085; font-size: var(--text-xs); }.ca-family-modal .ca-family-members button { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid #e3e8f1; border-radius: 9px; color: #667085; background: #fff; }.ca-family-modal .ca-family-members button svg { width: 16px; height: 16px; }
.ca-danger-zone { margin-top: 20px; padding: 15px; border: 1px solid #f4cfd5; border-radius: 13px; background: #fff8f8; }.ca-danger-zone > header { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 13px; color: #c8324a; }.ca-danger-zone > header svg { width: 21px; height: 21px; }.ca-danger-zone h3 { margin: 0 0 3px; font-size: var(--text-lg); }.ca-danger-zone p { margin: 0; color: #667085; font-size: var(--text-xs); }.ca-danger-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }.ca-danger-actions article { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid #f2dfe2; border-radius: 11px; background: rgba(255,255,255,.7); }.ca-danger-actions strong { display: block; margin-bottom: 4px; color: #344054; font-size: var(--text-xs); }.ca-danger-actions .btn { flex: 0 0 auto; white-space: nowrap; }

/* Dettagli famiglia: pannello desktop ampio conforme al riferimento */
.ca-family-modal .modal-dialog { width: calc(100vw - 48px); max-width: 1320px; }
.ca-family-modal .modal-header { min-height: 96px; padding: 28px 44px; }
.ca-family-modal .modal-body { padding: 28px 44px 34px; }
.ca-family-modal .modal-footer { min-height: 92px; padding: 20px 44px; }
.ca-family-modal .modal-title { font-size: var(--title-sm); }
.ca-family-modal .modal-header .btn-icon { width: 48px; height: 48px; border-radius: 11px; }
.ca-family-modal .modal-header .btn-icon svg { width: 25px; height: 25px; }
.ca-family-modal .ca-family-hero { grid-template-columns: 108px minmax(0,1fr) auto; gap: 34px; margin-bottom: 24px; }
.ca-family-modal .ca-family-hero-icon { width: 108px; height: 108px; border-radius: 22px; }
.ca-family-modal .ca-family-hero-icon svg { width: 64px; height: 64px; }
.ca-family-modal .ca-family-hero h3 { margin-bottom: 8px; font-size: var(--title-md); }
.ca-family-modal .ca-family-hero p { font-size: var(--text-sm); }
.ca-family-modal .ca-family-status { padding: 10px 20px; font-size: var(--text-xs); }
.ca-family-modal .ca-family-detail-summary.is-three { gap: 22px; margin-bottom: 24px; }
.ca-family-modal .ca-family-detail-summary.is-three > div { min-height: 122px; grid-template-columns: 64px minmax(0,1fr); align-content: center; column-gap: 20px; padding: 22px 24px; border-radius: 15px; }
.ca-family-modal .ca-family-detail-summary.is-three > div > span { width: 64px; height: 64px; border-radius: 16px; }
.ca-family-modal .ca-family-detail-summary.is-three svg { width: 31px; height: 31px; }
.ca-family-modal .ca-family-detail-summary small { font-size: var(--text-xs); }.ca-family-modal .ca-family-detail-summary strong { font-size: var(--text-sm); }
.ca-family-modal .ca-family-members-section { border-radius: 15px; }
.ca-family-modal .ca-family-members-section > header { min-height: 72px; padding: 18px 22px; }
.ca-family-modal .ca-family-members-section h3 { font-size: var(--text-lg); }
.ca-family-members-columns { display: grid; grid-template-columns: 46px minmax(156px,1.1fr) minmax(240px,1.25fr) minmax(130px,.7fr) minmax(120px,.65fr) minmax(140px,.7fr) 42px; align-items: center; gap: 14px; padding: 14px 22px; border-bottom: 1px solid #edf0f5; color: #667085; font-size: var(--text-xs); }
.ca-family-members-columns span:first-child { grid-column: 1 / 3; }
.ca-family-status-wrap { display: flex; align-items: flex-end; flex-direction: column; gap: 10px; }
.ca-family-status-wrap > small { color: #667085; font-size: var(--text-xs); }
.ca-family-email-button { display: inline-flex; align-items: center; gap: 8px; margin-top: 2px; }
.ca-family-email-button svg { width: 16px; height: 16px; }
.ca-family-modal .ca-family-members { padding: 0 22px; }
.ca-family-modal .ca-family-members > div { grid-template-columns: 46px minmax(156px,1.1fr) minmax(240px,1.25fr) minmax(130px,.7fr) minmax(120px,.65fr) minmax(140px,.7fr) 42px; min-height: 78px; gap: 14px; }
.ca-family-modal .ca-family-members > div > span { width: 46px; height: 46px; }
.ca-family-modal .ca-family-members > div > div { display: contents; }
.ca-family-modal .ca-family-members > div > div strong { align-self: center; font-size: var(--text-sm); }
.ca-family-modal .ca-family-members > div > div small { align-self: center; color: #475467; font-size: var(--text-xs); }
.ca-family-modal .ca-family-members em { justify-self: start; padding: 5px 10px; }
.ca-family-modal .ca-family-members b,.ca-family-modal .ca-family-members time { font-size: var(--text-xs); }
.ca-family-modal .ca-family-members button { width: 42px; height: 42px; }
.ca-family-modal .ca-danger-zone { margin-top: 24px; padding: 20px; border-radius: 15px; }
.ca-family-modal .ca-danger-zone > header { margin-bottom: 18px; }
.ca-family-modal .ca-danger-zone h3 { font-size: var(--text-md); }.ca-family-modal .ca-danger-zone p { font-size: var(--text-xs); }
.ca-family-modal .ca-danger-actions { gap: 16px; }
.ca-family-modal .ca-danger-actions article { display: grid; min-height: 108px; grid-template-columns: 54px minmax(0,1fr) auto; gap: 16px; padding: 16px 18px; border-radius: 13px; }
.ca-danger-action-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; }.ca-danger-action-icon svg { width: 25px; height: 25px; }.ca-danger-action-icon.is-warning { color: #e49b17; background: #fff0d7; }.ca-danger-action-icon.is-danger { color: var(--bs-danger); background: var(--bs-danger-light); }
.ca-family-modal .ca-danger-actions strong { font-size: var(--text-sm); }.ca-family-modal .ca-danger-actions p { max-width: 360px; font-size: var(--text-xs); line-height: 1.5; }.ca-family-modal .ca-danger-actions .btn { min-height: 46px; padding-inline: 18px; }
.ca-family-modal .modal-footer .btn { min-width: 105px; min-height: 48px; }

@media (max-width: 1199.98px) {
  .ca-family-modal .modal-dialog { width: calc(100vw - 32px); }
  .ca-family-members-columns { display: none; }
  .ca-family-modal .ca-family-members > div { grid-template-columns: 46px minmax(180px,1fr) auto auto 110px 42px; }
  .ca-family-modal .ca-family-members > div > div { display: block; }
  .ca-admin-page .ca-admin-future-card { min-height: 220px; }
  .ca-admin-hero-art { right: 120px; opacity: .65; }
}
@media (max-width: 767.98px) {
  .ca-admin-page .ca-admin-heading { align-items: flex-start; min-height: 190px; padding: 22px; }
  .ca-admin-page .ca-admin-heading-copy { align-items: flex-start; }
  .ca-admin-page .ca-admin-heading-icon { width: 46px; height: 46px; }
  .ca-admin-page .ca-admin-heading h1 { font-size: 1.55rem; }
  .ca-admin-page .ca-admin-heading p { max-width: 225px; font-size: .82rem; }
  .ca-admin-eyebrow { font-size: .62rem; }
  .ca-admin-page .ca-admin-refresh { position: absolute; right: 18px; bottom: 18px; min-height: 40px; }
  .ca-admin-page .ca-admin-email-test { position: absolute; bottom: 18px; left: 18px; min-height: 40px; margin-right: 0; }
  .ca-admin-page .ca-admin-refresh span { display: inline; }
  .ca-admin-hero-art { right: -58px; bottom: -68px; opacity: .38; }
  .ca-admin-page .ca-admin-table > thead > tr > th,
  .ca-admin-page .ca-admin-table > tbody > tr > td { padding-left: 18px !important; padding-right: 18px !important; }
  .ca-admin-page .ca-admin-table > thead > tr > th:first-child { padding-left: 68px !important; }
  .ca-admin-request-meta { grid-template-columns: repeat(2,minmax(0,1fr)); }.ca-admin-request-meta .is-wide { grid-column: 1/-1; }.ca-admin-request-actions .btn { flex: 1; min-width: 0; }
  .ca-active-families-section .card-header { align-items: stretch; flex-direction: column; }.ca-active-families-tools { width: 100%; }.ca-admin-search { width: 100%; }
  .ca-families-table-wrap { overflow: visible; }.ca-families-table,.ca-families-table tbody { display: block; width: 100%; }.ca-families-table thead { display: none; }.ca-families-table tr { display: block; padding: 15px 18px; border-bottom: 1px solid #edf0f5; }.ca-admin-page .ca-families-table td { display: grid; width: 100% !important; grid-template-columns: 112px minmax(0,1fr); gap: 10px; padding: 6px 0 !important; border: 0; text-align: left !important; white-space: normal !important; }.ca-families-table td::before { content: attr(data-label); color: #98a2b3; font-size: .7rem; }.ca-families-table td .btn { width: 100%; justify-content: center; margin-top: 5px; }
  .ca-family-detail-summary { grid-template-columns: 1fr; }.ca-admin-toast { right: 16px; bottom: 88px; left: 16px; justify-content: center; }
  .ca-family-modal .modal-dialog { max-width: none; min-height: calc(100% - 16px); margin: 8px; }.ca-family-modal .modal-content { min-height: calc(100vh - 16px); }.ca-family-modal .modal-header,.ca-family-modal .modal-body,.ca-family-modal .modal-footer { padding-left: 18px; padding-right: 18px; }.ca-family-hero { grid-template-columns: 56px minmax(0,1fr); }.ca-family-hero-icon { width: 56px; height: 56px; }.ca-family-hero-icon svg { width: 31px; height: 31px; }.ca-family-status { grid-column: 1/-1; justify-self: start; }.ca-family-detail-summary.is-three { grid-template-columns: 1fr; }.ca-family-modal .ca-family-members > div { grid-template-columns: 38px minmax(0,1fr) auto; padding: 13px 0; }.ca-family-modal .ca-family-members em { grid-column: 2; justify-self: start; }.ca-family-modal .ca-family-members b,.ca-family-modal .ca-family-members time { grid-column: 2; }.ca-family-modal .ca-family-members button { grid-column: 3; grid-row: 1; }.ca-danger-actions { grid-template-columns: 1fr; }.ca-danger-actions article { align-items: stretch; flex-direction: column; }.ca-danger-actions .btn { width: 100%; }
}

/* Impostazioni Ducky. */
.ca-settings-page-body .ca-page { background: #f5f7fc; }
.ca-settings-page-body #kt_app_content_container { width: 100%; max-width: none; margin: 0; padding: 26px 28px 44px; }
.ca-settings-page { color: #17213d; font-family: var(--family-font-body); }
.ca-settings-page > .d-flex:first-child { margin-bottom: 24px !important; }
.ca-settings-page > .d-flex:first-child h1 { font-size: clamp(26px, 2.35vw, 30px); letter-spacing: -.02em; }
.ca-settings-content { display: grid; gap: 20px; }
.ca-settings-panel { display: grid; gap: 18px; }
.ca-settings-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ca-settings-section-heading h2,.ca-family-settings-heading h2 { margin: 0; color: #17213d; font-family: var(--family-font-heading); font-size: 18px; font-weight: 700; }
.ca-settings-section-heading p,.ca-family-settings-heading p { margin: 5px 0 0; color: #74809a; font-size: var(--text-xs); }
.ca-settings-page .ca-card { border: 1px solid #e3e8f2; border-radius: 16px; background: #fff; box-shadow: 0 5px 18px rgba(31,42,68,.035); }
.ca-settings-loading { display: flex; min-height: 150px; align-items: center; justify-content: center; gap: 10px; color: #74809a; font-size: 12px; }

/* Impostazioni: hub (index) + pagine di dettaglio dedicate. */
.ca-settings-hub .ca-settings-page > .d-flex:first-child,
.ca-settings-hub > .d-flex:first-child { margin-bottom: 20px !important; }
.ca-settings-hub-list { display: flex; flex-direction: column; overflow: hidden; border: 1px solid #e3e8f2; border-radius: 16px; background: #fff; box-shadow: 0 5px 18px rgba(31,42,68,.035); }
.ca-settings-hub-row {
  display: grid;
  grid-template-columns: 44px minmax(0,1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid #eef1f6;
  color: inherit;
  text-decoration: none;
  background: transparent;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  width: 100%;
  text-align: left;
}
.ca-settings-hub-list .ca-settings-hub-row:last-child { border-bottom: 0; }
.ca-settings-hub-row:hover { background: #f8f9fc; }
.ca-settings-hub-icon { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 13px; color: var(--ca-primary); background: var(--ca-primary-soft); }
.ca-settings-hub-icon svg { width: 20px; height: 20px; }
.ca-settings-hub-copy { min-width: 0; display: grid; gap: 3px; }
.ca-settings-hub-copy strong { color: #17213d; font-family: var(--family-font-heading); font-size: 15px; font-weight: 700; }
.ca-settings-hub-copy span { color: #74809a; font-size: var(--text-sm); line-height: 1.4; }
.ca-settings-hub-meta { display: flex; align-items: center; gap: 8px; color: #56617a; font-size: var(--text-sm); font-weight: 600; white-space: nowrap; }
.ca-settings-hub-text { white-space: nowrap; }
.ca-settings-hub-avatars { display: flex; align-items: center; }
.ca-settings-hub-avatars .ca-avatar { box-shadow: 0 0 0 2px #fff; margin-left: -8px; }
.ca-settings-hub-avatars .ca-avatar:first-child { margin-left: 0; }
.ca-settings-hub-avatars .ca-avatar-add { display: grid; place-items: center; border: 1.5px dashed #c7cede; border-radius: 50%; background: #f6f7fb; color: #7e879f; }
.ca-settings-hub-avatars .ca-avatar-add i { font-size: 12px; }
.ca-settings-hub-chevron { flex-shrink: 0; color: #b7bfd0; font-size: 16px; }

.ca-settings-hub-row-danger { margin-top: 20px; border: 1px solid #f6c9d0; border-radius: 16px; background: #fdf1f3; box-shadow: none; }
.ca-settings-hub-row-danger:hover { background: #fce7ea; }
.ca-settings-hub-row-danger .ca-settings-hub-icon { color: #c23a4d; background: #fbdde2; }
.ca-settings-hub-row-danger .ca-settings-hub-copy strong { color: #c23a4d; }
.ca-settings-hub-row-danger .ca-settings-hub-copy span { color: #b8788080; }
.ca-settings-hub-row-danger .ca-settings-hub-chevron { color: #d98d98; }

.ca-settings-detail-header { margin-bottom: 22px; }
.ca-settings-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; color: #56617a; font-size: var(--text-md); font-weight: 600; text-decoration: none; }
.ca-settings-back:hover { color: var(--ca-primary); }
.ca-settings-back i { font-size: 15px; }
.ca-settings-detail-header h1 { font-size: clamp(22px, 2.1vw, 26px); letter-spacing: -.02em; }
.ca-settings-detail .ca-settings-hub-list + .ca-settings-hub-list,
.ca-settings-detail .settings-card + .ca-settings-hub-list { margin-top: 20px; }

.ca-settings-action-row.is-disabled { cursor: default; }
.ca-settings-action-row.is-disabled:hover { background: transparent; }
.ca-settings-action-row.is-disabled .ca-settings-hub-icon { opacity: .65; }
.ca-settings-action-row.is-disabled .ca-settings-hub-copy strong,
.ca-settings-action-row.is-disabled .ca-settings-hub-copy span { color: #a3aabb; }
.ca-settings-soon-badge { justify-self: end; padding: 4px 10px; border-radius: 999px; background: #eef0f5; color: #7e879f; font-size: 11px; font-weight: 700; white-space: nowrap; }

.ca-settings-hub-list-danger .ca-settings-hub-icon { color: #c23a4d; background: #fbdde2; }
.ca-settings-hub-list-danger .ca-settings-action-row.is-danger { cursor: pointer; }
.ca-settings-hub-list-danger .ca-settings-action-row.is-danger:hover { background: #fff7f8; }
.ca-account-delete-open { overflow: hidden; }
.ca-account-delete-backdrop { position: fixed; z-index: 1090; inset: 0; display: none; background: rgba(15, 23, 42, .48); }
.ca-account-delete-backdrop.is-open { display: block; }
.ca-account-delete-layer { position: fixed; z-index: 1091; top: 50%; left: 50%; display: none; width: min(580px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: hidden; border: 1px solid #e0e5ef; border-radius: 20px; background: #fff; box-shadow: 0 30px 90px rgba(15, 23, 42, .24); transform: translate(-50%, -50%); }
.ca-account-delete-layer.is-open { display: flex; flex-direction: column; }
.ca-account-delete-layer > header { display: flex; align-items: flex-start; gap: 13px; padding: 22px 24px 18px; border-bottom: 1px solid #edf0f5; }
.ca-account-delete-icon { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border-radius: 13px; background: #fff0f2; color: #cf3c58; }
.ca-account-delete-icon svg { width: 21px; height: 21px; }
.ca-account-delete-layer > header > div { min-width: 0; flex: 1; }
.ca-account-delete-layer h2 { margin: 0; color: #17213d; font-family: var(--family-font-heading); font-size: 20px; font-weight: 700; }
.ca-account-delete-layer > header p { margin: 3px 0 0; color: #8b94a8; font-size: 12px; }
.ca-account-delete-close { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border: 1px solid #e1e6ee; border-radius: 10px; background: #fff; color: #66728a; }
.ca-account-delete-close:hover { background: #f7f8fb; color: #263350; }
.ca-account-delete-close svg { width: 18px; height: 18px; }
.ca-account-delete-body { overflow-y: auto; padding: 20px 24px; }
.ca-account-delete-warning { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 18px; padding: 14px; border: 1px solid #f6cbd2; border-radius: 13px; background: #fff5f6; color: #944052; }
.ca-account-delete-warning > svg { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 1px; color: #d33d59; }
.ca-account-delete-warning p { margin: 0; font-size: 12.5px; line-height: 1.55; }
.ca-account-delete-field { margin-top: 16px; }
.ca-account-delete-field label { display: block; margin-bottom: 7px; color: #33415e; font-size: 12.5px; font-weight: 600; }
.ca-account-delete-field label strong { color: #17213d; }
.ca-account-delete-successor { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border: 1px solid #e2e6fb; border-radius: 13px; background: #f6f7ff; }
.ca-account-delete-successor > span { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 10px; background: #e9e8ff; color: #5a50d6; }
.ca-account-delete-successor svg { width: 17px; height: 17px; }
.ca-account-delete-successor div { display: grid; gap: 1px; min-width: 0; }
.ca-account-delete-successor small, .ca-account-delete-successor em { color: #7d87a0; font-size: 11px; font-style: normal; }
.ca-account-delete-successor strong { color: #24304b; font-size: 13px; }
.ca-account-delete-check { display: flex; align-items: flex-start; gap: 9px; margin-top: 16px; color: #5f6b83; font-size: 12px; line-height: 1.45; }
.ca-account-delete-check input { width: 17px; height: 17px; flex: 0 0 17px; margin-top: 1px; accent-color: #d33d59; }
.ca-account-delete-error { margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: #fff1f3; color: #c23552; font-size: 12px; line-height: 1.45; }
.ca-account-delete-layer > footer { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid #edf0f5; }
@media (max-width: 575.98px) {
  .ca-account-delete-layer { width: calc(100vw - 20px); max-height: calc(100vh - 20px); border-radius: 16px; }
  .ca-account-delete-layer > header { padding: 18px 16px 15px; }
  .ca-account-delete-layer h2 { font-size: 18px; }
  .ca-account-delete-body { padding: 16px; }
  .ca-account-delete-layer > footer { padding: 14px 16px; }
  .ca-account-delete-layer > footer .btn { flex: 1 1 0; padding-right: 10px; padding-left: 10px; font-size: 12px; }
}

@media (max-width: 767.98px) {
  .ca-settings-hub-row, .ca-settings-hub-row-danger { padding: 14px 16px; gap: 10px; grid-template-columns: 36px minmax(0,1fr) auto auto; }
  .ca-settings-hub-icon { width: 36px; height: 36px; }
  .ca-settings-hub-icon svg { width: 17px; height: 17px; }
  .ca-settings-hub-copy strong { font-size: 13.5px; }
  .ca-settings-hub-copy span { font-size: 11.5px; }
  .ca-settings-hub-meta { font-size: 11px; gap: 6px; }
  .ca-settings-hub-avatars .ca-avatar { width: 22px !important; height: 22px !important; min-width: 22px !important; }
}

.ca-profile-card { display: grid; grid-template-columns: 170px minmax(0,1fr) 170px; align-items: start; gap: 26px; padding: 24px; }
.ca-profile-avatar-column { display: flex; align-items: center; flex-direction: column; gap: 10px; }
.ca-profile-avatar { display: grid; width: 72px; height: 72px; overflow: hidden; place-items: center; border: 1px solid #deddfd; border-radius: 22px; color: #665cf6; background: #f1efff; font-size: 22px; font-weight: 700; }
.ca-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ca-profile-avatar-column .btn { width: 100%; min-height: 38px; font-size: 11.5px; }
.ca-profile-avatar-column small { color: #929bb0; font-size: 10.5px; line-height: 1.4; text-align: center; }
.ca-profile-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.ca-profile-fields .is-wide { grid-column: 1 / -1; }
.ca-profile-fields label { display: block; margin-bottom: 6px; color: #44506a; font-size: 11.5px; font-weight: 600; }
.ca-profile-fields .form-control { min-height: 42px; border-color: #dfe5ef; border-radius: 10px; font-size: 12px; }
.ca-profile-fields .form-control[readonly] { color: #74809a; background: #f8f9fc; }
.ca-profile-fields small { display: block; margin-top: 6px; color: #929bb0; font-size: 10.5px; }
.ca-profile-actions { display: flex; min-height: 100%; align-items: flex-end; flex-direction: column; justify-content: space-between; gap: 18px; }
.ca-profile-actions .btn { min-height: 42px; padding-inline: 18px; }
.ca-account-status { display: inline-flex; align-items: center; gap: 7px; color: #159b63; font-size: 11px; font-weight: 600; }
.ca-account-status i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.ca-profile-error { grid-column: 1 / -1; margin: 0; }

.ca-family-settings-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.ca-family-settings-heading > div { display: flex; min-width: 0; align-items: center; gap: 13px; }
.ca-family-heading-icon { display: grid; width: 46px; height: 46px; flex: 0 0 auto; place-items: center; border-radius: 13px; color: var(--ca-primary); background: #efefff; }
.ca-family-heading-icon i { font-size: 21px; }
.ca-family-status { display: inline-flex; flex: 0 0 auto; align-items: center; margin-left: 5px; padding: 5px 9px; border-radius: 999px; font-size: var(--text-xs); font-weight: 700; }
.ca-family-status.is-active { color: #159b63; background: #e8f8f0; }
.ca-family-status.is-suspended { color: #e8505b; background: #fff0f2; }
.ca-family-settings-heading > .btn { min-height: 42px; border-radius: 10px; }
.ca-family-information { overflow: hidden; }
.ca-family-information > header,.ca-family-access-card > header,.ca-family-invites-card > header { display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 18px; border-bottom: 1px solid #e9edf4; }
.ca-family-information h3,.ca-family-access-card h3,.ca-family-invites-card h3 { margin: 0; color: #17213d; font-size: 15px; font-weight: 700; }
.ca-family-information header p,.ca-family-access-card header p,.ca-family-invites-card header p { margin: 4px 0 0; color: #929bb0; font-size: 11px; }
.ca-family-details { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1px; background: #edf0f5; }
.ca-family-details > div { display: flex; min-height: 68px; justify-content: center; flex-direction: column; padding: 14px 18px; background: #fff; }
.ca-family-details small { color: #929bb0; font-size: 11px; }
.ca-family-details strong { margin-top: 4px; color: #34405b; font-size: 13px; font-weight: var(--font-semibold); }
.ca-family-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.ca-family-summary article { display: flex; min-height: 82px; align-items: center; gap: 14px; padding: 15px 17px; border: 1px solid #e3e8f2; border-radius: 14px; background: #fff; }
.ca-family-summary article > span { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border-radius: 12px; color: var(--ca-primary); background: #efefff; }
.ca-family-summary article > span i { font-size: 19px; }
.ca-family-summary article div { display: flex; min-width: 0; flex-direction: column; }
.ca-family-summary small { color: #929bb0; font-size: 11px; }
.ca-family-summary strong { margin-top: 3px; color: #17213d; font-size: 15px; font-weight: 700; }
.ca-family-access-card,.ca-family-invites-card { overflow: visible; }
.ca-family-table-wrap { overflow-x: auto; }
.ca-family-members-table,.ca-family-invites-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.ca-family-members-table th,.ca-family-invites-table th { height: 40px; padding: 0 16px; color: #7e889f; background: #fafbfd; font-size: 11px; font-weight: var(--font-semibold); text-align: left; }
.ca-family-members-table td,.ca-family-invites-table td { min-height: 62px; padding: 12px 16px; border-top: 1px solid #edf0f5; color: #56617a; font-size: var(--text-xs); vertical-align: middle; }
.ca-family-members-table th:first-child { width: 20%; }.ca-family-members-table th:nth-child(2) { width: 25%; }.ca-family-members-table th:nth-child(3) { width: 15%; }.ca-family-members-table th:nth-child(4) { width: 10%; }.ca-family-members-table th:nth-child(5) { width: 18%; }.ca-family-members-table th:last-child { width: 130px; }
.ca-family-members-table td:first-child { display: flex; align-items: center; gap: 10px; color: #17213d; font-size: 13px; }
.ca-member-avatar { display: grid; width: 36px; height: 36px; flex: 0 0 auto; overflow: hidden; place-items: center; border-radius: 50%; color: #6d3bd1; background: #f1eafe; font-size: 10.5px; font-weight: 700; }
.ca-member-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ca-family-members-table em { display: inline-flex; padding: 4px 8px; border-radius: 999px; color: #665cf6; background: #f1efff; font-size: var(--text-xs); font-style: normal; font-weight: var(--font-semibold); }
.ca-family-members-table em.is-member { color: #667085; background: #f1f3f6; }.ca-family-members-table em.is-admin { color: #3976d6; background: #edf4ff; }
.ca-family-members-table b { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: var(--font-medium); }.ca-family-members-table b i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }.ca-family-members-table b.is-active { color: #159b63; }.ca-family-members-table b.is-suspended { color: #e8505b; }
.ca-family-members-table time,.ca-family-invites-table time { color: #74809a; font-size: 11px; }
.ca-member-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.ca-row-menu { position: relative; }
.ca-row-menu > summary { display: grid; width: 34px; height: 34px; cursor: pointer; list-style: none; place-items: center; border: 1px solid #e3e8f2; border-radius: 9px; color: #68738d; background: #fff; }
.ca-row-menu > summary::-webkit-details-marker { display: none; }.ca-row-menu > summary i { font-size: 18px; }
.ca-row-menu > div { position: absolute; z-index: 20; top: calc(100% + 6px); right: 0; width: 210px; padding: 6px; border: 1px solid #e3e8f2; border-radius: 11px; background: #fff; box-shadow: 0 12px 30px rgba(31,42,68,.13); }
.ca-row-menu button { display: flex; width: 100%; padding: 9px 10px; border: 0; border-radius: 7px; color: #44506a; background: transparent; font-size: var(--text-xs); text-align: left; }.ca-row-menu button:hover { background: #f6f8fc; }.ca-row-menu button.is-danger { color: #e8505b; }
.ca-family-invites-table th:first-child { width: 28%; }.ca-family-invites-table th:last-child { width: 70px; }
.ca-family-invites-empty { display: flex; min-height: 180px; align-items: center; justify-content: center; flex-direction: column; padding: 24px; text-align: center; }
.ca-family-invites-empty > span { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 13px; color: var(--ca-primary); background: #efefff; }
.ca-family-invites-empty h4 { margin: 10px 0 4px; color: #17213d; font-size: 13px; }.ca-family-invites-empty p { margin: 0 0 12px; color: #929bb0; font-size: var(--text-xs); }

.ca-member-modal { width: min(580px,100%); max-width: none; height: 100%; margin: 0 0 0 auto; }
.ca-member-modal .modal-content { height: 100%; border: 0; border-radius: 16px 0 0 16px; }
.ca-member-modal .modal-header,.ca-member-modal .modal-footer { position: sticky; z-index: 3; background: #fff; }.ca-member-modal .modal-header { top: 0; }.ca-member-modal .modal-footer { bottom: 0; }
.ca-member-modal .modal-body { overflow-y: auto; padding: 20px; }
.ca-member-editor-head { display: grid; grid-template-columns: 46px minmax(0,1fr) auto; align-items: center; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid #edf0f5; }
.ca-member-editor-head > span { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 50%; color: #665cf6; background: #f1efff; font-weight: 700; }.ca-member-editor-head div { display: flex; min-width: 0; flex-direction: column; }.ca-member-editor-head small { color: #929bb0; font-size: 11px; }.ca-member-editor-head em { padding: 4px 8px; border-radius: 999px; color: #665cf6; background: #f1efff; font-size: 10px; font-style: normal; }.ca-member-editor-head b { grid-column: 2; font-size: 10.5px; }
.ca-member-role-section,.ca-member-permissions-section { margin-top: 20px; }.ca-member-role-section h3,.ca-member-permissions-section h3 { margin: 0 0 10px; font-size: 14px; }
.ca-role-cards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }.ca-role-cards label { display: flex; min-height: 68px; cursor: pointer; flex-direction: column; padding: 11px; border: 1px solid #e3e8f2; border-radius: 10px; }.ca-role-cards label.active { border-color: #8b84ff; background: #f6f5ff; }.ca-role-cards label.disabled { opacity: .65; }.ca-role-cards input { position: absolute; opacity: 0; }.ca-role-cards strong { font-size: 12px; }.ca-role-cards small { margin-top: 3px; color: #929bb0; font-size: 10.5px; }
.ca-permission-accordion { display: grid; gap: 8px; }.ca-permission-accordion details { overflow: hidden; border: 1px solid #e3e8f2; border-radius: 10px; }.ca-permission-accordion summary { display: flex; min-height: 44px; cursor: pointer; align-items: center; justify-content: space-between; padding: 0 13px; color: #34405b; font-size: 12px; font-weight: 600; list-style: none; }.ca-permission-accordion summary::-webkit-details-marker { display: none; }.ca-permission-accordion details > div { display: grid; gap: 1px; border-top: 1px solid #edf0f5; background: #edf0f5; }.ca-permission-accordion label { display: flex; min-height: 50px; align-items: center; gap: 10px; padding: 9px 13px; background: #fff; }.ca-permission-accordion label > span { display: flex; flex-direction: column; }.ca-permission-accordion label strong { font-size: 11.5px; }.ca-permission-accordion label small { color: #929bb0; font-size: 10px; }

.ca-settings-panel .ca-app-update-row { margin: 0; }.ca-app-update-row .card-body { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 13px; padding: 14px 17px; }.ca-app-update-row .ca-icon-box { width: 40px; height: 40px; }.ca-app-update-row strong { display: block; font-size: 13px; }.ca-app-update-row span { display: block; margin-top: 3px; color: #929bb0; font-size: 11px; }
.ca-settings-panel #caPushSettingsCard { margin: 0 !important; }.ca-settings-panel #caPushSettingsCard .card-header { min-height: 68px; padding: 15px 18px; }.ca-settings-panel #caPushSettingsCard .card-body { padding: 0 18px 18px; }.ca-settings-panel .ca-notification-type-row { min-height: 62px; }.ca-settings-panel .ca-notification-type-row strong { font-size: var(--text-sm); }.ca-settings-panel .ca-notification-type-row span { font-size: 11px; }.ca-settings-panel .ca-notification-type-row .badge { font-size: 10px; }

@media (max-width: 991.98px) {
  .ca-profile-card { grid-template-columns: 145px minmax(0,1fr); }.ca-profile-actions { grid-column: 1 / -1; min-height: 0; align-items: center; flex-direction: row; }.ca-family-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }.ca-family-summary article:last-child { grid-column: 1 / -1; }
  .ca-family-members-table,.ca-family-invites-table { min-width: 850px; }
}
@media (max-width: 767.98px) {
  .ca-settings-page-body #kt_app_content_container { padding: 16px 16px 30px; }
  .ca-profile-card { grid-template-columns: 1fr; padding: 18px; }.ca-profile-avatar-column { padding-bottom: 16px; border-bottom: 1px solid #edf0f5; }.ca-profile-avatar-column .btn { max-width: 220px; }.ca-profile-fields { grid-template-columns: 1fr; }.ca-profile-fields .is-wide { grid-column: auto; }.ca-profile-actions { align-items: stretch; flex-direction: column; }.ca-profile-actions .btn { width: 100%; }
  .ca-family-settings-heading { align-items: stretch; flex-direction: column; }.ca-family-settings-heading > div { flex-wrap: wrap; }.ca-family-settings-heading > .btn { width: 100%; }.ca-family-status { margin-left: 59px; }
  .ca-family-information > header { align-items: flex-start; flex-direction: column; }.ca-family-information > header .btn { width: 100%; }.ca-family-details,.ca-family-summary { grid-template-columns: 1fr; }.ca-family-summary article:last-child { grid-column: auto; }
  .ca-family-table-wrap { overflow: visible; }.ca-family-members-table,.ca-family-members-table tbody,.ca-family-invites-table,.ca-family-invites-table tbody { display: block; width: 100%; min-width: 0; }.ca-family-members-table thead,.ca-family-invites-table thead { display: none; }.ca-family-members-table tr,.ca-family-invites-table tr { display: block; padding: 14px 16px; border-top: 1px solid #edf0f5; }.ca-family-members-table td,.ca-family-invites-table td { display: grid; width: 100%; min-height: 0; grid-template-columns: 100px minmax(0,1fr); align-items: center; gap: 10px; padding: 6px 0; border: 0; }.ca-family-members-table td::before,.ca-family-invites-table td::before { content: attr(data-label); color: #929bb0; font-size: 10.5px; font-weight: 500; }.ca-family-members-table td:first-child { display: grid; grid-template-columns: 100px 36px minmax(0,1fr); }.ca-family-members-table td:first-child::before { grid-column: 1; }.ca-member-actions { justify-content: flex-start; }.ca-row-menu > div { right: auto; left: 0; }
  .ca-member-modal { width: 100%; }.ca-member-modal .modal-content { border-radius: 0; }.ca-role-cards { grid-template-columns: 1fr; }
  .ca-app-update-row .card-body { grid-template-columns: 42px minmax(0,1fr); }.ca-app-update-row .btn { grid-column: 1 / -1; width: 100%; }.ca-settings-panel .ca-notification-type-row { grid-template-columns: 42px minmax(0,1fr); }.ca-settings-panel .ca-notification-channel-actions { grid-column: 1 / -1; }
}

/* Keep visual savings cards authoritative over the legacy list rules below. */
.ca-savings-goals-list.ca-savings-goals-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-height: 520px; padding: 2px 5px 2px 2px; }
.ca-savings-goal.ca-savings-goal { display: flex; min-width: 0; min-height: 278px; overflow: hidden; flex-direction: column; align-items: stretch; gap: 0; padding: 0; border: 1px solid #e6ebf2; border-radius: 15px; background: #fff; }
@media (max-width: 767.98px) {
  .ca-savings-goals-list.ca-savings-goals-list { grid-template-columns: 1fr; max-height: 560px; }
  .ca-savings-goal.ca-savings-goal { min-height: 258px; }
}

/* ============================================================
   Dashboard HERO — ambientale, a sfondo pieno (saluto + data +
   meteo reale + scena "casa" con atmosfera dinamica per condizione).
   Concept del mockup, altezza contenuta: i widget sotto restano visibili.
   ============================================================ */
body[data-dashboard-hero] .ca-dashboard-hero {
  position: relative; box-sizing: border-box; overflow: hidden; margin-bottom: 24px; padding: 22px 30px;
  border-radius: 20px; background-color: #edf4ff;
  border: 1px solid rgba(118,137,179,.12); box-shadow: 0 12px 32px rgba(42,67,120,.055); background-clip: padding-box;
}
body[data-dashboard-hero] .ca-dashboard-hero:not(.ca-dashboard-hero-match) {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 12px; min-height: 208px;
}

/* Scena di sfondo: media casa (z0) + overlay atmosferico (z1) + micro-fx (z2) */
body[data-dashboard-hero] .ca-hero-scene { position: absolute; z-index: 0; inset: 0; overflow: hidden; border-radius: inherit; }
body[data-dashboard-hero] .ca-dashboard-hero-media {
  position: absolute; z-index: 0; inset: 0; overflow: hidden; border-radius: inherit; background-color: #dfe9f5;
}
body[data-dashboard-hero] .ca-dashboard-hero-video,
body[data-dashboard-hero] .ca-dashboard-hero-media-static,
body[data-dashboard-hero] .ca-dashboard-hero-media-static img {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover;
}
/* gradiente di leggibilità sempre presente + slot per l'atmosfera meteo */
body[data-dashboard-hero] .ca-hero-scene::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(255,255,255,.9) 0%, rgba(255,255,255,.66) 30%, rgba(255,255,255,.22) 52%, rgba(255,255,255,0) 70%);
}
body[data-dashboard-hero] .ca-hero-atmos { position: absolute; inset: 0; z-index: 1; pointer-events: none; transition: background .6s ease, opacity .6s ease; }
body[data-dashboard-hero] .ca-hero-fx { position: absolute; inset: 0; z-index: 2; pointer-events: none; }

/* Testo hero */
body[data-dashboard-hero] .ca-hero-body { position: relative; z-index: 3; min-width: 0; max-width: 560px; display: flex; flex-direction: column; gap: 6px; }
body[data-dashboard-hero] .ca-hero-date {
  margin: 0; color: #6a7591; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(255,255,255,.8);
}
body[data-dashboard-hero] .ca-hero-greeting {
  margin: 0; color: #14213d !important; font-family: var(--family-font-heading, "Poppins", sans-serif);
  font-size: clamp(24px, 2.4vw, 33px); font-weight: 700; letter-spacing: -.02em; line-height: 1.12;
  text-shadow: 0 1px 2px rgba(255,255,255,.7);
}
body[data-dashboard-hero] .ca-hero-tagline {
  margin: 2px 0 0; color: #5c6680; font-size: 14px; font-weight: 400; max-width: 440px;
  text-shadow: 0 1px 2px rgba(255,255,255,.85), 0 1px 10px rgba(255,255,255,.5);
}

/* Box meteo compatto premium */
body[data-dashboard-hero] .ca-hero-weather {
  margin-top: 12px; display: inline-flex; flex-direction: column; gap: 8px; align-self: flex-start;
  padding: 12px 16px; border-radius: 16px; background: rgba(255,255,255,.74);
  border: 1px solid rgba(255,255,255,.7); box-shadow: 0 8px 22px rgba(42,67,120,.1);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
body[data-dashboard-hero] .ca-hero-weather-main { display: flex; align-items: center; gap: 12px; }
body[data-dashboard-hero] .ca-hero-weather-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: #eaf2ff; color: #356df3; }
body[data-dashboard-hero] .ca-hero-weather-icon svg { width: 19px; height: 19px; }
body[data-dashboard-hero] .ca-hero-weather-temp { color: #14213d; font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
body[data-dashboard-hero] .ca-hero-weather-meta { display: flex; flex-direction: column; gap: 2px; }
body[data-dashboard-hero] .ca-hero-weather-meta strong { color: #14213d; font-size: 13.5px; font-weight: 700; }
body[data-dashboard-hero] .ca-hero-weather-range { display: inline-flex; gap: 10px; color: #6a7591; font-size: 12px; font-weight: 600; }
body[data-dashboard-hero] .ca-hero-weather-range svg { width: 12px; height: 12px; vertical-align: -1px; }
body[data-dashboard-hero] .ca-hero-weather-chips { display: flex; flex-wrap: wrap; gap: 6px; }
body[data-dashboard-hero] .ca-hero-weather-chips span {
  display: inline-flex; align-items: baseline; gap: 5px; padding: 4px 9px; border-radius: 9px;
  background: #eef3fb; color: #2b3653; font-size: 12px; font-weight: 700;
}
body[data-dashboard-hero] .ca-hero-weather-chips small { color: #8b93a7; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
body[data-dashboard-hero] .ca-hero-weather-stale { color: #a1791f; font-size: 10.5px; font-weight: 700; }

/* Stato "località di casa non configurata": stessa scocca vetro del box meteo,
   con CTA verso Impostazioni -> Famiglia. */
body[data-dashboard-hero] a.ca-hero-weather-setup {
  flex-direction: row; align-items: center; gap: 12px; text-decoration: none;
  transition: transform .14s ease, box-shadow .14s ease;
}
body[data-dashboard-hero] a.ca-hero-weather-setup:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(42,67,120,.14); }
body[data-dashboard-hero] .ca-hero-weather-setup-copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
body[data-dashboard-hero] .ca-hero-weather-setup-copy strong { color: #14213d; font-size: 13.5px; font-weight: 700; }
body[data-dashboard-hero] .ca-hero-weather-setup-copy small { color: #6a7591; font-size: 11.5px; }
body[data-dashboard-hero] .ca-hero-weather-setup-cta { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: #eaf2ff; color: #356df3; flex: 0 0 26px; }
body[data-dashboard-hero] .ca-hero-weather-setup-cta svg { width: 14px; height: 14px; }

/* ---- Atmosfera dinamica per condizione meteo ----
   La scena base è un pomeriggio sereno: gli overlay devono davvero
   cambiare l'atmosfera, restando morbidi e premium (no colori saturi). */
body[data-dashboard-hero] .ca-hero[data-hero-weather="clear"] .ca-hero-atmos {
  background: radial-gradient(120% 90% at 80% 4%, rgba(255,210,132,.5), rgba(255,210,132,0) 55%), linear-gradient(180deg, rgba(150,196,255,.14), rgba(255,255,255,0) 42%);
}
body[data-dashboard-hero] .ca-hero[data-hero-weather="partly-cloudy"] .ca-hero-atmos {
  background: radial-gradient(120% 90% at 82% 4%, rgba(255,214,150,.28), rgba(255,214,150,0) 52%), linear-gradient(200deg, rgba(176,190,214,.42), rgba(210,220,234,.1) 55%, rgba(255,255,255,0));
}
body[data-dashboard-hero] .ca-hero[data-hero-weather="cloudy"] .ca-hero-atmos {
  background: linear-gradient(195deg, rgba(150,163,188,.72), rgba(180,190,208,.42) 55%, rgba(206,214,228,.24));
}
body[data-dashboard-hero] .ca-hero[data-hero-weather="fog"] .ca-hero-atmos {
  background: linear-gradient(180deg, rgba(236,240,246,.6) 0%, rgba(228,233,240,.82) 44%, rgba(240,243,248,.66) 100%);
}
body[data-dashboard-hero] .ca-hero[data-hero-weather="rain"] .ca-hero-atmos,
body[data-dashboard-hero] .ca-hero[data-hero-weather="sleet"] .ca-hero-atmos {
  background: linear-gradient(195deg, rgba(84,104,138,.78), rgba(70,90,124,.5) 45%, rgba(48,66,98,.62));
}
body[data-dashboard-hero] .ca-hero[data-hero-weather="snow"] .ca-hero-atmos {
  background: linear-gradient(190deg, rgba(214,228,246,.82), rgba(228,240,252,.55) 50%, rgba(240,247,255,.4));
}
body[data-dashboard-hero] .ca-hero[data-hero-weather="thunder"] .ca-hero-atmos {
  background: linear-gradient(195deg, rgba(70,74,104,.82), rgba(58,60,92,.56) 45%, rgba(42,44,72,.66));
}
/* Notte: raffredda e scurisce la scena, tiene calde solo le finestre */
body[data-dashboard-hero] .ca-hero[data-hero-night="1"] .ca-hero-atmos {
  background: radial-gradient(90% 90% at 62% 78%, rgba(255,196,120,.22), rgba(255,196,120,0) 42%), linear-gradient(195deg, rgba(20,32,72,.82), rgba(18,28,62,.68) 50%, rgba(14,22,52,.8));
}
body[data-dashboard-hero] .ca-hero[data-hero-night="1"][data-hero-weather="clear"] .ca-hero-atmos {
  background: radial-gradient(80% 80% at 60% 82%, rgba(255,201,128,.24), rgba(255,201,128,0) 40%), radial-gradient(60% 50% at 24% 6%, rgba(120,140,210,.3), rgba(120,140,210,0) 60%), linear-gradient(195deg, rgba(18,30,72,.82), rgba(16,26,60,.66) 52%, rgba(12,20,48,.8));
}
/* Su testo scuro a sinistra serve comunque fondo chiaro: la vela di
   leggibilità a sinistra resta luminosa anche di notte. */
body[data-dashboard-hero] .ca-hero[data-hero-night="1"] .ca-hero-scene::after {
  background: linear-gradient(90deg, rgba(245,248,255,.96) 0%, rgba(245,248,255,.82) 34%, rgba(245,248,255,.4) 56%, rgba(245,248,255,0) 74%);
}

/* ---- Micro-effetti atmosferici, molto discreti ---- */
body[data-dashboard-hero] .ca-hero[data-hero-weather="rain"] .ca-hero-fx,
body[data-dashboard-hero] .ca-hero[data-hero-weather="sleet"] .ca-hero-fx,
body[data-dashboard-hero] .ca-hero[data-hero-weather="thunder"] .ca-hero-fx {
  background-image: repeating-linear-gradient(101deg, rgba(255,255,255,0) 0 8px, rgba(255,255,255,.16) 8px 9px);
  background-size: 100% 220px; opacity: .5; animation: ca-hero-rain 0.9s linear infinite;
}
body[data-dashboard-hero] .ca-hero[data-hero-weather="snow"] .ca-hero-fx {
  background-image: radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,.9), rgba(255,255,255,0)),
    radial-gradient(2px 2px at 60% 70%, rgba(255,255,255,.8), rgba(255,255,255,0)),
    radial-gradient(1.6px 1.6px at 80% 20%, rgba(255,255,255,.85), rgba(255,255,255,0)),
    radial-gradient(1.6px 1.6px at 40% 85%, rgba(255,255,255,.8), rgba(255,255,255,0));
  background-size: 100% 200px; opacity: .7; animation: ca-hero-snow 7s linear infinite;
}
@keyframes ca-hero-rain { from { background-position: 0 0; } to { background-position: 0 220px; } }
@keyframes ca-hero-snow { from { background-position: 0 0; } to { background-position: 0 200px; } }
@media (prefers-reduced-motion: reduce) {
  body[data-dashboard-hero] .ca-hero-fx { display: none; }
}

/* Savings projects */
.ca-savings-goals-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-height: 520px; padding: 2px 5px 2px 2px; }
.ca-savings-goal { display: flex; min-width: 0; min-height: 278px; overflow: hidden; flex-direction: column; align-items: stretch; gap: 0; padding: 0; border: 1px solid #e6ebf2; border-radius: 15px; background: #fff; text-align: left; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.ca-savings-goal:hover { border-color: #d7deea; background: #fefeff; }
.ca-savings-goal:focus-visible { outline: 3px solid rgba(79,70,255,.25); outline-offset: 2px; }
.ca-savings-goal-cover { position: relative; display: block; height: 126px; overflow: hidden; background: linear-gradient(135deg, #dbe4ea, #aabdc5); }
.ca-savings-goal-cover img { width: 100%; height: 100%; object-fit: cover; }
.ca-savings-goal-cover-shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 28%, rgba(12,21,35,.72)); }
.ca-savings-goal-title { position: absolute; right: 14px; bottom: 12px; left: 14px; overflow: hidden; color: #fff; font-size: 17px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.ca-savings-goal-status { position: absolute; top: 10px; right: 10px; }
.ca-savings-goal-body { display: flex; flex: 1; flex-direction: column; padding: 14px; }
.ca-savings-goal-category { display: flex; align-items: center; gap: 6px; color: #707b91; font-size: 11px; font-weight: 700; }
.ca-savings-goal-amount { margin: 8px 0 10px; color: #687386; font-size: 12px; }
.ca-savings-goal-amount strong { color: #17213f; font-size: 18px; }
.ca-savings-goal-progress-copy { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: auto; margin-bottom: 9px; padding-top: 7px; color: #596579; font-size: 12px; line-height: 1.35; }
.ca-savings-goal-progress-copy b { color: #208a62; font-size: 12px; }

.ca-card-secondary-cta { display: inline-flex; min-height: 36px; align-items: center; justify-content: center; gap: 6px; padding: 7px 14px; border-radius: 999px !important; line-height: 1.1; white-space: nowrap; }
.ca-card-secondary-cta i { line-height: 1; }
.ca-goal-secondary-action { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 4px; padding: 14px; border: 1px solid #e6ebf2; border-radius: 12px; background: #f8fafc; }
.ca-goal-secondary-action > div { display: grid; gap: 3px; }
.ca-goal-secondary-action strong { color: #344054; font-size: 13px; }
.ca-goal-secondary-action span { color: #667085; font-size: 11px; line-height: 1.4; }
.ca-goal-form-footer { display: flex; justify-content: space-between; gap: 12px; padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); }

/* Shared mobile navigation */
.ca-mobile-bottom-nav, .ca-more-overlay, .ca-more-sheet, .ca-quick-overlay, .ca-quick-sheet { display: none; }
@media (max-width: 991.98px) {
  #kt_app_sidebar_mobile_toggle, #kt_app_sidebar.ca-sidebar { display: none !important; }
  [data-kt-app-sidebar-fixed=true] .app-wrapper { margin-left: 0 !important; }
  body.ca-app:not(.ca-login-page) { padding-bottom: 0; }
  .ca-mobile-bottom-nav { position: fixed; z-index: var(--ca-z-mobile-nav); right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--family-mobile-bottom-nav-height) + env(safe-area-inset-bottom)); padding: 5px 6px env(safe-area-inset-bottom); border-top: 1px solid #e9edf3; background: rgba(255,255,255,.97); box-shadow: 0 -5px 18px rgba(31,45,73,.055); backdrop-filter: blur(12px); }
  .ca-mobile-nav-item { display: flex; min-width: 0; min-height: 44px; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 2px; border: 0; background: transparent; color: #8490a5; font: inherit; text-decoration: none; }
  .ca-mobile-nav-item i { display: inline-flex; width: 36px; height: 30px; align-items: center; justify-content: center; border-radius: 13px; background: transparent; font-size: 21px; }
  .ca-mobile-nav-item span { overflow: hidden; max-width: 100%; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
  .ca-mobile-nav-item.active { color: var(--ca-primary); }
  .ca-mobile-nav-item.active i { background: var(--ca-primary-soft); color: var(--ca-primary); }
  .ca-mobile-nav-item.active span { color: var(--ca-primary); font-weight: 800; }
  .ca-mobile-nav-item:not(.active):hover { border-radius: 14px; background: #f3f5f9; color: #66738a; }
  .ca-mobile-nav-item.active:hover { background: transparent; color: var(--ca-primary); }
  .ca-mobile-nav-item:focus-visible { outline: 2px solid var(--ca-primary); outline-offset: -2px; border-radius: 9px; }
  .ca-mobile-nav-item.active:focus-visible { outline-color: var(--ca-primary); outline-offset: -2px; border-radius: 9px; }
  .ca-mobile-relocated-empty { display: none; }
  .ca-more-overlay { position: fixed; z-index: var(--ca-z-more-overlay); inset: 0; background: rgba(16,23,47,.44); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  .ca-more-overlay.is-open { display: block; opacity: 1; pointer-events: auto; }
  .ca-more-sheet { position: fixed; z-index: var(--ca-z-more-sheet); right: 0; bottom: 0; left: 0; display: block; padding: 8px 18px calc(18px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; background: #fff; box-shadow: 0 -18px 45px rgba(16,23,47,.18); transform: translateY(105%); visibility: hidden; transition: transform .22s ease, visibility .22s; }
  .ca-more-sheet.is-open { transform: translateY(0); visibility: visible; }
  .ca-more-sheet-handle { width: 38px; height: 4px; margin: 0 auto 8px; border-radius: 4px; background: #d8dee8; }
  .ca-more-sheet-header { display: flex; align-items: center; justify-content: space-between; padding: 6px 2px 12px; }
  .ca-more-sheet-header h2 { margin: 0; color: #17213f; font-size: 20px; }
  .ca-more-sheet-menu { display: grid; }
  .ca-more-sheet-menu a, .ca-more-sheet-menu > button { display: grid; min-height: 54px; grid-template-columns: 30px 1fr auto auto; align-items: center; padding: 0 10px; border: 0; border-radius: 11px; background: transparent; color: #26324a; text-align: left; text-decoration: none; }
  .ca-more-sheet-menu a:hover, .ca-more-sheet-menu > button:hover { background: #f5f7fb; }
  .ca-more-sheet-menu i { font-size: 20px; }
  .ca-more-sheet-menu span { font-weight: 600; }
  .ca-more-sheet-separator { height: 1px; margin: 6px 10px; background: #e9edf3; }
  body.ca-more-open { overflow: hidden; }
  body.ca-more-open .ca-budget-mobile-cta { visibility: hidden; }
  .ca-budget-mobile-cta { bottom: calc(var(--family-mobile-bottom-nav-height) + 14px + env(safe-area-inset-bottom)) !important; z-index: var(--ca-z-mobile-cta) !important; }

  .ca-mobile-nav-fab { position: relative; display: flex; box-sizing: border-box; align-items: center; justify-content: center; align-self: start; width: 56px; height: 56px; margin: -24px auto 0; border: 3px solid rgba(255,255,255,.98); border-radius: 50%; background: var(--ca-primary); color: #fff; box-shadow: 0 10px 22px rgba(79,70,255,.32), 0 0 0 1px rgba(31,45,73,.10), 0 2px 8px rgba(16,23,47,.14); }
  .ca-mobile-nav-fab i, .ca-mobile-nav-fab i::before { color: #fff; font-size: 26px; }
  .ca-mobile-nav-fab:active { transform: scale(0.96); }
  .ca-mobile-nav-fab:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }

  .ca-quick-overlay { position: fixed; z-index: var(--ca-z-quick-overlay); inset: 0; background: rgba(16,23,47,.32); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  .ca-quick-overlay.is-open { display: block; opacity: 1; pointer-events: auto; }
  .ca-quick-sheet { position: fixed; z-index: var(--ca-z-quick-sheet); right: 0; bottom: 0; left: 0; display: block; width: 100%; padding: 10px 16px calc(20px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; background: #fff; box-shadow: 0 -18px 45px rgba(16,23,47,.18); transform: translateY(105%); visibility: hidden; transition: transform .28s cubic-bezier(.32,.72,0,1), visibility .28s; }
  .ca-quick-sheet.is-open { transform: translateY(0); visibility: visible; }
  .ca-quick-sheet-handle { width: 38px; height: 4px; margin: 0 auto 14px; border-radius: 4px; background: #d8dee8; }
  .ca-quick-sheet-title { margin: 0 0 16px; color: #17213f; font-size: 17px; font-weight: 700; text-align: center; }
  .ca-quick-sheet-menu { display: grid; gap: 9px; }
  .ca-quick-action-row { display: grid; min-height: 68px; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; padding: 0 14px; border: 1px solid #e8edf5; border-radius: 15px; background: #fff; text-align: left; }
  .ca-quick-action-row:active { background: #f7f9fc; }
  .ca-quick-action-icon { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 12px; font-size: 19px; }
  .ca-quick-action-icon-expense { background: #e4f8ea; color: #1f9d55; }
  .ca-quick-action-icon-event { background: #e6f0ff; color: #2f6fed; }
  .ca-quick-action-icon-task { background: #fff1de; color: #d9821b; }
  .ca-quick-action-copy { display: grid; min-width: 0; gap: 1px; }
  .ca-quick-action-copy strong { color: #17213f; font-size: 14.5px; font-weight: 700; }
  .ca-quick-action-copy span { overflow: hidden; color: #7e879f; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
  .ca-quick-action-chevron { color: #b7bfd0; font-size: 16px; }
  body.ca-quick-open { overflow: hidden; }
  body.ca-quick-open .ca-budget-mobile-cta { visibility: hidden; }
}
@media (min-width: 768px) and (max-width: 1199.98px) {
  body[data-dashboard-hero] .ca-dashboard-hero.ca-hero { padding: 20px 24px; min-height: 196px; }
}
@media (max-width: 767.98px) {
  body[data-dashboard-hero] .ca-dashboard-hero.ca-hero { min-height: 150px; padding: 16px 16px 18px; border-radius: 18px; gap: 6px; }
  body[data-dashboard-hero] .ca-hero-body { max-width: none; gap: 4px; }
  body[data-dashboard-hero] .ca-hero-date { font-size: 11px; }
  body[data-dashboard-hero] .ca-hero-greeting { font-size: clamp(20px, 5.6vw, 24px); }
  body[data-dashboard-hero] .ca-hero-tagline {
    font-size: 12.5px; max-width: none;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  body[data-dashboard-hero] .ca-hero-scene::after { background: linear-gradient(180deg, rgba(255,255,255,.86) 0%, rgba(255,255,255,.5) 34%, rgba(255,255,255,.08) 62%, rgba(255,255,255,0) 82%); }
  body[data-dashboard-hero] .ca-hero[data-hero-night="1"] .ca-hero-scene::after { background: linear-gradient(180deg, rgba(240,244,255,.9) 0%, rgba(240,244,255,.52) 36%, rgba(240,244,255,0) 74%); }
  body[data-dashboard-hero] .ca-hero-weather { margin-top: 8px; flex-direction: row; align-items: center; gap: 10px; padding: 8px 12px; }
  body[data-dashboard-hero] .ca-hero-weather-main { gap: 9px; }
  body[data-dashboard-hero] .ca-hero-weather-temp { font-size: 22px; }
  body[data-dashboard-hero] .ca-hero-weather-icon { width: 28px; height: 28px; }
  body[data-dashboard-hero] .ca-hero-weather-meta strong { font-size: 12.5px; }
  body[data-dashboard-hero] .ca-hero-weather-range { font-size: 11px; gap: 8px; }
  /* Su mobile la priorità è saluto + temperatura + condizione: i chip
     secondari (umidità/vento/UV) non entrano nella hero compatta. */
  body[data-dashboard-hero] .ca-hero-weather-chips,
  body[data-dashboard-hero] .ca-hero-weather-stale { display: none; }
  .ca-savings-goals-list { grid-template-columns: 1fr; max-height: 560px; }
  .ca-savings-goal { min-height: 258px; }
  .ca-savings-goal-cover { height: 116px; }
}

body.ca-app {
  background: #f7f9fc;
  color: var(--ca-text);
  font-family: var(--family-font-body);
  overflow-x: clip;
  --bs-app-header-height: 0px;
  --bs-app-header-height-actual: 0px;
}

body.ca-login-page { font-family: var(--family-font-body); }

/* Peso di default per heading e titoli "generici": Poppins semibold.
   Un componente che dichiara intenzionalmente 700/800 su uno di questi
   selettori vince ora normalmente per specificità — nessun !important:
   è la gerarchia del componente a decidere il peso, non un override
   globale indiscriminato (vedi Typography System in cima al file). */
body h1,
body h2,
body h3,
body .ca-sidebar-brand,
body .modal-title,
body .ca-drawer-header h2,
body .ca-drawer-header h3,
body .ca-budget-drawer-header h2,
body .ca-budget-drawer-header h3,
body .ca-dashboard-section-title,
body .ca-empty-state .fw-bold,
body .ca-calendar-empty > .fw-bold,
body .ca-search-section-title,
body .ca-savings-goal-title,
body .ca-toast-title,
body .ca-ai-chat-welcome h2,
body .ca-notification-preview .fw-bold {
  font-family: var(--family-font-heading);
  font-weight: var(--font-semibold);
}

/* Card title — Step 3: la classe .card-title generica di Bootstrap NON
   deve trasformare automaticamente ogni titolo card in Poppins. Il livello
   "standard" resta Inter semibold; solo i componenti card semanticamente
   superiori (finanziari, feature) dichiarano Poppins in modo esplicito e
   locale, con priorità sulla regola qui sotto. */
body .card-title {
  font-family: var(--family-font-body);
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
}

/* Queste 3 card esistevano già prima dello Step 3 e non dichiaravano un
   proprio font-family: ereditavano Poppins dal vecchio default generico.
   Per non alterarne l'aspetto attuale (fuori scope in questo step: Bilancio
   e Impostazioni), preserviamo qui esplicitamente lo stesso family/weight
   che avevano prima del cambio di default appena sopra. */
.ca-settings-page #caPushSettingsCard .card-title,
.ca-budget-movements-header .card-title,
.ca-budget-page .ca-budget-monthly-card-dark .card-title {
  font-family: var(--family-font-heading);
  font-weight: var(--font-semibold);
}

/* .fw-bold applicata direttamente su un h1/h2/h3 (markup Bootstrap
   legacy, es. modali di benvenuto/registrazione) ha più specificità della
   regola generica sopra e, senza !important, vincerebbe portando quei
   titoli a 700. Questa regola mantiene il peso di default invariato solo
   per quel caso, senza reintrodurre un override globale. */
h1.fw-bold, h2.fw-bold, h3.fw-bold {
  font-weight: var(--font-semibold);
}

body button,
body input,
body textarea,
body select,
body option,
body .btn,
body .badge,
body .form-label,
body .form-control,
body .form-select,
body .input-group-text,
body .menu-link,
body .ca-mobile-bottom-nav,
body .ca-more-sheet,
body table,
body th,
body td,
body .ca-ai-message,
body .ca-toast-message {
  font-family: var(--family-font-body);
}

/* Step 3 — componenti condivisi: Button base, Input/Select/Search/Textarea,
   Modal. Famiglia già garantita dal blocco qui sopra; qui fissiamo size,
   weight e line-height sui token, al posto dei valori del tema Metronic
   (1.1rem/500 su .btn/.form-control, nessun size su modal-title/body). */
body .btn {
  font-size: var(--text-md);
  font-weight: var(--font-semibold);
  line-height: var(--leading-snug);
}
body .btn-sm { font-size: var(--text-sm); }
body .btn-lg { font-size: var(--text-lg); }

body .form-control,
body .form-select {
  font-size: var(--text-md);
  font-weight: var(--font-regular);
  line-height: var(--leading-normal);
}
body .form-label {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
}
body .form-text {
  font-size: var(--text-sm);
  font-weight: var(--font-regular);
}
body .invalid-feedback,
body .valid-feedback {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
}

/* Modal generico (Bootstrap .modal-title/.modal-body senza un componente
   dedicato): family/weight del titolo arrivano già dal blocco heading più
   sopra, qui aggiungiamo solo la dimensione mancante. Le modali con un
   proprio componente (.ca-family-modal, .ca-member-modal, ecc.) restano
   fuori scope: hanno già una gerarchia intenzionale e non vengono toccate. */
body .modal-title {
  font-size: var(--title-sm);
  line-height: var(--leading-snug);
}
body .modal-body {
  font-family: var(--family-font-body);
  font-size: var(--text-md);
  font-weight: var(--font-regular);
  line-height: var(--leading-normal);
}

/* Badge/pill generico — il tema Metronic era già vicinissimo allo standard
   richiesto (.85rem/600 ≈ 11px/600): qui lo esprimiamo con i token invece
   che con un rem implicito, senza cambio visivo percepibile. */
body .badge {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
}

/* Section title — Step 4: pattern condiviso per titoli di sezione dentro
   una card (es. "Prossimi eventi", "Oggi", "Questa settimana"), distinto
   dal card-title standard (Inter 14/600) perché organizza un blocco
   primario di contenuto, non etichetta una card qualunque. Applicata via
   markup solo dove il ruolo è realmente questo, non su ogni card-title. */
.ca-section-title {
  font-family: var(--family-font-heading);
  font-size: var(--title-sm);
  font-weight: var(--font-semibold);
  line-height: var(--leading-snug);
}

body.ca-app .app-wrapper { margin-top: 0 !important; }

.ca-sidebar-mobile-toggle {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 1045;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  box-shadow: 0 10px 28px rgba(79,70,255,.24);
}

.ca-login-page {
  min-height: 100vh;
  background: #fbfcff;
}

.ca-login-left {
  background:
    radial-gradient(600px 360px at 20% 20%, rgba(79,70,255,.13), transparent 60%),
    linear-gradient(180deg, #f6f7ff 0%, #eef2ff 100%);
}

.ca-login-visual {
  min-height: 360px;
  position: relative;
  border-radius: 24px;
  background:
    radial-gradient(circle at 70% 25%, rgba(255,255,255,.9), transparent 18%),
    linear-gradient(145deg, rgba(79,70,255,.14), rgba(255,255,255,.75));
  overflow: hidden;
}

.ca-house {
  width: 260px;
  height: 190px;
  border-radius: 26px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(79,70,255,.16);
  box-shadow: 0 24px 60px rgba(79,70,255,.18);
  position: absolute;
  left: 50%;
  bottom: 48px;
  transform: translateX(-50%);
}

.ca-house:before {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  left: 35px;
  top: -78px;
  background: rgba(255,255,255,.74);
  border: 1px solid rgba(79,70,255,.14);
  transform: rotate(45deg);
  border-radius: 22px;
}

.ca-family-dot {
  position: absolute;
  bottom: 36px;
  width: 42px;
  height: 88px;
  border-radius: 999px 999px 16px 16px;
  background: linear-gradient(180deg, #6d8cff, #4966bd);
  z-index: 2;
}

.ca-family-dot:nth-child(2) { left: 88px; height: 118px; }
.ca-family-dot:nth-child(3) { left: 138px; height: 130px; background: linear-gradient(180deg, #f8d3bf, #a86f50); }
.ca-family-dot:nth-child(4) { left: 188px; height: 82px; background: linear-gradient(180deg, #f4b5df, #9c5cbe); }

.ca-login-card {
  width: min(500px, 100%);
  border: 1px solid var(--ca-border);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(15,23,42,.08);
}
.ca-register-card { width: min(720px, 100%); }

.ca-google-register-banner { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; padding: 14px 18px; border: 1px solid #dbe4ff; border-radius: 14px; background: #f2f5ff; text-align: left; }
.ca-google-register-avatar { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px #fff; }
.ca-google-register-banner strong { display: block; color: #1f2430; font-size: var(--text-md); font-weight: 700; }
.ca-google-register-banner span { display: block; margin-top: 2px; color: #56617a; font-size: var(--text-sm); line-height: 1.4; }
.ca-input-readonly { color: #7e879f; background-color: #f5f6f9 !important; cursor: not-allowed; }
.ca-auth-submit,
.ca-auth-submit.btn-primary,
.ca-auth-submit.btn-primary:hover,
.ca-auth-submit.btn-primary:focus,
.ca-auth-submit.btn-primary:active,
.ca-auth-submit.btn-primary:disabled {
  min-height: 50px;
  border-radius: 10px;
  color: #fff !important;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(79,70,255,.18);
  transition: transform .18s ease, box-shadow .18s ease;
}
.ca-auth-submit.btn-primary:hover:not(:disabled),
.ca-auth-submit.btn-primary:focus-visible:not(:disabled) {
  color: #fff !important;
  background-color: var(--bs-primary-active, #1f6fe5) !important;
  border-color: var(--bs-primary-active, #1f6fe5) !important;
  transform: translateY(-1px);
  box-shadow: 0 11px 25px rgba(79,70,255,.24) !important;
}
.ca-auth-submit.btn-primary:active:not(:disabled) {
  color: #fff !important;
  background-color: var(--bs-primary-active, #1f6fe5) !important;
  border-color: var(--bs-primary-active, #1f6fe5) !important;
  transform: translateY(0);
}
.ca-auth-submit .spinner-border { color: #fff !important; }
.ca-auth-submit:focus-visible { outline: 3px solid rgba(79,70,255,.25); outline-offset: 3px; }
.ca-auth-benefits { max-width: 440px; display: grid; gap: 14px; }
.ca-auth-benefits > div { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid rgba(79,70,255,.12); border-radius: 16px; background: rgba(255,255,255,.66); box-shadow: 0 12px 30px rgba(79,70,255,.07); font-weight: 600; color: #3f4758; }
.ca-auth-benefits i { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--ca-primary-soft); color: var(--ca-primary); font-size: 1.35rem; }
.ca-password-meter { display: grid; grid-template-columns: repeat(3,1fr); gap: 5px; }
.ca-password-meter span { height: 4px; border-radius: 99px; background: #e6e9f0; }
.ca-password-meter span.active { background: var(--ca-primary); }
.ca-password-meter small { grid-column: 1/-1; color: #78829d; }
.ca-legal-error { min-height: 24px; padding-top: 4px; color: #dc3545 !important; font-size: var(--text-sm); line-height: 1.35; }
.ca-legal-check { display: flex; align-items: center !important; gap: 10px; min-height: 28px; }
.ca-legal-check .form-check-input { flex: 0 0 auto; margin: 0 !important; }
.ca-legal-check .form-check-label { display: inline-flex; align-items: center; flex-wrap: wrap; column-gap: 4px; line-height: 1.45; }
.ca-auth-submit-wrap { display: block !important; width: 100%; margin-top: 24px; visibility: visible !important; opacity: 1 !important; }
.ca-auth-submit-wrap .ca-auth-submit { display: flex !important; align-items: center; justify-content: center; visibility: visible !important; opacity: 1 !important; }
.ca-legal-page { min-height: 100vh; background: linear-gradient(145deg,#f6f7ff,#fbfcff); font-family: var(--family-font-body); }
.ca-legal-card { max-width: 850px; margin: 0 auto; border: 1px solid var(--ca-border); border-radius: 22px; box-shadow: 0 24px 70px rgba(15,23,42,.07); }
.ca-legal-card h1 { color: #17213d; font-family: var(--family-font-heading); font-size: var(--title-lg); font-weight: 700; }
.ca-legal-card h2 { color: #17213d; font-family: var(--family-font-heading); font-size: var(--title-sm); font-weight: 700; }
.ca-legal-card h3 { color: #2a3651; font-family: var(--family-font-heading); font-size: var(--text-xl); font-weight: var(--font-semibold); }
.ca-legal-card p.text-gray-700 { line-height: 1.65; }
.ca-legal-list { display: grid; gap: 8px; margin: 10px 0 18px; padding-left: 22px; color: #56617a; }
.ca-legal-list li { line-height: 1.6; }
.ca-request-details { display: grid; gap: 0; margin: 0; border: 1px solid var(--ca-border); border-radius: 16px; overflow: hidden; }
.ca-request-details > div { display: grid; grid-template-columns: 145px 1fr; gap: 15px; padding: 14px 18px; border-bottom: 1px solid var(--ca-border); }
.ca-request-details > div:last-child { border-bottom: 0; }.ca-request-details dt { color: #78829d; }.ca-request-details dd { margin: 0; font-weight: 600; }
.ca-status-pill { display: inline-flex; align-items: center; justify-content: center; min-height: 26px; padding: 4px 11px; border: 1px solid transparent; border-radius: 999px; font-size: var(--text-xs); font-weight: 600; line-height: 1; white-space: nowrap; }
.ca-status-pill.is-pending { color: #b45309; background: #fff7e6; border-color: #f8d69b; }
.ca-status-pill.is-rejected { color: #b42318; background: #fff0f0; border-color: #f3b6b6; }
.ca-status-pill.is-secondary { color: #56617a; background: #f0f2f6; border-color: #dfe3ec; }
.ca-status-pill.is-primary { color: #2f5fd6; background: #eaf1ff; border-color: #cddcfb; }
.ca-status-pill.is-warning { color: #b45309; background: #fff3d9; border-color: #f6d999; }
.ca-status-pill.is-info { color: #0f7ea8; background: #e4f6fc; border-color: #b9e6f4; }
.ca-status-pill.is-success { color: #16794f; background: #e5f8ee; border-color: #b7ecd1; }
.ca-status-pill.is-danger { color: #b42318; background: #fff0f0; border-color: #f3b6b6; }

/* Pagina Aggiornamenti */
.ca-updates-container { max-width: 980px; margin: 0 auto; }
.ca-updates-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.ca-updates-heading-copy { display: flex; align-items: center; gap: 16px; }
.ca-updates-heading-icon { display: grid; width: 58px; height: 58px; flex: 0 0 58px; place-items: center; border-radius: 16px; color: #6558c8; background: linear-gradient(145deg, #f0efff, #e5e4ff); }
.ca-updates-heading-icon svg { width: 28px; height: 28px; }
.ca-updates-heading-copy h1 { margin: 0 0 4px; font-family: var(--family-font-heading); font-size: var(--title-lg); font-weight: 700; color: #14213d; }
.ca-updates-heading-copy p { margin: 0; color: #667085; }
.ca-updates-heading-actions .btn,
.ca-updates-feedback-cta { display: inline-flex; align-items: center; gap: 9px; }
.ca-updates-feedback-cta svg { flex: 0 0 auto; }

.ca-update-section { margin-bottom: 30px; }
.ca-update-section > header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.ca-update-section-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; color: #4f46ff; background: #eeecff; }
.ca-update-section-icon svg { width: 17px; height: 17px; }
.ca-update-section > header h2 { margin: 0; font-family: var(--family-font-heading); font-size: var(--title-sm); font-weight: 700; color: #14213d; }
.ca-update-section-count { display: inline-flex; min-width: 22px; height: 22px; align-items: center; justify-content: center; padding: 0 7px; border-radius: 999px; color: #667085; background: #f0f2f6; font-size: var(--text-xs); font-weight: 700; }
.ca-update-list { display: flex; flex-direction: column; gap: 14px; }

.ca-update-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 20px 22px; border: 1px solid #e6ebf2; border-radius: 16px; background: #fff; box-shadow: 0 6px 18px rgba(31, 42, 68, .035); }
.ca-update-card.has-image { grid-template-columns: minmax(0, 1fr) 176px; align-items: stretch; }
.ca-update-card.is-draft { border-style: dashed; background: #fbfbfe; }
.ca-update-card-main { min-width: 0; }
.ca-update-card-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.ca-update-version { padding: 3px 9px; border-radius: 999px; color: #56617a; background: #f0f2f6; font-size: var(--text-xs); font-weight: 700; font-variant-numeric: tabular-nums; }
.ca-update-draft-badge { padding: 3px 9px; border-radius: 999px; color: #8a5a00; background: #fff3d9; font-size: var(--text-xs); font-weight: 700; }
.ca-update-card h3 { margin: 0 0 4px; font-family: var(--family-font-heading); font-size: var(--text-xl); font-weight: var(--font-semibold); color: #14213d; }
.ca-update-card time { display: block; color: #98a2b3; font-size: var(--text-xs); }
.ca-update-description { margin: 12px 0 0; color: #475467; font-size: var(--text-md); line-height: 1.58; }
.ca-update-description p { margin: 0 0 10px; }
.ca-update-description p:last-child { margin-bottom: 0; }
.ca-update-description ul { margin: 0 0 10px; padding-left: 20px; }
.ca-update-description ul:last-child { margin-bottom: 0; }
.ca-update-description li { margin-bottom: 3px; }
.ca-update-card-image { min-height: 142px; overflow: hidden; border: 1px solid #e7e6fb; border-radius: 13px; background: #f2f1ff; }
.ca-update-card-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ca-update-sublist { margin-top: 14px; }
.ca-update-sublist h4 { display: flex; align-items: center; gap: 7px; margin: 0 0 6px; color: #344054; font-size: var(--text-xs); font-weight: var(--font-semibold); }
.ca-update-sublist h4 svg { width: 15px; height: 15px; }
.ca-update-sublist.is-evolutions h4 { color: #6558c8; }
.ca-update-sublist.is-fixes h4 { color: #2f6fed; }
.ca-update-sublist ul { margin: 0; padding-left: 20px; color: #475467; font-size: var(--text-sm); line-height: 1.6; }
.ca-update-sublist li { margin-bottom: 2px; }
.ca-update-card-admin-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #eef0f5; }
.ca-update-card.has-image .ca-update-card-admin-actions { grid-column: 1 / -1; margin-top: -2px; }
.ca-update-card-admin-actions .btn { display: inline-flex; align-items: center; gap: 6px; }
.ca-update-card-admin-actions .btn svg { width: 14px; height: 14px; }
.ca-update-editor-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding: 8px; border: 1px solid #e3e7ef; border-bottom: 0; border-radius: 9px 9px 0 0; background: #f8f9fc; }
.ca-update-editor-toolbar .btn { min-width: 34px; padding: 5px 8px; }
.ca-update-editor-toolbar .btn svg { width: 16px; height: 16px; }
.ca-update-editor-toolbar .form-select { width: 94px; min-height: 30px; padding-top: 4px; padding-bottom: 4px; }
.ca-update-description-input { border-top-left-radius: 0; border-top-right-radius: 0; }
.ca-update-image-current { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 9px; border: 1px solid #eceef4; border-radius: 10px; background: #fafbfe; }
.ca-update-image-current img { width: 74px; height: 54px; border-radius: 7px; object-fit: cover; }
.ca-update-email-select-all { margin-bottom: 10px; padding: 11px 13px; border: 1px solid #e5e9f2; border-radius: 10px; background: #f8f9fd; }
.ca-update-email-recipient-list { display: grid; max-height: 320px; overflow: auto; border: 1px solid #e5e9f2; border-radius: 10px; }
.ca-update-email-recipient { padding: 11px 13px; border-bottom: 1px solid #edf0f5; }
.ca-update-email-recipient:last-child { border-bottom: 0; }

.ca-updates-empty { padding: 24px; border: 1px dashed #e0e4ec; border-radius: 14px; color: #98a2b3; font-size: var(--text-sm); text-align: center; }
.ca-updates-empty-page { padding: 60px 24px; }
.ca-updates-empty-page svg { width: 40px; height: 40px; margin-bottom: 12px; color: #c7cede; }
.ca-updates-empty-page h3 { margin: 0 0 6px; color: #344054; font-size: var(--text-lg); }
.ca-updates-empty-page p { margin: 0; color: #98a2b3; }

@media (max-width: 575.98px) {
  .ca-updates-heading { flex-direction: column; align-items: flex-start; }
  .ca-updates-heading .btn { width: 100%; justify-content: center; }
  .ca-update-card { padding: 16px; }
  .ca-update-card.has-image { grid-template-columns: minmax(0, 1fr); }
  .ca-update-card.has-image .ca-update-card-image { grid-row: 1; min-height: 154px; }
  .ca-update-card.has-image .ca-update-card-main { grid-row: 2; }
  .ca-update-card.has-image .ca-update-card-admin-actions { grid-row: 3; }
  .ca-update-image-current { align-items: flex-start; }
}

/* Amministrazione */
.ca-admin-page .ca-page { background: radial-gradient(700px 380px at 100% 0, rgba(79,70,255,.055), transparent 65%); }
.ca-admin-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.ca-admin-heading-copy { display: flex; align-items: center; gap: 14px; }
.ca-admin-heading-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; color: var(--ca-primary); background: linear-gradient(145deg,#f1efff,#f7f8ff); box-shadow: 0 8px 24px rgba(79,70,255,.1); font-size: 1.45rem; }
.ca-admin-heading h1 { margin: 0 0 4px; font-size: var(--title-lg); letter-spacing: -.025em; }.ca-admin-heading p { margin: 0; color: #78829d; }
.ca-admin-refresh { border: 1px solid var(--ca-border); background: #fff; }.ca-admin-refresh.is-loading i { animation: ca-spin .8s linear infinite; }
@keyframes ca-spin { to { transform: rotate(360deg); } }
.ca-service-dot { position: absolute; top: 17px; right: 17px; width: 9px; height: 9px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 5px #e9f9ef; }
.ca-admin-table-card { overflow: hidden; border: 1px solid var(--ca-border); border-radius: 17px; box-shadow: 0 8px 28px rgba(31,42,68,.05); }
.ca-admin-table-card .card-header { min-height: 78px; padding: 18px 24px; border-bottom: 1px solid #edf0f5; }.ca-admin-table-card .card-title { gap: 9px; font-size: var(--text-lg); }.ca-card-subtitle { margin: 5px 0 0; color: #98a2b3; font-size: var(--text-xs); }
.ca-count-badge { display: inline-grid; place-items: center; min-width: 25px; height: 25px; padding: 0 7px; border-radius: 8px; color: #59657a; background: #f0f2f6; font-size: var(--text-xs); }.ca-count-badge.is-danger { color: #b42318; background: #fff0f0; }
.ca-admin-table { margin: 0; }.ca-admin-table thead th { padding: 13px 24px; border-bottom-color: #edf0f5; background: #fafbfe; color: #667085; font-size: var(--text-xs); font-weight: var(--font-semibold); text-transform: none; }.ca-admin-table tbody td { padding: 17px 24px; border-bottom-color: #edf0f5; color: #344054; vertical-align: middle; }.ca-admin-table tbody tr:last-child td { border-bottom: 0; }.ca-admin-table tbody tr:hover { background: #fcfcff; }
.ca-admin-person { display: flex; align-items: center; gap: 12px; }.ca-admin-person > span { display: grid; flex: 0 0 auto; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: #6d3bd1; background: #f1eafe; font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; }.ca-admin-person div { display: flex; min-width: 0; flex-direction: column; }.ca-admin-person small { margin-top: 3px; color: #98a2b3; }
.ca-admin-actions { display: inline-flex; gap: 8px; }.ca-admin-actions .btn { white-space: nowrap; }
.ca-admin-empty { display: flex; align-items: center; flex-direction: column; padding: 38px 20px; text-align: center; }.ca-admin-empty > span { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; color: var(--ca-primary); background: var(--ca-primary-soft); font-size: 1.55rem; }.ca-admin-empty h3 { margin: 14px 0 4px; font-size: 1rem; }.ca-admin-empty p { margin: 0; color: #98a2b3; }
.ca-admin-future-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.ca-admin-future-card { overflow: hidden; min-height: 285px; border: 1px solid var(--ca-border); border-radius: 17px; box-shadow: 0 8px 28px rgba(31,42,68,.05); }.ca-admin-future-card .card-body { display: flex; flex-direction: column; padding: 24px; }.ca-future-heading { display: flex; align-items: center; gap: 13px; }.ca-future-heading h3 { margin: 0 0 4px; font-size: 1rem; }.ca-future-heading p { margin: 0; color: #98a2b3; font-size: .82rem; }
.ca-future-icon { display: grid; flex: 0 0 auto; place-items: center; width: 43px; height: 43px; border-radius: 14px; font-size: 1.3rem; }.ca-future-icon.is-green { color: #17a673; background: #eaf9f3; }.ca-future-icon.is-purple { color: #7c3aed; background: #f3edff; }.ca-future-icon.is-blue { color: #4f6cff; background: #edf1ff; }
.ca-future-art { position: relative; display: grid; place-items: center; width: 150px; height: 100px; margin: 34px auto 8px; border-radius: 50% 46% 52% 42%; }.ca-future-art > i { position: relative; z-index: 2; font-size: 3.8rem; }.ca-future-art span { position: absolute; border-radius: 50%; background: currentColor; opacity: .12; }.ca-future-art span:nth-child(2){width:25px;height:25px;left:8px;top:18px}.ca-future-art span:nth-child(3){width:16px;height:16px;right:12px;top:8px}.ca-future-art span:nth-child(4){width:20px;height:20px;right:0;bottom:13px}.ca-future-art.is-green { color:#5fc8a1;background:#edf9f4}.ca-future-art.is-purple { color:#9872e8;background:#f4efff}.ca-future-art.is-blue { color:#6280ef;background:#eff3ff}
.ca-admin-future-card footer { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: auto; padding: 14px 20px; border-top: 1px solid #edf0f5; color: #98a2b3; font-size: var(--text-xs); font-weight: var(--font-semibold); }

@media (max-width: 1199.98px) { .ca-admin-future-grid { grid-template-columns: 1fr; }.ca-admin-future-card { min-height: 250px; } }
@media (max-width: 767.98px) { .ca-admin-heading { align-items: flex-start; }.ca-admin-heading h1 { font-size: 1.45rem; }.ca-admin-refresh span { display: none; }.ca-admin-table-card .card-header { padding: 17px 18px; }.ca-admin-table thead th,.ca-admin-table tbody td { padding-left: 18px; padding-right: 18px; }.ca-admin-actions { flex-direction: column; }.ca-admin-person { min-width: 205px; } }

.ca-logo-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ca-primary-soft);
  color: var(--ca-primary);
}

.ca-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 82px;
  padding: 0 32px;
  background: linear-gradient(120deg, #ffffff 0%, #fbfbff 55%, #f7f8ff 100%);
  border-bottom: 1px solid rgba(228, 232, 241, .6);
}
.ca-topbar::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  width: 45%;
  background: radial-gradient(circle at 82% 50%, rgba(124, 103, 255, .07), transparent 70%);
  pointer-events: none;
}
.ca-topbar .ca-dashboard-search { position: relative; z-index: 1; margin: 12px 0; }
.ca-topbar .ca-dashboard-topbar-actions { position: relative; z-index: 1; margin: 12px 0; }

@media (max-width: 991.98px) {
  .ca-topbar { padding: 0 24px; }
}

@media (max-width: 575.98px) {
  .ca-topbar {
    flex-wrap: nowrap;
    min-height: 72px;
    padding: 0 16px;
    padding-left: calc(16px + env(safe-area-inset-left));
    padding-right: calc(16px + env(safe-area-inset-right));
  }
  .ca-topbar .ca-dashboard-search { flex: 1 1 auto; order: 1; min-width: 0; max-width: none; margin: 10px 0; }
  .ca-topbar .ca-dashboard-topbar-actions { order: 2; flex: 0 0 auto; gap: 8px; margin: 10px 0; }
  .ca-topbar .ca-dashboard-user-name, .ca-topbar .ca-dashboard-user-trigger > i { display: none; }
  .ca-topbar .ca-dashboard-feedback-btn { display: none; }
  .ca-topbar .ca-dashboard-user-trigger { gap: 0; padding: 0; }
  .ca-topbar .ca-dashboard-notifications-menu { right: -16px; width: min(360px, calc(100vw - 24px)); }
}

.ca-sidebar {
  background: #fff !important;
  border-right: 1px solid var(--ca-border);
  width: 270px !important;
}

/* Sidebar: let the nav list scroll vertically when the viewport is short
   (small laptops) instead of clipping the lower menu voices. */
@media (min-width: 992px) {
  .ca-sidebar { overflow: hidden; }
  .ca-sidebar .app-sidebar-menu { flex: 1 1 auto; min-height: 0; overflow: hidden; }
  .ca-sidebar .app-sidebar-wrapper { height: 100%; }
  .ca-sidebar .hover-scroll-y {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
  }
  .ca-sidebar .hover-scroll-y::-webkit-scrollbar { width: 6px; }
  .ca-sidebar .hover-scroll-y::-webkit-scrollbar-thumb { border-radius: 999px; background: #d7dce6; }
}

.ca-sidebar-logo {
  height: 82px;
  border-bottom: 1px solid var(--ca-border);
}

/* Sidebar — Step 3: Inter, mai Poppins; peso 500 a riposo, 600 da attivo,
   dimensione invariata tra i due stati (vedi Typography System). */
.ca-menu .menu-link {
  color: #17213f;
  min-height: 52px;
  border-radius: 12px;
  margin-bottom: 8px;
  font-size: var(--text-md);
  font-weight: var(--font-medium);
  line-height: var(--leading-snug);
}

.ca-nav-badge { display: inline-grid; min-width: 20px; height: 20px; margin-left: auto; padding: 0 6px; place-items: center; border-radius: 999px; color: #fff; background: #e5495f; font-size: var(--text-xs); font-weight: var(--font-semibold); line-height: 1; }
.ca-more-sheet-menu a .ca-nav-badge { margin-left: 8px; }

.ca-menu .menu-link.active,
.ca-menu .menu-link:hover {
  background: var(--ca-primary-soft);
  color: var(--ca-primary);
}
.ca-menu .menu-link.active { font-weight: var(--font-semibold); }

.ca-menu .menu-link.active .menu-icon i,
.ca-menu .menu-link:hover .menu-icon i {
  color: var(--ca-primary);
}

@media (min-width: 992px) {
  .ca-menu .menu-link { transition: color .18s ease, background-color .18s ease; }
  .ca-menu .menu-link.active { background: linear-gradient(90deg, rgba(53,109,243,.12), rgba(53,109,243,.06)); color: #356df3; }
  .ca-menu .menu-link .menu-icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 11px; transition: background-color .18s ease, color .18s ease; }
  .ca-menu .menu-link.active .menu-icon { background: rgba(255,255,255,.78); }
}

.ca-page {
  padding: 10px 0 28px;
}

.ca-card {
  border: 1px solid var(--ca-border) !important;
  border-radius: 16px !important;
  box-shadow: 0 12px 32px rgba(15,23,42,.05);
}

.ca-update-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #7e879f;
  font-size: 12px;
  font-weight: 600;
}

.ca-update-status-short {
  display: none;
}

.ca-sidebar-status-wrap {
  flex: 0 0 auto;
}

.ca-sidebar-update-status-shell.is-empty {
  display: none;
}

.ca-sidebar-update-status {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #eef1f6;
  border-radius: 12px;
  background: #fbfcff;
  color: #7e879f;
}
.ca-app-version { font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.ca-app-version i { opacity: .7; }

.ca-calendar-daily-header {
  align-items: flex-start;
}

.ca-calendar-daily-title {
  line-height: 1.18;
}

.ca-calendar-daily-copy {
  max-width: 920px;
  margin-top: 10px;
  padding: 12px 0 2px 18px;
  border-left: 3px solid rgba(79,70,255,.24);
}

.ca-calendar-quote-row {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px 16px;
}

.ca-calendar-quote {
  flex: 1 1 520px;
  min-width: 0;
  color: #17213f;
  font-size: 1.18rem;
  font-weight: 600;
  line-height: 1.6;
}

.ca-calendar-quote-mark {
  color: rgba(79,70,255,.55);
  font-size: 1.28em;
  font-weight: 700;
  line-height: 0;
  vertical-align: -.08em;
}

.ca-calendar-quote-author {
  color: #6d7895;
  font-size: 13.5px;
  font-weight: 700;
  margin-top: 7px;
}

.ca-event-category-suggestion {
  color: #6d7895;
  font-weight: 600;
}

.ca-calendar-mobile-add {
  display: none;
}


.min-vh-50 {
  min-height: 50vh;
}

.ca-empty-state {
  border: 1px dashed #dbe1ec;
  border-radius: 12px;
  padding: 28px;
  text-align: center;
  background: #fbfcff;
}

.ca-soft-card {
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(15,23,42,.04);
}

.ca-avatar {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 0 0 3px #fff;
}

.ca-avatar-initials { background: linear-gradient(145deg, #a86f50, #f0b38d); }
.ca-avatar-warm { background: linear-gradient(145deg, #9b6348, #dfb38e); }
.ca-subject-family { background: #e8f8ef; color: #13864d; }

/* Dashboard: barra superiore (cerca, + Aggiungi, notifiche, account) */
.ca-dashboard-topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.ca-dashboard-row-main, .ca-dashboard-row-secondary { row-gap: 20px; }
.ca-dashboard-row-main { margin-bottom: 20px; }
.ca-dashboard-search { display: flex; flex: 1 1 380px; align-items: center; gap: 10px; min-width: 200px; max-width: 480px; min-height: 44px; padding: 0 18px; border: 1px solid var(--ca-border); border-radius: 999px; background: #fff; color: #98a2b3; font-family: var(--family-font-body); font-size: var(--text-md); font-weight: var(--font-regular); text-align: left; }
.ca-dashboard-search:hover { border-color: #cfd5e3; color: #667085; }
.ca-dashboard-search svg, .ca-dashboard-search i { font-size: 16px; color: #98a2b3; }
.ca-dashboard-topbar-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 14px; margin-left: auto; }
.ca-dashboard-quick-add { position: relative; }
.ca-dashboard-add-btn { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 22px; border-radius: 999px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.ca-dashboard-add-dropdown { min-width: 190px; }
.ca-dashboard-bell { position: relative; display: grid; width: 42px; height: 42px; place-items: center; border: 0; border-radius: 50%; background: transparent; color: #56617a; flex-shrink: 0; }
.ca-dashboard-bell:hover { color: var(--ca-primary); }
.ca-dashboard-feedback-btn svg { width: 23px; height: 23px; }
.ca-dashboard-bell svg { width: 25px; height: 25px; }
.ca-dashboard-bell-badge { position: absolute; top: 1px; right: 0; display: inline-flex; min-width: 18px; height: 18px; align-items: center; justify-content: center; padding: 0 4px; border: 2px solid #fff; border-radius: 999px; background: #e5495f; color: #fff; font-family: var(--family-font-body); font-size: var(--text-2xs); font-weight: var(--font-semibold); line-height: 1; font-variant-numeric: tabular-nums; }
.ca-dashboard-notifications { position: relative; }
.ca-dashboard-notifications-menu { position: absolute; z-index: 1068; top: calc(100% + 12px); right: -8px; width: min(390px, calc(100vw - 32px)); overflow: hidden; border: 1px solid #e3e8f2; border-radius: 18px; background: #fff; box-shadow: 0 18px 46px rgba(25, 38, 70, .16); opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-6px); transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s; }
.ca-dashboard-notifications.is-open .ca-dashboard-notifications-menu { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); transition-delay: 0s; }
.ca-dashboard-notifications .ca-dashboard-activity-row,
.ca-dashboard-notifications-layer .ca-dashboard-activity-row { display: flex; min-width: 0; align-items: center; gap: 12px; }
.ca-dashboard-notifications .ca-dashboard-activity-row .ca-avatar,
.ca-dashboard-notifications-layer .ca-dashboard-activity-row .ca-avatar { flex: 0 0 auto; }
.ca-dashboard-notifications .ca-dashboard-activity-copy,
.ca-dashboard-notifications-layer .ca-dashboard-activity-copy { display: flex; min-width: 0; flex: 1 1 auto; flex-direction: column; gap: 3px; }
.ca-dashboard-notifications .ca-dashboard-activity-copy > span,
.ca-dashboard-notifications-layer .ca-dashboard-activity-copy > span { display: -webkit-box; overflow: hidden; color: #344054; font-size: 13px; font-weight: 400; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.ca-dashboard-notifications .ca-dashboard-activity-copy > span strong,
.ca-dashboard-notifications-layer .ca-dashboard-activity-copy > span strong { color: #14213d; font-weight: 600; }
.ca-dashboard-notifications .ca-dashboard-activity-copy > small,
.ca-dashboard-notifications-layer .ca-dashboard-activity-copy > small { color: #8b93a7; font-size: var(--text-xs); font-weight: 500; }
.ca-dashboard-notifications .ca-dashboard-activity-icon,
.ca-dashboard-notifications-layer .ca-dashboard-activity-icon { display: grid; width: 28px; height: 28px; flex: 0 0 28px; place-items: center; border-radius: 50%; background: #eef1f7; color: #6f7893; }
.ca-dashboard-notifications .ca-dashboard-activity-icon svg,
.ca-dashboard-notifications-layer .ca-dashboard-activity-icon svg { width: 14px; height: 14px; }
.ca-dashboard-notifications .ca-dashboard-activity-icon.is-success,
.ca-dashboard-notifications-layer .ca-dashboard-activity-icon.is-success { background: #ddf8e7; color: #1f9f58; }
.ca-dashboard-notifications .ca-dashboard-activity-icon.is-expense,
.ca-dashboard-notifications-layer .ca-dashboard-activity-icon.is-expense { background: #fdeaf0; color: #d63d68; }
.ca-dashboard-notifications .ca-dashboard-activity-icon.is-event,
.ca-dashboard-notifications-layer .ca-dashboard-activity-icon.is-event { background: #e5f0ff; color: #2467e8; }
.ca-dashboard-notifications .ca-dashboard-activity-icon.is-task,
.ca-dashboard-notifications-layer .ca-dashboard-activity-icon.is-task { background: #fff0e4; color: #d96b25; }
.ca-dashboard-notifications-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; padding: 13px 18px; border-bottom: 1px solid #edf0f6; color: #17213f; }
.ca-dashboard-notifications-title { display: flex; min-width: 0; align-items: center; gap: 7px; }
.ca-dashboard-notifications-title strong { font-family: var(--family-font-heading); font-size: var(--text-lg); font-weight: 600; white-space: nowrap; }
.ca-dashboard-notifications-unread-count { display: inline-flex; min-width: 22px; height: 22px; align-items: center; justify-content: center; padding: 0 7px; border-radius: 999px; background: #fff0f3; color: #d93658; font-family: var(--family-font-body); font-size: var(--text-2xs); font-weight: var(--font-semibold); white-space: nowrap; }
.ca-dashboard-notifications-mark-read { flex: 0 0 auto; border: 0; border-radius: 8px; background: #f0f3ff; color: #5046cf; padding: 7px 9px; font-family: var(--family-font-body); font-size: var(--text-xs); font-weight: 700; line-height: 1.15; transition: background-color .15s ease, color .15s ease; }
.ca-dashboard-notifications-mark-read:hover { background: #e2e6ff; color: #3e34bf; }
.ca-dashboard-notifications-list { display: flex; max-height: min(440px, calc(100vh - 205px)); flex-direction: column; gap: 8px; padding: 10px 14px 14px; overflow-y: auto; }
.ca-dashboard-notifications .ca-dashboard-activity-row, .ca-dashboard-notifications-layer .ca-dashboard-activity-row { min-height: 64px; padding: 11px 10px; border: 1px solid transparent; border-bottom: 0; border-radius: 12px; background: #fff; }
.ca-dashboard-notifications .ca-dashboard-activity-row.is-unread, .ca-dashboard-notifications-layer .ca-dashboard-activity-row.is-unread { background: #f3f6ff; border-color: #e6ecff; }
.ca-dashboard-notifications .ca-dashboard-activity-row.is-unread .ca-dashboard-activity-copy > span, .ca-dashboard-notifications-layer .ca-dashboard-activity-row.is-unread .ca-dashboard-activity-copy > span { font-weight: 600; }
.ca-dashboard-notifications .ca-dashboard-activity-row .ca-avatar, .ca-dashboard-notifications-layer .ca-dashboard-activity-row .ca-avatar { width: 32px !important; height: 32px !important; min-width: 32px !important; }
.ca-dashboard-notifications .ca-dashboard-activity-copy > span, .ca-dashboard-notifications-layer .ca-dashboard-activity-copy > span { font-size: 13px; -webkit-line-clamp: 2; }
.ca-dashboard-notifications .ca-dashboard-activity-copy > small, .ca-dashboard-notifications-layer .ca-dashboard-activity-copy > small { font-size: var(--text-xs); }
.ca-dashboard-notifications .ca-dashboard-activity-icon, .ca-dashboard-notifications-layer .ca-dashboard-activity-icon { width: 28px; height: 28px; }
.ca-dashboard-notifications-footer { display: flex; justify-content: flex-end; padding: 0 14px 14px; }
.ca-dashboard-notifications-view-all { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: #5146d8; padding: 6px 2px; font-family: var(--family-font-body); font-size: var(--text-sm); font-weight: 700; }
.ca-dashboard-notifications-view-all:hover { color: #382ebe; }
.ca-dashboard-notifications-view-all i { font-size: 13px; }
.ca-dashboard-notifications-empty { margin: 0; padding: 22px 18px; color: #7c859d; font-size: 13px; }
.ca-dashboard-notifications-modal-open { overflow: hidden; }
.ca-dashboard-notifications-modal-backdrop { position: fixed; z-index: 1080; inset: 0; display: none; background: rgba(15, 23, 42, .42); }
.ca-dashboard-notifications-modal-backdrop.is-open { display: block; }
.ca-dashboard-notifications-layer { position: fixed; z-index: 1081; top: 50%; left: 50%; display: none; width: min(620px, calc(100vw - 32px)); max-height: min(760px, calc(100vh - 32px)); overflow: hidden; border: 1px solid #dfe5f0; border-radius: 20px; background: #fff; box-shadow: 0 30px 90px rgba(15, 23, 42, .22); transform: translate(-50%, -50%); }
.ca-dashboard-notifications-layer.is-open { display: flex; flex-direction: column; }
.ca-dashboard-notifications-layer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px 18px; border-bottom: 1px solid #edf0f6; }
.ca-dashboard-notifications-layer-head h2 { margin: 0; color: #17213f; font-family: var(--family-font-heading); font-size: 20px; font-weight: 700; }
.ca-dashboard-notifications-layer-head p { margin: 3px 0 0; color: #78839c; font-size: var(--text-sm); }
.ca-dashboard-notifications-layer-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.ca-dashboard-notifications-layer-close { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid #e1e6f0; border-radius: 10px; background: #fff; color: #61708d; }
.ca-dashboard-notifications-layer-close:hover { background: #f6f8fc; color: #263353; }
.ca-dashboard-notifications-layer-close svg { width: 18px; height: 18px; }
.ca-dashboard-notifications-layer-list { display: flex; flex: 1 1 auto; flex-direction: column; gap: 9px; min-height: 0; padding: 16px 20px; overflow-y: auto; }
.ca-dashboard-notifications-layer .ca-dashboard-activity-row { min-height: 68px; padding: 12px; }
.ca-dashboard-notifications-layer .ca-dashboard-activity-copy > span { -webkit-line-clamp: 2; }
.ca-dashboard-notifications-layer-footer { display: flex; justify-content: center; padding: 14px 20px 18px; border-top: 1px solid #edf0f6; }
.ca-dashboard-notifications-load-more { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; border: 0; border-radius: 10px; background: #eef1ff; color: #4d43ca; padding: 0 15px; font-family: var(--family-font-body); font-size: var(--text-sm); font-weight: 700; }
.ca-dashboard-notifications-load-more:hover { background: #e0e5ff; }
.ca-dashboard-notifications-load-more span { color: #7780a7; font-size: var(--text-xs); font-weight: 600; }
.ca-dashboard-notifications-end { color: #8a93a9; font-size: 12px; }
.ca-dashboard-user-menu { position: relative; }
.ca-dashboard-user-trigger { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 2px; }
.ca-dashboard-user-trigger .ca-avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--ca-border); }
.ca-dashboard-user-name { color: #17213f; font-family: var(--family-font-body); font-size: var(--text-md); font-weight: var(--font-semibold); white-space: nowrap; }
.ca-dashboard-user-trigger > i { color: #8b93a7; font-size: 12px; }
.ca-dashboard-user-dropdown { min-width: 200px; }

@media (max-width: 575.98px) {
  .ca-dashboard-topbar { flex-wrap: nowrap; }
  .ca-dashboard-search { flex: 1 1 auto; order: 1; min-width: 0; max-width: none; }
  .ca-dashboard-topbar-actions { order: 2; flex: 0 0 auto; gap: 8px; margin-left: 0; }
  .ca-dashboard-quick-add { display: none; }
  .ca-dashboard-user-name, .ca-dashboard-user-trigger > i { display: none; }
  .ca-dashboard-user-trigger { gap: 0; padding: 0; }
  .ca-dashboard-notifications-menu { right: -46px; width: min(360px, calc(100vw - 24px)); }
  .ca-dashboard-notifications-layer { width: min(calc(100vw - 20px), 620px); max-height: calc(100vh - 20px); border-radius: 16px; }
  .ca-dashboard-notifications-layer-head { gap: 10px; padding: 18px 16px 15px; }
  .ca-dashboard-notifications-layer-head h2 { font-size: 18px; }
  .ca-dashboard-notifications-layer-actions .ca-dashboard-notifications-mark-read { max-width: 112px; }
  .ca-dashboard-notifications-layer-list { padding: 12px; }
  .ca-dashboard-notifications-layer-footer { padding: 12px; }
}

.ca-quick-task-list .ca-quick-task-row:last-child { border-bottom: 0; }

.ca-stat-icon {
  width: 68px;
  height: 68px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ca-timeline {
  position: relative;
}

.ca-timeline:before {
  content: "";
  position: absolute;
  left: 90px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e8ecf4;
}

.ca-timeline-row {
  display: grid;
  grid-template-columns: 72px 22px 1fr auto 34px;
  gap: 14px;
  align-items: center;
  min-height: 54px;
  border-bottom: 1px solid #eef1f6;
}

.ca-timeline-title-wrap {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
}

.ca-timeline-title-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ca-timeline-avatar {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 0 0 2px #fff;
}

.ca-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ca-primary);
  box-shadow: 0 0 0 6px rgba(79,70,255,.08);
  z-index: 1;
}

.ca-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(118px, 1fr));
  overflow-x: auto;
}

.ca-week-day,
.ca-month-cell {
  border-right: 1px solid #edf1f7;
  min-height: 112px;
  padding: 12px;
}

.ca-chip {
  display: block;
  border-radius: 7px;
  padding: 7px 9px;
  font-family: var(--family-font-body);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  margin-top: 8px;
}

.ca-event-chip {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
  border: 0;
  text-align: left;
  line-height: 1.35;
  box-shadow: none;
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.ca-calendar-chip-icon { width: 14px; height: 14px; flex: 0 0 14px; margin-top: 1px; }
.ca-event-chip > div { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.ca-event-chip:hover {
  transform: translateY(-1px);
  filter: brightness(.98);
  box-shadow: 0 6px 14px rgba(15,23,42,.055);
}

.ca-event-chip-budget {
  background: #e7f2f0 !important;
  color: #0f4c5c !important;
  border: 0;
}

.ca-event-chip-budget:hover {
  background: #dcecea !important;
}

.ca-calendar-month-view {
  min-width: 0;
}

.ca-month-cell {
  min-width: 0;
}

.ca-month-cell[data-calendar-day-new] {
  cursor: pointer;
}

.ca-month-cell[data-calendar-day-new]:hover {
  background: #fbfcff;
}

.ca-month-day-button,
.ca-more-events {
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
}

.ca-month-day-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  min-height: 26px;
}

.ca-more-events {
  display: block;
  width: auto;
  margin-top: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f2f6ff;
  color: var(--ca-primary);
  font-size: 11px;
  font-weight: 800;
}

.ca-more-events:hover {
  background: #eaf1ff;
  text-decoration: none;
}

.ca-calendar-month-view,
.ca-calendar-week-grid-wrap {
  overflow: hidden;
  border-top: 1px solid #e8edf5;
  background: #fff;
}

.ca-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(118px, 1fr));
  overflow-x: auto;
  background: #f3f6fb;
  gap: 1px;
}

.ca-calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 12px;
}

.ca-calendar-view-switch {
  order: 1;
  margin-bottom: 10px;
}

.ca-calendar-view-switch .btn {
  min-height: 34px;
  padding: 7px 13px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.ca-calendar-title-wrap {
  order: 2;
  flex: 1 1 240px;
  position: relative;
  text-align: center;
}

.ca-calendar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  order: 3;
  margin-left: auto;
  justify-content: flex-end;
}

.ca-month-picker {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  padding: 14px;
  border: 1px solid var(--ca-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(15,23,42,.14);
  z-index: 20;
}

.ca-month-picker.is-open {
  display: block;
}

.ca-calendar-head {
  display: grid;
  grid-template-columns: repeat(7, minmax(118px, 1fr));
  overflow-x: auto;
  border-bottom: 1px solid #e8edf5;
  background: #f8fafd;
}

.ca-calendar-head div {
  padding: 13px 12px;
  font-size: 12px;
  font-weight: 800;
  color: #697492;
  text-align: center;
  letter-spacing: 0;
}

.ca-month-cell {
  min-height: 250px;
  border: 0;
  background: #fff;
  transition: background .16s ease, box-shadow .16s ease;
}

.ca-month-cell:hover,
.ca-week-view-day:hover {
  background: #fbfcff;
  box-shadow: inset 0 0 0 1px #e8edf5;
}

.ca-month-cell.ca-month-cell-outside {
  background: #f4f5f7;
}
.ca-month-cell.ca-month-cell-outside:hover {
  background: #eef0f3;
}
.ca-month-cell.ca-month-cell-outside .ca-month-day-button span {
  color: #adb3c0 !important;
  font-weight: 600 !important;
}
.ca-month-cell.ca-month-cell-outside .ca-month-day-button span.badge {
  background-color: #c2c8d4 !important;
}
.ca-event-chip.ca-event-chip-muted {
  opacity: .55;
  filter: grayscale(.15);
}
.ca-event-chip.ca-event-chip-muted:hover {
  opacity: .8;
}

.ca-calendar-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(138px, 1fr));
  overflow-x: auto;
  background: #f3f6fb;
  gap: 1px;
}

.ca-calendar-week-view {
  min-width: 0;
}

.ca-calendar-week-list {
  display: none;
}

.ca-week-view-day {
  min-height: 420px;
  padding: 12px;
  border: 0;
  background: #fff;
  transition: background .16s ease;
}

.ca-week-view-date {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f3f8;
}

.ca-calendar-day-wrap {
  padding: 20px 24px 28px;
}

.ca-day-timeline {
  position: relative;
  display: grid;
  gap: 0;
}

.ca-day-event {
  width: 100%;
  border: 1px solid transparent;
  border-bottom-color: #edf1f7;
  border-radius: 10px;
  background: transparent;
  display: grid;
  grid-template-columns: 72px 36px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 12px;
  text-align: left;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.ca-calendar-event-icon,
.ca-calendar-side-category-icon,
.ca-event-detail-category-icon {
  display: inline-grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 11px;
}
.ca-calendar-event-icon svg,
.ca-calendar-side-category-icon svg,
.ca-event-detail-category-icon svg { width: 18px; height: 18px; }
.ca-event-detail-category-icon { width: 42px; height: 42px; flex-basis: 42px; border-radius: 12px; }
.ca-match-reminder-side-icon { color: #fff; background: linear-gradient(135deg, #2A2470 0%, #4F46FF 100%); }

.ca-day-event:hover {
  background: #fbfcff;
  border-color: #e8edf5;
  box-shadow: 0 8px 22px rgba(15,23,42,.045);
}

.ca-match-reminder-event {
  display: flex;
  align-items: center;
  min-height: 100px;
  padding: 16px 20px 16px 12px;
  border: 0;
  border-radius: 14px;
  background-image: linear-gradient(90deg, rgba(20,16,90,.5) 0%, rgba(20,16,90,.1) 55%, rgba(20,16,90,0) 78%), url("images/Match del mese/card_event.png");
  background-size: cover;
  background-position: center right;
}
/* .ca-day-event:hover imposta "background" in forma abbreviata, che
   azzererebbe background-image (portandolo a "none", quindi card bianca)
   se non lo si ridichiara qui esplicitamente. */
.ca-match-reminder-event:hover {
  background-color: transparent;
  background-image: linear-gradient(90deg, rgba(20,16,90,.5) 0%, rgba(20,16,90,.1) 55%, rgba(20,16,90,0) 78%), url("images/Match del mese/card_event.png");
  background-size: cover;
  background-position: center right;
  box-shadow: 0 10px 26px rgba(31,26,120,.18);
}
.ca-match-reminder-copy { display: flex; flex-direction: column; gap: 4px; font-family: var(--family-font-body); }
.ca-match-reminder-title { color: #fff; font-family: var(--family-font-heading); font-size: 17px; font-weight: 700; line-height: 1.2; }
.ca-match-reminder-sub { color: rgba(255,255,255,.85); font-family: var(--family-font-body); font-size: 12px; font-weight: 600; }

.ca-match-reminder-chip {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
  width: 100%;
  min-height: 80px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  text-align: left;
  font-family: var(--family-font-body);
  background-image: linear-gradient(90deg, rgba(20,16,90,.62) 0%, rgba(20,16,90,.3) 50%, rgba(20,16,90,0) 88%), url("images/Match del mese/card_event.png");
  background-size: cover;
  background-position: center right;
}
.ca-match-reminder-chip-title { color: #fff; font-family: var(--family-font-heading); font-size: 12px; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,.35); }
.ca-match-reminder-chip-sub { color: rgba(255,255,255,.92); font-family: var(--family-font-body); font-size: 10px; font-weight: 600; }

.ca-match-reminder-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 0;
  padding: 5px 9px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-family: var(--family-font-body);
  font-size: 10.5px;
  font-weight: 700;
  background: linear-gradient(135deg, #2A2470 0%, #4F46FF 100%);
}
.ca-match-reminder-pill svg { width: 12px; height: 12px; flex: 0 0 auto; }

/* Layer informativo del promemoria "Match del mese": evento di sistema,
   non modificabile/eliminabile — al click mostra questo invece del drawer
   di modifica standard. */
.ca-match-info-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1090;
  background: rgba(15,23,42,.5);
  opacity: 0;
  display: none;
  transition: opacity .22s ease;
}
.ca-match-info-backdrop.is-open { display: block; }
.ca-match-info-backdrop.is-open { opacity: 1; }

.ca-match-info-layer {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 1091;
  width: min(440px, calc(100vw - 32px));
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 40px 100px rgba(15,10,60,.32);
  opacity: 0;
  display: none;
  transform: translate(-50%, -50%) scale(.96);
  transition: opacity .22s ease, transform .22s ease;
}
.ca-match-info-layer.is-open {
  display: block;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.ca-match-info-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(15,23,42,.45);
  color: #fff;
  backdrop-filter: blur(4px);
}
.ca-match-info-close:hover { background: rgba(15,23,42,.65); }

.ca-match-info-banner {
  display: block;
  width: 100%;
  height: 148px;
  object-fit: cover;
  object-position: center 30%;
  background: #141040;
}

.ca-match-info-body { padding: 22px 26px 26px; text-align: center; }
.ca-match-info-eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  color: #4F46FF;
  font-family: var(--family-font-body);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.ca-match-info-body h2 {
  margin: 0 0 8px;
  color: #17213f;
  font-family: var(--family-font-heading);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
}
.ca-match-info-body p {
  margin: 0 0 20px;
  color: #4b5674;
  font-family: var(--family-font-body);
  font-size: 14.5px;
  line-height: 1.5;
}
.ca-match-info-body p strong { color: #17213f; }
.ca-match-info-body .btn { min-width: 190px; }

@media (prefers-reduced-motion: reduce) {
  .ca-match-info-backdrop, .ca-match-info-layer { transition: none; }
}

.ca-day-time {
  color: #17213f;
  font-family: var(--family-font-body);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
}

.ca-calendar-empty {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #5f6b8a;
}

.ca-event-view {
  min-height: 260px;
}

.ca-event-detail-note {
  border: 1px solid #eef1f6;
  border-radius: 12px;
  background: #fbfcff;
  padding: 14px 16px;
  color: #3f4856;
  line-height: 1.55;
}

.ca-event-detail-list {
  display: grid;
  gap: 12px;
}

.ca-event-detail-row {
  border-bottom: 1px solid #eef1f6;
  padding-bottom: 12px;
}

.ca-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(720px, 100vw);
  background: #fff;
  z-index: 1060;
  transform: translateX(100%);
  opacity: 0;
  transition: transform var(--ca-motion-ui) var(--ca-motion-enter), opacity var(--ca-motion-ui) ease-out, visibility 0s linear var(--ca-motion-ui);
  box-shadow: none;
  overflow-y: auto;
  visibility: hidden;
  pointer-events: none;
}

.ca-drawer.is-open { transform: translateX(0); opacity: 1; box-shadow: -24px 0 60px rgba(15,23,42,.18); visibility: visible; pointer-events: auto; transition-delay: 0s; }
.ca-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.55);
  z-index: 1055;
  display: block;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--ca-motion-ui) ease-out, visibility 0s linear var(--ca-motion-ui);
}
.ca-backdrop.is-open { opacity: 1; visibility: visible; pointer-events: auto; transition-delay: 0s; }

body:has(.ca-backdrop.is-open, .ca-drawer.is-open) {
  overflow: hidden;
}

body.ca-event-modal-open {
  overflow: hidden;
}

#caBackdrop.ca-event-modal-backdrop {
  background: rgba(37, 43, 68, .66);
  backdrop-filter: blur(5px);
}

#caEventDrawer.ca-event-modal {
  inset: 0 0 0 auto;
  width: min(720px, 100vw);
  max-height: 100vh;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  transform: translateX(100%);
  transition: transform .22s ease, visibility .22s;
  box-shadow: none;
}

#caEventDrawer.ca-event-modal.is-open {
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
  box-shadow: -24px 0 60px rgba(15,23,42,.18);
}

.ca-event-modal-form {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100vh;
  background: #fff;
}

.ca-event-modal-header {
  position: relative;
  flex: 0 0 auto;
  min-height: 112px;
  padding: 24px 28px;
  border-bottom: 1px solid #e8ebf2;
  overflow: hidden;
  background: linear-gradient(115deg, #fff 45%, #fcfcff 100%);
}

.ca-event-modal-heading {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 16px;
}

.ca-event-modal-heading-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 15px;
  color: #6274f5;
  background: linear-gradient(145deg, #f0efff, #e5e4ff);
}

.ca-event-modal-heading-icon svg { width: 25px; height: 25px; stroke-width: 1.9; }
.ca-event-modal-heading h2 { margin: 0 0 4px; color: #182347; font-size: 26px; font-weight: 700; letter-spacing: -.55px; }
.ca-event-modal-heading p { margin: 0; color: #7580a2; font-size: 15px; }

.ca-event-modal-close {
  position: absolute;
  z-index: 3;
  top: 30px;
  right: 28px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #dce1eb;
  border-radius: 12px;
  color: #53607d;
  background: rgba(255,255,255,.84);
  transition: color .16s ease, border-color .16s ease, background .16s ease;
}
.ca-event-modal-close:hover { color: #3345cf; border-color: #bfc7ef; background: #fff; }
.ca-event-modal-close svg { width: 20px; height: 20px; }

.ca-event-modal-decoration i { position: absolute; display: block; border-radius: 50%; pointer-events: none; }
.ca-event-modal-decoration i:nth-child(1) { width: 110px; height: 110px; right: 115px; top: 56px; background: rgba(203, 239, 233, .3); }
.ca-event-modal-decoration i:nth-child(2) { width: 40px; height: 40px; right: 310px; top: 42px; background: rgba(211, 202, 255, .48); }
.ca-event-modal-decoration i:nth-child(3) { width: 25px; height: 25px; right: 218px; top: 84px; background: rgba(198, 239, 226, .68); }
.ca-event-modal-decoration i:nth-child(4) { width: 18px; height: 18px; right: 118px; top: 20px; background: rgba(248, 190, 221, .7); }

.ca-event-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 28px 32px 24px;
}

.ca-event-field { margin-bottom: 22px; }
.ca-event-field > label,
.ca-event-recurrence-advanced .form-label {
  display: block;
  margin: 0 0 9px;
  color: #273452;
  font-size: 14px;
  font-weight: 700;
}
.ca-event-grid { display: grid; gap: 28px; }
.ca-event-grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ca-event-grid-three { grid-template-columns: 1.15fr 1fr 1fr; }
.ca-event-grid .ca-event-field { margin-bottom: 22px; }

.ca-event-control { position: relative; }
.ca-event-control > svg {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 18px;
  width: 21px;
  height: 21px;
  color: #6571f3;
  transform: translateY(-50%);
  pointer-events: none;
}
.ca-event-control .form-control,
.ca-event-control .form-select {
  min-height: 54px;
  padding-left: 54px;
  border-color: #d8deea;
  border-radius: 11px;
  color: #273452;
  font-size: 16px;
  background-color: #fff;
  box-shadow: none;
}
.ca-event-control .form-control:focus,
.ca-event-control .form-select:focus {
  border-color: #7d86fa;
  box-shadow: 0 0 0 3px rgba(98, 116, 245, .09);
}
.ca-event-owner-control > svg {
  left: 11px;
  width: 36px;
  height: 36px;
  padding: 8px;
  border-radius: 50%;
  color: #278f87;
  background: #dff5ef;
}
.ca-event-textarea-control > svg { top: 20px; transform: none; }
.ca-event-textarea-control textarea.form-control { min-height: 82px; padding-top: 17px; resize: vertical; }
.ca-event-picker-control { cursor: pointer; }
.ca-event-picker-control .form-control,
.ca-event-picker-control .form-control[readonly] {
  cursor: pointer;
  background: #fff;
}
.ca-event-picker-control input[type="time"]::-webkit-calendar-picker-indicator {
  display: none;
  opacity: 0;
  width: 0;
  margin: 0;
  padding: 0;
}
.ca-event-time-select { display: block; cursor: pointer; }
.ca-event-native-time { display: none; }
.ca-event-time-control > svg {
  right: 42px;
  left: auto;
}
.ca-event-time-control .form-control,
.ca-event-time-control .form-select {
  padding-right: 68px;
  padding-left: 16px;
  text-align: left;
}
.ca-event-until-control { width: 205px; }
.ca-event-count-control { display: flex; align-items: center; gap: 8px; width: auto; }
.ca-event-count-control .form-control { width: 90px; }
.ca-event-count-control span { color: #56617a; font-size: 13px; font-weight: 600; white-space: nowrap; }

.ca-rec-days {
  display: flex !important;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
  max-width: 100%;
}
.ca-rec-days .btn {
  flex: 1 1 60px;
  min-width: 44px;
  margin: 0 !important;
  border-radius: 8px !important;
}
@media (max-width: 575.98px) {
  .ca-rec-days .btn { flex-basis: calc(33.333% - 4px); }
}

.ca-event-category-control .select2-container { width: 100% !important; }
.ca-event-category-control .form-select { padding-left: 58px; }
.ca-event-category-selected-icon {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 12px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  transform: translateY(-50%);
  pointer-events: none;
}
.ca-event-category-selected-icon svg { width: 18px; height: 18px; }
.ca-event-category-control .select2-container .select2-selection--single {
  height: 54px !important;
  min-height: 54px !important;
  padding: 0 42px 0 12px !important;
  border-color: #d8deea;
  border-radius: 11px;
  background: #fff;
}
.ca-event-category-control .select2-container .select2-selection--single .select2-selection__rendered {
  display: flex;
  height: 52px;
  align-items: center;
  padding: 0 !important;
  color: #273452;
  line-height: 1.2;
}
.ca-event-category-control .select2-container .select2-selection--single .select2-selection__arrow {
  top: 0;
  right: 10px;
  height: 52px;
}
#caEventDrawer .select2-dropdown {
  overflow: hidden;
  border-color: #d8deea;
  border-radius: 12px;
  box-shadow: 0 14px 35px rgba(31,45,61,.14);
}
#caEventDrawer .select2-results__option { padding: 9px 12px; }
#caEventDrawer .ca-category-select-option { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: #344054; font-weight: 600; }
#caEventDrawer .ca-category-select-icon { display: inline-flex; flex: 0 0 30px; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 9px; }
#caEventDrawer .ca-category-select-icon svg { width: 17px; height: 17px; }
.ca-event-all-day { width: max-content; margin: -1px 0 24px; }
.ca-event-all-day .form-check-input { width: 56px; height: 30px; margin-right: 14px; }
.ca-event-all-day .form-check-label { color: #596582; font-size: 15px; font-weight: 600; }
.ca-event-recurrence-advanced { margin: -6px 0 22px; padding: 18px; border: 1px solid #e5e8f1; border-radius: 12px; background: #fafbfe; }

.ca-event-modal-footer {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 16px;
  padding: 14px 32px 16px;
  border-top: 1px solid #edf0f5;
  background: #fff;
}
.ca-event-delete { margin-left: auto; }
.ca-event-modal-actions { display: flex; gap: 14px; margin-left: auto; }
.ca-event-modal-actions .btn { min-height: 48px; padding: 0 22px; border-radius: 11px; font-size: 14px; font-weight: 700; }
.ca-event-cancel { min-width: 104px; border: 1px solid #d9dee8; color: #46516d; background: #fff; }
.ca-event-cancel:hover { color: #3345cf; border-color: #bdc5ec; background: #fafbff; }
.ca-event-save { min-width: 120px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; background: linear-gradient(135deg, #5367f6, #445cf0); box-shadow: 0 9px 20px rgba(73, 94, 239, .22); }
.ca-event-save svg { width: 20px; height: 20px; }

.ca-meals-footer-secondary { display: flex; gap: 10px; margin-right: auto; }
.ca-meals-footer-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 11px; font-size: 14px; font-weight: 700; cursor: pointer; transition: background-color .12s ease, border-color .12s ease, color .12s ease; }
.ca-meals-footer-btn svg { width: 17px; height: 17px; }
.ca-meals-footer-btn.is-neutral { border: 1px solid #d9dee8; color: #46516d; background: #fff; }
.ca-meals-footer-btn.is-neutral:hover { color: #3345cf; border-color: #bdc5ec; background: #fafbff; }
.ca-meals-footer-btn.is-danger { border: 1px solid #f4c9c9; color: #c8402f; background: #fff; }
.ca-meals-footer-btn.is-danger:hover { border-color: #e69b9b; background: #fdf2f2; }

@media (max-width: 1100px) {
  .ca-event-time-select { display: none; }
  .ca-event-native-time { display: block; }
}

@media (min-width: 768px) and (max-width: 1100px) {
  .ca-event-modal-header { padding: 26px 24px; }
  .ca-event-modal-body { padding: 24px; }
  .ca-event-modal-footer { padding: 14px 24px 16px; }
  .ca-event-grid { gap: 24px; }
}

@media (max-width: 767.98px) {
  #caEventDrawer.ca-event-modal {
    width: 100vw;
    max-height: 100dvh;
    border-radius: 0;
  }
  .ca-event-modal-form { height: 100dvh; max-height: 100dvh; }
  .ca-event-modal-header { min-height: 88px; padding: 16px 18px; }
  .ca-event-modal-heading { gap: 12px; padding-right: 48px; }
  .ca-event-modal-heading-icon { width: 44px; height: 44px; flex-basis: 44px; border-radius: 13px; }
  .ca-event-modal-heading-icon svg { width: 22px; height: 22px; }
  .ca-event-modal-heading h2 { font-size: 20px; line-height: 1.15; }
  .ca-event-modal-heading p { font-size: 12px; line-height: 1.35; }
  .ca-event-modal-close { top: 24px; right: 18px; width: 40px; height: 40px; }
  .ca-event-modal-decoration { display: none; }
  .ca-event-modal-body { padding: 22px 18px 10px; }
  .ca-event-grid-two { grid-template-columns: 1fr; gap: 0; }
  .ca-event-grid-three { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; row-gap: 0; }
  .ca-event-grid-three > .ca-event-field:first-child,
  .ca-event-grid-three > #caEventEndDateWrap { grid-column: 1 / -1; }
  .ca-event-field,
  .ca-event-grid .ca-event-field { margin-bottom: 18px; }
  .ca-event-modal-footer { align-items: stretch; flex-direction: column; padding: 14px 18px 18px; }
  .ca-event-delete { width: 100%; margin-left: 0; }
  .ca-event-modal-actions { width: 100%; flex-direction: row; gap: 9px; margin-left: 0; }
  .ca-event-modal-actions .btn { width: 50%; min-width: 0; padding-inline: 14px; }
  .ca-event-save:not(.ca-event-primary-edit):not([data-busy="1"]) span { display: none; }
  .ca-event-save:not(.ca-event-primary-edit):not([data-busy="1"])::after { content: "Salva"; }
  .ca-meals-footer-secondary { width: 100%; margin-right: 0; order: 2; }
  .ca-meals-footer-secondary .ca-meals-footer-btn { flex: 1 1 0; min-width: 0; }
  .ca-event-modal-actions { order: 1; }
  #caMealForm .ca-event-modal-footer { flex-direction: row; flex-wrap: nowrap; gap: 9px; }
  #caMealForm .ca-meals-footer-secondary { width: auto; flex: 1 1 0; order: 0; margin-right: 0; }
  #caMealForm .ca-event-modal-actions { width: auto; flex: 1 1 0; margin-left: 0; order: 0; }
  #caMealForm .ca-meals-footer-btn,
  #caMealForm .ca-event-modal-actions .btn { width: 100%; }
}

.ca-search-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1070;
  background: rgba(15,23,42,.34);
  backdrop-filter: blur(4px);
  display: none;
}

.ca-search-backdrop.is-open {
  display: block;
}

.ca-search-modal {
  position: fixed;
  z-index: 1071;
  top: 96px;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  width: min(680px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 128px));
  overflow: auto;
  display: none;
  padding: 24px;
  border: 1px solid var(--ca-border);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(15,23,42,.22);
}

.ca-search-modal.is-open {
  display: block;
}

.ca-search-results {
  min-height: 72px;
}

.ca-search-section + .ca-search-section {
  margin-top: 18px;
}

.ca-search-section-title {
  margin-bottom: 8px;
  color: #6d7897;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.ca-search-result {
  width: 100%;
  border: 1px solid #eef1f6;
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  margin-bottom: 8px;
}

.ca-search-result:hover {
  background: #f8faff;
  border-color: #dce4f4;
}

.ca-task-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 140px 120px 34px 34px;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid #edf1f7;
  font-family: var(--family-font-body);
  font-size: var(--text-sm);
  font-weight: var(--font-regular);
}
.ca-task-row .ca-task-start { margin-top: 2px; color: #98a2b3; font-size: var(--text-xs); }
.ca-task-row .ca-task-start.is-overdue { color: var(--bs-danger, #d92d20); font-weight: 600; }

.ca-task-row-clickable { cursor: pointer; }

.ca-task-complete-toggle {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  color: #c2c8d6;
  background: transparent;
  transition: color .15s ease, background-color .15s ease;
}
.ca-task-complete-toggle:hover { color: #98a2b3; background: #f5f6fa; }
.ca-task-complete-toggle svg { width: 22px; height: 22px; }
.ca-task-complete-toggle.is-done { color: #17a673; }
.ca-task-complete-toggle.is-done:hover { color: #128a5e; }

/* Titolo attività: contenuto operativo, non un heading — resta Inter. */
.ca-task-row .ca-task-title {
  font-family: var(--family-font-body);
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
}

.ca-task-row.is-done .ca-task-title {
  text-decoration: line-through;
  color: #7e879d;
}

.ca-card-header-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 5px 11px;
  line-height: 1.2;
  white-space: nowrap;
}

.ca-row-actions {
  position: relative;
}

.ca-action-menu {
  position: fixed;
  min-width: 170px;
  max-width: calc(100vw - 16px);
  padding: 8px;
  border: 1px solid var(--ca-border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(15,23,42,.12);
  display: none;
  z-index: 1200;
}

.ca-row-actions.is-open .ca-action-menu,
.ca-action-menu.is-open {
  display: block;
}

.ca-action-item {
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #17213f;
  font-weight: 600;
  text-align: left;
}

.ca-action-item:hover {
  background: #f4f7fb;
}

.ca-action-item-danger {
  color: #d9214e;
}

.ca-task-description {
  line-height: 1.55;
}

.ca-checklist-editor {
  border: 1px solid #eef1f6;
  border-radius: 12px;
  padding: 16px;
  background: #fbfcff;
}

.ca-checklist-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 28px;
  border-radius: 999px;
  background: #f1f5ff;
  color: #3562ff;
  font-size: 12px;
  font-weight: 700;
}

.ca-checklist-editor-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 10px;
}

.ca-checklist-input {
  min-width: 0;
}

.ca-checklist-delete {
  color: #99a1b7;
}

.ca-checklist-delete:hover {
  color: #d9214e;
}

.ca-dashboard-today-tasks { margin-top: 6px; padding-top: 14px; border-top: 1px solid #eef1f6; }
.ca-quick-task-overdue { display: inline-flex; align-items: center; color: #d9214e; }
.ca-quick-task-overdue svg { width: 16px; height: 16px; }

.ca-dashboard-today-task {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid transparent;
  border-bottom-color: #edf1f7;
  border-radius: 10px;
  background: transparent;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.ca-dashboard-today-task:hover {
  background: #fbfcff;
  border-color: #e8edf5;
  box-shadow: 0 8px 22px rgba(15,23,42,.045);
}
.ca-dashboard-today-task + .ca-dashboard-today-task { margin-top: 10px; }
.ca-dashboard-today-task-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: var(--ca-primary);
  background: var(--ca-primary-soft);
}
.ca-dashboard-today-task-icon svg { width: 20px; height: 20px; }
.ca-dashboard-today-task-main { flex: 1 1 auto; display: flex; flex-direction: column; gap: 6px; }
.ca-dashboard-today-task-title { color: #17213d; font-size: var(--text-md); font-weight: var(--font-semibold); }
.ca-dashboard-today-task-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 3px 10px 3px 3px;
  border-radius: 999px;
  color: #59657a;
  background: #f0f2f6;
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
}
.ca-dashboard-today-task-pill svg { width: 14px; height: 14px; }
.ca-dashboard-today-task-pill .ca-avatar { order: 3; width: 20px !important; height: 20px !important; min-width: 20px !important; }
.ca-dashboard-today-tasks-title { margin-bottom: 4px; color: #98a2b3; font-size: var(--text-xs); font-weight: var(--font-semibold); text-transform: uppercase; letter-spacing: .02em; }
.ca-dashboard-today-tasks .ca-quick-task-row:last-child { border-bottom: 0; }

.ca-quick-task-row {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid #eef1f6;
}

.ca-quick-task-row .badge {
  overflow: hidden;
  max-width: 110px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ca-quick-task-row .form-check-label {
  display: block;
}

.ca-quick-task-checklist {
  display: block;
}

.ca-quick-task-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.ca-quick-checklist {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-left: 3px;
}

.ca-quick-checklist-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: #3f4856;
  font-weight: 600;
}

.ca-quick-checklist-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ca-quick-checklist-item.is-done span {
  color: #99a1b7;
  text-decoration: line-through;
}

.ca-week-grid-wide .ca-week-day {
  min-height: 188px;
}

.ca-dashboard-week-list {
  display: none;
}

.ca-settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
}

.ca-notification-preview {
  background: linear-gradient(135deg, #d9efff, #c9b4ff 62%, #f2b7d4);
  border-radius: 16px;
  padding: 28px;
}

.ca-notification-types { display: grid; gap: 4px; }
.ca-notification-type-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto minmax(214px, auto); align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid #edf1f7; }
.ca-notification-type-row:last-child { border-bottom: 0; }
.ca-notification-type-icon { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 11px; }
.ca-notification-type-row strong, .ca-notification-type-row span { display: block; }
.ca-notification-type-row .ca-notification-type-icon { display: inline-flex; align-items: center; justify-content: center; }
.ca-notification-type-row strong { color: #17213f; font-size: 13px; }
.ca-notification-type-row > div:nth-child(2) > span { margin-top: 2px; color: #7e879f; font-size: 11px; line-height: 1.4; }
.ca-notification-channel-actions { display: flex; justify-content: flex-end; gap: 7px; }
.ca-notification-channel { display: grid; grid-template-columns: auto 34px; align-items: center; gap: 6px; min-height: 44px; padding: 4px 5px 4px 9px; border: 1px solid #e7ebf3; border-radius: 12px; background: #fbfcff; }
.ca-notification-channel.is-push { min-width: 78px; }
.ca-notification-channel.is-telegram { min-width: 129px; border-color: #d9edf8; background: #f7fcff; }
.ca-notification-channel-name { color: #44506b; font-size: 10px; font-weight: 700; line-height: 1.15; }
.ca-notification-channel-heading { display: grid !important; gap: 2px; }
.ca-notification-always-on { width: max-content; margin: 0 !important; padding: 2px 5px; border-radius: 999px; background: #e5f8ed; color: #16a05d !important; font-size: 8px !important; font-weight: 700; line-height: 1.1 !important; }
.ca-notification-test-button { display: inline-grid; width: 34px; height: 34px; place-items: center; padding: 0; border: 1px solid #dbe6fb; border-radius: 10px; background: #eef4ff; color: #356df3; transition: background-color .15s ease, color .15s ease, transform .1s ease; }
.ca-notification-test-button:hover { background: #356df3; color: #fff; }
.ca-notification-test-button:active { transform: scale(.96); }
.ca-notification-test-button:disabled { border-color: #edf0f5; background: #f5f6f8; color: #b6bdca; cursor: not-allowed; }
.ca-notification-test-button i { font-size: 15px; }
.ca-notification-test-button svg { width: 17px; height: 17px; }
.ca-notification-test-button.is-telegram { border-color: #ccebf8; background: #e8f7fd; color: #229ed9; }
.ca-notification-test-button.is-telegram:hover { border-color: #229ed9; background: #229ed9; color: #fff; }
.ca-notification-test-button:focus-visible { outline: 3px solid rgba(53, 109, 243, .22); outline-offset: 2px; }

@media (max-width: 1399.98px) and (min-width: 576px) {
  .ca-notification-type-row { grid-template-columns: 38px minmax(0, 1fr) auto; }
  .ca-notification-channel-actions { grid-column: 2 / 4; justify-content: flex-end; }
}

@media (max-width: 575.98px) {
  .ca-notification-type-row { grid-template-columns: 36px minmax(0, 1fr) auto; align-items: start; padding: 14px 0; }
  .ca-notification-type-row > .badge { grid-column: 3; grid-row: 1; margin-top: 7px; }
  .ca-notification-channel-actions { grid-column: 2 / 4; width: 100%; margin-top: 4px; justify-content: stretch; }
  .ca-notification-channel { flex: 1 1 0; }
  .ca-notification-channel.is-telegram { flex-grow: 1.35; }
}

/* Impostazioni: pagina verticale allineata al layout principale. */
.ca-settings-page-body #kt_app_content_container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 24px 28px 40px;
  box-sizing: border-box;
}
.ca-settings-page-body .ca-page { background: #f7f9fc; }
.ca-settings-page.settings-page > .d-flex:first-child { margin-bottom: 24px !important; }
.ca-settings-page.settings-page > .d-flex:first-child h1 { margin: 0; color: #12203d !important; font-size: 30px; font-weight: 700; line-height: 1.15; letter-spacing: -.5px; }
.ca-settings-page.settings-page > .d-flex:first-child .text-gray-600 { margin-top: 6px; color: #74809a !important; font-size: 14px !important; line-height: 1.45; }
.ca-settings-page .ca-settings-content { display: grid; gap: 28px; }
.ca-settings-page .settings-section { display: grid; gap: 14px; }
.ca-settings-page .ca-settings-section-heading { display: grid; grid-template-columns: 44px minmax(0,1fr) auto; align-items: center; justify-content: start; gap: 12px; }
.ca-settings-page .ca-settings-section-heading > span { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 13px; color: var(--ca-primary); background: #efefff; }
.ca-settings-page .ca-settings-section-heading > span svg,.ca-settings-page .ca-settings-section-heading > span i { width: 20px; height: 20px; font-size: 20px; }
.ca-settings-page .ca-settings-section-heading h2 { margin: 0; color: #15213d; font-size: 21px; font-weight: 700; line-height: 1.25; }
.ca-settings-page .ca-settings-section-heading p { margin: 4px 0 0; color: #71809a; font-size: 13px; line-height: 1.45; }
.ca-settings-page .ca-card { border-color: #e1e7f0; border-radius: 18px; box-shadow: 0 7px 22px rgba(31,44,72,.035); }

.ca-settings-page .settings-profile-card { position: relative; display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 24px; padding: 24px; }
.ca-settings-page .settings-profile-card .ca-account-status { position: absolute; top: 20px; right: 24px; font-size: var(--text-xs); }
.ca-settings-page .settings-profile-card .ca-profile-avatar-column { width: 150px; padding-top: 8px; }
.ca-settings-page .settings-profile-card .ca-profile-avatar { width: 84px; height: 84px; border-radius: 24px; font-size: 24px; }
.ca-settings-page .settings-profile-card .ca-profile-avatar-column .btn { min-height: 38px; border-radius: 10px; font-size: 12px; }
.ca-settings-page .settings-profile-card .ca-profile-avatar-column .btn-light-primary { color: #347ff1; background: #eef5ff; }
.ca-settings-page .settings-profile-card .ca-profile-avatar-column small { color: #8c96ac; font-size: var(--text-xs); }
.ca-settings-page .settings-profile-card .ca-profile-fields { padding-top: 30px; }
.ca-settings-page .settings-profile-card .ca-profile-fields label { margin-bottom: 6px; font-size: 12px; }
.ca-settings-page .settings-profile-card .ca-profile-fields .form-control { height: 44px; min-height: 44px; padding: 0 13px; border-color: #dce3ee; border-radius: 11px; background: #fff; font-size: 13px; }
.ca-settings-page .settings-profile-card .ca-profile-fields .form-control:focus { border-color: #6a63f3; box-shadow: 0 0 0 3px rgba(106,99,243,.1); }
.ca-settings-page .settings-profile-card .ca-profile-fields .form-control[readonly] { color: #68738c; background: #f7f8fb; }
.ca-settings-page .settings-profile-card .ca-profile-fields small { font-size: var(--text-xs); }
.ca-settings-page .settings-profile-card .ca-profile-error { grid-column: 1 / -1; }
.ca-settings-page .settings-profile-card .ca-profile-footer { display: flex; grid-column: 1 / -1; justify-content: flex-end; margin-top: -4px; padding-top: 18px; border-top: 1px solid #edf0f5; }
.ca-settings-page .settings-profile-card .ca-profile-footer .btn { height: 42px; padding: 0 18px; border-radius: 10px; font-size: var(--text-sm); font-weight: 700; }

.ca-settings-page #caFamilyPermissions > .ca-settings-panel { gap: 14px; }
.ca-settings-page .ca-family-section-heading { margin-bottom: 0; }
.ca-settings-page .ca-family-section-heading > .btn { min-height: 42px; justify-self: end; border-radius: 10px; }
.ca-settings-page .settings-family-hero { min-height: 112px; padding: 22px 24px; border: 1px solid #e2e6f0; border-radius: 18px; background: linear-gradient(115deg,#fff 0%,#f5f4ff 65%,#fff7f1 100%); }
.ca-settings-page .settings-family-hero > div { flex: 1 1 auto; }
.ca-settings-page .settings-family-hero .ca-family-heading-icon { width: 54px; height: 54px; border-radius: 15px; }
.ca-settings-page .settings-family-hero h2 { font-size: 23px; font-weight: 700; }
.ca-settings-page .settings-family-hero p { color: #74809a; font-size: var(--text-sm); }
.ca-settings-page .settings-family-hero > .btn { flex: 0 0 auto; }
.ca-settings-page .ca-family-information { border-radius: 16px; }
.ca-settings-page .ca-family-information > header { min-height: 58px; padding: 14px 20px; }
.ca-settings-page .ca-family-information h3 { font-size: 16px; }
.ca-settings-page .ca-family-details > div { min-height: 80px; padding: 18px 20px; }
.ca-settings-page .ca-family-details small { margin-bottom: 6px; color: #8a94aa; font-size: 11px; }
.ca-settings-page .ca-family-details strong { margin: 0; color: #17213d; font-size: 14px; font-weight: 700; }
.ca-settings-page .ca-family-summary { gap: 14px; }
.ca-settings-page .ca-family-summary article { min-height: 86px; padding: 16px 18px; border-radius: 15px; }
.ca-settings-page .ca-family-summary article > span { width: 42px; height: 42px; }
.ca-settings-page .ca-family-summary small { color: #8791a7; font-size: var(--text-xs); }
.ca-settings-page .ca-family-summary strong { font-size: 17px; }
.ca-settings-page .ca-family-access-card,.ca-settings-page .ca-family-invites-card { border-radius: 16px; }
.ca-settings-page .ca-family-access-card > header,.ca-settings-page .ca-family-invites-card > header { padding: 16px 18px; }
.ca-settings-page .ca-family-members-table th,.ca-settings-page .ca-family-invites-table th { height: 42px; padding: 0 18px; color: #7d879e; font-size: 11px; }
.ca-settings-page .ca-family-members-table td,.ca-settings-page .ca-family-invites-table td { min-height: 62px; padding: 10px 18px; }
.ca-settings-page .ca-family-members-table td:first-child { font-size: var(--text-lg); font-weight: 700; }
.ca-settings-page .ca-family-members-table td:nth-child(2) { color: #6f7a92; font-size: 11.5px; }
.ca-settings-page .ca-member-avatar { width: 38px; height: 38px; }
.ca-settings-page .ca-family-members-table em { padding: 5px 9px; }
.ca-settings-page .ca-member-readonly { color: #8e98ac; font-size: var(--text-xs); font-weight: 600; white-space: nowrap; }
.ca-settings-page .ca-family-invites-empty { min-height: 150px; padding: 20px; }
.ca-settings-page .ca-family-invites-empty > span { width: 42px; height: 42px; }

.ca-settings-page .ca-app-update-row { min-height: 76px; border-radius: 15px; }
.ca-settings-page .ca-app-update-row .card-body { padding: 16px 18px; }
.ca-settings-page .ca-app-update-row strong { font-size: 14px; font-weight: 700; }
.ca-settings-page .ca-app-update-row span { font-size: var(--text-xs); }
.ca-settings-page .ca-app-update-row .btn { height: 40px; border-radius: 10px; font-size: 12px; }
.ca-settings-page #caPushSettingsCard { border-radius: 15px; }
.ca-settings-page #caPushSettingsCard .card-header { min-height: 74px; padding: 18px 20px; }
.ca-settings-page #caPushSettingsCard .card-title > span:last-child { font-size: 16px !important; }
.ca-settings-page #caPushSettingsCard .card-body { padding: 0 20px 18px; }
.ca-settings-page .ca-notification-type-row { min-height: 62px; grid-template-columns: 42px minmax(0,1fr) auto; gap: 12px; padding: 10px 0; }
.ca-settings-page .ca-notification-type-row strong { font-size: 13px; font-weight: 700; }
.ca-settings-page .ca-notification-type-row span { color: #77829a; font-size: var(--text-xs); }
.ca-settings-page .ca-notification-type-row .badge,.ca-settings-page .ca-notification-channel-name,.ca-settings-page .ca-notification-always-on { font-size: var(--text-xs); }

@media (max-width: 991.98px) {
  .ca-settings-page .ca-family-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }.ca-settings-page .ca-family-summary article:last-child { grid-column: 1 / -1; }
}
@media (max-width: 767.98px) {
  .ca-settings-page-body #kt_app_content_container { padding: 18px 16px 32px; }
  .ca-settings-page.settings-page > .d-flex:first-child h1 { font-size: 27px; }
  .ca-settings-page .ca-settings-section-heading { grid-template-columns: 42px minmax(0,1fr); }.ca-settings-page .ca-settings-section-heading > .btn { grid-column: 1 / -1; width: 100%; }
  .ca-settings-page .settings-profile-card { grid-template-columns: 1fr; padding: 20px; }.ca-settings-page .settings-profile-card .ca-account-status { position: static; justify-self: end; }.ca-settings-page .settings-profile-card .ca-profile-avatar-column { width: 100%; padding: 0 0 16px; }.ca-settings-page .settings-profile-card .ca-profile-fields { padding-top: 0; }.ca-settings-page .settings-profile-card .ca-profile-footer .btn { width: 100%; }
  .ca-settings-page .settings-family-hero { align-items: flex-start; flex-direction: column; padding: 20px; }.ca-settings-page .settings-family-hero > div { flex-wrap: wrap; }.ca-settings-page .settings-family-hero .ca-family-status { margin-left: 67px; }.ca-settings-page .settings-family-hero > .btn { width: 100%; }
  .ca-settings-page .ca-family-details,.ca-settings-page .ca-family-summary { grid-template-columns: 1fr; }.ca-settings-page .ca-family-summary article:last-child { grid-column: auto; }
  .ca-settings-page .ca-app-update-row .btn { width: 100%; }
  .ca-settings-page .ca-notification-type-row { grid-template-columns: 42px minmax(0,1fr); }.ca-settings-page .ca-notification-channel-actions { grid-column: 1 / -1; }
}

.ca-readonly-time {
  min-width: 92px;
  min-height: 44px;
  border: 1px solid #dfe5f0;
  border-radius: 10px;
  background: #f8faff;
  color: #17213f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  letter-spacing: 0;
}

.ca-dashboard-day-wrap {
  padding-top: 4px;
  padding-bottom: 10px;
}

/* Dashboard visual refresh: scoped to the home dashboard only. */
body[data-dashboard-hero] { --ca-primary: #356df3; --ca-primary-soft: #eaf2ff; --ca-text: #14213d; background: #f7f9fd; }
@media (min-width: 992px) {
  body[data-dashboard-hero] .ca-sidebar-logo .ca-logo-mark { width: 44px; height: 44px; }
  body[data-dashboard-hero] .ca-sidebar-brand { font-size: 18px !important; font-weight: 600 !important; }
  body[data-dashboard-hero] .ca-menu .menu-link { min-height: 54px; padding: 9px 12px; border-radius: 14px; font-family: var(--family-font-body); font-weight: 500; }
  body[data-dashboard-hero] .ca-menu .menu-link .menu-icon { width: 38px; height: 38px; margin-right: 10px; }
  body[data-dashboard-hero] .ca-menu .menu-link .menu-icon i { font-size: 21px !important; }
}
body[data-dashboard-hero] .ca-dashboard-card {
  overflow: hidden;
  border: 1px solid rgba(118,137,179,.14) !important;
  border-radius: 22px !important;
  background: rgba(255,255,255,.94);
  box-shadow: 0 14px 36px rgba(42,67,120,.085);
}
body[data-dashboard-hero] .ca-dashboard-card .card-header { min-height: 80px; padding-right: 26px; padding-left: 26px; }
body[data-dashboard-hero] .ca-dashboard-card .card-body { padding-bottom: 26px; }
body[data-dashboard-hero] .ca-dashboard-section-title { gap: 14px; color: #14213d; }
body[data-dashboard-hero] .ca-dashboard-section-title .fw-bold { font-family: var(--family-font-heading); font-size: 19px !important; }
body[data-dashboard-hero] .ca-dashboard-section-icon { display: grid; width: 40px; height: 40px; flex: 0 0 40px; place-items: center; border-radius: 12px; background: #eaf2ff; color: #356df3; }
body[data-dashboard-hero] .ca-dashboard-section-icon i { font-size: 21px !important; }
body[data-dashboard-hero] .ca-dashboard-section-icon svg { width: 21px; height: 21px; }
body[data-dashboard-hero] .ca-dashboard-card-link { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; padding: 0; color: #356df3; font-family: var(--family-font-body); font-size: 13px; font-weight: 500; line-height: 1; text-decoration: none; white-space: nowrap; cursor: pointer; }
body[data-dashboard-hero] .ca-dashboard-card-link i { display: inline-flex; align-items: center; justify-content: center; font-size: 12px; line-height: 1; }
body[data-dashboard-hero] .ca-dashboard-card-link:hover { color: #2359db; text-decoration: none; }
body[data-dashboard-hero] .ca-card-header-action { border: 0; border-radius: 999px !important; background: #eaf2ff; color: #356df3; font-family: var(--family-font-body); font-weight: 500; box-shadow: none; }
body[data-dashboard-hero] .ca-card-header-action:hover { background: #dce9ff; color: #2359db; box-shadow: 0 6px 16px rgba(53,109,243,.10); }
body[data-dashboard-hero] .ca-dashboard-today-card .card-body { display: flex; flex-direction: column; }
body[data-dashboard-hero] .ca-dashboard-today-card .ca-dashboard-day-wrap { flex: 1 1 auto; }
body[data-dashboard-hero] .ca-dashboard-section-title-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
body[data-dashboard-hero] .ca-dashboard-card-subtitle { color: #8b93a7; font-family: var(--family-font-body); font-size: 13px; font-weight: 400; }

body[data-dashboard-hero] .ca-dashboard-today-card .ca-empty-state { position: relative; min-height: 260px; display: flex; overflow: hidden; flex-direction: column; align-items: center; justify-content: center; margin: 0 24px 14px; padding: 34px 24px; border: 0; border-radius: 18px; background: radial-gradient(circle at 50% 48%, rgba(234,242,255,.92), rgba(255,255,255,0) 42%); }
body[data-dashboard-hero] .ca-dashboard-today-card .ca-empty-state::before, body[data-dashboard-hero] .ca-dashboard-today-card .ca-empty-state::after { content: ""; position: absolute; width: 8px; height: 8px; border-radius: 50%; background: #bfeee0; }
body[data-dashboard-hero] .ca-dashboard-today-card .ca-empty-state::before { top: 30%; left: 28%; }
body[data-dashboard-hero] .ca-dashboard-today-card .ca-empty-state::after { right: 27%; bottom: 29%; background: #ffd29f; }
body[data-dashboard-hero] .ca-dashboard-today-card .ca-empty-state .symbol { width: 72px !important; height: 72px !important; margin-bottom: 18px !important; }
body[data-dashboard-hero] .ca-dashboard-today-card .ca-empty-state .symbol-label { border-radius: 22px; background: linear-gradient(145deg, #eaf2ff, #eee9ff) !important; color: #356df3; box-shadow: 0 12px 30px rgba(53,109,243,.12); }
body[data-dashboard-hero] .ca-dashboard-today-card .ca-empty-state .fw-bold { color: #14213d !important; font-size: 17px; }
body[data-dashboard-hero] .ca-dashboard-today-card .ca-empty-state .text-gray-600 { color: #7b84a1 !important; font-size: 14px; }
body[data-dashboard-hero] .ca-dashboard-calendar-empty { min-height: 200px; padding: 4px 24px 22px; }
body[data-dashboard-hero] .ca-dashboard-empty-image { display: block; width: 140px; max-width: min(58%, 140px); height: auto; max-height: 92px; object-fit: contain; }
body[data-dashboard-hero] .ca-dashboard-calendar-empty > .fw-bold { margin-top: 3px !important; color: #14213d !important; font-family: var(--family-font-heading); font-size: 18px; font-weight: 600 !important; }
body[data-dashboard-hero] .ca-dashboard-calendar-empty > .text-gray-600 { color: #7b84a1 !important; font-family: var(--family-font-body); font-size: 14px; font-weight: 400; }
.ca-budget-category-card .ca-budget-stacked-bar { height: 10px; border: 0; background: #f1f4f9; box-shadow: none; }
.ca-budget-category-card .ca-budget-stacked-bar span { min-width: 0; }
.ca-budget-category-card .ca-budget-stacked-bar span + span { border-left: 1px solid #fff; }

/* Bilancio del mese - dashboard card v2 (card verticale compatta, 25% larghezza) */
body[data-dashboard-hero] .ca-dashboard-budget-card {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e8edf5;
  border-radius: 24px;
  box-shadow: none;
}
body[data-dashboard-hero] .ca-dashboard-budget-card .card-body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 22px; }
body[data-dashboard-hero] .ca-dashboard-budget-card .ca-budget-v2-title { font-family: var(--family-font-heading); font-size: 22px; font-weight: 700; color: #111B3A; }

body[data-dashboard-hero] .ca-budget-v2-status-pill { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 5px; padding: 5px 12px; border: 1px solid rgba(242, 67, 106, .16); border-radius: 999px; background: #FDEEF1; color: #F2436A; font-size: 11px; font-weight: 700; white-space: nowrap; }
body[data-dashboard-hero] .ca-budget-v2-status-pill svg { width: 13px; height: 13px; }
body[data-dashboard-hero] .ca-budget-v2-status-pill.is-positive { border-color: rgba(23, 198, 83, .16); background: #E7F8ED; color: #17A353; }
body[data-dashboard-hero] .ca-budget-v2-status-pill.is-neutral { border-color: rgba(132, 145, 173, .18); background: #EEF1F6; color: #6B7690; }

body[data-dashboard-hero] .ca-budget-v2-saldo-block { display: flex; flex-direction: column; }
body[data-dashboard-hero] .ca-budget-v2-saldo-label { display: flex; align-items: center; gap: 6px; color: #8491AD; font-family: var(--family-font-body); font-size: 13px; font-weight: 600; }
body[data-dashboard-hero] .ca-budget-v2-saldo-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #F2436A; }
body[data-dashboard-hero] .ca-budget-v2-saldo-value { margin-top: 8px; overflow: hidden; color: #F2436A; font-family: var(--family-font-heading); font-size: 42px; font-weight: 800; line-height: 1.05; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
body[data-dashboard-hero] .ca-budget-v2-saldo-value.is-positive { color: #17A353; }
body[data-dashboard-hero] .ca-budget-v2-saldo-value.is-neutral { color: #6B7690; }
body[data-dashboard-hero] .ca-budget-v2-saldo-note { margin: 8px 0 0; color: #8491AD; font-size: 13px; font-weight: 500; line-height: 1.4; }

body[data-dashboard-hero] .ca-budget-v2-flows-list { display: flex; flex-direction: column; }
body[data-dashboard-hero] .ca-budget-v2-flow-row { display: flex; align-items: center; gap: 12px; padding: 14px 2px; border-top: 1px solid #EEF1F7; color: inherit; text-decoration: none; transition: opacity .12s ease; }
body[data-dashboard-hero] .ca-budget-v2-flow-row:hover { opacity: .8; color: inherit; }
body[data-dashboard-hero] .ca-budget-v2-flow-icon { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border-radius: 50%; }
body[data-dashboard-hero] .ca-budget-v2-flow-icon svg { width: 17px; height: 17px; }
body[data-dashboard-hero] .ca-budget-v2-flow-row.is-income .ca-budget-v2-flow-icon { background: #E7F8ED; color: #17A353; }
body[data-dashboard-hero] .ca-budget-v2-flow-row.is-expense .ca-budget-v2-flow-icon { background: #FDEEF1; color: #F2436A; }
body[data-dashboard-hero] .ca-budget-v2-flow-copy { display: flex; min-width: 0; flex: 1 1 auto; flex-direction: column; gap: 2px; }
body[data-dashboard-hero] .ca-budget-v2-flow-label { color: #8491AD; font-family: var(--family-font-body); font-size: 12.5px; font-weight: 600; }
body[data-dashboard-hero] .ca-budget-v2-flow-value { overflow: hidden; color: #17213F; font-family: var(--family-font-heading); font-size: 17px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
body[data-dashboard-hero] .ca-budget-v2-flow-chevron { flex: 0 0 auto; color: #C3CBDC; }
body[data-dashboard-hero] .ca-budget-v2-flow-chevron svg { width: 16px; height: 16px; }

body[data-dashboard-hero] .ca-budget-v2-card-decor {
  position: absolute; right: 0; bottom: 0; left: 0;
  height: 64px;
  background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,.55) 45%, rgba(255,255,255,.2) 100%), url("images/budget-category-hero.png") center bottom / cover no-repeat;
  opacity: .3;
  pointer-events: none;
}

/* Spese per categoria - dashboard card v2 (75% larghezza): CTA header + donut macro + righe */
body[data-dashboard-hero] .ca-dashboard-categories-cta { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 7px; padding: 9px 16px; border: 1px solid #DCE1F7; border-radius: 12px; background: #FBFCFF; color: var(--ca-primary); font-family: var(--family-font-body); font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; transition: background-color .12s ease, border-color .12s ease; }
body[data-dashboard-hero] .ca-dashboard-categories-cta svg { width: 15px; height: 15px; }
body[data-dashboard-hero] .ca-dashboard-categories-cta:hover { border-color: #c3cdf7; background: #F1F4FF; color: var(--ca-primary); }

body[data-dashboard-hero] .ca-home-donut-macro { width: 200px; height: 200px; }
@media (min-width: 768px) { body[data-dashboard-hero] .ca-home-donut-macro { width: 240px; height: 240px; } }
@media (min-width: 1400px) { body[data-dashboard-hero] .ca-home-donut-macro { width: 260px; height: 260px; } }
body[data-dashboard-hero] .ca-home-donut-macro .ca-home-donut-center span { font-size: 10px; }
body[data-dashboard-hero] .ca-home-donut-macro .ca-home-donut-center strong { font-size: 22px; }
body[data-dashboard-hero] .ca-home-donut-macro .ca-home-donut-center small { max-width: 130px; font-size: 11px; }

body[data-dashboard-hero] .ca-dashboard-categories-card .ca-dashboard-categories-layout { grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 768px) {
  body[data-dashboard-hero] .ca-dashboard-categories-card .ca-dashboard-categories-layout { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 40px; }
}

body[data-dashboard-hero] .ca-dashboard-macro-rows { display: flex; flex-direction: column; gap: 20px; }
body[data-dashboard-hero] .ca-dashboard-macro-row { min-height: 78px; }
body[data-dashboard-hero] .ca-dashboard-macro-row-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
body[data-dashboard-hero] .ca-dashboard-macro-icon { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border-radius: 12px; }
body[data-dashboard-hero] .ca-dashboard-macro-icon svg { width: 18px; height: 18px; }
body[data-dashboard-hero] .ca-dashboard-macro-name { flex: 1 1 90px; min-width: 70px; overflow: hidden; color: #17213F; font-family: var(--family-font-heading); font-size: 16px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
body[data-dashboard-hero] .ca-dashboard-macro-stats { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; margin-left: auto; }
body[data-dashboard-hero] .ca-dashboard-macro-amount { flex: 0 0 auto; color: #17213F; font-family: var(--family-font-heading); font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
body[data-dashboard-hero] .ca-dashboard-macro-target-pill { flex: 0 0 auto; display: inline-flex; align-items: center; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
body[data-dashboard-hero] .ca-dashboard-macro-target-pill.is-positive { background: #E7F8ED; color: #17A353; }
body[data-dashboard-hero] .ca-dashboard-macro-target-pill.is-warning { background: #FDEEF1; color: #F2436A; }
body[data-dashboard-hero] .ca-dashboard-macro-target-pill.is-neutral { background: #EEF1F6; color: #6B7690; }
body[data-dashboard-hero] .ca-dashboard-macro-bar-track { display: block; margin-top: 10px; height: 9px; border-radius: 999px; background: #E9EDF5; overflow: hidden; }
body[data-dashboard-hero] .ca-dashboard-macro-bar-fill { display: block; height: 100%; border-radius: inherit; }
body[data-dashboard-hero] .ca-dashboard-macro-desc { margin: 8px 0 0 50px; overflow: hidden; color: #8491AD; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }

body[data-dashboard-hero] .ca-dashboard-unclassified-note { display: flex; align-items: center; gap: 7px; margin: 22px 0 0; color: #8994A8; font-size: 12.5px; font-weight: 600; }
body[data-dashboard-hero] .ca-dashboard-unclassified-note svg { width: 14px; height: 14px; flex: 0 0 auto; }

body[data-dashboard-hero] .ca-dashboard-top-category-band {
  display: flex; align-items: center; gap: 16px;
  margin-top: 24px; padding: 18px 20px;
  border-top: 1px solid #EEF1F7;
  color: inherit; text-decoration: none;
}
body[data-dashboard-hero] .ca-dashboard-top-category-band:hover { color: inherit; }
body[data-dashboard-hero] .ca-dashboard-top-category-icon { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border-radius: 12px; background: var(--ca-primary-soft); color: var(--ca-primary); }
body[data-dashboard-hero] .ca-dashboard-top-category-icon svg { width: 17px; height: 17px; }
body[data-dashboard-hero] .ca-dashboard-top-category-copy { display: flex; min-width: 0; flex: 1 1 auto; flex-direction: column; gap: 1px; }
body[data-dashboard-hero] .ca-dashboard-top-category-copy small { color: #8491AD; font-size: 11px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; }
body[data-dashboard-hero] .ca-dashboard-top-category-copy strong { overflow: hidden; color: #17213F; font-family: var(--family-font-heading); font-size: 15px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
body[data-dashboard-hero] .ca-dashboard-top-category-desc { overflow: hidden; color: #8491AD; font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
body[data-dashboard-hero] .ca-dashboard-top-category-stat { display: flex; flex: 0 0 auto; flex-direction: column; align-items: flex-end; gap: 1px; text-align: right; }
body[data-dashboard-hero] .ca-dashboard-top-category-stat strong { color: var(--ca-primary); font-family: var(--family-font-heading); font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
body[data-dashboard-hero] .ca-dashboard-top-category-stat small { color: #8491AD; font-size: 11px; font-weight: 600; }
body[data-dashboard-hero] .ca-dashboard-top-category-cat-icon { display: none; flex: 0 0 auto; width: 36px; height: 36px; }
@media (min-width: 576px) { body[data-dashboard-hero] .ca-dashboard-top-category-cat-icon { display: grid; } }
body[data-dashboard-hero] .ca-dashboard-top-category-chevron { flex: 0 0 auto; color: #C3CBDC; }
body[data-dashboard-hero] .ca-dashboard-top-category-chevron svg { width: 16px; height: 16px; }

body[data-dashboard-hero] .ca-dashboard-categories-card .card-header { gap: 12px; }
body[data-dashboard-hero] .ca-dashboard-categories-card .ca-dashboard-section-title { min-width: 0; gap: 10px; }
body[data-dashboard-hero] .ca-dashboard-categories-card .ca-dashboard-section-title .fw-bold { font-size: 22px !important; font-weight: 700 !important; color: #111B3A; }

/* Sotto una certa larghezza la descrizione macro/top-categoria si nasconde
   prima di comprimere i dati principali (sezione 14/19 dei requisiti). */
@media (max-width: 575.98px) {
  body[data-dashboard-hero] .ca-dashboard-macro-desc { display: none; }
  body[data-dashboard-hero] .ca-dashboard-top-category-band { gap: 10px; padding: 16px 4px; }
  body[data-dashboard-hero] .ca-dashboard-top-category-desc { display: none; }
  body[data-dashboard-hero] .ca-dashboard-top-category-stat strong { font-size: 17px; }
}

body[data-dashboard-hero] .ca-budget-v2-footer { margin-top: 6px; padding: 14px 24px 20px; text-align: right; }
body[data-dashboard-hero] .ca-budget-v2-cta { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border-radius: 999px; background: linear-gradient(135deg, #6C63FF, #5146F5); color: #fff; font-size: var(--text-sm); font-weight: 700; box-shadow: 0 8px 20px rgba(81, 70, 245, .25); }
body[data-dashboard-hero] .ca-budget-v2-cta:hover { filter: brightness(1.05); color: #fff; }
body[data-dashboard-hero] .ca-budget-v2-cta i { font-size: 13px; }

body[data-dashboard-hero] .ca-dashboard-activity-list { display: flex; flex-direction: column; gap: 4px; }
body[data-dashboard-hero] .ca-dashboard-activity-row { display: flex; min-height: 70px; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid #f0f2f7; }
body[data-dashboard-hero] .ca-dashboard-activity-row:last-child { border-bottom: 0; padding-bottom: 0; }
body[data-dashboard-hero] .ca-dashboard-activity-row-extra { display: none; }
body[data-dashboard-hero] .ca-dashboard-activity-card.is-expanded .ca-dashboard-activity-row-extra { display: flex; }
body[data-dashboard-hero] .ca-dashboard-activity-card:not(.is-expanded) .ca-dashboard-activity-row:nth-child(7) { border-bottom: 0; padding-bottom: 0; }
body[data-dashboard-hero] .ca-dashboard-activity-row .ca-avatar { flex: 0 0 auto; }
body[data-dashboard-hero] .ca-dashboard-activity-copy { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; gap: 3px; }
body[data-dashboard-hero] .ca-dashboard-activity-copy > span { overflow: hidden; color: #344054; font-size: 13px; font-weight: 400; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
body[data-dashboard-hero] .ca-dashboard-activity-copy > span strong { color: #14213d; font-weight: 600; }
body[data-dashboard-hero] .ca-dashboard-activity-copy > small { color: #8b93a7; font-size: var(--text-xs); font-weight: 500; }
body[data-dashboard-hero] .ca-dashboard-activity-icon { display: grid; flex: 0 0 28px; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: #eef1f7; color: #6f7893; }
body[data-dashboard-hero] .ca-dashboard-activity-icon svg { width: 14px; height: 14px; }
body[data-dashboard-hero] .ca-dashboard-activity-icon.is-success { background: #ddf8e7; color: #1f9f58; }
body[data-dashboard-hero] .ca-dashboard-activity-icon.is-expense { background: #fdeaf0; color: #d63d68; }
body[data-dashboard-hero] .ca-dashboard-activity-icon.is-event { background: #e5f0ff; color: #2467e8; }
body[data-dashboard-hero] .ca-dashboard-activity-icon.is-task { background: #fff0e4; color: #d96b25; }
body[data-dashboard-hero] .ca-dashboard-notifications .ca-dashboard-activity-row,
body[data-dashboard-hero] .ca-dashboard-notifications-layer .ca-dashboard-activity-row { min-height: 64px; padding: 11px 10px; border: 1px solid transparent; border-radius: 12px; background: #fff; }
body[data-dashboard-hero] .ca-dashboard-notifications .ca-dashboard-activity-row:last-child,
body[data-dashboard-hero] .ca-dashboard-notifications-layer .ca-dashboard-activity-row:last-child { padding-bottom: 11px; border-bottom: 1px solid transparent; }
body[data-dashboard-hero] .ca-dashboard-notifications .ca-dashboard-activity-row.is-unread,
body[data-dashboard-hero] .ca-dashboard-notifications-layer .ca-dashboard-activity-row.is-unread { border-color: #e6ecff; background: #f3f6ff; }
body[data-dashboard-hero] .ca-dashboard-notifications-layer .ca-dashboard-activity-row { min-height: 68px; padding: 12px; }
body[data-dashboard-hero] .ca-dashboard-notifications-layer .ca-dashboard-activity-row:last-child { padding-bottom: 12px; }

body[data-dashboard-hero] .ca-dashboard-tasks-card .card-body { display: flex; flex-direction: column; gap: 18px; }
body[data-dashboard-hero] .ca-dashboard-todo-stats { display: flex; gap: 12px; }
body[data-dashboard-hero] .ca-dashboard-todo-stat { flex: 1 1 0; min-width: 0; padding: 14px 16px; border-radius: 14px; background: #f6f8fc; text-align: left; }
body[data-dashboard-hero] .ca-dashboard-todo-stat strong { display: block; color: #14213d; font-family: var(--family-font-body); font-size: 22px; font-weight: 700; line-height: 1.1; }
body[data-dashboard-hero] .ca-dashboard-todo-stat span { display: block; margin-top: 4px; color: #7e879f; font-family: var(--family-font-body); font-size: 12px; font-weight: 600; }
body[data-dashboard-hero] .ca-dashboard-todo-cta { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; border-radius: 12px; font-size: 14px; font-weight: 600; }

body[data-dashboard-hero] .ca-dashboard-week-card .card-body { padding-top: 4px; }
body[data-dashboard-hero] .ca-dashboard-week-grid { overflow: hidden; }
body[data-dashboard-hero] .ca-dashboard-week-grid .ca-week-day { min-width: 0; min-height: 174px; padding: 13px 10px 17px; border-right-color: #edf1f7; }
body[data-dashboard-hero] .ca-dashboard-week-grid .ca-week-day:last-child { border-right: 0; }
body[data-dashboard-hero] .ca-dashboard-week-grid .ca-week-day > div:first-child { color: #5f6988 !important; font-size: 11px !important; font-weight: 600 !important; letter-spacing: .04em; }
body[data-dashboard-hero] .ca-dashboard-week-grid .ca-week-day > div:nth-child(2) { color: #14213d !important; font-size: 19px; }
body[data-dashboard-hero] .ca-dashboard-week-card .ca-chip,
body[data-dashboard-hero] .ca-dashboard-week-card .ca-event-chip,
body[data-dashboard-hero] .ca-dashboard-week-card .ca-week-list-empty,
body[data-dashboard-hero] .ca-dashboard-week-card .ca-day-event,
body[data-dashboard-hero] .ca-dashboard-week-card .ca-week-day > .text-gray-500 { font-family: var(--family-font-body); }
body[data-dashboard-hero] .ca-dashboard-week-grid .ca-dashboard-week-event {
  width: calc(100% - 20px);
  min-height: 52px;
  margin: 12px auto 0;
  padding: 10px 12px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 2px;
  border: 1px solid rgba(255,255,255,.74);
  border-radius: 11px;
  font-family: var(--family-font-body);
  text-align: left;
}
/* Stessa larghezza/margine delle altre card della cella: .ca-match-reminder-
   chip non ha la classe .ca-dashboard-week-event quindi non riceveva
   questo width/margin, restando piu' larga delle card accanto. */
body[data-dashboard-hero] .ca-dashboard-week-grid .ca-match-reminder-chip {
  width: calc(100% - 20px);
  margin: 12px auto 0;
  box-sizing: border-box;
}
body[data-dashboard-hero] .ca-dashboard-week-event-title { display: flex; min-width: 0; align-items: flex-start; gap: 5px; font-size: var(--text-md); font-weight: 600; line-height: 1.35; }
body[data-dashboard-hero] .ca-dashboard-week-event-title > i { width: 4px; height: 4px; flex: 0 0 4px; margin-top: .48em; border-radius: 50%; background: currentColor; }
body[data-dashboard-hero] .ca-dashboard-week-event-title > span { min-width: 0; font-weight: 600; }
body[data-dashboard-hero] .ca-dashboard-week-event-person { margin-left: 9px; font-size: var(--text-xs); font-weight: 500; line-height: 1.3; opacity: .85; }
body[data-dashboard-hero] .ca-dashboard-week-event-recurrence { margin-left: 9px; font-size: 11px; font-weight: 400; opacity: .78; }
body[data-dashboard-hero] .ca-dashboard-week-event.is-single-line { width: auto; min-width: 100px; max-width: 75%; min-height: 30px; align-items: center; padding: 6px 16px; border-radius: 999px; text-align: center; }
body[data-dashboard-hero] .ca-dashboard-week-event.is-single-line .ca-dashboard-week-event-title { justify-content: center; font-size: 11px; font-weight: 500; }
body[data-dashboard-hero] .ca-dashboard-week-event.is-single-line .ca-dashboard-week-event-title > i { display: none; }
body[data-dashboard-hero] .ca-dashboard-week-event.bg-light-primary { background: #e5f0ff !important; color: #2467e8 !important; }
body[data-dashboard-hero] .ca-dashboard-week-event.bg-light-success { background: #ddf8e7 !important; color: #1f9f58 !important; }
body[data-dashboard-hero] .ca-dashboard-week-event.bg-light-info { background: #ddf7f7 !important; color: #188c9b !important; }
body[data-dashboard-hero] .ca-dashboard-week-event.bg-light-warning { background: #fff0e4 !important; color: #d96b25 !important; }
body[data-dashboard-hero] .ca-dashboard-week-event.bg-light-danger { background: #f0e5ff !important; color: #8b32d9 !important; }
body[data-dashboard-hero] .ca-dashboard-week-free { display: flex !important; width: max-content; min-width: 100px; max-width: 75%; min-height: 31px; align-items: center; justify-content: center; margin: 12px auto 0 !important; padding: 6px 16px; border-radius: 999px; background: #eee9ff; color: #7564c2 !important; font-size: 11px !important; font-weight: 500 !important; line-height: 1; }
body[data-dashboard-hero] .ca-dashboard-week-grid .ca-week-day > .text-gray-500,
body[data-dashboard-hero] .ca-dashboard-week-list .ca-week-list-empty { font-weight: 400; }
body[data-dashboard-hero] .ca-dashboard-week-list .ca-day-event .fw-bold { font-weight: 600 !important; }
body[data-dashboard-hero] .ca-dashboard-week-list .ca-day-event .text-gray-600 { font-weight: 400; }

/* Assistente finanziario */
.ca-ai-page { max-width: 1180px; margin: 0 auto; }
.ca-ai-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 24px; }
.ca-ai-hero h1 { margin: 9px 0 7px; color: #17213f; font-size: clamp(27px, 3vw, 40px); letter-spacing: -.035em; }
.ca-ai-hero p { margin: 0; color: #7e879f; font-size: 15px; }
.ca-ai-kicker { display: inline-flex; align-items: center; gap: 8px; color: #6157f5; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.ca-ai-kicker i { font-size: 18px; }
.ca-ai-month { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid #e9ebf2; border-radius: 16px; background: #fff; box-shadow: 0 8px 26px rgba(30, 37, 71, .06); }
.ca-ai-month-label { position: relative; min-width: 190px; margin: 0; text-align: center; cursor: pointer; }
.ca-ai-month-label span { display: block; color: #99a1b7; font-size: var(--text-xs); font-weight: var(--font-semibold); text-transform: uppercase; letter-spacing: .06em; }
.ca-ai-month-label strong { color: #17213f; font-size: var(--text-lg); }
.ca-ai-month-label input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.ca-ai-tabs { display: inline-flex; gap: 5px; margin-bottom: 17px; padding: 5px; border-radius: 13px; background: #edeff5; }
.ca-ai-tabs button { display: flex; align-items: center; gap: 8px; min-width: 120px; justify-content: center; padding: 10px 18px; border: 0; border-radius: 9px; background: transparent; color: #7e879f; font-size: var(--text-md); font-weight: var(--font-medium); }
.ca-ai-tabs button.active { background: #fff; color: #4f46ff; font-weight: var(--font-semibold); box-shadow: 0 3px 10px rgba(30, 37, 71, .08); }
.ca-ai-card { overflow: hidden; border: 1px solid #e9ebf2 !important; }
.ca-ai-card > .card-body { min-height: 480px; padding: clamp(22px, 4vw, 42px); }
.ca-ai-card > .card-footer { padding: 19px clamp(22px, 4vw, 42px); border-color: #edf0f5; }
.ca-ai-loading, .ca-ai-empty { min-height: 385px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; color: #7e879f; }
.ca-ai-loading strong, .ca-ai-empty h3 { margin: 0; color: #17213f; font-size: var(--title-sm); }
.ca-ai-empty > i { display: grid; width: 62px; height: 62px; place-items: center; border-radius: 20px; background: #efefff; color: #6157f5; font-size: 28px; }
.ca-ai-empty p { max-width: 440px; margin: 0 0 5px; }
.ca-ai-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 28px; }
.ca-ai-metrics > div { position: relative; padding: 18px; border-radius: 14px; background: #f6f7fa; }
.ca-ai-metrics span { display: block; color: #7e879f; font-size: var(--text-xs); font-weight: var(--font-semibold); }
.ca-ai-metrics strong { display: block; margin-top: 5px; color: #17213f; font-size: 20px; }
.ca-ai-metrics i { position: absolute; top: 17px; right: 15px; color: #a1a9bd; }
.ca-ai-highlights { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ca-ai-highlights article { display: flex; gap: 14px; padding: 19px; border: 1px solid #e9ebf2; border-radius: 14px; }
.ca-ai-highlight-icon { display: grid; flex: 0 0 38px; width: 38px; height: 38px; place-items: center; border-radius: 11px; background: #eef0ff; color: #6157f5; }
.ca-ai-highlights .is-warning .ca-ai-highlight-icon { background: #fff4dd; color: #f6a609; }
.ca-ai-highlights .is-positive .ca-ai-highlight-icon { background: #e4faec; color: #37b26c; }
.ca-ai-highlights h3 { margin: 0 0 5px; color: #17213f; font-family: var(--family-font-body); font-size: var(--text-lg); font-weight: var(--font-semibold); }
.ca-ai-highlights p { margin: 0; color: #7e879f; font-size: 12px; line-height: 1.55; }
.ca-ai-suggestions { margin-top: 25px; padding: 21px; border-radius: 14px; background: linear-gradient(135deg, #f0efff, #f8f7ff); }
.ca-ai-suggestions h3 { margin: 0 0 11px; color: #17213f; font-size: var(--text-xl); }
.ca-ai-suggestions ul { margin: 0; padding-left: 19px; color: #5d6680; }
.ca-ai-suggestions li + li { margin-top: 7px; }
.ca-ai-disclaimer { display: flex; align-items: center; gap: 8px; margin: 22px 0 0; color: #99a1b7; font-size: 11px; }
.ca-ai-usage { max-width: 520px; margin-left: auto; }
.ca-ai-chat { display: flex; min-height: 410px; flex-direction: column; }
.ca-ai-chat-scroll { flex: 1; max-height: 520px; overflow-y: auto; padding: 2px 3px 24px; }
.ca-ai-chat-welcome { display: flex; min-height: 305px; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ca-ai-chat-welcome > span { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 18px; background: #efefff; color: #6157f5; font-size: 25px; }
.ca-ai-chat-welcome h2 { margin: 17px 0 7px; color: #17213f; font-size: 20px; }
.ca-ai-chat-welcome p { max-width: 500px; color: #7e879f; }
.ca-ai-chat-welcome > div { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ca-ai-message { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 15px; }
.ca-ai-message > span { display: grid; flex: 0 0 35px; width: 35px; height: 35px; place-items: center; border-radius: 10px; background: #efefff; color: #6157f5; font-size: 11px; font-weight: 800; }
.ca-ai-message > div { max-width: 78%; padding: 13px 16px; border-radius: 4px 15px 15px; background: #f4f5f8; color: #3f4862; font-size: var(--text-md); font-weight: var(--font-regular); line-height: var(--leading-normal); white-space: pre-wrap; }
.ca-ai-message.is-user { flex-direction: row-reverse; }
.ca-ai-message.is-user > span { background: #6157f5; color: #fff; }
.ca-ai-message.is-user > div { border-radius: 15px 4px 15px 15px; background: #6157f5; color: #fff; }
.ca-ai-message dl { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.ca-ai-message dl div { min-width: 120px; padding: 8px 10px; border-radius: 8px; background: #fff; }
.ca-ai-message dt { color: #99a1b7; font-size: var(--text-xs); }.ca-ai-message dd { margin: 2px 0 0; font-weight: 700; }
.ca-ai-chat-form { display: flex; align-items: flex-end; gap: 10px; padding-top: 17px; border-top: 1px solid #edf0f5; }
.ca-ai-chat-form textarea { min-height: 52px; max-height: 120px; resize: vertical; }
.ca-ai-insight-toast { width: min(410px, calc(100vw - 30px)); }

.ca-budget-mobile-cta { display: none; }

.ca-budget-category-metrics { display: flex; align-items: center; gap: 20px; }
.ca-budget-category-metrics span { color: #7e879f; font-size: 11px; font-weight: 700; }
.ca-budget-category-metrics strong { display: block; margin-top: 2px; color: #17213f; font-size: 15px; white-space: nowrap; }
.ca-budget-stacked-bar { display: flex; width: 100%; height: 14px; overflow: hidden; border: 3px solid #f1f4f9; border-radius: 999px; background: #f1f4f9; box-shadow: inset 0 1px 2px rgba(15,23,42,.05); }
.ca-budget-stacked-bar span { display: block; min-width: 2px; height: 100%; }
.ca-budget-stacked-bar span + span { border-left: 2px solid #fff; }

.ca-donut-track { stroke: #f1f4f9; stroke-width: 8; }
.ca-donut-segment { stroke-width: 8; stroke-linecap: round; transition: opacity .2s ease; }

.ca-toast-root {
  position: fixed;
  right: 22px;
  top: 96px;
  z-index: 1090;
  width: min(390px, calc(100vw - 32px));
  display: grid;
  gap: 12px;
  pointer-events: none;
}

.ca-toast {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 30px;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--ca-border);
  border-left: 4px solid var(--ca-primary);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(15,23,42,.16);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: auto;
}

.ca-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.ca-toast-success { border-left-color: #17c653; }
.ca-toast-danger { border-left-color: #d9214e; }
.ca-toast-warning { border-left-color: #f6c000; }

.ca-toast-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ca-primary-soft);
  color: var(--ca-primary);
}

.ca-toast-success .ca-toast-icon { background: #e8fff3; color: #17c653; }
.ca-toast-danger .ca-toast-icon { background: #fff5f8; color: #d9214e; }
.ca-toast-warning .ca-toast-icon { background: #fff8dd; color: #c59a00; }

.ca-toast-title {
  display: block;
  color: #17213f;
  font-weight: 800;
  line-height: 1.25;
}

.ca-toast-message {
  display: block;
  margin-top: 2px;
  color: #66708c;
  font-size: 13px;
  line-height: 1.35;
}

.ca-toast-close {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #99a1b7;
}

.ca-toast-close:hover {
  background: #f4f7fb;
  color: #17213f;
}

.ca-confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1080;
  background: rgba(15,23,42,.42);
  display: none;
}

.ca-confirm-backdrop.is-open {
  display: block;
}

.ca-confirm-layer {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 1081;
  width: min(460px, calc(100vw - 32px));
  padding: 24px;
  border: 1px solid var(--ca-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(15,23,42,.22);
  display: none;
  transform: translate(-50%, -48%);
}

.ca-confirm-layer.is-open {
  display: block;
}

.ca-task-view-layer {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  overflow-y: auto;
}
.ca-task-view-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }

.ca-confirm-icon {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff5f8;
  color: #d9214e;
}
.ca-confirm-icon.is-primary {
  background: #eaf1ff;
  color: #356df3;
}

#caAddFundsLayer { padding: 28px; }
.ca-add-funds-modal-content { display: flex; flex-direction: column; align-items: stretch; }
#caAddFundsLayer .ca-confirm-icon { width: 56px; height: 56px; min-width: 56px; margin: 0 auto 14px; border-radius: 16px; background: #e7f6f1; color: #50a890; }
#caAddFundsLayer .ca-confirm-icon svg { width: 26px; height: 26px; }
.ca-add-funds-modal-copy { text-align: center; }
.ca-add-funds-modal-copy h2 { margin: 0; color: #17213f; font-family: var(--family-font-heading); font-size: var(--title-sm); font-weight: var(--font-bold); }
.ca-add-funds-modal-copy p { margin: 7px auto 22px; max-width: 330px; color: #6f7b96; font-size: var(--text-sm); font-weight: var(--font-medium); line-height: 1.5; }
.ca-add-funds-modal-field label { display: block; margin-bottom: 8px; color: #3d4566; font-size: var(--text-sm); font-weight: var(--font-semibold); }
.ca-add-funds-modal-field .form-control, .ca-add-funds-modal-field .input-group-text { min-height: 46px; }
.ca-add-funds-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.ca-add-funds-modal-actions .btn { min-width: 98px; }

@media (max-width: 575.98px) {
  #caAddFundsLayer { padding: 24px 20px; }
  .ca-add-funds-modal-actions { justify-content: stretch; }
  .ca-add-funds-modal-actions .btn { flex: 1 1 0; min-width: 0; }
}

.ca-coin-drop-overlay {
  position: fixed;
  inset: 0;
  z-index: 1090;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(255, 255, 255, .74);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.ca-coin-drop-overlay.is-visible { opacity: 1; }
.ca-coin-drop-stage { position: relative; width: 210px; height: 150px; }

.ca-coin-drop-piggy {
  position: absolute;
  z-index: 3;
  bottom: 0;
  left: 50%;
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border-radius: 50%;
  background: #fde3ef;
  color: #e0699b;
  box-shadow: 0 10px 24px rgba(224, 105, 155, .22);
  transform: translateX(-50%);
  transform-origin: 50% 100%;
}
.ca-coin-drop-piggy svg { width: 48px; height: 48px; }
.ca-coin-drop-overlay.is-visible .ca-coin-drop-piggy {
  animation:
    caPiggyMicroBounce .3s ease 1.05s,
    caPiggyMicroBounce .28s ease 1.17s,
    caPiggyMicroBounce .32s ease 1.3s,
    caPiggyMicroBounce .3s ease 1.34s,
    caPiggyMicroBounce .3s ease 1.63s;
}

.ca-coin-track {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  offset-anchor: center;
  offset-rotate: 0deg;
  opacity: 0;
  z-index: var(--z-front, 4);
  pointer-events: none;
}
.ca-coin-drop-overlay.is-visible .ca-coin-track {
  animation: caCoinTravel var(--duration, 1s) cubic-bezier(.4, .05, .35, 1) var(--delay, 0s) both;
}
.ca-coin-spin {
  display: block;
  transform-origin: 50% 50%;
  opacity: 0;
}
.ca-coin-drop-overlay.is-visible .ca-coin-spin {
  animation: caCoinSpin var(--spin-duration, 1s) linear var(--spin-delay, 0s) both;
}
.ca-coin-svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 2px 3px rgba(120, 80, 10, .28)); }

@keyframes caCoinTravel {
  0% { offset-distance: 0%; opacity: 0; }
  10% { opacity: var(--op, 1); }
  78% { offset-distance: 90%; opacity: var(--op, 1); z-index: var(--z-front, 4); }
  92% { z-index: 1; }
  100% { offset-distance: 100%; opacity: 0; z-index: 1; }
}
@keyframes caCoinSpin {
  0% { rotate: 0deg; scale: .55; opacity: 0; }
  12% { opacity: 1; }
  50% { scale: var(--peak, 1); }
  100% { rotate: var(--spin, 420deg); scale: calc(var(--peak, 1) * .84); opacity: 1; }
}
@keyframes caPiggyMicroBounce {
  0% { scale: 1 1; }
  35% { scale: 1.035 .965; }
  70% { scale: .985 1.015; }
  100% { scale: 1 1; }
}

.ca-coin-drop-message {
  color: #3d2f57;
  font-family: var(--family-font-heading);
  font-size: 15px;
  font-weight: 700;
  opacity: 0;
}
.ca-coin-drop-overlay.is-visible .ca-coin-drop-message { animation: caCoinFadeUp .6s ease 1.1s forwards; }
@keyframes caCoinFadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .ca-coin-drop-overlay.is-visible .ca-coin-track,
  .ca-coin-drop-overlay.is-visible .ca-coin-spin,
  .ca-coin-drop-overlay.is-visible .ca-coin-drop-piggy,
  .ca-coin-drop-overlay.is-visible .ca-coin-drop-message {
    animation: none !important;
    transition: opacity .3s ease !important;
  }
  .ca-coin-drop-overlay.is-visible .ca-coin-track { opacity: 0 !important; }
  .ca-coin-drop-overlay.is-visible .ca-coin-drop-message { opacity: 1 !important; }
}

.ca-budget-header-actions {
  justify-content: flex-end;
}

.ca-budget-month-control {
  display: grid;
  grid-template-columns: 44px minmax(170px, 1fr) 44px;
  align-items: center;
  gap: 8px;
}

.ca-budget-month-control .btn {
  background: #fff;
  border: 1px solid var(--ca-border);
  box-shadow: 0 8px 22px rgba(23,33,63,.05);
}

.ca-budget-month-control .btn:hover,
.ca-budget-month-control .btn:focus {
  background: #f8fbff;
  border-color: #dbe6f8;
  color: var(--ca-primary);
}

.ca-budget-month-control .form-control {
  min-height: 44px;
  font-weight: 700;
  color: #17213f;
  background: #fff;
}

.ca-budget-month-dropdown, .ca-budget-month-trigger { width: 100%; }
.ca-budget-month-trigger { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 14px; color: #17213f; font-weight: 700; }
.ca-budget-month-menu { width: 100%; min-width: 190px; max-height: 300px; overflow-y: auto; overflow-x: hidden; border: 1px solid #e1e6ef; border-radius: 13px; background: #fff; background-clip: padding-box; box-shadow: 0 18px 45px rgba(15,23,42,.14); scrollbar-width: thin; scrollbar-color: #c8cfda #fff; }
.ca-budget-month-menu[data-budget-portaled="true"] { z-index: 1050; margin: 0; }
.ca-budget-month-menu::-webkit-scrollbar { width: 7px; background: #fff; }
.ca-budget-month-menu::-webkit-scrollbar-track { background: #fff; border-radius: 0 12px 12px 0; }
.ca-budget-month-menu::-webkit-scrollbar-thumb { background: #c8cfda; border: 2px solid #fff; border-radius: 999px; }
.ca-budget-month-menu::-webkit-scrollbar-corner { background: #fff; }
.ca-budget-month-option { display: flex; align-items: center; justify-content: space-between; min-height: 38px; border-radius: 9px; color: #344054; font-weight: var(--font-semibold); }
.ca-budget-month-option.active, .ca-budget-month-option:active { background: var(--ca-primary-soft); color: var(--ca-primary); }

.ca-budget-stat .ca-stat-icon {
  flex: 0 0 68px;
}
.ca-budget-stat .ca-stat-icon svg { width: 25px; height: 25px; }
.ca-stat-label-mobile { display: none; }

/* Riepilogo bilancio: 4 card KPI compatte, coerenti tra loro */
.ca-budget-summary-grid-v2 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.ca-budget-summary-grid-v2 > .card { border-radius: 18px !important; border-color: #e7eaf0 !important; box-shadow: 0 6px 18px rgba(15,23,42,.035) !important; }

.ca-budget-kpi-card .card-body { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 165px; padding: 24px 28px; }
.ca-budget-kpi-content { min-width: 0; }
.ca-budget-kpi-label { overflow: hidden; color: #667085; font-size: var(--text-sm); font-weight: 600; letter-spacing: .03em; text-transform: uppercase; text-overflow: ellipsis; white-space: nowrap; }
.ca-budget-kpi-amount-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.ca-budget-kpi-amount { font-family: var(--family-font-heading); font-size: 29px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.ca-budget-kpi-badge { padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.ca-budget-kpi-badge.is-success { color: #1a9d55; background: #e1f5e8; }
.ca-budget-kpi-badge.is-danger { color: #c62b3a; background: #fbe3e6; }
.ca-budget-kpi-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 16px; margin-top: 8px; font-size: var(--text-sm); }
.ca-budget-kpi-foot-label { color: #98a2b8; }
.ca-budget-kpi-foot-value { font-weight: 700; }
.ca-budget-trend { display: inline-flex; align-items: center; gap: 3px; font-size: var(--text-sm); font-weight: 700; }
.ca-budget-trend svg { width: 12px; height: 12px; }
.ca-budget-trend.is-success { color: #1a9d55; }
.ca-budget-trend.is-danger { color: #d9214e; }
.ca-budget-trend.is-primary { color: #356df3; }
.ca-budget-kpi-icon { display: grid; flex: 0 0 56px; width: 56px; height: 56px; place-items: center; border-radius: 50%; }
.ca-budget-kpi-icon svg { width: 24px; height: 24px; }

.ca-budget-insights-bar .card-body { padding: 18px 22px; }
.ca-budget-insights-title { margin-bottom: 14px; color: #6b7690; font-size: 11px; font-weight: 700; letter-spacing: .05em; }
.ca-budget-insights-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ca-budget-insight-item { display: flex; align-items: flex-start; gap: 12px; padding-left: 20px; border-left: 1px solid #edf1f6; }
.ca-budget-insight-item:first-child { padding-left: 0; border-left: 0; }
.ca-budget-insight-icon { display: grid; flex: 0 0 40px; width: 40px; height: 40px; place-items: center; border-radius: 50%; }
.ca-budget-insight-icon svg { width: 18px; height: 18px; }
.ca-budget-insight-item strong { display: block; margin-bottom: 3px; color: #14213d; font-size: 13px; font-weight: 700; }
.ca-budget-insight-item .min-w-0 > span { display: block; color: #4a5375; font-size: 12px; line-height: 1.4; }

@media (max-width: 1199.98px) {
  .ca-budget-summary-grid-v2 { grid-template-columns: 1fr 1fr; }
  .ca-budget-insights-list { grid-template-columns: 1fr; gap: 12px; }
  .ca-budget-insight-item { padding-left: 0; border-left: 0; padding-top: 12px; border-top: 1px solid #edf1f6; }
  .ca-budget-insight-item:first-child { padding-top: 0; border-top: 0; }
}

@media (max-width: 575.98px) {
  .ca-budget-summary-grid-v2 { grid-template-columns: 1fr; }
  .ca-budget-kpi-card .card-body { min-height: 150px; padding: 20px 22px; }
  .ca-budget-kpi-amount { font-size: 26px; }
  .ca-budget-kpi-icon { flex-basis: 50px; width: 50px; height: 50px; }
}

@media (max-width: 767.98px) {
  .ca-budget-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-right: 0;
    margin-left: 0;
    padding: 8px;
    border: 1px solid var(--ca-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(42,67,120,.045);
  }
  .ca-budget-summary-grid > div { width: auto; min-width: 0; margin-top: 0; padding: 0; }
  .ca-budget-summary-grid .ca-budget-stat { min-width: 0; border-color: #edf1f6 !important; border-radius: 13px !important; box-shadow: 0 3px 12px rgba(42,67,120,.025); }
  .ca-budget-summary-grid .ca-budget-stat .card-body { display: grid !important; min-height: 88px; grid-template-columns: 42px minmax(0, 1fr); gap: 8px !important; padding: 10px; }
  .ca-budget-summary-grid .ca-stat-icon { width: 42px; height: 54px; min-width: 42px; flex-basis: 42px; border-radius: 12px; }
  .ca-budget-summary-grid .ca-stat-icon svg { width: 21px; height: 21px; }
  .ca-budget-summary-grid .fw-semibold { overflow: hidden; font-size: 9.5px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
  .ca-budget-summary-grid .fs-2 { max-width: 100%; margin-top: 2px; font-size: clamp(12px, 3.7vw, 15px) !important; letter-spacing: -.025em; line-height: 1.15; white-space: nowrap; }
  .ca-budget-summary-grid .fs-7 { margin-top: 3px; font-size: 9px !important; line-height: 1.25; }
  .ca-budget-summary-grid .ca-stat-label-desktop { display: none; }
  .ca-budget-summary-grid .ca-stat-label-mobile { display: inline; }
  .ca-budget-summary-grid .ca-budget-stat-hide-mobile-sub .ca-budget-stat-sub { display: none; }
}

@media (max-width: 359.98px) {
  .ca-budget-summary-grid { gap: 6px; padding: 6px; }
  .ca-budget-summary-grid .ca-budget-stat .card-body { min-height: 84px; grid-template-columns: 38px minmax(0, 1fr); gap: 7px !important; padding: 8px; }
  .ca-budget-summary-grid .ca-stat-icon { width: 38px; height: 50px; min-width: 38px; flex-basis: 38px; }
  .ca-budget-summary-grid .fs-2 { font-size: 14px !important; }
}

.ca-budget-chart-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.ca-budget-type-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: auto;
  padding: 4px;
  border: 1px solid #e1e6f0;
  border-radius: 999px;
  background: #f8fafc;
}

.ca-budget-type-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  height: 36px;
  margin: 0;
  padding: 0 16px;
  border-radius: 999px;
  color: #5e6884;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}

.ca-budget-type-pill i {
  color: currentColor;
}

#caBudgetTypeExpense:not(:checked) + .ca-budget-type-expense {
  background: #fff5f7;
  color: #b4234a;
}

#caBudgetTypeIncome:not(:checked) + .ca-budget-type-income {
  background: #effaf3;
  color: #157347;
}

#caBudgetTypeExpense:checked + .ca-budget-type-expense {
  background: #d9214e;
  color: #fff;
  box-shadow: 0 6px 14px rgba(217, 33, 78, .2);
}

#caBudgetTypeIncome:checked + .ca-budget-type-income {
  background: #17c653;
  color: #fff;
  box-shadow: 0 6px 14px rgba(23, 198, 83, .2);
}

#caBudgetTypeExpense:focus-visible + .ca-budget-type-expense,
#caBudgetTypeIncome:focus-visible + .ca-budget-type-income {
  box-shadow: 0 0 0 3px rgba(27, 132, 255, .18);
}

.ca-budget-chart {
  display: block;
  width: 100%;
  min-height: 260px;
}

.ca-budget-chart-grid {
  stroke: #edf1f7;
  stroke-width: 1;
}

.ca-budget-chart-label {
  fill: #7e879f;
  font-size: 12px;
  font-weight: 700;
}

.ca-budget-chart-line {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ca-budget-chart-area {
  stroke: none;
  pointer-events: none;
}

.ca-budget-chart-income-area {
  fill: url(#caBudgetIncomeFill);
}

.ca-budget-chart-expense-area {
  fill: url(#caBudgetExpenseFill);
}

.ca-budget-chart-income {
  stroke: #4fcb83;
}

.ca-budget-chart-expense {
  stroke: #f06a86;
}

.ca-budget-chart-point { stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }
.ca-budget-chart-income-point { fill: #4fcb83; }
.ca-budget-chart-expense-point { fill: #f06a86; }
.ca-budget-chart-hover-line { opacity: 0; stroke: #9ba8bd; stroke-width: 1; stroke-dasharray: 4 4; pointer-events: none; transition: opacity .15s ease; }
.ca-budget-chart-hover-line.is-visible { opacity: 1; }
.ca-budget-chart-hit { fill: transparent; cursor: crosshair; outline: none; }
.ca-budget-chart-hit:focus-visible { fill: rgba(53, 109, 243, .035); }
.ca-budget-chart-tooltip {
  position: absolute; z-index: 3; top: 12px; width: 168px; padding: 11px 12px;
  border: 1px solid rgba(118,137,179,.18); border-radius: 11px; background: rgba(20,33,61,.96);
  color: #fff; font-size: 11px; line-height: 1.35; pointer-events: none;
  opacity: 0; transform: translate(-50%, -5px); box-shadow: 0 10px 25px rgba(20,33,61,.2); transition: opacity .15s ease, transform .15s ease;
}
.ca-budget-chart-tooltip.is-visible { opacity: 1; transform: translate(-50%, 0); }
.ca-budget-chart-tooltip strong { display: block; margin-bottom: 7px; font-size: 12px; }
.ca-budget-chart-tooltip span { display: grid; grid-template-columns: 7px 1fr auto; align-items: center; gap: 6px; margin-top: 4px; color: rgba(255,255,255,.82); }
.ca-budget-chart-tooltip span i { width: 7px; height: 7px; border-radius: 50%; }
.ca-budget-chart-tooltip span i.is-income { background: #4fcb83; }
.ca-budget-chart-tooltip span i.is-expense { background: #f06a86; }
.ca-budget-chart-tooltip span b { color: #fff; font-weight: 700; }
.ca-budget-chart-legend-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; vertical-align: 1px; }
.ca-budget-chart-legend-dot.is-income { background: #4fcb83; }
.ca-budget-chart-legend-dot.is-expense { background: #f06a86; }

.ca-budget-chart-legend {
  color: #66708c;
  font-size: 12px;
  font-weight: 800;
}

.ca-budget-category-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.ca-budget-donut {
  width: 180px;
  aspect-ratio: 1;
  border-radius: 50%;
  position: relative;
  display: grid;
  place-items: center;
  justify-self: end;
}

.ca-budget-donut > div {
  width: 104px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  position: relative;
  z-index: 1;
}

.ca-budget-donut span {
  color: #66708c;
  font-size: 12px;
  font-weight: 700;
}

.ca-budget-donut strong {
  color: #17213f;
  font-size: 15px;
  font-weight: 800;
}

.ca-budget-category-list {
  display: grid;
  gap: 10px;
}

.ca-budget-category-row {
  display: grid;
  grid-template-columns: 34px minmax(64px, 130px) minmax(50px, 1fr) auto 42px;
  align-items: center;
  gap: 12px;
  color: #344054;
  font-weight: 700;
  min-height: 38px;
}

.ca-budget-category-row-name { min-width: 0; overflow: hidden; font-size: var(--text-md); text-overflow: ellipsis; white-space: nowrap; }
.ca-budget-category-bar-track { position: relative; height: 8px; min-width: 40px; border-radius: 999px; background: #f1f4f9; overflow: hidden; }
.ca-budget-category-bar-fill { display: block; height: 100%; border-radius: 999px; transition: width .3s ease; }
.ca-budget-category-amount { font-variant-numeric: tabular-nums; white-space: nowrap; }

.ca-budget-category-icon {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ca-budget-swatch {
  width: 12px;
  height: 12px;
  min-width: 12px;
  border-radius: 50%;
  display: inline-block;
}

.ca-budget-recurring-list {
  max-height: 360px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #cbd3df transparent;
  padding-right: 5px;
}

.ca-budget-recurring-list::-webkit-scrollbar { width: 5px; }
.ca-budget-recurring-list::-webkit-scrollbar-track { background: transparent; }
.ca-budget-recurring-list::-webkit-scrollbar-thumb {
  background: #cbd3df;
  border-radius: 999px;
}

.ca-budget-recurring-detail-list {
  max-height: none;
  padding-right: 1.75rem;
  overflow: visible;
}

.ca-budget-recurring-row {
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid #edf1f7;
}

.ca-budget-recurring-row:last-child {
  border-bottom: 0;
}

.ca-budget-recurring-title {
  line-height: 1.2;
}

.ca-budget-recurring-meta {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.25;
}

.ca-budget-recurring-amount {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 12px;
}

.ca-credit-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ca-credit-card { position: relative; display: flex; width: 100%; min-width: 0; min-height: 0; aspect-ratio: 1.586 / 1; flex-direction: column; padding: 18px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .45); border-radius: 18px; color: #fff; font-family: var(--family-font-body); text-align: left; box-shadow: 0 14px 32px rgba(26, 36, 56, .16); transition: transform .2s ease, box-shadow .2s ease; }
.ca-credit-card:hover { transform: translateY(-2px); box-shadow: 0 18px 38px rgba(26, 36, 56, .22); }
.ca-credit-card[role="button"] { cursor: pointer; }
.ca-credit-card:focus-visible { outline: 3px solid rgba(0, 158, 247, .35); outline-offset: 3px; }
.ca-credit-card-color-blu { background: linear-gradient(135deg, #152846 0%, #244f7f 62%, #3973a6 100%); }
.ca-credit-card-color-rosa { background: linear-gradient(135deg, #52254f 0%, #843f70 58%, #b25e91 100%); }
.ca-credit-card-color-oro { background: linear-gradient(135deg, #55400f 0%, #7d611c 55%, #9c7a26 100%); }
.ca-credit-card-color-black { background: linear-gradient(135deg, #0c0d10 0%, #1c1e24 55%, #34373f 100%); }
.ca-credit-card-color-silver { background: linear-gradient(135deg, #6b7280 0%, #9aa1ad 55%, #c7ccd4 100%); color: #202632; }
.ca-credit-card-color-silver .ca-credit-card-top small,
.ca-credit-card-color-silver .ca-credit-card-summary small { color: rgba(32, 38, 50, .68); }
.ca-credit-card-color-silver .ca-credit-card-number { color: rgba(32, 38, 50, .92); }

.ca-credit-card.is-compact { aspect-ratio: 1.65 / 1; padding: 15px; }
.ca-credit-card-wrap { position: relative; display: block; width: 100%; }
.ca-credit-card-preferred-badge { position: absolute; top: -8px; left: 10px; z-index: 3; display: grid; width: 26px; height: 26px; place-items: center; border-radius: 50%; background: #fff; color: #f5a524; box-shadow: 0 3px 8px rgba(26, 36, 56, .3), 0 0 0 2px #fff; }
.ca-credit-card-preferred-badge svg { width: 14px; height: 14px; fill: currentColor; }
.ca-credit-card-network { position: relative; z-index: 1; display: flex; align-items: center; color: rgba(255, 255, 255, .92); }
.ca-card-network-icon { height: 16px; width: auto; }
.ca-credit-card-sharing-badge { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; margin-top: 8px; padding: 4px 9px; border-radius: 999px; background: rgba(255, 255, 255, .16); color: rgba(255, 255, 255, .92); font-size: 10px; font-weight: 700; }
.ca-credit-card-sharing-badge svg { width: 11px; height: 11px; }

/* Carosello carte (scroll nativo con snap, funziona anche a swipe su mobile) */
.ca-credit-cards-carousel { position: relative; display: block; min-width: 0; }
.ca-credit-cards-viewport { min-width: 0; padding-top: 10px; padding-bottom: 2px; overflow-x: auto; overscroll-behavior-inline: contain; scroll-padding-inline: 0; scroll-snap-type: x mandatory; scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; }
.ca-credit-cards-viewport::-webkit-scrollbar { display: none; }
.ca-credit-cards-viewport:focus-visible { border-radius: 14px; outline: 2px solid rgba(79,113,216,.28); outline-offset: 3px; }
.ca-credit-cards-track { display: flex; align-items: flex-start; gap: 12px; }
.ca-credit-cards-slide { display: grid; flex: 0 0 calc(50% - 6px); min-width: 0; gap: 12px; scroll-snap-align: start; scroll-snap-stop: always; }
.ca-credit-cards-carousel.has-peek .ca-credit-cards-slide { flex-basis: calc((100% - 54px) / 2); }
.ca-credit-cards-carousel.has-peek::after { content: ""; position: absolute; z-index: 4; top: 10px; right: 0; bottom: 2px; width: 14px; background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.72)); pointer-events: none; }
.ca-credit-cards-nav { display: grid; flex: 0 0 auto; width: 34px; height: 34px; place-items: center; border: 1px solid var(--ca-border); border-radius: 50%; background: #fff; color: #56617a; box-shadow: 0 6px 16px rgba(31, 42, 68, .08); }
.ca-credit-cards-nav:hover { border-color: #cfd5e3; color: var(--ca-primary); }
.ca-credit-cards-nav svg { width: 16px; height: 16px; }

@media (max-width: 575.98px) {
  .ca-credit-cards-slide { flex-basis: 88%; }
  .ca-credit-cards-carousel.has-peek .ca-credit-cards-slide { flex-basis: 88%; }
  .ca-credit-cards-carousel.is-single .ca-credit-cards-slide { flex-basis: 100%; }
}

/* Small laptops / tablets: show one readable card at a time instead of two
   squeezed side by side. */
@media (min-width: 576px) and (max-width: 1439.98px) {
  .ca-credit-cards-slide,
  .ca-credit-cards-carousel.has-peek .ca-credit-cards-slide { flex-basis: min(320px, 100%); }
  .ca-credit-cards-carousel.is-single .ca-credit-cards-slide { flex-basis: 100%; }
}

.ca-credit-card-spend { position: relative; z-index: 1; display: flex; min-width: 0; flex-direction: column; align-items: flex-start; margin-top: auto; }
.ca-credit-card-spend small,
.ca-credit-card-facts small { display: block; color: rgba(255,255,255,.72); font-size: var(--text-2xs); font-weight: 600; letter-spacing: .045em; line-height: 1.15; text-transform: uppercase; }
.ca-credit-card-facts { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-top: 9px; padding-top: 9px; border-top: 1px solid rgba(255,255,255,.18); }
.ca-credit-card-facts > span { min-width: 0; }
.ca-credit-card-facts b { display: block; margin-top: 3px; overflow: hidden; font-size: var(--text-2xs); font-weight: var(--font-semibold); line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.ca-credit-card-color-silver .ca-credit-card-spend small,
.ca-credit-card-color-silver .ca-credit-card-facts small { color: rgba(32,38,50,.62); }
.ca-credit-card-color-silver .ca-credit-card-facts { border-top-color: rgba(32,38,50,.14); }

.ca-card-transactions-preview { min-width: 0; padding: 14px 15px 10px; border: 1px solid rgba(31,42,68,.08); border-radius: 16px; background: #fff; box-shadow: 0 4px 14px rgba(23,32,66,.025); }
.ca-card-transactions-preview > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 26px; margin-bottom: 5px; }
.ca-card-transactions-preview h3 { margin: 0; color: #202a44; font-family: var(--family-font-heading); font-size: 12.5px; font-weight: 600; }
.ca-card-transactions-preview header button { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 4px; padding: 4px 0; border: 0; background: transparent; color: var(--ca-primary); font-size: 10.5px; font-weight: 700; }
.ca-card-transactions-preview header button:hover { color: #315bc5; }
.ca-card-transactions-preview header button:focus-visible { border-radius: 5px; outline: 2px solid rgba(79,113,216,.3); outline-offset: 2px; }
.ca-card-transactions-list { min-height: 126px; }
.ca-card-transaction-row { display: flex; min-width: 0; min-height: 42px; align-items: center; gap: 8px; border-bottom: 1px solid rgba(31,42,68,.06); }
.ca-card-transaction-row:last-child { border-bottom: 0; }
.ca-card-transaction-icon { display: grid; width: 28px; height: 28px; flex: 0 0 28px; place-items: center; border-radius: 9px; }
.ca-card-transaction-icon svg { width: 13px; height: 13px; }
.ca-card-transaction-copy { display: flex; min-width: 0; flex: 1 1 auto; flex-direction: column; }
.ca-card-transaction-copy strong { overflow: hidden; color: #2c3651; font-size: 10.5px; font-weight: 600; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.ca-card-transaction-copy small { margin-top: 2px; color: #8a93a8; font-size: 9px; line-height: 1.15; text-transform: capitalize; }
.ca-card-transaction-row > b { flex: 0 0 auto; color: #2f3850; font-size: 10px; font-weight: 700; white-space: nowrap; }
.ca-card-transactions-empty { display: flex; min-height: 126px; align-items: center; justify-content: center; gap: 7px; color: #929bad; font-size: 10.5px; font-weight: 600; text-align: center; }
.ca-card-transactions-empty svg { width: 16px; height: 16px; }
.ca-card-transactions-empty.is-private { color: #7c84a0; }

/* Badge/colore movimenti pagati con carta */
.ca-badge-credit-card { background: #eef0ff; color: #4c3fd6; }
.text-card-charge { color: #4c3fd6 !important; }

/* Form carta: anteprima live + selezione colore/condivisione */
.ca-card-preview-wrap { display: flex; justify-content: center; margin-bottom: 6px; }
.ca-card-preview-wrap .ca-credit-card { width: min(320px, 100%); }
.ca-card-color-options { display: flex; flex-wrap: wrap; gap: 10px; }
.ca-card-color-option { position: relative; display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border: 1.5px solid transparent; border-radius: 999px; cursor: pointer; font-size: 12.5px; font-weight: 600; color: #3a445e; background: #f4f5f9; }
.ca-card-color-option::before { content: ""; width: 16px; height: 16px; border-radius: 50%; background: inherit; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.ca-card-color-option.ca-credit-card-color-blu::before { background: linear-gradient(135deg, #244f7f, #3973a6); }
.ca-card-color-option.ca-credit-card-color-rosa::before { background: linear-gradient(135deg, #843f70, #b25e91); }
.ca-card-color-option.ca-credit-card-color-oro::before { background: linear-gradient(135deg, #8a6a24, #d4af5a); }
.ca-card-color-option.ca-credit-card-color-black::before { background: linear-gradient(135deg, #1c1e24, #34373f); }
.ca-card-color-option.ca-credit-card-color-silver::before { background: linear-gradient(135deg, #9aa1ad, #c7ccd4); }
.ca-card-color-option input { position: absolute; opacity: 0; }
.ca-card-color-option:has(input:checked) { border-color: var(--ca-primary); background: var(--ca-primary-soft); color: var(--ca-primary); }
.ca-card-sharing-options { display: grid; gap: 10px; }
.ca-card-sharing-option { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1.5px solid var(--ca-border); border-radius: 13px; cursor: pointer; }
.ca-card-sharing-option input { margin-top: 3px; }
.ca-card-sharing-option strong { display: block; font-size: 13px; color: #1c2437; }
.ca-card-sharing-option small { display: block; margin-top: 2px; color: #6b7488; font-size: 11.5px; line-height: 1.4; }
.ca-card-sharing-option:has(input:checked) { border-color: var(--ca-primary); background: var(--ca-primary-soft); }

.ca-credit-card::after { content: ""; position: absolute; width: 180px; height: 180px; right: -65px; top: -80px; border-radius: 50%; background: rgba(255,255,255,.09); }
.ca-credit-card-top, .ca-credit-card-middle, .ca-credit-card-summary { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 12px; }
.ca-credit-card-top small, .ca-credit-card-summary small { display: block; color: rgba(255,255,255,.76); font-family: var(--family-font-body); text-transform: uppercase; }
.ca-credit-card-top { align-items: flex-start; }
.ca-credit-card-label { font-size: var(--text-xs); font-weight: var(--font-medium); letter-spacing: .06em; line-height: 1.15; }
.ca-credit-card-name { display: block; margin-top: 0; font-family: var(--family-font-heading); font-size: var(--title-sm); font-weight: 600; line-height: 1.15; }
.ca-credit-card-middle { position: absolute; z-index: 1; top: 45%; left: 18px; align-items: center; justify-content: flex-start; gap: 11px; margin-top: 0; transform: translateY(-50%); }
.ca-credit-card-chip { display: block; width: 32px; height: 24px; flex: 0 0 32px; border-radius: 7px; background: linear-gradient(135deg,#f3d788,#ad8741); box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.ca-credit-card-number { overflow: hidden; color: rgba(255,255,255,.96); font-family: var(--family-font-body); font-size: var(--text-md); font-weight: 600; letter-spacing: .08em; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.ca-credit-card-summary { align-items: end; margin-top: 35px; }
.ca-credit-card-charge-label { font-size: var(--text-xs); font-weight: 500; letter-spacing: .055em; line-height: 1.1; }
.ca-credit-card-charge-date { display: block; margin-top: 3px; font-family: var(--family-font-body); font-size: var(--text-sm); font-weight: 600; line-height: 1.1; }
.ca-credit-card-amount { display: block; font-family: var(--family-font-body); font-size: clamp(21px, 1.55vw, 24px); font-weight: 600; line-height: 1; }
.ca-credit-card-status { margin-top: 3px; font-size: var(--text-xs); font-weight: 600; letter-spacing: .055em; line-height: 1.05; }
.ca-credit-card-detail-link { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 3px; margin-top: 2px; color: rgba(255,255,255,.88); font-family: var(--family-font-body); font-size: var(--text-xs); font-weight: 600; line-height: 1; white-space: nowrap; }
.ca-credit-card-detail-link i { font-size: 13px !important; }
.ca-budget-page { width: 100%; max-width: 100%; min-width: 0; overflow-x: visible; }
.ca-budget-drawer { width: min(720px, 100%); max-width: 100%; overflow: hidden; }
.ca-budget-drawer form { display: flex; width: 100%; min-width: 0; min-height: 100%; height: 100%; flex-direction: column; background: #fff; }
.ca-budget-drawer-header { position: relative; z-index: 3; display: flex; min-height: 112px; flex: 0 0 auto; align-items: center; padding: 24px 28px; border-bottom: 1px solid #e8ebf2; overflow: hidden; background: linear-gradient(115deg, #fff 45%, #fcfcff 100%); }
.ca-budget-drawer-heading { position: relative; z-index: 2; display: flex; align-items: center; gap: 16px; }
.ca-budget-drawer-heading-icon { display: grid; place-items: center; width: 52px; height: 52px; flex: 0 0 52px; border-radius: 15px; color: #6274f5; background: linear-gradient(145deg, #f0efff, #e5e4ff); }
.ca-budget-drawer-heading-icon svg { width: 25px; height: 25px; stroke-width: 1.9; }
.ca-budget-drawer-heading h2 { margin: 0 0 4px; color: #182347; font-size: 26px; font-weight: var(--font-bold); letter-spacing: -.55px; }
.ca-budget-drawer-heading p { margin: 0; color: #7580a2; font-size: 15px; }
.ca-budget-drawer-close { position: absolute; z-index: 3; top: 30px; right: 28px; display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid #dce1eb; border-radius: 12px; color: #53607d; background: rgba(255,255,255,.84); transition: color .16s ease, border-color .16s ease, background .16s ease; }
.ca-budget-drawer-close:hover { color: #3345cf; border-color: #bfc7ef; background: #fff; }
.ca-budget-drawer-close svg { width: 20px; height: 20px; }
.ca-budget-drawer-decoration i { position: absolute; display: block; border-radius: 50%; pointer-events: none; }
.ca-budget-drawer-decoration i:nth-child(1) { width: 110px; height: 110px; right: 92px; top: 56px; background: rgba(203,239,233,.3); }
.ca-budget-drawer-decoration i:nth-child(2) { width: 40px; height: 40px; right: 280px; top: 38px; background: rgba(211,202,255,.48); }
.ca-budget-drawer-decoration i:nth-child(3) { width: 25px; height: 25px; right: 190px; top: 83px; background: rgba(198,239,226,.68); }
.ca-budget-drawer-decoration i:nth-child(4) { width: 18px; height: 18px; right: 112px; top: 17px; background: rgba(248,190,221,.7); }
.ca-budget-drawer-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 28px 32px 24px; }
.ca-feedback-auto-note { display: flex; align-items: flex-start; gap: 8px; margin: 4px 0 0; padding: 12px 14px; border-radius: 11px; color: #56617a; background: #f4f5f9; font-size: 12px; line-height: 1.5; }
.ca-feedback-auto-note svg { flex: 0 0 15px; width: 15px; height: 15px; margin-top: 1px; color: #8994a8; }
.ca-feedback-file-control { display: flex; width: 100%; min-height: 48px; overflow: hidden; align-items: stretch; border: 1px solid #d8deea; border-radius: 11px; color: #66728b; background: #fff; cursor: pointer; transition: border-color .18s ease, box-shadow .18s ease; }
.ca-feedback-file-control:hover { border-color: #aeb8d0; }
.ca-feedback-file-control:focus-within { border-color: #7d86fa; box-shadow: 0 0 0 3px rgba(98,116,245,.09); }
.ca-feedback-file-control input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.ca-feedback-file-action { display: inline-flex; min-width: 112px; align-items: center; justify-content: center; gap: 7px; padding: 0 14px; border-right: 1px solid #d8deea; color: #53617d; background: #f8f9fc; font-size: 13px; font-weight: 600; }
.ca-feedback-file-action svg { width: 15px; height: 15px; }
.ca-feedback-file-name { min-width: 0; flex: 1 1 auto; align-self: center; overflow: hidden; padding: 0 14px; color: #7b869d; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.ca-budget-drawer-body .form-label { margin-bottom: 9px; color: #273452; font-size: var(--text-lg); font-weight: var(--font-bold); }
.ca-budget-drawer-body .form-control, .ca-budget-drawer-body .form-select, .ca-budget-drawer-body .input-group-text { min-height: 54px; border-color: #d8deea; border-radius: 11px; color: #273452; font-size: 15px; background-color: #fff; box-shadow: none; }
.ca-budget-drawer-body .form-control:focus, .ca-budget-drawer-body .form-select:focus { border-color: #7d86fa; box-shadow: 0 0 0 3px rgba(98,116,245,.09); }
.ca-invite-role-quote {
  display: flex; align-items: flex-start; gap: 10px; margin-top: 0; max-height: 0; padding: 0 16px; overflow: hidden;
  border: 1px solid transparent; border-radius: 13px; background: linear-gradient(120deg, #f4f2ff 0%, #fdf6ff 100%); opacity: 0;
  transition: opacity .22s ease, max-height .22s ease, margin-top .22s ease, padding .22s ease;
}
.ca-invite-role-quote.is-visible { margin-top: 12px; max-height: 80px; padding: 12px 16px; border-color: #e6e1ff; opacity: 1; }
.ca-invite-role-quote-icon { display: grid; flex: 0 0 26px; width: 26px; height: 26px; place-items: center; border-radius: 9px; background: #ece8ff; color: #6a5cf0; }
.ca-invite-role-quote-icon svg { width: 14px; height: 14px; }
.ca-invite-role-quote p { margin: 3px 0 0; color: #4a4470; font-family: var(--family-font-heading); font-size: 13.5px; font-style: italic; font-weight: 600; line-height: 1.4; }
.ca-budget-form-section { margin-bottom: 26px; padding: 0 0 26px; border: 0; border-bottom: 1px solid #e8ebf2; border-radius: 0; background: #fff; box-shadow: none; }
.ca-budget-form-section:last-child { margin-bottom: 0; }
.ca-budget-form-section:last-child { padding-bottom: 0; border-bottom: 0; }
.ca-budget-form-section-heading { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 12px; margin-bottom: 20px; }
.ca-budget-form-section-heading h3 { margin: 0 0 2px; color: #182347; font-size: var(--text-lg); font-weight: var(--font-bold); }
.ca-budget-form-section-heading p { margin: 0; color: #7b8495; font-size: .78rem; line-height: 1.4; }
.ca-budget-form-section-icon { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 11px; color: #4f46ff; background: #efefff; }
.ca-budget-form-section-required .ca-budget-form-section-icon { color: #d94a64; background: #fff0f3; }
.ca-budget-form-section-payment { background: #fff; }
.ca-budget-form-section-payment .ca-budget-form-section-icon { color: #356df3; background: #eaf2ff; }
.ca-budget-form-section-optional { background: #fff; }
.ca-budget-form-section-optional .ca-budget-form-section-icon { color: #697386; background: #f0f2f5; }
.ca-budget-drawer .select2-container { width: 100% !important; }
.ca-budget-drawer .select2-container .select2-selection--single { height: 54px !important; min-height: 54px !important; padding: 0 42px 0 12px !important; border-color: #d8deea; border-radius: 11px; }
.ca-budget-drawer .select2-container--bootstrap5 .select2-selection.is-invalid { border-color: var(--bs-danger); }
.ca-budget-drawer .select2-container .select2-selection--single .select2-selection__rendered { display: flex; height: 52px; min-height: 0; align-items: center; padding: 0 !important; line-height: 1.2; }
.ca-budget-drawer .select2-container .select2-selection--single .select2-selection__arrow { top: 0; right: 10px; height: 52px; }
.ca-budget-drawer .select2-dropdown { overflow: hidden; border-color: #dfe5ef; border-radius: 12px; box-shadow: 0 14px 35px rgba(31,45,61,.14); }
.ca-budget-drawer .select2-results__option { padding: 9px 12px; }
.ca-category-select-option { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: #344054; font-weight: 600; }
.ca-category-select-icon { display: inline-flex; flex: 0 0 30px; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 9px; }
.ca-category-select-icon svg { width: 17px; height: 17px; }
.ca-budget-option-card small { display: block; margin-top: 2px; color: #7b8495; font-size: .75rem; font-weight: 400; }
.ca-budget-option-card { width: 100%; min-height: 58px; margin-left: 0 !important; padding: 12px 14px; border: 1px solid #e7ebf3; border-radius: 13px; background: #f9fafc; }
.ca-budget-option-card .form-check-input { margin-left: 0; margin-right: 12px; }
.ca-budget-option-card:has(.form-check-input:checked) { border-color: rgba(79,70,255,.24); background: #f5f4ff; box-shadow: inset 3px 0 0 rgba(79,70,255,.55); }
.ca-budget-option-card:has(.form-check-input:checked) .form-check-label { color: #302b88; font-weight: 700 !important; }
.ca-budget-date-picker .btn { border-color: #dfe5ef; }
.flatpickr-calendar { z-index: 1085 !important; }
.flatpickr-calendar.open { z-index: 1085 !important; }
.ca-budget-drawer-footer { position: relative !important; z-index: 4; flex: 0 0 auto; padding: 14px 32px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid #edf0f5; background: #fff; }
.ca-budget-drawer-footer .btn { min-height: 48px; padding-inline: 22px; border-radius: 11px; font-size: 14px; font-weight: 700; }
.ca-budget-save { display: inline-flex; min-width: 136px; align-items: center; justify-content: center; gap: 9px; background: linear-gradient(135deg,#5367f6,#445cf0); box-shadow: 0 9px 20px rgba(73,94,239,.22); }
.ca-budget-save svg { width: 20px; height: 20px; }

@media (min-width: 768px) {
  .ca-budget-drawer-body .mb-5 { margin-bottom: 1rem !important; }
}
.ca-card-detail-hero { display: flex; gap: 20px; align-items: stretch; margin-bottom: 16px; }
.ca-card-detail-hero-visual { flex: 0 0 clamp(260px, 46%, 320px); }
.ca-card-detail-hero-visual .ca-credit-card {
  width: 100%;
  min-height: 210px;
  aspect-ratio: 1.42 / 1;
}
/* La preview nel drawer è più stretta rispetto al carosello: riserviamo
   uno spazio reale a chip/numero e riepilogo per evitare sovrapposizioni. */
.ca-card-detail-hero-visual .ca-credit-card-middle { top: 42%; }
.ca-card-detail-hero-visual .ca-credit-card-spend { position: absolute; right: 18px; bottom: 59px; left: 18px; margin-top: 0; }
.ca-card-detail-hero-visual .ca-credit-card-facts { margin-top: auto; }
.ca-card-detail-hero-info { display: flex; flex: 1 1 auto; min-width: 0; flex-direction: column; gap: 9px; }
.ca-card-detail-hero-info .btn { margin-top: auto; }
.ca-card-detail-actions { display: grid; gap: 8px; margin-top: auto; }
.ca-card-detail-hero-info .ca-card-detail-actions .btn { margin-top: 0; }
.ca-card-status-pill { display: inline-flex; width: fit-content; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: #e7f8ee; color: #1a9d55; font-size: 12px; font-weight: 700; }
.ca-card-status-dot { width: 7px; height: 7px; border-radius: 50%; background: #22b866; }
.ca-card-detail-hero-info p { margin: 0; color: #7580a2; font-size: 13px; line-height: 1.45; }
.ca-card-detail-spend-box { padding: 16px 20px; border: 1px solid #edf1f7; border-radius: 14px; background: #fff; margin-bottom: 18px; }
.ca-card-detail-spend-box small { display: block; color: #7580a2; font-size: 12px; font-weight: 600; }
.ca-card-detail-spend-box strong { display: block; margin: 4px 0 5px; color: #14213d; font-size: 28px; }
.ca-card-detail-spend-box span { display: block; color: #7580a2; font-size: 12px; }
.ca-card-movement-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.ca-card-detail-spend-box.is-warn { border-color: #f4d8a8; background: #fff9ef; }
.ca-card-detail-spend-box.is-over { border-color: #f4c2ce; background: #fdf2f5; }
.ca-card-detail-spend-box.is-over strong { color: #d63a58; }
.ca-card-movement-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.ca-card-movement-select { border: 0; border-radius: 999px; background: #f4f5f9; color: #4a5375; font-size: 12px; font-weight: 600; padding: 7px 28px 7px 12px; }
.ca-card-movement-select:focus { outline: 2px solid rgba(79,70,255,.25); }
.ca-card-movement { width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 0; border: 0; border-bottom: 1px solid #edf1f7; background: transparent; }
.ca-card-movement:hover strong { color: var(--bs-primary); }
.ca-card-movement-icon { width: 42px; height: 42px; flex: 0 0 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; }
.ca-card-movement small, .ca-card-movement strong, .ca-card-movement span, .ca-card-movement em { display: block; }
.ca-card-movement .ca-card-movement-icon { display: inline-flex; align-items: center; justify-content: center; }
.ca-card-movement small, .ca-card-movement em { color: #98a2b8; font-size: 11px; font-style: normal; }
.ca-card-movement strong { color: #14213d; font-size: 13.5px; font-weight: 700; }
.ca-card-movement .ca-card-movement-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; color: #98a2b8; font-size: 11px; }
.ca-card-movement b { white-space: nowrap; color: #d9214e; }
.ca-card-movement .ca-recurring-card-badge { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 999px; background: #f0edff; color: #6558c8; font-size: 9px; font-weight: 600; line-height: 1.35; }
.ca-manage-categories-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 7px; color: #4f46ff; font-size: 12px; font-weight: 600; text-decoration: none; }
.ca-manage-categories-link:hover { text-decoration: underline; }
.ca-manage-categories-link svg { width: 13px; height: 13px; }

.ca-budget-categories-card > .card-body { padding-right: 16px; padding-left: 16px; }
.ca-budget-cat-manage-list { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.ca-budget-cat-manage-row:has(.ca-row-menu[open]) { position: relative; z-index: 5; }
.ca-budget-cat-manage-row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid #edf1f7; }
.ca-budget-cat-manage-row:last-child { border-bottom: 0; }
.ca-budget-cat-manage-row.is-archived { opacity: .62; }
.ca-budget-category-icon { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border-radius: 11px; }
.ca-budget-category-icon svg { width: 18px; height: 18px; }
.ca-budget-cat-manage-row strong { display: block; overflow: hidden; color: #14213d; font-size: var(--text-lg); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.ca-budget-category-meta { display: block; margin-top: 2px; color: #98a2b8; font-size: 11px; }
.ca-budget-category-archived-badge { color: #b45309; font-weight: 600; }
.ca-budget-category-actions { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px; flex: 0 0 auto; }
.ca-budget-category-actions .btn-icon { width: 30px; height: 30px; }
.ca-budget-category-actions .btn-icon svg { width: 15px; height: 15px; }
.ca-budget-category-actions .ca-row-menu > summary { width: 30px; height: 30px; }
.ca-budget-category-actions .ca-row-menu > summary svg { width: 15px; height: 15px; }
.ca-budget-category-actions .ca-row-menu > div { width: 200px; }
.ca-budget-category-actions .ca-row-menu button { align-items: center; gap: 9px; }
.ca-budget-category-actions .ca-row-menu button svg { width: 16px; height: 16px; flex: 0 0 16px; }
.ca-budget-category-archived { margin-top: 14px; border-top: 1px solid #edf1f7; padding-top: 10px; }
.ca-budget-category-archived summary { cursor: pointer; color: #4a5375; font-size: var(--text-sm); font-weight: var(--font-semibold); }

/* Metodo 50/30/20: gerarchia macro nella pagina Impostazioni > Categorie. */
.ca-budget-categories-settings { display: flex; flex-direction: column; gap: 16px; }
.ca-budget-cat-macro-group + .ca-budget-cat-macro-group { margin-top: 18px; }
.ca-budget-cat-macro-heading { display: flex; align-items: center; gap: 9px; padding: 6px 4px 10px; }
.ca-budget-cat-macro-icon { display: grid; width: 30px; height: 30px; flex: 0 0 30px; place-items: center; border-radius: 9px; color: var(--macro-color); background: var(--macro-bg); }
.ca-budget-cat-macro-icon svg { width: 15px; height: 15px; }
.ca-budget-cat-macro-label { overflow: hidden; color: #17213f; font-size: var(--text-lg); font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.ca-budget-cat-macro-target, .ca-budget-cat-macro-count { margin-left: auto; flex: 0 0 auto; color: #7c879d; font-size: 11px; font-weight: 700; white-space: nowrap; }

.ca-budget-distribution-card .card-body { display: flex; flex-direction: column; gap: 14px; }
.ca-budget-distribution-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }

.ca-budget-distribution-article { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 22px 24px; border-radius: 16px; overflow: hidden; color: #fff; background: linear-gradient(135deg, #1f2f66, #101a3d); }
.ca-budget-distribution-article::after { content: ""; position: absolute; right: -40px; bottom: -50px; width: 170px; height: 170px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.14), transparent 70%); pointer-events: none; }
.ca-budget-distribution-article-icon { position: relative; z-index: 1; display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; color: #fff; background: rgba(255,255,255,.16); }
.ca-budget-distribution-article-icon svg { width: 18px; height: 18px; }
.ca-budget-distribution-article h3 { position: relative; z-index: 1; margin: 0; color: #fff; font-size: var(--text-lg); font-weight: 800; }
.ca-budget-distribution-article p { position: relative; z-index: 1; margin: 0; color: rgba(255,255,255,.82); font-size: var(--text-sm); line-height: 1.55; }
.ca-budget-distribution-article-cta { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin-top: 4px; padding: 9px 16px; border: 0; border-radius: 10px; color: #17213f; font-size: var(--text-sm); font-weight: 700; background: #fff; transition: background .16s ease, transform .16s ease; }
.ca-budget-distribution-article-cta:hover { background: #eef1ff; }
.ca-budget-distribution-article-cta svg { width: 14px; height: 14px; }

.ca-budget-distribution-side { display: flex; flex-direction: column; gap: 8px; }
.ca-budget-distribution-badge { align-self: flex-start; flex: 0 0 auto; padding: 5px 11px; border-radius: 999px; color: #6274f5; background: var(--ca-primary-soft); font-size: 11px; font-weight: 700; white-space: nowrap; }
.ca-budget-distribution-fields { display: flex; flex-direction: column; gap: 8px; }
.ca-budget-distribution-field { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--ca-border); border-radius: 12px; }
.ca-budget-distribution-field-icon { display: grid; width: 26px; height: 26px; flex: 0 0 26px; place-items: center; border-radius: 8px; }
.ca-budget-distribution-field-icon svg { width: 14px; height: 14px; }
.ca-budget-distribution-field label { flex: 1 1 auto; min-width: 0; color: #4a5375; font-size: var(--text-sm); font-weight: 700; }
.ca-budget-distribution-input { display: flex; flex: 0 0 auto; align-items: center; gap: 4px; width: 78px; padding: 0 10px; border: 1px solid #d8deea; border-radius: 9px; }
.ca-budget-distribution-input input { width: 100%; min-height: 34px; border: 0; color: #17213f; font-size: var(--text-sm); font-weight: 700; font-variant-numeric: tabular-nums; background: transparent; }
.ca-budget-distribution-input input:focus { outline: none; }
.ca-budget-distribution-input:focus-within { border-color: #7d86fa; box-shadow: 0 0 0 3px rgba(98,116,245,.09); }
.ca-budget-distribution-input span { color: #98a1b8; font-size: 12px; font-weight: 700; }
.ca-budget-distribution-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 2px; }
.ca-budget-distribution-total { color: #7c879d; font-size: var(--text-sm); font-weight: 700; font-variant-numeric: tabular-nums; }
.ca-budget-distribution-total.is-valid { color: #17a35c; }
.ca-budget-distribution-total.is-invalid { color: #c0392b; }
.ca-budget-method-article p { margin: 0 0 16px; color: #3d4867; font-size: 15px; line-height: 1.7; }
.ca-budget-method-article p:last-child { margin-bottom: 0; }
.ca-budget-method-article strong { color: #17213f; }

@media (max-width: 767.98px) {
  .ca-budget-distribution-layout { grid-template-columns: 1fr; }
  .ca-budget-distribution-footer { flex-direction: column; align-items: stretch; }
  .ca-budget-distribution-footer .d-flex { width: 100%; }
  .ca-budget-distribution-footer .d-flex .btn { flex: 1 1 0; }
}

.ca-budget-category-icon-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 8px; }
.ca-budget-category-icon-option { display: grid; place-items: center; height: 42px; border: 1.5px solid #e3e8f2; border-radius: 11px; color: #56617a; cursor: pointer; transition: border-color .15s ease, background-color .15s ease, color .15s ease; }
.ca-budget-category-icon-option input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ca-budget-category-icon-option svg { width: 18px; height: 18px; }
.ca-budget-category-icon-option:hover { border-color: #c7d0e3; }
.ca-budget-category-icon-option.is-selected,
.ca-budget-category-icon-option:has(input:checked) { border-color: #4f46ff; color: #4f46ff; background: #f0efff; }

@media (max-width: 575.98px) {
  .ca-card-detail-hero { flex-direction: column; }
  .ca-card-detail-hero-visual { flex-basis: auto; max-width: 320px; }
}

@media (max-width: 767.98px) {
  html,
  body.ca-app {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .ca-budget-body #kt_app_root,
  .ca-budget-body #kt_app_page,
  .ca-budget-body #kt_app_wrapper,
  .ca-budget-body #kt_app_main,
  .ca-budget-body #kt_app_content,
  .ca-budget-body #kt_app_content_container,
  .ca-budget-body #caPage {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .ca-budget-drawer-header,
  .ca-budget-drawer-body,
  .ca-budget-drawer-footer {
    min-width: 0;
    max-width: 100%;
  }

  .ca-ai-hero { align-items: stretch; flex-direction: column; }
  .ca-ai-month { justify-content: space-between; }
  .ca-ai-month-label { min-width: 0; flex: 1; }
  .ca-ai-tabs { display: flex; }.ca-ai-tabs button { flex: 1; min-width: 0; }
  .ca-ai-card > .card-body { min-height: 420px; padding: 20px; }
  .ca-ai-highlights { grid-template-columns: 1fr; }
  .ca-ai-message > div { max-width: 87%; }
  .ca-ai-chat-welcome > div { align-items: stretch; flex-direction: column; }
  .ca-budget-new-desktop,
  .ca-budget-monthly-column {
    display: none !important;
  }

  .ca-budget-mobile-cta {
    position: fixed;
    right: 18px;
    bottom: calc(18px + env(safe-area-inset-bottom));
    z-index: 1040;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 17px;
    border-radius: 999px;
    box-shadow: 0 14px 34px rgba(47,111,237,.28);
  }

  .ca-budget-category-metrics {
    width: 100%;
    justify-content: space-between;
    padding-bottom: 4px;
  }

  .ca-budget-drawer-header { min-height: 88px; padding: 16px 18px; }
  .ca-budget-drawer-heading { gap: 12px; padding-right: 48px; }
  .ca-budget-drawer-heading-icon { width: 44px; height: 44px; flex-basis: 44px; border-radius: 13px; }
  .ca-budget-drawer-heading-icon svg { width: 22px; height: 22px; }
  .ca-budget-drawer-heading h2 { font-size: 20px; line-height: 1.15; }
  .ca-budget-drawer-heading p { font-size: 12px; line-height: 1.35; }
  .ca-budget-drawer-close { top: 24px; right: 18px; width: 40px; height: 40px; }
  .ca-budget-drawer-decoration { display: none; }
  .ca-budget-drawer-body { padding: 22px 18px 28px; }
  .ca-budget-form-section { padding: 0 0 22px; border-radius: 0; }
  .ca-budget-form-section-heading { grid-template-columns: 34px minmax(0,1fr); gap: 10px; }
  .ca-budget-form-section-heading .badge { grid-column: 2; justify-self: start; }
  .ca-budget-form-section-icon { width: 34px; height: 34px; }
  .ca-budget-drawer-footer { padding: 14px 18px calc(18px + env(safe-area-inset-bottom)); }
  .ca-budget-drawer-footer .ms-auto { width: 100%; }
  .ca-budget-drawer-footer .ms-auto .btn { flex: 1 1 0; padding-right: 12px; padding-left: 12px; }
  .ca-budget-option-card { min-height: 56px; }
  .ca-credit-cards { grid-template-columns: 1fr; }
  .ca-credit-card { min-height: 0; padding: 18px; }
  .ca-card-movement { align-items: flex-start; }
}

.ca-savings-goals-list {
  max-height: 360px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #cbd3df transparent;
  padding-right: 5px;
}

.ca-savings-goal {
  width: 100%;
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border: 0;
  border-bottom: 1px solid #edf1f7;
  background: transparent;
}

.ca-savings-goal:last-child { border-bottom: 0; }
.ca-savings-goal:hover strong { color: var(--bs-primary) !important; }

.ca-annual-project-fields,
.ca-goal-funds {
  padding: 14px;
  border: 1px solid #e8edf5;
  border-radius: 12px;
  background: #f8fafc;
}

.ca-budget-author {
  margin: 4px 0 20px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f7f9fc;
}

.ca-budget-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 9px 10px;
  border-bottom: 1px solid #e9edf4;
  background: #fff;
  color: #77819a;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.ca-budget-table {
  min-width: 920px;
  margin-bottom: 0;
  color: #344054;
}

.ca-budget-table td,
.ca-budget-table th {
  vertical-align: middle;
}

.ca-budget-table tbody td {
  height: 48px;
  padding: 7px 10px;
  border-bottom-color: #edf1f6;
  font-size: var(--text-sm);
}

.ca-budget-table tbody tr:last-child td { border-bottom: 0; }
.ca-budget-table tbody tr { transition: background-color .15s ease; }
.ca-budget-table tbody tr:hover { background: #fafcff; }
.ca-budget-table-description .btn-link { color: #17213f !important; font-size: var(--text-sm); font-weight: 600; line-height: 1.25; text-decoration: none; }
.ca-budget-table-date { display: inline-flex; align-items: center; gap: 7px; color: #59657c; font-weight: 500; white-space: nowrap; }
.ca-budget-table-date i { color: #7187c9; font-size: 14px; }
.ca-budget-table-category { display: inline-flex; min-width: 0; align-items: center; gap: 7px; color: #43506a; font-weight: 500; white-space: nowrap; }
.ca-budget-table-category-icon { display: inline-grid; width: 24px; height: 24px; flex: 0 0 24px; place-items: center; border-radius: 7px; }
.ca-budget-table-category-icon i { font-size: 13px; }
.ca-budget-table-trip { margin-top: 2px; padding-left: 31px; }
.ca-budget-table .badge { padding: 4px 8px; border-radius: 6px; font-size: var(--text-2xs); font-weight: 600; line-height: 1; }
.ca-budget-table tbody td.ca-budget-table-amount { font-size: var(--text-md); font-weight: var(--font-semibold); white-space: nowrap; }
.ca-budget-table-flags { white-space: nowrap; }
.ca-budget-table-actions { display: flex; justify-content: flex-end; gap: 4px; opacity: .72; transition: opacity .15s ease; }
.ca-budget-table tr:hover .ca-budget-table-actions,
.ca-budget-table-actions:focus-within { opacity: 1; }
.ca-budget-table-actions .btn { width: 28px; height: 28px; }
.ca-budget-table-actions .btn i { font-size: 14px; }
.ca-budget-movements-header { min-height: 72px; align-items: center; gap: 16px; }
.ca-budget-movements-search { display: flex; width: min(100%, 310px); height: 42px; align-items: center; gap: 9px; margin-left: auto; padding: 0 10px 0 13px; border: 1px solid #dfe5ef; border-radius: 11px; background: #fff; transition: border-color .15s ease, box-shadow .15s ease; }
.ca-budget-movements-search:focus-within { border-color: rgba(53,109,243,.55); box-shadow: 0 0 0 3px rgba(53,109,243,.10); }
.ca-budget-movements-search > i { flex: 0 0 auto; color: #7b8495; font-size: 18px; }
.ca-budget-movements-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: #202b3c; font-size: 13px; font-weight: 500; }
.ca-budget-movements-search input::placeholder { color: #99a1b1; }
.ca-budget-movements-search input::-webkit-search-cancel-button { display: none; }
.ca-budget-movements-search button { display: inline-flex; width: 28px; height: 28px; flex: 0 0 28px; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 8px; background: #f1f3f6; color: #667085; }
.ca-budget-movements-search button:hover { background: #e8edf5; color: #344054; }

@media (max-width: 767.98px) {
  .ca-budget-movements-header { align-items: stretch; flex-direction: column; padding-bottom: 16px; }
  .ca-budget-movements-header .card-title { min-height: auto; }
  .ca-budget-movements-search { width: 100%; margin-left: 0; }
}

.ca-budget-note-preview {
  max-width: 360px;
}

@media (max-width: 1199.98px) {
  .ca-task-row { grid-template-columns: minmax(180px, 1fr) 140px 34px; }
  .ca-task-row .ca-task-priority, .ca-task-row .ca-row-actions { display: none; }
  .ca-settings-grid { grid-template-columns: 1fr; }
  .ca-budget-category-layout {
    grid-template-columns: 1fr;
  }
  .ca-budget-donut {
    margin: 0 auto;
    grid-row: 1;
    justify-self: center;
  }
  .ca-calendar-month-view {
    width: 100%;
    overflow-x: hidden;
  }
  .ca-calendar-month-view .ca-calendar-head,
  .ca-calendar-month-view .ca-calendar-grid {
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    overflow-x: hidden;
  }
  .ca-calendar-month-view .ca-calendar-head div {
    min-width: 0;
    padding: 10px 6px;
  }
  .ca-calendar-month-view .ca-month-cell {
    min-width: 0;
    min-height: 220px;
    padding: 10px 6px;
  }
  .ca-calendar-month-view .ca-chip {
    margin-top: 6px;
    padding: 6px 7px;
    font-size: 11px;
    line-height: 1.25;
  }
  .ca-calendar-week-view {
    width: 100%;
    overflow-x: hidden;
  }
  .ca-calendar-week-view .ca-calendar-head,
  .ca-calendar-week-view .ca-calendar-week-grid {
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    overflow-x: hidden;
  }
  .ca-calendar-week-view .ca-calendar-head div {
    min-width: 0;
    padding: 10px 6px;
  }
  .ca-calendar-week-view .ca-week-view-day {
    min-width: 0;
    min-height: 240px;
    padding: 10px 6px;
  }
  .ca-calendar-week-view .ca-chip {
    margin-top: 6px;
    padding: 6px 7px;
    font-size: 11px;
    line-height: 1.25;
  }
}

@media (min-width: 768px) and (max-width: 1439.98px) and (orientation: landscape) {
  [data-kt-app-sidebar-fixed=true] {
    --bs-app-sidebar-width: 78px;
    --bs-app-sidebar-width-actual: 78px;
  }

  body.ca-app {
    overflow-x: hidden;
  }

  #kt_app_sidebar_mobile_toggle {
    display: none !important;
  }

  #kt_app_sidebar.ca-sidebar {
    display: flex !important;
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 78px !important;
    min-width: 78px !important;
    transform: none !important;
    box-shadow: none !important;
    z-index: 105 !important;
  }

  #kt_app_sidebar.ca-sidebar.drawer,
  #kt_app_sidebar.ca-sidebar.drawer.drawer-start {
    transform: none !important;
  }

  .drawer-overlay {
    display: none !important;
  }

  [data-kt-app-sidebar-fixed=true] .app-wrapper {
    margin-left: 78px !important;
  }

  [data-kt-app-header-fixed=true][data-kt-app-sidebar-fixed=true][data-kt-app-sidebar-push-header=true] .app-header {
    left: 78px !important;
  }

  .ca-sidebar-logo {
    height: 82px;
    padding-left: 14px !important;
    padding-right: 14px !important;
    justify-content: center;
  }

  .ca-sidebar-logo a {
    justify-content: center;
  }

  .ca-sidebar-brand,
  .ca-menu .menu-title,
  .ca-menu .ca-nav-badge {
    display: none !important;
  }

  .ca-sidebar .app-sidebar-menu,
  .ca-sidebar .app-sidebar-wrapper {
    width: 100%;
  }

  .ca-menu .menu-link {
    width: 52px;
    min-height: 52px;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .ca-menu .menu-icon {
    width: 52px;
    justify-content: center;
    margin-right: 0 !important;
    padding-right: 0 !important;
  }

  .ca-sidebar .hover-scroll-y {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .ca-sidebar-status-wrap {
    padding-left: 13px !important;
    padding-right: 13px !important;
    padding-bottom: 14px !important;
  }

  .ca-sidebar-update-status {
    width: 52px;
    min-height: 42px;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 7px 4px;
    border-radius: 12px;
  }

  .ca-sidebar-update-status .ca-update-status-full {
    display: none;
  }

  .ca-sidebar-update-status .ca-update-status-short {
    display: block;
    font-size: 10px;
    line-height: 1;
  }

  .ca-calendar-head,
  .ca-calendar-week-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    overflow-x: hidden;
  }

  .ca-week-view-day {
    min-width: 0;
    min-height: 360px;
    padding: 10px;
  }

  .ca-week-view-date {
    gap: 6px;
  }

  .ca-calendar-week-grid .ca-chip {
    padding: 7px 8px;
    font-size: 11px;
  }
}

@media (max-width: 991.98px) {
  .ca-page { padding: 20px 0; }
  .ca-sidebar-mobile-toggle { top: auto; bottom: calc(18px + env(safe-area-inset-bottom)); }
  .ca-sidebar-logo {
    height: 70px;
    display: flex !important;
    align-items: center;
    border-bottom: 1px solid var(--ca-border);
  }
  .ca-sidebar-logo a {
    display: flex !important;
  }
  .ca-sidebar-brand {
    display: inline !important;
  }
  .ca-login-page .ca-login-left { min-height: auto; padding: 32px 22px !important; }
  .ca-login-page .ca-login-left .ca-auth-benefits { display: none; }
  .ca-login-page section:not(.ca-login-left) {
    min-height: auto;
    width: 100% !important;
    padding: 22px !important;
  }
  .ca-login-card {
    border-radius: 18px;
  }
  .ca-calendar-daily-copy {
    margin-top: 11px;
    padding-left: 17px;
  }
  .ca-budget-header-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .ca-calendar-quote {
    font-size: 1.2rem;
    line-height: 1.62;
  }
}

@media (max-width: 767.98px) {
  .ca-timeline-row .ca-row-actions {
    display: none;
  }

  .ca-calendar-toolbar {
    flex-direction: column;
    align-items: stretch !important;
  }

  .ca-budget-month-control {
    width: 100%;
  }

  .ca-calendar-new-event-desktop,
  #caOpenEventSide {
    display: none !important;
  }

  .ca-calendar-mobile-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .ca-calendar-view-switch {
    order: 1;
    width: 100%;
  }

  .ca-calendar-nav {
    order: 2;
    width: 100%;
    flex: 0 0 auto;
    margin-left: 0;
    justify-content: space-between;
  }

  .ca-calendar-nav-controls {
    flex: 0 0 auto;
  }

  .ca-calendar-title-wrap {
    order: 3;
    flex: 1 0 100%;
    text-align: left;
  }

  .ca-calendar-month-view .ca-month-cell {
    min-height: 118px;
  }

  .ca-calendar-month-view .ca-calendar-chip-icon {
    display: none;
  }

  .ca-calendar-month-view .ca-event-chip-time {
    display: none;
  }

  .ca-calendar-week-view {
    overflow-x: hidden;
  }

  .ca-calendar-week-grid-wrap {
    display: none;
  }

  .ca-calendar-week-list {
    display: grid;
    gap: 16px;
    padding: 8px 16px 18px;
  }

  .ca-calendar-week-list .ca-week-list-day {
    padding: 13px 14px 10px;
    border: 1px solid #e7ebf3;
    border-radius: 12px;
    background: #fbfcff;
    box-shadow: 0 8px 18px rgba(15,23,42,.035);
  }

  .ca-calendar-week-list .ca-week-list-day:last-child {
    border-bottom: 1px solid #e7ebf3;
  }

  .ca-calendar-week-list .ca-week-list-date {
    display: flex;
    align-items: center;
    min-height: 28px;
    margin-bottom: 6px;
    padding-bottom: 9px;
    border-bottom: 1px solid #edf1f7;
  }

  .ca-week-list-day {
    border-bottom: 1px solid #edf1f7;
    padding-bottom: 12px;
  }

  .ca-week-list-day:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .ca-week-list-date {
    color: #17213f;
    font-size: .94rem;
    font-weight: 800;
    margin-bottom: 8px;
  }

  .ca-week-list-date.is-today {
    color: var(--ca-primary);
  }

  .ca-week-list-empty {
    color: #7e879f;
    font-size: .9rem;
    font-weight: 600;
    padding: 8px 0 10px;
  }

  .ca-calendar-week-list .ca-day-event {
    min-height: 58px;
    padding: 10px 0;
    border-bottom-color: #f0f3f8;
  }

  .ca-calendar-week-list .ca-day-timeline .ca-day-event:last-child {
    border-bottom: 0;
  }

  .ca-dashboard-week-grid {
    display: none;
  }

  .ca-dashboard-week-list {
    display: grid;
    gap: 16px;
    padding: 8px 0 18px;
  }

  .ca-dashboard-week-list .ca-week-list-day {
    padding: 13px 14px 10px;
    border: 1px solid #e7ebf3;
    border-radius: 12px;
    background: #fbfcff;
    box-shadow: 0 8px 18px rgba(15,23,42,.035);
  }

  .ca-dashboard-week-list .ca-week-list-day:last-child {
    border-bottom: 1px solid #e7ebf3;
  }

  .ca-dashboard-week-list .ca-week-list-date {
    display: flex;
    align-items: center;
    min-height: 28px;
    margin-bottom: 6px;
    padding-bottom: 9px;
    border-bottom: 1px solid #edf1f7;
  }

  .ca-dashboard-week-list .ca-day-event {
    min-height: 58px;
    padding: 10px 0;
    border-bottom-color: #f0f3f8;
  }

  .ca-dashboard-week-list .ca-day-timeline .ca-day-event:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 575.98px) {
  body[data-dashboard-hero] .ca-dashboard-card { border-radius: 18px !important; }
  body[data-dashboard-hero] .ca-dashboard-card .card-header { min-height: 70px; padding-right: 16px; padding-left: 16px; }
  body[data-dashboard-hero] .ca-dashboard-section-icon { width: 36px; height: 36px; flex-basis: 36px; }
  body[data-dashboard-hero] .ca-dashboard-card-link { font-size: 12px; }
  body[data-dashboard-hero] .ca-dashboard-today-card .ca-empty-state { min-height: 220px; margin: 0 14px 10px; padding: 28px 16px; }
  body[data-dashboard-hero] .ca-dashboard-calendar-empty { min-height: 178px; padding: 8px 16px 20px; }
  body[data-dashboard-hero] .ca-dashboard-empty-image { width: 128px; max-width: 56%; max-height: 84px; }
  body[data-dashboard-hero] .ca-dashboard-budget-card .card-body { padding-right: 16px; padding-left: 16px; }
  body[data-dashboard-hero] .ca-budget-v2-saldo-value { font-size: 30px; }
  body[data-dashboard-hero] .ca-dashboard-week-list .ca-week-list-day { border-color: rgba(118,137,179,.14); border-radius: 14px; background: #fafbff; box-shadow: 0 8px 20px rgba(42,67,120,.04); }
  .ca-topbar .gap-4 { gap: .75rem !important; }
  .ca-toast-root {
    top: 78px;
    right: 16px;
    left: 16px;
    bottom: auto;
    width: auto;
  }
  .ca-toast {
    grid-template-columns: 34px minmax(0, 1fr) 28px;
    padding: 12px;
  }
  .ca-calendar-daily-title {
    font-size: 1.55rem;
  }
  .ca-calendar-daily-copy {
    max-width: 100%;
    margin-top: 9px;
    padding: 11px 0 1px 14px;
  }
  .ca-calendar-quote-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .ca-calendar-quote {
    flex-basis: auto;
    font-size: 1.1rem;
    line-height: 1.58;
  }
  .ca-calendar-quote-author {
    font-size: 12.5px;
  }
  .ca-calendar-toolbar { align-items: flex-start !important; }
  .ca-budget-header-actions .btn-primary {
    width: 100%;
  }
  .ca-budget-month-control {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
  }
  .ca-budget-category-row {
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }
  .ca-budget-category-row .text-gray-600 {
    display: none;
  }
  .ca-budget-chart {
    min-height: 220px;
  }
  .ca-calendar-title-wrap { width: 100%; }
  .ca-month-picker { left: 0; transform: none; width: min(260px, calc(100vw - 48px)); }
  .ca-calendar-month-view .ca-calendar-head div {
    padding: 8px 2px;
    font-size: 10px;
  }
  .ca-calendar-month-view .ca-month-cell {
    min-height: 92px;
    padding: 5px 2px;
  }
  .ca-calendar-month-view .ca-month-day-button {
    min-width: 20px;
    min-height: 20px;
    font-size: 11px;
  }
  .ca-calendar-month-view .ca-chip {
    margin-top: 3px;
    padding: 3px 4px;
    border-radius: 5px;
    font-size: 10px;
    line-height: 1.2;
  }
  .ca-calendar-month-view .ca-event-chip {
    gap: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .ca-calendar-month-view .ca-event-chip br {
    display: none;
  }
  .ca-calendar-month-view .ca-event-chip span,
  .ca-calendar-month-view .ca-event-chip small {
    display: none;
  }
  .ca-calendar-month-view .ca-more-events {
    margin-top: 4px;
    font-size: 10px;
  }
  .ca-calendar-week-view .ca-calendar-head div {
    padding: 8px 2px;
    font-size: 10px;
  }
  .ca-calendar-week-view .ca-week-view-day {
    min-height: 110px;
    padding: 6px 3px;
  }
  .ca-calendar-week-view .ca-week-view-date {
    min-height: 26px;
    gap: 4px;
    margin-bottom: 4px;
    align-items: flex-start;
    flex-direction: column;
  }
  .ca-calendar-week-view .ca-chip {
    margin-top: 4px;
    padding: 4px 5px;
    border-radius: 6px;
    font-size: 10px;
    line-height: 1.15;
  }
  .ca-calendar-week-view .ca-event-chip {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .ca-calendar-week-view .ca-event-chip br {
    display: none;
  }
  .ca-calendar-week-view .ca-event-chip span,
  .ca-calendar-week-view .ca-event-chip small {
    display: none;
  }
  .ca-calendar-week-view .ca-more-events,
  .ca-calendar-week-view .ca-week-empty {
    margin-top: 4px;
    font-size: 10px;
  }
  .ca-search-modal { top: 78px; padding: 18px; max-height: calc(100vh - 96px); }
  .ca-day-event { grid-template-columns: 58px 34px minmax(0, 1fr); gap: 10px; }
  .ca-match-reminder-event { min-height: 84px; padding: 14px 18px 14px 12px !important; }
  .ca-calendar-event-icon { width: 34px; height: 34px; flex-basis: 34px; }
  .ca-calendar-event-icon svg { width: 17px; height: 17px; }
  body[data-dashboard-hero] .ca-dashboard-budget-card .ca-budget-stacked-bar { height: 8px; }
  .ca-task-row { grid-template-columns: minmax(0, 1fr) 34px; }
  .ca-task-row > *:not(.ca-task-main):not(.ca-task-complete-toggle) { display: none !important; }
  .ca-timeline-row { grid-template-columns: 56px 18px 1fr; }
  .ca-timeline-row .badge { display: none; }
  .ca-timeline-title-wrap { gap: 7px; }
  .ca-timeline-avatar { width: 24px; height: 24px; min-width: 24px; font-size: 10px; }
  .ca-timeline:before { left: 72px; }
  .ca-quick-task-row { align-items: flex-start; }
  .ca-quick-task-row .badge { display: none; }
}

/* Final responsive overrides for the shared mobile shell. */
@media (max-width: 991.98px) {
  .ca-savings-goals-list.ca-savings-goals-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-height: 520px; padding: 2px 5px 2px 2px; }
  .ca-savings-goal.ca-savings-goal { display: flex; min-width: 0; min-height: 278px; overflow: hidden; flex-direction: column; align-items: stretch; gap: 0; padding: 0; border: 1px solid #e6ebf2; border-radius: 15px; background: #fff; }
}
@media (max-width: 767.98px) {
  .ca-savings-goals-list.ca-savings-goals-list { grid-template-columns: 1fr; max-height: 560px; }
  .ca-savings-goal.ca-savings-goal { min-height: 258px; }
}

/* Authoritative refinements after all legacy rules. */
.ca-savings-goal.ca-savings-goal { border: 1px solid #e1e7ef; border-bottom: 1px solid #e1e7ef; border-radius: 15px; background: #fff; box-shadow: none; cursor: pointer; transform: none; transition: border-color .15s ease, background-color .15s ease; }
.ca-savings-goal.ca-savings-goal:hover { border-color: #d3dbe7; background: #fefeff; box-shadow: none; transform: none; }
.ca-savings-goal.ca-savings-goal:hover img { transform: none; }
.ca-savings-goal-body { min-height: 0; padding-bottom: 16px; background: #fff; }
@media (max-width: 991.98px) {
  body.has-mobile-bottom-nav #kt_app_content { padding-bottom: calc(var(--family-mobile-bottom-nav-height) + env(safe-area-inset-bottom) + 16px) !important; }
  body.ca-updates-page.has-mobile-bottom-nav #caPage { padding-bottom: calc(var(--family-mobile-bottom-nav-height) + env(safe-area-inset-bottom) + 24px) !important; }
  body.has-mobile-bottom-nav.has-mobile-expense-cta #kt_app_content { padding-bottom: calc(var(--family-mobile-bottom-nav-height) + env(safe-area-inset-bottom) + 86px) !important; }
  body:has(.ca-backdrop.is-open, .ca-drawer.is-open, .modal.show) .ca-mobile-bottom-nav,
  body:has(.ca-backdrop.is-open, .ca-drawer.is-open, .modal.show) .ca-budget-mobile-cta { opacity: 0; pointer-events: none; visibility: hidden; }
  #caGoalDrawer { overflow-y: auto; overscroll-behavior: contain; }
  #caGoalForm { display: flex; min-height: 100%; flex-direction: column; }
  #caGoalForm > .p-7 { flex: 1; padding: 20px 18px !important; }
  .ca-goal-form-footer { z-index: 4; flex-wrap: wrap; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.98) !important; }
  .ca-goal-form-footer .btn { min-height: 40px; padding: 8px 13px; border-radius: 10px; }
  .ca-goal-form-footer .ms-auto { flex: 0 1 auto; }
  .ca-goal-secondary-action { align-items: flex-start; flex-direction: column; gap: 10px; }
  .ca-goal-secondary-action .btn { min-height: 38px; }
}
@media (max-width: 767.98px) {
  body[data-dashboard-hero] .ca-budget-v2-saldo-value { font-size: 32px; }
}
@media (max-width: 575.98px) {
  body[data-dashboard-hero] .ca-dashboard-card { box-shadow: 0 10px 26px rgba(42,67,120,.065); }
}

/* Dashboard: authoritative smartphone-only refinements. */
@media (max-width: 575.98px) {
  body[data-dashboard-hero] .ca-dashboard-budget-card .card-header {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
    gap: 8px 16px; min-height: 0; padding: 19.5px 16px 0 !important;
  }
  body[data-dashboard-hero] .ca-dashboard-budget-card .ca-dashboard-section-title { min-width: 0; margin: 0; }
  body[data-dashboard-hero] .ca-dashboard-budget-card > .card-header > .ca-budget-v2-status-pill { justify-self: end; }
  body[data-dashboard-hero] .ca-dashboard-budget-card .card-body { padding-top: 4px !important; }

  /* Padding orizzontale uniforme (16) sul corpo delle card widget su mobile */
  body[data-dashboard-hero] .ca-dashboard-categories-card > .card-body,
  body[data-dashboard-hero] .ca-dashboard-tasks-card > .card-body,
  body[data-dashboard-hero] .ca-dashboard-savings-card > .card-body,
  body[data-dashboard-hero] .ca-dashboard-week-card > .card-body,
  body[data-dashboard-hero] .ca-dashboard-updates-card > .card-body {
    padding-right: 16px !important;
    padding-left: 16px !important;
  }

  body[data-dashboard-hero] .ca-dashboard-week-list { gap: 12px; padding: 8px 0 18px; }
  body[data-dashboard-hero] .ca-dashboard-week-list .ca-week-list-day,
  body[data-dashboard-hero] .ca-dashboard-week-list .ca-week-list-day:last-child {
    padding: 15px; border: 1px solid rgba(118,137,179,.12); border-radius: 15px;
    background: #fff; box-shadow: 0 4px 14px rgba(42,67,120,.025);
  }
  body[data-dashboard-hero] .ca-dashboard-week-list .ca-week-list-date {
    display: flex; min-height: 0; flex-direction: column; align-items: flex-start;
    margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid rgba(118,137,179,.12); line-height: 1.2;
  }
  body[data-dashboard-hero] .ca-dashboard-mobile-weekday { color: #7a84a3; font-size: 12px; font-weight: 500; }
  body[data-dashboard-hero] .ca-dashboard-mobile-date { margin-top: 3px; color: #14213d; font-size: 14px; font-weight: 600; }
  body[data-dashboard-hero] .ca-dashboard-week-list .ca-day-timeline { gap: 8px; }
  body[data-dashboard-hero] .ca-dashboard-mobile-event {
    width: 100%; min-height: 56px; grid-template-columns: 64px 8px minmax(0, 1fr); gap: 10px;
    padding: 10px 12px; border: 0; border-radius: 11px; background: var(--ca-dashboard-event-bg);
    box-shadow: none; color: var(--ca-dashboard-event-color); font-family: var(--family-font-body); text-align: left;
  }
  body[data-dashboard-hero] .ca-dashboard-mobile-event:hover,
  body[data-dashboard-hero] .ca-dashboard-mobile-event:focus-visible { border: 0; background: var(--ca-dashboard-event-bg); box-shadow: none; }
  body[data-dashboard-hero] .ca-dashboard-mobile-event .ca-day-time { color: currentColor; font-size: 11px; font-weight: 500; }
  body[data-dashboard-hero] .ca-dashboard-mobile-event .ca-dot { width: 8px; height: 8px; }
  body[data-dashboard-hero] .ca-dashboard-mobile-event .fw-bold { color: #14213d; font-size: 13px; font-weight: 600 !important; line-height: 1.3; }
  body[data-dashboard-hero] .ca-dashboard-mobile-event .fs-7 {
    display: block; margin-top: 2px; color: #667085; font-size: 11px !important; font-weight: 500; line-height: 1.3;
  }
  body[data-dashboard-hero] .ca-dashboard-week-list .ca-week-list-empty {
    display: inline-flex; width: auto; min-height: 28px; align-items: center; margin: 2px 0 1px;
    padding: 5px 12px; border-radius: 999px; background: #eee9ff; color: #7564c2;
    font-family: var(--family-font-body); font-size: 11px; font-weight: 500; line-height: 1;
  }
}
@media (max-width: 379.98px) {
  body[data-dashboard-hero] .ca-dashboard-budget-card .card-header { grid-template-columns: minmax(0, 1fr); }
  body[data-dashboard-hero] .ca-dashboard-budget-card > .card-header > .ca-budget-v2-status-pill { grid-row: 2; justify-self: end; }
}

/* Budget: compact mobile expense CTA. */
@media (max-width: 767.98px) {
  .ca-budget-mobile-cta {
    right: 16px;
    bottom: calc(var(--family-mobile-bottom-nav-height) + env(safe-area-inset-bottom) + 10px) !important;
    width: auto;
    min-width: 0;
    min-height: 44px;
    gap: 8px;
    padding: 6px 16px 6px 7px;
    border: 0;
    border-radius: 999px !important;
    background: #356df3;
    color: #fff;
    box-shadow: 0 8px 20px rgba(53, 109, 243, .28);
    font-family: var(--family-font-body);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    transition: background-color .15s ease, box-shadow .15s ease, transform .1s ease;
  }

  .ca-budget-mobile-cta > i {
    position: relative;
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    margin: 0;
    border-radius: 50%;
    background: #fff;
    color: #356df3;
    font-size: 17px !important;
    font-weight: 400;
    line-height: 1;
  }

  .ca-budget-mobile-cta > i::before {
    display: none !important;
    content: none !important;
  }

  .ca-budget-mobile-cta > i::after {
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    width: 10px;
    height: 10px;
    content: "";
    background:
      linear-gradient(#356df3, #356df3) center / 10px 2px no-repeat,
      linear-gradient(#356df3, #356df3) center / 2px 10px no-repeat;
    transform: translate(-50%, -50%);
  }

  .ca-budget-mobile-cta:active { transform: scale(.98); }

  .ca-budget-mobile-cta:focus-visible {
    outline: 3px solid rgba(53, 109, 243, .35);
    outline-offset: 3px;
  }

  body.has-mobile-bottom-nav.has-mobile-expense-cta #kt_app_content {
    padding-bottom: calc(var(--family-mobile-bottom-nav-height) + env(safe-area-inset-bottom) + 70px) !important;
  }
}

@media (max-width: 767.98px) and (hover: hover) and (pointer: fine) {
  .ca-budget-mobile-cta:hover {
    background: #285edc;
    box-shadow: 0 10px 24px rgba(53, 109, 243, .34);
  }
}

/* Budget page: illustrated hero that fades into the page, plus compact analytics. */
.ca-budget-page .ca-budget-hero {
  --ca-budget-hero-bleed-x: 30px;
  --ca-budget-hero-bleed-width: 60px;
  position: relative;
  width: calc(100% + var(--ca-budget-hero-bleed-width));
  min-height: 248px;
  margin-top: -28px;
  margin-right: calc(var(--ca-budget-hero-bleed-x) * -1);
  margin-left: calc(var(--ca-budget-hero-bleed-x) * -1);
  overflow: visible;
  align-content: center;
  align-items: center !important;
  padding: 64px calc(34px + var(--ca-budget-hero-bleed-x)) 36px;
  border: 0;
  border-radius: 0;
  background: #f3f6ff url("images/budget/budget-hero-desktop.webp") center center / cover no-repeat;
  box-shadow: none;
  isolation: isolate;
}

.ca-budget-page .ca-budget-hero::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  background:
    linear-gradient(90deg, #f6f8fc 0%, rgba(246, 248, 252, .92) 29%, rgba(246, 248, 252, .52) 51%, rgba(246, 248, 252, .06) 75%),
    linear-gradient(180deg, rgba(246, 248, 252, 0) 44%, #f6f8fc 100%);
}

.ca-budget-page .ca-budget-hero-copy { position: relative; z-index: 1; max-width: 54%; }
.ca-budget-page .ca-budget-hero h1 { color: #14213d !important; font-family: var(--family-font-heading); font-size: clamp(30px, 2.35vw, 36px); font-weight: 600 !important; letter-spacing: -.035em; }
.ca-budget-page .ca-budget-hero-copy .text-gray-600 { max-width: 560px; color: #687697 !important; line-height: 1.55; }
.ca-budget-page .ca-budget-header-actions { position: relative; z-index: 1; align-self: flex-end; }
.ca-budget-page .ca-budget-header-actions .btn { box-shadow: 0 7px 18px rgba(42, 67, 120, .08); }

.ca-budget-page .ca-budget-analytics-row > div { display: flex; }
.ca-budget-page .ca-budget-analytics-row .card { width: 100%; border-color: rgba(118, 137, 179, .12); border-radius: 20px; box-shadow: 0 10px 28px rgba(42, 67, 120, .045); }
.ca-budget-page .ca-budget-analytics-row .card-header { min-height: 68px; align-items: center; padding: 18px 20px 10px; }
.ca-budget-page .ca-budget-analytics-row .card-body { padding: 8px 20px 18px; }
.ca-budget-page .ca-budget-monthly-card .card-title i { display: none; }
.ca-budget-page .ca-budget-chart { min-height: 0; }
.ca-budget-page .ca-budget-chart-grid { stroke: #edf1f7; stroke-width: 1; }
.ca-budget-page .ca-budget-chart-label { fill: #7d879d; font-size: 11px; font-weight: 600; }
.ca-budget-page .ca-budget-chart-line { stroke-width: 2; }
.ca-budget-page .ca-budget-chart-month rect { fill: #e8f0ff; }
.ca-budget-page .ca-budget-chart-month.is-active .ca-budget-chart-label { fill: #356df3; font-weight: 700; }
.ca-budget-page .ca-budget-chart-legend { gap: 18px !important; font-size: 11px; font-weight: 600; }

/* Andamento mensile: evidenzia le due serie senza separarle dai dati reali del budget. */
.ca-budget-page .ca-budget-monthly-card.ca-budget-monthly-card-dark {
  overflow: hidden;
  border: 1px solid rgba(112, 138, 255, .28);
  border-radius: 18px;
  background:
    radial-gradient(circle at 88% 7%, rgba(101, 125, 255, .34), transparent 36%),
    radial-gradient(circle at 44% 110%, rgba(32, 218, 167, .16), transparent 44%),
    linear-gradient(135deg, #3f63df 0%, #253d9b 44%, #17275d 100%);
  box-shadow: 0 12px 28px rgba(32, 50, 123, .16);
}
.ca-budget-page .ca-budget-monthly-card-dark .card-header {
  min-height: 0;
  padding: 15px 18px 8px;
  gap: 12px;
  align-items: flex-start;
}
.ca-budget-page .ca-budget-monthly-card-dark .card-title,
.ca-budget-page .ca-budget-monthly-card-dark .card-title span { color: #fff; }
.ca-budget-page .ca-budget-monthly-card-dark .card-title span { font-size: var(--text-xl); }
.ca-budget-page .ca-budget-monthly-card-dark .card-body { padding: 0 16px 13px; }
.ca-budget-page .ca-budget-monthly-card-dark .ca-budget-chart { min-height: 0; height: auto; }
.ca-budget-page .ca-budget-monthly-card-dark .ca-budget-chart-grid { stroke: rgba(220, 228, 255, .20); }
.ca-budget-page .ca-budget-monthly-card-dark .ca-budget-chart-label { fill: rgba(237, 242, 255, .72); font-size: 10px; }
.ca-budget-page .ca-budget-monthly-card-dark .ca-budget-chart-month rect { fill: rgba(157, 180, 255, .38); }
.ca-budget-page .ca-budget-monthly-card-dark .ca-budget-chart-month.is-active .ca-budget-chart-label { fill: #fff; }
.ca-budget-page .ca-budget-monthly-card-dark .ca-budget-chart-line { stroke-width: 2.6; }
.ca-budget-page .ca-budget-monthly-card-dark .ca-budget-chart-point { stroke: rgba(255, 255, 255, .85); stroke-width: 1.6; }
.ca-budget-page .ca-budget-monthly-card-dark .ca-budget-chart-hover-line { stroke: rgba(255, 255, 255, .68); }
.ca-budget-chart-summary { display: flex; align-items: stretch; gap: 7px; }
.ca-budget-chart-summary-item {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr);
  gap: 7px;
  min-width: 82px;
  padding: 7px 9px;
  border: 1px solid rgba(224, 233, 255, .20);
  border-radius: 9px;
  background: rgba(11, 27, 92, .16);
}
.ca-budget-chart-summary-item > i { width: 6px; height: 6px; margin-top: 4px; border-radius: 50%; }
.ca-budget-chart-summary-item.is-income > i { background: #64e39b; box-shadow: 0 0 0 3px rgba(100, 227, 155, .12); }
.ca-budget-chart-summary-item.is-expense > i { background: #ff8eaa; box-shadow: 0 0 0 3px rgba(255, 142, 170, .12); }
.ca-budget-chart-summary-item > span { display: grid; gap: 1px; color: rgba(242, 246, 255, .76); font-size: var(--text-xs); font-weight: var(--font-medium); line-height: 1.1; }
.ca-budget-chart-summary-item strong { color: #fff; font-size: var(--text-2xs); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ca-budget-chart-insight {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  margin-top: 5px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .075);
  color: rgba(245, 248, 255, .88);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.35;
}
.ca-budget-chart-insight > svg { width: 17px; height: 17px; flex: 0 0 auto; color: #8fb4ff; }
.ca-budget-chart-insight.is-income strong { color: #72e5a1; }
.ca-budget-chart-insight.is-expense > svg,
.ca-budget-chart-insight.is-expense strong { color: #ff9ab1; }

@media (max-width: 991.98px) {
  .ca-budget-page .ca-budget-monthly-card-dark .card-header { align-items: center; }
  .ca-budget-chart-summary-item { min-width: 94px; }
}

.ca-budget-page .ca-budget-category-layout { gap: 15px; }
.ca-budget-page .ca-budget-category-list {
  display: grid;
  gap: 12px;
}
.ca-budget-page .ca-budget-category-detail-list { gap: 14px; }
.ca-budget-page .ca-budget-category-row {
  grid-template-columns: 36px minmax(64px, 130px) minmax(60px, 1fr) auto 42px;
  gap: 12px;
  min-width: 0;
  min-height: 36px;
  font-size: 12px;
}
.ca-budget-page .ca-budget-category-row-name { color: #17213f; font-size: var(--text-md); font-weight: 700; }
.ca-budget-page .ca-budget-category-amount { color: #17213f; font-size: 12px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.ca-budget-page .ca-budget-category-percentage { display: inline-flex; min-width: 38px; height: 24px; align-items: center; justify-content: center; justify-self: end; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ca-budget-page .ca-budget-category-icon { width: 36px; height: 36px; min-width: 36px; border-radius: 11px; }
.ca-budget-page .ca-budget-category-icon svg { width: 18px; height: 18px; }
.ca-budget-page .ca-budget-category-card .ca-budget-category-metrics { margin-left: 0; gap: 0; text-align: left; }
.ca-budget-page .ca-budget-category-card .ca-budget-category-metric { display: block; color: #7d879d; font-size: 11px; font-weight: 600; line-height: 1.35; }
.ca-budget-page .ca-budget-category-card .ca-budget-category-metric strong { display: inline; margin: 0; color: #17213f; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }

.ca-budget-page .ca-budget-category-card .ca-budget-stacked-bar {
  position: relative;
  height: 10px;
  overflow: visible;
  border: 0;
  border-radius: 999px;
  background: #f1f4f9;
  isolation: isolate;
}
.ca-budget-page .ca-budget-stacked-segment { position: relative; min-width: 0; height: 100%; outline: none; }
.ca-budget-page .ca-budget-stacked-segment + .ca-budget-stacked-segment { border: 0; box-shadow: inset 2px 0 0 #fff; }
.ca-budget-page .ca-budget-stacked-segment:first-child { border-radius: 999px 0 0 999px; }
.ca-budget-page .ca-budget-stacked-segment:last-child { border-radius: 0 999px 999px 0; }
.ca-budget-page .ca-budget-stacked-segment:only-child { border-radius: 999px; }
.ca-budget-page .ca-budget-stacked-segment::after {
  content: attr(data-tooltip);
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: calc(100% + 8px);
  width: max-content;
  max-width: 220px;
  padding: 6px 9px;
  border-radius: 7px;
  background: #17213f;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 3px);
  transition: opacity .14s ease, transform .14s ease;
  white-space: nowrap;
}
.ca-budget-page .ca-budget-stacked-segment:hover::after,
.ca-budget-page .ca-budget-stacked-segment:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.ca-budget-page .ca-budget-stacked-segment:focus-visible { z-index: 2; box-shadow: inset 0 0 0 2px #17213f; }

.ca-recurring-category-icon { width: 36px; height: 36px; flex-basis: 36px; border-radius: 11px; }
.ca-recurring-category-icon svg { width: 18px; height: 18px; }
.ca-budget-table-category-icon { width: 30px; height: 30px; flex-basis: 30px; border-radius: 9px; }
.ca-budget-table-category-icon svg { width: 15px; height: 15px; }
.ca-card-movement-icon { width: 38px; height: 38px; flex-basis: 38px; border-radius: 11px; }
.ca-card-movement-icon svg { width: 18px; height: 18px; }

.ca-settings-category-card .card-body { min-height: 88px; }
.ca-settings-category-icon {
  display: inline-grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  border-radius: 14px;
}
.ca-settings-category-icon svg { width: 22px; height: 22px; }

.ca-page-transition {
  position: fixed;
  z-index: 1080;
  inset: 0 0 0 var(--bs-app-sidebar-width, 265px);
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(247, 249, 253, .72);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  -webkit-backdrop-filter: blur(5px) saturate(.88);
  backdrop-filter: blur(5px) saturate(.88);
  transition: opacity .18s ease, visibility 0s linear .18s;
}
.ca-page-transition.is-visible {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition-delay: 0s;
}
.ca-page-transition.is-continuation { transition: none; }
.ca-page-transition-content {
  display: inline-flex;
  min-width: 190px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 15px 20px;
  border: 1px solid rgba(118, 137, 179, .13);
  border-radius: 15px;
  background: rgba(255, 255, 255, .88);
  color: #17213f;
  box-shadow: 0 12px 34px rgba(42, 67, 120, .09);
}
.ca-page-transition-content .spinner-border {
  width: 20px;
  height: 20px;
  border-width: 2px;
}
.ca-page-transition-content strong {
  font-family: var(--family-font-body);
  font-size: 14px;
  font-weight: 600;
}
@media (max-width: 991.98px) {
  .ca-page-transition {
    inset: 0 0 calc(var(--family-mobile-bottom-nav-height) + env(safe-area-inset-bottom)) 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ca-page-transition { transition: none; }
}


@media (max-width: 1199.98px) {
  .ca-budget-page .ca-budget-hero { min-height: 233px; padding: 58px calc(28px + var(--ca-budget-hero-bleed-x)) 30px; }
  .ca-budget-page .ca-budget-hero-copy { max-width: 58%; }
}

@media (max-width: 991.98px) {
  .ca-budget-page .ca-budget-hero { --ca-budget-hero-bleed-x: 20px; --ca-budget-hero-bleed-width: 40px; min-height: 225px; margin-top: -20px; padding-top: 50px; padding-bottom: 30px; }
}

@media (max-width: 767.98px) {
  .ca-budget-page { overflow-x: visible; }
  .ca-budget-page .ca-budget-hero {
    width: 100vw;
    min-height: 204px;
    margin-right: calc(50% - 50vw);
    margin-left: calc(50% - 50vw);
    align-content: flex-start;
    align-items: flex-start !important;
    padding: 40px 24px 20px;
    border-radius: 0;
    background-image: url("images/budget/budget-hero-mobile.webp");
    background-position: center 62%;
  }
  .ca-budget-page .ca-budget-hero::before { background: linear-gradient(180deg, #f6f8fc 0%, rgba(246, 248, 252, .85) 34%, rgba(246, 248, 252, .08) 66%, #f6f8fc 100%); }
  .ca-budget-page .ca-budget-hero-copy { max-width: 100%; }
  .ca-budget-page .ca-budget-hero h1 { font-size: 25px; }
  .ca-budget-page .ca-budget-hero-copy .text-gray-600 { max-width: 92%; font-size: 13px !important; line-height: 1.45; }
  .ca-budget-page .ca-budget-header-actions { width: 100%; align-self: auto; margin-top: 4px; }
  .ca-budget-page .ca-budget-month-control { width: 100%; }
  .ca-budget-page .ca-budget-monthly-column { display: block !important; }
  .ca-budget-page .ca-budget-analytics-row .card-header { min-height: 62px; padding: 16px 15px 8px; }
  .ca-budget-page .ca-budget-analytics-row .card-body { padding: 6px 12px 15px; }
  .ca-budget-page .ca-budget-chart-legend { gap: 10px !important; }
  .ca-budget-page .ca-budget-chart { min-width: 0; }
  .ca-budget-table-date-year { display: none; }
  .ca-budget-page .ca-budget-category-card .card-header { display: grid; gap: 10px; }
  .ca-budget-page .ca-budget-category-card .ca-budget-category-metrics { width: 100%; justify-content: flex-start; margin-left: 0; text-align: left; }
  .ca-budget-page .ca-budget-category-list { gap: 7px; }
  .ca-budget-page .ca-budget-category-card .ca-budget-stacked-bar { height: 8px; }
  .ca-budget-page .ca-budget-category-row { grid-template-columns: 34px minmax(50px, 88px) minmax(36px, 1fr) auto 40px; gap: 8px; }
  .ca-budget-page .ca-budget-category-row-name { font-size: 11.5px; }
  .ca-budget-page .ca-budget-category-icon { width: 34px; height: 34px; min-width: 34px; border-radius: 11px; }
  .ca-budget-page .ca-budget-category-icon svg { width: 17px; height: 17px; }
}

@media (max-width: 359.98px) {
  .ca-budget-page .ca-budget-chart-legend { font-size: 10px; }
  .ca-budget-page .ca-budget-analytics-row .card-header { align-items: flex-start; flex-direction: column; }
}

/* Budget: compact three-card overview. */
.ca-budget-overview-row > div { display: flex; }
.ca-budget-overview-card { width: 100%; min-height: 255px; border-color: rgba(118,137,179,.12); border-radius: 20px; box-shadow: 0 10px 28px rgba(42,67,120,.045); }
.ca-budget-overview-card > .card-header { min-height: 68px; align-items: center; padding: 18px 20px 12px; }
.ca-budget-overview-card > .card-header .card-title { color: #14213d; font-family: var(--family-font-heading); font-weight: 600; }
.ca-budget-overview-card > .card-body { padding: 8px 20px 20px; }
.ca-budget-overview-link { display: inline-flex; align-items: center; gap: 4px; padding: 4px 0; border: 0; background: transparent; color: #356df3; font-family: var(--family-font-body); font-size: 12px; font-weight: 600; white-space: nowrap; }
.ca-budget-overview-link i { font-size: 12px; }

.ca-credit-cards-overview > .card-body { display: flex; flex-direction: column; justify-content: center; }
.ca-credit-cards-overview .ca-credit-cards { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
/* Height follows content (no fixed aspect-ratio) and chip/number flow in the
   normal vertical stack instead of being absolutely positioned on top of the
   amount. */
.ca-credit-cards-overview .ca-credit-card { min-height: 274px; aspect-ratio: auto; padding: 17px 17px 18px; gap: 9px; border-radius: 15px; border-color: rgba(255, 255, 255, .5); box-shadow: none; }
.ca-credit-cards-overview .ca-credit-card-detail-link { display: inline-flex; font-size: var(--text-xs); }
.ca-credit-cards-overview .ca-credit-card-detail-link i { font-size: 10px !important; }
.ca-credit-cards-overview .ca-credit-card-label { font-size: var(--text-2xs); }
.ca-credit-cards-overview .ca-credit-card-name { margin-top: 0; font-size: var(--text-md); }
.ca-credit-cards-overview .ca-credit-card-middle { position: static; transform: none; inset: auto; gap: 8px; margin: 2px 0 0; }
.ca-credit-cards-overview .ca-credit-card-chip { width: 26px; height: 19px; flex-basis: 26px; border-radius: 5px; }
.ca-credit-cards-overview .ca-credit-card-number { font-size: var(--text-sm); letter-spacing: .04em; }
.ca-credit-cards-overview .ca-credit-card-spend { margin-top: auto; }
.ca-credit-cards-overview .ca-credit-card-facts { margin-top: 9px; }
.ca-credit-cards-overview .ca-credit-card-facts b { white-space: normal; overflow: visible; text-overflow: clip; }
.ca-credit-cards-overview .ca-credit-card-summary { margin-top: 10%; }
.ca-credit-cards-overview .ca-credit-card-charge-label { font-size: var(--text-2xs); }
.ca-credit-cards-overview .ca-credit-card-charge-date { margin-top: 3px; font-size: var(--text-2xs); }
.ca-credit-cards-overview .ca-credit-card-amount { font-size: var(--text-lg); }
.ca-credit-cards-overview .ca-credit-card-status { margin-top: 3px; font-size: var(--text-2xs); letter-spacing: .015em; }

.ca-featured-goal { display: grid; width: 100%; min-width: 0; grid-template-columns: 132px minmax(0,1fr); gap: 16px; align-items: center; padding: 0; border: 0; background: transparent; color: #344054; font-family: var(--family-font-body); text-align: left; }
.ca-featured-goal-image { display: block; width: 132px; aspect-ratio: 1; box-sizing: border-box; overflow: hidden; padding: 4px; border: 1px solid rgba(255,255,255,.98); border-radius: 16px; background: #fff; box-shadow: 0 3px 9px rgba(38,51,77,.13); }
.ca-featured-goal-image img { width: 100%; height: 100%; border-radius: 11px; object-fit: cover; }
.ca-featured-goal-content { display: grid; min-width: 0; gap: 11px; }
.ca-featured-goal-heading { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 8px; }
.ca-featured-goal-heading strong { min-width: 0; overflow: hidden; color: #14213d; font-family: var(--family-font-heading); font-size: 15px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.ca-featured-goal-heading .badge { flex: 0 0 auto; }
.ca-featured-goal-amount { display: flex; min-width: 0; align-items: baseline; gap: 5px; color: #667085; font-size: 12px; white-space: nowrap; }
.ca-featured-goal-amount b { color: #17213f; font-size: 17px; }
.ca-featured-goal-progress { display: grid; gap: 7px; color: #208a62; font-size: 12px; font-weight: 700; }
.ca-featured-goal-progress .progress { width: 100%; background: #edf4f1; }
.ca-goals-drawer-list { display: grid; gap: 12px; }
.ca-featured-goal.is-list { grid-template-columns: 124px minmax(0,1fr); padding: 12px; border: 1px solid #e6ebf2; border-radius: 15px; background: #fff; }
.ca-featured-goal.is-list .ca-featured-goal-image { width: 124px; height: 104px; aspect-ratio: auto; }

.ca-budget-overview-card .ca-budget-recurring-list { display: grid; max-height: none; gap: 2px; padding-right: 0; overflow: visible; }
.ca-budget-overview-card .ca-budget-recurring-row { min-height: 48px; gap: 9px; padding: 4px 0; border-bottom: 0; }
.ca-recurring-category-icon { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border-radius: 11px; }
.ca-recurring-category-icon svg { width: 18px; height: 18px; }
.ca-budget-overview-card .ca-budget-recurring-title { overflow: hidden; color: #14213d !important; font-family: var(--family-font-body); font-size: 12px; font-weight: 600 !important; text-overflow: ellipsis; white-space: nowrap; }
.ca-budget-overview-card .ca-budget-recurring-meta { overflow: hidden; color: #7a8499 !important; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.ca-budget-overview-card .ca-budget-recurring-amount { color: #17213f; font-size: 12px; font-weight: 700; }
.ca-budget-recurring-next { flex: 0 0 auto; padding: 4px 8px; border-radius: 999px; color: #219469; background: #e8f8f0; font-size: var(--text-2xs); font-weight: var(--font-semibold); line-height: 1.15; white-space: nowrap; }
.ca-budget-recurring-edit-row {
  width: calc(100% + 12px);
  margin: 0 -6px;
  padding: 7px 6px !important;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.ca-budget-recurring-edit-row:hover { background: #f5f7ff; box-shadow: inset 0 0 0 1px rgba(92, 106, 228, .10); transform: translateX(2px); }
.ca-budget-recurring-edit-row:focus-visible { outline: 2px solid rgba(79, 70, 255, .42); outline-offset: 2px; background: #f5f7ff; }
.ca-budget-recurring-edit-cue { display: inline-flex; align-items: center; gap: 4px; margin-left: 2px; color: #6074dd; font-size: var(--text-2xs); font-weight: var(--font-semibold); opacity: 0; transform: translateX(-3px); transition: opacity .16s ease, transform .16s ease; }
.ca-budget-recurring-edit-cue svg { width: 13px; height: 13px; }
.ca-budget-recurring-edit-row:hover .ca-budget-recurring-edit-cue,
.ca-budget-recurring-edit-row:focus-visible .ca-budget-recurring-edit-cue { opacity: 1; transform: translateX(0); }

@media (hover: none) {
  .ca-budget-recurring-edit-cue { opacity: .78; transform: none; }
  .ca-budget-recurring-edit-cue > span { display: none; }
}

@media (max-width: 1199.98px) {
  .ca-budget-overview-card { min-height: 255px; }
}
@media (max-width: 767.98px) {
  .ca-budget-overview-row > div { width: 100%; }
  .ca-budget-overview-card { min-height: 0; }
  .ca-credit-cards-overview .ca-credit-cards { grid-template-columns: 1fr 1fr; }
  .ca-featured-goal { grid-template-columns: 116px minmax(0,1fr); }
  .ca-featured-goal-image { width: 116px; }
  .ca-budget-recurring-next { padding: 4px 6px; font-size: 8.5px; }
}
@media (max-width: 575.98px) {
  .ca-credit-cards-overview .ca-credit-cards { grid-template-columns: 1fr; }
  .ca-credit-cards-overview .ca-credit-card { padding: 16px 15px; min-height: 262px; }
  .ca-credit-cards-overview .ca-credit-card-label { font-size: 9px; }
  .ca-credit-cards-overview .ca-credit-card-name { margin-top: 0; font-size: 15px; }
  .ca-credit-cards-overview .ca-credit-card-detail-link { font-size: 9px; }
  .ca-credit-cards-overview .ca-credit-card-detail-link i { font-size: 11px !important; }
  .ca-credit-cards-overview .ca-credit-card-middle { gap: 8px; margin: 2px 0 0; }
  .ca-credit-cards-overview .ca-credit-card-chip { width: 27px; height: 20px; flex-basis: 27px; border-radius: 6px; }
  .ca-credit-cards-overview .ca-credit-card-number { font-size: 12px; letter-spacing: .035em; }
  .ca-credit-cards-overview .ca-credit-card-summary { margin-top: 11%; }
  .ca-credit-cards-overview .ca-credit-card-charge-label { font-size: 9px; }
  .ca-credit-cards-overview .ca-credit-card-charge-date { font-size: 10.5px; }
  .ca-credit-cards-overview .ca-credit-card-amount { font-size: 18px; }
  .ca-credit-cards-overview .ca-credit-card-status { font-size: 8.5px; }
}
@media (max-width: 379.98px) {
  .ca-featured-goal { grid-template-columns: 86px minmax(0,1fr); gap: 12px; }
  .ca-featured-goal-image { width: 86px; }
}

.ca-budget-filters-toggle,
.ca-budget-filters-reduce { display: none; }

@media (max-width: 767.98px) {
  .ca-budget-monthly-card-mobile .card-body { padding-top: 4px !important; }
  .ca-budget-mobile-bars { display: grid; height: 205px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; align-items: end; padding: 8px 0 0; }
  .ca-budget-mobile-bar-month { display: grid; min-width: 0; grid-template-rows: 26px 132px 30px; align-items: end; text-align: center; }
  .ca-budget-mobile-bar-values { display: flex; justify-content: center; gap: 6px; font-size: 10px; font-weight: 700; }
  .ca-budget-mobile-bar-values .is-income { color: #35ad69; }
  .ca-budget-mobile-bar-values .is-expense { color: #df526f; }
  .ca-budget-mobile-bar-plot { display: flex; height: 132px; align-items: end; justify-content: center; gap: 6px; border-bottom: 1px solid #e5eaf2; background: repeating-linear-gradient(to top, transparent 0, transparent 43px, #f0f3f8 44px); }
  .ca-budget-mobile-bar-plot > span { display: block; width: min(20px, 31%); min-height: 2px; border-radius: 5px 5px 2px 2px; }
  .ca-budget-mobile-bar-plot > .is-income { background: linear-gradient(180deg, #62d894, #42bd76); }
  .ca-budget-mobile-bar-plot > .is-expense { background: linear-gradient(180deg, #f58aa0, #ed637f); }
  .ca-budget-mobile-bar-month > strong { align-self: center; color: #77819a; font-size: 11.5px; font-weight: 600; text-transform: capitalize; }
  .ca-budget-mobile-bar-month.is-active > strong { display: inline-flex; justify-self: center; padding: 4px 10px; border-radius: 999px; background: #e8f0ff; color: #356df3; font-weight: 700; }

  .ca-budget-filters > .card-body { padding: 0 16px 16px !important; }
  .ca-budget-filters-toggle { display: flex; width: 100%; min-height: 58px; align-items: center; justify-content: space-between; padding: 0 18px; border: 0; background: transparent; color: #17213f; font-family: var(--family-font-body); }
  .ca-budget-filters-toggle > span { display: inline-flex; align-items: center; gap: 10px; }
  .ca-budget-filters-toggle > span > i { color: #356df3; font-size: 18px; }
  .ca-budget-filters-toggle strong { font-size: 14px; font-weight: 600; }
  .ca-budget-filters-chevron { color: #7b869d; font-size: 15px; transition: transform .18s ease; }
  .ca-budget-filters-panel { display: none; }
  .ca-budget-filters.is-expanded .ca-budget-filters-panel { display: block; }
  .ca-budget-filters.is-expanded .ca-budget-filters-chevron { transform: rotate(180deg); }
  .ca-budget-filters-reduce { min-height: 38px; align-items: center; justify-content: center; gap: 6px; margin: 14px auto 0; padding: 7px 14px; border: 0; border-radius: 9px; background: #f1f5fb; color: #53617a; font-family: var(--family-font-body); font-size: 12px; font-weight: 600; }
  .ca-budget-filters.is-expanded .ca-budget-filters-reduce { display: flex; }
}

/* Calendar page: visual system aligned with the Family Home dashboard. */
.ca-calendar-page .ca-calendar-hero {
  position: relative; min-height: 242px; overflow: hidden; align-content: center; padding: 32px 34px;
  border: 1px solid rgba(118,137,179,.1); border-radius: 22px;
  background: #f3f5ff url("images/calendar/calendar-hero-desktop.webp") center center / cover no-repeat;
  box-shadow: 0 12px 32px rgba(42,67,120,.05); isolation: isolate;
}
.ca-calendar-page .ca-calendar-hero::before {
  content: ""; position: absolute; z-index: -1; inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,.94) 0%, rgba(255,255,255,.78) 30%, rgba(255,255,255,.28) 52%, rgba(255,255,255,0) 70%);
}
.ca-calendar-page .ca-calendar-hero > .min-w-0 { max-width: 58%; }
.ca-calendar-page .ca-calendar-daily-title { color: #14213d !important; font-family: var(--family-font-heading); font-size: clamp(30px,2.35vw,36px); font-weight: 600 !important; letter-spacing: -.035em; }
.ca-calendar-page .ca-calendar-daily-copy { max-width: 620px; margin-top: 22px; padding: 0; border-left: 0; }
.ca-calendar-page .ca-calendar-quote { color: #26385f; font-family: Georgia,"Times New Roman",serif; font-size: 17px; font-style: italic; font-weight: 600; line-height: 1.55; }
.ca-calendar-page .ca-calendar-quote-mark { color: #356df3; }
.ca-calendar-page .ca-calendar-quote-author { margin-top: 8px; color: #687697; font-family: var(--family-font-body); font-size: var(--text-md); font-weight: var(--font-medium); }
.ca-calendar-page .ca-calendar-new-event-desktop { min-height: 48px; padding: 10px 20px; border-radius: 12px; box-shadow: 0 10px 22px rgba(53,109,243,.18); }

.ca-calendar-page > .row { align-items: stretch; }
.ca-calendar-page .ca-calendar-main-card,
.ca-calendar-page .ca-calendar-upcoming-card { overflow: hidden; border-color: rgba(118,137,179,.12) !important; border-radius: 22px !important; box-shadow: 0 12px 32px rgba(42,67,120,.05); }
.ca-calendar-page .ca-calendar-main-card { min-height: 620px; }
.ca-calendar-page .ca-calendar-upcoming-card { min-height: 620px; }
.ca-calendar-page .ca-calendar-upcoming-card .card-header { min-height: 80px; padding-right: 24px; padding-left: 24px; }
.ca-calendar-page .ca-calendar-upcoming-card .card-title { color: #14213d; font-family: var(--family-font-heading); font-weight: 600 !important; }
.ca-calendar-page .ca-calendar-upcoming-card .card-body { padding-right: 24px; padding-left: 24px; }
.ca-calendar-page .ca-calendar-side-event { padding-top: 13px !important; padding-bottom: 13px !important; }
.ca-calendar-page .ca-calendar-side-event .btn > span:last-child { min-width: 0; }
.ca-calendar-page .ca-calendar-side-event .fw-bold { overflow-wrap: anywhere; color: #14213d; font-size: 13px !important; line-height: 1.4; }
.ca-calendar-page .ca-calendar-side-event .text-gray-600 { font-size: 11px !important; line-height: 1.45; }

.ca-calendar-page .ca-calendar-toolbar {
  display: grid; grid-template-columns: auto minmax(220px,1fr) auto; align-items: center;
  gap: 18px; min-height: 92px; padding: 18px 20px !important;
}
.ca-calendar-page .ca-calendar-view-switch { order: initial; margin: 0; padding: 4px; border-radius: 12px; background: #f7f9fc; }
.ca-calendar-page .ca-calendar-view-switch .btn { min-height: 40px; padding: 8px 17px; border: 0; border-radius: 9px !important; background: transparent; color: #33415f; font-size: 13px; font-weight: 500; white-space: nowrap; }
.ca-calendar-page .ca-calendar-view-switch .btn.active { background: #e8efff; color: #356df3; box-shadow: 0 4px 12px rgba(53,109,243,.08); }
.ca-calendar-page .ca-calendar-title-wrap { order: initial; flex: none; text-align: center; }
.ca-calendar-page .ca-calendar-title-wrap > .btn { color: #14213d !important; font-family: var(--family-font-heading); font-size: var(--title-sm) !important; font-weight: 600 !important; white-space: nowrap; }
.ca-calendar-page .ca-calendar-nav { order: initial; margin: 0; gap: 10px; }
.ca-calendar-page .ca-calendar-nav-controls { gap: 8px !important; }
.ca-calendar-page .ca-calendar-nav .btn { min-height: 42px; border: 1px solid #e5eaf3; border-radius: 10px; background: #fff; color: #26385f; font-weight: 500; box-shadow: 0 3px 10px rgba(42,67,120,.025); }
.ca-calendar-page .ca-calendar-nav .btn-icon { width: 42px; }
.ca-calendar-page .ca-calendar-mobile-add { display: inline-flex; align-items: center; justify-content: center; border-color: transparent !important; background: #eef4ff !important; color: #356df3 !important; box-shadow: none !important; }
.ca-calendar-page .ca-calendar-month-view,
.ca-calendar-page .ca-calendar-week-grid-wrap { border-top-color: #edf1f7; }
.ca-calendar-page .ca-calendar-head { background: #fbfcff; }
.ca-calendar-page .ca-calendar-grid,
.ca-calendar-page .ca-calendar-week-grid { background: #edf1f7; }

@media (max-width: 991.98px) and (min-width: 768px) {
  .ca-calendar-page .ca-calendar-hero { min-height: 220px; padding: 28px; }
  .ca-calendar-page .ca-calendar-toolbar { grid-template-columns: auto 1fr auto; }
  .ca-calendar-page .ca-calendar-view-switch .btn { padding-right: 12px; padding-left: 12px; }
}

@media (max-width: 767.98px) {
  .ca-calendar-page .ca-calendar-hero {
    min-height: 300px; align-content: flex-start; padding: 24px 20px; border-radius: 18px;
    background-image: url("images/calendar/calendar-hero-mobile.webp"); background-position: center 62%;
  }
  .ca-calendar-page .ca-calendar-hero::before { background: linear-gradient(180deg, rgba(255,255,255,.95) 0%, rgba(255,255,255,.72) 33%, rgba(255,255,255,.1) 64%, rgba(255,255,255,0) 78%); }
  .ca-calendar-page .ca-calendar-hero > .min-w-0 { max-width: 100%; }
  .ca-calendar-page .ca-calendar-daily-title { max-width: 86%; font-size: clamp(24px,7vw,29px); }
  .ca-calendar-page .ca-calendar-daily-copy { max-width: 88%; margin-top: 14px; }
  .ca-calendar-page .ca-calendar-quote { font-size: 14px; line-height: 1.48; }
  .ca-calendar-page .ca-calendar-quote-author { margin-top: 5px; font-size: 11px; }

  .ca-calendar-page .ca-calendar-main-card,
  .ca-calendar-page .ca-calendar-upcoming-card { min-height: 0; border-radius: 18px !important; }
  .ca-calendar-page .ca-calendar-toolbar {
    display: grid; grid-template-columns: minmax(0,1fr); align-items: stretch !important;
    gap: 14px; min-height: 0; padding: 16px !important;
  }
  .ca-calendar-page .ca-calendar-view-switch { grid-row: 1; display: grid; width: 100%; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .ca-calendar-page .ca-calendar-view-switch .btn { width: 100%; min-height: 39px; padding: 7px 8px; font-size: 12px; }
  .ca-calendar-page .ca-calendar-title-wrap { grid-row: 2; width: 100%; text-align: center; }
  .ca-calendar-page .ca-calendar-title-wrap > .btn { max-width: 100%; font-size: 15px !important; white-space: normal; }
  .ca-calendar-page .ca-calendar-nav { grid-row: 3; width: 100%; justify-content: space-between; }
  .ca-calendar-page .ca-calendar-nav-controls { display: grid !important; flex: 1; grid-template-columns: 42px minmax(72px,1fr) 42px; }
  .ca-calendar-page .ca-calendar-nav-controls .btn { width: 100%; }
  .ca-calendar-page .ca-calendar-mobile-add { flex: 0 0 42px; }

  .ca-calendar-page .ca-calendar-week-list { gap: 12px; padding: 8px 14px 18px; }
  .ca-calendar-page .ca-calendar-week-list .ca-week-list-day,
  .ca-calendar-page .ca-calendar-week-list .ca-week-list-day:last-child {
    padding: 15px; border: 1px solid rgba(118,137,179,.12); border-radius: 15px;
    background: #fff; box-shadow: 0 4px 14px rgba(42,67,120,.025);
  }
  .ca-calendar-page .ca-calendar-week-list .ca-week-list-date {
    display: flex; min-height: 0; flex-direction: column; align-items: flex-start;
    margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid rgba(118,137,179,.12); line-height: 1.2;
  }
  .ca-calendar-page .ca-calendar-mobile-weekday { color: #7a84a3; font-size: 12px; font-weight: 500; }
  .ca-calendar-page .ca-calendar-mobile-date { margin-top: 3px; color: #14213d; font-size: 14px; font-weight: 600; }
  .ca-calendar-page .ca-calendar-week-list .ca-week-list-date.is-today .ca-calendar-mobile-weekday,
  .ca-calendar-page .ca-calendar-week-list .ca-week-list-date.is-today .ca-calendar-mobile-date { color: #356df3; }
  .ca-calendar-page .ca-calendar-week-list .ca-day-timeline { gap: 8px; }
  .ca-calendar-page .ca-calendar-mobile-event {
    width: 100%; min-height: 56px; grid-template-columns: 64px 8px minmax(0,1fr); gap: 10px;
    padding: 10px 12px; border: 0; border-radius: 11px; background: var(--ca-calendar-event-bg);
    box-shadow: none; color: var(--ca-calendar-event-color); font-family: var(--family-font-body); text-align: left;
  }
  .ca-calendar-page .ca-calendar-mobile-event:hover,
  .ca-calendar-page .ca-calendar-mobile-event:focus-visible { border: 0; background: var(--ca-calendar-event-bg); box-shadow: none; }
  .ca-calendar-page .ca-calendar-mobile-event .ca-day-time { color: currentColor; font-size: 11px; font-weight: 500; }
  .ca-calendar-page .ca-calendar-mobile-event .ca-dot { width: 8px; height: 8px; }
  .ca-calendar-page .ca-calendar-mobile-event .fw-bold { color: #14213d; font-size: 13px; font-weight: 600 !important; line-height: 1.3; }
  .ca-calendar-page .ca-calendar-mobile-event .fs-7 { display: block; margin-top: 2px; color: #667085; font-size: 11px !important; font-weight: 500; line-height: 1.3; }
  .ca-calendar-page .ca-calendar-week-list .ca-week-list-empty {
    display: inline-flex; width: auto; min-height: 28px; align-items: center; margin: 2px 0 1px;
    padding: 5px 12px; border-radius: 999px; background: #eee9ff; color: #7564c2;
    font-family: var(--family-font-body); font-size: 11px; font-weight: 500; line-height: 1;
  }
  .ca-calendar-page .ca-calendar-upcoming-card { margin-top: 2px; }
}

@media (max-width: 379.98px) {
  .ca-calendar-page .ca-calendar-hero { min-height: 286px; padding: 20px 16px; }
  .ca-calendar-page .ca-calendar-daily-title { max-width: 100%; font-size: 23px; }
  .ca-calendar-page .ca-calendar-daily-copy { max-width: 96%; }
  .ca-calendar-page .ca-calendar-nav-controls { grid-template-columns: 40px minmax(62px,1fr) 40px; }
  .ca-calendar-page .ca-calendar-nav .btn-icon,
  .ca-calendar-page .ca-calendar-mobile-add { width: 40px; flex-basis: 40px; }
  .ca-calendar-page .ca-calendar-week-list { padding-right: 12px; padding-left: 12px; }
  .ca-calendar-page .ca-calendar-mobile-event { grid-template-columns: 58px 34px minmax(0,1fr); padding-right: 10px; padding-left: 10px; }
}

/* Calendar: final compactness, contrast and single-header week refinements. */
.ca-calendar-page .ca-calendar-hero {
  width: 100%; height: 160px; min-height: 0; align-items: center !important; align-content: center;
  padding: 18px 34px; background-size: cover; background-position: center 55%;
}
.ca-calendar-page .ca-calendar-daily-title { margin-bottom: 4px !important; font-size: clamp(29px,2.15vw,34px); }
.ca-calendar-page .ca-calendar-daily-copy { margin-top: 10px; }
.ca-calendar-page .ca-calendar-quote {
  color: #26385f; font-family: var(--family-font-body); font-size: 17px; font-style: italic;
  font-weight: 500; line-height: 1.45; letter-spacing: 0; opacity: 1; text-shadow: none;
}
.ca-calendar-page .ca-calendar-quote-author { margin-top: 5px; color: #6f7893; font-family: var(--family-font-body); font-size: var(--text-sm); font-weight: var(--font-medium); opacity: 1; }
.ca-calendar-page .ca-calendar-new-event-desktop {
  min-height: 44px; padding: 9px 22px; border-radius: 12px; background: #356df3; color: #fff;
  font-family: var(--family-font-body); font-weight: 600; box-shadow: 0 8px 18px rgba(53,109,243,.18);
}
.ca-calendar-page .ca-calendar-new-event-desktop:hover { background: #285edb; color: #fff; }

.ca-calendar-page .ca-calendar-main-card,
.ca-calendar-page .ca-calendar-upcoming-card { min-height: 0; }
.ca-calendar-page .ca-calendar-toolbar {
  min-height: 74px; padding: 12px 18px !important; gap: 16px;
}
.ca-calendar-page .ca-calendar-view-switch { padding: 4px; border-radius: 13px; background: #f4f7fc; }
.ca-calendar-page .ca-calendar-view-switch .btn {
  min-height: 40px; padding: 8px 17px; border-radius: 10px !important;
  background: transparent; color: #4f5b78; font-weight: 500;
}
.ca-calendar-page .ca-calendar-view-switch .btn:not(.active):hover { background: #eaf2ff; color: #356df3; }
.ca-calendar-page .ca-calendar-view-switch .btn.active,
.ca-calendar-page .ca-calendar-view-switch .btn.btn-light-primary.active {
  background: #356df3 !important; color: #fff !important; font-weight: 600; box-shadow: none;
}
.ca-calendar-page .ca-calendar-title-wrap > .btn { color: #14213d !important; font-weight: 600 !important; opacity: 1; }
.ca-calendar-page .ca-calendar-title-wrap > .btn i { color: #356df3; opacity: 1; }
.ca-calendar-page .ca-calendar-nav .btn {
  min-height: 42px; border: 1px solid rgba(53,109,243,.18); border-radius: 11px;
  background: #fff; color: #14213d; opacity: 1; box-shadow: none;
}
.ca-calendar-page .ca-calendar-nav .btn:hover { border-color: rgba(53,109,243,.24); background: #eaf2ff; color: #356df3; }
.ca-calendar-page .ca-calendar-nav .btn i { color: currentColor; opacity: 1; }
.ca-calendar-page .ca-calendar-nav-controls .btn:not(.btn-icon) { padding-right: 17px; padding-left: 17px; font-family: var(--family-font-body); font-weight: 500; }
.ca-calendar-page .ca-calendar-mobile-add,
.ca-calendar-page .ca-calendar-nav .ca-calendar-mobile-add {
  width: 42px; height: 42px; border-color: #356df3 !important; background: #356df3 !important;
  color: #fff !important; opacity: 1; box-shadow: 0 6px 14px rgba(53,109,243,.16) !important;
}
.ca-calendar-page .ca-calendar-mobile-add:hover,
.ca-calendar-page .ca-calendar-nav .ca-calendar-mobile-add:hover { border-color: #285edb !important; background: #285edb !important; color: #fff !important; }
.ca-calendar-page .ca-calendar-mobile-add:disabled { opacity: .45; cursor: not-allowed; }

/* The week grid owns the only weekday/date header; the former outer header is no longer rendered. */
.ca-calendar-page .ca-calendar-week-grid-wrap { border-top: 1px solid #edf1f7; }
.ca-calendar-page .ca-calendar-week-grid { gap: 0; background: #fff; }
.ca-calendar-page .ca-week-view-day {
  min-height: 470px; padding: 0 12px 16px; border-right: 1px solid #edf1f7; background: #fff;
}
.ca-calendar-page .ca-week-view-day:last-child { border-right: 0; }
.ca-calendar-page .ca-week-view-date {
  min-height: 62px; justify-content: center; gap: 7px; margin: 0 -12px 12px; padding: 10px 8px;
  border-bottom: 1px solid rgba(118,137,179,.14); background: #fbfcff;
}
.ca-calendar-page .ca-week-view-date > span:first-child { color: #66718d !important; font-size: var(--text-xs) !important; font-weight: var(--font-semibold) !important; }
.ca-calendar-page .ca-week-view-date > span:last-child { color: #14213d; font-size: var(--text-xl); font-weight: 600 !important; }
.ca-calendar-page .ca-week-view-date > span.badge:last-child { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; background: #356df3; color: #fff; }
.ca-calendar-page .ca-week-empty { color: #8791a8 !important; font-size: var(--text-xs) !important; font-style: normal; font-weight: var(--font-medium); }

@media (max-width: 991.98px) and (min-width: 768px) {
  .ca-calendar-page .ca-calendar-hero { height: 160px; min-height: 0; padding-block: 18px; }
  .ca-calendar-page .ca-calendar-toolbar { min-height: 74px; }
}

@media (max-width: 767.98px) {
  .ca-calendar-page .ca-calendar-hero {
    height: clamp(170px,48vw,190px); min-height: 0; align-content: flex-start;
    padding: 16px 18px; background-size: cover; background-position: center top;
  }
  .ca-calendar-page .ca-calendar-daily-title { max-width: 100%; margin-bottom: 2px !important; font-size: clamp(22px,6.7vw,27px); }
  .ca-calendar-page .ca-calendar-daily-copy { max-width: 92%; margin-top: 8px; }
  .ca-calendar-page .ca-calendar-quote { font-size: 14px; font-weight: 500; line-height: 1.45; }
  .ca-calendar-page .ca-calendar-quote-author { margin-top: 4px; font-size: 11px; font-weight: 500; }
  .ca-calendar-page .ca-calendar-toolbar {
    min-height: 0; padding: 14px !important; gap: 9px;
  }
  .ca-calendar-page .ca-calendar-view-switch { min-height: 44px; padding: 3px; }
  .ca-calendar-page .ca-calendar-view-switch .btn { min-height: 38px; padding: 6px 8px; }
  .ca-calendar-page .ca-calendar-title-wrap > .btn { min-height: 32px; font-size: 14px !important; line-height: 1.25; }
  .ca-calendar-page .ca-calendar-nav { gap: 8px; }
  .ca-calendar-page .ca-calendar-nav-controls { grid-template-columns: 42px minmax(70px,1fr) 42px; gap: 8px !important; }
  .ca-calendar-page .ca-calendar-nav .btn,
  .ca-calendar-page .ca-calendar-mobile-add { min-height: 42px; }

  .ca-calendar-page .ca-calendar-week-list .ca-week-list-date {
    flex-direction: row; align-items: center; gap: 7px; margin-bottom: 10px; padding-bottom: 10px;
  }
  .ca-calendar-page .ca-calendar-mobile-weekday { color: #6f7893; font-size: 11px; font-weight: 500; }
  .ca-calendar-page .ca-calendar-mobile-date { margin-top: 0; color: #14213d; font-size: 15px; font-weight: 600; }
  .ca-calendar-page .ca-calendar-week-list .ca-week-list-date.is-today .ca-calendar-mobile-date {
    display: inline-flex; width: auto; min-width: 0; height: auto; min-height: 30px; align-items: center; justify-content: center;
    padding: 6px 10px; border-radius: 999px; background: #356df3; color: #fff; white-space: nowrap;
  }
}

@media (max-width: 379.98px) {
  .ca-calendar-page .ca-calendar-hero { height: clamp(168px,50vw,180px); min-height: 0; padding: 15px 16px; background-position: center top; }
  .ca-calendar-page .ca-calendar-toolbar { padding: 12px !important; gap: 8px; }
  .ca-calendar-page .ca-calendar-nav-controls { grid-template-columns: 40px minmax(62px,1fr) 40px; gap: 6px !important; }
  .ca-calendar-page .ca-calendar-nav .btn-icon,
  .ca-calendar-page .ca-calendar-mobile-add { width: 40px; height: 40px; min-height: 40px; flex-basis: 40px; }
}

/* Calendar mobile/tablet: category icon stays on the right of event copy. */
@media (max-width: 991.98px) {
  .ca-calendar-page .ca-calendar-mobile-event {
    grid-template-columns: 64px minmax(0, 1fr) 34px;
    gap: 10px;
  }
  .ca-calendar-page .ca-calendar-mobile-event .ca-day-time {
    grid-column: 1;
    grid-row: 1;
  }
  .ca-calendar-page .ca-calendar-mobile-event > .min-w-0 {
    grid-column: 2;
    grid-row: 1;
    overflow: hidden;
  }
  .ca-calendar-page .ca-calendar-mobile-event .ca-calendar-event-icon {
    grid-column: 3;
    grid-row: 1;
    width: 30px;
    height: 30px;
    justify-self: end;
  }
}

@media (max-width: 379.98px) {
  .ca-calendar-page .ca-calendar-mobile-event {
    grid-template-columns: 58px minmax(0, 1fr) 30px;
    gap: 8px;
  }
}

/* Savings goal detail modal */
#caGoalBackdrop.is-open { background: rgba(38,48,72,.58); backdrop-filter: blur(5px); }
#caGoalDrawer {
  inset: 0 0 0 auto;
  width: min(920px, 100vw);
  height: 100vh;
  max-height: 100vh;
  border: 0;
  border-radius: 0;
  opacity: 0;
  transform: translateX(100%);
  transition: transform .22s ease, opacity .22s ease, visibility .22s;
}
#caGoalDrawer.is-open {
  opacity: 1;
  transform: translateX(0);
  box-shadow: -24px 0 60px rgba(15,23,42,.2);
}
.ca-goal-view { display: flex; min-height: 100%; flex-direction: column; padding: 18px; color: #17213f; background: #fff; }
.ca-goal-view-hero {
  position: relative;
  min-height: 246px;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(90deg,#eff4ff,#faf5ff,#fff8f5);
}
.ca-goal-view-hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.ca-goal-view-hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,.76) 0%, rgba(255,255,255,.66) 34%, rgba(255,255,255,.22) 64%, rgba(255,255,255,.02) 100%); }
.ca-goal-view-hero-content { position: relative; z-index: 1; display: flex; width: min(58%, 570px); min-height: 246px; flex-direction: column; padding: 22px 24px 20px; }
.ca-goal-view-kicker,
.ca-goal-view-plan-label { display: inline-flex; width: fit-content; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 10px; color: #6654e8; background: #f0ebff; font-size: 12px; font-weight: 600; }
.ca-goal-view-kicker svg,
.ca-goal-view-plan-label svg { width: 17px; height: 17px; }
.ca-goal-view-heading { display: flex; align-items: center; gap: 18px; margin: 12px 0 16px; }
.ca-goal-view-heading h2 { margin: 0; overflow: hidden; color: #101f52; font-family: var(--family-font-heading); font-size: clamp(28px,3vw,38px); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.ca-goal-view-heading .badge { padding: 8px 14px; border-radius: 12px; font-size: 12px; }
.ca-goal-view-status { display: inline-flex; align-items: center; gap: 8px; }
.ca-goal-view-status i { width: 7px; height: 7px; border-radius: 50%; background: #20b86b; box-shadow: 0 0 0 4px rgba(32,184,107,.1); }
.ca-goal-view-meta { display: flex; align-items: center; gap: 26px; }
.ca-goal-view-meta > span { display: grid; grid-template-columns: 24px auto; column-gap: 9px; align-items: center; padding-right: 25px; border-right: 1px solid rgba(107,120,151,.16); }
.ca-goal-view-meta > span:last-child { border-right: 0; }
.ca-goal-view-meta svg { width: 20px; height: 20px; grid-row: 1 / 3; color: #7481b0; }
.ca-goal-view-meta small { color: #687494; font-size: 10px; }
.ca-goal-view-meta b { color: #1c2b57; font-size: 12px; }
.ca-goal-view-progress-copy { display: flex; align-items: center; justify-content: space-between; margin-top: auto; margin-bottom: 8px; color: #63708f; font-size: 13px; }
.ca-goal-view-progress-copy b,
.ca-goal-view-progress-copy strong { color: #17275d; }
.ca-goal-view-hero-content > .progress { background: rgba(225,231,248,.9); }
.ca-goal-view-close { position: absolute; z-index: 2; top: 12px; right: 12px; width: 46px; height: 46px; color: #20315f; background: rgba(255,255,255,.9) !important; }
.ca-goal-view-body { display: grid; gap: 16px; padding-top: 16px; }
.ca-goal-view-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.ca-goal-view-stats article { display: flex; min-width: 0; align-items: center; gap: 14px; min-height: 106px; padding: 17px; border: 1px solid #e8ecf4; border-radius: 16px; background: #fff; }
.ca-goal-view-stats article > span { display: grid; width: 54px; height: 54px; flex: 0 0 54px; place-items: center; border-radius: 15px; }
.ca-goal-view-stats article > span svg { width: 25px; height: 25px; }
.ca-goal-view-stats .is-blue { color: #3778f5; background: #edf4ff; }
.ca-goal-view-stats .is-green { color: #25b86f; background: #eaf9f1; }
.ca-goal-view-stats .is-orange { color: #f39b42; background: #fff3e8; }
.ca-goal-view-stats .is-violet { color: #7457ef; background: #f2edff; }
.ca-goal-view-stats article div { display: grid; min-width: 0; gap: 4px; }
.ca-goal-view-stats small { color: #465474; font-size: 12px; font-weight: 700; }
.ca-goal-view-stats strong { color: #101f52; font-size: clamp(17px,2vw,23px); white-space: nowrap; }
.ca-goal-view-stats em { color: #8791aa; font-size: 10px; font-style: normal; }
.ca-goal-view-plan { display: grid; grid-template-columns: 170px 1fr 1.2fr; align-items: center; gap: 20px; min-height: 124px; padding: 10px 22px 10px 8px; overflow: hidden; border: 1px solid #eadfff; border-radius: 17px; background: linear-gradient(105deg,#fbf6ff,#fff8fd); }
.ca-goal-view-plan-art { display: grid; min-height: 112px; align-self: stretch; grid-template-rows: auto minmax(0,1fr); align-items: start; justify-items: start; }
.ca-goal-view-plan-piggy { width: 160px; height: 80px; align-self: end; justify-self: center; object-fit: contain; object-position: center bottom; }
.ca-goal-view-plan-art .ca-goal-view-plan-label { position: relative; z-index: 1; }
.ca-goal-view-plan-copy { display: grid; align-items: center; }
.ca-goal-view-plan h3 { margin: 0 0 4px; font-size: 15px; }
.ca-goal-view-plan strong { color: #111f54; font-size: 30px; line-height: 1; }
.ca-goal-view-plan strong small { font-size: 17px; }
.ca-goal-view-plan p { margin: 0; padding-left: 28px; border-left: 1px solid #e7def0; color: #596687; font-size: 13px; line-height: 1.65; }
.ca-goal-view-plan p > span { display: block; }
.ca-goal-view-plan p b { color: #6757d9; }
.ca-goal-view-funds { padding: 20px 22px; border: 1px solid #e6eaf2; border-radius: 17px; }
.ca-goal-view-funds h3,
.ca-goal-view-notes h3 { display: flex; align-items: center; gap: 9px; margin: 0 0 14px; color: #172754; font-size: 15px; }
.ca-goal-view-funds h3 svg,
.ca-goal-view-notes h3 svg { width: 20px; height: 20px; color: #5269db; }
.ca-goal-view-funds-row { display: grid; grid-template-columns: minmax(180px,260px) auto auto minmax(250px,280px); gap: 14px; align-items: stretch; }
.ca-goal-view-amount { position: relative; }
.ca-goal-view-amount input { width: 100%; height: 58px; padding: 8px 15px; border: 1px solid #dfe5f0; border-radius: 12px; color: #152653; font-size: 18px; font-weight: 600; outline: 0; }
.ca-goal-view-amount input:focus { border-color: #8090ee; box-shadow: 0 0 0 3px rgba(79,70,255,.1); }
.ca-goal-view-amount input::-webkit-inner-spin-button,
.ca-goal-view-amount input::-webkit-outer-spin-button { margin: 0; appearance: none; -webkit-appearance: none; }
.ca-goal-view-amount input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
.ca-goal-view-funds-row > .btn { min-height: 58px; gap: 8px; padding-inline: 20px; white-space: nowrap; }
.ca-goal-view-funds-row > .btn svg { width: 19px; height: 19px; }
.ca-goal-view-funds-summary { display: grid; grid-template-columns: 1fr auto; gap: 7px 12px; align-content: center; padding: 10px 14px; border: 1px solid #e5e9f2; border-radius: 13px; background: #f8f9fc; color: #606d8b; font-size: 10px; }
.ca-goal-view-funds-summary > span { grid-column: 1 / 3; }
.ca-goal-view-funds-summary-copy { display: flex; align-items: flex-start; gap: 7px; }
.ca-goal-view-funds-summary-copy svg { width: 16px; height: 16px; flex: 0 0 16px; color: #61709b; }
.ca-goal-view-funds-summary .progress { align-self: center; background: #e5e9f3; }
.ca-goal-view-funds-summary b { color: #526080; }
.ca-label-mobile { display: none; }
.ca-goal-view-quick { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.ca-goal-view-quick button { padding: 7px 14px; border: 0; border-radius: 9px; color: #3267d7; background: #edf4ff; font-size: 11px; font-weight: 600; }
.ca-goal-view-info { display: grid; grid-template-columns: 1fr 1.25fr; gap: 14px; }
.ca-goal-view-info > section { min-height: 132px; padding: 18px 20px; border: 1px solid #e7ebf3; border-radius: 16px; }
.ca-goal-view-info dl { display: grid; gap: 13px; margin: 0; }
.ca-goal-view-info dl > div { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.ca-goal-view-info dt { display: flex; align-items: center; gap: 10px; color: #435170; font-size: 11px; font-weight: 500; }
.ca-goal-view-info dt svg { width: 17px; height: 17px; color: #5267a9; }
.ca-goal-view-info dd { margin: 0; color: #172754; font-size: 11px; font-weight: 600; text-align: right; }
.ca-goal-view-notes { position: relative; overflow: hidden; background: linear-gradient(145deg,#fff,#fbfaff); }
.ca-goal-view-notes p { position: relative; z-index: 1; margin: 0; color: #4f5e80; font-size: 12px; line-height: 1.65; white-space: pre-line; }
.ca-goal-view-notes::after { position: absolute; right: -20px; bottom: -30px; width: 150px; height: 90px; border-radius: 60% 0 0; background: radial-gradient(circle at 70% 20%,#f4c7ea 0 9%,transparent 10%),linear-gradient(145deg,transparent 35%,#dff5ec 36% 47%,#d7e7ff 48% 60%,#f7edcd 61%); content: ""; opacity: .6; }
.ca-goal-view-footer { position: sticky; z-index: 3; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: auto; padding: 16px 2px 2px; border-top: 1px solid #edf0f5; background: rgba(255,255,255,.97); }
.ca-goal-view-footer > div { display: flex; gap: 12px; }
.ca-goal-view-footer .btn { min-width: 142px; }
#caGoalForm { display: flex; min-height: 100%; flex-direction: column; background: #f8faff; }
.ca-goal-form-header { position: sticky; z-index: 4; top: 0; display: flex; min-height: 126px; flex: 0 0 auto; align-items: center; justify-content: space-between; padding: 24px 30px; border-bottom: 1px solid #e8edf5; background: rgba(255,255,255,.97); backdrop-filter: blur(12px); }
.ca-goal-form-heading { display: flex; align-items: center; gap: 18px; }
.ca-goal-form-heading-icon { display: grid; width: 58px; height: 58px; flex: 0 0 58px; place-items: center; border-radius: 50%; color: #3478f6; background: #edf4ff; }
.ca-goal-form-heading-icon svg { width: 27px; height: 27px; }
.ca-goal-form-heading h2 { margin: 0; color: #14213d; font-family: var(--family-font-heading); font-size: 27px; }
.ca-goal-form-heading p { margin: 5px 0 0; color: #71809f; font-size: 14px; }
.ca-goal-form-close { display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid #e1e7f0; border-radius: 12px; color: #31415f; background: #fff; }
.ca-goal-form-close svg { width: 21px; height: 21px; }
.ca-goal-form-body { flex: 1; padding: 24px 30px; }
.ca-goal-form-card { display: grid; gap: 22px; padding: 24px; border: 1px solid #e2e8f2; border-radius: 18px; background: #fff; }
.ca-goal-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.ca-goal-form-field label,
.ca-goal-upload-card > label:first-child { display: block; margin: 0 0 9px; color: #263858; font-size: 13px; font-weight: 600; }
.ca-goal-form-field label b { color: #ef476f; }
.ca-goal-form-control { position: relative; display: flex; min-height: 54px; align-items: center; overflow: hidden; border: 1px solid #dbe3ef; border-radius: 12px; background: #fff; transition: border-color .15s ease, box-shadow .15s ease; }
.ca-goal-form-control:focus-within { border-color: #7493ee; box-shadow: 0 0 0 3px rgba(53,109,243,.1); }
.ca-goal-form-control > span { display: grid; width: 42px; height: 38px; flex: 0 0 42px; margin-left: 8px; place-items: center; border-radius: 10px; }
.ca-goal-form-control > span svg { width: 20px; height: 20px; }
.ca-goal-form-control > span.is-violet { color: #7955ed; background: #f4efff; }
.ca-goal-form-control > span.is-blue { color: #3478f6; background: #edf4ff; }
.ca-goal-form-control > span.is-green { color: #20b86b; background: #eaf9f1; }
.ca-goal-form-control input,
.ca-goal-form-control select { width: 100%; min-width: 0; height: 52px; padding: 0 42px 0 13px; border: 0; color: #1d2e50; background: transparent; font-size: 15px; outline: 0; }
.ca-goal-form-control input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
.ca-goal-form-control input[type="number"]::-webkit-inner-spin-button,
.ca-goal-form-control input[type="number"]::-webkit-outer-spin-button { margin: 0; appearance: none; -webkit-appearance: none; }
.ca-goal-form-control select { appearance: auto; }
.ca-goal-form-control small { position: absolute; right: 14px; color: #74819e; font-size: 11px; pointer-events: none; }
.ca-goal-form-divider { height: 1px; background: #e7ebf2; }
.ca-goal-form-extras { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.ca-goal-upload-card,
.ca-goal-favorite-card,
.ca-goal-notes-card { border: 1px solid #e0e7f1; border-radius: 14px; background: #fbfcff; }
.ca-goal-upload-card { padding: 16px; }
.ca-goal-upload-drop { display: flex !important; min-height: 166px; align-items: center; justify-content: center; flex-direction: column; gap: 7px; margin: 0 !important; border: 1px dashed #8db7ff; border-radius: 12px; color: #667594 !important; background: #fff; cursor: pointer; text-align: center; }
.ca-goal-upload-drop svg { width: 35px; height: 35px; color: #3478f6; }
.ca-goal-upload-drop span { display: grid; gap: 2px; }
.ca-goal-upload-drop span small { font-size: 11px; }
.ca-goal-upload-drop strong { padding: 8px 15px; border: 1px solid #d7e3f6; border-radius: 9px; color: #285da9; background: #f4f8ff; font-size: 12px; }
.ca-goal-upload-card > input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.ca-goal-upload-card > small { display: block; margin-top: 8px; color: #77839d; font-size: 10px; }
.ca-goal-form-side { display: grid; gap: 16px; }
.ca-goal-favorite-card { display: flex; min-height: 74px; align-items: center; gap: 13px; padding: 15px 17px; cursor: pointer; }
.ca-goal-favorite-card .form-check-input { width: 48px; height: 26px; flex: 0 0 48px; margin: 0; }
.ca-goal-favorite-card span { display: grid; gap: 3px; color: #263858; font-size: 12px; }
.ca-goal-favorite-card small { color: #78849e; font-size: 10px; }
.ca-goal-notes-card { position: relative; padding: 15px 17px 25px; }
.ca-goal-notes-card label { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; color: #263858; font-size: 13px; font-weight: 600; }
.ca-goal-notes-card label svg { width: 18px; height: 18px; color: #3478f6; }
.ca-goal-notes-card textarea { width: 100%; min-height: 92px; resize: vertical; padding: 12px; border: 1px solid #dce3ee; border-radius: 10px; color: #263858; background: #fff; font-size: 12px; outline: 0; }
.ca-goal-notes-card textarea:focus { border-color: #7493ee; box-shadow: 0 0 0 3px rgba(53,109,243,.08); }
.ca-goal-notes-card > small { position: absolute; right: 18px; bottom: 8px; color: #7a86a0; font-size: 10px; }
#caGoalForm .ca-goal-funds,
#caGoalForm .ca-goal-secondary-action { border-color: rgba(118,137,179,.16); border-radius: 16px; background: #f5f8ff; }
.ca-goal-form-footer { position: sticky; z-index: 4; bottom: 0; display: flex; min-height: 78px; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 30px; border-top: 1px solid #e2e8f1; background: rgba(255,255,255,.97); backdrop-filter: blur(12px); }
.ca-goal-form-footer > div { display: flex; gap: 12px; margin-left: auto; }
.ca-goal-form-footer .btn { display: inline-flex; min-height: 44px; align-items: center; gap: 8px; padding-inline: 20px; border-radius: 10px; }
.ca-goal-form-footer .btn svg { width: 18px; height: 18px; }

@media (max-width: 991.98px) {
  #caGoalDrawer { inset: 0 0 0 auto; width: min(760px,100vw); height: 100dvh; max-height: 100dvh; }
  .ca-goal-form-header { min-height: 108px; padding: 20px 24px; }
  .ca-goal-form-body { padding: 20px 24px; }
  .ca-goal-form-card { padding: 20px; }
  .ca-goal-form-footer { flex-wrap: nowrap; padding: 13px 24px; }
  .ca-goal-view-hero-content { width: 72%; }
  .ca-goal-view-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ca-goal-view-plan { grid-template-columns: 140px 1fr; gap: 16px; }
  .ca-goal-view-plan-piggy { width: 138px; height: 96px; }
  .ca-goal-view-plan p { grid-column: 1 / 3; }
  .ca-goal-view-plan p { padding: 16px 0 0; border-top: 1px solid #e7def0; border-left: 0; }
  .ca-goal-view-funds-row { grid-template-columns: 1fr 1fr; }
  .ca-goal-view-funds-summary { grid-column: 1 / 3; }
}
@media (max-width: 575.98px) {
  #caGoalDrawer { inset: 0; width: 100vw; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; transform: translateX(100%); }
  #caGoalDrawer.is-open { transform: translateX(0); }
  .ca-goal-form-header { min-height: 88px; padding: 14px 16px; }
  .ca-goal-form-heading { gap: 12px; }
  .ca-goal-form-heading-icon { width: 44px; height: 44px; flex-basis: 44px; }
  .ca-goal-form-heading-icon svg { width: 22px; height: 22px; }
  .ca-goal-form-heading h2 { font-size: 21px; }
  .ca-goal-form-heading p { max-width: 230px; font-size: 11px; }
  .ca-goal-form-close { width: 40px; height: 40px; flex: 0 0 40px; }
  .ca-goal-form-body { padding: 14px 12px 20px; }
  .ca-goal-form-card { gap: 17px; padding: 16px 14px; border-radius: 15px; }
  .ca-goal-form-grid,
  .ca-goal-form-extras { grid-template-columns: 1fr; gap: 17px; }
  .ca-goal-form-control { min-height: 50px; }
  .ca-goal-form-control input,
  .ca-goal-form-control select { height: 48px; }
  .ca-goal-upload-drop { min-height: 145px; }
  .ca-goal-form-footer { align-items: stretch; flex-direction: column-reverse; gap: 10px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); }
  .ca-goal-form-footer > div { display: grid; width: 100%; grid-template-columns: 1fr 1fr; }
  .ca-goal-form-footer .btn { min-width: 0; justify-content: center; padding-inline: 12px; }
  .ca-goal-form-footer > #caGoalDelete { width: 100%; justify-content: center; }
  .ca-goal-view { padding: 10px; }
  .ca-goal-view-hero { min-height: 300px; }
  .ca-goal-view-hero-overlay { background: linear-gradient(180deg,rgba(255,255,255,.96),rgba(255,255,255,.87) 58%,rgba(255,255,255,.65)); }
  .ca-goal-view-hero-content { width: 100%; min-height: 300px; padding: 18px 16px; }
  .ca-goal-view-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .ca-goal-view-heading h2 { max-width: calc(100% - 54px); font-size: 28px; white-space: normal; }
  .ca-goal-view-meta { align-items: flex-start; flex-direction: column; gap: 10px; }
  .ca-goal-view-meta > span { border-right: 0; }
  .ca-goal-view-stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .ca-goal-view-stats article { min-height: 92px; gap: 10px; padding: 12px; }
  .ca-goal-view-stats article > span { width: 42px; height: 42px; flex-basis: 42px; }
  .ca-goal-view-stats strong { font-size: 15px; }
  .ca-goal-view-plan { grid-template-columns: minmax(0,1fr) 92px; gap: 14px 10px; padding: 20px 22px; }
  .ca-goal-view-plan-art { display: flex; min-height: 0; grid-column: 2; grid-row: 1; align-items: flex-end; justify-content: flex-end; }
  .ca-goal-view-plan-art .ca-goal-view-plan-label { display: none; }
  .ca-goal-view-plan-piggy { width: 88px; height: 68px; align-self: auto; object-position: right bottom; }
  .ca-goal-view-plan-copy { grid-column: 1; grid-row: 1; align-content: center; padding: 0; }
  .ca-goal-view-plan p { grid-column: 1 / 3; padding: 14px 0 0; border-top: 1px solid #e7def0; border-left: 0; line-height: 1.6; }
  .ca-goal-view-plan strong { font-size: 26px; }
  .ca-goal-view-funds-row { grid-template-columns: 1fr 1fr; }
  .ca-goal-view-amount { grid-column: 1 / 3; }
  .ca-goal-view-funds-row > .btn { min-width: 0; padding-inline: 10px; }
  .ca-goal-view-funds-summary { grid-column: 1 / 3; }
  .ca-goal-view-info { grid-template-columns: 1fr; }
  .ca-label-desktop { display: none; }
  .ca-label-mobile { display: inline; }
  .ca-goal-view-footer { position: static; align-items: stretch; flex-direction: column-reverse; margin-top: 16px; }
  .ca-goal-view-footer > div { display: grid; grid-template-columns: 1fr 1fr; }
  .ca-goal-view-footer .btn { min-width: 0; }
}

@media (min-width: 992px) {
  #caGoalDrawer { inset-block: 0; height: 100vh; max-height: 100vh; }
  .ca-goal-view { padding: 12px; }
  .ca-goal-view-hero,
  .ca-goal-view-hero-content { min-height: 190px; }
  .ca-goal-view-hero-content { padding: 15px 20px 14px; }
  .ca-goal-view-heading { margin: 8px 0 10px; }
  .ca-goal-view-heading h2 { font-size: 31px; }
  .ca-goal-view-body { gap: 18px; padding-top: 16px; padding-bottom: 16px; }
  .ca-goal-view-stats { gap: 9px; }
  .ca-goal-view-stats article { min-height: 78px; gap: 10px; padding: 11px 13px; }
  .ca-goal-view-stats article > span { width: 44px; height: 44px; flex-basis: 44px; border-radius: 12px; }
  .ca-goal-view-stats article > span svg { width: 21px; height: 21px; }
  .ca-goal-view-stats strong { font-size: 18px; }
  .ca-goal-view-plan { min-height: 112px; }
  .ca-goal-view-funds { padding: 14px 18px; }
  .ca-goal-view-funds h3 { margin-bottom: 9px; }
  .ca-goal-view-funds-row > .btn,
  .ca-goal-view-amount input { min-height: 50px; height: 50px; }
  .ca-goal-view-quick { margin-top: 8px; }
  .ca-goal-view-info > section { min-height: 100px; padding: 12px 17px; }
  .ca-goal-view-info dl { gap: 8px; }
  .ca-goal-view-footer { padding-top: 14px; }
}

/* Keep the budget grid background uniform: card shadows must not tint its gutters. */
.ca-budget-page .ca-card,
.ca-budget-page .ca-budget-analytics-row .card,
.ca-budget-page .ca-budget-hero { box-shadow: none; }

/* Registrazione, inviti e gestione permessi famiglia */
.ca-register-invite-choice{display:grid;gap:10px;padding:16px;border:1px solid #e5eaf3;border-radius:13px;background:#f8faff}.ca-register-invite-choice legend{margin:0;color:#17213d;font-size:14px;font-weight:700}.ca-register-invite-choice p{margin:0 0 2px;color:#68718c;font-size:12px;line-height:1.5}.ca-register-invite-choice label{display:flex;align-items:center;gap:9px;color:#344054;font-size:12px}.ca-register-invite-choice input{accent-color:#347ff1}
.ca-invite-shell{display:grid;min-height:100vh;place-items:center;padding:24px;background:#f4f6fb}.ca-invite-card{width:min(100%,560px);border:1px solid #e5e9f3;border-radius:18px}.ca-invite-card .card-body{padding:38px;text-align:center}.ca-invite-brand{margin-bottom:24px;color:#17213d;font-size:22px;font-weight:700}.ca-invite-icon{display:grid;width:58px;height:58px;place-items:center;margin:0 auto 18px;border-radius:16px;color:#6955ed;background:#eef0ff}.ca-invite-icon i{font-size:28px}.ca-invite-card h1{margin:0 0 12px;color:#17213d;font-size:25px}.ca-invite-card p{color:#68718c;line-height:1.55}.ca-invite-tabs{display:grid;grid-template-columns:1fr 1fr;gap:4px;margin:22px 0 18px;padding:4px;border-radius:11px;background:#f1f3f8}.ca-invite-tabs button{min-height:38px;border:0;border-radius:8px;color:#68718c;background:transparent;font-size: var(--text-sm);font-weight:600}.ca-invite-tabs button.active{color:#347ff1;background:#fff;box-shadow:0 2px 8px rgba(31,42,68,.08)}
.ca-access-denied{display:grid;min-height:440px;place-items:center;align-content:center;text-align:center}.ca-access-denied>i{display:grid;width:62px;height:62px;place-items:center;margin-bottom:16px;border-radius:16px;color:#6955ed;background:#eef0ff;font-size:30px}.ca-access-denied h1{color:#17213d;font-size:24px}.ca-access-denied p{max-width:470px;color:#68718c}
.ca-family-settings-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:18px}.ca-family-settings-heading span{color:#6a57e8;font-size:10px;font-weight:700;letter-spacing:.08em}.ca-family-settings-heading h2{margin:4px 0;color:#17213d;font-size:22px}.ca-family-settings-heading p{margin:0;color:#68718c;font-size:12px}.ca-family-info-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}.ca-family-info-grid article{display:flex;min-height:76px;flex-direction:column;justify-content:center;padding:15px 17px;border:1px solid #e5eaf3;border-radius:14px;background:#fff}.ca-family-info-grid small{margin-bottom:4px;color:#8a93aa;font-size:10px}.ca-family-info-grid strong{color:#17213d;font-size:14px}
.ca-family-access-card,.ca-family-invites-card{margin-bottom:16px}.ca-family-access-card h3,.ca-family-invites-card h3{margin:0;font-size:15px}.ca-family-access-list>article{display:grid;min-height:64px;grid-template-columns:38px minmax(160px,1.2fr) 130px 80px 130px auto;align-items:center;gap:12px;border-bottom:1px solid #edf1f6}.ca-family-access-list>article:last-child{border:0}.ca-member-avatar{display:grid;width:36px;height:36px;place-items:center;border-radius:50%;color:#6d3bd1;background:#f1eafe;font-size:10px;font-weight:700}.ca-family-access-list article>div:nth-child(2),.ca-family-invites-card article>div:first-child{display:flex;min-width:0;flex-direction:column}.ca-family-access-list strong,.ca-family-invites-card strong{color:#17213d;font-size:12px}.ca-family-access-list small,.ca-family-invites-card small{overflow:hidden;color:#7c869f;font-size: var(--text-xs);text-overflow:ellipsis;white-space:nowrap}.ca-family-access-list em{justify-self:start;padding:5px 9px;border-radius:999px;color:#5d4bd1;background:#f1edff;font-size:10px;font-style:normal}.ca-family-access-list b{font-size:10px}.ca-family-access-list b.is-active{color:#17a673}.ca-family-access-list b.is-suspended{color:#e49b17}.ca-family-access-list time,.ca-family-invites-card time{color:#68728b;font-size:var(--text-xs)}.ca-family-access-list article>div:last-child,.ca-family-invites-card article>div:last-child{display:flex;justify-content:flex-end;gap:6px}.ca-family-invites-card article{display:grid;min-height:58px;grid-template-columns:minmax(180px,1fr) 90px 150px auto;align-items:center;gap:12px;border-bottom:1px solid #edf1f6}.ca-family-invites-card article:last-child{border:0}
.ca-member-modal{max-width:840px}.ca-member-modal .modal-content{max-height:calc(100vh - 40px);border-radius:18px}.ca-member-modal .modal-body{overflow-y:auto}.ca-member-editor-head{display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:12px;margin-bottom:18px}.ca-member-editor-head>span{display:grid;width:44px;height:44px;place-items:center;border-radius:50%;color:#6d3bd1;background:#f1eafe;font-size:11px;font-weight:700}.ca-member-editor-head>div{display:flex;flex-direction:column}.ca-member-editor-head small{color:#7c869f}.ca-member-editor-head em{padding:6px 10px;border-radius:999px;color:#5d4bd1;background:#f1edff;font-size:10px;font-style:normal}.ca-role-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:18px}.ca-role-cards label{display:flex;min-height:74px;flex-direction:column;padding:13px;border:1px solid #e5eaf3;border-radius:12px;cursor:pointer}.ca-role-cards label.active,.ca-role-cards label:has(input:checked){border-color:#806cf0;background:#f7f5ff}.ca-role-cards label.disabled{opacity:.7;cursor:not-allowed}.ca-role-cards input{position:absolute;opacity:0}.ca-role-cards strong{color:#17213d;font-size:12px}.ca-role-cards small{margin-top:4px;color:#7c869f;font-size:10px}.ca-permission-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.ca-permission-grid section{padding:13px;border:1px solid #e5eaf3;border-radius:12px}.ca-permission-grid h4{margin:0 0 9px;color:#17213d;font-size:12px}.ca-permission-grid label{display:flex;align-items:center;gap:8px;margin-top:7px;color:#59657a;font-size:11px}.ca-permission-grid input{accent-color:#347ff1}.ca-onboarding-invite-row{display:grid;grid-template-columns:1fr 1.4fr 140px 150px 38px;gap:8px;margin-bottom:8px}.ca-onboarding-permissions{grid-column:1/-1;margin:4px 0 10px}
@media(max-width:767.98px){.ca-invite-card .card-body{padding:26px 20px}.ca-family-settings-heading{align-items:stretch;flex-direction:column}.ca-family-info-grid{grid-template-columns:repeat(2,1fr)}.ca-family-access-list>article,.ca-family-invites-card article{grid-template-columns:38px minmax(0,1fr) auto;padding:12px 0}.ca-family-access-list article>*:not(.ca-member-avatar):not(div),.ca-family-invites-card article>time{grid-column:2}.ca-family-access-list article>div:last-child,.ca-family-invites-card article>div:last-child{grid-column:1/-1;justify-content:stretch}.ca-family-access-list article>div:last-child .btn,.ca-family-invites-card article>div:last-child .btn{flex:1}.ca-role-cards,.ca-permission-grid{grid-template-columns:1fr}.ca-onboarding-invite-row{grid-template-columns:1fr}.ca-onboarding-invite-row .btn{width:100%}}

/* Modale Dettagli famiglia: variante compatta, isolata dalle regole globali Keen. */
body:has(.ca-family-modal.show) .modal-backdrop.show { opacity: 1; background: rgba(15,23,42,.42); backdrop-filter: blur(2px); }
.ca-family-modal .modal-dialog { width: min(1060px,calc(100vw - 64px)); max-width: 1060px; max-height: calc(100vh - 48px); margin: 24px auto; }
.ca-family-modal .modal-content { display: flex; max-height: calc(100vh - 48px); overflow: hidden; flex-direction: column; border: 1px solid #e5e9f3; border-radius: 18px; box-shadow: 0 22px 60px rgba(15,23,42,.16); }
.ca-family-modal .modal-header { position: sticky; z-index: 2; top: 0; min-height: 68px; flex: 0 0 auto; padding: 20px 28px; border-bottom: 1px solid #e8ecf4; background: #fff; }
.ca-family-modal .modal-title { margin: 0; color: #17213d; font-size: var(--title-sm); font-weight: 700; line-height: 1.25; }
.ca-family-modal .modal-header .btn-icon { width: 40px; height: 40px; border-radius: 10px; background: #f7f8fc; }
.ca-family-modal .modal-header .btn-icon svg { width: 20px; height: 20px; }
.ca-family-modal .modal-body { min-height: 0; overflow-x: hidden; overflow-y: auto; padding: 22px 28px 18px; scrollbar-color: #cbd2df transparent; scrollbar-width: thin; }
.ca-family-modal .modal-body::-webkit-scrollbar { width: 6px; }.ca-family-modal .modal-body::-webkit-scrollbar-thumb { border-radius: 999px; background: #cbd2df; }
.ca-family-modal .ca-family-hero { display: grid; grid-template-columns: 64px minmax(0,1fr) auto; align-items: center; gap: 18px; margin: 0 0 18px; }
.ca-family-modal .ca-family-hero-icon { width: 64px; height: 64px; border-radius: 16px; }
.ca-family-modal .ca-family-hero-icon svg { width: 32px; height: 32px; }
.ca-family-modal .ca-family-hero h3 { margin: 0 0 5px; color: #17213d; font-size: 23px; font-weight: 700; line-height: 1.2; }
.ca-family-modal .ca-family-hero p { margin: 0; color: #7d86a2; font-size: 13px; line-height: 1.45; }
.ca-family-modal .ca-family-status-wrap { gap: 4px; }
.ca-family-modal .ca-family-status { gap: 7px; padding: 7px 13px; font-size: var(--text-xs); font-weight: 700; }
.ca-family-modal .ca-family-status i { width: 6px; height: 6px; }
.ca-family-modal .ca-family-status-wrap > small { margin-top: 2px; color: #7d86a2; font-size: 12px; line-height: 1.4; }
.ca-family-modal .ca-family-email-button { min-height: 28px; gap: 7px; margin-top: 2px; padding: 0 10px; border-radius: 8px; font-size: var(--text-xs); }
.ca-family-modal .ca-family-email-button svg { width: 14px; height: 14px; }
.ca-family-modal .ca-family-detail-summary.is-three { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin: 0 0 18px; }
.ca-family-modal .ca-family-detail-summary.is-three > div { display: grid; min-height: 82px; grid-template-columns: 42px minmax(0,1fr); grid-template-rows: auto auto; align-content: center; column-gap: 13px; padding: 15px 17px; border: 1px solid #e5eaf3; border-radius: 14px; background: #fff; box-shadow: none; }
.ca-family-modal .ca-family-detail-summary.is-three > div > span { width: 42px; height: 42px; border-radius: 12px; }
.ca-family-modal .ca-family-detail-summary.is-three svg { width: 20px; height: 20px; }
.ca-family-modal .ca-family-detail-summary small { margin: 0 0 4px; color: #8a93aa; font-size: 11px; line-height: 1.3; }
.ca-family-modal .ca-family-detail-summary strong { color: #17213d; font-size: 14px; font-weight: var(--font-semibold); line-height: 1.35; }
.ca-family-modal .ca-family-members-section { margin: 0 0 18px; border: 1px solid #e5eaf3; border-radius: 14px; }
.ca-family-modal .ca-family-members-section > header { min-height: 54px; padding: 15px 18px; }
.ca-family-modal .ca-family-members-section h3 { font-size: 15px; font-weight: 700; line-height: 1.3; }
.ca-family-modal .ca-family-members-section > header > span { padding: 5px 9px; font-size: 10px; }
.ca-family-modal .ca-family-members-columns { height: 36px; grid-template-columns: 36px minmax(130px,1.1fr) minmax(190px,1.25fr) minmax(105px,.7fr) minmax(105px,.65fr) minmax(122px,.72fr) 34px; gap: 12px; padding: 0 18px; color: #8992a8; background: #fbfcfe; font-size: 10px; font-weight: 600; }
.ca-family-modal .ca-family-members { padding: 0 18px; border-top: 0; }
.ca-family-modal .ca-family-members > div { min-height: 58px; grid-template-columns: 36px minmax(130px,1.1fr) minmax(190px,1.25fr) minmax(105px,.7fr) minmax(105px,.65fr) minmax(122px,.72fr) 34px; gap: 12px; padding: 10px 0; }
.ca-family-modal .ca-family-members > div > span { width: 36px; height: 36px; font-size: 10px; }
.ca-family-modal .ca-family-members > div > div { display: contents; }
.ca-family-modal .ca-family-members > div > div strong { overflow: hidden; align-self: center; color: #17213d; font-size: var(--text-sm); font-weight: var(--font-semibold); text-overflow: ellipsis; white-space: nowrap; }
.ca-family-modal .ca-family-members > div > div small { overflow: hidden; align-self: center; color: #7c869f; font-size: var(--text-xs); text-overflow: ellipsis; white-space: nowrap; }
.ca-family-modal .ca-family-members em { justify-self: start; padding: 5px 9px; border-radius: 999px; font-size: 10px; }
.ca-family-modal .ca-family-members b { gap: 6px; font-size: 11px; }.ca-family-modal .ca-family-members b i { width: 6px; height: 6px; }
.ca-family-modal .ca-family-members time { color: #68728b; font-size: 11px; white-space: nowrap; }
.ca-family-modal .ca-family-members button { width: 34px; height: 34px; border-radius: 9px; }.ca-family-modal .ca-family-members button svg { width: 15px; height: 15px; }
.ca-family-modal .ca-danger-zone { margin: 0; padding: 14px; border-color: #ffd9dd; border-radius: 14px; background: #fff8f8; }
.ca-family-modal .ca-danger-zone > header { gap: 10px; margin-bottom: 12px; }.ca-family-modal .ca-danger-zone > header svg { width: 18px; height: 18px; }
.ca-family-modal .ca-danger-zone h3 { margin-bottom: 3px; color: #e83d4f; font-size: 13px; font-weight: 700; }
.ca-family-modal .ca-danger-zone p { color: #7d6670; font-size: var(--text-xs); line-height: 1.45; }
.ca-family-modal .ca-danger-actions { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.ca-family-modal .ca-danger-actions article { display: grid; min-height: 76px; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid #ffe3e5; border-radius: 12px; background: rgba(255,255,255,.65); }
.ca-family-modal .ca-danger-action-icon { width: 38px; height: 38px; }.ca-family-modal .ca-danger-action-icon svg { width: 19px; height: 19px; }
.ca-family-modal .ca-danger-actions strong { margin-bottom: 3px; font-size: 12px; font-weight: 700; }
.ca-family-modal .ca-danger-actions p { display: -webkit-box; overflow: hidden; max-width: 260px; color: #7d6670; font-size: 10px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.ca-family-modal .ca-danger-actions .btn { min-height: 36px; height: 36px; padding: 0 14px; border-radius: 9px; font-size: 11px; font-weight: var(--font-semibold); }
.ca-family-modal .modal-footer { position: sticky; z-index: 2; bottom: 0; min-height: 64px; flex: 0 0 auto; padding: 14px 28px 18px; border-top: 1px solid #edf0f5; background: #fff; }
.ca-family-modal .modal-footer .btn { min-width: 0; min-height: 38px; height: 38px; padding: 0 18px; border-radius: 9px; font-size: 12px; }

@media (max-width: 991.98px) {
  .ca-family-modal .modal-dialog { width: calc(100vw - 32px); }
  .ca-family-modal .ca-family-members-columns { grid-template-columns: 36px minmax(130px,1fr) minmax(165px,1.15fr) 105px 105px 34px; }
  .ca-family-modal .ca-family-members-columns span:nth-child(5) { display: none; }
  .ca-family-modal .ca-family-members > div { grid-template-columns: 36px minmax(130px,1fr) minmax(165px,1.15fr) 105px 105px 34px; }
  .ca-family-modal .ca-family-members time { display: none; }
  .ca-family-modal .ca-danger-actions article { grid-template-columns: 38px minmax(0,1fr); }
  .ca-family-modal .ca-danger-actions .btn { grid-column: 2; justify-self: start; }
}
@media (max-width: 767.98px) {
  .ca-family-modal .modal-dialog { width: calc(100vw - 16px); min-height: 0; max-height: calc(100vh - 16px); margin: 8px auto; }
  .ca-family-modal .modal-content { min-height: 0; max-height: calc(100vh - 16px); border-radius: 14px; }
  .ca-family-modal .modal-header { min-height: 64px; padding: 16px 18px; }.ca-family-modal .modal-title { font-size: var(--title-sm); }
  .ca-family-modal .modal-body { padding: 18px; }
  .ca-family-modal .ca-family-hero { grid-template-columns: 56px minmax(0,1fr); gap: 12px; }
  .ca-family-modal .ca-family-hero-icon { width: 56px; height: 56px; }.ca-family-modal .ca-family-hero-icon svg { width: 28px; height: 28px; }
  .ca-family-modal .ca-family-hero h3 { font-size: 20px; }
  .ca-family-modal .ca-family-status-wrap { grid-column: 1/-1; align-items: flex-start; }
  .ca-family-modal .ca-family-detail-summary.is-three { grid-template-columns: 1fr; gap: 8px; }
  .ca-family-modal .ca-family-detail-summary.is-three > div { min-height: 70px; }
  .ca-family-modal .ca-family-members-columns { display: none; }
  .ca-family-modal .ca-family-members { gap: 0; padding: 0 14px; }
  .ca-family-modal .ca-family-members > div { grid-template-columns: 36px minmax(0,1fr) 34px; min-height: 0; gap: 10px; padding: 12px 0; }
  .ca-family-modal .ca-family-members > div > div { display: flex; }.ca-family-modal .ca-family-members > div > div strong { align-self: auto; }.ca-family-modal .ca-family-members > div > div small { align-self: auto; }
  .ca-family-modal .ca-family-members em,.ca-family-modal .ca-family-members b { grid-column: 2; justify-self: start; }
  .ca-family-modal .ca-family-members button { grid-column: 3; grid-row: 1; }
  .ca-family-modal .ca-danger-actions { grid-template-columns: 1fr; }
  .ca-family-modal .ca-danger-actions article { grid-template-columns: 38px minmax(0,1fr); }
  .ca-family-modal .ca-danger-actions .btn { grid-column: 1/-1; width: 100%; }
  .ca-family-modal .modal-footer { min-height: 60px; padding: 11px 18px 14px; }.ca-family-modal .modal-footer .btn { width: 100%; }
}

/* Famiglie attive: usa lo stesso comportamento tabellare del Bilancio familiare. */
.ca-admin-page .ca-active-families-section { border-radius: 16px; box-shadow: none; }
.ca-admin-page .ca-active-families-section .card-header { padding-right: 30px; padding-left: 30px; }
.ca-admin-page .ca-active-families-section .card-body { padding-right: 30px; padding-bottom: 30px; padding-left: 30px; }
.ca-admin-page .ca-active-families-section .card-title { margin: 0; font-family: var(--family-font-heading); }
.ca-admin-page .ca-active-families-tools { gap: 12px; margin-left: auto; }
.ca-admin-page .ca-active-families-tools .ca-budget-movements-search { margin-left: 0; }
.ca-admin-page .ca-active-families-tools .ca-budget-movements-search > svg { width: 18px; height: 18px; flex: 0 0 18px; color: #7b8495; }
.ca-admin-page .ca-families-table { table-layout: auto; }
.ca-admin-page .ca-families-table > thead > tr > th,
.ca-admin-page .ca-families-table > tbody > tr > td { width: auto !important; }
.ca-admin-page .ca-families-table > tbody > tr > td:first-child strong { color: #17213f; font-size: var(--text-sm); font-weight: 600; }
.ca-admin-page .ca-families-table > tbody > tr > td:last-child .btn { min-width: 28px; width: 28px; height: 28px; justify-content: center; padding: 0; }
.ca-admin-page .ca-families-table .ca-budget-table-actions { justify-content: flex-end; }
@media (max-width: 767.98px) {
  .ca-admin-page .ca-active-families-section .card-header { padding-right: 20px; padding-left: 20px; }
  .ca-admin-page .ca-active-families-section .card-body { padding-right: 20px; padding-bottom: 20px; padding-left: 20px; }
  .ca-admin-page .ca-active-families-tools { width: 100%; }
  .ca-admin-page .ca-active-families-tools .ca-budget-movements-search { flex: 1 1 auto; }
  .ca-admin-page .ca-families-table-wrap { overflow-x: auto; }
  .ca-admin-page .ca-families-table { display: table; width: 100%; min-width: 920px; }
  .ca-admin-page .ca-families-table thead { display: table-header-group; }
  .ca-admin-page .ca-families-table tbody { display: table-row-group; }
  .ca-admin-page .ca-families-table tr { display: table-row; padding: 0; border: 0; }
  .ca-admin-page .ca-families-table td { display: table-cell; width: auto !important; padding: 7px 10px !important; border-bottom: 1px solid #edf1f6; text-align: inherit !important; white-space: nowrap !important; }
  .ca-admin-page .ca-families-table td::before { content: none; }
  .ca-admin-page .ca-families-table td:last-child { text-align: right !important; }
  .ca-admin-page .ca-families-table td .btn { width: auto; margin-top: 0; }
}

/* Pagina Amministratore: scala tipografica e densita desktop dedicate. */
.ca-admin-page .admin-page {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 24px 30px 36px;
  color: #17213d;
  font-family: var(--family-font-body);
  font-size: 14px;
  line-height: 1.45;
}
.ca-admin-page .admin-page > * + * { margin-top: 20px; }
.ca-admin-page .admin-page .ca-admin-heading {
  min-height: 116px;
  margin: 0;
  padding: 24px 30px;
  border-radius: 18px !important;
  box-shadow: none;
}
.ca-admin-page .admin-page .ca-admin-heading-copy { display: flex; align-items: center; gap: 16px; }
.ca-admin-page .admin-page .ca-admin-heading-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  box-shadow: none;
}
.ca-admin-page .admin-page .ca-admin-heading-icon svg { width: 22px; height: 22px; }
.ca-admin-page .admin-page .ca-admin-heading h1 {
  margin: 0 0 5px;
  color: #17213d;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.3px;
}
.ca-admin-page .admin-page .ca-admin-heading p {
  margin: 0;
  color: #71809a;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}
.ca-admin-page .admin-page .ca-admin-refresh {
  height: 44px;
  min-height: 44px;
  padding: 0 18px;
  gap: 8px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: var(--font-semibold);
}
.ca-admin-page .admin-page .ca-admin-refresh svg { width: 16px; height: 16px; }
.ca-admin-page .admin-page .ca-admin-table-card {
  min-height: 190px;
  overflow: hidden;
  border: 1px solid #e2e7f0;
  border-radius: 16px !important;
  background: #fff;
  box-shadow: none !important;
}
.ca-admin-page .admin-page .ca-admin-table-card .card-header {
  min-height: 0;
  padding: 18px 20px 15px;
  border-bottom: 1px solid #e8ecf3;
}
.ca-admin-page .admin-page .ca-admin-table-card .card-title {
  color: #17213d;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.15px;
}
.ca-admin-page .admin-page .ca-count-badge {
  display: inline-flex;
  min-width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  padding: 0 8px;
  font-size: var(--text-xs);
}
.ca-admin-page .admin-page .ca-card-subtitle {
  margin-top: 6px;
  color: #8a94aa;
  font-size: var(--text-xs);
  line-height: 1.4;
}
.ca-admin-page .admin-page .ca-admin-table-card .card-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.ca-admin-tabs { display: flex; flex: 0 0 auto; gap: 4px; padding: 4px; border-radius: 12px; background: #f1f3f8; }
.ca-admin-tabs button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border: 0; border-radius: 9px; color: #5b6685; background: transparent; font-size: 12.5px; font-weight: 600; white-space: nowrap; transition: background-color .15s ease, color .15s ease; }
.ca-admin-tabs button:hover { color: #17213d; }
.ca-admin-tabs button.active { color: #17213d; background: #fff; box-shadow: 0 2px 8px rgba(31,42,68,.08); }
.ca-admin-tabs .ca-count-badge { margin: 0; min-width: 20px; height: 20px; padding: 0 6px; font-size: 10.5px; }
.ca-admin-feedback-tabs { margin: 18px 20px 12px; }
.ca-count-badge.is-success { color: #16794f; background: #e5f8ee; }
.ca-admin-page .admin-page .ca-admin-email-preview-card {
  margin: 20px 0 0;
  overflow: hidden;
  border: 1px solid #e2e7f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: none;
}
.ca-admin-page .admin-page .ca-admin-email-preview-body { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,2fr); align-items: stretch; gap: 0; height: 700px; padding: 0 !important; }
.ca-admin-email-preview-controls { display: flex; flex-direction: column; align-items: flex-start; padding: 26px 24px; }
.ca-admin-email-preview-controls h2 { margin: 0; color: #17213d; font-family: var(--family-font-heading); font-size: 17px; font-weight: 700; line-height: 1.25; }
.ca-admin-email-preview-controls p { margin: 5px 0 20px; color: #8a94aa; font-size: var(--text-xs); font-weight: 400; line-height: 1.5; }
.ca-admin-email-preview-select { width: 100%; margin-bottom: 18px; }
.ca-admin-email-preview-send { margin-top: auto; }
.ca-admin-email-preview-send svg { width: 16px; height: 16px; }
.ca-admin-email-preview-frame-wrap { position: relative; overflow: hidden; border-left: 1px solid #e3e8f2; background: #eef1f7; }
.ca-admin-email-preview-frame { display: block; width: 100%; height: 100%; min-height: 460px; border: 0; background: #fff; }
.ca-admin-email-preview-loading { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(238,241,247,.7); }
.ca-admin-email-preview-loading.is-visible { display: flex; }
@media (max-width: 767.98px) {
  .ca-admin-page .admin-page .ca-admin-email-preview-body { grid-template-columns: 1fr; height: auto; }
  .ca-admin-email-preview-frame-wrap { border-left: 0; border-top: 1px solid #e3e8f2; }
  .ca-admin-email-preview-frame { height: 460px; }
}

/* ---------- Notifiche push personalizzate (admin) ---------- */
.ca-admin-page .admin-page .ca-admin-push-card { margin: 20px 0 0; overflow: hidden; border: 1px solid #e2e7f0; border-radius: 16px; background: #fff; box-shadow: none; }
.ca-admin-page .admin-page .ca-admin-push-body { padding: 26px 24px; }
.ca-admin-push-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 22px; }
.ca-admin-push-head-icon { display: grid; flex: 0 0 auto; width: 44px; height: 44px; place-items: center; border-radius: 13px; background: var(--ca-primary-soft); color: var(--ca-primary); }
.ca-admin-push-head-icon svg { width: 21px; height: 21px; }
.ca-admin-push-head h2 { margin: 0; color: #17213d; font-family: var(--family-font-heading); font-size: 17px; font-weight: 700; line-height: 1.25; }
.ca-admin-push-head p { margin: 5px 0 0; color: #8a94aa; font-size: var(--text-xs); line-height: 1.5; }

.ca-admin-push-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.ca-admin-push-form { display: flex; flex-direction: column; }
.ca-admin-push-form .form-label { margin-bottom: 6px; color: #43506a; font-size: var(--text-sm); }
.ca-admin-push-form .form-label:not(:first-child) { margin-top: 16px; }
.ca-admin-push-optional { margin-left: 4px; color: #a2abbd; font-weight: 400; font-size: var(--text-xs); }

.ca-admin-push-target { margin: 20px 0 0; padding: 0; border: 0; }
.ca-admin-push-target legend { margin-bottom: 8px; color: #43506a; font-size: var(--text-sm); font-weight: 600; }
.ca-admin-push-radio { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; padding: 11px 13px; border: 1px solid #e2e7f0; border-radius: 11px; cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.ca-admin-push-radio:hover { border-color: #c7d0e3; }
.ca-admin-push-radio input { margin-top: 2px; accent-color: var(--ca-primary); }
.ca-admin-push-radio:has(input:checked) { border-color: var(--ca-primary); background: #faf9ff; }
.ca-admin-push-radio span { display: flex; flex-direction: column; gap: 1px; }
.ca-admin-push-radio strong { color: #17213d; font-size: var(--text-sm); font-weight: 600; }
.ca-admin-push-radio small { color: #8a94aa; font-size: var(--text-xs); }

.ca-admin-push-recipients { margin-top: 14px; padding: 14px; border: 1px solid #e2e7f0; border-radius: 12px; background: #fafbfd; }
.ca-admin-push-recipients-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.ca-admin-push-recipients-toolbar .ca-budget-movements-search { flex: 1 1 200px; }
.ca-admin-push-recipients-bulk { display: flex; gap: 6px; }
.ca-admin-push-recipients-list { max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; scrollbar-width: thin; }
.ca-admin-push-recipients-empty { padding: 24px 12px; color: #8a94aa; font-size: var(--text-xs); text-align: center; }
.ca-admin-push-group-head { position: sticky; top: 0; padding: 4px 2px; color: #a2abbd; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: #fafbfd; }
.ca-admin-push-recipient { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; cursor: pointer; transition: background-color .12s ease; }
.ca-admin-push-recipient:hover { background: #f0f2f8; }
.ca-admin-push-recipient input { flex: 0 0 auto; accent-color: var(--ca-primary); }
.ca-admin-push-recipient-avatar { display: grid; flex: 0 0 auto; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: var(--ca-primary-soft); color: var(--ca-primary); font-size: 11px; font-weight: 700; }
.ca-admin-push-recipient-copy { display: flex; flex-direction: column; gap: 0; min-width: 0; flex: 1 1 auto; }
.ca-admin-push-recipient-copy strong { color: #17213d; font-size: var(--text-sm); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ca-admin-push-recipient-copy small { color: #8a94aa; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ca-admin-push-recipient-devices { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 3px; color: #8a94aa; font-size: 11px; font-weight: 600; }
.ca-admin-push-recipient-devices svg { width: 12px; height: 12px; }
.ca-admin-push-recipients-count { margin: 10px 0 0; color: #8a94aa; font-size: 11px; font-weight: 600; }

.ca-admin-push-send { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; }
.ca-admin-push-send svg { width: 16px; height: 16px; }

.ca-admin-push-preview { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 8px; }
.ca-admin-push-preview-label { color: #a2abbd; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.ca-admin-push-preview-card { display: flex; gap: 11px; padding: 13px; border: 1px solid #e2e7f0; border-radius: 14px; background: #f6f7fb; box-shadow: 0 6px 18px rgba(23, 32, 66, .06); }
.ca-admin-push-preview-icon { display: grid; flex: 0 0 auto; width: 34px; height: 34px; place-items: center; overflow: hidden; border-radius: 9px; background: #fff; }
.ca-admin-push-preview-icon img { width: 100%; height: 100%; object-fit: cover; }
.ca-admin-push-preview-text { min-width: 0; }
.ca-admin-push-preview-text strong { display: block; color: #17213d; font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.ca-admin-push-preview-text p { margin: 2px 0 5px; color: #43506a; font-size: 12.5px; line-height: 1.4; overflow-wrap: anywhere; }
.ca-admin-push-preview-text small { color: #a2abbd; font-size: 10.5px; }

@media (max-width: 991.98px) {
  .ca-admin-push-grid { grid-template-columns: 1fr; gap: 20px; }
  .ca-admin-push-preview { position: static; }
}
.ca-admin-page .admin-page .ca-admin-empty {
  min-height: 122px;
  justify-content: center;
  padding: 20px;
}
.ca-admin-page .admin-page .ca-admin-empty > span {
  width: 46px;
  height: 46px;
  margin-bottom: 10px;
  border-radius: 13px;
}
.ca-admin-page .admin-page .ca-admin-empty > span svg { width: 21px; height: 21px; }
.ca-admin-page .admin-page .ca-admin-empty h3 {
  margin: 0 0 5px;
  color: #17213d;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}
.ca-admin-page .admin-page .ca-admin-empty p {
  margin: 0;
  color: #929bb0;
  font-size: var(--text-xs);
  line-height: 1.45;
}
.ca-admin-page .admin-page .ca-active-families-section {
  margin: 20px 0 0;
  overflow: hidden;
  border: 1px solid #e2e7f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: none;
}
.ca-admin-page .admin-page .ca-active-families-section .card-header {
  min-height: 70px;
  padding: 17px 22px;
  gap: 16px;
}
.ca-admin-page .admin-page .ca-active-families-section .card-title { margin: 0; }
.ca-admin-page .admin-page .ca-active-families-section .card-title h2 {
  margin: 0;
  color: #17213d;
  font-family: var(--family-font-heading);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
}
.ca-admin-page .admin-page .ca-active-families-section .card-title p {
  margin: 5px 0 0;
  color: #8a94aa;
  font-size: var(--text-xs);
  font-weight: 400;
}
.ca-admin-page .admin-page .ca-active-families-tools { gap: 12px; }
.ca-admin-page .admin-page .ca-budget-movements-search {
  width: 250px;
  height: 40px;
  padding: 0 13px;
  border: 1px solid #dce2ec;
  border-radius: 11px;
  background: #fff;
}
.ca-admin-page .admin-page .ca-budget-movements-search input { font-size: 12px; }
.ca-admin-page .admin-page .ca-results-count { color: #8993a8; font-size: 11px; }
.ca-admin-page .admin-page .ca-active-families-section .card-body { padding: 0; }
.ca-admin-page .admin-page .ca-families-table { width: 100%; table-layout: fixed; }
.ca-admin-page .admin-page .ca-families-table > thead > tr > th {
  height: 42px;
  padding: 0 20px !important;
  border-top: 1px solid #edf0f5;
  border-bottom: 1px solid #e9edf4;
  color: #7e889f;
  background: #fafbfd;
  font-size: 11px;
  font-weight: var(--font-semibold);
  line-height: 1.25;
  vertical-align: middle;
}
.ca-admin-page .admin-page .ca-families-table > tbody > tr > td {
  height: 58px;
  padding: 12px 20px !important;
  border-bottom: 1px solid #edf0f5;
  color: #56617a;
  font-size: 12px;
  font-weight: 500;
}
.ca-admin-page .admin-page .ca-families-table > tbody > tr:last-child > td { border-bottom: 0; }
.ca-admin-page .admin-page .ca-families-table > tbody > tr:hover { background: #fafcff; }
.ca-admin-page .admin-page .ca-families-table > tbody > tr > td:first-child strong {
  color: #17213d;
  font-size: 13px;
  font-weight: 700;
}
.ca-admin-page .admin-page .ca-families-table > tbody > tr > td:nth-child(2) { color: #44506a; font-size: 12.5px; font-weight: 500; }
.ca-admin-page .admin-page .ca-families-table > tbody > tr > td:nth-child(3) { color: #68738d; font-size: 12px; }
.ca-admin-page .admin-page .ca-families-table > thead > tr > th:nth-child(1),
.ca-admin-page .admin-page .ca-families-table > tbody > tr > td:nth-child(1) { width: 15% !important; }
.ca-admin-page .admin-page .ca-families-table > thead > tr > th:nth-child(2),
.ca-admin-page .admin-page .ca-families-table > tbody > tr > td:nth-child(2) { width: 13% !important; }
.ca-admin-page .admin-page .ca-families-table > thead > tr > th:nth-child(3),
.ca-admin-page .admin-page .ca-families-table > tbody > tr > td:nth-child(3) { width: 28% !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-admin-page .admin-page .ca-families-table > thead > tr > th:nth-child(4),
.ca-admin-page .admin-page .ca-families-table > tbody > tr > td:nth-child(4) { width: 9% !important; text-align: left; }
.ca-admin-page .admin-page .ca-families-table > thead > tr > th:nth-child(5),
.ca-admin-page .admin-page .ca-families-table > tbody > tr > td:nth-child(5) { width: 15% !important; }
.ca-admin-page .admin-page .ca-families-table > thead > tr > th:nth-child(6),
.ca-admin-page .admin-page .ca-families-table > tbody > tr > td:nth-child(6) { width: 10% !important; }
.ca-admin-page .admin-page .ca-families-table > thead > tr > th:nth-child(7),
.ca-admin-page .admin-page .ca-families-table > tbody > tr > td:nth-child(7) { width: 70px !important; text-align: right; }
.ca-admin-page .admin-page .ca-families-table .badge {
  padding: 5px 9px;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 700;
}
.ca-admin-page .admin-page .ca-families-table > tbody > tr > td:last-child .btn {
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 9px;
  color: #3983f4;
  background: #eef5ff;
}
.ca-admin-page .admin-page .ca-families-table .btn svg { width: 16px; height: 16px; }

@media (max-width: 767.98px) {
  .ca-admin-page .admin-page { padding: 16px 16px 28px; }
  .ca-admin-page .admin-page .ca-admin-heading {
    min-height: 0;
    align-items: stretch;
    flex-direction: column;
    padding: 20px;
  }
  .ca-admin-page .admin-page .ca-admin-heading-copy { align-items: center; }
  .ca-admin-page .admin-page .ca-admin-heading h1 { font-size: 23px; }
  .ca-admin-page .admin-page .ca-admin-heading p { max-width: none; font-size: 12px; }
  .ca-admin-page .admin-page .ca-admin-refresh { position: relative; right: auto; bottom: auto; width: 100%; }
  .ca-admin-page .admin-page .ca-admin-hero-art { display: none; }
  .ca-admin-page .admin-page .ca-admin-table-card .card-header { flex-direction: column; align-items: stretch; }
  .ca-admin-tabs { width: 100%; }
  .ca-admin-tabs button { flex: 1 1 auto; justify-content: center; }
  .ca-admin-page .admin-page .ca-admin-request-meta { grid-template-columns: 1fr; }
  .ca-admin-page .admin-page .ca-admin-request-meta .is-wide { grid-column: auto; }
  .ca-admin-page .admin-page .ca-active-families-section .card-header { align-items: stretch; flex-direction: column; padding: 17px 18px; }
  .ca-admin-page .admin-page .ca-active-families-tools { width: 100%; align-items: stretch; flex-direction: column; }
  .ca-admin-page .admin-page .ca-budget-movements-search { width: 100%; }
  .ca-admin-page .admin-page .ca-families-table-wrap { overflow: visible; }
  .ca-admin-page .admin-page .ca-families-table,
  .ca-admin-page .admin-page .ca-families-table tbody { display: block; width: 100%; min-width: 0; }
  .ca-admin-page .admin-page .ca-families-table thead { display: none; }
  .ca-admin-page .admin-page .ca-families-table tr { display: block; padding: 14px 18px; border-top: 1px solid #edf0f5; }
  .ca-admin-page .admin-page .ca-families-table > tbody > tr > td {
    display: grid;
    width: 100% !important;
    height: auto;
    grid-template-columns: 106px minmax(0,1fr);
    gap: 10px;
    padding: 6px 0 !important;
    border: 0;
    text-align: left;
    white-space: normal;
  }
  .ca-admin-page .admin-page .ca-families-table td::before { content: attr(data-label); color: #929bb0; font-size: 11px; font-weight: 500; }
  .ca-admin-page .admin-page .ca-families-table > tbody > tr > td:last-child { text-align: left; }
  .ca-admin-page .admin-page .ca-families-table .ca-budget-table-actions { justify-content: flex-start; }
}

/* Modale Gestisci membro: componente isolato. */
body.member-access-open .modal-backdrop.show { opacity: 1; background: rgba(18,25,44,.48); backdrop-filter: blur(3px); }
.member-access-modal .ca-member-modal {
  width: min(920px,calc(100vw - 48px));
  max-width: 920px;
  height: auto;
  max-height: calc(100vh - 40px);
  margin: 20px auto;
}
.member-access-modal .ca-member-modal .modal-content {
  position: relative;
  display: flex;
  max-height: calc(100vh - 40px);
  overflow: hidden;
  flex-direction: column;
  border: 0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(18,27,52,.2);
}
.member-access-modal .modal-header {
  position: sticky;
  z-index: 5;
  top: 0;
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid #e8ecf3;
  background: rgba(255,255,255,.96);
}
.member-access-modal .modal-title { display: flex; align-items: center; gap: 8px; margin: 0; color: #17213d; font-size: 21px; font-weight: 700; line-height: 1.25; letter-spacing: -.25px; }
.member-access-modal .modal-subtitle { margin: 3px 0 0; color: #7c879f; font-size: 11.5px; }
.member-access-modal .modal-header > .btn { width: 38px; height: 38px; border: 1px solid transparent; border-radius: 10px; background: #f6f7fa; }
.member-access-modal .modal-header > .btn:hover { border-color: #e1e5ed; background: #eef1f6; }
.member-access-modal .modal-header > .btn i { font-size: 18px; }
.member-access-modal .modal-body { overflow-x: hidden; overflow-y: auto; padding: 0 26px 24px; }
.member-access-dirty-dot { width: 8px; height: 8px; border-radius: 50%; background: #e89225; }
.member-access-profile { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; padding: 16px 18px; border: 1px solid #e5e9f2; border-radius: 15px; background: linear-gradient(135deg,#fbfaff 0%,#fff 65%); }
.member-access-profile > div { display: flex; min-width: 0; align-items: center; gap: 12px; }
.member-access-profile > div:first-child > div { display: flex; min-width: 0; flex-direction: column; }
.member-access-avatar { display: grid; width: 48px; height: 48px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #7354e8; background: #f0eafe; font-size: 13px; font-weight: 700; }
.member-access-profile strong { overflow: hidden; color: #17213d; font-size: 14px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.member-access-profile small { overflow: hidden; margin-top: 3px; color: #7d879d; font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.member-access-profile em { padding: 6px 10px; border-radius: 999px; color: #6751d7; background: #f1edff; font-size: 10.5px; font-style: normal; font-weight: 600; }
.member-access-profile b { display: inline-flex; align-items: center; gap: 6px; color: #159b63; font-size: 10.5px; font-weight: 600; }.member-access-profile b.is-suspended { color: #e8505b; }.member-access-profile b i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.member-access-section { margin-top: 22px; }
.member-access-section > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.member-access-section h3 { margin: 0; color: #17213d; font-size: 15px; font-weight: 700; }
.member-access-section header p { margin: 4px 0 0; color: #7d879d; font-size: 11.5px; line-height: 1.45; }
.member-access-role-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.member-access-role-card { position: relative; display: flex; min-height: 92px; cursor: pointer; flex-direction: column; justify-content: space-between; padding: 13px; border: 1px solid #dde3ed; border-radius: 13px; background: #fff; transition: border-color .16s ease,transform .16s ease,box-shadow .16s ease; }
.member-access-role-card:hover:not(.is-disabled) { border-color: #b9abf8; transform: translateY(-1px); }
.member-access-role-card:focus-within { box-shadow: 0 0 0 3px rgba(115,87,234,.16); }
.member-access-role-card.is-selected { border: 1.5px solid #7757f3; background: #f8f6ff; box-shadow: 0 0 0 3px rgba(119,87,243,.08); }
.member-access-role-card.is-disabled { cursor: not-allowed; opacity: .68; }.member-access-role-card.is-disabled.is-selected { opacity: 1; }
.member-access-role-card input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.member-access-role-icon { display: grid; width: 36px; height: 36px; place-items: center; margin-bottom: 10px; border-radius: 11px; color: var(--ca-primary); background: var(--ca-primary-soft); }.member-access-role-icon svg { width: 18px; height: 18px; }
.member-access-role-check { position: absolute; top: 10px; right: 10px; display: none; width: 20px; height: 20px; place-items: center; border-radius: 50%; color: #fff; background: var(--ca-primary); }.member-access-role-check svg { width: 12px; height: 12px; }.member-access-role-card.is-selected .member-access-role-check { display: grid; }
.member-access-role-card strong { color: #26314a; font-size: 13px; font-weight: 700; }.member-access-role-card small { margin-top: 4px; color: #8791a6; font-size: 11.5px; line-height: 1.35; }
.member-access-owner-notice { display: flex; align-items: flex-start; gap: 10px; margin-top: 12px; padding: 12px 14px; border: 1px solid #e4deff; border-radius: 12px; color: #66568e; background: #f7f5ff; }.member-access-owner-notice > i { margin-top: 2px; font-size: 18px; }.member-access-owner-notice div { display: flex; flex-direction: column; }.member-access-owner-notice strong { font-size: 11.5px; }.member-access-owner-notice span { margin-top: 2px; font-size: 10.5px; line-height: 1.4; }
.member-access-permissions > header > span { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; color: #68748b; background: #f1f4f9; font-size: 10px; }
.member-access-permissions-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 14px; }
.member-access-module { min-height: 0; padding: 16px; border: 1px solid #e1e6ef; border-radius: 15px; background: #fff; transition: border-color .16s ease, box-shadow .16s ease; }
.member-access-module:has(.member-access-permission-row.is-primary input:checked) { border-color: #d9d4fb; box-shadow: 0 6px 18px rgba(115,87,234,.06); }
.member-access-module > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.member-access-module > header > div { display: flex; align-items: center; gap: 11px; }.member-access-module > header > div > span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; }.member-access-module > header svg { width: 18px; height: 18px; }.member-access-module > header .is-purple { color: var(--ca-primary); background: var(--ca-primary-soft); }.member-access-module > header .is-blue { color: #2f80ed; background: #eaf3ff; }.member-access-module > header .is-green { color: #0e9f6e; background: #e6f9f1; }.member-access-module > header .is-orange { color: #e2911a; background: #fff4e0; }.member-access-module > header .is-slate { color: #5b6579; background: #eef1f6; }.member-access-module > header .is-pink { color: #d6459b; background: #ffeef7; }
.member-access-module > header strong { color: #1e2942; font-size: 13.5px; font-weight: 700; }.member-access-module > header small { color: #8791a6; font-size: 11px; }
.member-access-module__rows { display: grid; gap: 2px; }
.member-access-permission-row { position: relative; display: flex; min-height: 34px; cursor: pointer; align-items: center; gap: 10px; padding: 5px 6px; border-radius: 8px; color: #59647b; font-size: 12.5px; transition: background .12s ease; }.member-access-permission-row:hover { background: #f7f7fb; }.member-access-permission-row.is-primary { justify-content: space-between; margin-bottom: 8px; padding-bottom: 10px; border-bottom: 1px solid #eef1f5; border-radius: 0; color: #1e2942; font-weight: 700; }.member-access-permission-row.is-primary:hover { background: transparent; }.member-access-permission-row.is-primary > span:last-child { order: -1; margin-right: auto; }.member-access-permission-row:not(.is-primary) { padding-left: 14px; }
.member-access-permission-row input { position: absolute; width: 17px; height: 17px; opacity: 0; }
.member-access-checkbox { display: grid; width: 19px; height: 19px; flex: 0 0 auto; place-items: center; border: 1.5px solid #cbd2df; border-radius: 6px; background: #fff; transition: border-color .14s ease, background .14s ease; }.member-access-checkbox svg { width: 12px; height: 12px; color: #fff; opacity: 0; transform: scale(.5); transition: opacity .14s ease, transform .14s ease; }
.member-access-permission-row input:checked + .member-access-checkbox { border-color: var(--ca-primary); background: var(--ca-primary); }.member-access-permission-row input:checked + .member-access-checkbox svg { opacity: 1; transform: scale(1); }.member-access-permission-row input:focus-visible + .member-access-checkbox { box-shadow: 0 0 0 3px rgba(79,70,255,.16); }.member-access-permission-row input:disabled + .member-access-checkbox { cursor: not-allowed; border-color: #d8dde6; background: #f1f3f7; opacity: .75; }.member-access-permission-row:has(input:disabled) { cursor: not-allowed; }.member-access-permission-row:has(input:disabled):hover { background: transparent; }
.member-access-permission-row.is-primary .member-access-checkbox { position: relative; width: 38px; height: 22px; flex: 0 0 auto; border-radius: 999px; border-color: #dde1ea; background: #e7e9f0; }
.member-access-permission-row.is-primary .member-access-checkbox svg { display: none; }
.member-access-permission-row.is-primary .member-access-checkbox::after { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(15,23,42,.25); content: ""; transition: transform .16s ease; }
.member-access-permission-row.is-primary input:checked + .member-access-checkbox { border-color: var(--ca-primary); background: var(--ca-primary); }
.member-access-permission-row.is-primary input:checked + .member-access-checkbox::after { transform: translateX(16px); }
.member-access-permission-row.is-primary input:disabled + .member-access-checkbox { background: #eef0f5; }
.member-access-custom-message { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; color: #7357ea; font-size: 10.5px; }.member-access-custom-message i { font-size: 14px; }
.member-access-modal .modal-footer { position: sticky; z-index: 5; bottom: 0; display: flex; min-height: 70px; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; border-top: 1px solid #e7ebf2; background: rgba(255,255,255,.97); }
.member-access-modal .modal-footer > div { display: flex; gap: 10px; margin-left: auto; }.member-access-modal .modal-footer .btn { height: 40px; min-height: 40px; padding: 0 17px; border-radius: 10px; font-size: 12px; font-weight: 600; }.member-access-modal .modal-footer [data-cancel] { color: #35405a; background: #f5f6f9; }.member-access-modal .modal-footer [data-confirm] { padding-inline: 18px; color: #fff; background: #6850eb; box-shadow: 0 6px 16px rgba(104,80,235,.2); font-weight: 700; }.member-access-modal .modal-footer [data-confirm]:disabled { box-shadow: none; opacity: .48; }
.member-access-unsaved { display: inline-flex; align-items: center; gap: 7px; color: #7d879d; font-size: 10.5px; }.member-access-unsaved i { width: 7px; height: 7px; border-radius: 50%; background: #e89225; }
.member-access-discard { position: absolute; z-index: 20; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(18,25,44,.38); backdrop-filter: blur(2px); }
.member-access-discard > div { width: min(430px,100%); padding: 22px; border-radius: 16px; background: #fff; box-shadow: 0 18px 50px rgba(18,27,52,.22); text-align: center; }
.member-access-discard > div > span { display: grid; width: 42px; height: 42px; place-items: center; margin: 0 auto 12px; border-radius: 12px; color: #e89225; background: #fff4e5; }.member-access-discard > div > span i { font-size: 20px; }
.member-access-discard h3 { margin: 0; color: #17213d; font-size: 16px; }.member-access-discard p { margin: 6px 0 18px; color: #7d879d; font-size: 11.5px; line-height: 1.5; }.member-access-discard footer { display: flex; justify-content: center; gap: 10px; }.member-access-discard footer .btn { min-height: 40px; border-radius: 10px; font-size: 12px; }

@media (max-width: 991.98px) {
  .member-access-modal .ca-member-modal { width: calc(100vw - 32px); }.member-access-role-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 575.98px) {
  .member-access-modal .ca-member-modal { width: calc(100vw - 12px); max-height: calc(100vh - 12px); margin: 6px auto; }.member-access-modal .ca-member-modal .modal-content { max-height: calc(100vh - 12px); border-radius: 16px; }.member-access-modal .modal-header { padding: 15px 16px; }.member-access-modal .modal-title { font-size: 18px; }.member-access-modal .modal-body { padding: 0 16px 18px; }.member-access-profile { align-items: flex-start; flex-direction: column; }.member-access-profile > div:last-child { padding-left: 60px; }.member-access-role-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.member-access-permissions-grid { grid-template-columns: 1fr; }.member-access-modal .modal-footer { align-items: stretch; flex-direction: column; padding: 12px 16px; }.member-access-modal .modal-footer > div { display: grid; width: 100%; grid-template-columns: repeat(2,minmax(0,1fr)); margin: 0; }.member-access-modal .modal-footer .btn { width: 100%; }.member-access-unsaved { min-height: 16px; }
  .member-access-discard footer { flex-direction: column; }.member-access-discard footer .btn { width: 100%; }
}


/* ================================================================
   Impostazioni — design unico, coerente con Calendario/Dashboard.
   ================================================================ */

.ca-settings-page .settings-card { overflow: visible; }
.ca-settings-page .settings-card > .card-header.border-0 { padding-bottom: 20px; }
.ca-settings-page .settings-card-title { display: flex; align-items: center; gap: 14px; }
.ca-settings-page .settings-card-title > div { min-width: 0; }
.ca-settings-page .settings-card-title-main { display: block; font-family: var(--family-font-body); font-size: var(--text-lg); font-weight: var(--font-semibold); color: #17213d; }
.ca-settings-page .settings-card-title-sub { display: block; margin-top: 2px; font-family: var(--family-font-body); font-size: var(--text-sm); font-weight: var(--font-regular); color: #6b7280; }
.ca-settings-page .ca-settings-category-name { font-size: var(--text-lg); font-weight: var(--font-semibold); color: #17213d; }
.ca-settings-page .settings-card-icon { display: grid; width: 44px; height: 44px; flex: 0 0 44px; place-items: center; border-radius: 13px; background: var(--ca-primary-soft); color: var(--ca-primary); }
.ca-settings-page .settings-card-icon svg,
.ca-settings-page .settings-card-icon i { width: 21px; height: 21px; font-size: 21px; }
.ca-settings-page .btn { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 7px; padding: 0 17px; border-radius: 10px; font-size: 13px; font-weight: 700; line-height: 1; white-space: nowrap; }
.ca-settings-page .btn.btn-sm { min-height: 34px; padding: 0 13px; gap: 6px; font-size: var(--text-sm); }
.ca-settings-page .btn svg { width: 15px; height: 15px; flex: 0 0 auto; }
.ca-settings-page .btn.btn-sm svg { width: 14px; height: 14px; }
.ca-settings-page .ca-notification-test-action { min-height: 32px; padding: 0 11px; gap: 5px; font-size: 12px; }

.ca-settings-page .settings-status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px 4px 9px; border-radius: 999px; font-size: var(--text-xs); font-weight: 700; white-space: nowrap; }
.ca-settings-page .settings-status-pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ca-settings-page .settings-status-pill.is-success { color: #12805a; background: #e5f8ef; }
.ca-settings-page .settings-status-pill.is-warning { color: #a8660f; background: #fff2da; }
.ca-settings-page .settings-status-pill.is-danger { color: #c23a4d; background: #fde9ec; }
.ca-settings-page .settings-status-pill.is-secondary { color: #5c6580; background: #eef0f5; }

/* Profilo */
.ca-settings-page .settings-profile-body { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.ca-settings-page .settings-profile-user-card { display: flex; width: 230px; flex: 0 0 230px; flex-direction: column; align-items: center; gap: 4px; padding: 26px 18px; border: 1px solid var(--ca-border); border-radius: 16px; background: #fafbff; text-align: center; }
.ca-settings-page .settings-profile-user-card .ca-profile-avatar { width: 84px; height: 84px; border: 0; border-radius: 24px; color: #fff; background: linear-gradient(135deg, #6d63ff 0%, var(--ca-primary) 100%); font-size: 26px; box-shadow: 0 12px 26px rgba(79, 70, 255, .22); }
.ca-settings-page .settings-profile-user-copy { display: flex; flex-direction: column; align-items: center; }
.ca-settings-page .settings-profile-user-copy h3 { margin: 6px 0 0; font-family: var(--family-font-heading); font-size: 16px; font-weight: 700; color: #17213d; }
.ca-settings-page .settings-profile-user-copy .settings-status-pill { margin-top: 9px; }
.ca-settings-page .settings-profile-user-copy p { margin: 9px 0 0; max-width: 100%; overflow: hidden; color: #6b7690; font-size: var(--text-sm); text-overflow: ellipsis; white-space: nowrap; }
.ca-settings-page .settings-profile-user-card .settings-avatar-change { width: 100%; margin-top: 14px; }

.ca-settings-page .settings-profile-data-card { flex: 1 1 360px; min-width: 0; }
.ca-settings-page .settings-profile-data-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.ca-settings-page .settings-profile-data-heading > span { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border-radius: 10px; background: var(--ca-primary-soft); color: var(--ca-primary); }
.ca-settings-page .settings-profile-data-heading > span svg { width: 18px; height: 18px; }
.ca-settings-page .settings-profile-data-heading h3 { margin: 0; font-family: var(--family-font-heading); font-size: var(--text-lg); font-weight: 700; color: #24304b; }
.ca-settings-page .settings-profile-data-heading p { margin: 2px 0 0; color: #8490a6; font-size: 12px; }
.ca-settings-page .settings-profile-data-card .ca-profile-fields { gap: 16px; }
.ca-settings-page .settings-profile-data-card label { font-size: var(--text-sm); }
.ca-settings-page .settings-profile-data-card .form-control { height: 44px; border-color: var(--ca-border); border-radius: 11px; font-size: var(--text-md); }
.ca-settings-page .settings-profile-data-card .form-control:focus { border-color: var(--ca-primary); box-shadow: 0 0 0 3px rgba(79, 70, 255, .12); }
.ca-settings-page .settings-terms-link { display: inline-flex; align-items: center; gap: 7px; margin-top: 20px; color: #6a63f3; font-size: var(--text-sm); font-weight: 700; text-decoration: none; }
.ca-settings-page .settings-terms-link svg { width: 15px; height: 15px; }
.ca-settings-page .settings-terms-link:hover { text-decoration: underline; }
.ca-settings-page .ca-profile-footer { display: flex; justify-content: flex-end; }

/* Famiglia */
.ca-settings-page .settings-family-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 18px 20px; margin-bottom: 22px; border: 1px solid var(--ca-border); border-radius: 16px; background: linear-gradient(120deg, #f8f7ff 0%, #fff 65%); }
.ca-settings-page .settings-family-icon { display: grid; width: 50px; height: 50px; flex: 0 0 50px; place-items: center; border-radius: 15px; background: var(--ca-primary-soft); color: var(--ca-primary); }
.ca-settings-page .settings-family-icon svg { width: 24px; height: 24px; }
.ca-settings-page .settings-family-banner-copy { flex: 1 1 220px; min-width: 0; }
.ca-settings-page .settings-family-banner-title { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.ca-settings-page .settings-family-banner-title h3 { margin: 0; overflow: hidden; color: #1a2544; font-family: var(--family-font-heading); font-size: 18px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.ca-settings-page .settings-family-banner-copy p { margin: 6px 0 0; color: #6b7690; font-size: 13px; }
.ca-settings-page .settings-family-banner-copy p strong { color: #3a445e; font-weight: 700; }
.ca-settings-page .settings-family-rename { flex: 0 0 auto; white-space: nowrap; }

.ca-settings-page .settings-family-location { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 22px; border: 1px solid var(--ca-border); border-radius: 14px; background: #fff; }
.ca-settings-page .settings-family-location.is-empty { border-color: #f0d9a8; background: #fffdf5; }
.ca-settings-page .settings-family-location-icon { display: grid; flex: 0 0 34px; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: #eef3fb; color: #356df3; }
.ca-settings-page .settings-family-location-icon svg { width: 17px; height: 17px; }
.ca-settings-page .settings-family-location-copy { flex: 1 1 200px; min-width: 0; }
.ca-settings-page .settings-family-location-copy strong { display: block; color: #1a2544; font-size: 13.5px; font-weight: 700; }
.ca-settings-page .settings-family-location-copy p { margin: 3px 0 0; color: #6b7690; font-size: 12.5px; }
.ca-settings-page .settings-family-location-value { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px !important; color: #1a2544 !important; font-size: 13px; font-weight: 600; }
.ca-settings-page .settings-family-location-value svg { width: 15px; height: 15px; color: #1f9f58; }
.ca-settings-page .settings-family-location-value.is-empty { color: #9a7b2f !important; font-weight: 600; }
.ca-settings-page .settings-family-location-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: 0 0 auto; }
.ca-settings-page .settings-family-location-actions .btn-link { font-size: 12px; text-decoration: none; }
.ca-settings-page .settings-family-location-actions .btn-link:hover { text-decoration: underline; }
.ca-settings-page .settings-family-location > button { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 575.98px) {
  .ca-settings-page .settings-family-location-actions { align-items: stretch; width: 100%; }
}
.ca-location-results { display: flex; flex-direction: column; gap: 6px; }
.ca-location-result { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--ca-border); border-radius: 10px; font-size: 13px; cursor: pointer; }
.ca-location-result:hover { border-color: #c4d2ec; background: #f7faff; }
.ca-location-result input { width: 15px; height: 15px; }

.ca-settings-page .settings-family-columns { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(240px, 1fr); align-items: start; gap: 20px; }
.ca-settings-page .settings-family-subsection { overflow: visible; border: 1px solid var(--ca-border); border-radius: 15px; background: #fff; }
.ca-settings-page .settings-subsection-header { display: flex; min-height: 54px; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 18px; border-bottom: 1px solid #edf0f5; }
.ca-settings-page .settings-subsection-header h4 { display: flex; align-items: center; gap: 8px; margin: 0; color: #24304b; font-family: var(--family-font-body); font-size: var(--text-lg); font-weight: var(--font-semibold); }
.ca-settings-page .settings-subsection-header p { margin: 0; color: #8a94a9; font-size: 12px; }
.ca-settings-page .settings-count-badge { display: inline-flex; min-width: 22px; height: 22px; align-items: center; justify-content: center; padding: 0 7px; border-radius: 999px; background: var(--ca-primary-soft); color: var(--ca-primary); font-size: var(--text-xs); font-weight: 700; }

.ca-settings-page .ca-family-table-wrap { overflow: visible; }
.ca-settings-page .ca-row-menu > summary svg,
.ca-settings-page .ca-row-menu > summary i { width: 16px; height: 16px; font-size: 16px; }
.ca-settings-page .ca-row-menu > div { z-index: 60; }
.ca-settings-page .ca-settings-content > *:has(.ca-row-menu[open]) { position: relative; z-index: 50; }
.ca-settings-page .ca-family-members-table { width: 100%; border-collapse: collapse; table-layout: auto; }
.ca-settings-page .ca-family-members-table th { padding: 12px 18px; color: #8791a7; background: #fbfcfe; font-size: var(--text-xs); font-weight: 700; text-align: left; white-space: nowrap; }
.ca-settings-page .ca-family-members-table td { min-height: 0; padding: 12px 18px; border-top: 1px solid #f0f2f7; color: #3a445e; font-size: 13px; }
.ca-settings-page .ca-family-members-table td:first-child { color: inherit; }
.ca-settings-page .ca-member-avatar { border-radius: 11px; background: var(--ca-primary-soft); color: var(--ca-primary); }
.ca-settings-page .ca-member-identity { display: block; min-width: 0; }
.ca-settings-page .ca-member-identity strong,
.ca-settings-page .ca-member-identity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-settings-page .ca-member-identity strong { color: #1e2a45; font-size: 13px; font-weight: var(--font-semibold); }
.ca-settings-page .ca-member-identity small { margin-top: 2px; color: #8993a9; font-size: var(--text-xs); }
.ca-settings-page .ca-family-members-table em.is-owner { color: #a8660f; background: #fff2da; }
.ca-settings-page .ca-family-members-table em.is-custom { color: #6a4fe0; background: #f1edff; }
.ca-settings-page .ca-member-readonly { color: #8e98ac; font-size: 12px; font-weight: 600; white-space: nowrap; }

.ca-settings-page .settings-family-invites-section { display: flex; min-height: 100%; flex-direction: column; }
.ca-settings-page .ca-family-invites-empty { flex: 1 1 auto; min-height: 160px; padding: 20px; }
.ca-settings-page .settings-invite-primary { align-self: center; margin: 4px 16px 16px; }
.ca-settings-page .settings-invite-list { display: grid; gap: 10px; padding: 14px; }
.ca-settings-page .settings-invite-list article { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px; border: 1px solid #edf0f5; border-radius: 12px; }
.ca-settings-page .settings-invite-list article > span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; background: var(--ca-primary-soft); color: var(--ca-primary); }
.ca-settings-page .settings-invite-list strong,
.ca-settings-page .settings-invite-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-settings-page .settings-invite-list strong { font-size: 13px; font-weight: 700; color: #1e2a45; }
.ca-settings-page .settings-invite-list small { margin-top: 2px; color: #8a94a9; font-size: var(--text-xs); }

/* Notifiche e dispositivo */
.ca-settings-page .settings-notifications-body { display: grid; grid-template-columns: minmax(230px, .75fr) minmax(0, 2.25fr); align-items: start; gap: 20px; }
.ca-settings-page .settings-device-column { display: grid; align-content: start; gap: 16px; }
.ca-settings-page .settings-mini-card { border: 1px solid var(--ca-border); border-radius: 14px; background: #fff; }
.ca-settings-page .settings-mini-card-header { display: flex; align-items: center; gap: 11px; padding: 14px 16px; border-bottom: 1px solid #edf0f5; }
.ca-settings-page .settings-mini-card-header strong { display: block; color: #24304b; font-family: var(--family-font-heading); font-size: 13px; font-weight: 700; }
.ca-settings-page .settings-mini-card-header span:last-child { display: block; margin-top: 2px; color: #8993a9; font-size: var(--text-xs); }
.ca-settings-page .settings-mini-card-icon { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border-radius: 11px; background: var(--ca-primary-soft); color: var(--ca-primary); }
.ca-settings-page .settings-mini-card-icon svg { width: 18px; height: 18px; }
.ca-settings-page .settings-mini-card > .settings-info-row:first-of-type { border-top: 0; }
.ca-settings-page .settings-info-row { display: flex; min-height: 56px; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; border-top: 1px solid #edf0f5; }
.ca-settings-page .settings-info-row small { display: block; margin-bottom: 3px; color: #8993a9; font-size: 11px; }
.ca-settings-page .settings-info-row strong { display: block; color: #2a3651; font-size: 13px; font-weight: 700; }
.ca-settings-page .settings-enable-push { width: calc(100% - 32px); margin: 4px 16px 16px; }
.ca-settings-page .settings-mini-card #caPushStatusMessage:not(.d-none) { margin: 0 16px 16px; }

.ca-settings-page .settings-download-card { display: flex; align-items: flex-start; gap: 13px; padding: 16px; }
.ca-settings-page .settings-mini-card-icon.is-accent { color: var(--ca-primary); background: var(--ca-primary-soft); }
.ca-settings-page .settings-download-card strong { display: block; color: #24304b; font-family: var(--family-font-heading); font-size: var(--text-lg); font-weight: 700; }
.ca-settings-page .settings-download-card p { margin: 4px 0 12px; color: #7c879f; font-size: 12px; line-height: 1.4; }

.ca-settings-page .settings-notification-list { overflow: hidden; border: 1px solid var(--ca-border); border-radius: 14px; background: #fff; }
.ca-settings-page .settings-notification-list-header { padding: 14px 18px; border-bottom: 1px solid #edf0f5; background: #fbfcfe; }
.ca-settings-page .settings-notification-list-header strong { display: block; color: #24304b; font-family: var(--family-font-heading); font-size: var(--text-lg); font-weight: 700; }
.ca-settings-page .settings-notification-list-header span { display: block; margin-top: 2px; color: #8993a9; font-size: 12px; }
.ca-settings-page .ca-notification-type-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 18px; border-top: 1px solid #edf0f5; border-bottom: 0; }
.ca-settings-page .ca-notification-type-row:first-child { border-top: 0; }
.ca-settings-page .ca-notification-heading { display: flex; align-items: center; gap: 12px; flex: 1 1 220px; min-width: 0; }
.ca-settings-page .ca-notification-type-icon { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border-radius: 11px; }
.ca-settings-page .ca-notification-type-icon svg { width: 18px; height: 18px; }
.ca-settings-page .ca-notification-type-icon.is-primary { color: var(--ca-primary); background: var(--ca-primary-soft); }
.ca-settings-page .ca-notification-type-icon.is-success { color: #12805a; background: #e5f8ef; }
.ca-settings-page .ca-notification-type-icon.is-warning { color: #a8660f; background: #fff2da; }
.ca-settings-page .ca-notification-type-icon.is-info { color: #1f7ecb; background: #e8f4ff; }
.ca-settings-page .ca-notification-copy { flex: 1 1 auto; min-width: 0; }
.ca-settings-page .ca-notification-copy strong { display: block; color: #24304b; font-size: var(--text-lg); font-weight: 700; }
.ca-settings-page .ca-notification-copy span { display: block; margin-top: 3px; color: #7c879f; font-size: 12px; line-height: 1.4; }
.ca-settings-page .ca-notification-test-actions { display: flex; flex: 0 0 auto; gap: 8px; margin-left: auto; }
.ca-settings-page .ca-notification-test-action { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ca-settings-page .ca-notification-test-action svg { width: 14px; height: 14px; }
.ca-settings-page .ca-notification-test-action.is-telegram { color: #159bd5; background: #eaf8ff; }
.ca-settings-page .ca-notification-test-action:hover:not(:disabled) { color: #fff !important; }
.ca-settings-page .ca-notification-test-action:not(.is-telegram):hover:not(:disabled) { background: var(--ca-primary) !important; border-color: var(--ca-primary) !important; }
.ca-settings-page .ca-notification-test-action.is-telegram:hover:not(:disabled) { background: #159bd5 !important; border-color: #159bd5 !important; }
.ca-settings-page .ca-notification-test-action:disabled { background: #f1f2f6 !important; color: #99a1b3 !important; border-color: transparent !important; opacity: 1; cursor: not-allowed; pointer-events: none; }
.ca-settings-page .settings-notification-time { display: flex; align-items: center; gap: 8px; padding: 12px 18px; color: #8b95aa; font-size: 12px; border-top: 1px solid #edf0f5; }
.ca-settings-page .settings-notification-time svg { width: 15px; height: 15px; }

/* Responsive */
@media (max-width: 1199.98px) {
  .ca-settings-page .settings-profile-user-card { width: 100%; flex: 1 1 100%; flex-direction: row; align-items: center; gap: 16px; padding: 18px; text-align: left; }
  .ca-settings-page .settings-profile-user-copy { align-items: flex-start; }
  .ca-settings-page .settings-profile-user-copy p { white-space: normal; }
  .ca-settings-page .settings-profile-user-card .settings-avatar-change { width: auto; margin: 0 0 0 auto; }
  .ca-settings-page .settings-family-columns { grid-template-columns: 1fr; }
  .ca-settings-page .settings-notifications-body { grid-template-columns: 1fr; }
  .ca-settings-page .settings-device-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767.98px) {
  .ca-settings-page .settings-profile-user-card { flex-direction: column; text-align: center; }
  .ca-settings-page .settings-profile-user-copy { align-items: center; }
  .ca-settings-page .settings-profile-user-card .settings-avatar-change { width: 100%; margin: 14px 0 0; }
  .ca-settings-page .settings-profile-data-card .ca-profile-fields { grid-template-columns: 1fr; }
  .ca-settings-page .settings-profile-data-card .ca-profile-fields .is-wide { grid-column: auto; }
  .ca-settings-page .settings-family-banner { flex-direction: column; align-items: flex-start; }
  .ca-settings-page .settings-family-banner-copy { flex: 0 1 auto; width: 100%; }
  .ca-settings-page .settings-family-rename { width: 100%; justify-content: center; }
  .ca-settings-page .settings-device-column { grid-template-columns: 1fr; }
  .ca-settings-page .ca-notification-type-row { align-items: flex-start; }
  .ca-settings-page .ca-notification-heading { flex: 1 1 auto; }
  .ca-settings-page .ca-notification-test-actions { width: 100%; margin-left: 0; }
  .ca-settings-page .ca-notification-test-action { flex: 1 1 0; justify-content: center; }
  .ca-settings-page .ca-family-members-table tr:first-child { border-top: 0; }
  .ca-settings-page .ca-family-members-table td:first-child { grid-template-columns: 36px minmax(0, 1fr); }
  .ca-settings-page .ca-family-members-table td:first-child::before { display: none; }
}

/* ================================================================
   Pagina di accesso — versione commerciale.
   ================================================================ */

.ca-signin-page { background: #fff; }
.ca-signin-page .d-flex.flex-column.flex-lg-row { min-height: 100vh; }

/* Pannello sinistro */
.ca-signin-page .ca-login-left { position: relative; display: flex; flex: 1 1 56%; align-items: center; gap: 48px; overflow: hidden; padding: 64px 56px; background-image: linear-gradient(120deg, rgba(247, 246, 255, .88) 0%, rgba(247, 246, 255, .62) 34%, rgba(247, 246, 255, .28) 68%, rgba(247, 246, 255, .18) 100%), url("images/login/login-hero.jpg"); background-size: cover; background-position: 62% center; background-repeat: no-repeat; }
.ca-signin-page .ca-login-left-inner { position: relative; z-index: 2; flex: 0 1 460px; min-width: 0; }

.ca-signin-page .ca-login-brand { display: flex; align-items: center; gap: 13px; margin-bottom: 40px; }
.ca-signin-page .ca-login-logo-mark { display: grid; width: 44px; height: 44px; flex: 0 0 44px; place-items: center; border-radius: 13px; background: var(--ca-primary); color: #fff; box-shadow: 0 12px 26px rgba(79, 70, 255, .3); }
.ca-signin-page .ca-login-logo-mark svg { width: 22px; height: 22px; }
.ca-signin-page .ca-login-brand-name { font-family: var(--family-font-heading); font-size: 20px; font-weight: 700; color: #17213d; }

.ca-signin-page .ca-login-hero-title { margin: 0 0 18px; font-family: var(--family-font-heading); font-size: clamp(32px, 3.4vw, 43px); font-weight: 700; line-height: 1.16; letter-spacing: -.02em; color: #151c33; }
.ca-signin-page .ca-login-hero-title span { background: linear-gradient(120deg, #7166f2, #4f46ff); background-clip: text; -webkit-background-clip: text; color: transparent; }
.ca-signin-page .ca-login-hero-subtitle { max-width: 420px; margin: 0 0 32px; color: #5b6478; font-size: 16px; line-height: 1.6; }

.ca-signin-page .ca-login-hero-features { display: grid; gap: 12px; margin-bottom: 32px; }
.ca-signin-page .ca-login-hero-features > div { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid rgba(79, 70, 255, .1); border-radius: 16px; background: rgba(255, 255, 255, .72); box-shadow: 0 10px 26px rgba(31, 35, 80, .05); }
.ca-signin-page .ca-login-hero-features > div > span { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border-radius: 12px; background: var(--ca-primary-soft); color: var(--ca-primary); }
.ca-signin-page .ca-login-hero-features > div > span svg { width: 20px; height: 20px; }
.ca-signin-page .ca-login-hero-features strong { display: block; color: #1c2437; font-size: var(--text-lg); font-weight: 700; }
.ca-signin-page .ca-login-hero-features small { display: block; margin-top: 2px; color: #6b7488; font-size: var(--text-sm); line-height: 1.4; }

.ca-signin-page .ca-login-hero-cta { display: inline-flex; align-items: center; gap: 9px; min-height: 52px; padding: 0 26px; border: 0; border-radius: 14px; font-size: var(--text-lg); font-weight: var(--font-semibold); box-shadow: 0 16px 34px rgba(79, 70, 255, .28); }
.ca-signin-page .ca-login-hero-cta svg { width: 18px; height: 18px; }
.ca-signin-page .ca-login-hero-trust { display: flex; align-items: center; gap: 8px; margin-top: 16px; color: #6b7488; font-size: var(--text-sm); font-weight: 600; }
.ca-signin-page .ca-login-hero-trust svg { width: 14px; height: 14px; color: #8f97ac; }

/* Blob decorativi + linea */
.ca-signin-page .ca-login-blob { position: absolute; z-index: 0; border-radius: 50%; filter: blur(46px); opacity: .32; pointer-events: none; }
.ca-signin-page .ca-login-blob-a { top: -60px; right: 40px; width: 240px; height: 240px; background: radial-gradient(circle, #c8bfff, transparent 70%); }
.ca-signin-page .ca-login-blob-b { bottom: -40px; left: 30%; width: 220px; height: 220px; background: radial-gradient(circle, #ffd7bd, transparent 70%); }
.ca-signin-page .ca-login-showcase-line { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; }

/* Showcase: mockup di prodotto fluttuanti */
.ca-signin-page .ca-login-showcase { position: relative; flex: 0 0 460px; width: 460px; height: 460px; }
.ca-signin-page .ca-showcase-card { position: absolute; z-index: 3; padding: 14px 16px; border-radius: 16px; background: #fff; box-shadow: 0 20px 46px rgba(31, 35, 80, .16); font-size: 12px; }

.ca-signin-page .ca-showcase-card.is-events { top: 10px; left: 0; width: 190px; transform: rotate(-3deg); }
.ca-signin-page .ca-showcase-card.is-events header { margin-bottom: 10px; color: #1c2437; font-family: var(--family-font-heading); font-size: 13px; font-weight: 700; }
.ca-signin-page .ca-showcase-event { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.ca-signin-page .ca-showcase-event:last-child { margin-bottom: 0; }
.ca-signin-page .ca-showcase-event span { display: grid; width: 28px; height: 28px; flex: 0 0 28px; place-items: center; border-radius: 9px; background: var(--ca-primary-soft); color: var(--ca-primary); }
.ca-signin-page .ca-showcase-event span svg { width: 14px; height: 14px; }
.ca-signin-page .ca-showcase-event strong { display: block; color: #1c2437; font-size: var(--text-xs); font-weight: 700; line-height: 1.3; }
.ca-signin-page .ca-showcase-event small { display: block; margin-top: 1px; color: #8a93a8; font-size: var(--text-xs); }

.ca-signin-page .ca-showcase-card.is-calendar { top: 60px; left: 200px; width: 230px; z-index: 2; transform: rotate(2deg); }
.ca-signin-page .ca-showcase-card.is-calendar header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; color: #1c2437; font-family: var(--family-font-heading); font-size: var(--text-sm); font-weight: 700; }
.ca-signin-page .ca-showcase-card.is-calendar header svg { width: 13px; height: 13px; color: #98a1b5; }
.ca-signin-page .ca-showcase-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px 3px; text-align: center; }
.ca-signin-page .ca-showcase-cal-grid .is-weekday { color: #9aa2b5; font-size: var(--text-2xs); font-weight: 700; }
.ca-signin-page .ca-showcase-cal-grid span:not(.is-weekday) { color: #4b5468; font-size: 10px; line-height: 20px; }
.ca-signin-page .ca-showcase-cal-grid .is-today { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--ca-primary); color: #fff; font-weight: 700; }

.ca-signin-page .ca-showcase-card.is-budget { top: 288px; left: 10px; width: 205px; transform: rotate(-2deg); }
.ca-signin-page .ca-showcase-card.is-budget header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: #6b7488; font-size: var(--text-xs); font-weight: 700; }
.ca-signin-page .ca-showcase-card.is-budget header svg { width: 14px; height: 14px; color: var(--ca-primary); }
.ca-signin-page .ca-showcase-amount { display: block; margin-bottom: 10px; color: #1c2437; font-family: var(--family-font-heading); font-size: var(--text-xl); font-weight: 700; }
.ca-signin-page .ca-showcase-amount em { color: #9aa2b5; font-size: var(--text-sm); font-style: normal; font-weight: 600; }
.ca-signin-page .ca-showcase-progress { height: 7px; margin-bottom: 8px; border-radius: 999px; background: #eef0f6; overflow: hidden; }
.ca-signin-page .ca-showcase-progress span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #57c98a, #2fae72); }
.ca-signin-page .ca-showcase-card.is-budget small { color: #8a93a8; font-size: var(--text-xs); font-weight: 600; }

.ca-signin-page .ca-showcase-card.is-project { top: 352px; left: 220px; z-index: 2; width: 220px; display: flex; align-items: center; gap: 11px; flex-wrap: wrap; transform: rotate(3deg); }
.ca-signin-page .ca-showcase-project-icon { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border-radius: 11px; background: #fff0e6; color: #e2822f; }
.ca-signin-page .ca-showcase-project-icon svg { width: 18px; height: 18px; }
.ca-signin-page .ca-showcase-card.is-project strong { display: block; color: #1c2437; font-size: 12px; font-weight: 700; }
.ca-signin-page .ca-showcase-card.is-project small { display: block; margin-top: 1px; color: #8a93a8; font-size: var(--text-xs); }
.ca-signin-page .ca-showcase-avatars { display: flex; margin-left: auto; }
.ca-signin-page .ca-showcase-avatars span { display: grid; width: 24px; height: 24px; place-items: center; margin-left: -7px; border: 2px solid #fff; border-radius: 50%; background: var(--ca-primary-soft); color: var(--ca-primary); font-size: var(--text-2xs); font-weight: 700; }
.ca-signin-page .ca-showcase-avatars span:first-child { margin-left: 0; }

/* Pannello destro: card di accesso */
.ca-signin-page .ca-login-right { flex: 1 1 44%; display: flex; align-items: center; justify-content: center; padding: 48px 32px; background: #fff; }
.ca-signin-page .ca-login-card { width: min(440px, 100%); border: 1px solid rgba(15, 23, 42, .06); border-radius: 24px; box-shadow: 0 30px 80px rgba(15, 23, 42, .08); }
.ca-signin-page .ca-login-card-badge { display: grid; width: 52px; height: 52px; margin: 0 auto 16px; place-items: center; border-radius: 16px; background: var(--ca-primary-soft); color: var(--ca-primary); }
.ca-signin-page .ca-login-card-badge svg { width: 24px; height: 24px; }

.ca-signin-page .ca-login-card .input-group { border: 1px solid #e2e5ee; border-radius: 14px; background: #f9fafc; overflow: hidden; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.ca-signin-page .ca-login-card .input-group:focus-within { border-color: var(--ca-primary); background: #fff; box-shadow: 0 0 0 3px rgba(79, 70, 255, .12); }
.ca-signin-page .ca-login-card .input-group-text { border: 0; padding-left: 16px; padding-right: 6px; color: #8a93a8; background: transparent; }
.ca-signin-page .ca-login-card .input-group-text svg { width: 18px; height: 18px; }
.ca-signin-page .ca-login-card .form-control { height: 50px; padding-left: 4px; border: 0; background: transparent; box-shadow: none !important; font-size: var(--text-lg); }
.ca-signin-page .ca-login-card .form-control:focus { background: transparent; box-shadow: none; }
.ca-signin-page .ca-login-card #caTogglePass { border: 0; background: transparent; color: #8a93a8; }
.ca-signin-page .ca-login-card #caTogglePass svg { width: 18px; height: 18px; }

.ca-signin-page .ca-login-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.ca-signin-page .ca-login-row a { color: var(--ca-primary); font-size: var(--text-md); }

.ca-signin-page .ca-auth-submit { min-height: 52px; border-radius: 14px; font-size: var(--text-lg); font-weight: var(--font-semibold); box-shadow: 0 16px 34px rgba(79, 70, 255, .22); }

.ca-signin-page .ca-login-divider { display: flex; align-items: center; gap: 14px; margin: 26px 0; color: #9aa2b5; font-size: var(--text-sm); font-weight: 600; }
.ca-signin-page .ca-login-divider::before, .ca-signin-page .ca-login-divider::after { flex: 1 1 auto; height: 1px; background: #e7e9f2; content: ""; }

.ca-signin-page .ca-login-oauth { display: grid; gap: 10px; }
.ca-signin-page .ca-oauth-btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; border: 1px solid #e2e5ee; border-radius: 13px; background: #fff; color: #1f2430; font-size: 14px; font-weight: 600; transition: background .15s ease, border-color .15s ease; }
.ca-signin-page .ca-oauth-btn:hover { background: #f8f9fc; border-color: #d5d9e6; }

.ca-signin-page .ca-login-footer { margin: 22px 0 0; color: #6b7280; font-size: var(--text-md); text-align: center; }
.ca-signin-page .ca-login-footer a { color: var(--ca-primary); }

/* Responsive */
@media (max-width: 1199.98px) {
  .ca-signin-page .ca-login-showcase { display: none; }
  .ca-signin-page .ca-login-left { justify-content: center; }
  .ca-signin-page .ca-login-left-inner { flex: 0 1 520px; }
}

@media (max-width: 991.98px) {
  .ca-signin-page .ca-login-left { padding: 48px 24px 32px; }
  .ca-signin-page .ca-login-left-inner { flex: 0 1 auto; width: 100%; max-width: 480px; text-align: center; }
  .ca-signin-page .ca-login-brand { justify-content: center; margin-bottom: 26px; }
  .ca-signin-page .ca-login-hero-title { font-size: clamp(26px, 7vw, 32px); }
  .ca-signin-page .ca-login-hero-subtitle { margin-left: auto; margin-right: auto; }
  .ca-signin-page .ca-login-hero-features { display: none; }
  .ca-signin-page .ca-login-hero-subtitle { margin-bottom: 24px; }
  .ca-signin-page .ca-login-hero-cta { justify-content: center; width: 100%; max-width: 340px; margin: 0 auto; }
  .ca-signin-page .ca-login-hero-trust { justify-content: center; }
  .ca-signin-page .ca-login-right { padding: 8px 20px 56px; }
}

@media (max-width: 575.98px) {
  .ca-signin-page .ca-login-left { padding: 40px 18px 28px; }
  .ca-signin-page .ca-login-hero-features > div { padding: 12px 14px; }
  .ca-signin-page .ca-login-card .card-body { padding: 34px 22px !important; }
}

/* ============================================================
   Piano pasti
   ============================================================ */
.ca-meals-page { display: flex; flex-direction: column; gap: 20px; }

.ca-meals-header .card-body { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 28px; }
.ca-meals-header-copy h1 { font-family: var(--family-font-heading); font-size: 29px; font-weight: 700; }
.ca-meals-header-copy .text-gray-600 { font-size: 13.5px; }
.ca-meals-header-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ca-meals-add-btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.ca-meals-week-control { display: flex; align-items: center; gap: 8px; padding: 4px; border: 1px solid var(--ca-border, #e7eaf0); border-radius: 999px; background: #fff; }
.ca-meals-week-control .btn-icon { width: 36px; height: 36px; border-radius: 50%; }
.ca-meals-week-range { display: inline-flex; align-items: center; gap: 8px; padding: 0 6px; color: #17213f; font-family: var(--family-font-body); font-size: var(--text-md); font-weight: var(--font-semibold); white-space: nowrap; }
.ca-meals-week-range i { color: #356df3; }
.ca-meals-week-menu { position: relative; }
.ca-meals-menu-btn { width: 42px; height: 42px; border-radius: 50%; }
.ca-meals-menu-dropdown { min-width: 240px; }

.ca-meals-mobile-wrap { display: none; }

.ca-meals-grid-card .card-body { padding: 20px 24px; }
.ca-meals-columns { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 14px; align-items: stretch; }

.ca-meals-day-col { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--ca-border, #e7eaf0); border-radius: 16px; background: #fff; }
.ca-meals-day-col.is-selected { border-color: #a9c3fb; background: #f4f8ff; box-shadow: 0 0 0 1px #a9c3fb inset; }

.ca-meals-day-col-head { display: flex; align-items: baseline; gap: 8px; padding: 2px 2px 8px; border-bottom: 1px solid #eef1f7; }
.ca-meals-day-col-name { color: #6b7690; font-size: var(--text-sm); font-weight: var(--font-semibold); letter-spacing: .02em; }
.ca-meals-day-col.is-selected .ca-meals-day-col-name { color: #356df3; }
.ca-meals-day-col-num { color: #17213f; font-size: var(--text-xl); font-weight: 600; }
.ca-meals-day-col-head:has(.ca-meals-day-col-badge) .ca-meals-day-col-name,
.ca-meals-day-col-head:has(.ca-meals-day-col-badge) .ca-meals-day-col-num { color: #356df3; }
.ca-meals-day-col-badge { margin-left: auto; padding: 2px 9px; border-radius: 999px; background: #356df3; color: #fff; font-size: var(--text-xs); font-weight: var(--font-semibold); }

.ca-meals-col-card { position: relative; display: flex; flex-direction: column; gap: 4px; min-height: 92px; width: 100%; padding: 12px; border: 0; border-radius: 13px; text-align: left; color: #17213f; }
.ca-meals-col-card-head { display: flex; align-items: center; gap: 6px; font-size: var(--text-sm); font-weight: var(--font-semibold); }
.ca-meals-col-card-head svg { width: 15px; height: 15px; }
.ca-meals-col-card-text { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; font-size: var(--text-md); font-weight: var(--font-semibold); line-height: 1.35; }
.ca-meals-col-card-notes { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: #7e879f; font-size: var(--text-xs); font-weight: var(--font-regular); line-height: 1.3; }
.ca-meals-col-card:not(.ca-meals-col-card-empty) { cursor: pointer; transition: filter .12s ease; }
.ca-meals-col-card:not(.ca-meals-col-card-empty):hover,
.ca-meals-col-card:not(.ca-meals-col-card-empty):focus-visible { filter: brightness(.97); }
.ca-meals-col-card:not(.ca-meals-col-card-empty):focus-visible { outline: 2px solid #356df3; outline-offset: 2px; }
.ca-meals-col-card.is-breakfast { background: #fffaef; }
.ca-meals-col-card.is-breakfast .ca-meals-col-card-head { color: #9c7a17; }
.ca-meals-col-card.is-lunch { background: #eefaf2; }
.ca-meals-col-card.is-lunch .ca-meals-col-card-head { color: #1f8a4c; }
.ca-meals-col-card.is-dinner { background: #f6f2fd; }
.ca-meals-col-card.is-dinner .ca-meals-col-card-head { color: #6a4fc4; }

.ca-meals-col-card-empty { align-items: center; justify-content: center; gap: 6px; border: 1.5px dashed #d7dbe6; background: transparent; color: #8b93a7; transition: background-color .15s ease, border-color .15s ease; }
.ca-meals-col-card-empty:hover { border-color: #b7c0d6; background: #f7f9fc; }
.ca-meals-col-card-empty-icon { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: #eef1f7; color: #6f7893; }
.ca-meals-col-card-empty-label { font-size: var(--text-sm); font-weight: var(--font-medium); text-align: center; }

.ca-meals-calorie-slot { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; margin-top: 2px; padding: 8px 10px; border: 1px dashed #e2d9c8; border-radius: 12px; background: #fdf9f2; color: #b3711f; font-size: 12px; font-weight: 600; }
.ca-meals-calorie-slot svg { width: 15px; height: 15px; }
.ca-meals-calorie-slot.is-disabled { border-style: dashed; border-color: #eaecf3; background: transparent; color: #a3aac2; font-weight: 500; }
.ca-meals-calorie-slot.is-loading { border-style: solid; border-color: #eaecf3; background: #fafbfd; color: #6b7690; font-weight: 500; }
.ca-meals-calorie-slot.is-error { border-color: #f3c6c6; background: #fdf2f2; color: #c8402f; }
.ca-meals-calorie-slot.is-done { flex-direction: column; gap: 3px; border-style: solid; border-color: #f0dfc0; background: #fdf6e8; }
.ca-meals-calorie-value { display: inline-flex; align-items: center; gap: 6px; color: #a15e12; font-size: var(--text-sm); font-weight: var(--font-medium); }
.ca-meals-calorie-note { display: inline-flex; align-items: center; gap: 4px; color: #a3894f; font-size: var(--text-xs); font-weight: var(--font-medium); }
.ca-meals-calorie-note svg { width: 11px; height: 11px; }
.ca-meals-calorie-slot.is-done.is-approx { border-color: #e7e4d8; background: #faf9f5; }
.ca-meals-calorie-slot.is-done.is-approx .ca-meals-calorie-value { color: #6b7690; }
.ca-meals-calorie-slot.is-done.is-approx .ca-meals-calorie-note { color: #9aa2b5; }
.ca-meals-calorie-slot.is-partial { align-items: center; }
.ca-meals-calorie-cta { display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; padding: 0; border: 0; background: transparent; color: #356df3; font-size: var(--text-xs); font-weight: var(--font-semibold); cursor: pointer; }
.ca-meals-calorie-cta svg { width: 11px; height: 11px; }

.ca-meals-col-card-name { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; font-size: 13px; font-weight: 600; line-height: 1.3; }
.ca-meals-col-card-foods { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0; padding-left: 16px; color: #4a5170; font-size: var(--text-xs); font-weight: var(--font-medium); line-height: 1.4; }
.ca-meals-col-card-foods li { margin: 0; }
.ca-meals-col-card-kcal { display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; color: #a15e12; font-size: var(--text-xs); font-weight: var(--font-medium); }
.ca-meals-col-card-kcal svg { width: 12px; height: 12px; }

.ca-meals-list-row-kcal { display: inline-flex; align-items: center; gap: 3px; margin-left: 8px; color: #a15e12; font-size: var(--text-xs); font-weight: var(--font-medium); vertical-align: middle; }
.ca-meals-list-row-kcal svg { width: 11px; height: 11px; }

.ca-meals-food-rows { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.ca-meals-food-row { display: grid; grid-template-columns: 84px 100px 1fr 32px; gap: 8px; align-items: center; }
.ca-meals-food-row .form-control { padding: 8px 10px; font-size: 13px; }
.ca-meals-food-remove { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid #e7e9f2; border-radius: 8px; background: #fff; color: #8b93a7; cursor: pointer; transition: color .12s ease, border-color .12s ease; }
.ca-meals-food-remove:hover { border-color: #f3c6c6; color: #c8402f; }
.ca-meals-food-remove svg { width: 14px; height: 14px; }
.ca-meals-food-add { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 8px 12px; border: 1px dashed #d7dbe6; border-radius: 10px; background: transparent; color: #356df3; font-size: var(--text-sm); font-weight: var(--font-semibold); cursor: pointer; transition: background-color .12s ease, border-color .12s ease; }
.ca-meals-food-add:hover { border-color: #356df3; background: #f2f6ff; }
.ca-meals-food-add svg { width: 14px; height: 14px; }

.ca-event-modal-divider { margin: 4px 0; border: 0; border-top: 1px solid #eef0f6; }

.ca-meals-view-text { color: #17213f; font-size: var(--text-lg); font-weight: var(--font-medium); line-height: 1.5; }
.ca-meals-view-foods-list { display: flex; flex-direction: column; gap: 6px; margin: 0; padding-left: 20px; color: #17213f; font-size: var(--text-lg); font-weight: var(--font-medium); }
.ca-meals-view-foods-list li { line-height: 1.4; }
#caMealViewPanel .ca-event-field { margin-bottom: 20px; }
#caMealViewPanel .ca-event-field label { display: block; margin-bottom: 8px; color: #7e879f; font-size: var(--text-sm); font-weight: var(--font-semibold); text-transform: uppercase; letter-spacing: .02em; }

.ca-meals-estimate-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 11px 16px; border: 0; border-radius: 12px; background: linear-gradient(135deg,#6a4fc4,#356df3); color: #fff; font-size: var(--text-md); font-weight: var(--font-semibold); cursor: pointer; transition: filter .12s ease; }
.ca-meals-estimate-btn:hover { filter: brightness(1.05); }
.ca-meals-estimate-btn svg { width: 16px; height: 16px; }

.ca-meals-calorie-panel { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 12px; background: #f7f8fc; }
.ca-meals-calorie-panel.is-loading { flex-direction: row; align-items: center; justify-content: center; gap: 8px; color: #6b7690; font-size: 13px; font-weight: 500; }
.ca-meals-calorie-panel.is-error { background: #fdf2f2; }
.ca-meals-calorie-error-text { color: #c8402f; font-size: 13px; font-weight: 500; line-height: 1.4; }
.ca-meals-calorie-panel-actions { display: flex; gap: 8px; }
.ca-meals-calorie-breakdown { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.ca-meals-calorie-breakdown li { display: flex; align-items: center; justify-content: space-between; color: #4a5170; font-size: var(--text-sm); font-weight: var(--font-medium); }
.ca-meals-calorie-total { color: #17213f; font-size: 14px; font-weight: 700; }
.ca-meals-calorie-disclaimer { color: #9aa2b5; font-size: 11px; font-weight: 500; line-height: 1.4; }
.ca-meals-calorie-recalc { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: transparent; color: #356df3; font-size: 12px; font-weight: 600; cursor: pointer; }
.ca-meals-calorie-recalc svg { width: 13px; height: 13px; }

.ca-meals-info-bar .card-body { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; background: #f5f8ff; }
.ca-meals-info-icon { display: grid; flex: 0 0 24px; width: 24px; height: 24px; place-items: center; color: #356df3; }
.ca-meals-info-icon svg { width: 16px; height: 16px; }
.ca-meals-info-text { flex: 1 1 auto; min-width: 0; color: #4a5375; font-size: 13px; }

.ca-meals-dup-layer { width: min(460px, calc(100vw - 32px)); }
.ca-meals-dup-days { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.ca-meals-dup-day { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--ca-border, #e7eaf0); border-radius: 10px; font-size: 13px; }
.ca-meals-dup-day.is-disabled { opacity: .45; }
.ca-meals-dup-day input { width: 16px; height: 16px; }

.ca-meals-list { display: flex; flex-direction: column; gap: 16px; }
.ca-meals-list-day { padding: 16px 18px; border: 1px solid var(--ca-border, #e7eaf0); border-radius: 18px; background: #fff; box-shadow: 0 6px 18px rgba(15,23,42,.035); scroll-margin-top: 16px; }
.ca-meals-list-date { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid #f0f2f7; }
.ca-meals-list-weekday { color: #356df3; font-size: var(--text-sm); font-weight: 600; }
.ca-meals-list-daynum { color: #17213f; font-size: var(--text-xl); font-weight: 600; }
.ca-meals-list-date.is-today .ca-meals-list-weekday { color: #fff; padding: 2px 10px; border-radius: 999px; background: #356df3; }
.ca-meals-list-empty { display: inline-flex; padding: 5px 14px; border-radius: 999px; background: #efeafb; color: #6a4fc4; font-size: var(--text-xs); font-weight: var(--font-semibold); }
.ca-meals-list-row { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 8px 0; border: 0; background: transparent; text-align: left; }
.ca-meals-list-row + .ca-meals-list-row { border-top: 1px solid #f5f6fa; }
.ca-meals-list-row-icon { display: grid; flex: 0 0 40px; width: 40px; height: 40px; place-items: center; border-radius: 12px; }
.ca-meals-list-row-icon svg { width: 19px; height: 19px; }
.ca-meals-list-row-icon.is-breakfast { background: #fdf3d6; color: #9c7a17; }
.ca-meals-list-row-icon.is-lunch { background: #e3f5e9; color: #1f8a4c; }
.ca-meals-list-row-icon.is-dinner { background: #efeafb; color: #6a4fc4; }
.ca-meals-list-row-title { display: block; overflow: hidden; color: #17213f; font-size: var(--text-lg); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.ca-meals-list-row-meta { display: block; overflow: hidden; margin-top: 2px; color: #7e879f; font-size: var(--text-sm); font-weight: var(--font-medium); text-overflow: ellipsis; white-space: nowrap; }

.ca-meals-list-row-calories { border-top: 1px dashed #edeff5 !important; }
.ca-meals-list-row-icon.is-calories { background: #fdf3d6; color: #a15e12; }
.ca-meals-list-row-icon.is-calories .spinner-border { width: 16px; height: 16px; border-width: 2px; color: #a15e12; }
.ca-meals-list-row-calories .ca-meals-list-row-title { color: #a15e12; }
button.ca-meals-list-row-calories { cursor: pointer; }
button.ca-meals-list-row-calories:hover .ca-meals-list-row-title { color: #7c4409; }
.ca-meals-list-calories-cta { position: absolute; top: 50%; right: 0; display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: transparent; color: #356df3; font-size: var(--text-xs); font-weight: var(--font-semibold); transform: translateY(-50%); cursor: pointer; }
.ca-meals-list-calories-cta svg { width: 13px; height: 13px; }

@media (max-width: 1279.98px) {
  .ca-meals-columns { gap: 10px; }
  .ca-meals-col-card { min-height: 84px; padding: 10px; }
}

@media (max-width: 575.98px) {
  .ca-meals-food-row { grid-template-columns: 1fr 1fr 32px; }
  .ca-meals-food-row .ca-meals-food-name { grid-column: 1 / span 2; }
}

@media (min-width: 768px) and (max-width: 1439.98px) {
  /* Keep the horizontal scroll INSIDE the card so the day columns don't
     spill past the card border. */
  .ca-meals-grid-wrap { overflow: visible; }
  .ca-meals-grid-card .card-body { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .ca-meals-columns { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 208px; width: max-content; min-width: 100%; }
}

@media (max-width: 767.98px) {
  .ca-meals-header .card-body { padding: 20px; }
  .ca-meals-header-actions { width: 100%; flex-wrap: nowrap; justify-content: space-between; gap: 8px; }
  .ca-meals-add-btn span { display: none; }
  .ca-meals-add-btn { width: 44px; padding: 0; justify-content: center; }
  .ca-meals-week-range { display: none; }
  .ca-meals-week-control { flex: 0 0 auto; padding: 3px; }
  .ca-meals-menu-dropdown { right: 0; left: auto; min-width: 220px; max-width: calc(100vw - 40px); }
  .ca-meals-grid-wrap { display: none; }
  .ca-meals-mobile-wrap { display: block; padding-bottom: calc(var(--family-mobile-bottom-nav-height, 68px) + env(safe-area-inset-bottom) + 24px); }
  .ca-meals-dup-days { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Match del mese
   ========================================================================== */

/* --- Dashboard hero: veste "Match del mese" --- */
.ca-dashboard-hero-match {
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
  padding: 26px 32px;
  background-color: #101642 !important;
  background-position: center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  border-color: transparent !important;
}

/* Bilancio: navigazione a tab e nuova Panoramica Warm Home. */
.ca-budget-tabs {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  padding: 0;
  background: transparent;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.ca-budget-tabs::-webkit-scrollbar { display: none; }
.ca-budget-tab {
  display: inline-flex;
  min-height: 42px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--ca-border, #e4e8f1);
  border-radius: 12px;
  background: #fff;
  color: #65718f;
  font-family: var(--family-font-body);
  font-size: var(--text-md);
  font-weight: var(--font-medium);
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(23, 32, 66, .03);
  transition: color .16s ease, background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.ca-budget-tab svg { width: 17px; height: 17px; }
.ca-budget-tab:hover { border-color: #c7d0e3; color: #43506a; }
.ca-budget-tab.is-active { background: var(--ca-primary-soft, #f1f0ff); border-color: var(--ca-primary, #4f46ff); color: var(--ca-primary, #4f46ff); font-weight: var(--font-semibold); box-shadow: 0 3px 10px rgba(79, 70, 255, .12); }
.ca-budget-tab:focus-visible { outline: 3px solid rgba(78, 115, 255, .22); outline-offset: 2px; }
.ca-budget-tab-panel { min-width: 0; }

.ca-budget-overview-label {
  display: block;
  color: #6c7791;
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  letter-spacing: .075em;
  text-transform: uppercase;
}
.ca-budget-balance-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr);
  align-items: stretch;
  gap: 18px;
  margin-bottom: 24px;
}
.ca-budget-balance-card {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 278px;
  grid-template-rows: 1fr auto;
  overflow: hidden;
  padding: 27px 28px 22px;
  border: 1px solid rgba(20, 33, 61, .06);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(23, 32, 66, .035);
  isolation: isolate;
}
.ca-budget-balance-card.is-negative {
  border-color: rgba(232, 77, 116, .11);
  background: #fff;
}
.ca-budget-balance-content { position: relative; z-index: 2; width: 38%; max-width: 38%; min-width: 0; }
.ca-budget-balance-value-row { display: flex; flex-wrap: wrap; align-items: center; gap: 13px; margin-top: 13px; }
.ca-budget-balance-value-row strong {
  color: #25b868;
  font-family: var(--family-font-heading);
  font-size: clamp(34px, 3.25vw, 50px);
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: 1.12;
  font-variant-numeric: tabular-nums;
}
.ca-budget-balance-card.is-negative .ca-budget-balance-value-row strong { color: #e84d74; }
.ca-budget-balance-value-row > span {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  background: #e1f7e9;
  color: #159454;
  font-size: 11px;
  font-weight: 700;
}
.ca-budget-balance-card.is-negative .ca-budget-balance-value-row > span { background: #ffe3ea; color: #d53e63; }
.ca-budget-balance-comparison { margin: 9px 0 0; color: #7c879d; font-size: 12px; }
.ca-budget-balance-comparison strong { margin-left: 3px; font-weight: 700; }
.ca-budget-balance-comparison .is-positive { color: #1aa45a; }
.ca-budget-balance-comparison .is-negative { color: #d9476b; }
.ca-budget-balance-chart-wrap {
  position: absolute;
  z-index: 1;
  top: 26px;
  right: 28px;
  bottom: 82px;
  left: 40%;
  color: #25b868;
}
.ca-budget-balance-decoration { display: block; width: 100%; height: 100%; overflow: visible; }
.ca-budget-balance-card.is-negative .ca-budget-balance-chart-wrap { color: #25b868; }
.ca-budget-balance-area { opacity: 1; pointer-events: none; }
.ca-budget-balance-line { opacity: .82; pointer-events: none; }
.ca-budget-balance-point { display: none; }
.ca-budget-balance-point.is-selected { fill: currentColor; stroke: #fff; }
.ca-budget-balance-point.is-active { fill: currentColor; stroke: #fff; r: 5px; }
.ca-budget-balance-hit { fill: transparent; cursor: crosshair; outline: none; }
.ca-budget-balance-hit:focus-visible { fill: rgba(37, 184, 104, .035); }
.ca-budget-balance-tooltip {
  position: absolute;
  z-index: 5;
  display: grid;
  min-width: 164px;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 11px;
  background: rgba(18, 26, 54, .94);
  color: rgba(255, 255, 255, .82);
  box-shadow: 0 6px 18px rgba(18, 26, 54, .12);
  font-size: 10px;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 9px));
  transition: opacity .14s ease, transform .14s ease;
}
.ca-budget-balance-tooltip.is-visible { opacity: 1; }
.ca-budget-balance-tooltip.is-below { transform: translate(-50%, 9px); }
.ca-budget-balance-tooltip strong { margin-bottom: 2px; color: #fff; font-size: 11px; }
.ca-budget-balance-tooltip > span { display: flex; justify-content: space-between; gap: 14px; }
.ca-budget-balance-tooltip b { color: #fff; font-weight: var(--font-semibold); white-space: nowrap; }
.ca-budget-balance-tooltip-total { margin-top: 3px; padding-top: 5px; border-top: 1px solid rgba(255, 255, 255, .13); color: #fff; font-weight: var(--font-semibold); }
.ca-budget-balance-tooltip-total b.is-positive { color: #74f2a3; }
.ca-budget-balance-tooltip-total b.is-negative { color: #ff91aa; }
.ca-budget-ducky-strip {
  position: relative;
  z-index: 2;
  display: flex;
  width: calc(100% - 18px);
  min-height: 58px;
  align-items: center;
  gap: 13px;
  margin-top: 20px;
  padding: 11px 50px 11px 68px;
  border-radius: 999px;
  background: rgba(116, 242, 163, .14);
  color: #436353;
}
.ca-budget-balance-card.is-negative .ca-budget-ducky-strip { background: rgba(232, 77, 116, .08); color: #76515b; }
.ca-budget-ducky-avatar { position: absolute; left: 7px; bottom: 2px; display: grid; width: 62px; height: 62px; place-items: center; filter: drop-shadow(0 5px 7px rgba(58, 111, 79, .12)); }
.ca-budget-ducky-avatar svg { width: 100%; height: 100%; }
.ca-budget-ducky-heart { position: absolute; right: 20px; display: grid; width: 25px; height: 25px; place-items: center; color: #25b868; }
.ca-budget-ducky-heart svg { width: 18px; height: 18px; fill: currentColor; }
.ca-budget-ducky-strip p { margin: 0; font-size: var(--text-sm); font-weight: 600; line-height: 1.45; }

/* Saldo del mese: riprende la card scura della Dashboard, conservando l'ampiezza del Bilancio. */
.ca-budget-balance-card {
  display: block;
  min-height: 278px;
  padding: 24px 28px;
  border: 0;
  border-radius: 22px;
  overflow: visible;
  background: linear-gradient(145deg, #0f1e5a 0%, #103a56 100%);
  box-shadow: none;
}
.ca-budget-balance-card.is-negative { border: 0; background: linear-gradient(145deg, #351a42 0%, #57263d 100%); }
.ca-budget-balance-content { width: 100%; max-width: none; }
.ca-budget-balance-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ca-budget-balance-card .ca-budget-overview-label { display: inline-flex; align-items: center; gap: 7px; color: #74f2a3; font-size: var(--text-sm); font-weight: 600; letter-spacing: 0; text-transform: none; }
.ca-budget-balance-card .ca-budget-overview-label i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ca-budget-balance-status { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border: 1px solid rgba(116, 242, 163, .35); border-radius: 999px; background: rgba(116, 242, 163, .1); color: #74f2a3; font-size: 11px; font-weight: 700; white-space: nowrap; }
.ca-budget-balance-status svg { width: 13px; height: 13px; }
.ca-budget-balance-card.is-negative .ca-budget-overview-label,
.ca-budget-balance-card.is-negative .ca-budget-balance-status { color: #f49cb0; }
.ca-budget-balance-card.is-negative .ca-budget-balance-status { border-color: rgba(244, 156, 176, .4); background: rgba(244, 156, 176, .12); }
.ca-budget-balance-value-row { margin-top: 14px; }
.ca-budget-balance-value-row strong { color: #74f2a3; font-size: clamp(38px, 3.25vw, 52px); font-weight: 700; letter-spacing: -.04em; }
.ca-budget-balance-card.is-negative .ca-budget-balance-value-row strong { color: #f49cb0; }
.ca-budget-balance-note { position: relative; z-index: 2; margin: 6px 0 0; color: rgba(255, 255, 255, .76); font-size: var(--text-sm); font-weight: 500; line-height: 1.45; }
.ca-budget-balance-comparison { position: relative; z-index: 2; margin-top: 8px; color: rgba(255, 255, 255, .58); }
.ca-budget-balance-comparison .is-positive { color: #74f2a3; }
.ca-budget-balance-comparison .is-negative { color: #f49cb0; }
.ca-budget-balance-chart-wrap { top: auto; right: 0; bottom: 0; left: 0; height: 112px; color: #74f2a3; }
.ca-budget-balance-decoration { overflow: hidden; border-radius: 0 0 22px 22px; }
.ca-budget-balance-guides line { stroke: rgba(255, 255, 255, .18); stroke-width: 1; stroke-dasharray: 4 5; vector-effect: non-scaling-stroke; }
.ca-budget-balance-marker { position: absolute; z-index: 2; top: var(--point-y); left: var(--point-x); width: 8px; height: 8px; border: 2px solid #103a56; border-radius: 50%; background: #74f2a3; opacity: 0; transform: translate(-50%, -50%); transition: opacity .14s ease, width .14s ease, height .14s ease; }
.ca-budget-balance-marker.is-negative { background: #f49cb0; }
.ca-budget-balance-card.is-negative .ca-budget-balance-marker { border-color: #57263d; }
.ca-budget-balance-marker.is-selected,
.ca-budget-balance-marker.is-active { opacity: 1; }
.ca-budget-balance-marker.is-active { width: 10px; height: 10px; }
.ca-budget-balance-card:has(.ca-budget-balance-tooltip.is-visible) { z-index: 2; }
.ca-budget-balance-card.is-negative .ca-budget-balance-chart-wrap { color: #f49cb0; }
.ca-budget-balance-line { opacity: .9; }
.ca-budget-balance-area { opacity: .78; }

.ca-budget-flow-stack { display: grid; min-width: 0; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ca-budget-flow-card {
  position: relative;
  display: grid;
  min-width: 0;
  grid-template-columns: 44px minmax(0, 1fr) 64px;
  align-items: center;
  gap: 14px;
  overflow: hidden;
  padding: 19px 20px;
  border: 1px solid rgba(118, 137, 179, .11);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(23, 32, 66, .035);
}
.ca-budget-flow-card.is-income { background: linear-gradient(135deg, #fff 0%, #f4fff8 100%); }
.ca-budget-flow-card.is-expense { background: linear-gradient(135deg, #fff 0%, #fff5f7 100%); }
.ca-budget-flow-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; }
.ca-budget-flow-icon svg { width: 19px; height: 19px; }
.ca-budget-flow-card.is-income .ca-budget-flow-icon { background: #e1f8ea; color: #25b868; }
.ca-budget-flow-card.is-expense .ca-budget-flow-icon { background: #ffe4eb; color: #e84d74; }
.ca-budget-flow-card > div { min-width: 0; }
.ca-budget-flow-card > div > strong { display: block; margin-top: 4px; color: #18233e; font-family: var(--family-font-heading); font-size: clamp(var(--title-md), 1.7vw, var(--title-lg)); font-weight: 600; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.ca-budget-flow-card > div > p { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 3px 0 0; font-size: var(--text-xs); }
.ca-budget-flow-card .ca-budget-trend { font-size: var(--text-xs); }
.ca-budget-mini-bars { display: flex; height: 45px; align-items: flex-end; justify-content: flex-end; gap: 5px; opacity: .52; }
.ca-budget-mini-bars i { width: 7px; border-radius: 6px 6px 2px 2px; background: currentColor; }
.ca-budget-mini-bars i:nth-child(1) { height: 34%; }
.ca-budget-mini-bars i:nth-child(2) { height: 62%; }
.ca-budget-mini-bars i:nth-child(3) { height: 48%; }
.ca-budget-mini-bars i:nth-child(4) { height: 88%; }
.is-income .ca-budget-mini-bars { color: #48c880; }
.is-expense .ca-budget-mini-bars { color: #ed7894; }

.ca-budget-watch-section { margin-bottom: 24px; }
.ca-budget-watch-section > h2 {
  margin: 0 0 12px;
  color: #68738d;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.ca-budget-watch-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.ca-budget-watch-card {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 175px;
  grid-template-columns: 46px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  gap: 12px 13px;
  overflow: hidden;
  padding: 20px 21px 17px;
  border: 1px solid rgba(20, 33, 61, .06);
  border-radius: 19px;
}
.ca-budget-watch-card.is-recurring { background: linear-gradient(135deg, #f7f8ff, #f1f4ff); }
.ca-budget-watch-card.is-category { grid-template-columns: 46px minmax(0, 1fr) 66px; background: #fff9e9; }
.ca-budget-watch-card.is-ducky { background: #f1fff7; }
.ca-budget-watch-icon, .ca-budget-ducky-orb { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 13px; background: #e7ecff; color: #5674df; }
.ca-budget-ducky-orb { background: #dff8e9; color: #23a961; }
.ca-budget-watch-icon svg, .ca-budget-ducky-orb svg { width: 20px; height: 20px; }
.ca-budget-watch-card h3 { margin: 0 0 5px; color: #1a2540; font-family: var(--family-font-heading); font-size: 13px; font-weight: 600; }
.ca-budget-watch-card div > strong { display: block; color: #35415c; font-size: var(--text-sm); font-weight: var(--font-semibold); line-height: 1.4; }
.ca-budget-watch-card p { margin: 3px 0 0; color: #7a849b; font-size: var(--text-xs); }
.ca-budget-watch-card button {
  display: inline-flex;
  width: fit-content;
  grid-column: 1 / -1;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #4e73d8;
  font-size: 11px;
  font-weight: 700;
}
.ca-budget-watch-card button:hover { color: #315bc5; }
.ca-budget-watch-count { position: absolute; top: 15px; right: 17px; display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: #fff; color: #4e73d8; font-size: 11px; font-weight: 700; box-shadow: 0 5px 14px rgba(70, 91, 156, .10); }
.ca-budget-category-ring {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  align-self: center;
  border-radius: 50%;
  background: conic-gradient(var(--ring-color) var(--ring-progress), rgba(255, 255, 255, .75) 0);
}
.ca-budget-category-ring::before { content: ""; grid-area: 1 / 1; width: 43px; height: 43px; border-radius: 50%; background: #fff9e9; }
.ca-budget-category-ring b { z-index: 1; grid-area: 1 / 1; color: #4e5668; font-size: 11px; }

.ca-budget-lower-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(350px, 2fr); gap: 22px; align-items: stretch; margin-bottom: 8px; }
.ca-budget-lower-grid.is-single { grid-template-columns: minmax(0, 1fr); }
.ca-budget-lower-grid.is-balanced { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.ca-budget-credit-section { display: flex; min-width: 0; }
.ca-budget-credit-section .ca-credit-cards-overview {
  width: 100%;
  height: auto !important;
  min-height: 0;
  border: 1px solid rgba(20, 33, 61, .06);
  border-radius: 21px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(23, 32, 66, .035);
}
.ca-budget-credit-section .ca-credit-cards-overview > .card-header { min-height: 76px; padding: 22px 30px 13px; }
.ca-budget-credit-section .ca-credit-cards-overview > .card-header .btn { gap: 6px; padding: 9px 13px; border: 0; border-radius: 10px; background: #eef5ff; color: #356df3; box-shadow: none; }
.ca-budget-credit-section .ca-credit-cards-overview > .card-body { display: block; padding: 6px 30px 27px; }
.ca-budget-credit-section .ca-credit-cards-carousel { padding-inline: 15px; }
.ca-budget-credit-section .ca-credit-cards-carousel.has-peek::after { display: none; }
.ca-budget-credit-section .ca-credit-cards-track { gap: 16px; }
.ca-budget-credit-section .ca-credit-cards-slide { flex-basis: calc(50% - 8px); gap: 15px; }
.ca-budget-credit-section .ca-credit-cards-carousel.has-peek .ca-credit-cards-slide { flex-basis: calc((100% - 62px) / 2); }
.ca-budget-credit-section .ca-credit-cards-nav { position: absolute; z-index: 6; top: clamp(75px, 6vw, 105px); width: 36px; height: 36px; transform: translateY(-50%); color: #34425f; box-shadow: 0 7px 18px rgba(31,42,68,.12); }
.ca-budget-credit-section .ca-credit-cards-nav.is-prev { left: -8px; }
.ca-budget-credit-section .ca-credit-cards-nav.is-next { right: -8px; }
.ca-budget-credit-section .ca-credit-cards-nav[hidden], .ca-budget-credit-section .ca-credit-cards-dots[hidden] { display: none; }
.ca-budget-credit-section .ca-credit-cards-nav:disabled { cursor: default; opacity: .38; }
.ca-budget-credit-section .ca-credit-cards-dots { display: flex; min-height: 9px; align-items: center; justify-content: center; gap: 8px; margin-top: 15px; }
.ca-budget-credit-section .ca-credit-cards-dots button { width: 17px; height: 5px; padding: 0; border: 0; border-radius: 999px; background: #e4e8f0; transition: width .18s ease, background-color .18s ease; }
.ca-budget-credit-section .ca-credit-cards-dots button.is-active { width: 24px; background: #765ee5; }
.ca-budget-credit-section .ca-credit-cards-dots button:focus-visible { outline: 2px solid rgba(118,94,229,.35); outline-offset: 3px; }
.ca-budget-credit-section .ca-credit-card { min-height: 0; aspect-ratio: 1.586 / 1; padding: 14px 14px 10px; border-radius: 16px; box-shadow: 0 6px 18px rgba(23, 32, 66, .04); }
.ca-budget-credit-section .ca-credit-card:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(23, 32, 66, .06); }
.ca-budget-credit-section .ca-credit-card-top { padding-top: 0; }
.ca-budget-credit-section .ca-credit-card-label { font-size: var(--text-xs); }
.ca-budget-credit-section .ca-credit-card-name { margin-top: 10px; font-size: 15px; line-height: 1.1; }
.ca-credit-card-owner { margin-top: 3px; font-size: var(--text-2xs); font-weight: 600; letter-spacing: .04em; }
.ca-budget-credit-section .ca-credit-card-network { min-height: 16px; align-self: flex-start; transform: none; }
.ca-budget-credit-section .ca-card-network-icon { height: 16px; max-width: 42px; }
.ca-budget-credit-section .ca-credit-card-middle { top: 40%; left: 14px; gap: 7px; margin-top: 0; }
.ca-budget-credit-section .ca-credit-card-chip { width: 24px; height: 18px; flex-basis: 24px; border-radius: 5px; }
.ca-budget-credit-section .ca-credit-card-number { font-size: var(--text-2xs); letter-spacing: .05em; }
.ca-budget-credit-section .ca-credit-card-spend { margin-top: auto; margin-bottom: 6px; }
.ca-budget-credit-section .ca-credit-card-spend small { font-size: var(--text-2xs); font-weight: var(--font-semibold); line-height: 1.2; }
.ca-budget-credit-section .ca-credit-card-spend .ca-credit-card-amount { margin-top: 2px; }
.ca-budget-credit-section .ca-credit-card-facts { margin-top: 5px; padding-top: 5px; gap: 4px; }
.ca-budget-credit-section .ca-credit-card-facts small { font-size: var(--text-2xs); font-weight: var(--font-semibold); letter-spacing: .015em; line-height: 1.2; text-transform: none; }
.ca-budget-credit-section .ca-credit-card-facts b { margin-top: 2px; font-size: var(--text-2xs); line-height: 1.2; }
.ca-budget-credit-section .ca-credit-card-sharing-badge { position: absolute; top: 34px; right: 12px; margin-top: 0; padding: 2px 6px; font-size: var(--text-2xs); }
.ca-budget-credit-section .ca-credit-card-sharing-badge svg { width: 9px; height: 9px; }
.ca-budget-credit-section .ca-credit-card-charge-label { font-size: var(--text-2xs); }
.ca-budget-credit-section .ca-credit-card-charge-date { margin-top: 2px; font-size: var(--text-2xs); }
.ca-budget-credit-section .ca-credit-card-amount { font-size: 16px; }
.ca-budget-credit-section .ca-credit-card-status { margin-top: 2px; font-size: var(--text-2xs); }
.ca-budget-credit-section .ca-card-transactions-preview { min-height: 178px; padding: 16px 17px 12px; border-color: rgba(31,42,68,.075); box-shadow: none; }
.ca-budget-credit-section .ca-card-transactions-preview > header { margin-bottom: 6px; }
.ca-budget-credit-section .ca-card-transactions-preview h3 { font-size: 13px; }
.ca-budget-credit-section .ca-card-transactions-preview header button { font-size: var(--text-2xs); white-space: nowrap; }
.ca-budget-credit-section .ca-card-transaction-row { min-height: 43px; }
.ca-budget-credit-section .ca-card-transaction-icon { width: 30px; height: 30px; flex-basis: 30px; }
.ca-budget-credit-section .ca-card-transaction-copy strong { font-size: var(--text-xs); }
.ca-budget-credit-section .ca-card-transaction-row > b { font-size: var(--text-xs); }

.ca-budget-trend-section { display: flex; min-width: 0; }
.ca-budget-monthly-trend-card { width: 100%; }
.ca-budget-monthly-trend-card .card-header { flex-wrap: wrap; gap: 8px 14px; }
.ca-budget-trend-legend { display: flex; align-items: center; gap: 14px; color: #7c879d; font-size: var(--text-xs); font-weight: var(--font-medium); }
.ca-budget-trend-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ca-budget-trend-legend i { display: inline-block; width: 16px; height: 0; border-top: 2px solid #6c8cf5; }
.ca-budget-trend-legend .is-forecast i { border-top-style: dashed; }
.ca-budget-monthly-trend-card .ca-budget-trend-chart-wrap {
  position: static;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 8px;
  height: auto;
  color: #6c8cf5;
}
.ca-budget-trend-axis-y { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; justify-content: space-between; padding: 2px 0 20px; color: #97a1b8; font-size: var(--text-xs); font-weight: var(--font-medium); text-align: right; }
.ca-budget-trend-plot { grid-column: 2; grid-row: 1; position: relative; min-width: 0; height: 200px; }
.ca-budget-trend-plot .ca-budget-balance-decoration { border-radius: 0; }
.ca-budget-trend-plot .ca-budget-balance-guides line { stroke: rgba(20, 33, 61, .09); stroke-dasharray: 4 5; }
.ca-budget-trend-plot .ca-budget-balance-guides line.is-today { stroke: rgba(108, 140, 245, .55); stroke-dasharray: 3 4; }
.ca-budget-trend-plot .ca-budget-balance-marker { border-color: #fff; box-shadow: 0 1px 4px rgba(20, 33, 61, .18); }
.ca-budget-trend-plot .ca-budget-balance-point.is-today { display: block; fill: #fff; stroke: currentColor; stroke-width: 2; }
.ca-budget-trend-axis-x { grid-column: 2; grid-row: 2; position: relative; height: 14px; margin-top: 4px; color: #97a1b8; font-size: var(--text-xs); font-weight: var(--font-medium); }
.ca-budget-trend-axis-x span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }

.ca-budget-objectives-card {
  position: relative;
  display: flex;
  min-height: 540px;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  padding: 30px 28px 26px;
  border-radius: 22px;
  border: 1px solid rgba(20, 33, 61, .06);
  background: #7561df url("images/budget/objectives-background.png") 56% center / cover no-repeat;
  color: #fff;
  box-shadow: 0 6px 18px rgba(23, 32, 66, .04);
  isolation: isolate;
}
.ca-budget-objectives-panel { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.ca-budget-objectives-panel .ca-budget-objectives-card { width: 100%; min-width: 0; }
.ca-budget-objectives-card::before { content: ""; position: absolute; z-index: 0; inset: 0; background: linear-gradient(115deg, rgba(57,39,131,.62) 0%, rgba(69,46,144,.28) 48%, rgba(45,31,114,.12) 100%); }
.ca-budget-objectives-head { position: relative; z-index: 2; display: grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; gap: 20px; }
.ca-budget-objectives-copy { min-width: 0; }
.ca-budget-objectives-eyebrow { padding: 5px 9px; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; background: rgba(255,255,255,.12); font-size: var(--text-2xs); font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.ca-budget-objectives-card h2 { margin: 15px 0 14px; color: #fff; font-family: var(--family-font-heading); font-size: var(--title-md); font-weight: var(--font-bold); }
.ca-budget-objectives-score strong, .ca-budget-objectives-score span { display: block; }
.ca-budget-objectives-score strong { font-family: var(--family-font-heading); font-size: var(--title-lg); font-weight: var(--font-bold); }
.ca-budget-objectives-score span { margin-top: 1px; color: rgba(255,255,255,.78); font-size: 11px; }
.ca-budget-objectives-copy p { max-width: 240px; margin: 17px 0 0; color: rgba(255,255,255,.88); font-size: var(--text-sm); line-height: 1.5; }
.ca-budget-objectives-ring { position: relative; display: grid; width: 94px; height: 94px; flex: 0 0 94px; place-items: center; border-radius: 50%; background: conic-gradient(#fff var(--objectives-progress), rgba(255,255,255,.28) 0); box-shadow: 0 7px 18px rgba(47,31,139,.15); }
.ca-budget-objectives-ring::before { content: ""; grid-area: 1/1; width: 74px; height: 74px; border-radius: 50%; background: rgba(83,61,174,.82); backdrop-filter: blur(3px); }
.ca-budget-objectives-ring b { position: relative; z-index: 1; grid-area: 1/1; font-family: var(--family-font-heading); font-size: 18px; }
.ca-budget-objectives-list { position: relative; z-index: 2; display:grid; margin-top:auto; overflow:hidden; border:1px solid rgba(255,255,255,.23); border-radius:16px; background:rgba(48,31,119,.27); box-shadow:inset 0 1px 0 rgba(255,255,255,.08); backdrop-filter:blur(10px); }
.ca-budget-objective-row { display:grid; min-width:0; min-height:68px; grid-template-columns:38px minmax(0,1fr) auto; align-items:center; gap:11px; padding:10px 12px; border:0; border-bottom:1px solid rgba(255,255,255,.17); background:transparent; color:#fff; text-align:left; }
.ca-budget-objective-row:last-child { border-bottom:0; }
.ca-budget-objective-row:hover { background:rgba(255,255,255,.08); }
.ca-budget-objective-row:focus-visible { outline:2px solid rgba(255,255,255,.78); outline-offset:-3px; }
.ca-budget-objective-icon { display:grid; width:36px; height:36px; place-items:center; border-radius:50%; background:rgba(255,255,255,.92); color:#6d55d9; }
.ca-budget-objective-icon i { font-size:17px; }
.ca-budget-objective-copy { display:flex; min-width:0; flex-direction:column; }
.ca-budget-objective-copy strong { overflow:hidden; font-size:11px; font-weight:700; text-overflow:ellipsis; white-space:nowrap; }
.ca-budget-objective-copy small { margin-top:2px; color:rgba(255,255,255,.78); font-size: var(--text-2xs); }
.ca-budget-objective-progress { display:block; height:4px; margin-top:7px; overflow:hidden; border-radius:99px; background:rgba(255,255,255,.22); }
.ca-budget-objective-progress i { display:block; height:100%; border-radius:inherit; background:rgba(255,255,255,.94); }
.ca-budget-objective-row > b { min-width:34px; font-size:10px; text-align:right; }
.ca-budget-objectives-empty { position:relative; z-index:2; display:flex; align-items:center; gap:12px; margin-top:auto; padding:17px; border:1px solid rgba(255,255,255,.22); border-radius:16px; background:rgba(48,31,119,.25); backdrop-filter:blur(10px); }
.ca-budget-objectives-empty > span { display:grid; width:38px; height:38px; flex:0 0 38px; place-items:center; border-radius:50%; background:rgba(255,255,255,.92); color:#6d55d9; }
.ca-budget-objectives-empty svg { width:18px; }
.ca-budget-objectives-empty strong,.ca-budget-objectives-empty small { display:block; }
.ca-budget-objectives-empty strong { font-size: var(--text-xs); }.ca-budget-objectives-empty small { margin-top:3px; color:rgba(255,255,255,.76); font-size: var(--text-2xs); }
.ca-budget-objectives-cta { position:relative; z-index:2; display:inline-flex; width:fit-content; align-items:center; gap:7px; margin-top:17px; padding:10px 14px; border:1px solid rgba(255,255,255,.34); border-radius:10px; background:rgba(255,255,255,.12); color:#fff; font-size:11px; font-weight:700; }
.ca-budget-objectives-cta:hover { background:rgba(255,255,255,.21); }
.ca-budget-objectives-cta:focus-visible { outline:2px solid #fff; outline-offset:2px; }
.ca-budget-objectives-cta.is-disabled { cursor:default; background:rgba(255,255,255,.16); color:rgba(255,255,255,.88); pointer-events:none; }

/* Analisi e movimenti: layout 75/25 Movimenti + Spese per categoria */
.ca-budget-analysis-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(280px, 1fr); align-items: start; gap: 22px; }
.ca-budget-analysis-movements, .ca-budget-analysis-categories { min-width: 0; }

.ca-budget-movements-card { overflow: hidden; }
.ca-budget-movements-header { align-items: flex-start; flex-wrap: wrap; gap: 12px 20px; padding-bottom: 14px; }
.ca-budget-movements-heading { display: flex; width: 100%; min-width: 0; align-items: center; justify-content: space-between; gap: 12px; }
.ca-budget-movements-heading .card-title { min-width: 0; margin: 0; }
.ca-budget-movements-header .card-title { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; text-align: left; }
.ca-budget-movements-title-row { display: inline-flex; align-items: center; gap: 8px; }
.ca-budget-movements-more { display: inline-grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; padding: 0; border: 0; border-radius: 10px; background: transparent; color: #65708a; }
.ca-budget-movements-more:hover { background: #f1f4f9; color: var(--ca-primary); }
.ca-budget-movements-more:focus-visible { outline: 2px solid var(--ca-primary); outline-offset: 2px; }
.ca-budget-movements-more svg { width: 19px; height: 19px; }
.ca-budget-movements-clear-category { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border: 0; border-radius: 999px; background: var(--ca-primary-soft); color: var(--ca-primary); font-family: var(--family-font-body); font-size: var(--text-xs); font-weight: var(--font-semibold); }
.ca-budget-movements-clear-category:hover { filter: brightness(.96); }
.ca-budget-movements-clear-category i { font-size: var(--text-2xs); }
.ca-budget-movements-toolbar-actions { display: flex; width: 100%; align-items: center; gap: 16px; margin-left: 0; }
.ca-budget-movements-toolbar-actions .ca-budget-movements-search { margin-left: 0; }
.ca-budget-movements-filters-toggle-wrap { display: flex; flex: 0 0 auto; align-items: center; margin-left: auto; padding: 0; }
.ca-budget-movements-filters-toggle { display: inline-flex; align-items: center; gap: 8px; }
.ca-budget-movements-export { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 7px; white-space: nowrap; }
.ca-budget-movements-export svg { width: 15px; height: 15px; }

.ca-budget-movements-quickbar { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 30px 14px; }
.ca-budget-movements-advanced .ca-budget-movements-quickbar { flex: 0 0 100%; padding: 0 0 12px; }
.ca-budget-quick-chip { padding: 7px 14px; border: 1px solid var(--ca-border); border-radius: 999px; background: #fff; color: #4a5375; font-family: var(--family-font-body); font-size: var(--text-sm); font-weight: var(--font-semibold); transition: border-color .15s ease, background-color .15s ease, color .15s ease; }
.ca-budget-quick-chip:hover { border-color: #c7d0e3; }
.ca-budget-quick-chip.is-active { border-color: transparent; background: var(--ca-primary); color: #fff; }

.ca-budget-movements-advanced { display: flex; flex-wrap: wrap; align-items: end; gap: 14px 18px; padding: 0 30px 16px; border-bottom: 1px solid #eef1f7; }
.ca-budget-movements-header .ca-budget-movements-advanced { width: 100%; margin-top: 12px; padding: 12px 0 16px; border-bottom: 1px solid #eef1f7; }
.ca-budget-movements-header:has(.ca-budget-movements-advanced.is-open) { padding-bottom: 0; }
.ca-budget-advanced-field { display: flex; flex-direction: column; gap: 4px; min-width: 120px; }
.ca-budget-advanced-field label { color: #7c879d; font-size: var(--text-xs); font-weight: var(--font-semibold); letter-spacing: .02em; text-transform: uppercase; }
.ca-budget-advanced-field .form-select, .ca-budget-advanced-field input[type="number"] { min-height: 36px; padding: 0 10px; border: 1px solid var(--ca-border); border-radius: 9px; font-size: 12.5px; }
.ca-budget-advanced-field .form-select { padding-right: 30px; }
.ca-budget-advanced-field:has(#caBudgetSort) { min-width: 168px; }

.ca-budget-movements-card .table-responsive { margin-top: 10px; }
.ca-budget-table-v2 { border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.ca-budget-table-v2 thead th { padding: 13px 10px; font-size: var(--text-xs); letter-spacing: .04em; text-transform: uppercase; }
.ca-budget-table-v2 thead th:nth-child(1) { width: 11%; }
.ca-budget-table-v2 thead th:nth-child(2) { width: 11%; }
.ca-budget-table-v2 thead th:nth-child(3) { width: 31%; }
.ca-budget-table-v2 thead th:nth-child(4) { width: 30%; }
.ca-budget-table-v2 thead th:nth-child(5) { width: 17%; }
.ca-budget-table-v2 tbody td { vertical-align: top; padding-top: 14px; }
.ca-budget-table-v2 tbody tr { background-image: repeating-linear-gradient(to right, #cbd2e0 0, #cbd2e0 4px, transparent 4px, transparent 9px); background-repeat: repeat-x; background-position: bottom left; background-size: 9px 1px; }
.ca-budget-table-v2 tbody tr:last-child { background-image: none; }
.ca-budget-table-v2 .ca-budget-table-date { color: #59657c; font-weight: 500; white-space: nowrap; }
.ca-budget-table-row { cursor: pointer; }
.ca-budget-table-row:focus-visible { outline: 2px solid rgba(79, 70, 255, .35); outline-offset: -2px; }
.ca-budget-table-description { max-width: 100%; overflow: hidden; }
.ca-budget-table-description-name { display: block; overflow: hidden; color: #17213f; font-size: var(--text-md); font-weight: var(--font-semibold); text-overflow: ellipsis; white-space: nowrap; }
.ca-budget-table-description-meta { display: flex; min-width: 0; align-items: center; gap: 8px; margin-top: 3px; }
.ca-budget-table-note-preview { min-width: 0; overflow: hidden; color: #7c879d; font-size: var(--text-xs); text-overflow: ellipsis; white-space: nowrap; }
.ca-budget-table-flags { flex: 0 0 auto; white-space: nowrap; }
.ca-budget-table-flags .badge { padding: 3px 7px; border-radius: 6px; font-size: var(--text-2xs); font-weight: var(--font-semibold); }
.ca-budget-table-trip-name { color: #7c879d; font-weight: 500; }
.ca-budget-table-v2 .ca-budget-table-category { max-width: 100%; }
.ca-budget-table-v2 .ca-budget-table-category > span:last-child { overflow: hidden; min-width: 0; text-overflow: ellipsis; white-space: nowrap; }
.ca-budget-table-v2 .ca-budget-table-author { max-width: 100%; }
.ca-budget-table-v2 .ca-budget-table-author > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-budget-table-author { display: inline-flex; min-width: 0; align-items: center; gap: 8px; color: #43506a; font-size: 12px; font-weight: 500; }
.ca-budget-table-author .ca-member-avatar { width: 26px; height: 26px; font-size: var(--text-2xs); }

.ca-budget-category-hero {
  position: relative;
  overflow: hidden;
  padding-bottom: 6px;
  border-radius: 15px 15px 0 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .35) 0%, rgba(255, 255, 255, .82) 68%, #fff 100%),
    url("images/budget-category-hero.png") center 15%/cover no-repeat;
}
.ca-budget-category-hero > * { position: relative; z-index: 1; }

.ca-budget-category-card-header { display: grid; grid-template-columns: 1fr auto; align-items: start; column-gap: 10px; row-gap: 6px; }
.ca-budget-category-card-header .card-title { grid-column: 1; grid-row: 1; }
.ca-budget-category-period { grid-column: 2; grid-row: 1; margin-top: 3px; color: #7c879d; font-size: var(--text-sm); font-weight: 600; white-space: nowrap; }
.ca-budget-category-description { grid-column: 1 / -1; grid-row: 2; margin: 0; color: #7c879d; font-size: 12px; font-weight: 500; line-height: 1.4; }

.ca-budget-analysis-donut-wrap { position: relative; width: 208px; max-width: 100%; margin: 6px auto 18px; aspect-ratio: 1; }
.ca-budget-analysis-donut { display: block; width: 100%; height: 100%; overflow: visible; }
.ca-budget-analysis-donut-segment { transition: opacity .15s ease, stroke-width .15s ease; cursor: pointer; }
.ca-budget-analysis-donut-segment.is-dimmed { opacity: .28; }
.ca-budget-analysis-donut-segment:focus-visible { outline: 2px solid var(--ca-primary); outline-offset: 2px; }
.ca-budget-analysis-donut-center {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 122px;
  height: 122px;
  place-items: center;
  align-content: center;
  gap: 1px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 16px rgba(38, 52, 89, .08);
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}
.ca-budget-analysis-donut-center span { color: #98a1b8; font-size: var(--text-2xs); font-weight: var(--font-semibold); letter-spacing: .01em; text-transform: uppercase; }
.ca-budget-analysis-donut-center strong { color: #17213f; font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ca-budget-analysis-donut-center small { color: #7c879d; font-size: 10px; font-weight: 600; }

.ca-budget-category-highlight { display: flex; align-items: center; gap: 10px; margin: 4px 20px 16px; padding: 10px 14px; border-radius: 14px; background: #fff; box-shadow: 0 4px 14px rgba(38, 52, 89, .06); }
.ca-budget-category-highlight-icon { display: grid; flex: 0 0 auto; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: var(--ca-primary-soft); color: var(--ca-primary); }
.ca-budget-category-highlight-icon svg { width: 15px; height: 15px; }
.ca-budget-category-highlight-copy { display: flex; min-width: 0; flex: 1 1 auto; flex-direction: column; gap: 1px; }
.ca-budget-category-highlight-copy small { color: #98a1b8; font-size: var(--text-2xs); font-weight: var(--font-semibold); text-transform: uppercase; letter-spacing: .01em; }
.ca-budget-category-highlight-copy strong { overflow: hidden; color: #17213f; font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.ca-budget-category-highlight-pct { flex: 0 0 auto; color: var(--ca-primary); font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.ca-budget-category-highlight-pct small { display: block; color: #98a1b8; font-size: var(--text-2xs); font-weight: 600; text-transform: none; }
.ca-budget-analysis-donut-tooltip {
  position: absolute;
  z-index: 5;
  display: grid;
  gap: 2px;
  padding: 8px 11px;
  border-radius: 10px;
  background: rgba(18, 26, 54, .94);
  color: rgba(255, 255, 255, .82);
  box-shadow: 0 6px 18px rgba(18, 26, 54, .12);
  font-size: var(--text-xs);
  line-height: 1.3;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity .14s ease;
  white-space: nowrap;
}
.ca-budget-analysis-donut-tooltip.is-visible { opacity: 1; }
.ca-budget-analysis-donut-tooltip strong { color: #fff; font-size: var(--text-sm); font-weight: var(--font-semibold); }
.ca-budget-analysis-donut-tooltip span { color: rgba(255, 255, 255, .78); font-variant-numeric: tabular-nums; }

.ca-budget-category-card .ca-budget-category-list { gap: 4px; }
.ca-budget-category-card .ca-budget-category-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto auto; width: 100%; align-items: center; gap: 9px; padding: 7px 6px; border: 0; border-radius: 10px; background: transparent; text-align: left; font-family: var(--family-font-body); transition: background-color .15s ease; }
.ca-budget-category-card .ca-budget-category-row:hover { background: #f6f8fc; }
.ca-budget-category-card .ca-budget-category-row.is-active { background: var(--ca-primary-soft); }
.ca-budget-category-card .ca-budget-category-row:focus-visible { outline: 2px solid var(--ca-primary); outline-offset: -2px; }
.ca-budget-category-card .ca-budget-category-icon { width: 30px; height: 30px; min-width: 30px; border-radius: 9px; }
.ca-budget-category-card .ca-budget-category-icon svg { width: 15px; height: 15px; }
.ca-budget-category-card .ca-budget-category-row-name { color: #17213f; font-size: var(--text-md); font-weight: 700; }
.ca-budget-category-card .ca-budget-category-amount { color: #17213f; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ca-budget-category-card .ca-budget-category-percentage { display: inline-flex; min-width: 40px; align-items: center; justify-content: center; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ca-budget-category-mobile-toggle { display: none; }

/* Metodo 50/30/20: gruppi macro nella card "Spese per categoria". */
.ca-budget-category-card .ca-budget-category-list { display: flex; flex-direction: column; gap: 4px; }
.ca-budget-macro-group + .ca-budget-macro-group { margin-top: 14px; }

/* Intestazione macro su UNA riga, sempre (desktop e mobile): icona, nome
   (non va mai a capo/spezzato, si tronca con ellissi solo in casi estremi),
   importo e % sulla torta. Flex, non grid: una colonna grid troppo stretta
   forzava il nome a spezzarsi carattere per carattere su mobile. */
.ca-budget-macro-heading { display: flex; align-items: center; gap: 9px; padding: 8px 6px; }
.ca-budget-macro-icon { display: grid; width: 30px; height: 30px; flex: 0 0 30px; place-items: center; border-radius: 9px; color: var(--macro-color); background: var(--macro-bg); }
.ca-budget-macro-icon svg { width: 15px; height: 15px; }
.ca-budget-macro-name { flex: 1 1 auto; min-width: 0; overflow: hidden; color: #17213f; font-size: 13px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.ca-budget-macro-group.is-unclassified .ca-budget-macro-name { color: #6b7385; }
.ca-budget-macro-amount { flex: 0 0 auto; color: #17213f; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ca-budget-macro-percentage { flex: 0 0 auto; display: inline-flex; min-width: 40px; align-items: center; justify-content: center; padding: 3px 8px; border-radius: 999px; color: var(--macro-color); background: var(--macro-bg); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ca-budget-macro-body { display: flex; flex-direction: column; gap: 2px; padding-left: 6px; border-left: 2px solid var(--macro-bg); margin-left: 15px; }

@media (max-width: 1199.98px) {
  .ca-budget-analysis-grid { grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); }
}

@media (max-width: 991.98px) {
  .ca-budget-movements-toolbar-actions { width: 100%; margin-left: 0; }
  .ca-budget-movements-toolbar-actions .ca-budget-movements-search { flex: 1 1 auto; width: auto; }
}

@media (max-width: 767.98px) {
  .ca-budget-analysis-grid { grid-template-columns: 1fr; gap: 16px; }
  .ca-budget-analysis-movements { order: 2; }
  .ca-budget-analysis-categories { order: 1; }
  .ca-budget-category-card:not(.is-mobile-expanded) .ca-budget-category-row.is-mobile-extra { display: none; }
  .ca-budget-category-mobile-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--ca-border); border-radius: 10px; background: #fff; color: var(--ca-primary); font-size: 12px; font-weight: 700; }
  .ca-budget-category-mobile-toggle:hover { background: var(--ca-primary-soft); }
  .ca-budget-category-mobile-toggle:focus-visible { outline: 2px solid var(--ca-primary); outline-offset: 2px; }
  .ca-budget-category-mobile-toggle svg { width: 15px; height: 15px; }
  .ca-budget-movements-quickbar,
  .ca-budget-movements-advanced { padding-left: 18px; padding-right: 18px; }
  .ca-budget-advanced-field { min-width: 0; flex: 1 1 128px; }
  .ca-budget-table-v2 { min-width: 620px; }
}

.ca-budget-analysis-recurring-grid { display: grid; max-width: 1080px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.ca-budget-analysis-recurring, .ca-budget-analysis-forecast { min-width: 0; }
.ca-budget-analysis-recurring .ca-budget-overview-card, .ca-budget-analysis-forecast .card { min-height: 312px; }
.ca-budget-next-month-forecast-card { overflow: hidden; border-color: #e8e1ff !important; background: radial-gradient(circle at 88% 12%, rgba(205, 187, 255, .36), transparent 36%), linear-gradient(135deg, #fcfbff, #f4f0ff); box-shadow: 0 10px 28px rgba(80, 64, 157, .06) !important; }
.ca-budget-next-month-forecast-card .card-header { min-height: 51px; padding: 16px 18px 5px; }
.ca-budget-next-month-forecast-card .card-body { display: flex; flex: 1 1 auto; flex-direction: column; padding: 7px 18px 13px; }
.ca-budget-next-month-forecast-title { color: #6550d8; font-family: var(--family-font-heading); font-size: var(--title-sm); font-weight: var(--font-semibold); }
.ca-budget-next-month-forecast-main { display: grid; flex: 1 1 auto; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; align-items: stretch; min-height: 0; }
.ca-budget-next-month-forecast-total { display: flex; min-height: 106px; flex-direction: column; justify-content: center; padding-right: 14px; border-right: 1px solid rgba(116, 93, 218, .15); }
.ca-budget-next-month-forecast-total > span { color: #6c7390; font-size: 11px; font-weight: 600; }
.ca-budget-next-month-forecast-total strong { margin-top: 4px; color: #1d2d55; font-size: 21px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ca-budget-next-month-forecast-total small { margin-top: 3px; color: #7b829a; font-size: 10px; font-weight: 500; }
.ca-budget-next-month-forecast-list { display: flex; min-width: 0; flex-direction: column; justify-content: space-between; gap: 5px; padding: 1px 0; }
.ca-budget-next-month-forecast-list > div { display: grid; grid-template-columns: 47px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-width: 0; }
.ca-budget-next-month-forecast-list > div > span { display: inline-flex; justify-content: center; padding: 4px 5px; border-radius: 6px; color: #6e59d4; background: #efebff; font-size: var(--text-xs); font-weight: 700; white-space: nowrap; }
.ca-budget-next-month-forecast-list strong { overflow: hidden; color: #33405e; font-size: var(--text-sm); font-weight: var(--font-semibold); text-overflow: ellipsis; white-space: nowrap; }
.ca-budget-next-month-forecast-list b { color: #263554; font-size: var(--text-xs); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ca-budget-next-month-forecast-list p { margin: 0; color: #7c8299; font-size: 11px; line-height: 1.4; }
.ca-budget-next-month-forecast-more { display: inline-flex; width: fit-content; align-items: center; gap: 5px; padding: 2px 0; border: 0; color: #6550d8; background: transparent; font-size: var(--text-xs); font-weight: 700; cursor: pointer; }
.ca-budget-next-month-forecast-more i { font-size: 11px; }
.ca-budget-next-month-forecast-more:hover { color: #4d38c5; text-decoration: underline; }
.ca-budget-next-month-forecast-more:focus-visible { outline: 2px solid rgba(101, 80, 216, .35); outline-offset: 3px; border-radius: 4px; }
.ca-budget-next-month-forecast-tip { display: flex; align-items: center; gap: 8px; min-height: 36px; margin-top: 10px; padding: 8px 10px; border-radius: 8px; color: #5d4db4; background: rgba(229, 220, 255, .48); font-size: 11px; font-weight: 500; line-height: 1.4; }
.ca-budget-next-month-forecast-tip svg { width: 14px; height: 14px; flex: 0 0 auto; color: #8068ed; }
.ca-budget-next-month-forecast-tip strong { font-weight: 700; }
.ca-budget-next-month-forecast-drawer-total { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; padding: 15px 17px; border-radius: 14px; background: #f4f1ff; color: #6351c7; font-size: var(--text-sm); font-weight: var(--font-semibold); }
.ca-budget-next-month-forecast-drawer-total strong { color: #1d2d55; font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ca-budget-next-month-forecast-drawer-list { display: grid; gap: 6px; }
.ca-budget-next-month-forecast-drawer-list article { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 58px; padding: 9px 10px; border: 1px solid #ebe7f7; border-radius: 12px; background: #fff; }
.ca-budget-next-month-forecast-drawer-list article > span { padding: 5px 6px; border-radius: 7px; color: #6e59d4; background: #f0edff; font-size: 10px; font-weight: 700; text-align: center; white-space: nowrap; }
.ca-budget-next-month-forecast-drawer-list article div { min-width: 0; }
.ca-budget-next-month-forecast-drawer-list article strong, .ca-budget-next-month-forecast-drawer-list article small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-budget-next-month-forecast-drawer-list article strong { color: #263554; font-size: 12px; font-weight: 700; }
.ca-budget-next-month-forecast-drawer-list article small { margin-top: 2px; color: #7e879f; font-size: 10px; }
.ca-budget-next-month-forecast-drawer-list article b { color: #263554; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ca-budget-savings-panel { display: flex; flex-direction: column; gap: 24px; }

.ca-savings-hero {
  position: relative;
  display: flex;
  overflow: hidden;
  min-height: 300px;
  align-items: stretch;
  justify-content: space-between;
  border-radius: 22px;
  background: url("images/project-risparmi-hero.png") center right/cover no-repeat;
  box-shadow: 0 16px 34px rgba(133, 96, 160, .16);
}
.ca-savings-hero-main { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; padding: 30px 20px 30px 34px; }
.ca-savings-hero-heading { display: flex; align-items: center; gap: 10px; color: #3d2f57; }
.ca-savings-hero-heading > svg { width: 22px; height: 22px; }
.ca-savings-hero-heading h2 { margin: 0; font-family: var(--family-font-heading); font-size: 22px; font-weight: 700; }
.ca-savings-add-funds-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .75);
  color: #3d2f57;
  font-family: var(--family-font-body);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(60, 40, 90, .12);
  transition: background-color .15s ease, transform .15s ease;
}
.ca-savings-add-funds-btn:hover { background: #fff; transform: translateY(-1px); }
.ca-savings-add-funds-btn svg { width: 14px; height: 14px; }
.ca-savings-hero-subtitle { margin: 6px 0 0; color: rgba(61, 47, 87, .72); font-size: var(--text-sm); font-weight: 600; }
.ca-savings-hero-amount { display: flex; align-items: baseline; margin-top: 6px; color: #2c2240; }
.ca-savings-hero-amount strong { font-family: var(--family-font-heading); font-size: var(--display-lg); font-weight: var(--font-bold); letter-spacing: -.02em; }
.ca-savings-hero-amount span { margin-left: 3px; color: rgba(44, 34, 64, .55); font-size: 19px; font-weight: var(--font-bold); }
.ca-savings-hero-tiles { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 22px; max-width: 620px; }
.ca-savings-hero-tile { min-width: 0; padding: 16px 18px; border-radius: 16px; background: rgba(255, 255, 255, .62); backdrop-filter: blur(6px); }
.ca-savings-hero-tile-label { display: flex; align-items: center; gap: 7px; color: #4a3a63; font-size: var(--text-xs); font-weight: var(--font-semibold); }
.ca-savings-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #356df3; }
.ca-savings-dot.is-available { background: #1aa45a; }
.ca-savings-hero-tile-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 6px; }
.ca-savings-hero-tile-row strong { overflow: hidden; color: #201a33; font-size: 17px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ca-savings-hero-pct { flex: 0 0 auto; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .7); color: #4a3a63; font-size: var(--text-xs); font-weight: 700; }
.ca-savings-hero-bar-track { display: block; height: 6px; margin-top: 10px; border-radius: 999px; background: rgba(255, 255, 255, .55); overflow: hidden; }
.ca-savings-hero-bar-fill { display: block; height: 100%; border-radius: 999px; background: #356df3; }
.ca-savings-hero-bar-fill.is-available { background: #1aa45a; }
.ca-savings-hero-tile small { display: block; margin-top: 8px; color: rgba(43, 33, 62, .62); font-size: var(--text-xs); font-weight: 500; line-height: 1.35; }
.ca-savings-hero-add {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: 50%;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--ca-primary);
  box-shadow: 0 4px 12px rgba(60, 40, 90, .18);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.ca-savings-hero-add svg { width: 16px; height: 16px; }

.ca-savings-projects-section { display: flex; flex-direction: column; gap: 16px; }
.ca-savings-projects-header { display: flex; align-items: center; }
.ca-savings-projects-header .fw-bold { color: #17213f; }
.ca-savings-projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(332px, 1fr)); gap: 18px; }
.ca-savings-goal-card {
  display: flex;
  position: relative;
  flex-direction: column;
  padding: 16px;
  border: 1px solid var(--ca-border);
  border-radius: 18px;
  background: #fff;
  text-align: left;
  font-family: var(--family-font-body);
  box-shadow: 0 8px 22px rgba(23, 32, 66, .045);
  transition: transform .15s ease, box-shadow .15s ease;
}
.ca-savings-goal-card:hover { box-shadow: 0 10px 26px rgba(23, 32, 66, .08); transform: translateY(-1px); }
.ca-savings-goal-card-top { display: flex; align-items: center; gap: 14px; padding-right: 60px; }
.ca-savings-goal-card .ca-savings-goal-cover { display: block; width: 92px; height: 92px; flex: 0 0 92px; overflow: hidden; border-radius: 18px; }
.ca-savings-goal-card .ca-savings-goal-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ca-savings-goal-card .ca-savings-goal-status { position: absolute; top: 14px; right: 14px; padding: 3px 9px; border-radius: 999px; font-size: var(--text-2xs); font-weight: 700; }
.ca-savings-goal-heading { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.ca-savings-goal-name { display: block; overflow: hidden; color: #17213f; font-size: var(--text-lg); font-weight: var(--font-semibold); text-overflow: ellipsis; white-space: nowrap; }
.ca-savings-goal-amounts { display: flex; align-items: baseline; gap: 5px; }
.ca-savings-goal-amounts strong { color: #17213f; font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ca-savings-goal-amounts span { color: #98a1b8; font-size: 11px; font-weight: 600; }
.ca-savings-goal-progress-track { display: block; height: 6px; margin-top: 12px; border-radius: 999px; background: #eef1f7; overflow: hidden; }
.ca-savings-goal-progress-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #4f46ff, #356df3); }
.ca-savings-goal-foot { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.ca-savings-goal-pct { flex: 1 1 auto; color: #356df3; font-size: var(--text-sm); font-weight: var(--font-semibold); }
.ca-savings-goal-remaining { display: flex; flex: 0 0 auto; flex-direction: column; align-items: flex-end; color: #17213f; font-size: var(--text-sm); font-weight: var(--font-semibold); font-variant-numeric: tabular-nums; }
.ca-savings-goal-remaining small { color: #98a1b8; font-size: var(--text-2xs); font-weight: 600; }
.ca-savings-goal-menu { display: grid; flex: 0 0 auto; width: 22px; height: 22px; place-items: center; color: #b3bacb; }
.ca-savings-goal-menu svg { width: 15px; height: 15px; }

.ca-savings-new-project-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  border: 1.5px dashed #c7cfe0;
  border-radius: 18px;
  background: transparent;
  text-align: center;
  transition: border-color .15s ease, background-color .15s ease, transform .15s ease;
}
.ca-savings-new-project-cta:hover { border-color: var(--ca-primary); background: var(--ca-primary-soft); transform: translateY(-1px); }
.ca-savings-new-project-icon { display: grid; flex: 0 0 auto; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: var(--ca-primary-soft); color: var(--ca-primary); }
.ca-savings-new-project-icon svg { width: 17px; height: 17px; }
.ca-savings-new-project-copy { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.ca-savings-new-project-copy strong { color: #17213f; font-size: 13px; font-weight: 700; }
.ca-savings-new-project-copy span { color: #7c879d; font-size: var(--text-sm); font-weight: 500; }

@media (max-width: 991.98px) {
  .ca-savings-hero { min-height: 360px; background-position: bottom center; }
  .ca-savings-hero-tiles { max-width: none; }
}

@media (max-width: 575.98px) {
  .ca-savings-hero-tiles { grid-template-columns: 1fr; }
  .ca-savings-hero-add { top: -12px; left: 50%; }
}

@media (max-width: 1199.98px) {
  .ca-budget-balance-grid { grid-template-columns: 1fr; }
  .ca-budget-flow-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; }
  .ca-budget-watch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ca-budget-watch-card.is-ducky { grid-column: 1 / -1; }
  .ca-budget-lower-grid { grid-template-columns: 1fr; }
  .ca-budget-objectives-card { min-height: 500px; }
  .ca-budget-objectives-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767.98px) {
  .ca-budget-tabs { margin: 0 0 18px; gap: 8px; }
  .ca-budget-tab { min-height: 38px; padding: 8px 12px; font-size: 12px; }
  .ca-budget-balance-card { display: block; min-height: 230px; padding: 20px; }
  .ca-budget-balance-content { width: 100%; max-width: none; }
  .ca-budget-flow-stack { grid-template-columns: 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); }
  .ca-budget-balance-value-row strong { font-size: 34px; }
  .ca-budget-balance-chart-wrap { position: absolute; top: auto; right: 0; bottom: 0; left: 0; width: auto; height: 84px; margin: 0; }
  .ca-budget-balance-area { opacity: .72; }
  .ca-budget-balance-line { opacity: .68; }
  .ca-budget-balance-guides line { stroke-opacity: .65; }
  .ca-budget-watch-grid { grid-template-columns: 1fr; gap: 12px; }
  .ca-budget-watch-card, .ca-budget-watch-card.is-category { grid-column: auto; min-height: 165px; }
  .ca-budget-watch-card.is-ducky { grid-column: auto; }
  .ca-budget-credit-section .ca-credit-cards-overview > .card-header { padding-inline: 18px; }
  .ca-budget-credit-section .ca-credit-cards-overview > .card-body { padding-inline: 18px; }
  .ca-budget-credit-section .ca-credit-cards-carousel { padding-inline: 12px; }
  .ca-budget-credit-section .ca-credit-cards-slide,
  .ca-budget-credit-section .ca-credit-cards-carousel.has-peek .ca-credit-cards-slide { flex-basis: 88%; }
  .ca-budget-credit-section .ca-credit-cards-nav { top: clamp(105px, 22vw, 160px); }
  .ca-budget-credit-section .ca-credit-card { padding: 18px 18px 14px; }
  .ca-budget-credit-section .ca-credit-card-middle { left: 18px; }
  .ca-budget-credit-section .ca-credit-card-facts { display: none; }
  .ca-budget-credit-section .ca-credit-card-spend { margin-bottom: 0; }
  .ca-budget-objectives-card { min-height: 480px; padding: 23px 21px; background-position: 56% center; }
  .ca-budget-objectives-panel { grid-template-columns: 1fr; }
  .ca-budget-objectives-ring { width: 82px; height: 82px; flex-basis: 82px; }
  .ca-budget-objectives-ring::before { width: 64px; height: 64px; }
  .ca-budget-analysis-recurring-grid { grid-template-columns: 1fr; gap: 14px; }
  .ca-budget-next-month-forecast-main { grid-template-columns: 128px minmax(0, 1fr); gap: 12px; }
  .ca-budget-next-month-forecast-total { padding-right: 10px; }
  .ca-budget-next-month-forecast-total strong { font-size: 19px; }
  .ca-budget-next-month-forecast-list strong { font-size: 11px; }
  .ca-budget-next-month-forecast-tip { font-size: 10.5px; }
}

@media (max-width: 479.98px) {
  .ca-budget-tab svg { display: none; }
  .ca-budget-balance-grid { gap: 12px; }
  .ca-budget-balance-value-row { align-items: center; flex-direction: row; gap: 8px; }
  .ca-budget-balance-comparison { max-width: none; }
  .ca-budget-ducky-strip { width: 100%; align-items: flex-start; padding-left: 61px; padding-right: 40px; border-radius: 22px; }
  .ca-budget-ducky-avatar { left: 3px; }
  .ca-budget-ducky-heart { right: 13px; }
  .ca-budget-watch-card.is-category { grid-template-columns: 42px minmax(0, 1fr); }
  .ca-budget-category-ring { position: absolute; top: 18px; right: 17px; width: 48px; height: 48px; opacity: .88; }
  .ca-budget-category-ring::before { width: 36px; height: 36px; }
  .ca-budget-category-ring b { font-size: 9px; }
  .ca-budget-watch-card.is-category > div { padding-right: 28px; }
  .ca-budget-credit-section .ca-credit-cards-overview { min-height: 0; }
  .ca-budget-credit-section .ca-credit-cards-overview > .card-header { min-height: 68px; padding-top: 17px; }
  .ca-budget-credit-section .ca-credit-cards-overview > .card-body { padding-inline: 14px; }
  .ca-budget-credit-section .ca-credit-cards-carousel { padding-inline: 9px; }
  .ca-budget-credit-section .ca-credit-cards-nav { width: 36px; height: 36px; }
  .ca-budget-credit-section .ca-credit-cards-nav.is-prev { left: -7px; }
  .ca-budget-credit-section .ca-credit-cards-nav.is-next { right: -7px; }
  .ca-budget-objectives-card { min-height: 475px; background-position: 61% center; }
  .ca-budget-objectives-copy { max-width: none; }
  .ca-budget-objectives-head { gap: 10px; }
  .ca-budget-objectives-ring { width: 76px; height: 76px; flex-basis: 76px; }
  .ca-budget-objectives-ring::before { width: 59px; height: 59px; }
  .ca-budget-objectives-ring b { font-size: 15px; }
  .ca-budget-objective-row { grid-template-columns: 34px minmax(0,1fr) auto; padding-inline: 10px; }
  .ca-budget-objective-icon { width: 32px; height: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .ca-budget-tab { transition: none; }
}

/* Ciclo & benessere: area personale, coerente con card e spacing Ducky. */
.ca-cycle-body { background: #fafbff; }
.ca-cycle-page { --cycle-period:#ef5b8d; --cycle-period-soft:#fff0f5; --cycle-fertile:#f3b746; --cycle-fertile-soft:#fff7df; --cycle-ovulation:#8268e8; --cycle-ovulation-soft:#f2efff; color:#17213d; }
.ca-cycle-page-header { display:flex; align-items:center; justify-content:space-between; gap:24px; margin-bottom:24px; }
.ca-cycle-title-row { display:flex; flex-wrap:wrap; align-items:center; gap:12px; }
.ca-cycle-title-row h1 { margin:0; color:#14213d; font-family:var(--family-font-heading); font-size:clamp(27px,2.2vw,36px); font-weight:600; letter-spacing:-.035em; }
.ca-cycle-title-row > span { display:inline-flex; align-items:center; gap:5px; padding:5px 9px; border-radius:999px; background:#f1efff; color:#6654c9; font-size:10px; font-weight:700; }
.ca-cycle-title-row svg { width:12px; height:12px; }
.ca-cycle-page-header p { margin:7px 0 0; color:#68738d; font-size:13px; }
.ca-cycle-header-actions { display:flex; gap:10px; }
.ca-cycle-header-actions .btn { min-height:44px; gap:8px; border-radius:12px; }
.ca-cycle-header-actions svg { width:17px; height:17px; }
.ca-cycle-header-actions .btn-primary { background:linear-gradient(135deg,#765ee5,#6d52dc); border-color:transparent; box-shadow:0 8px 20px rgba(112,83,222,.16); }

.ca-cycle-overview-row { display:grid; grid-template-columns:minmax(280px,1.2fr) minmax(420px,1.6fr) minmax(210px,.9fr); gap:16px; margin-bottom:18px; }
.ca-cycle-page .ca-card { border:1px solid rgba(118,137,179,.11); border-radius:20px; box-shadow:0 7px 22px rgba(42,67,120,.035); }
.ca-cycle-hero { position:relative; display:grid; min-height:218px; grid-template-rows:1fr auto; overflow:hidden; padding:22px 23px 18px; background:linear-gradient(135deg,#fff1f7 0%,#fff 72%); }
.ca-cycle-hero::after { content:""; position:absolute; top:-45px; right:-34px; width:190px; height:190px; border-radius:48% 52% 48% 52%; background:radial-gradient(circle at 42% 45%,rgba(255,255,255,.95) 0 27%,rgba(246,166,195,.22) 28% 53%,rgba(255,255,255,0) 54%); }
.ca-cycle-hero-copy { position:relative; z-index:2; }
.ca-cycle-hero-copy > span { display:inline-flex; padding:4px 8px; border-radius:999px; background:#ffe1ec; color:#d84274; font-size:var(--text-xs); font-weight:var(--font-semibold); text-transform:uppercase; }
.ca-cycle-hero-copy h2 { margin:9px 0 6px; color:#17213d; font-family:var(--family-font-heading); font-size:23px; font-weight:600; line-height:1.12; }
.ca-cycle-hero-copy strong { color:#de4277; font-size:11px; font-weight:var(--font-semibold); }
.ca-cycle-hero-copy p { margin:8px 0 0; color:#7d879c; font-size:10.5px; }
.ca-cycle-hero-mark { position:absolute; z-index:1; top:38px; right:30px; display:grid; width:72px; height:72px; place-items:center; border-radius:50%; background:rgba(255,255,255,.72); color:#ef7ca3; transform:rotate(-7deg); }
.ca-cycle-hero-mark svg { width:40px; height:40px; }
.ca-cycle-timeline { position:relative; z-index:2; display:grid; grid-template-columns:repeat(4,1fr); gap:4px; padding-top:18px; border-top:1px solid rgba(220,105,145,.12); }
.ca-cycle-timeline::before,.ca-cycle-timeline-progress { content:""; position:absolute; top:13px; left:0; height:3px; border-radius:99px; }
.ca-cycle-timeline::before { width:100%; background:#eeeaf4; }
.ca-cycle-timeline-progress { z-index:1; max-width:100%; background:linear-gradient(90deg,#ef5b8d,#f3b746,#8268e8); }
.ca-cycle-timeline > div { position:relative; z-index:2; display:flex; min-width:0; flex-direction:column; gap:5px; color:#7d879c; font-size:8px; }
.ca-cycle-timeline i { width:8px; height:8px; margin-top:-9px; border:2px solid #fff; border-radius:50%; background:#b9bfd0; box-shadow:0 0 0 1px rgba(80,90,120,.06); }
.ca-cycle-timeline i.is-period { background:var(--cycle-period); }.ca-cycle-timeline i.is-fertile { background:var(--cycle-fertile); }.ca-cycle-timeline i.is-ovulation { background:var(--cycle-ovulation); }
.ca-cycle-timeline small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.ca-cycle-date-cards { display:grid; min-width:0; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.ca-cycle-metric { display:flex; min-width:0; flex-direction:column; justify-content:center; padding:20px 18px; background:#fff; }
.ca-cycle-metric > span { display:grid; width:34px; height:34px; place-items:center; margin-bottom:15px; border-radius:11px; }
.ca-cycle-metric svg { width:18px; height:18px; }
.ca-cycle-metric.is-period > span { background:var(--cycle-period-soft);color:var(--cycle-period); }.ca-cycle-metric.is-fertile > span { background:#ecfbf1;color:#34ad67; }.ca-cycle-metric.is-ovulation > span { background:var(--cycle-ovulation-soft);color:var(--cycle-ovulation); }
.ca-cycle-metric small { color:#6f7991; font-size:10px; }.ca-cycle-metric strong { margin-top:7px; color:#19233f; font-family:var(--family-font-heading); font-size:clamp(15px,1.2vw,19px); font-weight:var(--font-semibold); white-space:nowrap; }.ca-cycle-metric p { margin:5px 0 0; color:#8a93a8; font-size:9.5px; }
.ca-cycle-tip { position:relative; justify-content:center; overflow:hidden; padding:22px; background:linear-gradient(145deg,#fff,#fcfbff); }
.ca-cycle-tip > span { display:flex; align-items:center; gap:7px; color:#4d5872; font-size:10px; font-weight:700; }.ca-cycle-tip > span svg { width:16px;color:#e3a321; }.ca-cycle-tip p { max-width:200px; margin:18px 0 0; color:#34405b; font-size:12px; line-height:1.55; }.ca-cycle-tip > i { position:absolute; right:17px; bottom:15px; color:#a879e8; }.ca-cycle-tip > i svg { width:19px;height:19px;fill:currentColor; }

.ca-cycle-main-grid { display:grid; grid-template-columns:minmax(0,1fr) 280px; align-items:start; gap:18px; }
.ca-cycle-calendar { overflow:hidden; background:#fff; }
.ca-cycle-calendar > header { display:grid; min-height:72px; grid-template-columns:1fr auto 1fr; align-items:center; gap:12px; padding:14px 18px; border-bottom:1px solid #edf1f7; }
.ca-cycle-calendar > header h2 { margin:0; font-family:var(--family-font-heading); font-size:17px; font-weight:600; text-align:center; }
.ca-cycle-calendar > header > .btn { justify-self:end; }
.ca-cycle-calendar-nav { display:flex; gap:7px; }.ca-cycle-calendar-nav button { display:grid; min-width:36px; height:36px; place-items:center; padding:0 11px; border:1px solid #e6eaf2; border-radius:10px; background:#fff; color:#536079; font-size:11px;font-weight:var(--font-semibold); }.ca-cycle-calendar-nav svg { width:15px;height:15px; }
.ca-cycle-weekdays,.ca-cycle-calendar-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); }
.ca-cycle-weekdays { padding:0 10px; border-bottom:1px solid #edf1f7; background:#fbfcff; }.ca-cycle-weekdays span { padding:11px 4px; color:#69748d; font-size:9px; font-weight:var(--font-semibold); text-align:center; text-transform:uppercase; }
.ca-cycle-calendar-grid { gap:1px; background:#edf1f7; }
.ca-cycle-day { position:relative; display:grid; min-width:0; min-height:68px; place-items:center; border:0; background:#fff; color:#24304b; font-size:12px; font-weight:var(--font-medium); }
.ca-cycle-day.is-today, .ca-cycle-day.is-selected { font-weight:var(--font-bold); }
.ca-cycle-day > span { position:relative; z-index:2; display:grid; width:31px; height:31px; place-items:center; border-radius:50%; }
.ca-cycle-day > i { position:absolute; bottom:10px; width:6px; height:6px; border-radius:50%; opacity:0; }
.ca-cycle-day:hover { background:#fafbff; }.ca-cycle-day:focus-visible { z-index:3; outline:2px solid rgba(118,91,227,.35); outline-offset:-2px; }
.ca-cycle-day.is-outside { color:#b7bdca; }.ca-cycle-day.is-selected > span { outline:2px solid #8068e8; outline-offset:2px; }.ca-cycle-day.is-today > span { background:#18233f;color:#fff; }
.ca-cycle-day.has-period { background:#fff1f6; }.ca-cycle-day.has-period > i { background:var(--cycle-period);opacity:1; }.ca-cycle-day.has-predicted { background:repeating-linear-gradient(135deg,#fff4f8,#fff4f8 5px,#fff 5px,#fff 10px); }.ca-cycle-day.has-predicted > i { background:#ee93b2;opacity:1; }.ca-cycle-day.has-fertile { background:var(--cycle-fertile-soft); }.ca-cycle-day.has-fertile > i { background:var(--cycle-fertile);opacity:1; }.ca-cycle-day.has-ovulation > span { color:#745adc;box-shadow:inset 0 0 0 1px #8a73e7; }.ca-cycle-day.has-ovulation > i { background:var(--cycle-ovulation);opacity:1; }.ca-cycle-day.has-log::after { content:""; position:absolute; top:8px; right:9px; width:5px;height:5px;border-radius:50%;background:#39a6ec; }
.ca-cycle-legend { display:flex; flex-wrap:wrap; gap:13px 20px; padding:15px 18px; border-top:1px solid #edf1f7; color:#6d7890; font-size:9.5px; }.ca-cycle-legend span { display:inline-flex;align-items:center;gap:6px; }.ca-cycle-legend i { width:8px;height:8px;border-radius:50%;background:#39a6ec; }.ca-cycle-legend i.is-period { background:var(--cycle-period); }.ca-cycle-legend i.is-predicted { background:#ef9ab7; }.ca-cycle-legend i.is-fertile { background:var(--cycle-fertile); }.ca-cycle-legend i.is-ovulation { background:var(--cycle-ovulation); }
.ca-cycle-day-detail { display:none; align-items:center; justify-content:space-between; gap:12px; padding:14px 18px; border-top:1px solid #edf1f7; background:#fbfcff; }.ca-cycle-day-detail > div { min-width:0; }.ca-cycle-day-detail strong,.ca-cycle-day-detail span { display:block; }.ca-cycle-day-detail strong { font-size:11px;text-transform:capitalize; }.ca-cycle-day-detail span { margin-top:3px;color:#7b859b;font-size:10px; }

.ca-cycle-side { display:grid; gap:14px; }.ca-cycle-side > article { overflow:hidden;background:#fff; }.ca-cycle-side article > header { display:flex;align-items:center;justify-content:space-between;gap:8px;padding:17px 17px 10px; }.ca-cycle-side h3 { margin:0;font-family:var(--family-font-heading);font-size:12px;font-weight: 600; }.ca-cycle-side header span { color:#838da2;font-size:9px; }.ca-cycle-side article > button { width:calc(100% - 28px); margin:2px 14px 13px;padding:8px;border:0;border-radius:9px;background:#f5f3ff;color:#6956ce;font-size:9.5px;font-weight:700; }
.ca-cycle-stat-list,.ca-cycle-reminder-list { padding:0 16px 8px; }.ca-cycle-stat-list > div,.ca-cycle-reminder-list > div { display:grid;min-height:42px;grid-template-columns:25px minmax(0,1fr) auto;align-items:center;gap:7px;border-bottom:1px solid #eff2f7;font-size:9.5px; }.ca-cycle-stat-list > div:last-child,.ca-cycle-reminder-list > div:last-child { border:0; }.ca-cycle-stat-list svg,.ca-cycle-reminder-list svg { width:14px;color:#8068e8; }.ca-cycle-stat-list b,.ca-cycle-reminder-list b { color:#536079;font-size:9px;font-weight:var(--font-semibold); }
.ca-cycle-symptom-list { padding:0 16px 11px; }.ca-cycle-symptom-list > div { display:flex;min-height:39px;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid #eff2f7; }.ca-cycle-symptom-list span { display:flex;align-items:center;gap:7px;font-size:9.5px; }.ca-cycle-symptom-list svg { width:14px;color:#e75383; }.ca-cycle-symptom-list b { color:#8a93a8;font-size:8.5px; }.ca-cycle-empty-copy { margin:0;padding:5px 17px 18px;color:#818ba1;font-size:10px;line-height:1.5; }
.ca-cycle-info-strip { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:20px; margin-top:20px; padding:22px; border:1px solid rgba(118,137,179,.08);border-radius:20px;background:linear-gradient(135deg,#f8f6ff,#fff); }.ca-cycle-info-strip > div { display:grid;min-width:0;grid-template-columns:42px minmax(0,1fr);align-items:center;gap:11px; }.ca-cycle-info-strip > div > svg { width:40px;height:40px;padding:10px;border-radius:12px;background:#fff;color:#765ee5;box-shadow:0 4px 13px rgba(80,62,163,.07); }.ca-cycle-info-strip strong,.ca-cycle-info-strip small { display:block; }.ca-cycle-info-strip strong { color:#6654c9;font-size:10.5px; }.ca-cycle-info-strip small { margin-top:4px;color:#667188;font-size:9px;line-height:1.45; }

.ca-cycle-analysis { padding:24px;background:#fff; }.ca-cycle-analysis > header { display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:20px; }.ca-cycle-analysis h2 { margin:0;font-family:var(--family-font-heading);font-size:22px;font-weight:600; }.ca-cycle-analysis header p { margin:5px 0 0;color:#768097;font-size:11px; }.ca-cycle-analysis-kpis { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px; }.ca-cycle-chart-card,.ca-cycle-pattern { margin-top:16px;padding:20px;border:1px solid #edf0f6;border-radius:16px;background:#fcfcff; }.ca-cycle-chart-card h3,.ca-cycle-pattern h3 { margin:0;font-size:12px;font-weight: 600; }.ca-cycle-bars { display:flex;height:180px;align-items:flex-end;gap:18px;margin-top:20px;padding:12px 18px 0;border-bottom:1px solid #e7eaf2; }.ca-cycle-bars > div { display:grid;align-self:stretch;flex:1;grid-template-rows:1fr auto auto;justify-items:center;gap:4px; }.ca-cycle-bars i { width:min(36px,70%);align-self:end;border-radius:8px 8px 2px 2px;background:linear-gradient(#aa98f2,#745adc); }.ca-cycle-bars b { font-size:10px; }.ca-cycle-bars span { color:#8891a6;font-size:8.5px;text-transform:capitalize; }.ca-cycle-pattern { display:flex;gap:12px; }.ca-cycle-pattern > svg { width:22px;color:#765ee5; }.ca-cycle-pattern p { margin:6px 0 0;color:#657089;font-size:10.5px; }
.ca-cycle-empty { display:grid;max-width:700px;min-height:390px;place-items:center;align-content:center;gap:13px;margin:40px auto;padding:40px;text-align:center;background:linear-gradient(145deg,#fff5f9,#fff); }.ca-cycle-empty > span { display:grid;width:74px;height:74px;place-items:center;border-radius:50%;background:#ffe8f1;color:#e75586; }.ca-cycle-empty svg { width:34px;height:34px; }.ca-cycle-empty h2 { margin:4px 0 0;font-family:var(--family-font-heading);font-size:var(--title-md); }.ca-cycle-empty p { max-width:470px;margin:0;color:#737e95;font-size:12px;line-height:1.6; }

.ca-cycle-drawer { width:min(520px,100vw); }.ca-cycle-drawer-header { display:flex;align-items:flex-start;justify-content:space-between;gap:15px;padding:24px;border-bottom:1px solid #edf0f6; }.ca-cycle-drawer-header h2 { margin:0;font-family:var(--family-font-heading);font-size:20px;font-weight:600; }.ca-cycle-drawer-header p { margin:5px 0 0;color:#758098;font-size:11px; }.ca-cycle-drawer-header button { display:grid;width:36px;height:36px;place-items:center;border:0;border-radius:10px;background:#f4f6fa;color:#59647a; }.ca-cycle-drawer-header svg { width:17px; }.ca-cycle-drawer-body { padding:22px 24px 100px; }.ca-cycle-drawer-body section { margin-bottom:24px; }.ca-cycle-drawer-body section > h3,.ca-cycle-drawer-body label > h3 { margin:0 0 10px;color:#2a3450;font-size:var(--text-xl);font-weight:var(--font-semibold);text-transform:uppercase;letter-spacing:.05em; }.ca-cycle-choice-grid { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px; }.ca-cycle-choice-grid label { position:relative;min-width:0;cursor:pointer; }.ca-cycle-choice-grid input { position:absolute;opacity:0; }.ca-cycle-choice-grid label > span { display:flex;min-height:68px;flex-direction:column;align-items:center;justify-content:center;gap:7px;padding:8px;border:1px solid #e7eaf1;border-radius:12px;background:#fff;color:#59647a;text-align:center; }.ca-cycle-choice-grid svg { width:17px;height:17px; }.ca-cycle-choice-grid b { font-size:8.5px;font-weight:var(--font-semibold); }.ca-cycle-choice-grid input:checked + span { border-color:#ea6a96;background:#fff1f6;color:#d94275;box-shadow:0 0 0 1px rgba(234,106,150,.08); }.ca-cycle-choice-grid input:focus-visible + span { outline:2px solid rgba(118,91,227,.3);outline-offset:2px; }.ca-cycle-drawer-footer { position:sticky;z-index:3;bottom:0;display:flex;justify-content:flex-end;gap:10px;padding:15px 24px;border-top:1px solid #edf0f6;background:rgba(255,255,255,.96);backdrop-filter:blur(8px); }.ca-cycle-setting-toggle { justify-content:space-between;margin:13px 0; }.ca-cycle-setting-toggle .form-check-input { order:2; }.ca-cycle-onboarding-intro { display:flex;gap:11px;margin-bottom:22px;padding:14px;border-radius:13px;background:#f3f1ff;color:#5f55a8; }.ca-cycle-onboarding-intro svg { width:22px;flex:0 0 22px; }.ca-cycle-onboarding-intro p { margin:0;font-size:var(--text-xs);line-height:1.5; }

@media (max-width:1199.98px) { .ca-cycle-overview-row { grid-template-columns:1fr 1.35fr; }.ca-cycle-tip { grid-column:1/-1;min-height:120px; }.ca-cycle-tip p { max-width:none; }.ca-cycle-main-grid { grid-template-columns:minmax(0,1fr) 250px; }.ca-cycle-info-strip { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:991.98px) { .ca-cycle-overview-row { grid-template-columns:1fr; }.ca-cycle-date-cards { grid-row:2; }.ca-cycle-main-grid { grid-template-columns:1fr; }.ca-cycle-side { grid-template-columns:repeat(3,minmax(0,1fr)); }.ca-cycle-tip { grid-column:auto; }.ca-cycle-page .ca-cycle-hero { min-height:230px; } }
@media (max-width:767.98px) { .ca-cycle-page-header { align-items:flex-start; }.ca-cycle-header-actions .btn-light span { display:none; }.ca-cycle-header-actions .btn { padding-inline:13px; }.ca-cycle-title-row h1 { font-size:25px; }.ca-cycle-page-header p { max-width:260px;font-size:11px; }.ca-cycle-date-cards { overflow-x:auto;scroll-snap-type:x mandatory;padding-bottom:4px; }.ca-cycle-metric { min-width:180px;scroll-snap-align:start; }.ca-cycle-calendar > header { grid-template-columns:1fr auto; }.ca-cycle-calendar > header h2 { grid-column:1/-1;grid-row:1;text-align:left; }.ca-cycle-calendar-nav { grid-row:2; }.ca-cycle-calendar > header > .btn { grid-row:2; }.ca-cycle-day { min-height:52px; }.ca-cycle-day > span { width:27px;height:27px;font-size:11px; }.ca-cycle-day > i { bottom:6px; }.ca-cycle-legend { gap:9px 13px; }.ca-cycle-day-detail { display:flex; }.ca-cycle-side { grid-template-columns:1fr; }.ca-cycle-info-strip { grid-template-columns:1fr;padding:18px; }.ca-cycle-analysis { padding:18px; }.ca-cycle-analysis > header { align-items:flex-start;flex-direction:column; }.ca-cycle-analysis-kpis { grid-template-columns:1fr; }.ca-cycle-choice-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.ca-cycle-drawer-body { padding-inline:18px; }.ca-cycle-drawer-header,.ca-cycle-drawer-footer { padding-inline:18px; } }
@media (max-width:479.98px) { .ca-cycle-page-header { flex-direction:column; }.ca-cycle-header-actions { width:100%; }.ca-cycle-header-actions .btn-primary { flex:1; }.ca-cycle-date-cards { margin-right:-12px; }.ca-cycle-hero-mark { right:17px; }.ca-cycle-calendar { margin-inline:-4px; }.ca-cycle-calendar > header { padding-inline:12px; }.ca-cycle-weekdays { padding-inline:0; }.ca-cycle-day { min-height:46px; }.ca-cycle-day.has-log::after { top:4px;right:4px; }.ca-cycle-legend { padding-inline:12px; }.ca-cycle-bars { gap:8px;padding-inline:4px; } }

/* Rifinitura Ciclo & benessere: gerarchia e modali allineate ai componenti Ducky. */
.ca-cycle-page { --cycle-period:#d95b88; --cycle-period-soft:#fff3f7; --cycle-fertile:#d99a26; --cycle-fertile-soft:#fff8e8; --cycle-ovulation:#705bc9; --cycle-ovulation-soft:#f3f0ff; }
.ca-cycle-page-header { margin-bottom:20px; }
.ca-cycle-title-row h1 { font-size:clamp(26px,2vw,32px); }
.ca-cycle-page-header p { font-size:14px; }
.ca-cycle-page .ca-card { border-radius:18px; }
.ca-cycle-hero { min-height:230px; background:linear-gradient(135deg,#fff8fb,#fff 68%); }
.ca-cycle-hero-copy h2 { font-size:24px; }
.ca-cycle-hero-copy strong { font-size:13px; }
.ca-cycle-hero-copy p { font-size:13px; }
.ca-cycle-timeline { gap:10px; padding-top:24px; border-top:0; }
.ca-cycle-timeline-track { position:absolute; top:19px; left:0; right:0; height:7px; overflow:hidden; border-radius:999px; background:#e8eaf1; }
.ca-cycle-timeline-track span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--cycle-period),var(--cycle-fertile),var(--cycle-ovulation)); }
.ca-cycle-timeline::before,.ca-cycle-timeline-progress { display:none; }
.ca-cycle-timeline > div { gap:8px; font-size:11px; }
.ca-cycle-timeline i { width:14px; height:14px; margin-top:-12px; border-width:3px; }
.ca-cycle-timeline > div.is-current i { box-shadow:0 0 0 4px rgba(217,91,136,.16); }
.ca-cycle-metric { min-height:218px; padding:22px 18px; }
.ca-cycle-metric small { font-size:12px; }
.ca-cycle-metric strong { font-size:18px; }
.ca-cycle-metric p { font-size:12px; }
.ca-cycle-tip { padding:20px; background:#fff; }
.ca-cycle-tip > span { font-size:12px; }.ca-cycle-tip p { margin-top:10px;font-size:13px; }
.ca-cycle-calendar > header h2 { font-size:18px; }.ca-cycle-weekdays span { font-size:11px; }.ca-cycle-day { min-height:74px;font-size:14px; }.ca-cycle-legend { font-size:12px; }.ca-cycle-day-detail strong { font-size:13px; }.ca-cycle-day-detail span { font-size:12px; }
.ca-cycle-empty-copy { font-size:13px; }.ca-cycle-empty-copy strong { display:block;margin-bottom:5px;color:#34405b; }
#caCycleDrawer.ca-event-modal { width:min(720px,100vw); }
#caCycleDrawer .ca-event-modal-form { display:flex; flex-direction:column; height:100%; }
#caCycleDrawer .ca-cycle-drawer-header { padding:28px 30px; }
#caCycleDrawer .ca-cycle-drawer-body { flex:1 1 auto; min-height:0; overflow-y:auto; padding:28px 30px; }
#caCycleDrawer .ca-cycle-drawer-footer { flex:0 0 auto; padding:14px 30px 18px; }
#caCycleDrawer .ca-cycle-settings-footer { justify-content:flex-end; }
#caCycleDrawer .ca-cycle-settings-save { min-width:120px; min-height:48px; padding:0 22px; border-radius:11px; font-size:14px; font-weight:700; }
#caCycleDrawer .ca-event-modal-heading-icon { background:#fff0f5;color:var(--cycle-period); }
#caCycleDrawer .ca-event-modal-heading h2 { font-size:var(--title-sm); }
#caCycleDrawer .ca-cycle-choice-grid b { font-size:11px; }
#caCycleDrawer .ca-cycle-choice-grid label > span { min-height:76px; }
.ca-cycle-field-help { margin:12px 0 16px; color:#758098; font-size:13px; line-height:1.45; }
.ca-cycle-form-section { margin:0 0 30px !important; }
.ca-cycle-form-section > h3 { margin:0 0 18px; color:#253252; font-size:var(--text-xl); font-weight:var(--font-semibold); letter-spacing:.04em; }
.ca-cycle-form-section > p { margin:-9px 0 16px; color:#758098; font-size:13px; line-height:1.45; }
#caCycleSettingsForm .ca-event-field { margin-bottom:20px; }
#caCycleSettingsForm .ca-event-field > .form-label { margin-bottom:9px; color:#253252; font-size:14px; font-weight: 600; }
#caCycleSettingsForm .ca-event-grid { gap:28px; }
#caCycleSettingsForm .ca-event-control > svg { color:#6274f5; }
.ca-cycle-reminder-setting { margin:0 0 14px; padding:16px; border:1px solid #e5e8f1; border-radius:12px; background:#fafbfe; }
.ca-cycle-reminder-setting-main { display:grid; grid-template-columns:38px minmax(0,1fr) auto; align-items:center; gap:12px; }
.ca-cycle-reminder-setting-icon { display:grid; width:38px; height:38px; place-items:center; border-radius:11px; background:#f1eeff; color:#6a60d8; }
.ca-cycle-reminder-setting-icon svg { width:18px; height:18px; }
.ca-cycle-reminder-setting-main strong { display:block; color:#253252; font-size:14px; font-weight:700; }
.ca-cycle-reminder-setting-main p { margin:3px 0 0; color:#758098; font-size:var(--text-sm); line-height:1.4; }
.ca-cycle-reminder-setting-main .form-check { margin:0; padding:0; }
.ca-cycle-reminder-setting-main .form-check-input { width:50px; height:28px; margin:0; }
.ca-cycle-reminder-setting-lead,
.ca-cycle-daily-time { margin:16px 0 0 50px; }
.ca-cycle-reminder-setting-lead .ca-event-field,
.ca-cycle-daily-time .ca-event-field { margin-bottom:0 !important; }
.ca-cycle-privacy-setting { margin-top:6px !important; padding-top:26px; border-top:1px solid #edf0f6; }
@media (max-width:767.98px) {
  #caCycleDrawer.ca-event-modal { width:100vw; max-height:100dvh; border-radius:0; }
  #caCycleDrawer .ca-cycle-drawer-header { padding:16px 18px; }
  #caCycleDrawer .ca-cycle-drawer-body { padding:22px 18px 10px; }
  #caCycleDrawer .ca-cycle-drawer-footer { padding:14px 18px 18px; }
  #caCycleDrawer .ca-cycle-settings-footer { align-items:stretch; }
  #caCycleDrawer .ca-cycle-settings-save { width:100%; }
  #caCycleSettingsForm .ca-event-grid { gap:0; }
  .ca-cycle-reminder-setting { padding:14px; }
  .ca-cycle-reminder-setting-main { grid-template-columns:36px minmax(0,1fr) auto; gap:10px; }
  .ca-cycle-reminder-setting-icon { width:36px; height:36px; }
  .ca-cycle-reminder-setting-lead,
  .ca-cycle-daily-time { margin-left:0; }
  .ca-cycle-date-cards { display:flex; grid-template-columns:none; gap:12px; overflow-x:auto; overscroll-behavior-x:contain; scroll-snap-type:x mandatory; }
  .ca-cycle-metric { flex:0 0 min(82vw,300px); min-width:0; scroll-snap-align:start; }
  .ca-cycle-day { min-height:52px; }.ca-cycle-legend { font-size:11px; }
}

/* Layout compatto della pagina e calendario mensile personale. */
.ca-cycle-page-header { align-items:center; min-height:104px; padding:24px 28px; background:#fff; }
.ca-cycle-page-header-copy { min-width:0; }
.ca-cycle-title-row h1 { font-size:29px; }
.ca-cycle-header-actions { align-items:center; }
.ca-cycle-header-actions .btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:44px; }
.ca-cycle-header-actions .btn svg { flex:0 0 17px; margin:0; }
.ca-cycle-summary-row { margin:18px 0; }
.ca-cycle-summary-card { max-width:none; }
.ca-cycle-summary-card > header,
.ca-cycle-secondary-grid > article > header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:18px 20px 10px; }
.ca-cycle-summary-card h3,
.ca-cycle-secondary-grid h3 { margin:0; color:#17213d; font-family:var(--family-font-heading); font-size:14px; font-weight:700; }
.ca-cycle-summary-card header span,
.ca-cycle-secondary-grid header span { color:#7e879f; font-size:11px; }
.ca-cycle-summary-card .ca-cycle-stat-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0; padding:0 20px 10px; }
.ca-cycle-summary-card .ca-cycle-stat-list > div { min-height:44px; padding-right:16px; border-bottom:0; border-right:1px solid #eff2f7; font-size:13px; }
.ca-cycle-summary-card .ca-cycle-stat-list > div + div { padding-left:16px; }
.ca-cycle-summary-card .ca-cycle-stat-list > div:last-child { border-right:0; }
.ca-cycle-summary-card > button,
.ca-cycle-secondary-grid > article > button { width:calc(100% - 40px); margin:2px 20px 18px; padding:10px; border:0; border-radius:10px; background:#f5f3ff; color:#6956ce; font-size:12px; font-weight:700; }
.ca-cycle-main-grid { grid-template-columns:minmax(0,2.8fr) minmax(275px,1fr); gap:18px; }
.ca-cycle-context-rail { display:grid; align-content:start; gap:14px; min-width:0; }
.ca-cycle-hero { display:block; min-height:174px; padding:22px; }
.ca-cycle-hero-copy h2 { margin:8px 0 6px; font-size:22px; white-space:nowrap; }
.ca-cycle-hero-copy p { max-width:210px; margin-top:8px; }
.ca-cycle-hero-mark { top:26px; right:20px; width:64px; height:64px; }
.ca-cycle-hero-mark svg { width:34px; height:34px; }
.ca-cycle-rail-metrics { grid-template-columns:1fr; gap:10px; }
.ca-cycle-rail-metrics .ca-cycle-metric { min-height:0; padding:16px; }
.ca-cycle-rail-metrics .ca-cycle-metric > span { width:30px; height:30px; margin-bottom:10px; }
.ca-cycle-rail-metrics .ca-cycle-metric small { font-size:12px; font-weight:var(--font-medium); }
.ca-cycle-rail-metrics .ca-cycle-metric strong { margin-top:4px; font-size:16px; white-space:normal; }
.ca-cycle-rail-metrics .ca-cycle-metric p { margin-top:3px; font-size:12px; }
.ca-cycle-calendar > header { display:flex; min-height:70px; justify-content:space-between; padding:16px 20px; }
.ca-cycle-calendar-nav { display:grid; grid-template-columns:auto auto auto; align-items:center; gap:10px; }
.ca-cycle-calendar-nav h2 { min-width:154px; font-size:18px; text-align:center; }
.ca-cycle-calendar-grid { gap:0; padding:10px 14px 14px; background:#fff; }
.ca-cycle-weekdays { padding:0 14px; border-bottom:0; background:#fff; }
.ca-cycle-weekdays span { padding:8px 4px; font-size:var(--text-xs); }
.ca-cycle-day { min-height:42px; background:transparent; font-size:13px; }
.ca-cycle-day > span { width:34px; height:34px; }
.ca-cycle-day > i,.ca-cycle-day.has-log::after { display:none; }
.ca-cycle-day.has-period,
.ca-cycle-day.has-predicted,
.ca-cycle-day.has-fertile { min-height:34px; margin-block:4px; }
.ca-cycle-day.has-period { background:#fde5ee; }.ca-cycle-day.has-predicted { background:repeating-linear-gradient(135deg,#fff3f7,#fff3f7 6px,#fff 6px,#fff 12px); }.ca-cycle-day.has-fertile { background:#fff4dc; }
.ca-cycle-day.is-period-start,.ca-cycle-day.is-fertile-start { border-radius:999px 0 0 999px; }
.ca-cycle-day.is-period-end,.ca-cycle-day.is-fertile-end { border-radius:0 999px 999px 0; }
.ca-cycle-day.has-ovulation > span { color:#b87913; box-shadow:inset 0 0 0 2px #efb239; }
.ca-cycle-day.has-ovulation > span::after { content:"✦"; position:absolute; top:-8px; right:-3px; color:#e6a225; font-size:11px; }
.ca-cycle-day.is-today > span { background:#fff; color:#6251c6; box-shadow:inset 0 0 0 2px #765ee5; }
.ca-cycle-day.is-selected > span { outline:0; box-shadow:inset 0 0 0 2px #765ee5,0 0 0 3px rgba(118,94,229,.12); }
.ca-cycle-legend { gap:12px 20px; padding:14px 20px 18px; border-top:1px solid #edf1f7; font-size:11px; }
.ca-cycle-legend i { width:11px; height:11px; }.ca-cycle-legend i.is-period { background:#f5aac3; }.ca-cycle-legend i.is-fertile { background:#fae3ad; }.ca-cycle-legend i.is-ovulation { background:#fff; border:2px solid #efb239; }.ca-cycle-legend i.is-today { background:#fff; border:2px solid #765ee5; }.ca-cycle-legend i.is-predicted { background:repeating-linear-gradient(135deg,#f5aac3,#f5aac3 2px,#fff 2px,#fff 4px); border:1px solid #f5aac3; }
.ca-cycle-secondary-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; margin-top:18px; }
.ca-cycle-secondary-grid > article { overflow:hidden; background:#fff; }
.ca-cycle-secondary-grid .ca-cycle-symptom-list,
.ca-cycle-secondary-grid .ca-cycle-reminder-list { padding:0 20px 10px; }
.ca-cycle-secondary-grid .ca-cycle-symptom-list > div,
.ca-cycle-secondary-grid .ca-cycle-reminder-list > div { min-height:45px; font-size:13px; }
.ca-cycle-secondary-grid .ca-cycle-symptom-list b,
.ca-cycle-secondary-grid .ca-cycle-reminder-list b { font-size:12px; }
.ca-cycle-secondary-grid .ca-cycle-empty-copy { padding:4px 20px 20px; }
.ca-cycle-page .ca-cycle-info-strip { display:grid; margin-top:18px; box-shadow:none; }
.ca-cycle-info-strip strong { font-size:12px; }
.ca-cycle-info-strip small { font-size:11px; line-height:1.5; }
.app-sidebar .menu-item:has(#caSideCycle) .menu-link { align-items:flex-start; min-height:58px; }
.app-sidebar .menu-item:has(#caSideCycle) .menu-title { white-space:normal; line-height:1.25; }
.app-sidebar .menu-item:has(#caSideCycle) .ca-nav-badge { flex:0 0 auto; margin-left:8px; background:#ef5b8d; }
.ca-more-sheet-menu [data-ca-cycle-nav] .ca-nav-badge { background:#ef5b8d; }
@media (max-width:991.98px) {
  .ca-cycle-main-grid { grid-template-columns:1fr; }.ca-cycle-context-rail { grid-template-columns:minmax(260px,1fr) repeat(3,minmax(180px,1fr)); align-items:stretch; }.ca-cycle-rail-metrics { display:contents; }.ca-cycle-hero { min-height:180px; }.ca-cycle-secondary-grid { grid-template-columns:1fr 1fr; }
}
@media (max-width:767.98px) {
  .ca-cycle-page-header { align-items:flex-start; min-height:0; padding:20px; }.ca-cycle-title-row h1 { font-size:25px; }.ca-cycle-page-header p { max-width:none; font-size:13px; }.ca-cycle-header-actions { width:100%; }.ca-cycle-header-actions .btn { flex:1; }.ca-cycle-header-actions .btn-light span { display:inline; }
  .ca-cycle-summary-card .ca-cycle-stat-list { grid-template-columns:1fr; }.ca-cycle-summary-card .ca-cycle-stat-list > div,.ca-cycle-summary-card .ca-cycle-stat-list > div + div { padding:0; border-right:0; border-bottom:1px solid #eff2f7; }.ca-cycle-summary-card .ca-cycle-stat-list > div:last-child { border-bottom:0; }
  .ca-cycle-context-rail { grid-template-columns:1fr; }.ca-cycle-rail-metrics { display:flex; grid-template-columns:none; }.ca-cycle-rail-metrics .ca-cycle-metric { flex:0 0 min(76vw,290px); }
  .ca-cycle-calendar > header { padding:14px 16px; }.ca-cycle-calendar-nav { gap:6px; }.ca-cycle-calendar-nav h2 { min-width:132px; font-size:16px; }.ca-cycle-weekdays { padding-inline:8px; }.ca-cycle-calendar-grid { padding:8px; }.ca-cycle-day { min-height:38px; font-size:12px; }.ca-cycle-day > span { width:30px; height:30px; }.ca-cycle-legend { gap:10px 14px; padding:12px 16px 16px; font-size:10px; }
  .ca-cycle-secondary-grid { grid-template-columns:1fr; }.ca-cycle-page .ca-card { border-radius:16px; }
}

/* Composizione finale: calendario con rail personale essenziale. */
.ca-cycle-context-rail { gap:12px; }
.ca-cycle-hero { min-height:148px; padding:20px; }
.ca-cycle-hero-copy h2 { font-size:var(--title-md); }
.ca-cycle-hero-mark { top:22px; }
.ca-cycle-rail-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.ca-cycle-rail-metrics .ca-cycle-metric { min-height:124px; padding:15px; }
.ca-cycle-rail-metrics .ca-cycle-metric > span { margin-bottom:8px; }
.ca-cycle-rail-metrics .ca-cycle-metric strong { font-size:var(--title-sm); line-height:1.25; }
.ca-cycle-rail-metrics .ca-cycle-metric p { font-size:11px; }
.ca-cycle-reminder-card { overflow:hidden; background:#fff; }
.ca-cycle-reminder-card > header { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:15px 16px 6px; }
.ca-cycle-reminder-card h3 { margin:0; color:#17213d; font-family:var(--family-font-heading); font-size:var(--text-xl); font-weight:var(--font-semibold); }
.ca-cycle-reminder-card header span { color:#7e879f; font-size:11px; }
.ca-cycle-reminder-card .ca-cycle-reminder-list { padding:0 16px 5px; }
.ca-cycle-reminder-card .ca-cycle-reminder-list > div { min-height:34px; grid-template-columns:20px minmax(0,1fr) auto; gap:6px; font-size:12px; }
.ca-cycle-reminder-card .ca-cycle-reminder-list svg { width:13px; }
.ca-cycle-reminder-card .ca-cycle-reminder-list b { font-size:11px; }
.ca-cycle-reminder-card .ca-cycle-empty-copy { padding:2px 16px 10px; font-size:12px; }
.ca-cycle-reminder-card > button { width:calc(100% - 32px); margin:2px 16px 14px; padding:8px; border:0; border-radius:10px; background:#f5f3ff; color:#6956ce; font-size:12px; font-weight:700; }
.ca-cycle-calendar > header { min-height:72px; }
.ca-cycle-day { min-height:48px; }
@media (max-width:991.98px) {
  .ca-cycle-context-rail { grid-template-columns:minmax(250px,1fr) repeat(2,minmax(160px,1fr)); }.ca-cycle-rail-metrics { display:contents; }
}
@media (max-width:767.98px) {
  .ca-cycle-main-grid { display:grid; grid-template-columns:minmax(0,1fr); gap:16px; }
  .ca-cycle-context-rail { display:contents; }
  .ca-cycle-page .ca-cycle-hero { order:1; height:auto; min-height:0; padding-block:18px; }
  .ca-cycle-rail-metrics { display:grid; order:2; grid-template-columns:repeat(2,minmax(0,1fr)); overflow:visible; }
  .ca-cycle-rail-metrics .ca-cycle-metric { flex:none; min-width:0; }
  .ca-cycle-rail-metrics .ca-cycle-metric strong { font-size:14px; }
  .ca-cycle-rail-metrics .ca-cycle-metric p { font-size:10px; }
  .ca-cycle-calendar { order:3; width:100%; }
  .ca-cycle-reminder-card { order:4; width:100%; }
  .ca-cycle-day { min-height:42px; }
}

/* Header: stessa struttura interna della card Piano pasti. */
.ca-cycle-page-header { display:block; min-height:0; padding:0; }
.ca-cycle-page-header > .card-body { align-items:center; }
.ca-cycle-page-header .ca-cycle-header-actions { width:auto; }
@media (max-width:767.98px) {
  .ca-cycle-page-header > .card-body { align-items:flex-start; }
  .ca-cycle-page-header .ca-cycle-header-actions { width:100%; }
}

.ca-dashboard-hero-match.is-family {
  background-image: linear-gradient(90deg, rgba(5,10,40,.55) 0%, rgba(5,10,40,.2) 42%, rgba(5,10,40,0) 70%), url("images/Match del mese/ducky-match-banner-famiglia.png") !important;
}
.ca-dashboard-hero-match.is-solo {
  background-image: linear-gradient(90deg, rgba(5,10,40,.55) 0%, rgba(5,10,40,.2) 42%, rgba(5,10,40,0) 70%), url("images/Match del mese/ducky-match-banner-solo.png") !important;
}
.ca-match-hero-fx { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.ca-match-hero-rope { position: absolute; left: -6%; width: 112%; height: 3px; background: repeating-linear-gradient(90deg, rgba(245,196,81,.55) 0 18px, rgba(245,196,81,.12) 18px 36px); opacity: .4; }
.ca-match-hero-rope-top { top: 14%; transform: rotate(-1deg); }
.ca-match-hero-rope-bottom { bottom: 12%; transform: rotate(1deg); }
.ca-match-hero-glow { position: absolute; border-radius: 50%; filter: blur(40px); opacity: .55; }
.ca-match-hero-glow-1 { top: -60px; right: 8%; width: 220px; height: 220px; background: radial-gradient(circle, #7C67FF 0%, transparent 70%); }
.ca-match-hero-glow-2 { bottom: -80px; left: 18%; width: 260px; height: 260px; background: radial-gradient(circle, #5B5CF0 0%, transparent 70%); }
.ca-match-hero-spark { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #F5C451; box-shadow: 0 0 6px 1px #F5C451; opacity: 0; animation: caMatchSparkFloat 5.5s ease-in-out infinite; }
.ca-match-hero-spark:nth-child(5) { top: 20%; left: 12%; animation-delay: .2s; }
.ca-match-hero-spark:nth-child(6) { top: 65%; left: 22%; animation-delay: 1.1s; }
.ca-match-hero-spark:nth-child(7) { top: 30%; left: 40%; animation-delay: 2s; }
.ca-match-hero-spark:nth-child(8) { top: 75%; left: 55%; animation-delay: .7s; }
.ca-match-hero-spark:nth-child(9) { top: 15%; left: 68%; animation-delay: 2.6s; }
.ca-match-hero-spark:nth-child(10) { top: 55%; left: 80%; animation-delay: 1.6s; }
.ca-match-hero-spark:nth-child(11) { top: 82%; left: 88%; animation-delay: 3.1s; }
.ca-match-hero-spark:nth-child(12) { top: 40%; left: 92%; animation-delay: .4s; }
.ca-match-hero-spark:nth-child(13) { top: 10%; left: 85%; animation-delay: 1.9s; }
.ca-match-hero-spark:nth-child(14) { top: 90%; left: 35%; animation-delay: 2.4s; }
@keyframes caMatchSparkFloat { 0%, 100% { opacity: 0; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-14px); } }
.ca-match-hero-copy { position: relative; z-index: 1; }
.ca-match-hero-badge { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; padding: 6px 14px; border-radius: 999px; background: linear-gradient(135deg, #FFE29A 0%, #F5C451 52%, #DFA72E 100%); border: 1px solid #FFE9A9; color: #172042; font-family: var(--family-font-heading); font-size: 12px; font-weight: 700; letter-spacing: .04em; box-shadow: 0 4px 12px rgba(15,18,48,.22); }
.ca-match-hero-title { margin: 0 0 4px; color: #fff; font-family: var(--family-font-heading); font-size: clamp(var(--title-md), 3vw, var(--title-lg)); font-weight: var(--font-bold); }
body[data-dashboard-hero] .ca-dashboard-hero-match .ca-match-hero-title { color: #fff !important; }
.ca-match-hero-date { margin: 0 0 10px; color: #A9AEEC; font-family: var(--family-font-body); font-size: var(--text-md); font-weight: 600; text-transform: capitalize; }
.ca-match-hero-note { color: #E4E6FA !important; text-shadow: 0 1px 6px rgba(5,10,40,.45) !important; font-size: var(--text-lg); }
.ca-match-hero-cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; padding: 12px 22px; border: 0; border-radius: 12px; background: linear-gradient(135deg, #7C67FF, #5B5CF0); color: #fff; font-family: var(--family-font-heading); font-size: 14px; font-weight: 700; box-shadow: 0 10px 26px rgba(91,92,240,.4); cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.ca-match-hero-cta:hover { transform: translateY(-1px); box-shadow: 0 14px 32px rgba(91,92,240,.5); }
.ca-match-hero-cta i { font-size: 15px; }

/* --- Modal shell --- */
body.ca-match-open { overflow: hidden; }
.ca-match-backdrop { z-index: var(--ca-z-drawer, 1200); background: rgba(8, 13, 43, .6); backdrop-filter: blur(3px); opacity: 0; animation: caMatchFadeIn .2s ease forwards; }
.ca-match-modal {
  position: fixed; z-index: calc(var(--ca-z-drawer, 1200) + 1);
  top: 50%; left: 50%; transform: translate(-50%, -48%);
  width: min(1080px, calc(100vw - 48px));
  max-height: min(92vh, 900px);
  display: flex; flex-direction: column;
  border-radius: 26px; overflow: hidden;
  background: #0F1230; box-shadow: 0 40px 100px rgba(8,13,43,.55);
  font-family: var(--family-font-heading);
  opacity: 0; animation: caMatchModalIn .3s ease forwards;
}
.ca-match-modal.is-talk { width: min(1200px, calc(100vw - 32px)); max-height: min(94vh, 960px); }
@keyframes caMatchFadeIn { to { opacity: 1; } }
@keyframes caMatchModalIn { from { opacity: 0; transform: translate(-50%, -46%) scale(.97); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.ca-match-close { position: absolute; top: 18px; right: 18px; z-index: 3; display: grid; width: 40px; height: 40px; place-items: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; transition: background-color .12s ease; }
.ca-match-close:hover { background: rgba(255,255,255,.24); }
.ca-match-close:focus-visible, .ca-match-cta:focus-visible, .ca-match-round-dot:focus-visible, .ca-match-back-btn:focus-visible, .ca-match-talk-cta:focus-visible { outline: 2px solid #F5C451; outline-offset: 2px; }
.ca-match-body { flex: 1; min-height: 0; overflow-y: auto; }

@media (max-width: 767.98px) {
  .ca-match-modal { top: 0; left: 0; transform: none; width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .ca-match-close { top: calc(12px + env(safe-area-inset-top)); right: calc(12px + env(safe-area-inset-right)); width: 44px; height: 44px; }
  @keyframes caMatchModalIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
}

/* --- Loading --- */
.ca-match-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; height: 100%; min-height: 320px; color: #C9CCF2; }
.ca-match-loading .spinner-border { width: 34px; height: 34px; color: #7C67FF; }

/* --- Pre-match --- */
.ca-match-premodal {
  display: flex; flex-direction: column; align-items: center; gap: 14px; min-height: 100%; padding: 64px 40px 40px; text-align: center;
  background: linear-gradient(180deg, rgba(7,10,40,.5) 0%, rgba(7,10,40,.78) 100%), url("images/Match del mese/Round_1.png") center / cover no-repeat;
  color: #fff;
}
.ca-match-premodal-badge { display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px; border-radius: 999px; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.3); color: #fff; font-size: var(--text-sm); font-weight: 700; }
.ca-match-premodal h2 { max-width: 520px; margin: 6px 0 0; color: #fff; font-size: clamp(19px, 2.6vw, 24px); font-weight: 700; line-height: 1.35; }
.ca-match-premodal-copy { max-width: 460px; margin: 8px 0 0; color: rgba(255,255,255,.82); font-family: var(--family-font-body); font-size: var(--text-lg); line-height: 1.6; }
.ca-match-premodal-wink { max-width: 420px; margin: 0; color: rgba(255,255,255,.55); font-family: var(--family-font-body); font-size: 13px; font-style: italic; }
.ca-match-avatars { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; margin: 10px 0; }
.ca-match-avatar { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ca-match-avatar-circle { display: grid; width: 62px; height: 62px; place-items: center; border-radius: 50%; background: linear-gradient(135deg, #7C67FF, #5B5CF0); color: #fff; font-size: 22px; font-weight: 700; box-shadow: 0 8px 20px rgba(91,92,240,.28); transition: filter .2s ease; }
.ca-match-avatar-circle.is-photo { background-color: #E4E7F5; background-size: cover; background-position: center; border: 2px solid #fff; }
.ca-match-avatar.is-waiting .ca-match-avatar-circle { filter: grayscale(.55) brightness(.92); }
.ca-match-avatar-name { color: #fff; font-family: var(--family-font-body); font-size: var(--text-sm); font-weight: 600; }
.ca-match-avatar-badge { position: absolute; top: -4px; right: -2px; display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(23,32,66,.18); color: #8B93A7; font-size: 11px; font-weight: 700; }
.ca-match-avatar.is-confirmed .ca-match-avatar-badge { background: #74F2A3; color: #0F1E5A; }
.ca-match-status-line { max-width: 420px; margin: 4px 0 0; color: rgba(255,255,255,.82); font-family: var(--family-font-body); font-size: 14px; line-height: 1.55; }
.ca-match-status-line.is-waiting { color: #F5C451; }

/* --- Countdown --- */
.ca-match-countdown { display: grid; height: 100%; min-height: 420px; place-items: center; background: radial-gradient(circle at 50% 50%, #312E81 0%, #080D2B 75%); }
.ca-match-countdown span { font-size: clamp(80px, 16vw, 140px); font-weight: 800; color: #F5C451; text-shadow: 0 0 40px rgba(245,196,81,.5); animation: caMatchCountdownPulse .55s ease; }
@keyframes caMatchCountdownPulse { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* --- Rounds shell --- */
.ca-match-rounds-shell { display: flex; flex-direction: column; height: 100%; min-height: 100%; }
#caMatchRoundContent { flex: 1; min-height: 0; overflow-y: auto; }
.ca-match-scene { display: flex; flex-direction: column; align-items: center; gap: 18px; min-height: 100%; padding: 56px 40px 40px; text-align: center; animation: caMatchSceneIn .35s ease; }
@keyframes caMatchSceneIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.ca-match-scene-dark { background: radial-gradient(140% 120% at 50% 0%, #312E81 0%, #11194C 45%, #080D2B 100%); color: #fff; }
.ca-match-scene-light { background: #F8F7FF; color: #172042; }
.ca-match-scene-finale { background: radial-gradient(140% 120% at 50% 0%, #0F3D3A 0%, #0B2A44 55%, #080D2B 100%); color: #fff; }
.ca-match-scene-round-1 {
  background: linear-gradient(180deg, rgba(7,10,40,.18), rgba(7,10,40,.32)), url("images/Match del mese/Round_1.png") center / cover no-repeat;
}
.ca-match-scene-round-2 {
  background: url("images/Match del mese/Round_2.png") center / cover no-repeat;
}
.ca-match-scene-round-3 {
  background: url("images/Match del mese/Round_3.png") center / cover no-repeat;
}
.ca-match-scene-round-4 {
  background: linear-gradient(180deg, rgba(7,10,40,.48) 0%, rgba(7,10,40,.12) 48%, rgba(7,10,40,.2) 100%), url("images/Match del mese/Round_4.png") center / cover no-repeat;
}
.ca-match-scene-round-5 {
  background: url("images/Match del mese/Round_5.png") center / cover no-repeat;
}
.ca-match-scene-finale-match {
  background: linear-gradient(180deg, rgba(7,10,40,.08), rgba(7,10,40,.24)), url("images/Match del mese/Match_Concluso.png") center / cover no-repeat;
}
.ca-match-scene-header { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ca-match-scene-header h2 { margin: 4px 0 0; font-size: clamp(20px, 3vw, 27px); font-weight: 700; }
.ca-match-scene-dark .ca-match-scene-header h2, .ca-match-title-on-dark { color: #fff; }
.ca-match-scene-header p { margin: 0; color: rgba(255,255,255,.6); font-family: var(--family-font-body); font-size: var(--text-md); }
.ca-match-scene-header.is-light h2 { color: #172042; }
.ca-match-scene-header.is-light p { color: #7E879F; }
.ca-match-scene-subtitle { color: #7E879F !important; font-family: var(--family-font-body); font-size: 14px !important; }
.ca-match-badge { display: inline-flex; padding: 6px 14px; border-radius: 999px; background: rgba(245,196,81,.16); border: 1px solid rgba(245,196,81,.4); color: #F5C451; font-size: var(--text-sm); font-weight: 700; letter-spacing: .05em; }
.ca-match-badge.is-light { background: rgba(91,92,240,.1); border-color: rgba(91,92,240,.25); color: #5B5CF0; }
.ca-match-empty { color: #8B93A7; font-family: var(--family-font-body); font-size: 14px; }

/* --- Round 1: scoreboard --- */
.ca-match-scoreboard { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; width: 100%; max-width: 640px; margin-top: 10px; }
.ca-match-score-item { flex: 1 1 150px; padding: 20px 16px; border-radius: 18px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(10px); }
.ca-match-score-item.is-saldo { background: rgba(245,196,81,.08); border-color: rgba(245,196,81,.3); }
.ca-match-score-label { display: block; margin-bottom: 8px; color: rgba(255,255,255,.55); font-size: var(--text-sm); font-weight: 700; letter-spacing: .06em; }
.ca-match-score-value { display: block; font-size: clamp(20px, 3vw, 27px); font-weight: 700; font-variant-numeric: tabular-nums; }
.ca-match-score-value.is-income { color: #74F2A3; }
.ca-match-score-value.is-expense { color: #F26B8A; }
.ca-match-score-value.is-positive { color: #74F2A3; }
.ca-match-score-value.is-negative { color: #F26B8A; }
.ca-match-verdict-chip { max-width: 480px; padding: 18px 22px; border-radius: 16px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); }
.ca-match-verdict-chip.is-positive { border-color: rgba(116,242,163,.3); background: rgba(116,242,163,.06); }
.ca-match-verdict-chip.is-negative { border-color: rgba(242,107,138,.3); background: rgba(242,107,138,.06); }
.ca-match-verdict-chip > span { display: block; margin-bottom: 6px; font-weight: 700; }
.ca-match-verdict-chip p { margin: 0; color: rgba(255,255,255,.75); font-family: var(--family-font-body); font-size: var(--text-md); line-height: 1.5; }
.ca-match-scoreboard-trend { margin-top: 10px; color: #F5C451; font-family: var(--family-font-body); font-size: var(--text-sm); font-weight: 600; }

/* --- CTA generico --- */
.ca-match-cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; padding: 13px 24px; border: 0; border-radius: 12px; background: linear-gradient(135deg, #7C67FF, #5B5CF0); color: #fff; font-family: var(--family-font-heading); font-size: 14px; font-weight: 700; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; box-shadow: 0 10px 24px rgba(91,92,240,.32); }
.ca-match-cta:hover { transform: translateY(-1px); }
.ca-match-cta.is-ghost { background: transparent; border: 1px solid rgba(255,255,255,.25); box-shadow: none; color: inherit; }
.ca-match-scene-light .ca-match-cta.is-ghost { border-color: #D7DBE6; color: #46516D; }
.ca-match-cta i { font-size: 15px; }
.ca-match-category-nav { display: flex; align-items: center; justify-content: flex-end; gap: 12px; width: 100%; }
.ca-match-category-nav .ca-match-cta { margin-top: 0; }

/* --- Round 2: highlights --- */
.ca-match-highlights-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; width: 100%; max-width: 700px; }
.ca-match-highlight-card { position: relative; overflow: hidden; padding: 20px; border-radius: 18px; background: #fff; box-shadow: 0 6px 20px rgba(23,32,66,.06); text-align: left; }
.ca-match-highlight-icon { font-size: 22px; }
.ca-match-highlight-title { display: block; margin: 8px 0 4px; font-size: var(--text-xs); font-weight: 700; letter-spacing: .04em; color: #7E879F; }
.ca-match-highlight-main { color: #172042; font-size: 15px; font-weight: 700; }
.ca-match-highlight-amount { margin-top: 2px; color: var(--ca-match-cat-color, #5B5CF0); font-size: 14px; font-weight: 700; }
.ca-match-highlight-card p { margin: 8px 0 0; color: #7E879F; font-family: var(--family-font-body); font-size: var(--text-sm); line-height: 1.5; }
.ca-match-highlight-card.is-punch { background: linear-gradient(160deg, #FFF5F5, #fff); }
.ca-match-highlight-card.is-queen { background: linear-gradient(160deg, color-mix(in srgb, var(--ca-match-cat-color) 10%, white), #fff); }
.ca-match-highlight-card.is-day { background: linear-gradient(160deg, #FFF8EC, #fff); }
.ca-match-highlight-card.is-calm { background: linear-gradient(160deg, #F1FBF4, #fff); }
.ca-match-highlight-card.is-grown { background: linear-gradient(160deg, color-mix(in srgb, var(--ca-match-cat-color) 10%, white), #fff); }

/* --- Round 3: categorie --- */
.ca-match-category-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(280px, 1.1fr); gap: 18px; width: 100%; max-width: 860px; align-items: stretch; }
.ca-match-category-scene { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; max-width: 460px; }
.ca-match-category-movements { display: flex; flex-direction: column; min-height: 0; padding: 18px; border-radius: 18px; background: rgba(255,255,255,.96); box-shadow: 0 10px 28px rgba(23,32,66,.1); text-align: left; }
.ca-match-category-movements-title { margin-bottom: 10px; color: #172042; font-size: 13px; font-weight: 700; }
.ca-match-category-movements-list { max-height: 300px; overflow-y: auto; }
.ca-match-category-movement { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid #F0F2F7; font-family: var(--family-font-body); font-size: var(--text-sm); }
.ca-match-category-movement:first-child { border-top: 0; }
.ca-match-category-movement-date { color: #7E879F; font-weight: 600; }
.ca-match-category-movement-description { min-width: 0; color: #172042; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-match-category-movement-description small { display: inline-flex; margin-left: 5px; padding: 2px 5px; border-radius: 999px; background: #F1EEFF; color: #5B5CF0; font-size: var(--text-2xs); font-weight: 700; vertical-align: 1px; }
.ca-match-category-movement strong { color: #172042; font-size: var(--text-sm); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ca-match-category-amount { font-size: clamp(28px, 5vw, 38px); font-weight: 700; color: var(--ca-match-cat-color, #5B5CF0); }
.ca-match-category-pct { color: #7E879F; font-family: var(--family-font-body); font-size: var(--text-md); font-weight: 600; }
.ca-match-category-vs { color: #4A5170; font-family: var(--family-font-body); font-size: var(--text-md); }
.ca-match-category-vs strong { color: #172042; }
.ca-match-category-tag { margin-top: 4px; padding: 5px 12px; border-radius: 999px; background: color-mix(in srgb, var(--ca-match-cat-color) 14%, white); color: var(--ca-match-cat-color, #5B5CF0); font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.ca-match-category-breakdown { display: flex; gap: 24px; margin-top: 6px; }
.ca-match-category-breakdown div { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ca-match-category-breakdown span { color: #8B93A7; font-family: var(--family-font-body); font-size: var(--text-xs); }
.ca-match-category-breakdown strong { color: #172042; font-size: 14px; }
.ca-match-ai-box { width: 100%; margin-top: 10px; padding: 16px 18px; border-radius: 14px; background: #F1EEFF; text-align: left; }
.ca-match-ai-box.is-on-dark { background: rgba(124,103,255,.14); }
.ca-match-ai-box.is-final { background: rgba(245,196,81,.1); }
.ca-match-ai-box strong { display: block; margin-bottom: 6px; font-size: var(--text-xs); letter-spacing: .04em; color: #5B5CF0; }
.ca-match-ai-box.is-on-dark strong, .ca-match-ai-box.is-final strong { color: #F5C451; }
.ca-match-ai-box p { margin: 0; color: #3B4260; font-family: var(--family-font-body); font-size: var(--text-md); line-height: 1.55; }
.ca-match-ai-box.is-on-dark p, .ca-match-ai-box.is-final p { color: rgba(255,255,255,.85); }
.ca-match-ai-loading { display: inline-flex; align-items: center; gap: 6px; color: #8B93A7 !important; }
.ca-match-spin { width: 14px; height: 14px; animation: caMatchSpin 1s linear infinite; }
@keyframes caMatchSpin { to { transform: rotate(360deg); } }
.ca-match-watch-box { width: 100%; margin-top: 8px; padding: 12px 16px; border-radius: 12px; background: #FFF7E6; text-align: left; }
.ca-match-watch-box strong { display: block; margin-bottom: 4px; color: #B3711F; font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.ca-match-watch-box p { margin: 0; color: #7A5B22; font-family: var(--family-font-body); font-size: 13px; }

/* --- Round 4: versus --- */
.ca-match-versus { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; width: 100%; max-width: 560px; }
.ca-match-versus-side { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px 14px; border-radius: 18px; background: rgba(255,255,255,.75); border: 1px solid rgba(255,255,255,.5); backdrop-filter: blur(9px); color: #172042; }
.ca-match-versus-icon { font-size: 24px; }
.ca-match-versus-side strong { font-size: 12px; letter-spacing: .04em; color: #4A5170; }
.ca-match-versus-amount { font-size: clamp(17px, 2.6vw, 21px); font-weight: 700; }
.ca-match-versus-pct { color: #F5C451; font-weight: 700; font-size: 13px; }
.ca-match-versus-center { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 20px; font-weight: 800; color: #F5C451; }
.ca-match-versus-center span { font-size: 11px; font-weight: 700; color: rgba(255,255,255,.5); }
.ca-match-versus-trends { display: flex; gap: 26px; margin-top: 4px; padding: 10px 20px; border-radius: 14px; background: rgba(255,255,255,.75); }
.ca-match-versus-trends div { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.ca-match-versus-trends span { color: #172042; font-family: var(--family-font-body); font-size: 11px; font-weight: 600; }
.ca-match-versus-trends strong { color: #172042; font-family: var(--family-font-body); font-size: var(--text-sm); font-weight: 700; letter-spacing: .01em; }

/* --- Round 5: self benchmark --- */
.ca-match-self-compare { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; width: 100%; max-width: 520px; padding: 18px; border-radius: 16px; background: #fff; box-shadow: 0 6px 20px rgba(23,32,66,.05); }
.ca-match-self-compare > div { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ca-match-self-compare span { color: #8B93A7; font-family: var(--family-font-body); font-size: var(--text-xs); }
.ca-match-self-compare strong { color: #172042; font-size: 16px; font-weight: 700; }
.ca-match-self-compare .is-diff strong { color: #B3711F; }
.ca-match-benchmark-columns { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; width: 100%; max-width: 560px; }
.ca-match-benchmark-col { flex: 1 1 220px; padding: 14px 18px; border-radius: 14px; background: #fff; box-shadow: 0 6px 18px rgba(23,32,66,.05); text-align: left; }
.ca-match-benchmark-col strong { display: block; margin-bottom: 8px; color: #7E879F; font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.ca-match-benchmark-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; border-top: 1px solid #F0F2F7; font-family: var(--family-font-body); font-size: 13px; }
.ca-match-benchmark-row:first-of-type { border-top: 0; }
.ca-match-benchmark-row span { color: #172042; font-weight: 600; }
.ca-match-benchmark-row strong { font-variant-numeric: tabular-nums; }

/* --- Finale --- */
.ca-match-finale-header { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ca-match-trophy { font-size: 40px; filter: drop-shadow(0 6px 14px rgba(245,196,81,.4)); }
.ca-match-finale-header h2 { margin: 4px 0 0; font-size: clamp(20px, 3vw, 26px); font-weight: 700; }
.ca-match-finale-headline { margin-top: 6px; padding: 7px 18px; border-radius: 999px; background: rgba(245,196,81,.14); border: 1px solid rgba(245,196,81,.4); color: #F5C451; font-size: var(--text-sm); font-weight: 700; letter-spacing: .04em; }
.ca-match-finale-blocks { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; width: 100%; max-width: 720px; }
.ca-match-finale-block { padding: 16px 18px; border-radius: 16px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); text-align: left; }
.ca-match-finale-block strong { display: block; margin-bottom: 6px; font-size: 12px; letter-spacing: .02em; }
.ca-match-finale-block p { margin: 0; color: rgba(255,255,255,.78); font-family: var(--family-font-body); font-size: 13px; line-height: 1.5; }
.ca-match-closing-line { margin-top: 10px; font-weight: var(--font-bold); color: #F5C451; }

/* --- Ne parliamo? --- */
.ca-match-scene-talk {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 12% 12%, rgba(124,103,255,.24), transparent 26%),
    radial-gradient(circle at 89% 18%, rgba(69,104,255,.18), transparent 25%),
    linear-gradient(145deg, #090D2C 0%, #111640 46%, #171A4F 74%, #24205F 100%);
  color: #fff;
  gap: 28px;
  padding: 64px 56px 56px;
}
.ca-match-scene-talk::before,
.ca-match-scene-talk::after {
  position: absolute;
  z-index: -1;
  content: "";
  pointer-events: none;
}
.ca-match-scene-talk::before {
  inset: 9% auto auto -160px;
  width: 390px;
  aspect-ratio: 1;
  border: 1px solid rgba(171,156,255,.2);
  border-radius: 50%;
  box-shadow: 0 0 0 46px rgba(171,156,255,.045), 0 0 0 108px rgba(171,156,255,.025), 0 0 74px rgba(114,93,255,.3);
}
.ca-match-scene-talk::after {
  right: -90px;
  bottom: -108px;
  width: 300px;
  height: 180px;
  border: 1px solid rgba(137,119,255,.2);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  box-shadow: -105px -45px 0 -90px rgba(148,125,255,.75), -190px -12px 0 -177px rgba(143,183,255,.7), -60px -18px 0 25px rgba(138,115,255,.04);
}
.ca-match-talk-header { position: relative; max-width: 840px; }
.ca-match-talk-header-icon { display: grid; width: 66px; height: 66px; margin-bottom: 8px; place-items: center; border: 1px solid rgba(176,163,255,.48); border-radius: 50%; background: linear-gradient(145deg, rgba(157,137,255,.95), rgba(99,83,238,.92)); box-shadow: 0 14px 34px rgba(82,63,220,.4), inset 0 1px 1px rgba(255,255,255,.25); font-size: 30px; }
.ca-match-talk-header h2 { color: #fff; font-size: clamp(34px, 4vw, 44px); font-weight: 700; letter-spacing: -.03em; }
.ca-match-talk-header .ca-match-scene-subtitle { max-width: 820px; margin-top: 10px; color: rgba(255,255,255,.7) !important; font-size: 15px !important; line-height: 1.6; }
.ca-match-talk-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 22px; width: 100%; max-width: 980px; }
.ca-match-talk-card { display: flex; flex-direction: column; gap: 12px; min-height: 236px; padding: 26px 28px; border: 1px solid rgba(255,255,255,.12); border-radius: 22px; background: linear-gradient(145deg, rgba(255,255,255,.09), rgba(255,255,255,.035)); box-shadow: 0 20px 50px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.06); text-align: left; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.ca-match-talk-card:hover { transform: translateY(-2px); border-color: rgba(156,138,255,.58); box-shadow: 0 23px 56px rgba(0,0,0,.22), 0 0 25px rgba(124,103,255,.12); }
.ca-match-talk-icon-box { display: grid; width: 52px; height: 52px; place-items: center; border: 1px solid rgba(181,169,255,.36); border-radius: 16px; background: rgba(139,118,255,.18); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.ca-match-talk-icon { font-size: 25px; line-height: 1; }
.ca-match-talk-card strong { color: #fff; font-size: 18px; font-weight: 700; line-height: 1.3; }
.ca-match-talk-card p { flex: 1; margin: 0; color: rgba(255,255,255,.7); font-family: var(--family-font-body); font-size: 14px; line-height: 1.6; }
.ca-match-talk-cta-group { display: flex; flex-wrap: wrap; align-items: center; gap: 9px 18px; }
.ca-match-talk-cta { align-self: flex-start; padding: 0; border: 0; background: transparent; color: #9B83FF; font-family: var(--family-font-heading); font-size: var(--text-lg); font-weight: 700; cursor: pointer; }
.ca-match-talk-cta.is-secondary { color: #C9CCF2; }
.ca-match-talk-cta.is-neutral { color: #C9CCF2; }
#caMatchTalkForm { width: 100%; max-width: 480px; margin-top: 6px; }
#caMatchTalkForm.is-wide { max-width: 980px; }
.ca-match-inline-form { display: flex; flex-direction: column; gap: 12px; padding: 20px; border: 1px solid rgba(255,255,255,.12); border-radius: 18px; background: rgba(8,12,42,.62); box-shadow: 0 16px 34px rgba(0,0,0,.2); text-align: left; backdrop-filter: blur(12px); }
.ca-match-inline-form h3 { margin: 0; color: #fff; font-size: 15px; font-weight: 700; }
.ca-match-inline-form label { display: flex; flex-direction: column; gap: 5px; color: rgba(255,255,255,.82); font-family: var(--family-font-body); font-size: var(--text-sm); font-weight: 600; }
.ca-match-inline-form .form-control, .ca-match-inline-form .form-select { border: 1px solid rgba(255,255,255,.17); border-radius: 10px; background: rgba(255,255,255,.96); color: #172042; font-family: var(--family-font-body); font-size: var(--text-md); }
.ca-match-optional { color: rgba(255,255,255,.6); font-weight: 500; font-size: var(--text-xs); }
.ca-match-inline-form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.ca-match-inline-form-actions .ca-match-cta { margin-top: 0; padding: 10px 18px; font-size: 13px; }
.ca-match-form-success { padding: 14px 18px; border: 1px solid rgba(116,242,163,.28); border-radius: 12px; background: rgba(116,242,163,.12); color: #B8FFD0; font-family: var(--family-font-body); font-size: var(--text-md); font-weight: 600; }
.ca-match-form-success.is-warning { border-color: rgba(245,196,81,.32); background: rgba(245,196,81,.12); color: #FFE7A0; }
.ca-match-goal-funds-loading { flex-direction: row; align-items: center; justify-content: center; min-height: 112px; color: rgba(255,255,255,.78); font-family: var(--family-font-body); font-size: var(--text-md); }
.ca-match-goal-funds-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.ca-match-goal-funds-heading h3 { margin-bottom: 5px; font-size: 18px; }
.ca-match-goal-funds-heading p, .ca-match-goal-funds-empty p, .ca-match-form-error p { margin: 0; color: rgba(255,255,255,.65); font-family: var(--family-font-body); font-size: 13px; line-height: 1.55; }
.ca-match-goal-funds-heading > span { flex: 0 0 auto; padding: 9px 12px; border: 1px solid rgba(116,242,163,.2); border-radius: 10px; background: rgba(116,242,163,.08); color: rgba(255,255,255,.7); font-family: var(--family-font-body); font-size: 12px; }
.ca-match-goal-funds-heading > span strong { display: block; margin-top: 2px; color: #74F2A3; font-size: 15px; }
.ca-match-goal-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; min-width: 0; margin: 2px 0; padding: 0; border: 0; }
.ca-match-goal-choice { position: relative; display: flex; min-width: 0; overflow: hidden; flex-direction: column; border: 1px solid rgba(255,255,255,.13); border-radius: 15px; background: rgba(255,255,255,.055); cursor: pointer; transition: border-color .15s ease, background-color .15s ease, transform .15s ease; }
.ca-match-goal-choice:hover { transform: translateY(-1px); border-color: rgba(155,131,255,.55); }
.ca-match-goal-choice.is-selected { border-color: #9B83FF; background: rgba(124,103,255,.16); box-shadow: 0 0 0 2px rgba(155,131,255,.15); }
.ca-match-goal-choice:focus-within { outline: 2px solid #F5C451; outline-offset: 2px; }
.ca-match-goal-choice > input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ca-match-goal-choice-cover { display: block; height: 92px; overflow: hidden; background: #252A58; }
.ca-match-goal-choice-cover img { width: 100%; height: 100%; object-fit: cover; }
.ca-match-goal-choice-body { display: flex; min-width: 0; flex: 1; flex-direction: column; padding: 12px 13px 13px; }
.ca-match-goal-choice-body > strong { overflow: hidden; color: #fff; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.ca-match-goal-choice-amount { margin-top: 6px; color: rgba(255,255,255,.58); font-family: var(--family-font-body); font-size: var(--text-xs); }
.ca-match-goal-choice-amount b { color: rgba(255,255,255,.9); }
.ca-match-goal-choice-progress { height: 6px; margin: 10px 0 7px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.12); }
.ca-match-goal-choice-progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #74F2A3, #9B83FF); }
.ca-match-goal-choice-residual { color: #BFC4E6; font-family: var(--family-font-body); font-size: var(--text-xs); font-weight: 600; }
.ca-match-goal-funds-controls { width: min(100%, 440px); margin: 4px auto 0; }
.ca-match-goal-funds-controls > label { margin-bottom: 6px; }
.ca-match-form-inline-error { margin: 8px 0 0; padding: 9px 11px; border: 1px solid rgba(242,107,138,.3); border-radius: 9px; background: rgba(242,107,138,.1); color: #FFB1C3; font-family: var(--family-font-body); font-size: var(--text-sm); }
.ca-match-goal-funds-empty, .ca-match-form-error { align-items: flex-start; }
.ca-match-goal-funds-form button:disabled, .ca-match-goal-funds-form input:disabled { cursor: not-allowed; opacity: .55; }

/* --- Navigazione round --- */
.ca-match-footer-nav { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(255,255,255,.08); background: #0F1230; }
.ca-match-round-nav { display: flex; align-items: center; gap: 10px; }
.ca-match-round-dot { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; background: transparent; color: rgba(255,255,255,.55); font-family: var(--family-font-heading); font-size: 13px; font-weight: 700; cursor: pointer; transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
.ca-match-round-dot.is-done { border-color: rgba(116,242,163,.4); color: #74F2A3; }
.ca-match-round-dot.is-active { background: linear-gradient(135deg, #7C67FF, #5B5CF0); border-color: transparent; color: #fff; }
.ca-match-back-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border: 1px solid rgba(255,255,255,.18); border-radius: 10px; background: transparent; color: rgba(255,255,255,.75); font-family: var(--family-font-body); font-size: var(--text-sm); font-weight: 600; cursor: pointer; }
.ca-match-back-btn:hover { background: rgba(255,255,255,.08); }
.ca-match-back-btn svg { width: 14px; height: 14px; }

/* --- Responsive --- */
@media (max-width: 767.98px) {
  .ca-dashboard-hero-match.is-family { background-position: 64% center !important; }
  .ca-dashboard-hero-match.is-solo { background-position: 54% center !important; }
  .ca-dashboard-hero-match.is-family,
  .ca-dashboard-hero-match.is-solo {
    background-image: linear-gradient(180deg, rgba(5,10,40,.78) 0%, rgba(5,10,40,.55) 58%, rgba(5,10,40,.2) 100%), var(--ca-match-mobile-image) !important;
  }
  .ca-dashboard-hero-match.is-family { --ca-match-mobile-image: url("images/Match del mese/ducky-match-banner-famiglia.png"); }
  .ca-dashboard-hero-match.is-solo { --ca-match-mobile-image: url("images/Match del mese/ducky-match-banner-solo.png"); }
  .ca-match-scene { padding: 60px 20px 24px; gap: 16px; }
  .ca-match-scene-talk { padding: 58px 20px 28px; }
  .ca-match-talk-header-icon { width: 58px; height: 58px; font-size: 26px; }
  .ca-match-scene-round-1,
  .ca-match-scene-round-3,
  .ca-match-scene-round-4,
  .ca-match-scene-round-5,
  .ca-match-scene-finale-match { background-position: center top; }
  .ca-match-scene-round-2 { background-position: center; }
  .ca-match-highlights-grid, .ca-match-talk-grid, .ca-match-finale-blocks { grid-template-columns: 1fr; }
  .ca-match-talk-grid { gap: 16px; }
  .ca-match-talk-card { min-height: 0; padding: 20px; }
  .ca-match-talk-card strong { font-size: 16px; }
  .ca-match-talk-cta-group { align-items: flex-start; flex-direction: column; gap: 10px; }
  .ca-match-goal-funds-heading { flex-direction: column; gap: 12px; }
  .ca-match-goal-funds-heading > span { width: 100%; }
  .ca-match-goal-choices { grid-template-columns: 1fr; max-height: 390px; overflow-y: auto; padding: 2px; }
  .ca-match-goal-choice { display: grid; grid-template-columns: 104px minmax(0, 1fr); }
  .ca-match-goal-choice-cover { height: 100%; min-height: 112px; }
  .ca-match-goal-funds-controls { width: 100%; }
  .ca-match-category-layout { grid-template-columns: 1fr; }
  .ca-match-category-movements-list { max-height: 220px; }
  .ca-match-versus { grid-template-columns: 1fr; gap: 10px; }
  .ca-match-versus-center { flex-direction: row; gap: 10px; }
  .ca-match-premodal { padding: 56px 22px 32px; }
  .ca-match-avatars { gap: 16px; }
  .ca-match-cta { width: 100%; justify-content: center; padding: 15px 20px; }
  .ca-match-category-nav { flex-direction: column-reverse; }
  .ca-match-footer-nav { justify-content: flex-start; flex-wrap: nowrap; gap: 10px; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); }
  .ca-match-footer-nav::-webkit-scrollbar { display: none; }
  .ca-match-back-btn, .ca-match-round-nav { flex: 0 0 auto; }
  .ca-match-round-dot { width: 30px; height: 30px; font-size: 12px; }
  .ca-match-versus-trends { flex-wrap: wrap; justify-content: center; gap: 10px 20px; }
}
@media (max-width: 420px) {
  .ca-match-scoreboard { flex-direction: column; }
  .ca-match-score-item { width: 100%; }
  .ca-match-self-compare { display: grid; grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 380px) {
  .ca-match-category-movements { padding: 14px; }
  .ca-match-category-movement { grid-template-columns: 38px minmax(0, 1fr) auto; gap: 6px; padding: 9px 0; font-size: 11.5px; }
  .ca-match-category-movement-date, .ca-match-category-movement strong { font-size: 11px; }
  .ca-match-category-movement-description small { margin-left: 3px; padding: 1px 4px; font-size: 8.5px; }
}

/* --- Riduzione movimento --- */
@media (prefers-reduced-motion: reduce) {
  .ca-match-hero-spark, .ca-match-scene, .ca-match-countdown span, .ca-match-cta, .ca-match-close, .ca-match-round-dot {
    animation: none !important;
    transition: none !important;
  }
  .ca-match-backdrop { animation: none !important; opacity: 1 !important; }
  .ca-match-modal { animation: none !important; opacity: 1 !important; transform: translate(-50%, -50%) !important; }
  @media (max-width: 767.98px) {
    .ca-match-modal { transform: none !important; }
  }
}

/* Amministratore: anagrafica completa e stati leggibili anche su smartphone. */
.ca-admin-page .admin-page .ca-active-families-table > thead > tr > th:nth-child(1),
.ca-admin-page .admin-page .ca-active-families-table > tbody > tr > td:nth-child(1) { width: 15% !important; }
.ca-admin-page .admin-page .ca-active-families-table > thead > tr > th:nth-child(2),
.ca-admin-page .admin-page .ca-active-families-table > tbody > tr > td:nth-child(2) { width: 12% !important; }
.ca-admin-page .admin-page .ca-active-families-table > thead > tr > th:nth-child(3),
.ca-admin-page .admin-page .ca-active-families-table > tbody > tr > td:nth-child(3) { width: 20% !important; }
.ca-admin-page .admin-page .ca-active-families-table > thead > tr > th:nth-child(4),
.ca-admin-page .admin-page .ca-active-families-table > tbody > tr > td:nth-child(4) { width: 8% !important; }
.ca-admin-page .admin-page .ca-active-families-table > thead > tr > th:nth-child(5),
.ca-admin-page .admin-page .ca-active-families-table > tbody > tr > td:nth-child(5) { width: 13% !important; }
.ca-admin-page .admin-page .ca-active-families-table > thead > tr > th:nth-child(6),
.ca-admin-page .admin-page .ca-active-families-table > tbody > tr > td:nth-child(6) { width: 12% !important; }
.ca-admin-page .admin-page .ca-active-families-table > thead > tr > th:nth-child(7),
.ca-admin-page .admin-page .ca-active-families-table > tbody > tr > td:nth-child(7) { width: 8% !important; }
.ca-admin-page .admin-page .ca-active-families-table > thead > tr > th:nth-child(8),
.ca-admin-page .admin-page .ca-active-families-table > tbody > tr > td:nth-child(8) { width: 54px !important; }

@media (max-width: 767.98px) {
  .ca-admin-page .admin-page .ca-active-families-table > tbody > tr > td {
    grid-template-columns: 132px minmax(0, 1fr);
  }
  .ca-admin-page .admin-page .ca-active-families-table > tbody > tr > td:nth-child(2),
  .ca-admin-page .admin-page .ca-active-families-table > tbody > tr > td:nth-child(3),
  .ca-admin-page .admin-page .ca-active-families-table > tbody > tr > td:nth-child(6) {
    overflow: visible !important;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .ca-admin-page .admin-page .ca-families-table > tbody > tr > td[data-label="Stato"] {
    align-items: center;
  }
  .ca-admin-page .admin-page .ca-families-table .badge,
  .ca-admin-page .admin-page .ca-families-table .ca-status-pill {
    width: fit-content;
    min-height: 28px;
    justify-self: start;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
  }
  .ca-admin-page .admin-page .ca-active-families-table > tbody > tr > td:last-child .btn,
  .ca-admin-page .admin-page .ca-feedback-table > tbody > tr > td:last-child .btn {
    width: 34px;
    min-width: 34px;
    height: 34px;
    padding: 0;
  }
  .ca-admin-page .admin-page .ca-feedback-table .ca-budget-table-actions { gap: 8px; }
  .ca-family-modal .ca-family-members > div > div {
    flex-direction: column;
    align-items: flex-start;
  }
  .ca-family-modal .ca-family-members > div > div small {
    overflow: visible;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .ca-family-modal .ca-family-members time {
    display: block !important;
    grid-column: 2;
    color: #68728b;
    font-size: 11px;
    white-space: normal;
  }
}

/* Bilancio familiare — tab "Match del mese" (secondo ingresso al Match esistente) */
.ca-budget-match-panel { display: flex; flex-direction: column; gap: 24px; }

.ca-budget-match-hero {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 22px;
  min-height: 300px;
  padding: 30px 32px;
  border: 1px solid var(--ca-border);
  border-radius: 16px;
  background-color: #f7f7fd;
  background-image: url("images/Match del mese/hero-match-del-mese.png");
  background-size: cover;
  background-position: center;
  box-shadow: 0 4px 14px rgba(23, 32, 66, .05);
  color: #1c2340;
}

.ca-budget-match-hero-left { position: relative; z-index: 1; display: flex; flex: 1 1 35%; flex-direction: column; gap: 10px; min-width: 230px; }
.ca-budget-match-hero-title { margin: 0; font-family: var(--family-font-heading); font-size: clamp(var(--title-sm), 1.9vw, var(--title-md)); font-weight: var(--font-bold); letter-spacing: -.01em; color: #1c2340; }
.ca-budget-match-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  margin-top: 2px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--ca-primary-soft);
  color: var(--ca-primary);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
}
.ca-budget-match-hero-pill svg { width: 14px; height: 14px; }
.ca-budget-match-hero-desc { margin: 4px 0 0; max-width: 400px; color: #5b6685; font-size: var(--text-md); font-weight: var(--font-regular); line-height: 1.6; }

.ca-budget-match-stepper { display: flex; align-items: flex-start; gap: 0; margin: 16px 0 0; padding: 0; list-style: none; max-width: 400px; }
.ca-budget-match-stepper li { position: relative; display: flex; flex: 1 1 0; flex-direction: column; align-items: center; min-width: 0; }
.ca-budget-match-stepper li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 12px;
  left: calc(50% + 15px);
  width: calc(100% - 30px);
  height: 0;
  border-top: 1.5px dashed var(--ca-border);
}
.ca-budget-match-step-dot {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1.5px solid var(--ca-border);
  border-radius: 50%;
  background: #fff;
  color: #5b6685;
  font-size: 11px;
  font-weight: 700;
}
.ca-budget-match-step-label { margin-top: 6px; max-width: 68px; color: #6b7593; font-size: var(--text-xs); font-weight: var(--font-semibold); line-height: 1.25; text-align: center; }

.ca-budget-match-hero-center { position: relative; z-index: 1; display: flex; flex: 1 1 38%; align-items: flex-end; justify-content: center; min-width: 140px; padding-bottom: 10px; }
.ca-budget-match-countdown-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 24px;
  border: 1px solid rgba(79, 70, 255, .16);
  border-radius: 999px;
  background: #ece9ff;
  color: var(--ca-primary);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  box-shadow: 0 4px 14px rgba(79, 70, 255, .14);
}
.ca-budget-match-countdown-pill svg { width: 16px; height: 16px; }

.ca-budget-match-hero-right { position: relative; z-index: 1; display: flex; flex: 0 0 310px; }
.ca-budget-match-status {
  display: flex;
  width: 100%;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--ca-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 6px 18px rgba(23, 32, 66, .08);
}
.ca-budget-match-status-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ca-budget-match-status-head h3 { margin: 0; color: #1c2340; font-size: var(--text-xl); font-weight: var(--font-semibold); }
.ca-budget-match-status-head svg { width: 15px; height: 15px; color: #b3bad0; }
.ca-budget-match-status-sub { margin: 4px 0 16px; color: #8891ab; font-size: var(--text-xs); font-weight: 600; line-height: 1.4; }
.ca-budget-match-status-bullets { display: flex; flex: 1 1 auto; flex-direction: column; gap: 12px; margin: 0 0 18px; padding: 0; list-style: none; }
.ca-budget-match-status-bullets li { display: flex; align-items: center; gap: 10px; color: #3d4566; font-size: 12px; font-weight: var(--font-medium); line-height: 1.3; }
.ca-budget-match-status-bullets li svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  padding: 5px;
  border-radius: 8px;
  background: var(--ca-primary-soft);
  color: var(--ca-primary);
  box-sizing: content-box;
}
.ca-budget-match-status-footnote { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 10px; color: #8891ab; font-size: 11px; font-weight: var(--font-medium); }
.ca-budget-match-status-footnote svg { width: 12px; height: 12px; }
.ca-budget-match-status.is-available .ca-budget-match-status-footnote { color: var(--ca-primary); }

.ca-budget-match-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 14px;
  border: 0;
  border-radius: 10px;
  background: #e4e8f1;
  color: #8891ab;
  font-size: 13px;
  font-weight: 700;
  cursor: not-allowed;
}
.ca-budget-match-cta.is-primary {
  background: var(--ca-primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(79, 70, 255, .24);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.ca-budget-match-cta.is-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(79, 70, 255, .3); }

.ca-budget-match-lower { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; align-items: start; }

.ca-budget-match-history {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--ca-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(23, 32, 66, .04);
}
.ca-budget-match-history-head { display: flex; flex-direction: column; gap: 4px; }
.ca-budget-match-history h3 { margin: 0; font-family: var(--family-font-heading); font-size: var(--title-sm); font-weight: var(--font-semibold); color: #1c2340; }
.ca-budget-match-history-desc { margin: 0; color: #78839c; font-size: var(--text-sm); font-weight: var(--font-regular); line-height: 1.5; }
.ca-budget-match-history-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.ca-budget-match-history-loading { display: flex; align-items: center; justify-content: center; padding: 36px 0; color: #b3bad0; }
.ca-budget-match-history-loading svg { width: 22px; height: 22px; }

.ca-budget-match-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--ca-border);
  border-radius: 12px;
  background: #fff;
}
.ca-budget-match-card-image { position: relative; height: 96px; background-color: #eef0fa; background-size: cover; background-position: center; }
.ca-budget-match-card-badge { position: absolute; top: 10px; left: 10px; }
.ca-budget-match-card-body { display: flex; flex-direction: column; gap: 16px; padding: 16px; }
.ca-budget-match-card-body h3 { margin: 0; color: #1c2340; font-size: var(--text-xl); font-weight: var(--font-semibold); }
.ca-budget-match-card-recap { margin: 0; min-height: 32px; color: #8891ab; font-size: var(--text-xs); line-height: 1.45; }
.ca-budget-match-card-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ca-budget-match-card-metrics div { display: flex; flex-direction: column; gap: 3px; }
.ca-budget-match-card-metrics span { color: #b3bad0; font-size: var(--text-2xs); font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.ca-budget-match-card-metrics strong { color: #1c2340; font-size: var(--text-md); font-weight: var(--font-semibold); }
.ca-budget-match-card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--ca-primary);
  border-radius: 10px;
  background: #fff;
  color: var(--ca-primary);
  font-size: 12px;
  font-weight: 700;
  transition: background-color .15s ease;
}
.ca-budget-match-card-cta:hover { background: var(--ca-primary-soft); }

.ca-budget-match-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px 24px;
  border: 1px dashed var(--ca-border);
  border-radius: 12px;
  color: #8891ab;
  text-align: center;
}
.ca-budget-match-empty svg { width: 26px; height: 26px; opacity: .5; }
.ca-budget-match-empty h4 { margin: 4px 0 0; color: #3d4566; font-size: var(--text-lg); font-weight: var(--font-semibold); }
.ca-budget-match-empty p { margin: 0; max-width: 300px; font-size: 12px; line-height: 1.5; }

.ca-budget-match-stats { display: flex; flex-direction: column; gap: 12px; }
.ca-budget-match-stat { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--ca-border); border-radius: 14px; background: #fff; }
.ca-budget-match-stat-icon { display: flex; flex: 0 0 auto; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 12px; }
.ca-budget-match-stat-icon svg { width: 18px; height: 18px; }
.ca-budget-match-stat-icon.is-amber { background: #fff4de; color: #f1a624; }
.ca-budget-match-stat-icon.is-blue { background: #eaf2ff; color: #356df3; }
.ca-budget-match-stat-icon.is-lilac { background: var(--ca-primary-soft); color: var(--ca-primary); }
.ca-budget-match-stat-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ca-budget-match-stat-label { color: #8891ab; font-size: 11px; font-weight: var(--font-medium); }
.ca-budget-match-stat-text strong { font-family: var(--family-font-heading); font-size: 20px; font-weight: var(--font-bold); color: #1c2340; }

.ca-budget-match-admin-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 18px;
  border: 1px dashed #c9c1ff;
  border-radius: 14px;
  background: #fbfaff;
}
.ca-budget-match-admin-copy { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.ca-budget-match-admin-icon { display: grid; flex: 0 0 auto; width: 36px; height: 36px; place-items: center; border-radius: 10px; background: var(--ca-primary-soft); color: var(--ca-primary); }
.ca-budget-match-admin-icon svg { width: 18px; height: 18px; }
.ca-budget-match-admin-copy h3 { margin: 0; color: #3d4566; font-size: var(--text-md); font-weight: var(--font-semibold); }
.ca-budget-match-admin-copy p { margin: 3px 0 0; color: #73809d; font-size: var(--text-xs); line-height: 1.45; }
.ca-budget-match-admin-button { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 9px 14px; border: 1px solid var(--ca-primary); border-radius: 10px; background: #fff; color: var(--ca-primary); font-size: 12px; font-weight: 700; transition: background-color .15s ease, color .15s ease; }
.ca-budget-match-admin-button:hover:not(:disabled) { background: var(--ca-primary); color: #fff; }
.ca-budget-match-admin-button:disabled { border-color: var(--ca-border); background: #f5f6fa; color: #9ba4bb; cursor: not-allowed; }
.ca-budget-match-admin-button svg { width: 15px; height: 15px; }

/* ---------- Limiti di spesa ---------- */
.ca-budget-limits-panel { display: flex; flex-direction: column; gap: 24px; }

.ca-budget-limits-intro {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 24px 26px;
  border: 1px solid var(--ca-border);
  border-radius: 16px;
  background: #f7f7fd;
  box-shadow: 0 4px 14px rgba(23, 32, 66, .05);
}
.ca-budget-limits-intro-icon {
  display: grid;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 13px;
  background: var(--ca-primary-soft);
  color: var(--ca-primary);
}
.ca-budget-limits-intro-icon svg { width: 22px; height: 22px; }
.ca-budget-limits-intro-copy h2 { margin: 2px 0 6px; font-family: var(--family-font-heading); font-size: var(--title-sm); font-weight: var(--font-bold); letter-spacing: -.01em; color: #1c2340; }
.ca-budget-limits-intro-copy p { margin: 0; color: #5b6685; font-size: var(--text-md); line-height: 1.6; }
.ca-budget-limits-intro-copy strong { color: #1c2340; font-weight: var(--font-semibold); }

.ca-budget-limits-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--ca-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(23, 32, 66, .04);
}
.ca-budget-limits-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ca-budget-limits-head h3 { margin: 0; font-family: var(--family-font-heading); font-size: var(--title-sm); font-weight: var(--font-semibold); color: #1c2340; }
.ca-budget-limits-head p { margin: 3px 0 0; color: #78839c; font-size: var(--text-sm); }
.ca-budget-limits-add { display: inline-flex; align-items: center; gap: 7px; }
.ca-budget-limits-add svg { width: 15px; height: 15px; }

.ca-budget-limits-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.ca-budget-limits-loading { display: flex; align-items: center; justify-content: center; padding: 40px 0; color: #b3bad0; }
.ca-budget-limits-loading svg { width: 22px; height: 22px; }

.ca-budget-limits-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 44px 24px;
  border: 1px dashed var(--ca-border);
  border-radius: 14px;
  color: #8891ab;
  text-align: center;
}
.ca-budget-limits-empty svg { width: 26px; height: 26px; opacity: .5; }
.ca-budget-limits-empty h4 { margin: 4px 0 0; color: #3d4566; font-size: var(--text-lg); font-weight: var(--font-semibold); }
.ca-budget-limits-empty p { margin: 0 0 6px; max-width: 320px; font-size: var(--text-sm); line-height: 1.5; }
.ca-budget-limits-empty .btn { display: inline-flex; align-items: center; gap: 7px; }
.ca-budget-limits-empty .btn svg { width: 15px; height: 15px; opacity: 1; }

.ca-budget-limit-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--ca-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(23, 32, 66, .04);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.ca-budget-limit-card[role="button"] { cursor: pointer; text-align: left; }
.ca-budget-limit-card[role="button"]:hover { border-color: #ccd6f5; box-shadow: 0 6px 18px rgba(23, 32, 66, .08); }
.ca-budget-limit-card[role="button"]:focus-visible { outline: 2px solid var(--ca-primary); outline-offset: 2px; }
.ca-budget-limit-card-head { display: flex; align-items: flex-start; gap: 12px; }
.ca-budget-limit-icon { display: grid; flex: 0 0 auto; width: 40px; height: 40px; place-items: center; border-radius: 12px; }
.ca-budget-limit-icon svg { width: 19px; height: 19px; }
.ca-budget-limit-card-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.ca-budget-limit-card-title strong { color: #1c2340; font-size: var(--text-lg); font-weight: var(--font-semibold); }
.ca-budget-limit-card-title span { color: #8891ab; font-size: var(--text-xs); font-weight: var(--font-medium); white-space: nowrap; }
.ca-budget-limit-card-actions { display: flex; flex: 0 0 auto; gap: 6px; }
.ca-budget-limit-icon-btn {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--ca-border);
  border-radius: 9px;
  background: #fff;
  color: #6b7593;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.ca-budget-limit-icon-btn svg { width: 15px; height: 15px; }
.ca-budget-limit-icon-btn:hover { border-color: #c7d0e3; color: #43506a; background: #f7f8fc; }
.ca-budget-limit-icon-btn.is-danger:hover { border-color: #f0b6c4; color: #e8506e; background: #fdf1f4; }

.ca-budget-limit-progress { display: flex; flex-direction: column; gap: 7px; }
.ca-budget-limit-progress-track { height: 8px; border-radius: 999px; background: #eef0f7; overflow: hidden; }
.ca-budget-limit-progress-track span { display: block; height: 100%; border-radius: 999px; background: #5ab970; transition: width var(--ca-motion-ui, 260ms) var(--ca-motion-enter, ease-out); }
.ca-budget-limit-progress-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ca-budget-limit-progress-meta span { color: #6b7593; font-size: var(--text-xs); font-weight: var(--font-medium); }
.ca-budget-limit-progress-meta strong { color: #1c2340; font-size: var(--text-md); font-weight: var(--font-bold); }
.ca-budget-limit-hint { margin: 0; color: #8891ab; font-size: var(--text-xs); line-height: 1.45; }

.ca-budget-limit-card.is-warn .ca-budget-limit-progress-track span { background: #f1a624; }
.ca-budget-limit-card.is-warn .ca-budget-limit-progress-meta strong { color: #c67d0d; }
.ca-budget-limit-card.is-over { border-color: #f4c2ce; box-shadow: 0 2px 8px rgba(232, 80, 110, .1); }
.ca-budget-limit-card.is-over .ca-budget-limit-progress-track span { background: #e8506e; }
.ca-budget-limit-card.is-over .ca-budget-limit-progress-meta strong { color: #d63a58; }

.ca-budget-limit-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--ca-primary);
  border-radius: 14px;
  background: #fbfaff;
  box-shadow: 0 6px 18px rgba(79, 70, 255, .1);
}
.ca-budget-limit-form.is-empty { border-color: var(--ca-border); background: #f7f8fc; box-shadow: none; }
.ca-budget-limit-form.is-empty p { margin: 0; color: #5b6685; font-size: var(--text-sm); line-height: 1.5; }
.ca-budget-limit-form-head { display: flex; align-items: center; gap: 10px; }
.ca-budget-limit-form-icon { display: grid; flex: 0 0 auto; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: var(--ca-primary-soft); color: var(--ca-primary); }
.ca-budget-limit-form-icon svg { width: 16px; height: 16px; }
.ca-budget-limit-form-head h3 { margin: 0; font-family: var(--family-font-heading); font-size: var(--text-xl); font-weight: var(--font-semibold); color: #1c2340; }
.ca-budget-limit-form-cat { display: flex; align-items: center; gap: 10px; }
.ca-budget-limit-form-cat strong { color: #1c2340; font-size: var(--text-md); font-weight: var(--font-semibold); }
.ca-budget-limit-field { display: flex; flex-direction: column; gap: 6px; color: #43506a; font-size: var(--text-sm); font-weight: var(--font-semibold); }
.ca-budget-limit-field .form-control, .ca-budget-limit-field .form-select { font-weight: var(--font-regular); }
.ca-budget-limit-form-preview { margin: 0; color: #6b7593; font-size: var(--text-xs); line-height: 1.5; }
.ca-budget-limit-form-error { display: flex; align-items: flex-start; gap: 7px; margin: 0; color: #d63a58; font-size: var(--text-xs); font-weight: var(--font-medium); line-height: 1.45; }
.ca-budget-limit-form-error svg { flex: 0 0 auto; width: 14px; height: 14px; margin-top: 1px; }
.ca-budget-limit-form-actions { display: flex; justify-content: flex-end; gap: 10px; }

@media (max-width: 575.98px) {
  .ca-budget-limits-intro { padding: 20px; gap: 12px; flex-wrap: wrap; }
  .ca-budget-limits-intro-icon { width: 40px; height: 40px; }
  .ca-budget-limits-intro-copy { flex: 1 1 100%; }
  .ca-budget-limits-main { padding: 16px; }
  .ca-budget-limits-list { grid-template-columns: minmax(0, 1fr); }
  .ca-budget-limits-add { width: 100%; justify-content: center; }
}

@media (max-width: 991.98px) {
  .ca-budget-match-hero { flex-wrap: wrap; }
  .ca-budget-match-hero-left { flex: 1 1 100%; }
  .ca-budget-match-hero-center { order: 3; flex: 1 1 auto; justify-content: flex-start; padding-top: 12px; padding-bottom: 0; }
  .ca-budget-match-hero-right { flex: 1 1 260px; }
  .ca-budget-match-lower { grid-template-columns: minmax(0, 1fr); }
  .ca-budget-match-stats { flex-direction: row; flex-wrap: wrap; }
  .ca-budget-match-stat { flex: 1 1 200px; }
}

@media (max-width: 767.98px) {
  .ca-budget-match-hero { min-height: 0; padding: 22px 20px; }
  .ca-budget-match-hero-right { flex-basis: 100%; }
  .ca-budget-match-stepper { max-width: 100%; }
  .ca-budget-match-step-label { max-width: 56px; font-size: 9px; }
  .ca-budget-match-history { padding: 16px; }
  .ca-budget-match-history-grid { grid-template-columns: 1fr; }
  .ca-budget-match-stats { flex-direction: column; }
  .ca-budget-match-admin-control { align-items: flex-start; flex-direction: column; gap: 14px; }
  .ca-budget-match-admin-button { width: 100%; }
}

/* ==========================================================================
   PageHeader — shared structural header for non-Dashboard pages
   (Calendario, Piano pasti, Cose da fare, Bilancio, Assistente, Impostazioni,
   Aggiornamenti). Dashboard keeps its own hero and does not use this.
   ========================================================================== */

.ca-page-header {
  position: relative;
  z-index: 5;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 118px;
  margin-bottom: 28px;
  padding: 22px 32px;
  border: 1px solid rgba(228, 232, 241, .65);
  border-radius: 20px;
  background: linear-gradient(120deg, #ffffff 0%, #f9f9ff 45%, #f5f7ff 100%);
  box-shadow: 0 1px 0 rgba(15, 23, 42, .02);
}
.ca-page-header::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 8%;
  z-index: 0;
  width: 190px;
  height: 190px;
  background: radial-gradient(circle, rgba(124, 103, 255, .07), transparent 72%);
  transform: translateY(-50%);
  pointer-events: none;
}
.ca-page-header.is-plain::before { opacity: .8; }

.ca-page-header-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  border-radius: 20px;
  background-image: var(--ca-page-header-bg-desktop);
  background-position: var(--ca-page-header-bg-position, right center);
  background-repeat: no-repeat;
  background-size: cover;
  opacity: .95;
  -webkit-mask-image: linear-gradient(to left, rgba(0, 0, 0, .85) 40%, transparent 82%);
  mask-image: linear-gradient(to left, rgba(0, 0, 0, .85) 40%, transparent 82%);
}

.ca-page-header.is-motion .ca-page-header-bg { animation: caPageHeaderDrift 46s ease-in-out infinite alternate; }
@keyframes caPageHeaderDrift {
  from { transform: translateX(0); }
  to { transform: translateX(-12px); }
}

.ca-page-header-main {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
}
.ca-page-header-copy { min-width: 0; flex: 1 1 300px; }
.ca-page-header-copy-row { display: flex; align-items: center; gap: 14px; }
.ca-page-header-icon-badge {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--ca-primary-soft);
  color: var(--ca-primary);
  font-size: 22px;
}
.ca-page-header-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  color: #5b6685;
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
}
.ca-page-header-back:hover { color: var(--ca-primary); }
.ca-page-header-back i { font-size: 14px; }
.ca-page-header-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--ca-primary-soft);
  color: var(--ca-primary);
  font-size: var(--text-xs);
  font-weight: 700;
}
.ca-page-header-title {
  margin: 0;
  font-family: var(--family-font-heading);
  font-size: clamp(20px, 1.9vw, 25px);
  font-weight: var(--font-bold);
  color: var(--ca-text);
  letter-spacing: -.01em;
}
.ca-page-header-desc {
  display: -webkit-box;
  overflow: hidden;
  max-width: 520px;
  margin: 5px 0 0;
  color: #5b6685;
  font-family: var(--family-font-body);
  font-size: var(--text-md);
  font-weight: var(--font-regular);
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.ca-page-header-secondary { margin-top: 8px; }
.ca-page-header-controls-group { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ca-page-header-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

/* Per-page accent tints, used mainly where no illustration asset exists yet. */
.ca-page-header--tasks::before { background: radial-gradient(circle, rgba(47, 174, 102, .09), transparent 72%); }
.ca-page-header--meals::before { background: radial-gradient(circle, rgba(245, 150, 60, .09), transparent 72%); }
.ca-page-header--assistant::before { background: radial-gradient(circle, rgba(79, 70, 255, .1), transparent 72%); }
.ca-page-header--settings::before { opacity: .5; }
.ca-page-header--updates::before { background: radial-gradient(circle, rgba(245, 196, 81, .12), transparent 72%); }
.ca-page-header--categories::before { background: radial-gradient(circle, rgba(228, 90, 178, .08), transparent 72%); }

@media (max-width: 1199.98px) {
  .ca-page-header { padding: 20px 26px; }
}

@media (max-width: 767.98px) {
  .ca-page-header { flex-direction: column; align-items: flex-start; min-height: 0; padding: 20px; border-radius: 16px; }
  .ca-page-header-main { flex-direction: column; align-items: flex-start; gap: 14px; }
  .ca-page-header-desc { max-width: none; -webkit-line-clamp: 3; }
  .ca-page-header-actions { align-items: stretch; width: 100%; }
  .ca-page-header-actions > * { width: 100%; }
  .ca-page-header-bg {
    opacity: .4;
    -webkit-mask-image: linear-gradient(to left, rgba(0, 0, 0, .7) 20%, transparent 60%);
    mask-image: linear-gradient(to left, rgba(0, 0, 0, .7) 20%, transparent 60%);
  }
}

/* ==========================================================================
   Onboarding — mandatory first-run wizard (Benvenuto / Funzionalità / Riepilogo)
   ========================================================================== */

body.ca-onboarding-body { min-height: 100vh; background: #fff; }
.ca-onboarding-root {
  min-height: 100vh;
  --ca-ob-primary: #6d5ce6;
  --ca-ob-primary-dark: #5a48d6;
  --ca-ob-primary-soft: #efeaff;
  --ca-ob-primary-softer: #f8f6ff;
}
.ca-onboarding-loading { display: flex; align-items: center; justify-content: center; min-height: 100vh; }

.ca-onboarding-topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 16px 56px 14px;
  background: #fff;
  border-bottom: 1px solid rgba(228, 232, 241, .6);
}
.ca-onboarding-brand { display: flex; align-items: center; gap: 12px; font-family: var(--family-font-heading); font-size: 20px; font-weight: var(--font-bold); color: var(--ca-text); justify-self: start; }
.ca-onboarding-brand .ca-logo-mark svg, .ca-onboarding-brand .ca-logo-mark i { width: 22px; height: 22px; font-size: 22px; }

.ca-onboarding-stepper { display: flex; align-items: flex-start; gap: 0; justify-self: center; }
.ca-onboarding-step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 24px; }
.ca-onboarding-step:not(:last-child)::after { content: ""; position: absolute; top: 13px; left: 100%; width: 48px; height: 1.5px; background: var(--ca-border); }
.ca-onboarding-step.is-done:not(:last-child)::after { background: var(--ca-ob-primary); }
.ca-onboarding-step-dot { display: grid; place-items: center; width: 26px; height: 26px; border: 1.5px solid var(--ca-border); border-radius: 50%; background: #fff; color: #8891ab; font-size: 10px; font-weight: 700; }
.ca-onboarding-step.is-active .ca-onboarding-step-dot { border-color: var(--ca-ob-primary); background: var(--ca-ob-primary); color: #fff; box-shadow: 0 0 0 4px var(--ca-ob-primary-soft); }
.ca-onboarding-step.is-done .ca-onboarding-step-dot { border-color: var(--ca-ob-primary); background: var(--ca-ob-primary-soft); color: var(--ca-ob-primary); }
.ca-onboarding-step.is-done .ca-onboarding-step-dot svg { width: 12px; height: 12px; }
.ca-onboarding-step-label { color: #8891ab; font-size: 12px; font-weight: var(--font-medium); }
.ca-onboarding-step.is-active .ca-onboarding-step-label { color: var(--ca-ob-primary); font-weight: var(--font-semibold); }
.ca-onboarding-step.is-active .ca-onboarding-step-label::after { content: ""; display: block; margin-top: 6px; height: 2px; background: var(--ca-ob-primary); border-radius: 2px; }

.ca-onboarding-content { position: relative; max-width: 1611px; margin: 0 auto; padding: 48px 48px 88px; }
.ca-onboarding-layout { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 48px; }
.ca-onboarding-main { flex: 1 1 auto; min-width: 0; max-width: 640px; }
.ca-onboarding-side { position: sticky; top: 32px; flex: 0 0 430px; max-width: 430px; }

.ca-onboarding-hero-bg {
  position: absolute;
  top: 0;
  right: 0;
  width: 52%;
  height: 820px;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  mask-image: linear-gradient(to right, #000 0%, #000 82%, transparent 99%);
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 82%, transparent 99%);
}
.ca-onboarding-hb-ring { position: absolute; border-radius: 50%; border: 1.4px solid rgba(109, 92, 230, .2); }
.ca-onboarding-hb-ring.is-1 { top: -160px; right: -140px; width: 560px; height: 560px; }
.ca-onboarding-hb-ring.is-2 { top: 420px; right: 160px; width: 380px; height: 380px; border-color: rgba(109, 92, 230, .14); }
.ca-onboarding-hb-blob { position: absolute; border-radius: 50%; filter: blur(20px); }
.ca-onboarding-hb-blob.is-1 { bottom: -140px; right: -110px; width: 560px; height: 560px; filter: blur(60px); opacity: .32; background: radial-gradient(circle, #a996f5, transparent 70%); }
.ca-onboarding-hb-blob.is-2 { top: 170px; left: 50px; width: 96px; height: 96px; opacity: .5; background: radial-gradient(circle, #6d5ce6, transparent 70%); }
.ca-onboarding-hb-blob.is-3 { top: 520px; right: 50px; width: 110px; height: 110px; opacity: .42; background: radial-gradient(circle, #7c6df2, transparent 70%); }
.ca-onboarding-hb-dot { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: #7ed957; box-shadow: 0 0 0 6px rgba(126, 217, 87, .15); }
.ca-onboarding-hb-dot.is-accent { top: 470px; left: 270px; }
.ca-onboarding-hb-grid { position: absolute; background-image: radial-gradient(circle, rgba(109, 92, 230, .4) 1.6px, transparent 1.8px); background-size: 18px 18px; }
.ca-onboarding-hb-grid.is-1 { top: 230px; left: 10px; width: 90px; height: 70px; }
.ca-onboarding-hb-grid.is-2 { bottom: 70px; right: 30px; width: 72px; height: 54px; background-size: 16px 16px; }

.ca-onboarding-title { margin: 0 0 14px; font-family: var(--family-font-heading); font-size: clamp(30px, 3vw, 40px); font-weight: 800; color: var(--ca-text); letter-spacing: -.01em; line-height: 1.15; }
.ca-onboarding-desc { margin: 0 0 26px; max-width: 480px; color: #5b6685; font-size: var(--text-lg); line-height: 1.65; }

.ca-onboarding-infobar { display: flex; align-items: center; gap: 12px; margin-bottom: 30px; padding: 15px 20px; border-radius: 14px; background: var(--ca-ob-primary-soft); color: #3d3675; font-size: var(--text-md); font-weight: 600; }
.ca-onboarding-infobar svg { flex: 0 0 auto; width: 18px; height: 18px; color: var(--ca-ob-primary); }

.ca-onboarding-welcome-actions { max-width: 240px; margin: 0 0 40px; }

.ca-onboarding-section-title { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-family: var(--family-font-heading); font-size: 16px; font-weight: var(--font-bold); color: var(--ca-text); }
.ca-onboarding-section-lock svg { width: 14px; height: 14px; color: #8891ab; }
.ca-onboarding-section-sub { margin: 0 0 20px; color: #8891ab; font-size: var(--text-sm); }

.ca-onboarding-info-cards { display: flex; flex-direction: column; gap: 14px; margin-bottom: 26px; }
.ca-onboarding-info-card { display: flex; align-items: center; gap: 18px; padding: 22px 24px; border: 1px solid rgba(109, 92, 230, .10); border-radius: 18px; background: #fff; box-shadow: 0 3px 14px rgba(23, 32, 66, .045); }
.ca-onboarding-info-icon { display: flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 16px; background: var(--ca-ob-primary-soft); color: var(--ca-ob-primary); }
.ca-onboarding-info-icon svg { width: 23px; height: 23px; }
.ca-onboarding-info-icon.is-blue { background: #e8f1ff; color: #2563eb; }
.ca-onboarding-info-icon.is-green { background: #e7f8ef; color: #1f9d55; }
.ca-onboarding-info-card strong { display: block; margin-bottom: 3px; color: var(--ca-text); font-size: var(--text-lg); font-weight: 700; }
.ca-onboarding-info-card p { margin: 0; color: #8891ab; font-size: var(--text-sm); }

.ca-onboarding-note { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; background: #f7f8fc; color: #5b6685; font-size: var(--text-sm); font-weight: 600; }
.ca-onboarding-note svg { flex: 0 0 auto; width: 15px; height: 15px; color: #8891ab; }
.ca-onboarding-note.is-inline { margin: 14px 0; }
.ca-onboarding-note.is-brand { margin-top: 22px; padding: 14px 18px; background: var(--ca-ob-primary-soft); color: #443d70; }
.ca-onboarding-note.is-brand svg { color: var(--ca-ob-primary); }

.ca-onboarding-side-card { position: relative; z-index: 1; padding: 34px 30px; border: 1px solid rgba(109, 92, 230, .12); border-radius: 22px; background: #fff; box-shadow: 0 20px 48px rgba(46, 32, 110, .12); }
.ca-onboarding-side-card h3 { margin: 0; font-family: var(--family-font-heading); font-size: var(--title-sm); font-weight: var(--font-semibold); color: var(--ca-text); }
.ca-onboarding-side-sub { margin: 8px 0 22px; color: #8891ab; font-size: var(--text-sm); font-weight: 600; }

.ca-onboarding-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px 22px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--ca-ob-primary), var(--ca-ob-primary-dark));
  color: #fff;
  box-shadow: 0 14px 28px rgba(109, 92, 230, .32);
  transition: transform .15s ease;
}
.ca-onboarding-cta:hover:not(:disabled) { transform: translateY(-1px); }
.ca-onboarding-cta:disabled { opacity: .7; cursor: not-allowed; }
.ca-onboarding-cta svg { width: 16px; height: 16px; }
.ca-onboarding-exit { display: block; width: 100%; margin-top: 16px; border: 0; background: transparent; color: #9691b8; font-size: 12px; font-weight: var(--font-medium); text-align: center; }
.ca-onboarding-exit:hover { color: var(--ca-ob-primary); text-decoration: underline; }

.ca-onboarding-module-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
.ca-onboarding-module-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 20px; border: 1px solid var(--ca-border); border-radius: 18px; background: #fff; }
.ca-onboarding-module-card.is-locked { background: #fff; }
.ca-onboarding-module-check { position: absolute; top: 16px; right: 16px; display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: #1f9d55; color: #fff; }
.ca-onboarding-module-check svg { width: 12px; height: 12px; }
.ca-onboarding-module-icon { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 14px; }
.ca-onboarding-module-icon svg { width: 21px; height: 21px; }
.ca-onboarding-module-card strong { color: var(--ca-text); font-size: var(--text-lg); font-weight: var(--font-semibold); }
.ca-onboarding-module-card p { min-height: 32px; margin: 0; color: #8891ab; font-size: 12px; line-height: 1.4; }
.ca-onboarding-module-badge { display: inline-flex; align-self: center; align-items: center; gap: 6px; margin-top: 6px; padding: 5px 13px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.ca-onboarding-module-badge svg { width: 12px; height: 12px; }
.ca-onboarding-module-badge.is-violet { background: #efeaff; color: #6d5ce6; }
.ca-onboarding-module-badge.is-blue { background: #e8f1ff; color: #2563eb; }

.ca-onboarding-module-card-toggle { padding-top: 20px; }
.ca-onboarding-toggle { position: absolute; top: 20px; right: 20px; display: block; cursor: pointer; }
.ca-onboarding-toggle input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; appearance: none; -webkit-appearance: none; cursor: pointer; }
.ca-onboarding-toggle-track { position: relative; display: block; width: 44px; height: 25px; background: #e4e8f1; border-radius: 999px; overflow: hidden; transition: background-color .15s ease; }
.ca-onboarding-toggle-thumb { position: absolute; top: 3px; left: 3px; display: block; width: 19px; height: 19px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(15, 23, 42, .2); transition: transform .15s ease; }
.ca-onboarding-toggle input:checked + .ca-onboarding-toggle-track { background: var(--ca-ob-primary); }
.ca-onboarding-toggle input:checked + .ca-onboarding-toggle-track .ca-onboarding-toggle-thumb { transform: translateX(19px); }
.ca-onboarding-module-status { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; color: #8891ab; font-size: var(--text-xs); font-weight: var(--font-semibold); }
.ca-onboarding-module-status svg { width: 14px; height: 14px; }
.ca-onboarding-module-status.is-on { color: #1f9d55; }
.ca-onboarding-module-card-toggle.is-active { border-color: rgba(109, 92, 230, .35); background: #fff; box-shadow: 0 4px 16px rgba(109, 92, 230, .10); }

.ca-onboarding-layout-features .ca-onboarding-main { max-width: none; }
.ca-onboarding-layout-features .ca-onboarding-desc { max-width: none; }
.ca-onboarding-layout-features .ca-onboarding-module-grid { gap: 18px; margin-bottom: 40px; }
.ca-onboarding-layout-features .ca-onboarding-module-card { padding: 18px; border-radius: 20px; gap: 8px; box-shadow: 0 2px 12px rgba(23, 32, 66, .04); }
.ca-onboarding-layout-features .ca-onboarding-module-card-toggle { padding-top: 18px; }
.ca-onboarding-layout-features .ca-onboarding-module-icon { width: 46px; height: 46px; border-radius: 14px; }
.ca-onboarding-layout-features .ca-onboarding-module-icon svg { width: 21px; height: 21px; }
.ca-onboarding-layout-features .ca-onboarding-module-card strong { font-size: var(--text-lg); }
.ca-onboarding-layout-features .ca-onboarding-module-card p { min-height: 32px; font-size: 13px; line-height: 1.45; }
.ca-onboarding-layout-features .ca-onboarding-toggle { top: 18px; right: 18px; }
.ca-onboarding-layout-features .ca-onboarding-module-check { top: 18px; right: 18px; }

.ca-onboarding-module-icon.is-violet { background: #efeaff; color: #6d5ce6; }
.ca-onboarding-module-icon.is-green { background: #e7f8ef; color: #1f9d55; }
.ca-onboarding-module-icon.is-slate { background: #eef1f6; color: #5b6685; }
.ca-onboarding-module-icon.is-amber { background: #fff4e0; color: #c2790a; }
.ca-onboarding-module-icon.is-blue { background: #e8f1ff; color: #2563eb; }
.ca-onboarding-module-icon.is-indigo { background: #eceafd; color: #4f46e5; }
.ca-onboarding-module-icon.is-pink { background: #ffe9f2; color: #db2777; }

.ca-onboarding-summary-list { display: flex; flex-direction: column; gap: 4px; margin: 0 0 8px; padding: 0; list-style: none; }
.ca-onboarding-summary-list-optional { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--ca-border); }
.ca-onboarding-summary-list li { display: flex; align-items: center; gap: 12px; padding: 11px 0; color: #8891ab; font-size: var(--text-md); font-weight: var(--font-semibold); }
.ca-onboarding-summary-list li.is-active { color: var(--ca-text); }
.ca-onboarding-summary-icon { display: flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: #f4f5fb; color: #8891ab; }
.ca-onboarding-summary-icon svg { width: 16px; height: 16px; }
.ca-onboarding-summary-icon.is-violet { background: #efeaff; color: #6d5ce6; }
.ca-onboarding-summary-icon.is-green { background: #e7f8ef; color: #1f9d55; }
.ca-onboarding-summary-icon.is-slate { background: #eef1f6; color: #5b6685; }
.ca-onboarding-summary-icon.is-amber { background: #fff4e0; color: #c2790a; }
.ca-onboarding-summary-icon.is-blue { background: #e8f1ff; color: #2563eb; }
.ca-onboarding-summary-icon.is-indigo { background: #eceafd; color: #4f46e5; }
.ca-onboarding-summary-icon.is-pink { background: #ffe9f2; color: #db2777; }
.ca-onboarding-summary-list li span:nth-child(2) { flex: 1 1 auto; }
.ca-onboarding-summary-check-badge { display: flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: #1f9d55; color: #fff; }
.ca-onboarding-summary-check-badge svg { width: 11px; height: 11px; }
.ca-onboarding-summary-check { flex: 0 0 auto; width: 16px; height: 16px; color: #1f9d55; }
.ca-onboarding-summary-off { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--ca-border); border-radius: 50%; }

.ca-onboarding-error { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; padding: 12px 16px; border-radius: 12px; background: #fff2f2; color: #c0392b; font-size: 13px; font-weight: var(--font-semibold); }
.ca-onboarding-error svg { width: 16px; height: 16px; }

@media (max-width: 1199.98px) {
  .ca-onboarding-content { padding: 32px 28px 64px; }
  .ca-onboarding-module-grid { grid-template-columns: repeat(2, 1fr); }
  .ca-onboarding-main { max-width: 54%; }
  .ca-onboarding-side { flex: 0 0 360px; max-width: 360px; }
  .ca-onboarding-hero-bg { width: 46%; height: 640px; }
}

@media (max-width: 991.98px) {
  .ca-onboarding-layout { flex-direction: column; }
  .ca-onboarding-main { max-width: none; }
  .ca-onboarding-side { position: static; width: 100%; flex-basis: auto; max-width: none; }
  .ca-onboarding-topbar { display: flex; flex-wrap: wrap; justify-content: flex-start; padding: 16px 24px; }
  .ca-onboarding-stepper { justify-self: auto; }
  .ca-onboarding-step { padding: 0 16px; }
  .ca-onboarding-step:not(:last-child)::after { width: 28px; }
  .ca-onboarding-hero-bg { display: none; }
}

@media (max-width: 575.98px) {
  .ca-onboarding-content { padding: 24px 16px 48px; }
  .ca-onboarding-topbar { flex-direction: column; align-items: flex-start; gap: 16px; padding: 16px; }
  .ca-onboarding-stepper { width: 100%; justify-content: space-between; }
  .ca-onboarding-step { padding: 0 4px; }
  .ca-onboarding-step-label { display: none; }
  .ca-onboarding-step:not(:last-child)::after { left: calc(100% + 4px); width: calc(100vw / 3 - 60px); }
  .ca-onboarding-module-grid { grid-template-columns: 1fr; }
  .ca-onboarding-welcome-actions { max-width: none; }
}

/* Impostazioni > Funzionalità — reuses the onboarding icon-tone palette */
.ca-settings-feature-intro { margin: 0 0 20px; color: #5b6685; font-size: 13px; }
.ca-settings-feature-group-title { margin: 0 0 12px; color: #8891ab; font-family: var(--family-font-heading); font-size: var(--text-sm); font-weight: var(--font-semibold); text-transform: uppercase; letter-spacing: .03em; }
.ca-settings-feature-grid { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.ca-settings-feature-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--ca-border); border-radius: 14px; background: #fff; }
.ca-settings-feature-card.is-locked { background: #fafbfd; }
.ca-settings-feature-card.is-active { background: var(--ca-primary-soft); border-color: var(--ca-primary); }
.ca-settings-feature-icon { display: flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px; }
.ca-settings-feature-icon svg { width: 19px; height: 19px; }
.ca-settings-feature-copy { flex: 1 1 auto; min-width: 0; }
.ca-settings-feature-copy strong { display: block; color: var(--ca-text); font-size: var(--text-lg); font-weight: 700; }
.ca-settings-feature-copy p { margin: 2px 0 0; color: #8891ab; font-size: 12px; }
.ca-settings-feature-status { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: #f1f3f8; color: #5b6685; font-size: 11px; font-weight: 700; }
.ca-settings-feature-status svg { width: 12px; height: 12px; }
.ca-settings-feature-toggle { position: relative; flex: 0 0 auto; display: block; cursor: pointer; }
.ca-settings-feature-toggle input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; appearance: none; -webkit-appearance: none; cursor: pointer; }
.ca-settings-feature-track { position: relative; display: block; width: 40px; height: 24px; background: #e4e8f1; border-radius: 999px; overflow: hidden; cursor: pointer; transition: background-color .15s ease; }
.ca-settings-feature-thumb { position: absolute; top: 3px; left: 3px; display: block; width: 18px; height: 18px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(15, 23, 42, .2); transition: transform .15s ease; }
.ca-settings-feature-toggle input:checked + .ca-settings-feature-track { background: #6d5ce6; }
.ca-settings-feature-toggle input:checked + .ca-settings-feature-track .ca-settings-feature-thumb { transform: translateX(16px); }
.ca-settings-feature-toggle input:disabled + .ca-settings-feature-track { cursor: not-allowed; opacity: .6; }

.ca-settings-feature-icon.is-violet { background: #efeaff; color: #6d5ce6; }
.ca-settings-feature-icon.is-green { background: #e7f8ef; color: #1f9d55; }
.ca-settings-feature-icon.is-slate { background: #eef1f6; color: #5b6685; }
.ca-settings-feature-icon.is-amber { background: #fff4e0; color: #c2790a; }
.ca-settings-feature-icon.is-blue { background: #e8f1ff; color: #2563eb; }
.ca-settings-feature-icon.is-indigo { background: #eceafd; color: #4f46e5; }
.ca-settings-feature-icon.is-pink { background: #ffe9f2; color: #db2777; }

/* Rifiniture mobile — Calendario, Bilancio e Impostazioni */
.ca-quick-action-icon-feedback { background: #f1eafe; color: #7654d6; }
.ca-quick-sheet.is-open .ca-quick-action-row:nth-child(4) { animation-delay: 105ms; }

@media (max-width: 767.98px) {
  /* Nei PageHeader verticali, il flex-basis desktop da 300px non deve riservare spazio vuoto. */
  .ca-page-header-copy { flex: 0 0 auto; width: 100%; }

  /* L'header del calendario resta proporzionato anche quando il pensiero è breve. */
  .ca-page-header--calendar {
    display: block;
    height: auto !important;
    min-height: 0;
    align-self: flex-start;
    padding: 16px 18px;
    margin-bottom: 20px;
  }
  .ca-page-header--calendar .ca-page-header-main { gap: 8px; }
  .ca-page-header--calendar .ca-page-header-secondary { margin-top: 2px; }
  .ca-page-header--calendar .ca-calendar-daily-copy { margin-top: 6px; }

  /* Impostazioni: l'header termina subito dopo la descrizione. */
  .ca-page-header--settings {
    display: block;
    height: auto !important;
    min-height: 0;
    align-self: flex-start;
    padding: 16px;
    margin-bottom: 20px;
  }
  .ca-page-header--settings .ca-page-header-main { gap: 8px; }
  .ca-page-header--settings .ca-page-header-back { margin-bottom: 5px; }
  .ca-page-header--settings .ca-page-header-desc { -webkit-line-clamp: 2; }

  /* Bilancio: mantiene il selettore vicino al periodo ed evita CTA duplicate con il FAB. */
  .ca-page-header--budget {
    display: block;
    height: auto !important;
    min-height: 0;
    align-self: flex-start;
    padding: 16px;
    margin-bottom: 20px;
  }
  .ca-page-header--budget .ca-page-header-main { gap: 9px; }
  .ca-page-header--budget .ca-page-header-actions { gap: 8px; }
  .ca-page-header--budget .ca-budget-new-desktop { display: none; }
  .ca-page-header--budget .ca-budget-month-control { margin-top: 0; }

  /* Il grafico del saldo non può uscire dalla card. */
  .ca-budget-balance-card { overflow: hidden; isolation: isolate; }

  /* Una carta alla volta: leggibile e scorribile. */
  .ca-budget-credit-section .ca-credit-cards-slide,
  .ca-budget-credit-section .ca-credit-cards-carousel.has-peek .ca-credit-cards-slide {
    flex: 0 0 100% !important;
    width: 100%;
    min-width: 100%;
  }
  .ca-budget-lower-grid.is-balanced { grid-template-columns: minmax(0, 1fr); }

  /* Movimenti: titolo e ricerca a tutta larghezza, azioni affiancate sotto. */
  .ca-budget-movements-header { display: block; padding: 20px 18px 14px; text-align: left; }
  .ca-budget-movements-heading { align-items: center; margin-bottom: 12px; }
  .ca-budget-movements-header .card-title { display: flex; width: auto; min-height: auto; justify-content: flex-start; margin: 0; text-align: left; }
  .ca-budget-movements-title-row { justify-content: flex-start; }
  .ca-budget-movements-toolbar-actions { display: flex; width: 100%; flex-direction: column; align-items: stretch; gap: 16px; }
  .ca-budget-movements-toolbar-actions .ca-budget-movements-search { box-sizing: border-box; width: 100%; max-width: none; min-width: 0; margin: 0; }
  .ca-budget-movements-filters-toggle-wrap { width: 100%; margin: 0; padding: 0 0 4px; }
  .ca-budget-movements-filters-toggle { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; }
  .ca-budget-movements-filters-toggle svg { width: 15px; height: 15px; }
  .ca-budget-movements-advanced .ca-budget-movements-quickbar { padding-bottom: 12px; }
  .ca-budget-movements-header .ca-budget-movements-advanced { gap: 10px; }
  .ca-budget-table-v2 { min-width: 600px; }
  .ca-budget-table-v2 thead th:nth-child(1) { width: 10%; }
  .ca-budget-table-v2 thead th:nth-child(2) { width: 15%; white-space: nowrap; }
  .ca-budget-table-v2 thead th:nth-child(3) { width: 30%; }
  .ca-budget-table-v2 thead th:nth-child(4) { width: 28%; }
  .ca-budget-table-v2 thead th:nth-child(5) { width: 17%; }
  .ca-budget-category-card .ca-budget-category-row { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .ca-budget-category-card .ca-budget-category-percentage { display: none; }

  /* Risparmio: titolo lineare, CTA completa e separatore esattamente fra le due card. */
  .ca-savings-hero-heading { justify-content: space-between; gap: 12px; }
  .ca-savings-hero-heading > svg { display: none; }
  .ca-savings-add-funds-btn { margin-left: 0; white-space: nowrap; }
  .ca-savings-hero-tiles { grid-template-columns: 1fr; gap: 12px; }
  .ca-savings-hero-add {
    position: static;
    justify-self: center;
    order: 0;
    margin: -6px auto;
    transform: none;
  }

  /* Match: sullo smartphone lo sfondo resta pulito e le statistiche sono compatte. */
  .ca-budget-match-hero {
    background-image: linear-gradient(135deg, #ffffff 0%, #f2eeff 58%, #e8e1ff 100%) !important;
  }
  .ca-budget-match-stat { flex: 0 0 auto; min-height: 0; gap: 10px; padding: 12px 14px; border-radius: 12px; }
  .ca-budget-match-stat-icon { width: 34px; height: 34px; border-radius: 10px; }
  .ca-budget-match-stat-text strong { font-size: 17px; }
}

@media (max-width: 575.98px) {
  .ca-page-header--calendar .ca-page-header-bg { opacity: .28; }
  .ca-page-header--budget .ca-page-header-bg { opacity: .22; }
  .ca-savings-hero-main { padding: 24px 18px; }

  /* Le card bloccate seguono la stessa lettura verticale indicata per le funzionalità base. */
  .ca-settings-feature-card.is-locked {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: start;
    gap: 10px 12px;
  }
  .ca-settings-feature-card.is-locked .ca-settings-feature-copy { padding-top: 3px; }
  .ca-settings-feature-card.is-locked .ca-settings-feature-status { grid-column: 1 / -1; justify-self: start; }
}

/* ===================================================================
 * Invito attivazione notifiche push (Dashboard) — assets/casa-anitra-live.js
 * =================================================================== */
.ca-push-prompt {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 240ms var(--ca-motion-enter, ease-out);
}
.ca-push-prompt.is-open { opacity: 1; }

.ca-push-prompt-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 20, 43, .52);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.ca-push-prompt-card {
  position: relative;
  width: 100%;
  max-width: 396px;
  padding: 34px 30px 26px;
  border: 1px solid rgba(79, 70, 255, .1);
  border-radius: 24px;
  background:
    radial-gradient(120% 90% at 50% -10%, #f3f1ff 0%, rgba(243, 241, 255, 0) 62%),
    #ffffff;
  box-shadow: 0 28px 70px -18px rgba(23, 24, 74, .4), 0 8px 24px -12px rgba(23, 24, 74, .2);
  text-align: center;
  transform: translateY(14px) scale(.96);
  opacity: 0;
  transition: transform 300ms var(--ca-motion-enter, cubic-bezier(.16, 1, .3, 1)), opacity 240ms ease-out;
}
.ca-push-prompt.is-open .ca-push-prompt-card { transform: translateY(0) scale(1); opacity: 1; }

.ca-push-prompt-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #9aa2bd;
  transition: background-color .15s ease, color .15s ease;
}
.ca-push-prompt-close:hover { background: #f0f1f8; color: #4b5573; }
.ca-push-prompt-close svg { width: 17px; height: 17px; }

.ca-push-prompt-visual {
  position: relative;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin: 4px auto 20px;
}
.ca-push-prompt-bell {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(150deg, #6a63ff 0%, #4f46ff 55%, #3f37e0 100%);
  box-shadow: 0 14px 30px -8px rgba(79, 70, 255, .55);
  animation: ca-push-bell-swing 2.6s var(--ca-motion-enter, ease-in-out) 1.1s 2;
  transform-origin: 50% 12%;
}
.ca-push-prompt-bell svg { width: 28px; height: 28px; }
.ca-push-prompt-ring {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 26px;
  border: 2px solid rgba(79, 70, 255, .4);
  animation: ca-push-ring 2.4s var(--ca-motion-enter, ease-out) infinite;
}
.ca-push-prompt-ring.is-delayed { animation-delay: 1.2s; }

.ca-push-prompt-card h2 {
  margin: 0 0 8px;
  font-family: var(--family-font-heading);
  font-size: 22px;
  font-weight: var(--font-bold, 700);
  letter-spacing: -.01em;
  color: #10172f;
}
.ca-push-prompt-copy {
  margin: 0 auto;
  max-width: 300px;
  color: #5b6685;
  font-size: var(--text-md);
  line-height: 1.6;
}
.ca-push-prompt-copy strong { color: #2b2f52; font-weight: var(--font-semibold, 600); }

.ca-push-prompt-error {
  margin: 12px 0 0;
  max-height: 0;
  overflow: hidden;
  color: #d63a58;
  font-size: var(--text-xs);
  font-weight: var(--font-medium, 500);
  line-height: 1.45;
  opacity: 0;
  transition: opacity .18s ease, max-height .18s ease, margin .18s ease;
}
.ca-push-prompt-error.is-visible { max-height: 80px; margin-top: 14px; opacity: 1; }

.ca-push-prompt-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}
.ca-push-prompt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1 1 0;
  min-height: 46px;
  padding: 12px 16px;
  border: 0;
  border-radius: 13px;
  font-size: var(--text-md);
  font-weight: var(--font-semibold, 600);
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
}
.ca-push-prompt-btn svg { width: 17px; height: 17px; }
.ca-push-prompt-btn.is-ghost {
  flex: 0 0 auto;
  padding-inline: 18px;
  color: #5b6685;
  background: #f1f2f8;
}
.ca-push-prompt-btn.is-ghost:hover { background: #e7e8f2; color: #3d4566; }
.ca-push-prompt-btn.is-primary {
  color: #fff;
  background: linear-gradient(135deg, #5b53ff 0%, #4f46ff 100%);
  box-shadow: 0 12px 26px -10px rgba(79, 70, 255, .6);
}
.ca-push-prompt-btn.is-primary:hover { transform: translateY(-1px); box-shadow: 0 16px 30px -10px rgba(79, 70, 255, .7); }
.ca-push-prompt-btn.is-primary:disabled { opacity: .75; transform: none; box-shadow: none; cursor: progress; }
.ca-push-prompt-btn .spinner-border { width: 16px; height: 16px; border-width: 2px; }

.ca-push-prompt-foot {
  display: block;
  margin-top: 14px;
  color: #a2abbd;
  font-size: var(--text-xs);
}

@keyframes ca-push-ring {
  0% { transform: scale(.78); opacity: .7; }
  70% { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}
@keyframes ca-push-bell-swing {
  0%, 100% { transform: rotate(0); }
  10% { transform: rotate(14deg); }
  20% { transform: rotate(-11deg); }
  30% { transform: rotate(8deg); }
  40% { transform: rotate(-5deg); }
  50% { transform: rotate(0); }
}

@media (max-width: 400px) {
  .ca-push-prompt-actions { flex-direction: column-reverse; }
  .ca-push-prompt-btn.is-ghost { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .ca-push-prompt, .ca-push-prompt-card { transition: opacity .12s linear; }
  .ca-push-prompt-card { transform: none; }
  .ca-push-prompt-ring, .ca-push-prompt-bell { animation: none; }
  .ca-push-prompt-ring { opacity: .35; }
}

/* ============================================================
   Casa / domotica (casa.html — assets/casa-home.js)
   ============================================================ */
.ca-home-page { display: flex; flex-direction: column; gap: 26px; }
/* Pagina Casa: l'header non ha margine proprio, la spaziatura la dà il gap del contenitore */
.ca-home-page .ca-page-header { margin-bottom: 0; }

/* --- Blocchi di sezione --------------------------------------------- */
.ca-home-block { display: flex; flex-direction: column; gap: 14px; }
.ca-home-block-title { margin: 0; font-family: "Poppins", "Inter", sans-serif; font-size: .8rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #8a93a7; }
.ca-home-empty-line { margin: 0; color: #5b6478; font-size: .9rem; }

/* --- Griglia principale dispositivi -------------------------------- */
.ca-home-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.ca-home-grid > .card { margin: 0; height: 100%; }
.ca-home-grid .ca-home-room { grid-column: 1 / -1; }
@media (max-width: 991.98px) { .ca-home-grid { grid-template-columns: 1fr; } }

/* --- Attività recente -------------------------------------------- */
.ca-home-activity .card-body { padding: clamp(16px, 2.6vw, 24px); }
.ca-home-activity-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ca-home-activity-row { display: flex; align-items: center; gap: 14px; padding: 12px 4px; border-bottom: 1px solid #eef1f7; }
.ca-home-activity-row:last-child { border-bottom: 0; }
.ca-home-activity-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 11px; background: #eef1f7; color: #667085; }
.ca-home-activity-icon.is-amber { background: #fff2dc; color: #b26a00; }
.ca-home-activity-icon.is-green { background: #e3f6ec; color: #1f9e6b; }
.ca-home-activity-icon.is-blue { background: #e6efff; color: #356df3; }
.ca-home-activity-icon.is-violet { background: #efeaff; color: #6b4df3; }
.ca-home-activity-icon.is-slate { background: #eef1f7; color: #667085; }
.ca-home-activity-copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 auto; }
.ca-home-activity-copy strong { font-size: .9rem; font-weight: 600; color: var(--ca-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ca-home-activity-copy span { font-size: .78rem; color: #8a93a7; text-transform: capitalize; }
.ca-home-activity-time { font-size: .78rem; color: #98a2b3; flex: 0 0 auto; }
.ca-home-activity-empty { padding: 12px 4px; color: #8a93a7; font-size: .88rem; }
.ca-home-room .card-body { padding: clamp(18px, 3vw, 28px); }
.ca-home-room-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 18px; }
.ca-home-room-title { display: flex; align-items: center; gap: 10px; margin: 0; font-family: "Poppins", "Inter", sans-serif; font-size: 1.15rem; font-weight: 700; color: var(--ca-text); }
.ca-home-agent { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border: 1px solid var(--ca-border); border-radius: 14px; background: #fff; }
.ca-home-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; background: #c7ccd8; box-shadow: 0 0 0 4px rgba(199, 204, 216, .25); }
.ca-home-dot.is-online { background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .2); }
.ca-home-dot.is-off { background: #f04438; box-shadow: 0 0 0 4px rgba(240, 68, 56, .18); }
.ca-home-device-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.ca-home-device { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border: 1px solid var(--ca-border); border-radius: 16px; background: #fff; }
.ca-home-device-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ca-home-device-copy strong { color: var(--ca-text); font-weight: 600; }
.ca-home-device-note { font-size: .82rem; color: #5b6478; display: flex; align-items: center; gap: 5px; }
.ca-home-device-note.is-pending { color: #b26a00; }
.ca-home-device-note.is-error { color: #d92d20; }
.ca-home-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ca-home-automation { margin-top: 4px; }
.ca-home-automation-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 14px; }
@media (max-width: 575.98px) {
  .ca-home-room-head { flex-direction: column; align-items: flex-start; }
  .ca-home-agent { width: 100%; }
}

/* ==========================================================================
   Home personalizzabile - griglia widget (sotto la Hero) + pagina gestione
   ========================================================================== */
.ca-home-widgets {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
  margin-bottom: 20px;
}
.ca-home-widgets > .ca-home-widget {
  grid-column: span 12;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.ca-home-widgets > .ca-home-widget > .card { flex: 1 1 auto; margin: 0; width: 100%; }
@media (min-width: 992px) {
  .ca-home-widgets { grid-auto-flow: row dense; }
  .ca-home-widgets > .ca-home-widget { grid-column: span var(--w-span, 12); }
}
@media (min-width: 768px) and (max-width: 991.98px) {
  .ca-home-widgets > .ca-home-widget { grid-column: span 12; }
}

/* Ingresso "Personalizza la tua Home": barra sottile in cima alla griglia */
.ca-home-customize {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  margin-bottom: 16px;
  border: 1px solid var(--ca-border, #e4e8f1);
  border-radius: 16px;
  background: #fff;
  color: var(--ca-text, #14213d);
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(31, 44, 72, .04);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.ca-home-customize:hover,
.ca-home-customize:focus-visible {
  border-color: #c5d3f2;
  box-shadow: 0 10px 24px rgba(47, 111, 237, .10);
  outline: none;
}
.ca-home-customize:hover .ca-home-customize-arrow { transform: translateX(3px); }
.ca-home-customize-icon {
  display: grid; place-items: center;
  width: 38px; height: 38px; flex: 0 0 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, #eef3ff, #e2ebff);
  color: var(--ca-primary, #356df3);
}
.ca-home-customize-icon svg { width: 18px; height: 18px; }
.ca-home-customize-copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 auto; }
.ca-home-customize-copy strong { font-size: 14px; font-weight: 700; }
.ca-home-customize-copy span { font-size: 12.5px; color: #667085; }
.ca-home-customize-arrow {
  display: grid; place-items: center; flex: 0 0 auto;
  color: #98a2b3;
  transition: transform .16s ease;
}
.ca-home-customize-arrow svg { width: 17px; height: 17px; }
@media (max-width: 575.98px) {
  .ca-home-customize { padding: 11px 14px; gap: 12px; }
  .ca-home-customize-copy span { display: none; }
}

/* Widget "Spese per categoria": ciambella + lista affiancate quando c'e spazio */
.ca-dashboard-categories-layout { display: grid; gap: 18px; }
@media (min-width: 768px) {
  .ca-dashboard-categories-layout { grid-template-columns: 158px 1fr; align-items: center; }
}
@media (min-width: 1400px) {
  .ca-dashboard-categories-layout { grid-template-columns: 176px 1fr; }
}

/* Ciambella SVG snella (widget Spese per categoria) */
.ca-home-donut {
  position: relative;
  width: 150px; height: 150px;
  margin: 0 auto;
  flex: 0 0 auto;
}
@media (min-width: 1400px) { .ca-home-donut { width: 168px; height: 168px; } }
@media (max-width: 767.98px) { .ca-home-donut { margin-bottom: 6px; } }
.ca-home-donut-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.ca-home-donut-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  text-align: center;
  pointer-events: none;
}
.ca-home-donut-center span { font-size: 8px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: #9aa4b8; }
.ca-home-donut-center strong { font-size: 15px; font-weight: 800; color: var(--ca-text, #14213d); line-height: 1.15; white-space: nowrap; }
.ca-home-donut-center small { max-width: 88px; font-size: 9px; color: #9aa4b8; line-height: 1.3; }

/* Widget "Progetti di risparmio" */
.ca-dashboard-savings-list { display: flex; flex-direction: column; gap: 16px; }
.ca-dashboard-savings-row {
  display: grid;
  gap: 7px;
  padding: 12px 14px;
  border: 1px solid var(--ca-border, #e4e8f1);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, background-color .15s ease;
}
.ca-dashboard-savings-row:hover { border-color: #cfd8ea; background: #f8fafd; }
.ca-dashboard-savings-row-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ca-dashboard-savings-row-head strong { font-size: 14px; font-weight: 600; color: var(--ca-text, #14213d); min-width: 0; }
.ca-dashboard-savings-row-head span { font-size: 12px; font-weight: 700; color: #356df3; flex: 0 0 auto; }
.ca-dashboard-savings-bar { display: block; height: 7px; border-radius: 999px; background: #eef1f7; overflow: hidden; }
.ca-dashboard-savings-bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #56c596, #2f9e77); }
.ca-dashboard-savings-row-foot { font-size: 12px; font-weight: 600; color: #475467; }
.ca-dashboard-savings-row-foot span { color: #98a2b3; font-weight: 500; }
.ca-dashboard-savings-more {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 14px;
  font-size: 12px; font-weight: 700; color: #356df3;
}
.ca-dashboard-savings-more:hover { color: #2452c9; }
.ca-dashboard-savings-more i { font-size: 12px; }

/* Widget "Aggiornamenti" — card blu con trama leggera, testo su fondo scuro */
body[data-dashboard-hero] .ca-dashboard-updates-card,
.ca-dashboard-updates-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.14) !important;
  background:
    radial-gradient(130% 90% at 100% 0%, rgba(255,255,255,.18), rgba(255,255,255,0) 55%),
    radial-gradient(120% 120% at 0% 100%, rgba(10,20,70,.30), rgba(10,20,70,0) 60%),
    linear-gradient(135deg, #3f5be0 0%, #4f6bf6 46%, #6f8bff 100%);
  box-shadow: 0 16px 34px rgba(47, 82, 190, .28);
}
/* trama sotto: puntini/scintille chiarissime */
.ca-dashboard-updates-card::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.16) 1px, transparent 1.4px);
  background-size: 22px 22px;
  opacity: .5;
  pointer-events: none;
}
/* alone morbido in alto a destra */
.ca-dashboard-updates-card::after {
  content: "";
  position: absolute;
  top: -70px; right: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.22), rgba(255,255,255,0) 70%);
  pointer-events: none;
}
.ca-dashboard-updates-card > * { position: relative; z-index: 1; }
.ca-dashboard-updates-card .ca-dashboard-section-title span,
.ca-dashboard-updates-card .card-title { color: #fff; }
body[data-dashboard-hero] .ca-dashboard-updates-card .ca-dashboard-card-link { color: rgba(255,255,255,.92); }
.ca-dashboard-updates-card .ca-dashboard-card-link:hover { color: #fff; }

.ca-dashboard-updates-list { display: flex; flex-direction: column; gap: 8px; }
.ca-dashboard-updates-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.14);
  text-decoration: none;
  color: #fff;
  transition: background-color .15s ease, transform .15s ease;
}
.ca-dashboard-updates-row:hover { background: rgba(255,255,255,.17); transform: translateX(2px); }
.ca-dashboard-updates-row-icon {
  display: grid; place-items: center;
  width: 32px; height: 32px; flex: 0 0 32px;
  border-radius: 9px;
  background: rgba(255,255,255,.18);
  color: #fff;
}
.ca-dashboard-updates-row-icon svg { width: 15px; height: 15px; }
.ca-dashboard-updates-row strong { font-size: 13px; font-weight: 600; color: #fff; }
.ca-dashboard-updates-row small { font-size: 11.5px; color: rgba(255,255,255,.68); }

.ca-dashboard-updates-skeleton { display: flex; flex-direction: column; gap: 8px; padding: 2px 0; }
.ca-dashboard-updates-skeleton span {
  height: 42px; border-radius: 12px;
  background: linear-gradient(90deg, rgba(255,255,255,.10) 25%, rgba(255,255,255,.22) 37%, rgba(255,255,255,.10) 63%);
  background-size: 400% 100%;
  animation: caHomeShimmer 1.4s ease infinite;
}
@keyframes caHomeShimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .ca-dashboard-updates-skeleton span { animation: none; } }

/* Empty state su fondo blu */
.ca-dashboard-updates-card .ca-empty-state { color: rgba(255,255,255,.9); }
.ca-dashboard-updates-card .ca-empty-state .fw-bold { color: #fff; }
.ca-dashboard-updates-card .ca-empty-state .text-gray-600 { color: rgba(255,255,255,.72) !important; }
.ca-dashboard-updates-card .ca-empty-state .symbol-label {
  background: rgba(255,255,255,.16) !important;
}
.ca-dashboard-updates-card .ca-empty-state .symbol-label i { color: #fff !important; }

/* -------------------------------------------------------------------------- */
/* Pagina "Personalizza la tua Home"                                          */
/* -------------------------------------------------------------------------- */
.ca-home-manage { display: flex; flex-direction: column; gap: 20px; padding-bottom: 96px; }

/* Transizione morbida Home <-> Personalizza */
@keyframes caPageSlideForward { to { opacity: 0; transform: translateX(-26px); } }
@keyframes caPageSlideBack { to { opacity: 0; transform: translateX(26px); } }
@keyframes caHomeManageEnter { from { opacity: 0; transform: translateX(28px); } }
#caPage.ca-page-slide-forward { animation: caPageSlideForward .19s ease forwards; }
#caPage.ca-page-slide-back { animation: caPageSlideBack .19s ease forwards; }
.ca-home-manage { animation: caHomeManageEnter .3s cubic-bezier(.32, .72, 0, 1) both; }
.ca-home-manage.is-leaving { animation: caHomeManageEnter .24s cubic-bezier(.32, .72, 0, 1) reverse forwards; }
@media (prefers-reduced-motion: reduce) {
  #caPage.ca-page-slide-forward, #caPage.ca-page-slide-back,
  .ca-home-manage, .ca-home-manage.is-leaving { animation: none; }
}
.ca-home-manage-card .card-body { padding: 22px 24px; }
.ca-home-manage-subtitle { margin: 0 0 14px; font-size: 15px; font-weight: 700; color: var(--ca-text, #14213d); }
.ca-home-manage-hint { margin: -6px 0 16px; font-size: 13px; color: #667085; }

/* Anteprima della Home: mini-dashboard schematica (glifi, non tabella) */
.ca-home-preview {
  border: 1px solid var(--ca-border, #e4e8f1);
  border-radius: 18px;
  background: radial-gradient(120% 140% at 0% 0%, #eef3ff 0%, #f7f9fd 46%, #f4f6fb 100%);
  padding: 16px;
}
.ca-home-preview-hero {
  position: relative;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(115deg, #4f6bf6, #7ea2ff 55%, #a9c6ff);
  margin-bottom: 12px;
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; gap: 6px;
  padding: 0 16px;
}
.ca-home-preview-hero span { display: block; height: 7px; border-radius: 999px; background: rgba(255,255,255,.55); }
.ca-home-preview-hero span:first-child { width: 42%; height: 9px; background: rgba(255,255,255,.85); }
.ca-home-preview-hero span:last-child { width: 26%; }
.ca-home-preview-cta {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 11px; margin-bottom: 10px;
  border: 1px solid #dbe3f2; border-radius: 9px;
  background: #fff;
}
.ca-home-preview-cta svg { width: 12px; height: 12px; color: #4f6bf6; flex: 0 0 auto; }
.ca-home-preview-cta .ca-hpv-title { font-size: 10px; font-weight: 700; color: #3a4664; }
.ca-home-preview-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 10px; }
.ca-home-preview-block {
  grid-column: span var(--w-span, 12);
  display: flex; flex-direction: column; gap: 9px;
  min-height: 84px; padding: 11px 12px;
  border-radius: 12px; background: #fff;
  border: 1px solid #e6ebf4;
  box-shadow: 0 4px 12px rgba(31, 44, 72, .04);
}
.ca-home-preview-block-head { display: flex; align-items: center; gap: 7px; }
.ca-home-preview-block-head svg { width: 13px; height: 13px; color: #4f6bf6; flex: 0 0 auto; }
.ca-hpv-title { font-size: 10.5px; font-weight: 700; color: #3a4664; letter-spacing: .1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ca-home-preview-block-body { display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; justify-content: center; }
.ca-home-preview-block.is-manage {
  border-style: dashed; border-color: #c9d3e6; background: transparent; box-shadow: none;
  align-items: flex-start; justify-content: center; min-height: 84px;
}
.ca-home-preview-block.is-manage .ca-home-preview-block-head svg { color: #98a2b3; }
.ca-home-preview-block.is-manage .ca-hpv-title { color: #7b869d; }
.ca-home-preview-empty { grid-column: span 12; padding: 22px; text-align: center; font-size: 12px; color: #98a2b3; }

/* Glifi */
.ca-hpv-bar { display: block; height: 6px; border-radius: 999px; background: #e4e9f2; }
.ca-hpv-line { display: flex; align-items: center; gap: 6px; }
.ca-hpv-line .ca-hpv-bar { flex: 0 0 auto; }
.ca-hpv-dot { width: 8px; height: 8px; border-radius: 50%; background: #cdd6e6; flex: 0 0 auto; }
.ca-hpv-dot.is-accent { background: #93b0f5; }
.ca-hpv-check { width: 11px; height: 11px; border-radius: 4px; border: 1.5px solid #c6d0e3; flex: 0 0 auto; }
.ca-hpv-amount { width: 54%; height: 12px; border-radius: 5px; background: linear-gradient(90deg, #5f7cf3, #9bb6ff); }
.ca-hpv-split { display: flex; gap: 6px; }
.ca-hpv-split .ca-hpv-bar { flex: 1 1 0; }
.ca-hpv-split .ca-hpv-bar:first-child { background: #d8e0f4; }
.ca-hpv-cat { display: flex; align-items: center; gap: 10px; }
.ca-hpv-donut {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto;
  background: conic-gradient(#5f7cf3 0 38%, #7fd3b0 38% 63%, #ffd27a 63% 82%, #e4e9f2 82% 100%);
  -webkit-mask: radial-gradient(circle 6px at center, transparent 98%, #000 100%);
          mask: radial-gradient(circle 6px at center, transparent 98%, #000 100%);
}
.ca-hpv-legend { display: flex; flex-direction: column; gap: 5px; flex: 1 1 auto; }
.ca-hpv-week { display: flex; gap: 5px; align-items: flex-end; height: 34px; }
.ca-hpv-week span { flex: 1 1 0; border-radius: 4px; background: #e4e9f2; }
.ca-hpv-week span:nth-child(1) { height: 55%; }
.ca-hpv-week span:nth-child(2) { height: 80%; background: #d3ddf5; }
.ca-hpv-week span:nth-child(3) { height: 40%; }
.ca-hpv-week span:nth-child(4) { height: 68%; background: #d3ddf5; }
.ca-hpv-week span:nth-child(5) { height: 48%; }
.ca-hpv-progress { display: block; height: 7px; border-radius: 999px; background: #e9edf5; overflow: hidden; }
.ca-hpv-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #56c596, #2f9e77); }
@media (max-width: 575.98px) { .ca-home-preview-block { --w-span: 12 !important; } }

/* Lista widget riordinabile */
.ca-home-manage-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ca-home-manage-rows.is-reordering { cursor: grabbing; }
.ca-home-manage-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--ca-border, #e4e8f1);
  border-radius: 14px;
  background: #fff;
  transition: box-shadow .15s ease, border-color .15s ease, opacity .15s ease;
}
.ca-home-manage-row.is-dragging {
  box-shadow: 0 16px 40px rgba(20, 33, 61, .16);
  border-color: #cdd9f2;
  opacity: .97;
}
.ca-home-manage-row.is-off { opacity: .6; }
.ca-home-manage-row.is-unavailable { opacity: .55; }
.ca-home-manage-rows.is-reordering .ca-home-manage-row { touch-action: none; }
.ca-home-manage-handle {
  display: grid; place-items: center;
  width: 34px; height: 34px; flex: 0 0 34px;
  border: 0; border-radius: 9px; background: #f1f3f8; color: #8b93a7;
  cursor: grab; touch-action: none;
}
.ca-home-manage-handle:hover { color: #56617a; }
.ca-home-manage-handle:focus-visible { outline: 2px solid var(--ca-primary, #356df3); outline-offset: 2px; }
.ca-home-manage-handle svg { width: 17px; height: 17px; }
/* Su mobile l'handle è nascosto: si riordina con tocco prolungato sulla riga */
@media (max-width: 575.98px) {
  .ca-home-manage-handle { display: none; }
  .ca-home-manage-row { gap: 12px; }
}
.ca-home-manage-icon {
  display: grid; place-items: center;
  width: 40px; height: 40px; flex: 0 0 40px;
  border-radius: 11px; background: #eef3ff; color: #356df3;
}
.ca-home-manage-icon svg { width: 19px; height: 19px; }
.ca-home-manage-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.ca-home-manage-copy strong { font-size: 14px; font-weight: 600; color: var(--ca-text, #14213d); }
.ca-home-manage-copy span { font-size: 12.5px; color: #667085; }
.ca-home-manage-toggle { margin: 0; flex: 0 0 auto; }

/* Barra di salvataggio */
.ca-home-manage-footer {
  position: sticky; bottom: 0; z-index: 20;
  display: flex; justify-content: flex-end; gap: 12px;
  padding: 14px 0;
  margin-top: 4px;
  background: linear-gradient(180deg, rgba(247, 249, 253, 0), #f7f9fd 34%);
}
/* Mobile/tablet: c'è la bottom-nav (con il "+" centrale che sporge). La barra
   va ancorata SOPRA la nav, a tutta larghezza, e il "+" nascosto su questa
   pagina di editing per non sovrapporsi (la nav passa a 4 colonne). */
@media (max-width: 991.98px) {
  body.ca-home-manage-page.has-mobile-bottom-nav .ca-mobile-bottom-nav { grid-template-columns: repeat(4, 1fr); }
  body.ca-home-manage-page .ca-mobile-nav-fab { display: none; }
  body.ca-home-manage-page .ca-home-manage-footer {
    position: fixed; left: 0; right: 0; z-index: var(--ca-z-mobile-nav, 1030);
    bottom: calc(var(--family-mobile-bottom-nav-height) + env(safe-area-inset-bottom));
    flex-direction: row; flex-wrap: nowrap; align-items: center;
    margin: 0; padding: 12px 16px;
    background: #fff;
    border-top: 1px solid var(--ca-border, #e4e8f1);
    box-shadow: 0 -6px 20px rgba(31, 45, 73, .07);
  }
  body.ca-home-manage-page .ca-home-manage-footer .btn { width: auto; flex: 0 0 auto; }
  body.ca-home-manage-page .ca-home-manage-footer .btn-primary { flex: 1 1 auto; }
  body.ca-home-manage-page .ca-home-manage { padding-bottom: calc(var(--family-mobile-bottom-nav-height) + env(safe-area-inset-bottom) + 110px); }
}
