:root{
  --color-sidebar-forest:#0B2F26;--color-sidebar-active:#1B6A51;--color-header-green:#0F7A4F;--color-header-deep:#095B3A;--color-bg:#F4F7F4;--color-surface:#FFFFFF;--color-border-soft:#DCE5DD;--color-positive:#1F9D63;--color-danger:#F04444;--color-transfer:#2F80ED;--color-ai:#7C4DFF;--color-warning:#F59E0B;--color-neutral:#6B7280;--color-text:#111827;--color-text-muted:#6B7280;--card-shadow:0 14px 34px rgba(15,23,42,.08);--card-radius:18px;--radius-sm:12px;--space:24px;--font-main:Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif}
*{box-sizing:border-box}body{margin:0;font-family:var(--font-main);background:var(--color-bg);color:var(--color-text);font-size:16px;line-height:1.5}a{color:inherit;text-decoration:none}button,input{font:inherit}.app-shell{display:grid;grid-template-columns:290px minmax(0,1fr);min-height:100vh}.sidebar{background:linear-gradient(180deg,var(--color-sidebar-forest),#071f19);color:#fff;padding:24px;display:flex;flex-direction:column;gap:24px}.brand{display:flex;align-items:center;gap:12px}.brand-mark{width:46px;height:46px;border-radius:14px;background:linear-gradient(135deg,#2dd48f,var(--color-header-green));display:grid;place-items:center;color:#fff;font-weight:900;font-size:24px;box-shadow:0 12px 26px rgba(0,0,0,.18)}.brand small,.topbar-kicker,.eyebrow,.muted{color:var(--color-text-muted)}.brand small{display:block;color:rgba(255,255,255,.68);font-size:13px}.sidebar-nav{display:flex;flex-direction:column;gap:8px}.sidebar-link{display:flex;align-items:center;gap:12px;padding:13px 14px;border-radius:14px;color:rgba(255,255,255,.78);font-size:16px}.sidebar-link:hover,.sidebar-link.active{background:var(--color-sidebar-active);color:#fff}.sidebar-icon{width:24px;text-align:center}.sidebar-promo{margin-top:auto;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.13);border-radius:18px;padding:18px}.sidebar-promo p{margin:.3rem 0 0;color:rgba(255,255,255,.72)}.main-area{min-width:0}.topbar{background:linear-gradient(135deg,var(--color-header-green),var(--color-header-deep));color:#fff;padding:26px 34px;display:flex;justify-content:space-between;gap:22px;align-items:center;box-shadow:0 12px 30px rgba(9,91,58,.18)}.topbar h1{font-size:42px;line-height:1.05;margin:0 0 8px}.topbar p{margin:0;color:rgba(255,255,255,.82)}.topbar-kicker{font-size:13px;text-transform:uppercase;letter-spacing:.12em;color:rgba(255,255,255,.72)!important}.topbar-actions,.actions-row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.topbar-pill{border:1px solid rgba(255,255,255,.25);background:rgba(255,255,255,.12);color:#fff;border-radius:999px;padding:10px 14px}.content-area{padding:30px 34px 110px}.kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px;margin-bottom:24px}.kpi-card{border-radius:22px;padding:24px;color:#fff;min-height:150px;box-shadow:var(--card-shadow);display:flex;flex-direction:column;justify-content:space-between}.kpi-card span{opacity:.88}.kpi-card strong{font-size:38px;line-height:1}.kpi-card small{opacity:.82}.kpi-positive,.kpi-income{background:linear-gradient(135deg,#1F9D63,#0F7A4F)}.kpi-danger{background:linear-gradient(135deg,#F04444,#B42318)}.kpi-saving{background:linear-gradient(135deg,#1B6A51,#0B2F26)}.dashboard-grid,.page-grid{display:grid;grid-template-columns:2fr 1fr;gap:22px}.card{background:var(--color-surface);border:1px solid var(--color-border-soft);border-radius:var(--card-radius);box-shadow:var(--card-shadow);padding:24px;min-width:0}.card-large{grid-column:auto}.card-ai{border-color:rgba(124,77,255,.28);background:linear-gradient(180deg,#fff,#fbfaff)}.card-header{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:18px}.card h2{font-size:24px;margin:0 0 10px}.eyebrow{margin:0 0 4px;text-transform:uppercase;letter-spacing:.12em;font-size:12px;font-weight:800}.account-list{display:grid;gap:12px}.account-list div{display:flex;justify-content:space-between;gap:12px;padding:14px 0;border-bottom:1px solid var(--color-border-soft)}.big-number{font-size:42px;font-weight:900;margin:10px 0;color:var(--color-sidebar-forest)}.btn{border:0;border-radius:14px;padding:12px 16px;font-weight:800;display:inline-flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;box-shadow:0 10px 22px rgba(15,23,42,.08)}.btn-primary{background:var(--color-positive);color:#fff}.btn-danger{background:var(--color-danger);color:#fff}.btn-transfer{background:var(--color-transfer);color:#fff}.btn-ai{background:var(--color-ai);color:#fff}.btn-secondary{background:#fff;color:var(--color-sidebar-forest);border:1px solid var(--color-border-soft)}.badge{display:inline-flex;align-items:center;gap:7px;border-radius:999px;padding:7px 11px;font-size:13px;font-weight:800}.badge:before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor}.badge-success{background:rgba(31,157,99,.12);color:var(--color-positive)}.badge-info{background:rgba(47,128,237,.12);color:var(--color-transfer)}.badge-ai{background:rgba(124,77,255,.12);color:var(--color-ai)}.badge-warning{background:rgba(245,158,11,.14);color:var(--color-warning)}.chart-placeholder{display:grid;place-items:center;min-height:220px;border-radius:18px;border:1px dashed var(--color-border-soft);background:#F8FAF8;color:var(--color-text-muted);font-weight:800}.table-shell{overflow:auto;border:1px solid var(--color-border-soft);border-radius:16px}table{width:100%;border-collapse:collapse;background:#fff}th,td{text-align:left;padding:14px 16px;border-bottom:1px solid var(--color-border-soft)}th{background:#F7FAF7;color:var(--color-text-muted);font-size:14px}.admin-modules{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:12px}.fab{position:fixed;right:28px;bottom:28px;width:68px;height:68px;border:0;border-radius:24px;background:var(--color-positive);color:#fff;font-size:40px;line-height:1;box-shadow:0 20px 42px rgba(31,157,99,.32);cursor:pointer;z-index:20}.sheet-backdrop{position:fixed;inset:0;background:rgba(7,31,25,.35);z-index:30}.quick-sheet{position:fixed;right:28px;bottom:110px;width:min(360px,calc(100vw - 32px));background:#fff;border:1px solid var(--color-border-soft);border-radius:24px;padding:22px;box-shadow:0 24px 70px rgba(15,23,42,.22);z-index:40;display:grid;gap:12px}.quick-sheet[hidden],.sheet-backdrop[hidden]{display:none}.sheet-handle{width:54px;height:5px;border-radius:99px;background:var(--color-border-soft);margin:0 auto}.landing-page{min-height:100vh;padding:26px;background:linear-gradient(135deg,#eef7ef,#fff)}.landing-nav{display:flex;justify-content:space-between;align-items:center}.landing-nav .brand small{color:var(--color-text-muted)}.hero{display:grid;grid-template-columns:1.4fr .8fr;gap:34px;align-items:center;min-height:calc(100vh - 110px);max-width:1180px;margin:0 auto}.hero h1{font-size:58px;line-height:1.02;margin:18px 0}.hero p{font-size:19px;color:var(--color-text-muted);max-width:720px}.hero-card{background:var(--color-sidebar-forest);color:#fff;border-radius:30px;padding:34px;box-shadow:0 28px 70px rgba(11,47,38,.25)}.hero-card strong{display:block;font-size:48px}.hero-card span{color:rgba(255,255,255,.72)}.auth-page{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,var(--color-sidebar-forest),var(--color-header-green));padding:24px}.auth-card{width:min(460px,100%);background:#fff;border-radius:28px;padding:34px;box-shadow:0 28px 70px rgba(0,0,0,.24)}.auth-card .brand small{color:var(--color-text-muted)}.auth-card h1{font-size:42px;margin:26px 0 8px}.form-stack{display:grid;gap:14px;margin:24px 0}.form-stack label{display:grid;gap:8px;font-weight:800}.form-stack input{border:1px solid var(--color-border-soft);border-radius:14px;padding:13px 14px;background:#fff}.form-stack input:focus{outline:3px solid rgba(31,157,99,.16);border-color:var(--color-positive)}
@media(max-width:1100px){.app-shell{grid-template-columns:1fr}.sidebar{position:static}.sidebar-nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-grid,.page-grid,.hero{grid-template-columns:1fr}.topbar{align-items:flex-start;flex-direction:column}.topbar h1{font-size:34px}.hero h1{font-size:42px}}
@media(max-width:640px){.sidebar{padding:18px}.content-area,.topbar{padding:22px}.sidebar-nav{grid-template-columns:1fr}.kpi-grid{grid-template-columns:1fr}.card-header{flex-direction:column}.hero h1{font-size:34px}.fab{right:18px;bottom:18px}.quick-sheet{right:16px;bottom:96px}.kpi-card strong,.big-number{font-size:34px}}
.form-message{border:1px solid var(--color-border-soft);border-radius:14px;padding:12px 14px;margin:14px 0;background:#fff;color:var(--color-text);font-weight:700}.form-message-success{border-color:rgba(31,157,99,.35);background:rgba(31,157,99,.09);color:var(--color-positive)}.form-message-error{border-color:rgba(240,68,68,.35);background:rgba(240,68,68,.09);color:var(--color-danger)}.form-message-warning{border-color:rgba(245,158,11,.35);background:rgba(245,158,11,.12);color:#92400e}.form-message-info{border-color:rgba(47,128,237,.28);background:rgba(47,128,237,.08);color:var(--color-transfer)}.btn:disabled{opacity:.58;cursor:not-allowed;box-shadow:none}.color-dot{display:inline-block;width:12px;height:12px;border-radius:50%;background:var(--dot-color);margin-right:8px;vertical-align:middle;border:1px solid rgba(0,0,0,.08)}
.settings-layout{display:grid;grid-template-columns:minmax(280px,.75fr) minmax(0,1.55fr);gap:22px;align-items:start}.settings-nav-card{position:sticky;top:24px}.settings-shortcuts{display:grid;gap:10px;margin-top:18px}.settings-shortcut{display:grid;grid-template-columns:34px minmax(0,1fr);gap:10px;align-items:center;border:1px solid var(--color-border-soft);border-radius:16px;padding:13px 14px;background:#fff}.settings-shortcut strong,.settings-shortcut small{display:block}.settings-shortcut small{color:var(--color-text-muted);font-size:13px}.settings-shortcut.active{border-color:rgba(31,157,99,.35);background:rgba(31,157,99,.08)}.settings-shortcut span{width:32px;height:32px;border-radius:12px;display:grid;place-items:center;background:#F4F7F4}.settings-actions-row{margin-bottom:18px}.settings-actions-row .btn[disabled]{opacity:.7}
@media(max-width:1100px){.settings-layout{grid-template-columns:1fr}.settings-nav-card{position:static}.settings-shortcuts{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.settings-shortcuts{grid-template-columns:1fr}}

/* STEP 006 — Dashboard premium allineata al mockup ufficiale Famyro */
.dashboard-shell{grid-template-columns:300px minmax(0,1fr);background:#f2f6f2}.sidebar-premium{background:radial-gradient(circle at 40% -10%,rgba(31,157,99,.32),transparent 36%),linear-gradient(180deg,#06261f 0%,#082d24 48%,#041813 100%);padding:28px 24px;box-shadow:18px 0 46px rgba(2,26,19,.2);position:relative;z-index:2}.sidebar-premium:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(255,255,255,.05),transparent 18%);pointer-events:none}.brand-premium{position:relative;z-index:1;gap:14px}.brand-premium strong{text-transform:uppercase;letter-spacing:.08em;font-size:20px}.brand-mark-family{background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.16);box-shadow:0 16px 32px rgba(0,0,0,.24);font-size:23px}.sidebar-premium .sidebar-nav{position:relative;z-index:1;margin-top:8px;gap:9px}.sidebar-premium .sidebar-link{min-height:52px;border-radius:14px;color:rgba(255,255,255,.86);font-weight:750;transition:.18s ease;background:transparent}.sidebar-premium .sidebar-link:hover{background:rgba(255,255,255,.08);transform:translateX(2px)}.sidebar-premium .sidebar-link.active{background:linear-gradient(135deg,#1f9d63,#146846);box-shadow:0 14px 28px rgba(31,157,99,.22);color:#fff}.sidebar-family-card{position:relative;z-index:1;border-radius:20px;margin-top:auto;text-align:left;padding:22px;border-color:rgba(255,255,255,.15);background:linear-gradient(180deg,rgba(255,255,255,.1),rgba(255,255,255,.04))}.sidebar-family-illustration{font-size:54px;line-height:1;margin-bottom:14px}.sidebar-family-card strong{font-size:17px;line-height:1.35}.sidebar-family-card p{font-size:14px;line-height:1.55}.sidebar-promo-btn{display:flex;align-items:center;justify-content:center;margin-top:18px;background:linear-gradient(135deg,#19b76f,#0f7a4f);color:#fff;border-radius:14px;padding:12px 14px;font-weight:900;box-shadow:0 16px 32px rgba(15,122,79,.25)}.dashboard-main{background:#f4f7f4}.dashboard-topbar{position:sticky;top:0;z-index:12;min-height:100px;padding:20px 30px 18px;background:linear-gradient(135deg,#0f7a4f 0%,#095b3a 55%,#063f2a 100%);box-shadow:0 10px 28px rgba(6,63,42,.24);border-bottom:1px solid rgba(255,255,255,.08)}.dashboard-topbar h1{font-size:30px;letter-spacing:-.03em;margin-bottom:2px}.dashboard-topbar p{font-size:15px}.dashboard-topbar .topbar-kicker{font-size:12px;letter-spacing:.18em}.dashboard-topbar-actions{gap:14px}.dashboard-topbar .topbar-pill{border-radius:10px;min-height:48px;padding:12px 18px;background:rgba(0,0,0,.12);border-color:rgba(255,255,255,.22);font-weight:850;box-shadow:inset 0 1px 0 rgba(255,255,255,.08)}.topbar-notification{position:relative;width:50px;height:50px;border-radius:15px;border:1px solid rgba(255,255,255,.22);background:rgba(0,0,0,.12);color:#fff;font-size:22px}.topbar-notification em{position:absolute;right:-5px;top:-7px;min-width:20px;height:20px;border-radius:999px;background:#f04444;font-size:12px;font-style:normal;display:grid;place-items:center;font-weight:900}.topbar-profile{display:flex;align-items:center;gap:10px;color:#fff;background:transparent;border:0}.topbar-profile small,.topbar-profile strong{display:block;text-align:left}.topbar-profile small{color:rgba(255,255,255,.7);font-size:12px}.profile-avatar{width:52px;height:52px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#f5f7f5,#dce5dd);color:#0b2f26;font-weight:950;border:3px solid rgba(255,255,255,.42);box-shadow:0 12px 26px rgba(0,0,0,.18)}.dashboard-content{padding:26px 28px 118px}.dashboard-status{margin:0 0 22px;border-radius:18px;padding:18px 20px;font-size:18px}.dashboard-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin-bottom:20px}.dashboard-kpi-card{position:relative;overflow:hidden;min-height:150px;border-radius:18px;color:#fff;padding:26px 24px;display:grid;grid-template-columns:76px minmax(0,1fr);align-items:center;gap:18px;box-shadow:0 18px 34px rgba(9,31,24,.13),inset 0 1px 0 rgba(255,255,255,.16)}.dashboard-kpi-card:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 18% 10%,rgba(255,255,255,.26),transparent 34%),linear-gradient(135deg,rgba(255,255,255,.08),transparent);pointer-events:none}.dashboard-kpi-card span,.dashboard-kpi-card small{display:block;position:relative}.dashboard-kpi-card span{font-size:16px;font-weight:850}.dashboard-kpi-card strong{position:relative;display:block;font-size:34px;line-height:1.05;margin:8px 0 4px;letter-spacing:-.04em}.dashboard-kpi-card small{font-size:14px;color:rgba(255,255,255,.82)}.kpi-icon-bubble{position:relative;width:66px;height:66px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.24);font-size:30px;box-shadow:inset 0 0 0 8px rgba(255,255,255,.06),0 12px 24px rgba(0,0,0,.14)}.dashboard-kpi-balance{background:linear-gradient(135deg,#1c9b27,#0b711d)}.dashboard-kpi-income{background:linear-gradient(135deg,#09a263,#02764c)}.dashboard-kpi-expense{background:linear-gradient(135deg,#ff4139,#df251f)}.dashboard-kpi-saving{background:linear-gradient(135deg,#F2AD17 0%,#C97A00 100%)}.dashboard-kpi-card svg{position:absolute;right:18px;bottom:18px;width:92px;height:42px}.dashboard-kpi-card svg path{fill:none;stroke:rgba(255,255,255,.85);stroke-width:4;stroke-linecap:round}.dashboard-premium-grid{display:grid;grid-template-columns:1.05fr 1.05fr 1.34fr;gap:18px}.premium-card{background:#fff;border:1px solid #dce5dd;border-radius:18px;padding:22px;box-shadow:0 14px 34px rgba(15,23,42,.08);min-width:0}.premium-card-header{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:18px}.premium-card h2{font-size:21px;line-height:1.1;margin:0;letter-spacing:-.03em}.premium-card-header a,.card-bottom-link{font-size:14px;color:#0f7a4f;font-weight:900}.premium-card-header h2 span{display:inline-grid;place-items:center;min-width:24px;height:24px;border-radius:999px;background:rgba(31,157,99,.14);color:#1f9d63;font-size:13px;margin-left:6px}.premium-card-header button{border:1px solid #dce5dd;background:#fff;border-radius:10px;padding:8px 12px;font-weight:750;color:#374151}.accounts-premium-card{grid-column:span 1}.premium-account-list{display:grid;gap:0}.premium-account-row{display:grid;grid-template-columns:48px minmax(0,1fr) auto;gap:14px;align-items:center;padding:13px 0;border-bottom:1px solid #edf2ee}.premium-account-row:last-child{border-bottom:0}.account-avatar{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:var(--account-color,rgba(31,157,99,.12));font-size:22px;box-shadow:inset 0 0 0 1px rgba(255,255,255,.6)}.premium-account-row strong{display:block;font-size:15px}.premium-account-row small{display:block;color:#6b7280}.account-amount{text-align:right}.account-amount b{display:block;font-size:17px}.account-amount span{display:block;color:#0f9f5f;font-size:13px;font-weight:850}.trend-card{grid-column:span 1}.trend-legend{display:flex;gap:13px;align-items:center;color:#6b7280;font-size:13px;margin-bottom:12px}.dot{display:inline-block;width:10px;height:10px;border-radius:50%;background:#6b7280}.dot.green{background:#0f9f5f}.dot.red{background:#ff2d2d}.dot.orange{background:#f59e0b}.dot.blue{background:#2f80ed}.dot.violet{background:#7c4dff}.dash{width:18px;border-top:3px dashed #0f9f5f}.line-chart-fake{position:relative;min-height:208px;border-bottom:1px solid #edf2ee;padding-left:50px;background:linear-gradient(#fff,#fff),repeating-linear-gradient(to bottom,transparent 0,transparent 44px,rgba(220,229,221,.65) 45px);background-blend-mode:normal}.line-chart-fake>span{position:absolute;left:0;color:#6b7280;font-size:12px}.line-chart-fake>span:nth-child(1){top:18px}.line-chart-fake>span:nth-child(2){top:64px}.line-chart-fake>span:nth-child(3){top:110px}.line-chart-fake>span:nth-child(4){top:156px}.line-chart-fake svg{position:absolute;left:50px;right:0;top:14px;width:calc(100% - 50px);height:170px}.line-chart-fake path{fill:none;stroke-width:5;stroke-linecap:round}.line-green{stroke:#07853d}.line-red{stroke:#f04444}.line-dash{stroke:#07853d;stroke-dasharray:9 9}.trend-zero-line{stroke:#aebdb3;stroke-width:1;stroke-dasharray:4 4}.chart-months{position:absolute;left:50px;right:0;bottom:5px;display:flex;justify-content:space-between;color:#6b7280;font-size:12px}.chart-months b{font-weight:750}.card-bottom-link{display:block;text-align:center;margin-top:14px;padding-top:8px;border-top:1px solid #edf2ee}.category-card{grid-column:span 1}.donut-layout{display:grid;grid-template-columns:190px minmax(0,1fr);gap:20px;align-items:center}.donut-visual{width:170px;height:170px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(#2f80ed 0 34%,#1f9d63 34% 58%,#f59e0b 58% 72%,#f04444 72% 85%,#d946ef 85% 100%);position:relative}.donut-visual:after{content:"";position:absolute;width:88px;height:88px;border-radius:50%;background:#fff;box-shadow:inset 0 0 0 1px #edf2ee}.donut-visual span{position:relative;z-index:1;text-align:center;font-size:12px;color:#6b7280}.donut-visual strong{font-size:18px;color:#111827}.category-breakdown{list-style:none;margin:0;padding:0;display:grid;gap:12px}.category-breakdown li{display:flex;align-items:center;gap:10px;font-size:14px}.category-breakdown strong{margin-left:auto}.recent-card,.goals-card,.ai-premium-card{grid-column:span 1}.movement-list-placeholder{display:grid;gap:12px}.movement-list-placeholder>div{display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:12px;align-items:center;padding:10px 0;border-bottom:1px solid #edf2ee}.movement-list-placeholder p{margin:0}.movement-list-placeholder small{display:block;color:#6b7280}.movement-list-placeholder b{color:#0f7a4f}.movement-icon{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;font-weight:950}.movement-icon.income{background:rgba(31,157,99,.12);color:#1f9d63}.movement-icon.expense{background:rgba(240,68,68,.12);color:#f04444}.goal-row{display:grid;grid-template-columns:52px minmax(0,1fr) 46px;gap:12px;align-items:center;padding:12px 0;border-bottom:1px solid #edf2ee}.goal-row>span{width:48px;height:48px;border-radius:12px;display:grid;place-items:center;background:#eef7ef;font-size:26px}.goal-row small{color:#6b7280}.goal-row b{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:rgba(31,157,99,.12);color:#0f7a4f}.progress{height:8px;background:#dbe4de;border-radius:999px;overflow:hidden;margin:8px 0 4px}.progress i{display:block;height:100%;background:#0f7a4f;border-radius:999px}.ai-premium-card{position:relative;overflow:hidden;background:linear-gradient(180deg,#fff,#fbfaff)}.ai-robot{position:absolute;right:16px;top:14px;width:74px;height:74px;border-radius:50%;display:grid;place-items:center;background:radial-gradient(circle,rgba(124,77,255,.16),rgba(124,77,255,.04));font-size:38px}.ai-premium-card p{padding-right:80px;color:#374151}.ai-alert-list{display:grid;gap:8px;margin:14px 0}.ai-alert-list div{display:flex;gap:10px;align-items:center;border:1px solid #edf2ee;border-radius:12px;padding:10px 12px;font-size:13px}.ai-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.premium-fab{width:74px;height:74px;border-radius:50%;right:30px;bottom:26px;background:linear-gradient(135deg,#20b76f,#09623f);border:5px solid #fff;box-shadow:0 20px 44px rgba(9,91,58,.34);font-size:44px}.premium-quick-sheet{border-radius:18px;right:28px;bottom:116px}.premium-quick-sheet .btn{font-size:18px;min-height:54px}
@media(max-width:1380px){.dashboard-shell{grid-template-columns:270px minmax(0,1fr)}.dashboard-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-premium-grid{grid-template-columns:1fr 1fr}.category-card,.ai-premium-card{grid-column:span 2}.donut-layout{grid-template-columns:210px minmax(0,1fr)}}
@media(max-width:980px){.dashboard-shell{grid-template-columns:1fr}.dashboard-topbar{position:static}.dashboard-premium-grid{grid-template-columns:1fr}.category-card,.ai-premium-card{grid-column:span 1}.donut-layout{grid-template-columns:1fr}.donut-visual{margin:auto}.topbar-profile span:not(.profile-avatar){display:none}}
@media(max-width:640px){.dashboard-content{padding:20px 18px 110px}.dashboard-kpi-grid{grid-template-columns:1fr}.dashboard-kpi-card{grid-template-columns:64px minmax(0,1fr);min-height:132px;padding:20px}.dashboard-kpi-card strong{font-size:30px}.dashboard-topbar-actions{width:100%}.dashboard-topbar .topbar-pill{width:100%;justify-content:center}.premium-card{padding:18px}.premium-card-header{align-items:flex-start;flex-direction:column}.premium-account-row{grid-template-columns:42px minmax(0,1fr)}.account-amount{text-align:left;grid-column:2}.ai-actions{grid-template-columns:1fr}.ai-premium-card p{padding-right:0}.ai-robot{position:static;margin-bottom:10px}.premium-fab{right:18px;bottom:18px}}
.progress-60 i{width:60%}.progress-49 i{width:49%}


/* STEP 007 - Sidebar più compatta e richiudibile */
.app-shell{grid-template-columns:250px minmax(0,1fr)}
.dashboard-shell{grid-template-columns:250px minmax(0,1fr)}
.sidebar{position:relative;padding:20px 14px;gap:16px;transition:width .22s ease,padding .22s ease,background .22s ease}
.sidebar .brand{padding:0 6px;gap:10px;min-height:52px}
.sidebar .brand-mark{width:40px;height:40px;border-radius:13px;font-size:21px;flex:0 0 40px}
.sidebar .brand strong{font-size:18px;line-height:1.05}
.sidebar .brand small{font-size:11px;line-height:1.25;margin-top:3px}
.sidebar-nav{gap:3px}
.sidebar-link{gap:10px;padding:9px 12px;border-radius:12px;font-size:15px;min-height:42px}
.sidebar-icon{width:22px;min-width:22px;font-size:17px}
.sidebar-promo{padding:14px;border-radius:16px}
.sidebar-promo p{font-size:13px;line-height:1.35}
.sidebar-family-illustration{font-size:36px;margin-bottom:8px}
.sidebar-promo-btn{min-height:42px;padding:10px 12px;font-size:14px}
.sidebar-toggle{position:absolute;top:22px;right:-15px;z-index:15;width:32px;height:32px;border-radius:999px;border:1px solid rgba(255,255,255,.22);background:linear-gradient(135deg,#1b6a51,#0f7a4f);color:#fff;display:grid;place-items:center;font-size:24px;line-height:1;font-weight:900;box-shadow:0 10px 26px rgba(0,0,0,.22);cursor:pointer;transition:transform .2s ease,background .2s ease}
.sidebar-toggle:hover{background:linear-gradient(135deg,#248161,#11935f);transform:translateX(1px)}
.app-shell.sidebar-collapsed{grid-template-columns:82px minmax(0,1fr)}
.app-shell.sidebar-collapsed .sidebar{padding:20px 12px;align-items:center}
.app-shell.sidebar-collapsed .sidebar-toggle{right:-16px;transform:rotate(180deg)}
.app-shell.sidebar-collapsed .brand{justify-content:center;padding:0;width:100%}
.app-shell.sidebar-collapsed .brand span:last-child,.app-shell.sidebar-collapsed .sidebar-link span:not(.sidebar-icon),.app-shell.sidebar-collapsed .sidebar-promo{display:none!important}
.app-shell.sidebar-collapsed .sidebar-nav{width:100%;align-items:center;gap:5px}
.app-shell.sidebar-collapsed .sidebar-link{width:48px;height:48px;padding:0;justify-content:center;border-radius:15px}
.app-shell.sidebar-collapsed .sidebar-icon{width:auto;min-width:0;font-size:19px}
@media(max-width:1380px){.dashboard-shell{grid-template-columns:250px minmax(0,1fr)}.dashboard-shell.sidebar-collapsed{grid-template-columns:82px minmax(0,1fr)}}
@media(max-width:980px){.app-shell,.dashboard-shell,.app-shell.sidebar-collapsed,.dashboard-shell.sidebar-collapsed{grid-template-columns:1fr}.sidebar-toggle{display:none}.sidebar{position:static}}

/* STEP 009 — Layout globale unico sidebar/topbar */
.app-shell{grid-template-columns:250px minmax(0,1fr)!important;background:#f2f6f2;min-height:100vh}.main-area{min-width:0;background:#f2f6f2}.sidebar[data-global-sidebar]{position:relative;width:auto;min-height:100vh;padding:20px 14px;gap:16px;background:radial-gradient(circle at 10% 0,rgba(31,157,99,.22),transparent 32%),linear-gradient(180deg,#0b2f26 0%,#062019 100%);box-shadow:inset -1px 0 0 rgba(255,255,255,.08);transition:padding .22s ease}.sidebar[data-global-sidebar] .brand{padding:0 6px;gap:10px;min-height:52px}.sidebar[data-global-sidebar] .brand-mark{width:40px;height:40px;flex:0 0 40px;border-radius:13px;font-size:20px;background:linear-gradient(135deg,#ffffff,#d6efe3);color:#0b2f26;box-shadow:0 12px 26px rgba(0,0,0,.22)}.sidebar[data-global-sidebar] .brand strong{font-size:18px;line-height:1.05;letter-spacing:.02em}.sidebar[data-global-sidebar] .brand small{font-size:11px;line-height:1.25;margin-top:3px;color:rgba(255,255,255,.68)}.sidebar[data-global-sidebar] .sidebar-nav{gap:3px}.sidebar[data-global-sidebar] .sidebar-link{gap:10px;min-height:42px;padding:9px 12px;border-radius:12px;font-size:15px;font-weight:750;color:rgba(255,255,255,.78)}.sidebar[data-global-sidebar] .sidebar-link:hover,.sidebar[data-global-sidebar] .sidebar-link.active{background:linear-gradient(135deg,rgba(31,157,99,.98),rgba(15,122,79,.88));color:#fff;box-shadow:inset 0 1px 0 rgba(255,255,255,.12),0 10px 24px rgba(0,0,0,.12)}.sidebar[data-global-sidebar] .sidebar-icon{width:22px;min-width:22px;height:22px;display:grid;place-items:center;font-size:16px}.sidebar[data-global-sidebar] .sidebar-promo{padding:14px;border-radius:16px;background:rgba(255,255,255,.075);border:1px solid rgba(255,255,255,.13)}.sidebar[data-global-sidebar] .sidebar-promo strong{font-size:15px}.sidebar[data-global-sidebar] .sidebar-promo p{font-size:13px;line-height:1.35}.sidebar-toggle{top:22px;right:-16px;width:34px;height:34px;border-radius:999px;border:1px solid rgba(255,255,255,.26);background:linear-gradient(135deg,#22a36f,#0b5d3d);box-shadow:0 12px 26px rgba(0,0,0,.24),inset 0 1px 0 rgba(255,255,255,.2);font-size:0;overflow:hidden}.sidebar-toggle-icon{width:10px;height:10px;border-top:3px solid #fff;border-left:3px solid #fff;transform:rotate(-45deg);display:block;margin-left:4px;transition:transform .22s ease,margin .22s ease}.sidebar-toggle:hover{background:linear-gradient(135deg,#28b77d,#0f7a4f);transform:translateX(1px)}.app-shell.sidebar-collapsed{grid-template-columns:82px minmax(0,1fr)!important}.app-shell.sidebar-collapsed .sidebar[data-global-sidebar]{padding:20px 12px;align-items:center}.app-shell.sidebar-collapsed .sidebar-toggle{right:-17px;transform:none}.app-shell.sidebar-collapsed .sidebar-toggle:hover{transform:translateX(1px)}.app-shell.sidebar-collapsed .sidebar-toggle-icon{transform:rotate(135deg);margin-left:-2px}.app-shell.sidebar-collapsed .brand{justify-content:center;padding:0;width:100%}.app-shell.sidebar-collapsed .brand span:last-child,.app-shell.sidebar-collapsed .sidebar-link span:not(.sidebar-icon),.app-shell.sidebar-collapsed .sidebar-promo{display:none!important}.app-shell.sidebar-collapsed .sidebar-nav{width:100%;align-items:center;gap:5px}.app-shell.sidebar-collapsed .sidebar-link{width:48px;height:48px;padding:0;justify-content:center;border-radius:15px}.app-shell.sidebar-collapsed .sidebar-icon{width:auto;min-width:0;font-size:18px}.topbar[data-global-topbar]{min-height:86px;padding:18px 28px;background:linear-gradient(135deg,#0f7a4f 0%,#09623f 48%,#063d2d 100%);box-shadow:0 12px 30px rgba(9,91,58,.18);border-bottom:1px solid rgba(255,255,255,.08)}.topbar[data-global-topbar] h1{font-size:31px;line-height:1.05;margin:2px 0 5px;letter-spacing:-.035em}.topbar[data-global-topbar] p{font-size:14px}.topbar-copy{min-width:0}.topbar-actions{gap:12px}.topbar[data-global-topbar] .topbar-pill{border-radius:12px;min-height:42px;padding:10px 15px;background:rgba(0,0,0,.12);border-color:rgba(255,255,255,.23);font-weight:850;color:#fff;box-shadow:inset 0 1px 0 rgba(255,255,255,.08)}.topbar-notification{position:relative;width:44px;height:44px;border-radius:14px;border:1px solid rgba(255,255,255,.22);background:rgba(0,0,0,.12);color:#fff;font-size:20px}.topbar-notification em{position:absolute;right:-5px;top:-7px;min-width:20px;height:20px;border-radius:999px;background:#f04444;font-size:12px;font-style:normal;display:grid;place-items:center;font-weight:900}.topbar-profile{display:flex;align-items:center;gap:10px;color:#fff;background:transparent;border:0}.topbar-profile small,.topbar-profile strong{display:block;text-align:left}.topbar-profile small{color:rgba(255,255,255,.7);font-size:12px}.profile-avatar{width:46px;height:46px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#f5f7f5,#dce5dd);color:#0b2f26;font-weight:950;border:3px solid rgba(255,255,255,.42);box-shadow:0 12px 26px rgba(0,0,0,.18)}.dashboard-content{padding-top:24px}.premium-fab,.fab{border-radius:50%;background:linear-gradient(135deg,#20b76f,#09623f);border:5px solid #fff;box-shadow:0 20px 44px rgba(9,91,58,.34)}@media(max-width:980px){.app-shell,.app-shell.sidebar-collapsed{grid-template-columns:1fr!important}.sidebar[data-global-sidebar]{position:static;min-height:auto}.sidebar-toggle{display:none}.topbar[data-global-topbar]{align-items:flex-start;flex-direction:column}.topbar-actions{width:100%}.topbar[data-global-topbar] .topbar-pill{flex:1;justify-content:center}.topbar-profile span:not(.profile-avatar){display:none}}@media(max-width:640px){.topbar[data-global-topbar]{padding:20px 18px}.topbar[data-global-topbar] h1{font-size:28px}.topbar-actions{gap:8px}.topbar-notification,.profile-avatar{width:40px;height:40px}.content-area{padding-left:18px;padding-right:18px}}

/* STEP 010 — Logo ufficiale Famyro */
.sidebar[data-global-sidebar] .brand.brand-official{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  min-height:58px;
  padding:2px 4px 8px;
}
.sidebar[data-global-sidebar] .brand-logo-img{
  display:block;
  width:100%;
  max-width:168px;
  height:auto;
  object-fit:contain;
  filter:drop-shadow(0 10px 20px rgba(0,0,0,.18));
}
.app-shell.sidebar-collapsed .brand.brand-official{
  justify-content:center;
  min-height:56px;
  padding:0;
}
.app-shell.sidebar-collapsed .brand-logo-img{
  width:44px;
  max-width:44px;
  height:44px;
  object-fit:contain;
  object-position:left center;
}
.app-shell.sidebar-collapsed .brand.brand-official span:last-child{
  display:none!important;
}
@media(max-width:980px){
  .sidebar[data-global-sidebar] .brand-logo-img{
    max-width:156px;
  }
}

/* STEP 011 — Logo più grande e icone ufficiali sidebar */
.sidebar[data-global-sidebar] .brand.brand-official{
  width:100%;
  min-height:66px;
  padding:0 0 12px;
  justify-content:center;
}
.sidebar[data-global-sidebar] .brand-logo-img{
  width:100%;
  max-width:220px;
  height:auto;
  object-fit:contain;
  object-position:center;
  filter:drop-shadow(0 12px 22px rgba(0,0,0,.22));
}
.sidebar[data-global-sidebar] .sidebar-icon{
  width:24px;
  min-width:24px;
  height:24px;
  display:grid;
  place-items:center;
}
.sidebar[data-global-sidebar] .sidebar-icon img{
  display:block;
  width:22px;
  height:22px;
  object-fit:contain;
  opacity:.92;
  filter:drop-shadow(0 4px 10px rgba(0,0,0,.18));
}
.sidebar[data-global-sidebar] .sidebar-link:hover .sidebar-icon img,
.sidebar[data-global-sidebar] .sidebar-link.active .sidebar-icon img{
  opacity:1;
}
.app-shell.sidebar-collapsed .brand.brand-official{
  width:100%;
  min-height:58px;
  padding:0;
}
.app-shell.sidebar-collapsed .brand-logo-img{
  width:48px;
  max-width:48px;
  height:48px;
  object-fit:contain;
  object-position:center;
}
.app-shell.sidebar-collapsed .sidebar-icon img{
  width:23px;
  height:23px;
}
@media(max-width:980px){
  .sidebar[data-global-sidebar] .brand-logo-img{
    max-width:210px;
  }
}

/* STEP 013 — Icone ufficiali sidebar e label meno bold */
.sidebar[data-global-sidebar] .sidebar-link{
  font-weight:500 !important;
}
.sidebar[data-global-sidebar] .sidebar-link span:not(.sidebar-icon){
  font-weight:500 !important;
  letter-spacing:.005em;
}
.sidebar[data-global-sidebar] .sidebar-link.active span:not(.sidebar-icon){
  font-weight:600 !important;
}
.sidebar[data-global-sidebar] .sidebar-icon img{
  width:23px;
  height:23px;
  opacity:.96;
  filter:drop-shadow(0 5px 12px rgba(0,0,0,.22));
}
.app-shell.sidebar-collapsed .sidebar-icon img{
  width:24px;
  height:24px;
}

/* STEP 014 — Icone sidebar leggermente più grandi e link dashboard meno bold */
.sidebar[data-global-sidebar] .sidebar-icon{
  width:27px;
  min-width:27px;
  height:27px;
}
.sidebar[data-global-sidebar] .sidebar-icon img{
  width:26px !important;
  height:26px !important;
  opacity:.98;
}
.app-shell.sidebar-collapsed .sidebar-icon img{
  width:27px !important;
  height:27px !important;
}

/* Le call-to-action testuali nelle card dashboard non devono sembrare titoli/bottoni bold. */
.dashboard-content .premium-card-header a,
.dashboard-content .card-header a,
.dashboard-content .card-bottom-link,
.dashboard-content .account-list .account-status,
.dashboard-content .account-list span:last-child,
.dashboard-content a[href*="conti"],
.dashboard-content a[href*="movimenti"],
.dashboard-content a[href*="obiettivi"],
.dashboard-content a[href*="report"],
.dashboard-content a[href*="impostazioni"]{
  font-weight:500 !important;
}

.dashboard-content .card-bottom-link{
  letter-spacing:.01em;
}

/* STEP 015 — Titoli card leggermente più piccoli e stato Disponibile meno bold */
.dashboard-content .premium-card h2,
.dashboard-content .premium-card-header h2{
  font-size:20px !important;
  line-height:1.12;
  font-weight:750 !important;
  letter-spacing:-.025em;
}

.dashboard-content .account-amount span,
.dashboard-content .premium-account-row .account-amount span,
.dashboard-content .account-status{
  font-weight:500 !important;
}

/* STEP 016 — Action sheet compatto come mockup ufficiale */
.sheet-backdrop{
  background:transparent !important;
  z-index:38 !important;
}
.quick-sheet,
.premium-quick-sheet{
  right:26px !important;
  bottom:112px !important;
  width:210px !important;
  max-width:calc(100vw - 32px) !important;
  padding:14px !important;
  border-radius:16px !important;
  gap:10px !important;
  background:#fff !important;
  border:1px solid rgba(220,229,221,.92) !important;
  box-shadow:0 18px 42px rgba(15,23,42,.18),0 4px 14px rgba(15,23,42,.08) !important;
  z-index:45 !important;
}
.quick-sheet h2,
.quick-sheet .sheet-handle,
.quick-sheet [data-action="close-quick-actions"]{
  display:none !important;
}
.quick-sheet .btn,
.premium-quick-sheet .btn{
  width:100% !important;
  min-height:48px !important;
  padding:11px 14px !important;
  border-radius:10px !important;
  font-size:17px !important;
  font-weight:650 !important;
  justify-content:center !important;
  gap:10px !important;
  box-shadow:0 9px 18px rgba(15,23,42,.12),inset 0 1px 0 rgba(255,255,255,.22) !important;
}
.quick-sheet .btn span,
.premium-quick-sheet .btn span{
  font-size:23px;
  line-height:1;
  font-weight:400;
}
/* STEP 039T — Punta elegante action sheet pulsante +: triangolo reale, non rombo */
.quick-sheet:before,
.premium-quick-sheet:before{
  content:none !important;
  display:none !important;
}
.quick-sheet:after,
.premium-quick-sheet:after{
  content:"" !important;
  position:absolute !important;
  right:42px !important;
  bottom:-9px !important;
  width:0 !important;
  height:0 !important;
  background:transparent !important;
  border-left:9px solid transparent !important;
  border-right:9px solid transparent !important;
  border-top:9px solid #fff !important;
  border-bottom:0 !important;
  transform:none !important;
  filter:none !important;
  box-shadow:none !important;
  display:block !important;
  pointer-events:none !important;
}
@media(max-width:640px){
  .quick-sheet,
  .premium-quick-sheet{
    right:18px !important;
    bottom:102px !important;
    width:206px !important;
    padding:13px !important;
  }
  .quick-sheet:after,
  .premium-quick-sheet:after{
    right:41px !important;
    bottom:-8px !important;
    border-left-width:8px !important;
    border-right-width:8px !important;
    border-top-width:8px !important;
    transform:none !important;
    background:transparent !important;
  }
}

/* STEP 017 — Movimenti reali: modale premium Entrata/Uscita/Trasferimento */
.movement-modal-shell[hidden]{display:none!important}
.movement-modal-shell{position:fixed;inset:0;z-index:80;display:grid;place-items:center;padding:22px}
.movement-modal-backdrop{position:absolute;inset:0;background:rgba(7,31,25,.34);backdrop-filter:blur(3px)}
.movement-modal-card{position:relative;width:min(520px,100%);max-height:calc(100vh - 44px);overflow:auto;background:#fff;border:1px solid rgba(220,229,221,.98);border-radius:24px;box-shadow:0 28px 80px rgba(15,23,42,.28);padding:24px}
.movement-modal-x{position:absolute;right:16px;top:14px;width:36px;height:36px;border:1px solid var(--color-border-soft);background:#fff;border-radius:12px;color:#6b7280;font-size:24px;line-height:1;cursor:pointer}
.movement-modal-head{display:flex;align-items:center;gap:14px;margin:4px 0 20px;padding-right:42px}.movement-modal-head h2{margin:0;font-size:27px;line-height:1.05;letter-spacing:-.035em}.movement-modal-icon{width:52px;height:52px;border-radius:16px;display:grid;place-items:center;background:rgba(31,157,99,.12);color:#0f7a4f;font-size:30px;font-weight:600}.movement-modal-shell[data-movement-mode="expense"] .movement-modal-icon{background:rgba(240,68,68,.12);color:#f04444}.movement-modal-shell[data-movement-mode="transfer"] .movement-modal-icon{background:rgba(47,128,237,.12);color:#2f80ed}.movement-form{display:grid;gap:14px}.movement-form label{display:grid;gap:7px;font-weight:650;color:#111827}.movement-form label span{font-size:14px;color:#4b5563}.movement-form input,.movement-form select{width:100%;border:1px solid var(--color-border-soft);background:#fff;border-radius:14px;padding:13px 14px;font-size:16px;color:#111827;outline:none}.movement-form input:focus,.movement-form select:focus{border-color:#1f9d63;box-shadow:0 0 0 4px rgba(31,157,99,.12)}.movement-modal-actions{display:grid;grid-template-columns:1fr 1.25fr;gap:10px;margin-top:6px}.movement-modal-actions .btn{min-height:48px}.movement-modal-actions .btn:disabled{opacity:.65;cursor:wait}.amount-positive{color:#0f7a4f!important}.amount-negative{color:#f04444!important}.form-message-info{background:rgba(47,128,237,.10);border:1px solid rgba(47,128,237,.20);color:#1d4ed8}
@media(max-width:640px){.movement-modal-shell{align-items:end;padding:14px}.movement-modal-card{border-radius:22px 22px 18px 18px;padding:20px}.movement-modal-head h2{font-size:24px}.movement-modal-actions{grid-template-columns:1fr}}

/* STEP 019 — Pagina Movimenti reali */
.movements-content{display:grid;gap:22px}.movements-summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.movement-summary-card{position:relative;overflow:hidden;border-radius:22px;padding:22px;color:#fff;box-shadow:0 16px 36px rgba(15,23,42,.12);min-height:132px;display:flex;flex-direction:column;justify-content:space-between}.movement-summary-card:after{content:"";position:absolute;right:-28px;bottom:-38px;width:130px;height:130px;border-radius:50%;background:rgba(255,255,255,.13)}.movement-summary-card span,.movement-summary-card small{position:relative;z-index:1;color:rgba(255,255,255,.86)}.movement-summary-card strong{position:relative;z-index:1;font-size:34px;line-height:1;letter-spacing:-.04em}.movement-summary-income{background:linear-gradient(135deg,#1F9D63,#0F7A4F)}.movement-summary-expense{background:linear-gradient(135deg,#F04444,#B42318)}.movement-summary-transfer{background:linear-gradient(135deg,#2F80ED,#1559B7)}.movements-panel{padding:24px}.movements-header{align-items:flex-start}.movements-header p:not(.eyebrow){margin:4px 0 0}.movements-toolbar{display:grid;grid-template-columns:auto minmax(220px,1fr) 180px;gap:14px;align-items:end;margin:8px 0 18px;padding:14px;border:1px solid #edf2ee;border-radius:18px;background:#f9fbf9}.movement-filter-tabs{display:flex;flex-wrap:wrap;gap:8px}.movement-filter-tab{border:1px solid #dce5dd;background:#fff;color:#374151;border-radius:12px;padding:10px 12px;font-weight:700;cursor:pointer;box-shadow:0 8px 18px rgba(15,23,42,.05)}.movement-filter-tab.active{background:#0f7a4f;color:#fff;border-color:#0f7a4f}.movement-search-field,.movement-month-field{display:grid;gap:6px;font-weight:700;color:#4b5563}.movement-search-field span,.movement-month-field span{font-size:13px}.movement-search-field input,.movement-month-field input{width:100%;border:1px solid #dce5dd;background:#fff;border-radius:13px;padding:11px 13px;color:#111827;outline:none}.movement-search-field input:focus,.movement-month-field input:focus{border-color:#1f9d63;box-shadow:0 0 0 4px rgba(31,157,99,.12)}.movements-list{display:grid;gap:12px}.movement-real-row{display:grid;grid-template-columns:44px minmax(0,1fr) auto;gap:14px;align-items:center;padding:15px;border:1px solid #edf2ee;border-radius:16px;background:#fff;box-shadow:0 10px 26px rgba(15,23,42,.055)}.movement-real-row:hover{border-color:#dce5dd;box-shadow:0 14px 30px rgba(15,23,42,.08)}.movement-icon.transfer{background:rgba(47,128,237,.12);color:#2F80ED}.movement-real-main{min-width:0}.movement-real-title{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.movement-real-title strong{font-size:16px}.movement-real-main small{display:block;margin-top:3px;color:#6b7280}.movement-real-main p{margin:6px 0 0;color:#6b7280;font-size:14px}.movement-real-side{text-align:right;display:grid;gap:4px;white-space:nowrap}.movement-real-side strong{font-size:17px}.movement-real-side small{color:#6b7280}.amount-transfer{color:#2F80ED!important}.movement-real-badge{display:inline-flex;align-items:center;border-radius:999px;padding:4px 8px;font-size:12px;font-weight:800}.movement-real-badge-income{background:rgba(31,157,99,.12);color:#1F9D63}.movement-real-badge-expense{background:rgba(240,68,68,.12);color:#F04444}.movement-real-badge-transfer{background:rgba(47,128,237,.12);color:#2F80ED}.movements-empty{border:1px dashed #dce5dd;border-radius:18px;background:#f8faf8;padding:28px;text-align:center}.movements-empty strong{display:block;font-size:18px;margin-bottom:4px}.movements-empty p{margin:0;color:#6b7280}.form-message-success{background:rgba(31,157,99,.10);border:1px solid rgba(31,157,99,.22);color:#0f7a4f}.form-message-error{background:rgba(240,68,68,.10);border:1px solid rgba(240,68,68,.22);color:#b42318}.form-message{border-radius:14px;padding:12px 14px;margin-bottom:14px;font-weight:700}
@media(max-width:1050px){.movements-summary-grid{grid-template-columns:1fr}.movements-toolbar{grid-template-columns:1fr}.movement-summary-card strong{font-size:30px}}@media(max-width:640px){.movements-panel{padding:18px}.movement-real-row{grid-template-columns:40px minmax(0,1fr);align-items:flex-start}.movement-real-side{grid-column:2;text-align:left}.movement-filter-tabs{display:grid;grid-template-columns:1fr 1fr}.movement-filter-tab{padding:10px 8px}.movement-summary-card{min-height:118px}.movement-summary-card strong{font-size:28px}}

/* STEP 019B — Movimenti: controlli premium, niente input mese nativo */
.movements-toolbar{grid-template-columns:minmax(260px,auto) minmax(240px,1fr) minmax(280px,auto);align-items:end;background:linear-gradient(135deg,#ffffff,#f4f8f5);border:1px solid var(--color-border-soft);box-shadow:0 12px 28px rgba(15,23,42,.055)}
.movement-filter-tabs{background:#eef5f0;border:1px solid #dce8df;border-radius:16px;padding:5px;gap:5px}
.movement-filter-tab{appearance:none;-webkit-appearance:none;border:0;background:transparent;color:#375149;border-radius:12px;padding:11px 14px;font-weight:650;box-shadow:none;line-height:1;transition:background .18s ease,color .18s ease,box-shadow .18s ease,transform .18s ease}
.movement-filter-tab:hover{background:#fff;color:#0f7a4f;box-shadow:0 8px 18px rgba(15,23,42,.06)}
.movement-filter-tab.active{background:#0f7a4f;color:#fff;box-shadow:0 10px 22px rgba(15,122,79,.22)}
.movement-search-field,.movement-period-field{display:grid;gap:7px;font-weight:650;color:#4b5563}
.movement-search-field span,.movement-period-field>span{font-size:13px;letter-spacing:.01em}
.movement-search-field input{appearance:none;-webkit-appearance:none;width:100%;border:1px solid #dce5dd;background:#fff;border-radius:14px;padding:12px 14px;color:#111827;outline:none;box-shadow:0 8px 18px rgba(15,23,42,.045)}
.movement-search-field input:focus{border-color:#1f9d63;box-shadow:0 0 0 4px rgba(31,157,99,.12),0 8px 18px rgba(15,23,42,.045)}
.movement-period-control{display:flex;align-items:center;gap:7px;background:#eef5f0;border:1px solid #dce8df;border-radius:16px;padding:5px;min-height:46px}
.movement-period-control button{appearance:none;-webkit-appearance:none;border:0;cursor:pointer;font:inherit;line-height:1;background:transparent;color:#375149;border-radius:12px;transition:background .18s ease,color .18s ease,box-shadow .18s ease}
.movement-period-all{padding:11px 13px;font-weight:650;white-space:nowrap}
.movement-period-nav{width:36px;height:36px;display:grid;place-items:center;font-size:22px;font-weight:500}
.movement-period-current{min-width:132px;padding:11px 13px;text-transform:capitalize;font-weight:650;white-space:nowrap}
.movement-period-control button:hover{background:#fff;color:#0f7a4f;box-shadow:0 8px 18px rgba(15,23,42,.06)}
.movement-period-control button.active{background:#0f7a4f;color:#fff;box-shadow:0 10px 22px rgba(15,122,79,.22)}
@media(max-width:1050px){.movements-toolbar{grid-template-columns:1fr}.movement-period-control{width:100%;flex-wrap:wrap}.movement-period-current{flex:1;min-width:160px}}
@media(max-width:640px){.movement-filter-tabs{display:grid;grid-template-columns:1fr 1fr}.movement-filter-tab{padding:11px 8px}.movement-period-all{flex:1}.movement-period-current{min-width:0;flex:1 1 100%;order:5}.movement-period-nav{flex:0 0 44px}}

/* STEP 020 — Pagina Conti reali */
.accounts-content{display:grid;gap:22px}
.accounts-hero-grid{display:grid;grid-template-columns:1.3fr .85fr .95fr;gap:18px}
.account-hero-card{position:relative;overflow:hidden;border-radius:24px;padding:22px;min-height:138px;color:#fff;box-shadow:0 18px 38px rgba(15,23,42,.13);display:flex;flex-direction:column;justify-content:space-between}
.account-hero-card:after{content:"";position:absolute;right:-34px;bottom:-44px;width:145px;height:145px;border-radius:50%;background:rgba(255,255,255,.13)}
.account-hero-card span,.account-hero-card strong,.account-hero-card small{position:relative;z-index:1}
.account-hero-card span{font-weight:650;color:rgba(255,255,255,.86)}
.account-hero-card strong{font-size:38px;line-height:1;letter-spacing:-.045em;color:#fff}
.account-hero-card.account-hero-updated strong{font-size:24px;line-height:1.08;letter-spacing:-.02em}
.account-hero-card small{color:rgba(255,255,255,.82)}
.account-hero-total{background:linear-gradient(135deg,#0F7A4F,#095B3A)}
.account-hero-visible{background:linear-gradient(135deg,#1B6A51,#0B2F26)}
.account-hero-updated{background:linear-gradient(135deg,#2F80ED,#1559B7)}
.accounts-panel{padding:24px}
.accounts-header{align-items:flex-start;gap:18px}
.accounts-header p:not(.eyebrow){margin:4px 0 0;max-width:640px}
.accounts-create-action{white-space:nowrap;display:inline-flex;align-items:center;gap:8px}.accounts-create-action span{font-size:18px;line-height:1}
.accounts-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-top:20px}
.account-real-card{position:relative;overflow:hidden;border:1px solid #c9d8ce;background:linear-gradient(180deg,#f9fcf9 0%,#f1f7f3 100%);border-radius:22px;padding:18px;min-height:230px;display:flex;flex-direction:column;justify-content:space-between;box-shadow:0 18px 42px rgba(15,47,38,.12),0 2px 0 rgba(255,255,255,.84) inset;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease,background .18s ease;cursor:grab;user-select:none}
.account-real-card:hover{transform:translateY(-2px);border-color:#aec5b6;background:linear-gradient(180deg,#fbfffc 0%,#edf6f0 100%);box-shadow:0 24px 52px rgba(15,47,38,.16),0 0 0 4px rgba(31,157,99,.055),0 2px 0 rgba(255,255,255,.9) inset}
.account-real-card:active{cursor:grabbing}
.account-real-card:after{content:"";position:absolute;right:-38px;top:-38px;width:118px;height:118px;border-radius:50%;background:radial-gradient(circle,rgba(31,157,99,.13) 0%,rgba(31,157,99,.08) 52%,rgba(31,157,99,0) 72%)}
.account-real-card:before{content:"";position:absolute;inset:0;border-radius:inherit;background:linear-gradient(135deg,rgba(255,255,255,.75),rgba(255,255,255,0) 42%);pointer-events:none}
.account-real-card.is-disabled{opacity:.74;background:linear-gradient(180deg,#f6f9f6 0%,#eef4ef 100%);border-color:#d4ded7}
.account-card-topline{display:flex;align-items:center;justify-content:flex-start;gap:12px;position:relative;z-index:1}
.account-card-icon{width:50px;height:50px;border-radius:17px;display:grid;place-items:center;background:var(--account-color,rgba(15,122,79,.11));color:#0f7a4f;font-weight:850;font-size:24px;line-height:1;box-shadow:inset 0 1px 0 rgba(255,255,255,.8),0 10px 22px rgba(15,23,42,.07)}
.account-card-icon.prepaid_card,.account-card-icon.credit_card{background:var(--account-color,rgba(47,128,237,.11));color:#2f80ed}
.account-card-icon.emergency_fund,.account-card-icon.savings_account,.account-card-icon.piggy_bank{background:var(--account-color,rgba(31,157,99,.12));color:#1f9d63}
.account-card-icon.digital_wallet{background:var(--account-color,rgba(124,77,255,.10));color:#7c4dff}

.berrywallet-inline-icon{display:block;width:36px;height:32px;object-fit:contain}
.account-card-icon .berrywallet-inline-icon{width:46px;height:40px}
.account-edit-icon .berrywallet-inline-icon{width:46px;height:40px}
.account-type-option .berrywallet-inline-icon{width:38px;height:34px}
.account-avatar .berrywallet-inline-icon,.movement-select-option-icon .berrywallet-inline-icon,.goal-choice-icon .berrywallet-inline-icon,.patrimonio-choice-icon .berrywallet-inline-icon,.due-choice-icon .berrywallet-inline-icon,.settings-account-choice-icon .berrywallet-inline-icon{width:36px;height:32px}
.berrywallet-inline-icon--square{width:36px;height:36px}
.account-card-icon .berrywallet-inline-icon--square{width:46px;height:46px}
.account-edit-icon .berrywallet-inline-icon--square{width:46px;height:46px}
.account-type-option .berrywallet-inline-icon--square{width:38px;height:38px}
.account-avatar .berrywallet-inline-icon--square,.movement-select-option-icon .berrywallet-inline-icon--square,.goal-choice-icon .berrywallet-inline-icon--square,.patrimonio-choice-icon .berrywallet-inline-icon--square,.due-choice-icon .berrywallet-inline-icon--square,.settings-account-choice-icon .berrywallet-inline-icon--square{width:36px;height:36px}




.account-card-main{position:relative;z-index:1;padding-top:16px}
.account-card-main h3{margin:0;font-size:20px;line-height:1.15;letter-spacing:-.025em;color:#4f5f73;font-weight:720}
.account-balance{display:block;margin-top:14px;font-size:30px;line-height:1;letter-spacing:-.045em;color:#095b3a}
.account-card-footer{position:relative;z-index:1;margin-top:18px;padding-top:14px;border-top:1px solid #dfe9e2;display:grid;gap:4px}
.account-card-footer span{font-weight:800;color:#0f7a4f;font-size:13px}
.account-card-footer small{color:#6b7280;font-size:13px;line-height:1.35}
.accounts-empty{grid-column:1/-1;border:1px dashed #dce5dd;border-radius:20px;background:#f8faf8;padding:30px;text-align:center}
.accounts-empty strong{display:block;font-size:18px;margin-bottom:5px;color:#111827}
.accounts-empty p{margin:0;color:#6b7280}
@media(max-width:1180px){.accounts-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.accounts-hero-grid{grid-template-columns:1fr}.account-hero-card strong{font-size:34px}.account-hero-card.account-hero-updated strong{font-size:23px}}
@media(max-width:720px){.accounts-panel{padding:18px}.accounts-header{display:grid}.accounts-create-action{width:100%;justify-content:center}.accounts-grid{grid-template-columns:1fr}.account-real-card{min-height:210px}.account-hero-card{min-height:124px}.account-hero-card strong{font-size:30px}.account-hero-card.account-hero-updated strong{font-size:22px}}

/* STEP 021 — Gestione modifica conto */
body.modal-open{overflow:hidden}
.account-card-topline{justify-content:space-between}
.account-edit-action{cursor:pointer;position:relative;z-index:2;display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border:1px solid #dce5dd;background:#fff;color:#0f7a4f;border-radius:12px;padding:0;box-shadow:0 8px 18px rgba(15,23,42,.06);cursor:pointer;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease,background .18s ease}
.account-edit-action:hover{transform:translateY(-1px);border-color:rgba(15,122,79,.35);background:#f7fbf8;box-shadow:0 12px 24px rgba(15,23,42,.10)}
.account-edit-icon-svg{width:18px;height:18px;stroke:currentColor;stroke-width:1.9;fill:none;stroke-linecap:round;stroke-linejoin:round}
.account-edit-action[data-tooltip]:before{content:attr(data-tooltip);position:absolute;right:0;bottom:calc(100% + 10px);padding:7px 10px;border-radius:10px;background:#0b2f26;color:#fff;font-size:12px;font-weight:800;letter-spacing:.01em;white-space:nowrap;box-shadow:0 12px 24px rgba(15,23,42,.18);opacity:0;transform:translateY(4px);pointer-events:none;transition:opacity .16s ease,transform .16s ease}
.account-edit-action[data-tooltip]:after{content:"";position:absolute;right:14px;bottom:calc(100% + 4px);border:6px solid transparent;border-top-color:#0b2f26;opacity:0;transform:translateY(4px);pointer-events:none;transition:opacity .16s ease,transform .16s ease}
.account-edit-action[data-tooltip]:hover:before,.account-edit-action[data-tooltip]:focus-visible:before,.account-edit-action[data-tooltip]:hover:after,.account-edit-action[data-tooltip]:focus-visible:after{opacity:1;transform:translateY(0)}
.account-edit-modal-shell[hidden]{display:none!important}
.account-edit-modal-shell{position:fixed;inset:0;z-index:92;display:grid;place-items:center;padding:22px}
.account-edit-backdrop{position:absolute;inset:0;background:rgba(7,31,25,.38);backdrop-filter:blur(3px)}
.account-edit-card{position:relative;width:min(640px,100%);max-height:calc(100vh - 44px);overflow:auto;background:#fff;border:1px solid rgba(220,229,221,.98);border-radius:26px;box-shadow:0 30px 90px rgba(15,23,42,.30);padding:24px}
.account-edit-x{position:absolute;right:16px;top:14px;width:36px;height:36px;border:1px solid var(--color-border-soft);background:#fff;border-radius:12px;color:#6b7280;font-size:24px;line-height:1;cursor:pointer}
.account-edit-head{display:flex;align-items:center;gap:15px;margin:4px 0 20px;padding-right:44px}
.account-edit-head h2{margin:0;font-size:28px;line-height:1.05;letter-spacing:-.035em;color:#111827}
.account-edit-head small{display:block;margin-top:4px;color:#6b7280;font-size:13px}.account-edit-icon{width:54px;height:54px;border-radius:18px;display:grid;place-items:center;background:rgba(31,157,99,.12);font-size:28px;box-shadow:inset 0 1px 0 rgba(255,255,255,.8)}
.account-edit-form{display:grid;gap:16px}.account-edit-form label{display:grid;gap:7px;font-weight:750;color:#111827}.account-edit-form label span,.account-edit-fieldset>span{font-size:14px;color:#4b5563;font-weight:800}.account-edit-form input{width:100%;border:1px solid var(--color-border-soft);background:#fff;border-radius:14px;padding:13px 14px;font-size:16px;color:#111827;outline:none}.account-edit-form input:focus{border-color:#1f9d63;box-shadow:0 0 0 4px rgba(31,157,99,.12)}
.account-edit-fieldset{display:grid;gap:9px}.account-type-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.account-type-option{min-height:48px;border:1px solid #dce5dd;background:#fff;border-radius:14px;color:#111827;font-weight:520;font-size:13px;display:flex;align-items:center;justify-content:flex-start;gap:8px;padding:10px 11px;cursor:pointer;box-shadow:0 8px 18px rgba(15,23,42,.045);transition:.18s ease}.account-type-option span{font-size:20px;line-height:1}.account-type-option:hover{border-color:rgba(15,122,79,.35);transform:translateY(-1px)}.account-type-option.is-selected{border-color:#1f9d63;background:rgba(31,157,99,.10);box-shadow:0 0 0 4px rgba(31,157,99,.10);color:#095b3a;font-weight:620}
.account-color-grid{display:flex;flex-wrap:wrap;gap:10px}.account-color-option{width:38px;height:38px;border-radius:14px;border:3px solid #fff;background:var(--swatch);box-shadow:0 0 0 1px #dce5dd,0 10px 20px rgba(15,23,42,.10);cursor:pointer;transition:.18s ease}.account-color-option:hover{transform:translateY(-1px)}.account-color-option.is-selected{box-shadow:0 0 0 3px rgba(31,157,99,.25),0 12px 22px rgba(15,23,42,.13)}
.account-edit-toggle-row{display:flex;align-items:center;justify-content:space-between;gap:18px;border:1px solid #dce5dd;background:#f8faf8;border-radius:18px;padding:14px 16px}.account-edit-toggle-row strong{display:block;color:#111827}.account-edit-toggle-row small{display:block;margin-top:3px;color:#6b7280;line-height:1.35}.account-toggle{width:64px;height:36px;border-radius:999px;border:0;background:#cbd5d1;padding:4px;cursor:pointer;transition:.18s ease;flex:0 0 auto}.account-toggle span{display:block;width:28px;height:28px;border-radius:50%;background:#fff;box-shadow:0 5px 12px rgba(15,23,42,.20);transition:.18s ease}.account-toggle.is-active{background:#1f9d63}.account-toggle.is-active span{transform:translateX(28px)}
.account-edit-actions{display:grid;grid-template-columns:1fr 1.25fr;gap:10px;margin-top:2px}.account-edit-actions .btn{min-height:48px}.account-edit-actions .btn:disabled{opacity:.65;cursor:wait}
@media(max-width:720px){.account-edit-modal-shell{align-items:end;padding:14px}.account-edit-card{border-radius:24px 24px 18px 18px;padding:20px}.account-edit-head h2{font-size:25px}.account-type-grid{grid-template-columns:1fr}.account-edit-actions{grid-template-columns:1fr}.account-edit-toggle-row{align-items:flex-start}.account-edit-action{cursor:pointer;width:38px;height:38px}.account-edit-action[data-tooltip]:before,.account-edit-action[data-tooltip]:after{display:none}}

/* STEP 022 — Ordinamento drag & drop Conti */
.account-card-actions{display:flex;align-items:center;gap:8px;position:relative;z-index:2}
.accounts-grid.is-sorting .account-real-card{transition:transform .14s ease,box-shadow .14s ease,border-color .14s ease,opacity .14s ease}
.account-real-card.is-dragging{opacity:.55;transform:scale(.985);border-color:rgba(15,122,79,.45);box-shadow:0 16px 36px rgba(15,23,42,.16)}
.account-real-card.is-drag-over{border-color:#1f9d63;box-shadow:0 0 0 4px rgba(31,157,99,.12),0 18px 38px rgba(15,23,42,.10)}
.account-real-card.is-drag-over:before{content:"Rilascia qui";position:absolute;left:18px;right:18px;bottom:16px;height:34px;border-radius:999px;background:rgba(31,157,99,.10);border:1px dashed rgba(31,157,99,.36);color:#0f7a4f;display:grid;place-items:center;font-size:12px;font-weight:900;z-index:3;pointer-events:none}
@media(max-width:720px){.account-card-actions{gap:7px}.account-real-card.is-drag-over:before{bottom:12px}}

/* STEP 023 — Modale movimento super premium: dropdown custom, niente menu nativi */
.movement-modal-card{
  width:min(560px,100%);
  border-radius:28px;
  padding:26px;
  background:
    radial-gradient(circle at 100% 0%, rgba(31,157,99,.10), transparent 34%),
    linear-gradient(180deg,#ffffff 0%,#fbfdfb 100%);
  border:1px solid rgba(220,229,221,.95);
  box-shadow:0 34px 95px rgba(7,31,25,.30);
}
.movement-modal-head{
  padding:4px 46px 18px 0;
  margin:0 0 18px;
  border-bottom:1px solid rgba(220,229,221,.78);
}
.movement-modal-head h2{font-size:29px;font-weight:760;color:#0b1720}
.movement-modal-head .eyebrow{margin:0 0 4px;font-size:12px;letter-spacing:.14em;text-transform:uppercase;color:#0f7a4f;font-weight:820}
.movement-modal-icon{box-shadow:inset 0 1px 0 rgba(255,255,255,.85),0 14px 28px rgba(15,122,79,.12)}
.movement-modal-x{z-index:3;transition:background .18s ease,transform .18s ease,border-color .18s ease;color:#4b5563}
.movement-modal-x:hover{background:#f7fbf8;border-color:rgba(15,122,79,.25);transform:translateY(-1px)}
.movement-form{gap:15px}
.movement-form label,.movement-field{display:grid;gap:7px;font-weight:620;color:#111827}
.movement-form label span,.movement-field-label{font-size:13px;color:#4b5563;font-weight:720;letter-spacing:.01em}
.movement-form input{appearance:none;-webkit-appearance:none;border-radius:16px;padding:14px 15px;background:#fff;box-shadow:0 8px 18px rgba(15,23,42,.035)}
.movement-form input:focus{border-color:#1f9d63;box-shadow:0 0 0 4px rgba(31,157,99,.12),0 8px 18px rgba(15,23,42,.04)}
.movement-custom-select{position:relative;z-index:1}
.movement-custom-select.is-open{z-index:20}
.movement-select-trigger{
  appearance:none;
  -webkit-appearance:none;
  width:100%;
  min-height:52px;
  border:1px solid var(--color-border-soft);
  background:#fff;
  color:#111827;
  border-radius:16px;
  padding:8px 12px 8px 15px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  font:inherit;
  font-size:16px;
  font-weight:570;
  text-align:left;
  cursor:pointer;
  box-shadow:0 8px 18px rgba(15,23,42,.04);
  transition:border-color .18s ease,box-shadow .18s ease,background .18s ease,transform .18s ease;
}
.movement-select-trigger:hover{border-color:rgba(15,122,79,.32);background:#fbfdfb;box-shadow:0 12px 24px rgba(15,23,42,.065)}
.movement-select-trigger:focus-visible{outline:none;border-color:#1f9d63;box-shadow:0 0 0 4px rgba(31,157,99,.12),0 10px 20px rgba(15,23,42,.05)}
.movement-select-trigger em{width:30px;height:30px;border-radius:11px;display:grid;place-items:center;background:#eef6f1;color:#0f7a4f;font-style:normal;font-size:18px;line-height:1;transition:transform .18s ease,background .18s ease}
.movement-custom-select.is-open .movement-select-trigger{border-color:#1f9d63;box-shadow:0 0 0 4px rgba(31,157,99,.12),0 14px 26px rgba(15,23,42,.08)}
.movement-custom-select.is-open .movement-select-trigger em{transform:rotate(180deg);background:#0f7a4f;color:#fff}
.movement-select-menu{
  position:absolute;
  left:0;
  right:0;
  top:calc(100% + 8px);
  max-height:238px;
  overflow:auto;
  padding:8px;
  border:1px solid rgba(220,229,221,.96);
  background:#fff;
  border-radius:18px;
  box-shadow:0 22px 55px rgba(15,23,42,.18);
}
.movement-select-option{
  appearance:none;
  -webkit-appearance:none;
  width:100%;
  border:0;
  background:transparent;
  color:#111827;
  border-radius:14px;
  padding:10px;
  display:flex;
  align-items:center;
  gap:10px;
  text-align:left;
  cursor:pointer;
  font:inherit;
  transition:background .16s ease,transform .16s ease,color .16s ease;
}
.movement-select-option:hover{background:#f4f8f5;transform:translateX(2px)}
.movement-select-option.is-selected{background:rgba(31,157,99,.11);color:#095b3a}
.movement-select-option-icon{width:34px;height:34px;flex:0 0 auto;border-radius:12px;display:grid;place-items:center;background:#eef6f1;font-size:18px}
.movement-select-option-copy{display:grid;gap:2px;min-width:0}
.movement-select-option-copy strong{font-size:14px;font-weight:620;line-height:1.15;color:inherit}
.movement-select-option-copy small{font-size:12px;color:#6b7280;font-weight:520}
.movement-modal-actions{margin-top:8px;padding-top:4px}
.movement-modal-actions .btn{border-radius:15px;font-weight:760}
.movement-modal-shell[data-movement-mode="income"] .movement-modal-card{background:radial-gradient(circle at 100% 0%, rgba(31,157,99,.13), transparent 35%),linear-gradient(180deg,#ffffff 0%,#fbfdfb 100%)}
.movement-modal-shell[data-movement-mode="expense"] .movement-modal-card{background:radial-gradient(circle at 100% 0%, rgba(240,68,68,.11), transparent 35%),linear-gradient(180deg,#ffffff 0%,#fffdfd 100%)}
.movement-modal-shell[data-movement-mode="transfer"] .movement-modal-card{background:radial-gradient(circle at 100% 0%, rgba(47,128,237,.12), transparent 35%),linear-gradient(180deg,#ffffff 0%,#fbfdff 100%)}
@media(max-width:640px){
  .movement-modal-card{padding:21px;border-radius:24px 24px 18px 18px}
  .movement-modal-head{padding-bottom:15px;margin-bottom:15px}
  .movement-modal-head h2{font-size:25px}
  .movement-select-menu{max-height:210px}
}

/* STEP 023D — Modale movimenti: scrollbar interna alla card */
.movement-modal-shell{
  overflow:hidden;
  place-items:center;
  align-items:center;
  justify-items:center;
  padding:22px;
}
.movement-modal-shell::-webkit-scrollbar{display:none}
.movement-modal-card{
  max-height:calc(100dvh - 44px)!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  margin:0;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-color:rgba(9,91,58,.42) transparent;
}
.movement-modal-card::-webkit-scrollbar{width:10px}
.movement-modal-card::-webkit-scrollbar-track{background:transparent;border-radius:999px}
.movement-modal-card::-webkit-scrollbar-thumb{background:rgba(9,91,58,.38);border-radius:999px;border:3px solid transparent;background-clip:content-box}
.movement-modal-card::-webkit-scrollbar-thumb:hover{background:rgba(9,91,58,.58);border:3px solid transparent;background-clip:content-box}
.movement-date-control{
  display:grid;
  grid-template-columns:48px minmax(0,1fr) 48px;
  gap:10px;
  align-items:center;
}
.movement-date-nav,
.movement-date-display{
  appearance:none;
  -webkit-appearance:none;
  border:1px solid #dce5dd;
  background:#fff;
  color:#0b1720;
  border-radius:16px;
  min-height:54px;
  cursor:pointer;
  box-shadow:0 10px 22px rgba(15,23,42,.045);
  transition:background .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease,color .18s ease;
}
.movement-date-nav{
  display:grid;
  place-items:center;
  font-size:28px;
  line-height:1;
  color:#0f7a4f;
  font-weight:520;
}
.movement-date-display{
  display:grid;
  place-items:center;
  gap:1px;
  padding:9px 12px;
  text-align:center;
}
.movement-date-display strong{
  color:#0b1720;
  font-size:15px;
  font-weight:680;
  text-transform:capitalize;
  line-height:1.15;
}
.movement-date-display small{
  color:#6b7280;
  font-size:11px;
  font-weight:560;
}
.movement-date-nav:hover,
.movement-date-display:hover{
  border-color:rgba(15,122,79,.32);
  background:#fbfdfb;
  box-shadow:0 12px 24px rgba(15,23,42,.065);
  transform:translateY(-1px);
}
.movement-date-nav:focus-visible,
.movement-date-display:focus-visible{
  outline:none;
  border-color:#1f9d63;
  box-shadow:0 0 0 4px rgba(31,157,99,.12),0 10px 22px rgba(15,23,42,.055);
}
@media(max-width:640px){
  .movement-modal-shell{padding:14px;align-items:end;place-items:end center}
  .movement-modal-card{max-height:calc(100dvh - 28px)!important;margin:0}
  .movement-date-control{grid-template-columns:44px minmax(0,1fr) 44px;gap:8px}
  .movement-date-nav,.movement-date-display{min-height:50px;border-radius:15px}
}

/* STEP 024 — Feedback premium modale movimenti */
.movement-live-summary{
  border:1px solid rgba(220,229,221,.96);
  border-radius:16px;
  padding:12px 14px;
  background:#fff;
  color:#0b1720;
  font-size:14px;
  font-weight:650;
  line-height:1.35;
  box-shadow:0 10px 22px rgba(15,23,42,.045);
}
.movement-live-summary-income{
  border-color:rgba(31,157,99,.24);
  background:rgba(31,157,99,.075);
  color:#095b3a;
}
.movement-live-summary-expense{
  border-color:rgba(240,68,68,.24);
  background:rgba(240,68,68,.075);
  color:#991b1b;
}
.movement-live-summary-transfer{
  border-color:rgba(47,128,237,.24);
  background:rgba(47,128,237,.075);
  color:#1559b7;
}
.movement-live-summary[hidden]{display:none!important}
.movement-modal-shell[data-movement-mode="income"] .form-message-success{
  border-color:rgba(31,157,99,.30);
  background:rgba(31,157,99,.10);
  color:#0f7a4f;
}
.movement-modal-shell[data-movement-mode="expense"] .form-message-success{
  border-color:rgba(240,68,68,.26);
  background:rgba(240,68,68,.08);
  color:#b42318;
}
.movement-modal-shell[data-movement-mode="transfer"] .form-message-success{
  border-color:rgba(47,128,237,.28);
  background:rgba(47,128,237,.09);
  color:#1559b7;
}

.account-create-modal-shell .account-edit-card{width:min(660px,100%)}
.account-edit-form .field-helper{display:block;margin-top:-2px;color:#6b7280;font-size:12px;font-weight:500;line-height:1.35}
.account-create-preview{border:1px solid rgba(31,157,99,.18);background:linear-gradient(135deg,rgba(31,157,99,.10),rgba(9,91,58,.06));color:#095b3a;border-radius:16px;padding:13px 14px;font-size:14px;font-weight:650;line-height:1.35}
.account-create-card .account-edit-icon{background:rgba(15,122,79,.12)}
@media(max-width:720px){.account-create-preview{font-size:13px}.accounts-create-action span{font-size:17px}}

/* STEP 025B — Scrollbar interna modale Crea/Modifica conto */
.account-edit-modal-shell{
  overflow:hidden!important;
  place-items:center;
  align-items:center;
  justify-items:center;
  padding:22px;
}
.account-edit-modal-shell::-webkit-scrollbar{display:none}
.account-edit-card{
  display:flex;
  flex-direction:column;
  max-height:calc(100dvh - 44px)!important;
  overflow:hidden!important;
  margin:0;
  overscroll-behavior:contain;
}
.account-edit-head{
  flex:0 0 auto;
}
.account-edit-form{
  min-height:0;
  flex:1 1 auto;
  display:flex!important;
  flex-direction:column;
  gap:0!important;
}
.account-edit-scroll-area{
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  display:grid;
  gap:16px;
  padding-right:4px;
  margin-right:-4px;
  scrollbar-width:thin;
  scrollbar-color:rgba(9,91,58,.42) transparent;
}
.account-edit-scroll-area::-webkit-scrollbar{width:10px}
.account-edit-scroll-area::-webkit-scrollbar-track{background:transparent;border-radius:999px}
.account-edit-scroll-area::-webkit-scrollbar-thumb{background:rgba(9,91,58,.38);border-radius:999px;border:3px solid transparent;background-clip:content-box}
.account-edit-scroll-area::-webkit-scrollbar-thumb:hover{background:rgba(9,91,58,.58);border:3px solid transparent;background-clip:content-box}
.account-edit-actions{
  flex:0 0 auto;
  margin-top:18px!important;
  padding-top:14px;
  border-top:1px solid rgba(220,229,221,.78);
  background:linear-gradient(180deg,rgba(255,255,255,.94),#fff);
}
@media(max-width:720px){
  .account-edit-modal-shell{padding:14px;align-items:end;place-items:end center}
  .account-edit-card{max-height:calc(100dvh - 28px)!important;margin:0}
  .account-edit-scroll-area{padding-right:3px;margin-right:-3px}
}

/* STEP 026 — Eliminazione sicura conti */
.account-delete-action{
  cursor:pointer;
  position:relative;
  z-index:2;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height:40px;
  border:1px solid rgba(240,68,68,.22);
  background:#fff;
  color:#f04444;
  border-radius:12px;
  padding:0;
  box-shadow:0 8px 18px rgba(15,23,42,.06);
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease,background .18s ease;
}
.account-delete-action:hover{
  transform:translateY(-1px);
  border-color:rgba(240,68,68,.42);
  background:rgba(240,68,68,.06);
  box-shadow:0 12px 24px rgba(15,23,42,.10);
}
.account-delete-action[data-tooltip]:before{
  content:attr(data-tooltip);
  position:absolute;
  right:0;
  bottom:calc(100% + 10px);
  padding:7px 10px;
  border-radius:10px;
  background:#7f1d1d;
  color:#fff;
  font-size:12px;
  font-weight:800;
  letter-spacing:.01em;
  white-space:nowrap;
  box-shadow:0 12px 24px rgba(15,23,42,.18);
  opacity:0;
  transform:translateY(4px);
  pointer-events:none;
  transition:opacity .16s ease,transform .16s ease;
}
.account-delete-action[data-tooltip]:after{
  content:"";
  position:absolute;
  right:14px;
  bottom:calc(100% + 4px);
  border:6px solid transparent;
  border-top-color:#7f1d1d;
  opacity:0;
  transform:translateY(4px);
  pointer-events:none;
  transition:opacity .16s ease,transform .16s ease;
}
.account-delete-action[data-tooltip]:hover:before,
.account-delete-action[data-tooltip]:focus-visible:before,
.account-delete-action[data-tooltip]:hover:after,
.account-delete-action[data-tooltip]:focus-visible:after{
  opacity:1;
  transform:translateY(0);
}
.account-delete-card{width:min(560px,100%)}
.account-delete-icon{background:rgba(240,68,68,.10)!important;color:#f04444}
.account-delete-summary{
  display:grid;
  gap:3px;
  border:1px solid rgba(220,229,221,.95);
  background:#f8faf8;
  border-radius:18px;
  padding:16px;
}
.account-delete-summary strong{font-size:20px;color:#111827;letter-spacing:-.02em}
.account-delete-summary span{color:#667085;font-weight:650}
.account-delete-warning{
  display:grid;
  gap:5px;
  border-radius:18px;
  padding:16px;
  line-height:1.4;
}
.account-delete-warning strong{font-size:16px}
.account-delete-warning span{color:inherit;opacity:.92}
.account-delete-warning-info{border:1px solid rgba(47,128,237,.22);background:rgba(47,128,237,.08);color:#1d4ed8;font-weight:750}
.account-delete-warning-protected{border:1px solid rgba(245,158,11,.28);background:rgba(245,158,11,.12);color:#92400e}
.account-delete-warning-danger{border:1px solid rgba(240,68,68,.28);background:rgba(240,68,68,.10);color:#b42318}
.account-delete-actions .btn-danger{background:#f04444;color:#fff}
@media(max-width:720px){
  .account-delete-action{width:38px;height:38px}
  .account-delete-action[data-tooltip]:before,
  .account-delete-action[data-tooltip]:after{display:none}
}

/* STEP 026B — Cestino sempre visibile nelle card conto */
.account-card-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;
  min-width:88px;
  flex:0 0 auto;
  position:relative;
  z-index:5;
}
.account-card-actions .account-edit-action,
.account-card-actions .account-delete-action{
  display:inline-flex!important;
  visibility:visible!important;
  opacity:1!important;
  flex:0 0 40px;
}
.account-delete-action{
  border-color:rgba(240,68,68,.26)!important;
  background:rgba(240,68,68,.06)!important;
  color:#f04444!important;
}
.account-delete-action:hover{
  background:#f04444!important;
  color:#fff!important;
  border-color:#f04444!important;
}
.account-delete-action .account-edit-icon-svg{
  width:18px;
  height:18px;
}
@media(max-width:720px){
  .account-card-actions{min-width:82px;gap:6px!important}
  .account-card-actions .account-edit-action,
  .account-card-actions .account-delete-action{flex-basis:38px}
}

/* STEP 026C — Tooltip azioni Conti visibili dentro la card */
.account-card-actions{
  overflow:visible!important;
  z-index:30!important;
}
.account-card-actions .account-edit-action,
.account-card-actions .account-delete-action{
  overflow:visible!important;
}
.account-card-actions .account-edit-action[data-tooltip]:before,
.account-card-actions .account-delete-action[data-tooltip]:before{
  top:calc(100% + 10px)!important;
  bottom:auto!important;
  right:0!important;
  z-index:80!important;
  transform:translateY(-4px)!important;
}
.account-card-actions .account-edit-action[data-tooltip]:after,
.account-card-actions .account-delete-action[data-tooltip]:after{
  top:calc(100% + 4px)!important;
  bottom:auto!important;
  right:14px!important;
  z-index:81!important;
  border-color:transparent!important;
  transform:translateY(-4px)!important;
}
.account-card-actions .account-edit-action[data-tooltip]:after{
  border-bottom-color:#0b2f26!important;
}
.account-card-actions .account-delete-action[data-tooltip]:after{
  border-bottom-color:#7f1d1d!important;
}
.account-card-actions .account-edit-action[data-tooltip]:hover:before,
.account-card-actions .account-edit-action[data-tooltip]:focus-visible:before,
.account-card-actions .account-delete-action[data-tooltip]:hover:before,
.account-card-actions .account-delete-action[data-tooltip]:focus-visible:before,
.account-card-actions .account-edit-action[data-tooltip]:hover:after,
.account-card-actions .account-edit-action[data-tooltip]:focus-visible:after,
.account-card-actions .account-delete-action[data-tooltip]:hover:after,
.account-card-actions .account-delete-action[data-tooltip]:focus-visible:after{
  opacity:1!important;
  transform:translateY(0)!important;
}

/* STEP 026D — Tooltip azioni Conti sopra il bottone, senza clipping */
.account-real-card{
  overflow:visible!important;
  isolation:isolate;
}
.account-real-card:after{
  right:0!important;
  top:0!important;
  width:86px!important;
  height:86px!important;
  border-radius:0 22px 0 999px!important;
  z-index:0!important;
  pointer-events:none!important;
}
.account-card-topline,
.account-card-actions{
  position:relative!important;
  overflow:visible!important;
  z-index:90!important;
}
.account-card-actions .account-edit-action,
.account-card-actions .account-delete-action{
  position:relative!important;
  overflow:visible!important;
  z-index:91!important;
}
.account-card-actions .account-edit-action[data-tooltip]:before,
.account-card-actions .account-delete-action[data-tooltip]:before{
  top:auto!important;
  bottom:calc(100% + 10px)!important;
  right:0!important;
  z-index:999!important;
  transform:translateY(4px)!important;
}
.account-card-actions .account-edit-action[data-tooltip]:after,
.account-card-actions .account-delete-action[data-tooltip]:after{
  top:auto!important;
  bottom:calc(100% + 4px)!important;
  right:14px!important;
  z-index:1000!important;
  border:6px solid transparent!important;
  transform:translateY(4px)!important;
}
.account-card-actions .account-edit-action[data-tooltip]:after{
  border-top-color:#0b2f26!important;
}
.account-card-actions .account-delete-action[data-tooltip]:after{
  border-top-color:#7f1d1d!important;
}
.account-card-actions .account-edit-action[data-tooltip]:hover:before,
.account-card-actions .account-edit-action[data-tooltip]:focus-visible:before,
.account-card-actions .account-delete-action[data-tooltip]:hover:before,
.account-card-actions .account-delete-action[data-tooltip]:focus-visible:before,
.account-card-actions .account-edit-action[data-tooltip]:hover:after,
.account-card-actions .account-edit-action[data-tooltip]:focus-visible:after,
.account-card-actions .account-delete-action[data-tooltip]:hover:after,
.account-card-actions .account-delete-action[data-tooltip]:focus-visible:after{
  opacity:1!important;
  transform:translateY(0)!important;
}

/* STEP 026E — Fix fuoriuscita colore card Conti
   Mantiene i tooltip sopra le azioni ma tiene la decorazione colore dentro la card. */
.account-real-card{
  overflow:visible!important;
  contain:layout paint;
}
.account-real-card::after{
  right:2px!important;
  top:2px!important;
  width:78px!important;
  height:78px!important;
  border-radius:0 20px 0 999px!important;
  transform:none!important;
  clip-path:inset(0 round 0 20px 0 999px)!important;
  z-index:0!important;
  pointer-events:none!important;
}
.account-card-topline,
.account-card-main,
.account-card-footer{
  position:relative!important;
  z-index:2!important;
}
.account-card-actions{
  position:relative!important;
  z-index:120!important;
  overflow:visible!important;
}
.account-card-actions .account-edit-action,
.account-card-actions .account-delete-action{
  position:relative!important;
  z-index:121!important;
  overflow:visible!important;
}
.account-card-actions .account-edit-action[data-tooltip]:before,
.account-card-actions .account-delete-action[data-tooltip]:before,
.account-card-actions .account-edit-action[data-tooltip]:after,
.account-card-actions .account-delete-action[data-tooltip]:after{
  z-index:9999!important;
}

/* STEP 027 — Gestione categorie dentro Impostazioni */
.settings-category-name{font-weight:680;color:#111827}
.category-type-pill{display:inline-flex;align-items:center;justify-content:center;min-width:74px;border-radius:999px;padding:7px 10px;font-size:13px;font-weight:800;border:1px solid transparent}
.category-type-income{background:rgba(31,157,99,.10);border-color:rgba(31,157,99,.20);color:#0f7a4f}
.category-type-expense{background:rgba(240,68,68,.09);border-color:rgba(240,68,68,.18);color:#c81e1e}
.category-icon-preview{display:inline-flex;align-items:center;gap:8px;color:#4b5563;font-weight:650}
.category-icon-preview>span:first-child{width:30px;height:30px;border-radius:11px;display:grid;place-items:center;background:#f4f7f4;font-size:17px}
.category-row-actions{display:flex;align-items:center;gap:8px;position:relative;z-index:2;overflow:visible}
.icon-action-btn{position:relative;width:38px;height:38px;border:1px solid #dce5dd;background:#fff;color:#0f7a4f;border-radius:13px;display:inline-flex;align-items:center;justify-content:center;font-size:17px;font-weight:850;cursor:pointer;box-shadow:0 8px 18px rgba(15,23,42,.06);transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease,background .18s ease,color .18s ease}
.icon-action-btn:hover{transform:translateY(-1px);border-color:rgba(15,122,79,.34);background:#f7fbf8;box-shadow:0 12px 24px rgba(15,23,42,.10)}
.icon-action-btn.category-action-warning{color:#f59e0b;border-color:rgba(245,158,11,.20);background:rgba(245,158,11,.06)}
.icon-action-btn.category-action-success{color:#0f7a4f;border-color:rgba(31,157,99,.20);background:rgba(31,157,99,.07)}
.icon-action-btn.category-action-danger{color:#dc2626;border-color:rgba(220,38,38,.22);background:rgba(220,38,38,.06)}
.category-delete-icon{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.icon-action-btn.category-action-danger:hover{color:#b91c1c;border-color:rgba(220,38,38,.38);background:rgba(220,38,38,.11)}
.category-delete-modal-icon{color:#dc2626;background:rgba(220,38,38,.12)}
.category-delete-confirm-box{border-color:rgba(220,38,38,.22);background:rgba(254,242,242,.72)}
.icon-action-btn[data-tooltip]:before{content:attr(data-tooltip);position:absolute;left:50%;bottom:calc(100% + 10px);transform:translate(-50%,4px);padding:7px 10px;border-radius:10px;background:#0b2f26;color:#fff;font-size:12px;font-weight:800;white-space:nowrap;opacity:0;pointer-events:none;box-shadow:0 12px 24px rgba(15,23,42,.18);transition:opacity .16s ease,transform .16s ease;z-index:50}
.icon-action-btn[data-tooltip]:after{content:"";position:absolute;left:50%;bottom:calc(100% + 4px);transform:translate(-50%,4px);border:6px solid transparent;border-top-color:#0b2f26;opacity:0;pointer-events:none;transition:opacity .16s ease,transform .16s ease;z-index:50}
.icon-action-btn[data-tooltip]:hover:before,.icon-action-btn[data-tooltip]:focus-visible:before,.icon-action-btn[data-tooltip]:hover:after,.icon-action-btn[data-tooltip]:focus-visible:after{opacity:1;transform:translate(-50%,0)}
.icon-action-btn.category-action-danger[data-tooltip]:before{left:auto;right:0;transform:translate(0,4px)}
.icon-action-btn.category-action-danger[data-tooltip]:after{left:auto;right:13px;transform:translate(0,4px)}
.icon-action-btn.category-action-danger[data-tooltip]:hover:before,.icon-action-btn.category-action-danger[data-tooltip]:focus-visible:before,.icon-action-btn.category-action-danger[data-tooltip]:hover:after,.icon-action-btn.category-action-danger[data-tooltip]:focus-visible:after{transform:translate(0,0)}
.table-shell{overflow:visible}.table-shell table{overflow:visible}.table-shell td{overflow:visible}
.category-modal-overlay{position:fixed;inset:0;z-index:120;display:grid;place-items:center;padding:22px;background:rgba(7,31,25,.38);backdrop-filter:blur(4px)}
.premium-modal{position:relative;width:min(760px,100%);max-height:calc(100dvh - 44px);display:flex;flex-direction:column;overflow:hidden;background:linear-gradient(180deg,#fff 0%,#fbfdfb 100%);border:1px solid rgba(220,229,221,.98);border-radius:28px;box-shadow:0 34px 95px rgba(7,31,25,.30)}
.category-confirm-modal{width:min(560px,100%)}
.premium-modal-header{display:flex;align-items:flex-start;gap:16px;padding:24px 24px 18px;border-bottom:1px solid rgba(220,229,221,.78);background:radial-gradient(circle at 100% 0%,rgba(31,157,99,.10),transparent 34%)}
.premium-modal-header h2{margin:0;font-size:29px;line-height:1.05;letter-spacing:-.035em;color:#111827}.premium-modal-header .muted{margin:6px 0 0;color:#6b7280}.category-modal-icon{width:58px;height:58px;border-radius:20px;display:grid;place-items:center;background:rgba(31,157,99,.12);font-size:29px;box-shadow:inset 0 1px 0 rgba(255,255,255,.85),0 14px 28px rgba(15,122,79,.12);flex:0 0 auto}.modal-close-btn{margin-left:auto;width:42px;height:42px;border:1px solid #dce5dd;background:#fff;border-radius:14px;color:#4b5563;font-size:28px;line-height:1;cursor:pointer;transition:.18s ease}.modal-close-btn:hover{background:#f7fbf8;border-color:rgba(15,122,79,.25);transform:translateY(-1px)}
.premium-modal-scroll{overflow:auto;padding:22px 24px;min-height:0}.premium-modal-scroll::-webkit-scrollbar{width:10px}.premium-modal-scroll::-webkit-scrollbar-track{background:transparent;border-radius:999px}.premium-modal-scroll::-webkit-scrollbar-thumb{background:rgba(9,91,58,.38);border-radius:999px;border:3px solid transparent;background-clip:content-box}.premium-modal-scroll::-webkit-scrollbar-thumb:hover{background:rgba(9,91,58,.58);border:3px solid transparent;background-clip:content-box}.premium-modal-scroll.compact{padding-bottom:18px}
.category-form{display:grid;gap:18px}.form-group{display:grid;gap:8px}.form-group label,.field-label{font-size:14px;color:#4b5563;font-weight:820}.premium-input{width:100%;border:1px solid #dce5dd;background:#fff;border-radius:16px;padding:15px 16px;font-size:17px;color:#111827;outline:none;box-shadow:0 10px 22px rgba(15,23,42,.035);font-weight:650}.premium-input:focus{border-color:#1f9d63;box-shadow:0 0 0 4px rgba(31,157,99,.12),0 10px 22px rgba(15,23,42,.05)}.field-helper{margin:0;color:#6b7280;font-size:13px;line-height:1.35}
.category-choice-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.category-choice{border:1px solid #dce5dd;background:#fff;border-radius:17px;padding:14px 15px;text-align:left;cursor:pointer;box-shadow:0 10px 22px rgba(15,23,42,.045);transition:.18s ease}.category-choice strong{display:block;font-size:16px;color:#111827;font-weight:660}.category-choice small{display:block;margin-top:4px;color:#6b7280;font-size:13px}.category-choice:hover{transform:translateY(-1px);border-color:rgba(15,122,79,.34)}.category-choice.is-selected{background:rgba(31,157,99,.09);border-color:#1f9d63;box-shadow:0 0 0 4px rgba(31,157,99,.10),0 12px 24px rgba(15,23,42,.07)}.category-choice.is-selected strong{color:#095b3a}
.category-icon-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.category-icon-option{min-height:64px;border:1px solid #dce5dd;background:#fff;border-radius:17px;display:flex;align-items:center;gap:10px;padding:11px 13px;cursor:pointer;box-shadow:0 10px 22px rgba(15,23,42,.045);transition:.18s ease}.category-icon-option>span{width:34px;height:34px;border-radius:13px;display:grid;place-items:center;background:#f4f7f4;font-size:20px}.category-icon-option small{font-size:13px;color:#4b5563;font-weight:660}.category-icon-option:hover{transform:translateY(-1px);border-color:rgba(15,122,79,.34)}.category-icon-option.is-selected{background:rgba(31,157,99,.08);border-color:#1f9d63;box-shadow:0 0 0 4px rgba(31,157,99,.10)}
.category-color-picker{display:flex;flex-wrap:wrap;gap:11px}.account-color-swatch{width:40px;height:40px;border-radius:15px;border:3px solid #fff;background:var(--swatch-color);box-shadow:0 0 0 1px #dce5dd,0 10px 20px rgba(15,23,42,.10);cursor:pointer;transition:.18s ease}.account-color-swatch:hover{transform:translateY(-1px)}.account-color-swatch.is-selected{box-shadow:0 0 0 4px rgba(31,157,99,.25),0 12px 22px rgba(15,23,42,.13)}
.category-active-box{display:flex;align-items:center;justify-content:space-between;gap:18px;border:1px solid #dce5dd;background:#f8faf8;border-radius:20px;padding:16px 18px}.category-active-box strong{display:block;color:#111827}.category-active-box p{margin:4px 0 0;color:#6b7280;font-size:14px;line-height:1.35}.toggle-switch{width:66px;height:38px;border-radius:999px;border:0;background:#cbd5d1;padding:4px;cursor:pointer;transition:.18s ease;flex:0 0 auto}.toggle-switch span{display:block;width:30px;height:30px;border-radius:50%;background:#fff;box-shadow:0 5px 12px rgba(15,23,42,.20);transition:.18s ease}.toggle-switch.is-on{background:#1f9d63}.toggle-switch.is-on span{transform:translateX(28px)}
.category-confirm-box{border:1px solid #dce5dd;background:#f8faf8;border-radius:18px;padding:17px}.category-confirm-box strong{display:block;color:#111827;font-size:18px}.category-confirm-box p{margin:6px 0 0;color:#6b7280}.premium-modal-footer{display:grid;grid-template-columns:1fr 1.25fr;gap:12px;padding:18px 24px 22px;border-top:1px solid rgba(220,229,221,.86);background:#fff}.premium-modal-footer .btn{min-height:52px;border-radius:16px;font-weight:780}
@media(max-width:760px){.category-modal-overlay{align-items:end;place-items:end center;padding:14px}.premium-modal{max-height:calc(100dvh - 28px);border-radius:26px 26px 18px 18px}.premium-modal-header{padding:21px 20px 16px}.premium-modal-header h2{font-size:25px}.premium-modal-scroll{padding:18px 20px}.premium-modal-footer{grid-template-columns:1fr;padding:16px 20px 20px}.category-choice-grid,.category-icon-grid{grid-template-columns:1fr}.category-active-box{align-items:flex-start}.icon-action-btn[data-tooltip]:before,.icon-action-btn[data-tooltip]:after{display:none}}

/* STEP 027C — Rifiniture tabella e modale categorie */
#categorie.card,
.settings-layout .card-large{
  overflow:hidden;
}
#categorie .card-header,
#categorie .actions-row{
  position:relative;
  z-index:2;
}
.settings-categories-table-shell{
  max-width:100%;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  border-radius:18px;
  border:1px solid #dce5dd;
  background:#fff;
}
.settings-categories-table-shell table{
  min-width:860px;
  width:100%;
}
.settings-categories-table-shell th,
.settings-categories-table-shell td{
  white-space:normal;
  vertical-align:middle;
}
.category-color-only{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:28px;
}
.category-color-only .color-dot{
  margin:0;
}
.category-icon-grid.is-refreshing{
  opacity:.75;
}
.category-icon-option small,
.category-choice strong{
  font-weight:650;
}
@media(max-width:900px){
  .settings-categories-table-shell table{min-width:780px}
}


/* STEP 028 — Logo compatto sidebar chiusa */
.sidebar[data-global-sidebar] .brand.brand-official{
  position:relative;
}
.sidebar[data-global-sidebar] .brand-logo-full{
  display:block;
}
.sidebar[data-global-sidebar] .brand-logo-compact{
  display:none;
  width:54px;
  height:54px;
  object-fit:contain;
  object-position:center;
  filter:drop-shadow(0 12px 24px rgba(0,0,0,.24));
}
.app-shell.sidebar-collapsed .brand.brand-official{
  min-height:64px;
  justify-content:center;
  align-items:center;
}
.app-shell.sidebar-collapsed .brand-logo-full{
  display:none !important;
}
.app-shell.sidebar-collapsed .brand-logo-compact{
  display:block;
}
@media(max-width:980px){
  .sidebar[data-global-sidebar] .brand-logo-full{
    display:block !important;
  }
  .sidebar[data-global-sidebar] .brand-logo-compact{
    display:none !important;
  }
}

/* STEP 027D — Tabella categorie compatta senza scroll orizzontale */
.settings-categories-table-shell{
  overflow-x:hidden!important;
  overflow-y:hidden!important;
}
.settings-categories-table-shell table{
  width:100%;
  min-width:0!important;
  table-layout:fixed;
  font-size:14px;
}
.settings-categories-table-shell th,
.settings-categories-table-shell td{
  padding:13px 12px!important;
  line-height:1.28;
  white-space:normal;
  overflow-wrap:anywhere;
}
.settings-categories-table-shell th{
  font-size:13px;
  font-weight:680;
  color:#5b6673;
}
.settings-categories-table-shell th:nth-child(1),
.settings-categories-table-shell td:nth-child(1){width:22%}
.settings-categories-table-shell th:nth-child(2),
.settings-categories-table-shell td:nth-child(2){width:13%}
.settings-categories-table-shell th:nth-child(3),
.settings-categories-table-shell td:nth-child(3){width:24%}
.settings-categories-table-shell th:nth-child(4),
.settings-categories-table-shell td:nth-child(4){width:9%;text-align:center}
.settings-categories-table-shell th:nth-child(5),
.settings-categories-table-shell td:nth-child(5){width:12%}
.settings-categories-table-shell th:nth-child(6),
.settings-categories-table-shell td:nth-child(6){width:11%}
.settings-categories-table-shell th:nth-child(7),
.settings-categories-table-shell td:nth-child(7){width:9%}
.settings-category-name{
  font-size:14px;
  font-weight:600;
  color:#374151;
}
.category-type-pill{
  min-width:0;
  padding:5px 9px;
  font-size:12px;
  font-weight:560;
  line-height:1;
}
.settings-categories-table-shell .badge{
  padding:6px 10px;
  font-size:12px;
  font-weight:560;
  line-height:1;
  gap:5px;
}
.category-icon-preview{
  gap:7px;
  font-weight:560;
  color:#4b5563;
}
.category-icon-preview>span:first-child{
  width:28px;
  height:28px;
  border-radius:10px;
  font-size:16px;
  flex:0 0 auto;
}
.category-row-actions{
  gap:6px;
  justify-content:flex-start;
}
.category-row-actions .icon-action-btn{
  width:34px;
  height:34px;
  min-width:34px;
  border-radius:12px;
  font-size:16px;
}
.settings-categories-table-shell .color-dot{
  width:13px;
  height:13px;
}
@media(max-width:900px){
  .settings-categories-table-shell{
    overflow-x:auto!important;
  }
  .settings-categories-table-shell table{
    min-width:720px!important;
    table-layout:auto;
  }
}

/* STEP 027E — Tabella categorie: spostamento blocco informazioni a sinistra */
.settings-categories-table-shell table{
  table-layout:fixed!important;
}
.settings-categories-table-shell th,
.settings-categories-table-shell td{
  padding-left:10px!important;
  padding-right:10px!important;
}
.settings-categories-table-shell th:nth-child(1),
.settings-categories-table-shell td:nth-child(1){width:16%!important}
.settings-categories-table-shell th:nth-child(2),
.settings-categories-table-shell td:nth-child(2){width:11%!important}
.settings-categories-table-shell th:nth-child(3),
.settings-categories-table-shell td:nth-child(3){width:24%!important}
.settings-categories-table-shell th:nth-child(4),
.settings-categories-table-shell td:nth-child(4){width:7%!important;text-align:center!important}
.settings-categories-table-shell th:nth-child(5),
.settings-categories-table-shell td:nth-child(5){width:11%!important;white-space:nowrap!important}
.settings-categories-table-shell th:nth-child(6),
.settings-categories-table-shell td:nth-child(6){width:14%!important}
.settings-categories-table-shell th:nth-child(7),
.settings-categories-table-shell td:nth-child(7){width:17%!important}
.category-type-pill,
.settings-categories-table-shell .badge{
  white-space:nowrap!important;
}
.settings-categories-table-shell .badge{
  min-width:auto!important;
  max-width:none!important;
}
.category-row-actions{
  flex-wrap:nowrap!important;
  white-space:nowrap!important;
}
.category-row-actions .icon-action-btn{
  flex:0 0 auto!important;
}
@media(max-width:900px){
  .settings-categories-table-shell th:nth-child(1),
  .settings-categories-table-shell td:nth-child(1),
  .settings-categories-table-shell th:nth-child(2),
  .settings-categories-table-shell td:nth-child(2),
  .settings-categories-table-shell th:nth-child(3),
  .settings-categories-table-shell td:nth-child(3),
  .settings-categories-table-shell th:nth-child(4),
  .settings-categories-table-shell td:nth-child(4),
  .settings-categories-table-shell th:nth-child(5),
  .settings-categories-table-shell td:nth-child(5),
  .settings-categories-table-shell th:nth-child(6),
  .settings-categories-table-shell td:nth-child(6),
  .settings-categories-table-shell th:nth-child(7),
  .settings-categories-table-shell td:nth-child(7){width:auto!important}
}

/* STEP 027F — Tab categorie Entrate/Uscite e tabella più compatta */
.category-tabs{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px;
  margin:6px 0 16px;
  border:1px solid #dce5dd;
  background:#f8fbf8;
  border-radius:18px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.84),0 10px 24px rgba(15,23,42,.04);
}
.category-tab{
  border:0;
  background:transparent;
  color:#5b6673;
  border-radius:13px;
  padding:10px 16px;
  font-size:14px;
  font-weight:560;
  cursor:pointer;
  transition:background .18s ease,color .18s ease,box-shadow .18s ease,transform .18s ease;
}
.category-tab:hover{background:#fff;color:#0b2f26;box-shadow:0 8px 18px rgba(15,23,42,.06)}
.category-tab.is-active{background:#0f7a4f;color:#fff;box-shadow:0 10px 20px rgba(15,122,79,.18)}
.settings-category-name-with-icon{display:inline-flex;align-items:center;gap:9px;min-width:0}
.category-name-icon{width:28px;height:28px;border-radius:10px;display:grid;place-items:center;background:#f4f7f4;font-size:16px;flex:0 0 auto}
.settings-category-name-with-icon .settings-category-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.settings-categories-table-shell table{min-width:0!important;table-layout:fixed!important}
.settings-categories-table-shell th,
.settings-categories-table-shell td{white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis}
.settings-categories-table-shell th:nth-child(1),
.settings-categories-table-shell td:nth-child(1){width:30%!important}
.settings-categories-table-shell th:nth-child(2),
.settings-categories-table-shell td:nth-child(2){width:13%!important}
.settings-categories-table-shell th:nth-child(3),
.settings-categories-table-shell td:nth-child(3){width:10%!important;text-align:center!important}
.settings-categories-table-shell th:nth-child(4),
.settings-categories-table-shell td:nth-child(4){width:14%!important;white-space:nowrap!important}
.settings-categories-table-shell th:nth-child(5),
.settings-categories-table-shell td:nth-child(5){width:15%!important}
.settings-categories-table-shell th:nth-child(6),
.settings-categories-table-shell td:nth-child(6){width:18%!important;overflow:visible!important;text-overflow:clip!important}
.settings-categories-table-shell th:nth-child(3){white-space:nowrap!important}
.settings-categories-table-shell th:nth-child(6),
.settings-categories-table-shell td:nth-child(6){text-align:left!important}
.category-row-actions{overflow:visible!important}
@media(max-width:900px){
  .category-tabs{width:100%;display:grid;grid-template-columns:1fr 1fr}
  .category-tab{text-align:center}
  .settings-categories-table-shell{overflow-x:auto!important}
  .settings-categories-table-shell table{min-width:660px!important;table-layout:auto!important}
  .settings-categories-table-shell th:nth-child(1),
  .settings-categories-table-shell td:nth-child(1),
  .settings-categories-table-shell th:nth-child(2),
  .settings-categories-table-shell td:nth-child(2),
  .settings-categories-table-shell th:nth-child(3),
  .settings-categories-table-shell td:nth-child(3),
  .settings-categories-table-shell th:nth-child(4),
  .settings-categories-table-shell td:nth-child(4),
  .settings-categories-table-shell th:nth-child(5),
  .settings-categories-table-shell td:nth-child(5),
  .settings-categories-table-shell th:nth-child(6),
  .settings-categories-table-shell td:nth-child(6){width:auto!important}
}


/* STEP 029 — Decimali importi euro ridotti */
.currency-decimals-enhanced{
  white-space:nowrap;
}
.currency-decimals{
  font-size:.5em;
  line-height:1;
  font-weight:inherit;
  letter-spacing:-.02em;
  vertical-align:baseline;
}

/* STEP 029B — Fix decimali importi euro: mantiene grande la parte intera */
.currency-decimals-enhanced{
  display:inline !important;
  white-space:nowrap !important;
  font-size:inherit !important;
  line-height:inherit !important;
  font-weight:inherit !important;
  color:inherit !important;
  text-align:inherit !important;
}

.currency-decimals{
  display:inline !important;
  font-size:.5em !important;
  line-height:1 !important;
  font-weight:inherit !important;
  color:inherit !important;
  vertical-align:baseline;
}

.dashboard-kpi-card .currency-decimals-enhanced,
.dashboard-kpi-card .currency-decimals,
.premium-account-row .account-amount .currency-decimals-enhanced,
.premium-account-row .account-amount .currency-decimals,
.account-amount .currency-decimals-enhanced,
.account-amount .currency-decimals{
  display:inline !important;
}

.account-amount b,
.movement-real-side strong,
.movement-summary-card strong,
.dashboard-kpi-card strong{
  white-space:nowrap;
}


/* STEP 029C — Migliaia importi euro con punto italiano */
.currency-decimals-enhanced{
  font-variant-numeric: tabular-nums;
}

/* STEP 029D — Fix tooltip Conti sopra le azioni senza clipping
   Non usare contain:paint sulla card: taglia i tooltip.
   La decorazione colore resta dentro la card, mentre i tooltip possono uscire sopra i bottoni. */
.account-real-card{
  overflow:visible!important;
  contain:none!important;
  isolation:isolate!important;
}
.account-real-card::after{
  right:0!important;
  top:0!important;
  width:86px!important;
  height:86px!important;
  border-radius:0 22px 0 999px!important;
  transform:none!important;
  clip-path:none!important;
  z-index:0!important;
  pointer-events:none!important;
}
.account-card-topline,
.account-card-actions{
  position:relative!important;
  overflow:visible!important;
  z-index:250!important;
}
.account-card-actions .account-edit-action,
.account-card-actions .account-delete-action{
  position:relative!important;
  overflow:visible!important;
  z-index:260!important;
}
.account-card-actions .account-edit-action[data-tooltip]:before,
.account-card-actions .account-delete-action[data-tooltip]:before{
  top:auto!important;
  bottom:calc(100% + 10px)!important;
  right:0!important;
  z-index:9999!important;
  white-space:nowrap!important;
}
.account-card-actions .account-edit-action[data-tooltip]:after,
.account-card-actions .account-delete-action[data-tooltip]:after{
  top:auto!important;
  bottom:calc(100% + 4px)!important;
  right:14px!important;
  z-index:10000!important;
}

/* STEP 030 — Gestione sottocategorie dentro Impostazioni */
.subcategory-modal{
  width:min(1040px,100%);
}
.subcategory-modal .premium-modal-footer,
.subcategory-modal-footer{
  grid-template-columns:1fr;
}
.subcategory-manager{
  display:grid;
  grid-template-columns:300px minmax(0,1fr);
  gap:18px;
  align-items:start;
}
.subcategory-parent-panel,
.subcategory-detail-panel{
  min-width:0;
}
.subcategory-parent-panel{
  display:grid;
  gap:10px;
}
.subcategory-parent-list{
  display:grid;
  gap:9px;
}
.subcategory-parent-option{
  display:flex;
  align-items:center;
  gap:10px;
  width:100%;
  border:1px solid #dce5dd;
  background:#fff;
  border-radius:17px;
  padding:11px 12px;
  text-align:left;
  cursor:pointer;
  box-shadow:0 10px 22px rgba(15,23,42,.04);
  transition:transform .18s ease,border-color .18s ease,background .18s ease,box-shadow .18s ease;
}
.subcategory-parent-option strong,
.subcategory-selected-title strong,
.subcategory-item-main strong{
  display:block;
  color:#111827;
  font-size:14px;
  font-weight:620;
  line-height:1.15;
}
.subcategory-parent-option small,
.subcategory-selected-title small,
.subcategory-item-main small{
  display:block;
  margin-top:4px;
  color:#6b7280;
  font-size:12px;
  line-height:1.2;
  font-weight:500;
}
.subcategory-parent-option:hover{
  transform:translateY(-1px);
  border-color:rgba(15,122,79,.30);
  box-shadow:0 14px 26px rgba(15,23,42,.06);
}
.subcategory-parent-option.is-selected{
  background:rgba(31,157,99,.08);
  border-color:#1f9d63;
  box-shadow:0 0 0 4px rgba(31,157,99,.10),0 14px 28px rgba(15,23,42,.07);
}
.subcategory-detail-panel{
  display:grid;
  gap:14px;
}
.subcategory-detail-header{
  border:1px solid #dce5dd;
  background:linear-gradient(135deg,#f7fbf8,#fff);
  border-radius:20px;
  padding:14px 15px;
}
.subcategory-selected-title{
  display:flex;
  align-items:center;
  gap:10px;
}
.subcategory-list{
  display:grid;
  gap:9px;
}
.subcategory-empty{
  border:1px dashed rgba(15,122,79,.28);
  background:rgba(31,157,99,.055);
  border-radius:18px;
  padding:17px;
}
.subcategory-empty strong{
  display:block;
  color:#0b2f26;
  font-weight:650;
}
.subcategory-empty p{
  margin:5px 0 0;
  color:#6b7280;
  line-height:1.35;
}
.subcategory-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  border:1px solid #dce5dd;
  background:#fff;
  border-radius:18px;
  padding:11px 12px;
  box-shadow:0 10px 22px rgba(15,23,42,.035);
  overflow:visible;
}
.subcategory-item-main{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.subcategory-item-main>div{
  min-width:0;
}
.subcategory-item-main strong{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.subcategory-create-box{
  border:1px solid #dce5dd;
  background:#f8fbf8;
  border-radius:20px;
  padding:16px;
  display:grid;
  gap:10px;
}
.subcategory-create-box h3{
  margin:0;
  font-size:18px;
  letter-spacing:-.02em;
  color:#111827;
}
.subcategory-create-box .muted{
  margin:0;
  font-size:13px;
}
.subcategory-inline-form{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
}
.stacked-modal-overlay{
  z-index:140;
  background:rgba(7,31,25,.48);
}
.category-name-stack{
  display:grid;
  min-width:0;
  gap:2px;
}
.category-name-stack small{
  display:block;
  color:#6b7280;
  font-size:11px;
  font-weight:520;
  line-height:1.1;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
@media(max-width:900px){
  .subcategory-manager{
    grid-template-columns:1fr;
  }
  .subcategory-inline-form{
    grid-template-columns:1fr;
  }
}
@media(max-width:560px){
  .subcategory-item{
    align-items:flex-start;
    flex-direction:column;
  }
  .subcategory-item .category-row-actions{
    width:100%;
  }
}

/* STEP 030B — Fix scrollbar orizzontale modale sottocategorie */
.subcategory-modal,
.subcategory-modal .premium-modal-header,
.subcategory-modal .premium-modal-scroll,
.subcategory-modal .premium-modal-footer{
  max-width:100%;
}
.subcategory-modal .premium-modal-scroll{
  overflow-x:hidden!important;
  overflow-y:auto!important;
}
.subcategory-modal .subcategory-manager,
.subcategory-modal .subcategory-parent-panel,
.subcategory-modal .subcategory-detail-panel,
.subcategory-modal .subcategory-parent-list,
.subcategory-modal .subcategory-list,
.subcategory-modal .subcategory-create-box,
.subcategory-modal .subcategory-detail-header,
.subcategory-modal .subcategory-inline-form,
.subcategory-modal .subcategory-parent-option,
.subcategory-modal .subcategory-item{
  max-width:100%;
  min-width:0;
}
.subcategory-modal .premium-input{
  min-width:0;
}
.subcategory-modal .subcategory-inline-form .btn{
  white-space:nowrap;
}
@media(max-width:680px){
  .subcategory-modal .premium-modal-scroll{
    overflow-x:hidden!important;
  }
  .subcategory-modal .subcategory-inline-form{
    grid-template-columns:1fr!important;
  }
  .subcategory-modal .subcategory-inline-form .btn{
    width:100%;
  }
}

/* STEP 032 — Sottocategorie nella pagina Movimenti */
.movement-subcategory-separator{
  color:#9ca3af;
  margin:0 2px;
}
.movement-subcategory-name{
  color:#374151;
  font-weight:700;
}

/* STEP 033 — Modifica ed eliminazione sicura movimenti */
.movement-real-row{position:relative;overflow:visible}
.movement-row-actions{display:flex;justify-content:flex-end;gap:7px;margin-top:4px;position:relative;z-index:4}
.movement-action-btn{position:relative;width:32px;height:32px;border:1px solid rgba(220,229,221,.95);background:#fff;border-radius:11px;color:#0b2f26;display:inline-grid;place-items:center;font-size:14px;line-height:1;cursor:pointer;box-shadow:0 8px 16px rgba(15,23,42,.06);transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease,background .18s ease}
.movement-action-btn:hover{transform:translateY(-1px);border-color:rgba(15,122,79,.35);box-shadow:0 12px 22px rgba(15,23,42,.10);background:#f8fbf9}
.movement-action-danger{color:#d92d20}
.movement-action-danger:hover{border-color:rgba(240,68,68,.35);background:rgba(240,68,68,.06)}
.movement-action-btn[data-tooltip]:before{content:attr(data-tooltip);position:absolute;right:50%;bottom:calc(100% + 9px);transform:translateX(50%) translateY(3px);opacity:0;pointer-events:none;white-space:nowrap;background:#0b2f26;color:#fff;border-radius:10px;padding:7px 9px;font-size:11px;font-weight:650;box-shadow:0 14px 28px rgba(7,31,25,.22);transition:.16s ease;z-index:80}
.movement-action-btn[data-tooltip]:after{content:"";position:absolute;right:50%;bottom:calc(100% + 3px);transform:translateX(50%) translateY(3px);border:6px solid transparent;border-top-color:#0b2f26;opacity:0;pointer-events:none;transition:.16s ease;z-index:80}
.movement-action-btn[data-tooltip]:hover:before,.movement-action-btn[data-tooltip]:hover:after{opacity:1;transform:translateX(50%) translateY(0)}
.movement-editor-shell[hidden],.movement-delete-shell[hidden]{display:none!important}
.movement-editor-shell,.movement-delete-shell{position:fixed;inset:0;z-index:150;display:grid;place-items:center;padding:22px}
.movement-editor-backdrop,.movement-delete-backdrop{position:absolute;inset:0;background:rgba(7,31,25,.40);backdrop-filter:blur(4px)}
.movement-editor-card,.movement-delete-card{position:relative;width:min(780px,100%);max-height:calc(100dvh - 44px);display:flex;flex-direction:column;overflow:hidden;background:linear-gradient(180deg,#fff 0%,#fbfdfb 100%);border:1px solid rgba(220,229,221,.98);border-radius:28px;box-shadow:0 34px 95px rgba(7,31,25,.30)}
.movement-delete-card{width:min(560px,100%)}
.movement-editor-head,.movement-delete-head{display:flex;align-items:flex-start;gap:16px;padding:24px 24px 18px;border-bottom:1px solid rgba(220,229,221,.82);background:radial-gradient(circle at 100% 0%,rgba(31,157,99,.10),transparent 34%)}
.movement-editor-head h2,.movement-delete-head h2{margin:0;font-size:29px;line-height:1.05;letter-spacing:-.035em;color:#111827}.movement-editor-head .muted,.movement-delete-head .muted{margin:6px 0 0;color:#6b7280}
.movement-editor-icon,.movement-delete-icon{width:58px;height:58px;border-radius:20px;display:grid;place-items:center;background:rgba(31,157,99,.12);font-size:29px;box-shadow:inset 0 1px 0 rgba(255,255,255,.85),0 14px 28px rgba(15,122,79,.12);flex:0 0 auto}.movement-editor-icon.expense{background:rgba(240,68,68,.12);color:#f04444}.movement-editor-icon.transfer{background:rgba(47,128,237,.12);color:#2f80ed}
.movement-editor-scroll{overflow:auto;min-height:0;padding:22px 24px}.movement-editor-scroll::-webkit-scrollbar{width:10px}.movement-editor-scroll::-webkit-scrollbar-track{background:transparent;border-radius:999px}.movement-editor-scroll::-webkit-scrollbar-thumb{background:rgba(9,91,58,.38);border-radius:999px;border:3px solid transparent;background-clip:content-box}.movement-editor-scroll::-webkit-scrollbar-thumb:hover{background:rgba(9,91,58,.58);border:3px solid transparent;background-clip:content-box}
.movement-editor-form{display:grid;gap:16px}.premium-field{display:grid;gap:7px;font-weight:650;color:#111827}.premium-field>span{font-size:13px;color:#4b5563}.premium-input{width:100%;border:1px solid #dce5dd;background:#fff;border-radius:14px;padding:13px 14px;font-size:15px;color:#111827;outline:none}.premium-input:focus{border-color:#1f9d63;box-shadow:0 0 0 4px rgba(31,157,99,.12)}
.movement-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.movement-choice-pill{border:1px solid #dce5dd;background:#fff;border-radius:15px;padding:12px 13px;text-align:left;cursor:pointer;display:grid;gap:3px;transition:.18s ease}.movement-choice-pill strong{font-size:14px;font-weight:650;color:#111827}.movement-choice-pill small{font-size:12px;color:#6b7280;font-weight:500}.movement-choice-pill:hover{border-color:rgba(15,122,79,.30);box-shadow:0 10px 20px rgba(15,23,42,.06);transform:translateY(-1px)}.movement-choice-pill.active{border-color:#0f7a4f;background:rgba(31,157,99,.10);box-shadow:0 0 0 3px rgba(31,157,99,.10)}
.movement-edit-date-control{display:grid;grid-template-columns:44px 1fr 44px;gap:8px}.movement-edit-date-control button{border:1px solid #dce5dd;background:#fff;border-radius:14px;min-height:46px;color:#0b2f26;font-weight:750;cursor:pointer}.movement-edit-date-current{text-transform:capitalize;font-size:15px}.movement-edit-preview{border:1px solid rgba(31,157,99,.20);background:rgba(31,157,99,.08);border-radius:16px;padding:13px 14px;color:#0b2f26;font-size:14px;line-height:1.45}.movement-edit-preview strong{font-weight:760}.movement-editor-footer,.movement-delete-footer{display:grid;grid-template-columns:1fr 1.25fr;gap:12px;padding:18px 24px 22px;border-top:1px solid rgba(220,229,221,.86);background:#fff}.movement-editor-footer .btn,.movement-delete-footer .btn{min-height:52px;border-radius:16px;font-weight:780}
.movement-delete-summary{margin:22px 24px 0;border:1px solid #dce5dd;background:#f8faf8;border-radius:18px;padding:17px}.movement-delete-summary strong{display:block;color:#111827;font-size:18px}.movement-delete-summary span{display:block;margin-top:6px;color:#6b7280;font-weight:650}.movement-delete-card .form-message{margin:14px 24px 0}
@media(max-width:760px){.movement-editor-shell,.movement-delete-shell{align-items:end;place-items:end center;padding:14px}.movement-editor-card,.movement-delete-card{max-height:calc(100dvh - 28px);border-radius:26px 26px 18px 18px}.movement-editor-head,.movement-delete-head{padding:21px 20px 16px}.movement-editor-head h2,.movement-delete-head h2{font-size:25px}.movement-editor-scroll{padding:18px 20px}.movement-choice-grid{grid-template-columns:1fr}.movement-editor-footer,.movement-delete-footer{grid-template-columns:1fr;padding:16px 20px 20px}.movement-action-btn[data-tooltip]:before,.movement-action-btn[data-tooltip]:after{display:none}}

/* STEP 034 — Dashboard movimenti recenti con sottocategorie */
.movement-list-placeholder > div{
  min-width:0;
}
.movement-list-placeholder p{
  min-width:0;
  overflow:hidden;
}
.movement-list-placeholder p strong,
.movement-list-placeholder .recent-movement-meta{
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.movement-list-placeholder .recent-movement-meta{
  font-size:12.5px;
  line-height:1.35;
}
.movement-list-placeholder > div > b{
  white-space:nowrap;
  text-align:right;
}


/* STEP 034C — Topbar più leggera e calendario statico */
.topbar[data-global-topbar] .topbar-pill{
  font-weight:600;
  font-size:14px;
  letter-spacing:-.01em;
  padding:9px 14px;
  min-height:40px;
}
.topbar[data-global-topbar] .topbar-pill-primary{
  font-weight:650;
}
.topbar[data-global-topbar] .topbar-pill-secondary.is-static{
  cursor:default;
  pointer-events:none;
  font-weight:600;
  color:rgba(255,255,255,.88);
  background:rgba(0,0,0,.10);
}
.topbar[data-global-topbar] .topbar-profile strong{
  font-weight:650;
}
.topbar[data-global-topbar] .topbar-profile small{
  font-weight:500;
}

/* STEP 035 — Suggerimenti per te in Dashboard */
.dashboard-suggestions-modal-shell[hidden]{display:none!important}
.dashboard-suggestions-modal-shell{position:fixed;inset:0;z-index:170;display:grid;place-items:center;padding:22px}
.dashboard-suggestions-backdrop{position:absolute;inset:0;background:rgba(7,31,25,.40);backdrop-filter:blur(4px)}
.dashboard-suggestions-card{position:relative;width:min(760px,100%);max-height:calc(100dvh - 44px);display:flex;flex-direction:column;overflow:hidden;background:linear-gradient(180deg,#fff 0%,#fbfdfb 100%);border:1px solid rgba(220,229,221,.98);border-radius:28px;box-shadow:0 34px 95px rgba(7,31,25,.30)}
.dashboard-suggestions-head{display:flex;align-items:flex-start;gap:16px;padding:24px 24px 18px;border-bottom:1px solid rgba(220,229,221,.82);background:radial-gradient(circle at 100% 0%,rgba(31,157,99,.12),transparent 36%)}
.dashboard-suggestions-head h2{margin:0;font-size:30px;line-height:1.05;letter-spacing:-.035em;color:#111827}
.dashboard-suggestions-head p{margin:7px 0 0;color:#6b7280;line-height:1.45}
.dashboard-suggestions-head .eyebrow{margin:0 0 5px;font-size:12px;letter-spacing:.14em;text-transform:uppercase;color:#6b7280;font-weight:760}
.dashboard-suggestions-hero{width:58px;height:58px;border-radius:20px;display:grid;place-items:center;background:rgba(31,157,99,.12);font-size:29px;box-shadow:inset 0 1px 0 rgba(255,255,255,.85),0 14px 28px rgba(15,122,79,.12);flex:0 0 auto}
.dashboard-suggestions-scroll{overflow:auto;min-height:0;padding:22px 24px}.dashboard-suggestions-scroll::-webkit-scrollbar{width:10px}.dashboard-suggestions-scroll::-webkit-scrollbar-track{background:transparent;border-radius:999px}.dashboard-suggestions-scroll::-webkit-scrollbar-thumb{background:rgba(9,91,58,.38);border-radius:999px;border:3px solid transparent;background-clip:content-box}.dashboard-suggestions-scroll::-webkit-scrollbar-thumb:hover{background:rgba(9,91,58,.58);border:3px solid transparent;background-clip:content-box}
.dashboard-suggestions-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:16px}.dashboard-suggestions-summary span{display:grid;gap:3px;border:1px solid rgba(220,229,221,.95);background:#fff;border-radius:18px;padding:13px 14px;box-shadow:0 12px 26px rgba(15,23,42,.05)}.dashboard-suggestions-summary strong{font-size:18px;color:#0b2f26;line-height:1.1}.dashboard-suggestions-summary small{font-size:12px;color:#6b7280;font-weight:600}
.dashboard-suggestions-list{display:grid;gap:10px}.dashboard-suggestion-card{display:flex;gap:13px;align-items:flex-start;border:1px solid rgba(220,229,221,.95);background:#fff;border-radius:18px;padding:15px;box-shadow:0 14px 32px rgba(15,23,42,.055)}.dashboard-suggestion-icon{width:38px;height:38px;border-radius:14px;display:grid;place-items:center;background:rgba(31,157,99,.10);flex:0 0 auto}.dashboard-suggestion-card strong{display:block;color:#111827;font-size:16px;line-height:1.2}.dashboard-suggestion-card p{margin:6px 0 0;color:#5f6b7a;line-height:1.45;font-size:14px}.dashboard-suggestion-warning .dashboard-suggestion-icon{background:rgba(245,158,11,.13)}.dashboard-suggestion-positive .dashboard-suggestion-icon{background:rgba(31,157,99,.13)}.dashboard-suggestion-tip .dashboard-suggestion-icon{background:rgba(47,128,237,.12)}.dashboard-suggestion-education .dashboard-suggestion-icon{background:rgba(124,77,255,.12)}
.dashboard-suggestions-note{margin-top:14px;border:1px solid rgba(31,157,99,.20);background:rgba(31,157,99,.08);border-radius:16px;padding:13px 14px;color:#0b2f26;font-size:14px;line-height:1.45}
.dashboard-suggestions-footer{display:grid;grid-template-columns:1fr 1.25fr;gap:12px;padding:18px 24px 22px;border-top:1px solid rgba(220,229,221,.86);background:#fff}.dashboard-suggestions-footer .btn{min-height:52px;border-radius:16px;font-weight:760;text-decoration:none;display:inline-flex;align-items:center;justify-content:center}
.dashboard-first-account-onboarding .dashboard-suggestions-card{width:min(560px,100%)}
@media(max-width:760px){.dashboard-suggestions-modal-shell{align-items:end;place-items:end center;padding:14px}.dashboard-suggestions-card{max-height:calc(100dvh - 28px);border-radius:26px 26px 18px 18px}.dashboard-suggestions-head{padding:21px 20px 16px}.dashboard-suggestions-head h2{font-size:25px}.dashboard-suggestions-scroll{padding:18px 20px}.dashboard-suggestions-summary{grid-template-columns:1fr}.dashboard-suggestions-footer{grid-template-columns:1fr;padding:16px 20px 20px}}

/* STEP 035B — Fix riepilogo suggerimenti dashboard
   Evita che gli span generati per i decimali ereditino lo stile card del riepilogo. */
.dashboard-suggestions-summary > span{
  display:grid!important;
  gap:3px!important;
  border:1px solid rgba(220,229,221,.95)!important;
  background:#fff!important;
  border-radius:18px!important;
  padding:13px 14px!important;
  box-shadow:0 12px 26px rgba(15,23,42,.05)!important;
  min-width:0!important;
}
.dashboard-suggestions-summary > span strong{
  display:block!important;
  font-size:18px!important;
  line-height:1.08!important;
  color:#0b2f26!important;
  white-space:nowrap!important;
  min-width:0!important;
}
.dashboard-suggestions-summary > span small{
  display:block!important;
  font-size:12px!important;
  line-height:1.2!important;
  color:#6b7280!important;
  font-weight:500!important;
  white-space:nowrap!important;
}
.dashboard-suggestions-summary strong .currency-decimals-enhanced,
.dashboard-suggestions-summary strong .currency-decimals,
.dashboard-suggestions-summary .currency-decimals-enhanced,
.dashboard-suggestions-summary .currency-decimals{
  border:0!important;
  background:transparent!important;
  border-radius:0!important;
  padding:0!important;
  box-shadow:none!important;
  display:inline!important;
  width:auto!important;
  min-width:0!important;
}
.dashboard-suggestions-summary strong .currency-decimals{
  font-size:.5em!important;
  line-height:1!important;
  vertical-align:baseline!important;
}
@media(max-width:760px){
  .dashboard-suggestions-summary > span strong{font-size:17px!important}
}

/* STEP 036 — Selettore mese dashboard operativo */
.topbar[data-global-topbar] .topbar-month-trigger{
  cursor:pointer;
  pointer-events:auto;
}
.topbar[data-global-topbar] .topbar-month-trigger:hover{
  background:rgba(255,255,255,.13);
  border-color:rgba(255,255,255,.34);
}
.dashboard-month-panel-shell[hidden]{display:none!important;}
.dashboard-month-panel-shell{
  position:fixed;
  inset:0;
  z-index:9000;
  display:grid;
  place-items:center;
  padding:24px;
}
.dashboard-month-panel-backdrop{
  position:absolute;
  inset:0;
  background:rgba(5,31,24,.38);
  backdrop-filter:blur(8px);
}
.dashboard-month-panel-card{
  position:relative;
  z-index:1;
  width:min(520px,calc(100vw - 32px));
  max-height:calc(100vh - 48px);
  overflow:auto;
  border-radius:26px;
  background:linear-gradient(145deg,#ffffff 0%,#f7fbf8 74%,#edf8f1 100%);
  border:1px solid rgba(220,229,221,.92);
  box-shadow:0 34px 90px rgba(6,32,25,.28);
  padding:30px;
}
.dashboard-month-close{
  position:absolute;
  top:18px;
  right:18px;
}
.dashboard-month-panel-card h2{
  margin:4px 0 8px;
  font-size:32px;
  letter-spacing:-.04em;
  color:#111827;
}
.dashboard-month-helper{
  margin:0 42px 22px 0;
  color:#6b7280;
  line-height:1.45;
}
.dashboard-month-control{
  display:grid;
  grid-template-columns:58px minmax(0,1fr) 58px;
  align-items:center;
  gap:12px;
  padding:14px;
  border:1px solid #dce5dd;
  border-radius:22px;
  background:#fff;
  box-shadow:0 14px 34px rgba(15,23,42,.07);
}
.dashboard-month-control strong{
  text-align:center;
  font-size:23px;
  letter-spacing:-.02em;
  color:#0b2f26;
}
.dashboard-month-arrow{
  width:52px;
  height:52px;
  border-radius:17px;
  border:1px solid #dce5dd;
  background:#f8fbf8;
  color:#0f7a4f;
  font-size:32px;
  line-height:1;
  cursor:pointer;
  box-shadow:0 10px 24px rgba(15,23,42,.06);
}
.dashboard-month-arrow:hover{
  background:#eaf7ef;
  border-color:rgba(31,157,99,.35);
}
.dashboard-month-today{
  margin-top:14px;
  width:100%;
  min-height:52px;
  border-radius:17px;
  border:1px solid rgba(31,157,99,.25);
  background:#eaf7ef;
  color:#0f7a4f;
  font-weight:700;
  cursor:pointer;
}
.dashboard-month-today:hover{
  background:#ddf2e6;
}
@media(max-width:640px){
  .dashboard-month-panel-card{padding:24px 18px;border-radius:22px;}
  .dashboard-month-panel-card h2{font-size:27px;}
  .dashboard-month-helper{margin-right:34px;}
  .dashboard-month-control{grid-template-columns:48px minmax(0,1fr) 48px;}
  .dashboard-month-arrow{width:46px;height:46px;font-size:28px;}
  .dashboard-month-control strong{font-size:19px;}
}

/* STEP 038 — Pagina Bilancio reale per categoria */
.budget-page{
  display:grid;
  gap:20px;
}
.budget-hero{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:22px;
  padding:26px;
  overflow:visible;
}
.budget-hero h1{
  margin:0;
  font-size:clamp(30px,4vw,46px);
  line-height:1;
  letter-spacing:-.045em;
  color:#111827;
}
.budget-hero p:not(.eyebrow){
  margin:10px 0 0;
  color:#6b7280;
  font-size:15px;
  line-height:1.45;
  max-width:650px;
}
.budget-month-box{
  display:grid;
  grid-template-columns:46px minmax(150px,1fr) 46px;
  align-items:center;
  gap:9px;
  min-width:330px;
  padding:12px;
  border:1px solid rgba(220,229,221,.98);
  border-radius:22px;
  background:#fff;
  box-shadow:0 14px 34px rgba(15,23,42,.07);
}
.budget-month-box strong{
  text-align:center;
  color:#0b2f26;
  font-size:17px;
  font-weight:650;
  letter-spacing:-.015em;
  white-space:nowrap;
}
.budget-month-arrow{
  width:42px;
  height:42px;
  border-radius:15px;
  border:1px solid #dce5dd;
  background:#f8fbf8;
  color:#0f7a4f;
  font-size:28px;
  line-height:1;
  cursor:pointer;
  box-shadow:0 8px 18px rgba(15,23,42,.05);
}
.budget-month-arrow:hover{
  background:#eaf7ef;
  border-color:rgba(31,157,99,.36);
}
.budget-month-current{
  grid-column:1 / -1;
  min-height:40px;
  border-radius:14px;
  border:1px solid rgba(31,157,99,.22);
  background:#eaf7ef;
  color:#0f7a4f;
  font-weight:650;
  cursor:pointer;
}
.budget-month-current:hover{
  background:#ddf2e6;
}
.budget-summary-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}
.budget-summary-card{
  border:1px solid rgba(220,229,221,.95);
  border-radius:22px;
  padding:20px;
  background:#fff;
  box-shadow:0 14px 34px rgba(15,23,42,.07);
  display:grid;
  gap:6px;
  position:relative;
  overflow:hidden;
}
.budget-summary-card::after{
  content:"";
  position:absolute;
  right:-32px;
  top:-40px;
  width:104px;
  height:104px;
  border-radius:999px;
  opacity:.12;
  background:var(--summary-color,#1f9d63);
  pointer-events:none;
}
.budget-summary-card span{
  color:#6b7280;
  font-size:13px;
  font-weight:600;
}
.budget-summary-card strong{
  color:#0b2f26;
  font-size:clamp(25px,3vw,34px);
  line-height:1;
  letter-spacing:-.035em;
  white-space:nowrap;
}
.budget-summary-card small{
  color:#6b7280;
  font-size:12.5px;
  line-height:1.35;
}
.budget-summary-planned{--summary-color:#2F80ED;}
.budget-summary-spent{--summary-color:#F04444;}
.budget-summary-left{--summary-color:#1F9D63;}
.budget-table-card{
  overflow:visible;
}
.budget-table-head{
  align-items:center;
}
.budget-table-wrap{
  width:100%;
  overflow-x:auto;
  margin-top:10px;
}
.budget-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0 9px;
  table-layout:fixed;
}
.budget-table th{
  color:#6b7280;
  font-size:12px;
  font-weight:650;
  text-align:left;
  padding:0 10px 4px;
  white-space:nowrap;
}
.budget-table th:nth-child(1){width:29%;}
.budget-table th:nth-child(2),
.budget-table th:nth-child(3),
.budget-table th:nth-child(4){width:14%;}
.budget-table th:nth-child(5){width:19%;}
.budget-table th:nth-child(6){width:10%;}
.budget-table td{
  background:#fff;
  border-top:1px solid rgba(220,229,221,.96);
  border-bottom:1px solid rgba(220,229,221,.96);
  padding:13px 10px;
  vertical-align:middle;
  font-size:13.5px;
}
.budget-table td:first-child{
  position:relative;
  overflow:hidden;
  border-left:1px solid rgba(220,229,221,.96);
  border-radius:17px 0 0 17px;
}
.budget-page .budget-row-planned td:first-child::before,
.budget-page .budget-row-unplanned td:first-child::before{
  content:"";
  position:absolute;
  left:0;
  top:-1px;
  bottom:-1px;
  width:5px;
  border-radius:17px 0 0 17px;
  pointer-events:none;
}
.budget-page .budget-row-planned td:first-child::before{
  background:#1f9d63;
}
.budget-page .budget-row-unplanned td:first-child::before{
  background:#f04444;
}
.budget-table td:last-child{
  border-right:1px solid rgba(220,229,221,.96);
  border-radius:0 17px 17px 0;
}
.budget-table td > strong{
  color:#0b2f26;
  font-weight:700;
  white-space:nowrap;
}
.budget-category-cell{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.budget-category-icon{
  width:36px;
  height:36px;
  border-radius:14px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  font-size:17px;
  background:color-mix(in srgb,var(--category-color,#6B7280) 13%,#ffffff);
  border:1px solid color-mix(in srgb,var(--category-color,#6B7280) 25%,#ffffff);
}
.budget-category-cell span:last-child{
  min-width:0;
  display:grid;
  gap:2px;
}
.budget-category-cell strong{
  font-size:14px;
  color:#111827;
  font-weight:650;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.budget-category-cell small{
  color:#6b7280;
  font-size:12px;
  line-height:1.2;
}
.budget-progress-cell{
  display:grid;
  gap:6px;
  min-width:0;
}
.budget-progress-track{
  height:9px;
  border-radius:999px;
  background:#edf3ee;
  overflow:hidden;
}
.budget-progress-track span{
  display:block;
  height:100%;
  max-width:100%;
  border-radius:999px;
  background:#1f9d63;
}
.budget-row-warning .budget-progress-track span{background:#f59e0b;}
.budget-row-over .budget-progress-track span{background:#f04444;}
.budget-row-empty .budget-progress-track span{background:#9ca3af;}
.budget-progress-cell small{
  font-size:11.5px;
  color:#6b7280;
  white-space:nowrap;
}
.budget-status-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:26px;
  padding:0 9px;
  border-radius:999px;
  font-size:11.5px;
  font-weight:550;
  white-space:nowrap;
}
.budget-status-ok{
  color:#0f7a4f;
  background:rgba(31,157,99,.11);
  border:1px solid rgba(31,157,99,.18);
}
.budget-status-warning{
  color:#a16207;
  background:rgba(245,158,11,.13);
  border:1px solid rgba(245,158,11,.22);
}
.budget-status-over{
  color:#b42318;
  background:rgba(240,68,68,.11);
  border:1px solid rgba(240,68,68,.20);
}
.budget-status-empty{
  color:#6b7280;
  background:#f3f4f6;
  border:1px solid #e5e7eb;
}
.budget-empty-state{
  display:grid;
  gap:5px;
  padding:16px;
  color:#6b7280;
}
.budget-empty-state strong{
  color:#111827;
}
.budget-empty-state p{
  margin:0;
}
.budget-page .currency-decimals-enhanced{
  white-space:nowrap;
}
@media(max-width:980px){
  .budget-hero{align-items:stretch;flex-direction:column;}
  .budget-month-box{min-width:0;width:100%;}
  .budget-summary-grid{grid-template-columns:1fr;}
  .budget-table{min-width:820px;}
}

/* STEP 038B — Rifinitura Bilancio: KPI coerenti, categoria leggibile e importi più chiari */
.budget-summary-grid{
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
}
.budget-summary-card{
  min-height:136px;
  border:0;
  border-radius:18px;
  padding:22px 24px;
  color:#fff;
  box-shadow:0 18px 34px rgba(9,31,24,.13), inset 0 1px 0 rgba(255,255,255,.16);
  overflow:hidden;
}
.budget-summary-card::before{
  content:"";
  position:absolute;
  inset:0;
  background:radial-gradient(circle at 18% 10%,rgba(255,255,255,.26),transparent 34%),linear-gradient(135deg,rgba(255,255,255,.08),transparent);
  pointer-events:none;
}
.budget-summary-card::after{
  right:-36px;
  top:-42px;
  width:116px;
  height:116px;
  opacity:.18;
  background:#fff;
}
.budget-summary-planned{background:linear-gradient(135deg,#2F80ED,#1559B8);}
.budget-summary-spent{background:linear-gradient(135deg,#F04444,#B42318);}
.budget-summary-left{background:linear-gradient(135deg,#1F9D63,#0B6B45);}
.budget-summary-card span,
.budget-summary-card strong,
.budget-summary-card small{
  position:relative;
  z-index:1;
}
.budget-summary-card span{
  color:rgba(255,255,255,.86);
  font-size:15px;
  font-weight:650;
}
.budget-summary-card strong{
  color:#fff;
  font-size:clamp(29px,3vw,38px);
  letter-spacing:-.045em;
}
.budget-summary-card small{
  color:rgba(255,255,255,.82);
  font-size:13.5px;
}
.budget-table-wrap{
  overflow-x:hidden;
}
.budget-table{
  table-layout:fixed;
}
.budget-table th:nth-child(1){width:28%;}
.budget-table th:nth-child(2),
.budget-table th:nth-child(3),
.budget-table th:nth-child(4){width:14.5%;}
.budget-table th:nth-child(5){width:19%;}
.budget-table th:nth-child(6){width:9.5%;}
.budget-table td{
  padding:14px 12px;
}
.budget-table td > strong{
  font-size:15.5px;
  line-height:1.1;
  font-weight:760;
}
.budget-table .amount-negative,
.budget-table .amount-positive{
  font-size:15.5px;
}
.budget-category-cell{
  gap:12px;
}
.budget-category-icon{
  width:42px;
  height:42px;
  border-radius:16px;
  font-size:20px;
  overflow:hidden;
  color:transparent;
  text-shadow:0 0 0 #111827;
}
.budget-category-cell strong{
  font-size:15.5px;
  font-weight:680;
  color:#111827;
}
.budget-category-cell small{
  font-size:12.5px;
}
.budget-page .budget-table .currency-decimals-enhanced .currency-decimals{
  font-size:.58em;
  line-height:1;
  vertical-align:.28em;
}
.budget-progress-track{
  height:10px;
}
.budget-status-pill{
  min-height:28px;
  padding:0 11px;
  font-size:12px;
  font-weight:560;
}
@media(max-width:980px){
  .budget-summary-grid{grid-template-columns:1fr;}
  .budget-table-wrap{overflow-x:auto;}
  .budget-table{min-width:820px;}
}

/* STEP 038C — Bilancio allineato a Categorie: header e icone reali */
.budget-table-wrap{
  overflow-x:hidden;
}
.budget-table{
  width:100%;
  min-width:0;
  table-layout:fixed;
  border-collapse:separate;
  border-spacing:0 10px;
}
.budget-table thead tr{
  background:#f8fbf8;
}
.budget-table th{
  background:#f8fbf8;
  color:#5b6673;
  font-size:13px;
  font-weight:620;
  line-height:1.2;
  padding:14px 14px;
  border-top:1px solid rgba(220,229,221,.95);
  border-bottom:1px solid rgba(220,229,221,.95);
  white-space:nowrap;
  text-align:left;
}
.budget-table th:first-child{
  border-left:1px solid rgba(220,229,221,.95);
  border-radius:16px 0 0 16px;
}
.budget-table th:last-child{
  border-right:1px solid rgba(220,229,221,.95);
  border-radius:0 16px 16px 0;
}
.budget-table th:nth-child(1){width:30%;}
.budget-table th:nth-child(2),
.budget-table th:nth-child(3),
.budget-table th:nth-child(4){width:14%;}
.budget-table th:nth-child(5){width:20%;}
.budget-table th:nth-child(6){width:8%;}
.budget-table td{
  padding:14px 14px;
}
.budget-category-cell{
  gap:10px;
}
.budget-category-icon{
  width:34px;
  height:34px;
  border-radius:11px;
  font-size:17px;
  color:inherit;
  text-shadow:none;
  overflow:visible;
  background:color-mix(in srgb,var(--category-color,#6B7280) 12%,#ffffff);
  border:0;
}
.budget-category-cell strong{
  font-size:15px;
  font-weight:660;
}
.budget-category-cell small{
  font-size:12.5px;
}
.budget-table td > strong,
.budget-table .amount-negative,
.budget-table .amount-positive{
  font-size:16px;
}
.budget-status-pill{
  font-weight:540;
}
@media(max-width:980px){
  .budget-table-wrap{overflow-x:auto;}
  .budget-table{min-width:760px;}
}

/* STEP 039 — Scadenze reali */
.due-page {
  display: grid;
  gap: 24px;
}

.due-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 22px 28px;
}

.due-hero .eyebrow {
  margin-bottom: 0;
  line-height: 1.05;
}

.due-hero h1 {
  margin: 0 0 6px;
  font-size: clamp(28px, 3.2vw, 38px);
  line-height: 0.98;
}

.due-hero p {
  margin: 0;
  max-width: 680px;
  color: var(--color-text-muted, #6B7280);
  font-size: 16px;
  line-height: 1.34;
}

.due-hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  white-space: nowrap;
}

.due-month-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(15, 122, 79, 0.2);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
}

.due-month-box strong {
  min-width: 138px;
  text-align: center;
  color: #0b2f26;
  font-size: 15px;
  font-weight: 650;
}

.due-month-arrow {
  width: 38px;
  height: 38px;
  border: 1px solid #dce5dd;
  border-radius: 13px;
  background: #f8fbf8;
  color: #0f7a4f;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.due-create-btn {
  min-height: 50px;
  border-radius: 16px;
  padding-inline: 18px;
}

.due-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.due-kpi {
  padding: 22px;
  border-radius: 22px;
  color: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
  overflow: hidden;
  position: relative;
  min-height: 142px;
}

.due-kpi::after {
  content: '';
  position: absolute;
  right: -34px;
  top: -34px;
  width: 112px;
  height: 112px;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
}

.due-kpi span,
.due-kpi small {
  display: block;
  position: relative;
  z-index: 1;
}

.due-kpi span {
  font-weight: 650;
  opacity: .9;
}

.due-kpi strong {
  display: block;
  position: relative;
  z-index: 1;
  margin: 12px 0 8px;
  font-size: clamp(30px, 2.5vw, 42px);
  line-height: 1;
  white-space: nowrap;
}

.due-kpi strong .currency-decimals {
  font-size: .48em;
  font-weight: 750;
}

.due-kpi small {
  opacity: .88;
  font-size: 14px;
}

.due-kpi-total { background: linear-gradient(135deg, #0f7a4f, #1f9d63); }
.due-kpi-pending { background: linear-gradient(135deg, #f59e0b, #f97316); }
.due-kpi-paid { background: linear-gradient(135deg, #0b6f51, #0f7a4f); }
.due-kpi-late { background: linear-gradient(135deg, #ef4444, #b91c1c); }

.due-list-card {
  padding: 28px;
}

.due-list-head {
  align-items: flex-start;
  margin-bottom: 22px;
}

.due-list-head h2 {
  margin: 0;
  font-size: 28px;
}

.due-list {
  display: grid;
  gap: 12px;
}
.due-section-card {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #dce5dd;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff, #fbfdfb);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.045);
}

.due-section-card-paid {
  border-color: rgba(15, 122, 79, 0.18);
  background: linear-gradient(180deg, rgba(15, 122, 79, 0.05), rgba(15, 122, 79, 0.02));
}

.due-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 4px 2px 0;
  color: #0b5b3a;
  font-weight: 800;
}

.due-section-head span {
  font-size: 14px;
  letter-spacing: .02em;
  text-transform: none;
}

.due-section-head strong {
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(15, 122, 79, 0.22);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.055);
}

.due-section-list {
  display: grid;
  gap: 12px;
}


.due-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  position: relative;
  isolation: isolate;
  padding: 16px 18px 16px 22px;
  border: 1px solid #dce5dd;
  border-radius: 20px;
  background: linear-gradient(135deg, #fff, #fbfdfb);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.045);
}

.due-row::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  border-radius: inherit;
  background: var(--due-row-accent, #dc2626);
  clip-path: inset(0 calc(100% - 8px) 0 0);
  pointer-events: none;
}

.due-row > * {
  position: relative;
  z-index: 1;
}

.due-row-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: color-mix(in srgb, var(--due-row-color, #0F7A4F) 16%, white);
  border: 1px solid color-mix(in srgb, var(--due-row-color, #0F7A4F) 24%, white);
  font-size: 22px;
}

.due-row-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.due-row-title::before {
  content: "";
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  background: var(--due-row-accent, #dc2626);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--due-row-accent, #dc2626) 14%, transparent);
}

.due-row-title strong {
  font-size: 18px;
  color: #111827;
}

.due-row-main small {
  display: block;
  margin-top: 5px;
  color: #6b7280;
  font-size: 14px;
}

.due-row-side {
  display: grid;
  justify-items: end;
  gap: 8px;
  color: #0b5b3a;
  font-size: 18px;
  font-weight: 700;
}

.due-row-actions {
  display: flex;
  gap: 8px;
  position: relative;
  z-index: 5;
}

.due-action-btn {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  border: 1px solid #dce5dd;
  background: #fff;
  color: #0f7a4f;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
  position: relative;
}

.due-action-paid {
  background: #e8f7ef;
  border-color: #bde8cf;
}

.due-action-danger {
  color: #f04444;
  border-color: #ffd0d0;
}

.due-action-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  white-space: nowrap;
  background: #0b2f26;
  color: #fff;
  border-radius: 10px;
  padding: 7px 9px;
  font-size: 12px;
  font-weight: 650;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
  z-index: 40;
}

.due-action-btn[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

.due-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.due-status-badge span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.due-status-pending { background: #fff7ed; color: #c2410c; }
.due-status-paid { background: #e8f7ef; color: #0f7a4f; }
.due-status-late { background: #fee2e2; color: #b91c1c; }

/* STEP PORTALE 048 — Scadenze: sfondi differenziati per stato */
.due-row-pending {
  background: linear-gradient(135deg, #fff5f5, #fffdfb);
  border-color: #f7cfd0;
}

.due-row-late {
  background: linear-gradient(135deg, #fff1f1, #fffafa);
  border-color: #f4bfc1;
}

.due-row-paid {
  --due-row-accent: #0f7a4f;
  background: linear-gradient(135deg, #edf8f2, #fbfffd);
  border-color: #bde8cf;
}

.due-row-paid .due-row-icon {
  background: #e3f7eb;
  border-color: #bde8cf;
}

.due-empty {
  padding: 26px;
  border: 1px dashed #cbd8cf;
  border-radius: 20px;
  color: #6b7280;
  background: #fbfdfb;
}

.due-empty strong {
  display: block;
  color: #111827;
  margin-bottom: 6px;
}


.due-modal-backdrop[hidden],
.due-confirm-backdrop[hidden] {
  display: none !important;
}

.due-modal-backdrop,
.due-confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 26, 20, 0.48);
  backdrop-filter: blur(10px);
}

.due-modal-card {
  width: min(920px, 96vw);
  max-height: min(86vh, 820px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 34px 90px rgba(15, 23, 42, 0.28);
}

.due-modal-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding: 28px 30px;
  border-bottom: 1px solid #dce5dd;
  background: linear-gradient(135deg, #fff, #f5fbf7);
}

.due-modal-header h2 {
  margin: 0 0 8px;
  font-size: 34px;
  line-height: 1.05;
}

.due-modal-header p:not(.eyebrow) {
  margin: 0;
  color: #6b7280;
}

.due-modal-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: #e8f7ef;
  font-size: 30px;
}

.due-modal-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  padding: 26px 30px;
}

.due-form {
  display: grid;
  gap: 20px;
}

.due-form .form-field span,
.due-date-control > span,
.custom-choice-group > span {
  display: block;
  margin-bottom: 9px;
  font-weight: 700;
  color: #4b5563;
}

.due-form input {
  width: 100%;
  border: 1px solid #dce5dd;
  border-radius: 18px;
  min-height: 60px;
  padding: 0 18px;
  font-size: 18px;
  font-weight: 650;
  color: #111827;
  outline: none;
  background: #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.045);
}

.due-form input:focus {
  border-color: #1f9d63;
  box-shadow: 0 0 0 4px rgba(31, 157, 99, .14);
}

.due-date-box {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid #dce5dd;
  border-radius: 20px;
  background: #fbfdfb;
}

.due-date-box button {
  width: 52px;
  height: 52px;
  border: 1px solid #dce5dd;
  border-radius: 16px;
  background: #fff;
  color: #0f7a4f;
  font-size: 26px;
  cursor: pointer;
}

.due-date-box strong {
  text-align: center;
  color: #0b2f26;
  font-size: 20px;
}

.due-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.due-choice {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  text-align: left;
  min-height: 74px;
  padding: 14px 16px;
  border: 1px solid #dce5dd;
  border-radius: 18px;
  background: #fff;
  cursor: pointer;
  color: #111827;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.due-choice:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 122, 79, 0.28);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.due-choice-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef7f1;
  color: #0f7a4f;
  font-size: 20px;
  line-height: 1;
  overflow: hidden;
  flex: 0 0 auto;
}

.due-choice-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.due-choice strong {
  font-size: 16px;
  font-weight: 650;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.due-choice small {
  color: #6b7280;
  font-size: 13px;
}

.due-choice-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.due-choice-meta {
  color: #0f7a4f;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.due-choice-balance {
  color: #6b7280;
  font-weight: 500;
}

.due-choice-balance strong {
  color: #0b7f4f;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.due-choice-meta-label {
  color: #6b7280;
  font-weight: 500;
}

.due-choice.is-selected .due-choice-meta {
  color: #095b3a;
}

.due-choice.is-selected .due-choice-meta-label {
  color: #6b7280;
}

.due-choice.is-selected {
  border-color: #1f9d63;
  background: #eaf8f0;
  box-shadow: 0 0 0 4px rgba(31, 157, 99, .12);
}

.due-choice.is-selected .due-choice-icon {
  background: #0f7a4f;
  color: #fff;
}

.due-message {
  padding: 14px 16px;
  border-radius: 16px;
  font-weight: 650;
}

.due-message-error {
  background: #fee2e2;
  color: #b91c1c;
}

.due-modal-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 18px 30px 26px;
  border-top: 1px solid #dce5dd;
  background: #fff;
}

.due-confirm-card {
  width: min(520px, 94vw);
  padding: 30px;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 34px 90px rgba(15, 23, 42, 0.28);
}

.due-confirm-card h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.due-confirm-card p {
  color: #6b7280;
  line-height: 1.5;
}

.due-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}

@media (max-width: 980px) {
  .due-hero { align-items: stretch; flex-direction: column; }
  .due-hero-actions { justify-content: flex-start; flex-wrap: wrap; white-space: normal; }
  .due-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .due-row { grid-template-columns: auto minmax(0, 1fr); }
  .due-row-side { grid-column: 1 / -1; justify-items: start; }
  .due-choice-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .due-kpi-grid { grid-template-columns: 1fr; }
  .due-modal-backdrop, .due-confirm-backdrop { padding: 12px; }
  .due-modal-header { padding: 22px; grid-template-columns: minmax(0, 1fr) auto; }
  .due-modal-icon { display: none; }
  .due-modal-scroll { padding: 20px; }
  .due-modal-footer { padding: 16px 20px 22px; grid-template-columns: 1fr; }
}


/* STEP 039C — Fix definitivo modale conferma Scadenze
   La conferma deve essere chiusa di default e aprirsi solo con classe is-open. */
.due-modal-backdrop[hidden],
.due-confirm-backdrop[hidden],
.due-modal-backdrop:not(.is-open),
.due-confirm-backdrop:not(.is-open){
  display:none!important;
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}
.due-modal-backdrop.is-open,
.due-confirm-backdrop.is-open{
  display:grid!important;
  visibility:visible!important;
  opacity:1!important;
  pointer-events:auto!important;
}
.due-confirm-actions .btn:disabled{
  opacity:.65;
  cursor:not-allowed;
}

/* STEP 039D — Selezione data scadenza rapida custom */
.due-date-picker {
  padding: 16px;
  border: 1px solid #dce5dd;
  border-radius: 22px;
  background: linear-gradient(135deg, #ffffff, #f7fbf8);
}

.due-date-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.due-date-topline > span {
  margin: 0;
  font-weight: 700;
  color: #4b5563;
}

.due-date-today {
  border: 1px solid #bde7d0;
  background: #e8f7ef;
  color: #0f7a4f;
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.due-date-box-compact {
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  margin-bottom: 12px;
}

.due-date-box-compact button {
  width: 46px;
  height: 46px;
}

.due-year-switch {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.due-year-switch button {
  width: 42px;
  height: 42px;
  border: 1px solid #dce5dd;
  border-radius: 14px;
  background: #fff;
  color: #0f7a4f;
  font-size: 22px;
  cursor: pointer;
}

.due-year-switch strong {
  text-align: center;
  font-size: 18px;
  color: #0b2f26;
}

.due-month-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.due-month-pill,
.due-day-btn {
  border: 1px solid #dce5dd;
  background: #fff;
  color: #334155;
  cursor: pointer;
}

.due-month-pill {
  min-height: 38px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 650;
  text-transform: capitalize;
}

.due-month-pill.is-selected,
.due-day-btn.is-selected {
  border-color: #1f9d63;
  background: #1f9d63;
  color: #fff;
  box-shadow: 0 10px 22px rgba(31, 157, 99, .22);
}

.due-day-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
}

.due-day-btn,
.due-day-empty {
  min-height: 38px;
  border-radius: 13px;
  font-size: 14px;
  font-weight: 700;
}

.due-day-empty {
  display: block;
  background: transparent;
}

@media (max-width: 640px) {
  .due-month-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .due-day-grid { gap: 5px; }
}


/* STEP 039G — Scadenze: sottocategorie e chiusura modale premium */
.due-subcategory-group[hidden] {
  display: none !important;
}

.due-modal-card .modal-close {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--color-border-soft, #DCE5DD);
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-text, #111827);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  line-height: 1;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.due-modal-card .modal-close:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 122, 79, 0.28);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
}


/* STEP 039H — Scadenze: sottocategorie premium e valori tecnici nascosti */
.due-choice-helper {
  margin: -2px 0 12px;
  color: var(--color-text-muted, #6B7280);
  font-size: 14px;
  line-height: 1.45;
}

.due-subcategory-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.due-subcategory-choice {
  min-height: 70px;
  border-color: rgba(15, 122, 79, 0.18);
  background: linear-gradient(135deg, #ffffff 0%, #f7fbf8 100%);
}

.due-subcategory-choice .due-choice-icon {
  background: rgba(15, 122, 79, 0.10);
}

@media (max-width: 760px) {
  .due-subcategory-grid {
    grid-template-columns: 1fr;
  }
}


/* STEP 039O — Ripristino controlli stabili Topbar Dashboard e modale mese
   Fix mirato anti-regressione: non modificare logica JS, solo stile premium dei controlli già testati. */
.topbar[data-global-topbar] .topbar-pill-primary[data-action="open-dashboard-suggestions"]{
  appearance:none!important;
  -webkit-appearance:none!important;
  cursor:pointer!important;
  pointer-events:auto!important;
  min-height:42px!important;
  border:1px solid rgba(255,255,255,.34)!important;
  background:linear-gradient(135deg,rgba(255,255,255,.22),rgba(255,255,255,.10))!important;
  color:#fff!important;
  border-radius:999px!important;
  box-shadow:0 12px 28px rgba(5,31,24,.16), inset 0 1px 0 rgba(255,255,255,.22)!important;
  font-weight:760!important;
}
.topbar[data-global-topbar] .topbar-pill-primary[data-action="open-dashboard-suggestions"]:hover{
  background:linear-gradient(135deg,rgba(255,255,255,.30),rgba(255,255,255,.14))!important;
  border-color:rgba(255,255,255,.48)!important;
  transform:translateY(-1px);
}
.topbar[data-global-topbar] .topbar-month-trigger{
  appearance:none!important;
  -webkit-appearance:none!important;
  cursor:pointer!important;
  pointer-events:auto!important;
  min-height:42px!important;
  border-radius:999px!important;
}
.dashboard-month-actions{
  display:grid;
  grid-template-columns:1fr 1.15fr;
  gap:12px;
  margin-top:16px;
}
.dashboard-month-today,
.dashboard-month-apply{
  appearance:none!important;
  -webkit-appearance:none!important;
  width:100%;
  min-height:54px;
  border-radius:18px;
  border:1px solid rgba(31,157,99,.24);
  font-weight:820;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  text-align:center;
  box-shadow:0 14px 30px rgba(15,23,42,.08);
}
.dashboard-month-today{
  margin-top:0!important;
  background:#eef8f2;
  color:#0f7a4f;
}
.dashboard-month-apply{
  background:linear-gradient(135deg,#20a86b,#0f7a4f);
  color:#fff;
  border-color:rgba(15,122,79,.42);
  box-shadow:0 16px 34px rgba(15,122,79,.22);
}
.dashboard-month-today:hover{
  background:#e1f3e9;
  border-color:rgba(31,157,99,.38);
}
.dashboard-month-apply:hover{
  filter:brightness(1.03);
  transform:translateY(-1px);
}
.dashboard-month-arrow{
  appearance:none!important;
  -webkit-appearance:none!important;
}
@media(max-width:640px){
  .dashboard-month-actions{grid-template-columns:1fr;}
  .dashboard-month-today,.dashboard-month-apply{min-height:52px;}
}


/* STEP 039Q — Ripristino Topbar: controlli uniformi, non attivi e non a pillola.
   Fix mirato anti-regressione: il bottone “Suggerimenti per te” deve avere lo stesso trattamento visivo del selettore mese. */
.dashboard-topbar .topbar-pill,
.topbar[data-global-topbar] .topbar-pill,
.topbar[data-global-topbar] .topbar-pill-primary[data-action="open-dashboard-suggestions"],
.topbar[data-global-topbar] .topbar-month-trigger{
  appearance:none!important;
  -webkit-appearance:none!important;
  min-height:46px!important;
  padding:11px 18px!important;
  border-radius:14px!important;
  border:1px solid rgba(255,255,255,.24)!important;
  background:rgba(0,0,0,.12)!important;
  color:#fff!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08)!important;
  font-weight:760!important;
  cursor:pointer!important;
  pointer-events:auto!important;
  transform:none!important;
}
.dashboard-topbar .topbar-pill:hover,
.topbar[data-global-topbar] .topbar-pill:hover,
.topbar[data-global-topbar] .topbar-pill-primary[data-action="open-dashboard-suggestions"]:hover,
.topbar[data-global-topbar] .topbar-month-trigger:hover{
  background:rgba(0,0,0,.16)!important;
  border-color:rgba(255,255,255,.34)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.10),0 10px 22px rgba(5,31,24,.12)!important;
  transform:none!important;
}

/* STEP 039R — Ripristino hover Topbar Dashboard senza pillola.
   Fix mirato: hover visibile sui bottoni topbar già testati, mantenendo forma rettangolare premium. */
.dashboard-topbar .topbar-pill:hover,
.topbar[data-global-topbar] .topbar-pill:hover,
.topbar[data-global-topbar] .topbar-pill-primary[data-action="open-dashboard-suggestions"]:hover,
.topbar[data-global-topbar] .topbar-month-trigger:hover{
  background:rgba(255,255,255,.16)!important;
  border-color:rgba(255,255,255,.42)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.16),0 12px 26px rgba(5,31,24,.18)!important;
  transform:translateY(-1px)!important;
}
.dashboard-topbar .topbar-pill:focus-visible,
.topbar[data-global-topbar] .topbar-pill:focus-visible,
.topbar[data-global-topbar] .topbar-pill-primary[data-action="open-dashboard-suggestions"]:focus-visible,
.topbar[data-global-topbar] .topbar-month-trigger:focus-visible{
  outline:3px solid rgba(255,255,255,.28)!important;
  outline-offset:3px!important;
}

/* STEP 040 — Impostazioni Conti */
.settings-accounts-card{
  margin-top:22px;
}
.settings-account-summary{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin:20px 0 22px;
}
.settings-mini-state{
  border:1px solid rgba(15,122,79,.14);
  background:linear-gradient(180deg,#ffffff 0%,#f7fbf8 100%);
  border-radius:16px;
  padding:16px 18px;
  box-shadow:0 10px 22px rgba(15,23,42,.045);
}
.settings-mini-state strong{
  display:block;
  font-size:24px;
  line-height:1.1;
  color:#0b2f26;
  font-weight:780;
  white-space:nowrap;
}
.settings-mini-state span{
  display:block;
  margin-top:6px;
  color:#6b7280;
  font-size:14px;
  line-height:1.25;
}

.settings-account-manage-box{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.settings-account-manage-btn{
  flex: 0 0 auto;
  white-space: nowrap;
}

.settings-account-preferences{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
  margin-bottom:18px;
}
.settings-account-preference-panel,
.settings-account-visibility-box,
.settings-account-overview-box,
.settings-account-manage-box,
.settings-account-methods-box,
.settings-account-education-note{
  border:1px solid #dce5dd;
  background:#fff;
  border-radius:18px;
  padding:18px;
  box-shadow:0 12px 28px rgba(15,23,42,.055);
}
.settings-subsection-title{
  display:flex;
  align-items:flex-start;
  gap:12px;
  margin-bottom:14px;
}
.settings-subsection-title h3{
  margin:0;
  font-size:19px;
  color:#111827;
  font-weight:760;
}
.settings-subsection-title p{
  margin:5px 0 0;
  color:#6b7280;
  font-size:14px;
  line-height:1.35;
}
.settings-subsection-icon{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:rgba(244,68,68,.10);
  color:#f04444;
  font-weight:820;
  flex:0 0 auto;
}
.settings-subsection-icon.income{
  background:rgba(31,157,99,.10);
  color:#1f9d63;
}
.settings-subsection-icon.dashboard{
  background:rgba(47,128,237,.10);
  color:#2f80ed;
}
.settings-subsection-icon.accounts{
  background:rgba(15,122,79,.10);
  color:#0f7a4f;
}
.settings-subsection-icon.methods{
  background:rgba(124,77,255,.10);
  color:#7c4dff;
}
.settings-account-choice-grid{
  display:grid;
  gap:10px;
}
.settings-account-choice{
  width:100%;
  display:flex;
  align-items:center;
  gap:12px;
  border:1px solid #dce5dd;
  background:#fff;
  border-radius:15px;
  padding:12px 13px;
  text-align:left;
  cursor:pointer;
  appearance:none;
  -webkit-appearance:none;
  transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,background .16s ease;
}
.settings-account-choice:hover{
  transform:translateY(-1px);
  border-color:rgba(15,122,79,.34);
  box-shadow:0 12px 24px rgba(15,23,42,.07);
}
.settings-account-choice.is-selected{
  border-color:#1f9d63;
  background:rgba(31,157,99,.08);
  box-shadow:0 0 0 4px rgba(31,157,99,.09);
}
.settings-account-choice-icon{
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  border-radius:13px;
  background:var(--account-choice-color,rgba(31,157,99,.13));
  color:#0b2f26;
  font-weight:800;
  flex:0 0 auto;
}
.settings-account-choice strong,
.settings-account-row-main strong{
  display:block;
  color:#111827;
  font-size:15px;
  font-weight:760;
  line-height:1.25;
}
.settings-account-choice small,
.settings-account-row-main small{
  display:block;
  margin-top:4px;
  color:#6b7280;
  font-size:13px;
  line-height:1.25;
}
.settings-account-visibility-list,
.settings-account-overview-list{
  display:grid;
  gap:10px;
}
.settings-account-overview-box,
.settings-account-methods-box,
.settings-account-education-note{
  margin-bottom:18px;
}
.settings-account-overview-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  border:1px solid #dce5dd;
  background:linear-gradient(180deg,#ffffff 0%,#f8faf8 100%);
  border-radius:16px;
  padding:13px 14px;
}
.settings-account-overview-row.is-disabled{
  opacity:.66;
}
.settings-account-overview-badges{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}
.settings-account-method-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}
.settings-account-method-grid article{
  border:1px solid rgba(15,122,79,.14);
  background:#f8faf8;
  border-radius:16px;
  padding:14px;
}
.settings-account-method-grid strong{
  display:block;
  color:#0b2f26;
  font-size:15px;
  font-weight:780;
}
.settings-account-method-grid span{
  display:block;
  margin-top:6px;
  color:#6b7280;
  font-size:13px;
  line-height:1.35;
}
.settings-account-education-note{
  display:flex;
  align-items:flex-start;
  gap:12px;
  background:linear-gradient(135deg,rgba(15,122,79,.08),rgba(255,255,255,.95));
}
.settings-account-education-note p{
  margin:5px 0 0;
  color:#6b7280;
  font-size:14px;
  line-height:1.45;
}
.settings-account-visibility-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  border:1px solid #dce5dd;
  background:#f8faf8;
  border-radius:16px;
  padding:13px 14px;
}
.settings-account-visibility-row.is-disabled{
  opacity:.65;
}
.settings-account-row-main{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}
.settings-account-visibility-row .toggle-switch[disabled]{
  cursor:not-allowed;
  opacity:.6;
}
.settings-account-footer{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:14px;
  margin-top:18px;
  padding-top:18px;
  border-top:1px solid #dce5dd;
}
.settings-account-loading,
.settings-account-empty{
  border:1px dashed rgba(15,122,79,.22);
  background:#f8faf8;
  border-radius:15px;
  padding:15px;
  color:#6b7280;
  line-height:1.45;
}
@media(max-width:960px){
  .settings-account-summary,
  
.settings-account-manage-box{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.settings-account-manage-btn{
  flex: 0 0 auto;
  white-space: nowrap;
}

.settings-account-preferences{
    grid-template-columns:1fr;
  }
  .settings-account-footer{
    grid-template-columns:1fr;
  }
  .settings-account-method-grid{
    grid-template-columns:1fr;
  }

  .settings-account-footer .btn{
    width:100%;
  }
}
@media(max-width:560px){
  .settings-account-preference-panel,
  .settings-account-visibility-box{
    padding:15px;
  }
  .settings-account-visibility-row{
    align-items:flex-start;
  }
  .settings-account-overview-row{
    align-items:flex-start;
    flex-direction:column;
  }
  .settings-account-overview-badges{
    justify-content:flex-start;
  }

  .settings-account-visibility-row .toggle-switch{
    transform:scale(.92);
    transform-origin:top right;
  }
}

/* STEP 040A — Fix visualizzazione pannelli Impostazioni */
.settings-layout > .settings-panel{
  grid-column:2;
  width:100%;
  min-width:0;
  scroll-margin-top:24px;
}
.settings-layout > .settings-panel[hidden]{
  display:none!important;
}
.settings-layout > .settings-panel.is-active{
  display:block;
}
.settings-shortcut[aria-current="page"]{
  border-color:rgba(31,157,99,.38);
  background:rgba(31,157,99,.08);
  box-shadow:0 10px 24px rgba(15,23,42,.05);
}
.settings-placeholder-panel{
  min-height:280px;
}
.settings-placeholder-box{
  border:1px dashed rgba(15,122,79,.22);
  background:#f8faf8;
  border-radius:18px;
  padding:18px;
  color:#6b7280;
  line-height:1.55;
}
@media(max-width:1100px){
  .settings-layout > .settings-panel{
    grid-column:1;
  }
}


/* STEP 040C — Bottone torna in alto globale */
.scroll-top-button{
  position:fixed;
  left:50%;
  bottom:28px;
  width:54px;
  height:54px;
  border:1px solid rgba(255,255,255,.55);
  border-radius:16px;
  background:linear-gradient(135deg,#0f7a4f,#095b3a);
  color:#fff;
  display:grid;
  place-items:center;
  box-shadow:0 18px 42px rgba(9,91,58,.28),0 0 0 7px rgba(255,255,255,.88);
  cursor:pointer;
  z-index:19;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:translate(-50%,18px) scale(.94);
  transition:opacity .18s ease,visibility .18s ease,transform .18s ease,box-shadow .18s ease,background .18s ease;
  -webkit-appearance:none;
  appearance:none;
}
.scroll-top-button span{
  display:block;
  font-size:28px;
  line-height:1;
  font-weight:900;
  transform:translateY(-1px);
}
.scroll-top-button.is-visible{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transform:translate(-50%,0) scale(1);
}
.scroll-top-button:hover,
.scroll-top-button:focus-visible{
  background:linear-gradient(135deg,#1b8f61,#0f7a4f);
  box-shadow:0 22px 48px rgba(9,91,58,.34),0 0 0 7px rgba(255,255,255,.92);
  outline:none;
  transform:translate(-50%,-2px) scale(1.02);
}
.scroll-top-button:active{
  transform:translate(-50%,0) scale(.98);
}
@media(max-width:720px){
  .scroll-top-button{
    width:50px;
    height:50px;
    bottom:22px;
    border-radius:15px;
  }
  .scroll-top-button span{font-size:26px}
}

/* STEP 040D — Avviso tecnico preferenze conti */
.settings-account-warning{
  border-color:rgba(245,158,11,.32);
  background:rgba(245,158,11,.10);
  color:#92400e;
}


/* STEP 040E — Scadenze: fallback controllo database */
.due-empty-with-db {
  margin-bottom: 18px;
  border-color: rgba(15, 122, 79, 0.28);
  background: linear-gradient(135deg, rgba(15, 122, 79, 0.07), rgba(255, 255, 255, 0.96));
}

.due-fallback-list {
  display: grid;
  gap: 14px;
}

.due-fallback-list .due-row {
  border-style: solid;
}

/* STEP 040F — Scadenze: rifinitura lista DB/fuori mese */
.due-fallback-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin:0 0 14px;
  padding:12px 16px;
  border:1px solid rgba(15,122,79,.18);
  border-radius:16px;
  background:rgba(15,122,79,.055);
  color:#0b5b3a;
  font-weight:700;
}

.due-fallback-toolbar span{
  font-size:14px;
  letter-spacing:.02em;
}

.due-fallback-toolbar strong{
  min-width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:#fff;
  border:1px solid rgba(15,122,79,.22);
  box-shadow:0 10px 22px rgba(15,23,42,.055);
}

.due-month-mini{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:6px 10px;
  border-radius:12px;
  background:rgba(15,122,79,.08);
  color:#0b5b3a;
  border:1px solid rgba(15,122,79,.16);
  font-size:12px;
  font-weight:750;
}

/* STEP 040J — Scadenze: campo descrizione custom e lista DB stabile */
.due-custom-textarea{
  min-height:92px;
  width:100%;
  padding:15px 16px;
  border:1px solid #dce5dd;
  border-radius:16px;
  background:linear-gradient(135deg,#ffffff,#f8fbf9);
  box-shadow:0 12px 28px rgba(15,23,42,.055);
  color:#111827;
  font-size:15px;
  line-height:1.45;
  outline:none;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  cursor:text;
}
.due-custom-textarea:empty::before{
  content:attr(data-placeholder);
  color:#9ca3af;
  pointer-events:none;
}
.due-custom-textarea:focus{
  border-color:#1f9d63;
  box-shadow:0 0 0 4px rgba(31,157,99,.12),0 14px 32px rgba(15,23,42,.07);
}
.due-description-field small{
  color:#6b7280;
  font-size:13px;
  font-weight:600;
}
.due-row-description{
  margin:7px 0 0;
  color:#6b7280;
  font-size:14px;
  line-height:1.42;
}
.due-fallback-toolbar + .due-fallback-list{
  margin-top:0;
}
.due-row + .due-fallback-toolbar{
  margin-top:18px;
}

/* STEP PORTALE 047 — Scadenze: box separati altri mesi e pagate */
.due-reminder-group {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.due-reminder-group-head {
  margin: 0;
}

.due-reminder-group-list {
  margin-top: 0;
}

.due-reminder-group-paid .due-reminder-group-head {
  background: rgba(15, 122, 79, 0.075);
  border-color: rgba(15, 122, 79, 0.24);
  color: #074d32;
}

.due-reminder-group-paid .due-reminder-group-head span {
  font-weight: 800;
}

.due-reminder-group-paid .due-reminder-group-head strong {
  color: #074d32;
  border-color: rgba(15, 122, 79, 0.28);
}

/* STEP 040N — Scadenze: scelta guidata sottocategorie nella modale */
.due-category-drill-head {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  margin-bottom: 2px;
}

.due-category-back {
  width: fit-content;
  border: 1px solid rgba(15, 122, 79, 0.22);
  background: #f4fbf7;
  color: #095b3a;
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.due-category-back:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 122, 79, 0.42);
  background: #ecf8f1;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.due-category-selected {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid rgba(15, 122, 79, 0.22);
  border-radius: 18px;
  background: linear-gradient(135deg, #ecf8f1 0%, #ffffff 100%);
}

.due-category-selected small {
  display: block;
  margin-bottom: 2px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
}

.due-category-selected strong {
  display: block;
  color: #0b2f26;
  font-size: 17px;
  line-height: 1.2;
}

.due-category-only-choice {
  border-style: dashed;
  background: #fbfdfb;
}

.due-category-drill-options {
  grid-column: 1 / -1;
}

/* STEP 040O — Scadenze: conti modale su una sola riga */
.due-account-choice {
  min-height: 62px;
  grid-template-columns: 42px minmax(0, 1fr);
  padding-top: 12px;
  padding-bottom: 12px;
}

.due-account-choice .due-choice-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.due-account-choice .due-choice-line {
  justify-content: flex-end;
  flex: 0 0 auto;
}

.due-account-choice .due-choice-line small {
  display: none;
}

.due-account-choice .due-choice-balance strong {
  font-size: 16px;
}

@media (max-width: 700px) {
  .due-account-choice .due-choice-copy {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .due-account-choice .due-choice-line {
    justify-content: flex-start;
  }
}

/* STEP 041 — Impostazioni Lingua e formato */
.settings-locale-card{
  margin-top:22px;
}
.settings-locale-summary{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin:20px 0 22px;
}
.settings-locale-section{
  border:1px solid #dce5dd;
  background:#fff;
  border-radius:18px;
  padding:18px;
  box-shadow:0 12px 28px rgba(15,23,42,.055);
  margin-top:16px;
}
.settings-language-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.settings-language-option{
  width:100%;
  min-height:96px;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:13px;
  border:1px solid #dce5dd;
  background:#fff;
  border-radius:16px;
  padding:14px 15px;
  text-align:left;
  cursor:pointer;
  appearance:none;
  -webkit-appearance:none;
  transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,background .16s ease;
}
.settings-language-option:hover{
  transform:translateY(-1px);
  border-color:rgba(15,122,79,.34);
  box-shadow:0 12px 24px rgba(15,23,42,.07);
}
.settings-language-option.is-selected{
  border-color:#1f9d63;
  background:rgba(31,157,99,.08);
  box-shadow:0 0 0 4px rgba(31,157,99,.09);
}
.settings-language-icon{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:14px;
  background:rgba(31,157,99,.10);
  font-size:22px;
  flex:0 0 auto;
}
.settings-language-copy strong{
  display:block;
  color:#111827;
  font-size:16px;
  font-weight:780;
  line-height:1.2;
}
.settings-language-copy small{
  display:block;
  margin-top:5px;
  color:#6b7280;
  font-size:13px;
  line-height:1.3;
}
.settings-language-option em{
  justify-self:end;
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:6px 10px;
  border-radius:10px;
  background:rgba(15,122,79,.10);
  color:#0f7a4f;
  font-size:12px;
  font-style:normal;
  font-weight:780;
  white-space:nowrap;
}

.settings-language-note{
  margin:-2px 0 14px;
  border:1px solid rgba(47,128,237,.18);
  background:rgba(47,128,237,.08);
  color:#1f4f8f;
  border-radius:14px;
  padding:11px 13px;
  font-size:13px;
  font-weight:650;
  line-height:1.4;
}
.settings-language-note[hidden]{
  display:none;
}
.settings-format-preview-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}
.settings-format-preview-card{
  border:1px solid rgba(15,122,79,.14);
  background:linear-gradient(180deg,#ffffff 0%,#f7fbf8 100%);
  border-radius:16px;
  padding:16px;
  box-shadow:0 10px 22px rgba(15,23,42,.045);
}
.settings-format-preview-card span,
.settings-format-preview-card small{
  display:block;
  color:#6b7280;
  font-size:13px;
  line-height:1.35;
}
.settings-format-preview-card strong{
  display:block;
  margin:7px 0 5px;
  color:#0b2f26;
  font-size:22px;
  font-weight:820;
  line-height:1.15;
  white-space:nowrap;
}
@media(max-width:960px){
  .settings-locale-summary,
  .settings-language-grid,
  
.settings-language-note{
  margin:-2px 0 14px;
  border:1px solid rgba(47,128,237,.18);
  background:rgba(47,128,237,.08);
  color:#1f4f8f;
  border-radius:14px;
  padding:11px 13px;
  font-size:13px;
  font-weight:650;
  line-height:1.4;
}
.settings-language-note[hidden]{
  display:none;
}
.settings-format-preview-grid{
    grid-template-columns:1fr;
  }
}
@media(max-width:560px){
  .settings-locale-section{
    padding:15px;
  }
  .settings-language-option{
    grid-template-columns:auto minmax(0,1fr);
  }
  .settings-language-option em{
    grid-column:2;
    justify-self:start;
  }
}

/* STEP 042 — Obiettivi reali base */
.goals-page {
  display: grid;
  gap: 22px;
}

.goals-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  padding: 28px;
  background: linear-gradient(135deg, #ffffff, #f5fbf7);
}

.goals-hero h1 {
  margin: 4px 0 8px;
  font-size: clamp(34px, 5vw, 48px);
  line-height: 1;
  color: #0b2f26;
}

.goals-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 0;
  color: #6b7280;
  font-size: 16px;
  line-height: 1.55;
}

.goals-hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.goals-create-btn {
  min-height: 52px;
  border-radius: 14px;
  white-space: nowrap;
}

.goals-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.goals-kpi {
  position: relative;
  overflow: hidden;
  min-height: 154px;
  padding: 20px;
  border-radius: 22px;
  color: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

.goals-kpi::after {
  content: '';
  position: absolute;
  width: 130px;
  height: 130px;
  right: -46px;
  bottom: -54px;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
}

.goals-kpi span,
.goals-kpi small,
.goals-kpi strong {
  position: relative;
  z-index: 1;
}

.goals-kpi span {
  display: block;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 800;
  color: rgba(255,255,255,.82);
}

.goals-kpi strong {
  display: block;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.goals-kpi strong .currency-decimals {
  font-size: .56em;
  letter-spacing: -0.02em;
}

.goals-kpi small {
  display: block;
  margin-top: 14px;
  color: rgba(255,255,255,.78);
  font-weight: 700;
}

.goals-kpi-total { background: linear-gradient(135deg, #0f7a4f, #1f9d63); }
.goals-kpi-saved { background: linear-gradient(135deg, #0b6f51, #0f7a4f); }
.goals-kpi-missing { background: linear-gradient(135deg, #f59e0b, #f97316); }
.goals-kpi-completed { background: linear-gradient(135deg, #2f80ed, #1d4ed8); }

.goals-list-card {
  padding: 24px;
}

.goals-list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.goals-list-head h2 {
  margin: 3px 0 0;
  font-size: 24px;
  color: #0b2f26;
}

.goals-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.goal-card {
  min-width: 0;
}

.goal-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid #dce5dd;
  border-radius: 22px;
  background: #f2fbf6;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.065);
}

.goal-card.is-completed {
  background: linear-gradient(135deg, #ffffff, #f2fbf6);
}

.goal-card-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
}

.goal-card-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #e8f7ef;
  font-size: 24px;
}

.goal-card-title strong {
  display: block;
  color: #111827;
  font-size: 21px;
}

.goal-card-title small {
  display: block;
  margin-top: 4px;
  color: #6b7280;
  font-size: 13px;
}

.goal-priority-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  border: 1px solid #dce5dd;
  color: #0b2f26;
  background: #f8fbf8;
}

.goal-priority-high { color: #b91c1c; background: #fff5f5; border-color: #fecaca; }
.goal-priority-medium { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.goal-priority-low { color: #0f7a4f; background: #ecfdf5; border-color: #bbf7d0; }

.goal-progress-line {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf3ee;
}

.goal-progress-line span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f7a4f, #1f9d63);
}

.goal-card-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.goal-card-values div {
  padding: 13px;
  border-radius: 16px;
  border: 1px solid #dce5dd;
  background: #fbfdfb;
}

.goal-card-values span {
  display: block;
  margin-bottom: 5px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
}

.goal-card-values strong {
  color: #0b2f26;
  font-size: 18px;
  white-space: nowrap;
}

.goal-card-values strong .currency-decimals {
  font-size: .68em;
}

.goal-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 750;
}

.goals-empty {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 260px;
  padding: 28px;
  text-align: center;
  border: 1px dashed #cbd8ce;
  border-radius: 22px;
  background: #fbfdfb;
  color: #6b7280;
}

.goals-empty strong {
  color: #0b2f26;
  font-size: 20px;
}

.goals-empty p {
  max-width: 480px;
  margin: 0 0 6px;
}

.goals-empty-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: #e8f7ef;
  font-size: 30px;
}

.goal-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 26, 20, 0.48);
  backdrop-filter: blur(10px);
}

.goal-modal-card {
  width: min(920px, 96vw);
  max-height: min(86vh, 820px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 34px 90px rgba(15, 23, 42, 0.28);
}

.goal-modal-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding: 28px 30px;
  border-bottom: 1px solid #dce5dd;
  background: linear-gradient(135deg, #fff, #f5fbf7);
}

.goal-modal-header h2 {
  margin: 0 0 8px;
  font-size: 34px;
  line-height: 1.05;
}

.goal-modal-header p:not(.eyebrow) {
  margin: 0;
  color: #6b7280;
}

.goal-modal-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: #e8f7ef;
  font-size: 30px;
}

.goal-modal-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  padding: 26px 30px;
}

.goal-form {
  display: grid;
  gap: 20px;
}

.goal-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.goal-form .form-field span,
.goal-date-topline > span,
.goal-form .custom-choice-group > span {
  display: block;
  margin-bottom: 9px;
  font-weight: 700;
  color: #4b5563;
}

.goal-form input {
  width: 100%;
  border: 1px solid #dce5dd;
  border-radius: 18px;
  min-height: 60px;
  padding: 0 18px;
  font-size: 18px;
  font-weight: 650;
  color: #111827;
  outline: none;
  background: #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.045);
}

.goal-form input:focus {
  border-color: #1f9d63;
  box-shadow: 0 0 0 4px rgba(31, 157, 99, .14);
}

.goal-date-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.goal-date-clear {
  border: 1px solid #dce5dd;
  border-radius: 12px;
  min-height: 36px;
  padding: 0 12px;
  background: #fff;
  color: #0f7a4f;
  font-weight: 800;
  cursor: pointer;
}

.goal-date-box {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid #dce5dd;
  border-radius: 20px;
  background: #fbfdfb;
}

.goal-date-box button {
  width: 52px;
  height: 52px;
  border: 1px solid #dce5dd;
  border-radius: 16px;
  background: #fff;
  color: #0f7a4f;
  font-size: 26px;
  cursor: pointer;
}

.goal-date-box strong {
  text-align: center;
  color: #0b2f26;
  font-size: 20px;
}

.goal-month-grid,
.goal-day-grid {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.goal-month-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.goal-day-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }

.goal-month-grid button,
.goal-day-grid button {
  min-height: 40px;
  border: 1px solid #dce5dd;
  border-radius: 12px;
  background: #fff;
  color: #4b5563;
  font-weight: 800;
  cursor: pointer;
}

.goal-month-grid button.is-selected,
.goal-day-grid button.is-selected {
  border-color: #0f7a4f;
  background: #0f7a4f;
  color: #fff;
}

.goal-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.goal-choice {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 74px;
  padding: 14px 16px;
  border: 1px solid #dce5dd;
  border-radius: 18px;
  background: #fff;
  text-align: left;
  color: #111827;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
}

.goal-choice:hover {
  border-color: rgba(15, 122, 79, 0.28);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.goal-choice.is-selected {
  border-color: #0f7a4f;
  background: #f0fbf5;
  box-shadow: 0 0 0 4px rgba(31, 157, 99, .12);
}

.goal-choice-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #e8f7ef;
}


/* STEP 242AC — Obiettivi: icone conto più leggibili nella scelta conto */
.goal-account-choice .goal-choice-icon{font-size:26px;line-height:1}
.goal-account-choice .goal-choice-icon .berrywallet-inline-icon{width:36px;height:36px}
.goal-account-choice .goal-choice-icon .berrywallet-inline-icon--wallet{width:36px;height:32px}
.goal-account-choice .goal-choice-icon .berrywallet-inline-icon--square{width:36px;height:36px}

.goal-choice strong {
  display: block;
  font-size: 15px;
  color: #111827;
}

.goal-choice small {
  display: block;
  margin-top: 3px;
  color: #6b7280;
  font-weight: 650;
}

.goal-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 18px 30px;
  border-top: 1px solid #dce5dd;
  background: #fbfdfb;
}

.goal-message {
  padding: 14px 16px;
  border-radius: 16px;
  font-weight: 800;
}

.goal-message-info { color: #0b5b8a; background: #eef7ff; border: 1px solid #bfdbfe; }
.goal-message-success { color: #0b6f51; background: #ecfdf5; border: 1px solid #bbf7d0; }
.goal-message-error { color: #b91c1c; background: #fff5f5; border: 1px solid #fecaca; }

@media (max-width: 980px) {
  .goals-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .goals-list { grid-template-columns: 1fr; }
  .goals-hero { grid-template-columns: 1fr; }
  .goals-hero-actions { justify-content: flex-start; }
}

@media (max-width: 680px) {
  .goals-kpi-grid,
  .goal-card-values,
  .goal-form-row,
  .goal-choice-grid { grid-template-columns: 1fr; }
  .goal-card-top { grid-template-columns: auto minmax(0, 1fr); }
  .goal-priority-badge { grid-column: 1 / -1; justify-self: start; }
  .goal-month-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .goal-day-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .goal-modal-header { grid-template-columns: minmax(0, 1fr) auto; }
  .goal-modal-icon { display: none; }
  .goal-modal-scroll { padding: 22px 18px; }
  .goal-modal-footer { padding: 16px 18px; }
}

/* STEP 042A — Obiettivi: sezione conti allineata alla modale Scadenze */
.goal-account-choice {
  min-height: 62px;
  grid-template-columns: 42px minmax(0, 1fr);
  padding-top: 12px;
  padding-bottom: 12px;
}

.goal-account-choice .goal-choice-copy {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.goal-account-choice .goal-choice-copy > strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
}

.goal-choice-balance {
  flex: 0 0 auto;
  color: #6b7280;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}

.goal-choice-balance strong {
  display: inline;
  color: #0b7f4f;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.goal-choice-placeholder {
  flex: 0 0 auto;
  color: #6b7280;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

.goal-account-none .goal-choice-icon {
  font-size: 24px;
  color: #0b2f26;
}

@media (max-width: 700px) {
  .goal-account-choice .goal-choice-copy {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

/* STEP 042B — Enfasi leggera campi e card su sfondi chiari */
.card,
.goals-list-card,
.goal-card,
.goals-empty,
.settings-locale-section,
.settings-format-preview-card,
.settings-account-preference-panel,
.settings-account-visibility-box,
.settings-account-overview-box,
.settings-account-methods-box,
.settings-account-education-note,
.settings-accounts-card {
  border-color: #cddbd2;
  box-shadow: 0 16px 38px rgba(15, 23, 42, .095);
}

.settings-shortcut,
.settings-language-option,
.settings-account-choice,
.settings-account-visibility-row,
.goal-choice,
.due-choice,
.due-subcategory-choice,
.due-category-only-choice,
.movement-select-option,
.account-edit-toggle-row,
.account-create-preview,
.goal-date-box,
.form-stack input,
.goal-form input,
.movement-form input,
.movement-form textarea,
.account-edit-form input,
.account-edit-form textarea {
  border-color: #cddbd2;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdfb 100%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}

.settings-shortcut:hover,
.settings-language-option:hover,
.settings-account-choice:hover,
.goal-choice:hover,
.due-choice:hover,
.due-subcategory-choice:hover,
.movement-select-option:hover {
  border-color: rgba(15, 122, 79, .38);
  box-shadow: 0 14px 30px rgba(15, 23, 42, .09);
}

.settings-shortcut.active,
.settings-language-option.is-selected,
.settings-account-choice.is-selected,
.goal-choice.is-selected,
.due-choice.is-selected,
.due-subcategory-choice.is-selected,
.goal-month-grid button.is-selected,
.goal-day-grid button.is-selected {
  border-color: rgba(31, 157, 99, .62);
  box-shadow: 0 0 0 4px rgba(31, 157, 99, .11), 0 16px 34px rgba(15, 23, 42, .10);
}

.goal-month-grid button,
.goal-day-grid button,
.due-month-grid button,
.due-day-grid button,
.custom-calendar-grid button {
  border-color: #d3dfd6;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .045);
}

.form-stack input:focus,
.goal-form input:focus,
.movement-form input:focus,
.movement-form textarea:focus,
.account-edit-form input:focus,
.account-edit-form textarea:focus {
  border-color: rgba(31, 157, 99, .55);
  box-shadow: 0 0 0 4px rgba(31, 157, 99, .12), 0 14px 28px rgba(15, 23, 42, .08);
}

.kpi-card,
.goals-kpi,
.due-kpi {
  box-shadow: 0 18px 42px rgba(15, 23, 42, .13);
}


/* STEP 042C — Obiettivi: lista a due colonne 50/50 su desktop */
@media (min-width: 981px) {
  .goals-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* STEP 042E — Obiettivi: mini KPI restyling pulito senza effetto coriandolo */
.goal-value-card {
  position: relative;
  min-height: 100px;
  padding: 16px 16px 15px;
  border-width: 1px;
  border-style: solid;
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}

.goal-value-card span {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  letter-spacing: .01em;
  font-weight: 800;
}

.goal-value-card strong {
  display: block;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.goal-value-saved {
  border-color: rgba(31, 157, 99, .26);
  background: linear-gradient(180deg, #f1fbf5 0%, #eaf8f0 100%);
}

.goal-value-saved span {
  color: #247a55;
}

.goal-value-saved strong {
  color: #08734a;
}

.goal-value-target {
  border-color: rgba(47, 128, 237, .26);
  background: linear-gradient(180deg, #eef5ff 0%, #e7f0ff 100%);
  box-shadow: 0 14px 30px rgba(47, 128, 237, .10);
}

.goal-value-target span {
  color: #235b9f;
}

.goal-value-target strong {
  color: #0f4c99;
}

.goal-value-missing {
  border-color: rgba(245, 158, 11, .28);
  background: linear-gradient(180deg, #fff8e8 0%, #fff3d7 100%);
}

.goal-value-missing span {
  color: #9a5a05;
}

.goal-value-missing strong {
  color: #b45309;
}

.goal-card.is-completed .goal-value-missing {
  border-color: rgba(31, 157, 99, .24);
  background: linear-gradient(180deg, #eefbf4 0%, #e7f8ef 100%);
}

.goal-card.is-completed .goal-value-missing strong,
.goal-card.is-completed .goal-value-missing span {
  color: #08734a;
}

@media (max-width: 680px) {
  .goal-value-card {
    min-height: 86px;
  }
}


/* STEP 042F — Obiettivi: aggiunta risparmio manuale */
.goal-card-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

.goal-add-saving-btn {
  border: 1px solid rgba(31, 157, 99, .26);
  background: linear-gradient(135deg, #1f9d63, #0f7a4f);
  color: #fff;
  min-height: 42px;
  padding: 10px 15px;
  border-radius: 12px;
  font-weight: 900;
  font-size: 14px;
  box-shadow: 0 12px 24px rgba(15, 122, 79, .18);
  cursor: pointer;
  transition: .18s ease;
}

.goal-add-saving-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(15, 122, 79, .24);
}

.goal-saving-modal-card {
  max-width: 660px;
}

.goal-saving-summary {
  border: 1px solid #cddbd2;
  background: linear-gradient(180deg, #ffffff 0%, #f4faf6 100%);
  box-shadow: 0 14px 30px rgba(15, 23, 42, .07);
  border-radius: 18px;
  padding: 18px;
}

.goal-saving-summary > strong {
  display: block;
  color: #111827;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.goal-saving-summary > small {
  display: block;
  margin-top: 6px;
  color: #6b7280;
  font-size: 14px;
  font-weight: 800;
}

.goal-saving-progress {
  margin-top: 14px;
}

.goal-saving-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.goal-saving-summary-grid div,
.goal-saving-preview-card {
  border: 1px solid #dce5dd;
  border-radius: 16px;
  background: #fff;
  padding: 14px;
}

.goal-saving-summary-grid span,
.goal-saving-preview-card span {
  display: block;
  color: #6b7280;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 6px;
}

.goal-saving-summary-grid b,
.goal-saving-preview-card strong {
  color: #0b2f26;
  font-size: 20px;
  letter-spacing: -0.04em;
}

.goal-saving-preview-card {
  background: linear-gradient(180deg, #eefbf4 0%, #ffffff 100%);
  border-color: rgba(31, 157, 99, .28);
  box-shadow: 0 12px 26px rgba(15, 23, 42, .06);
}

.goal-saving-preview-card strong {
  display: block;
  color: #08734a;
  font-size: 26px;
}

.goal-saving-preview-card small {
  display: block;
  margin-top: 6px;
  color: #6b7280;
  font-weight: 800;
}

@media (max-width: 680px) {
  .goal-card-actions {
    justify-content: stretch;
  }

  .goal-add-saving-btn {
    width: 100%;
  }

  .goal-saving-summary-grid {
    grid-template-columns: 1fr;
  }
}


/* STEP 042G — Fix apertura automatica modale risparmio Obiettivi */
.goal-saving-backdrop[hidden] {
  display: none !important;
}

.goal-saving-backdrop:not(.is-open) {
  display: none !important;
}

.goal-saving-backdrop.is-open {
  display: grid !important;
}


/* STEP 042H — Obiettivi: risparmio collegato al conto */
.goal-saving-account-section {
  margin-top: 2px;
}

.goal-saving-preview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.goal-saving-account-preview {
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  border-color: rgba(47, 128, 237, .24);
}

.goal-saving-account-preview strong {
  color: #0f4c99;
}

.goal-saving-account-preview.is-warning {
  background: linear-gradient(180deg, #fff8e8 0%, #ffffff 100%);
  border-color: rgba(245, 158, 11, .42);
}

.goal-saving-account-preview.is-warning strong {
  color: #b45309;
}

.goal-saving-no-accounts {
  border: 1px solid #dce5dd;
  border-radius: 16px;
  padding: 18px;
  background: #fff;
  color: #6b7280;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .055);
}

.goal-saving-no-accounts strong {
  display: block;
  color: #111827;
  margin-bottom: 5px;
}


/* STEP 042N — Obiettivi: bottone chiusura premium nelle modali */
.goal-modal-header .modal-close-btn,
.goal-modal-close-btn {
  appearance: none;
  -webkit-appearance: none;
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 16px;
  border: 1px solid #dce5dd;
  background: linear-gradient(180deg, #ffffff 0%, #f7faf8 100%);
  color: #0b2f26;
  display: inline-grid;
  place-items: center;
  font-size: 30px;
  line-height: 1;
  font-weight: 500;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .08);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.goal-modal-header .modal-close-btn:hover,
.goal-modal-close-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 157, 99, .36);
  background: linear-gradient(180deg, #ffffff 0%, #eefbf4 100%);
  box-shadow: 0 16px 32px rgba(15, 23, 42, .11);
}

.goal-modal-header .modal-close-btn:focus-visible,
.goal-modal-close-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(31, 157, 99, .14), 0 16px 32px rgba(15, 23, 42, .11);
}

@media (max-width: 680px) {
  .goal-modal-header .modal-close-btn,
  .goal-modal-close-btn {
    width: 46px;
    height: 46px;
    min-width: 46px;
    border-radius: 14px;
    font-size: 27px;
  }
}


/* STEP 042O — Fix definitivo bottone chiusura modali Obiettivi */
.goal-modal-card .goal-close-premium {
  all: unset;
  box-sizing: border-box;
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 18px;
  border: 1px solid #dce5dd;
  background: linear-gradient(180deg, #ffffff 0%, #f6faf7 100%);
  color: #0b2f26;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .09);
  cursor: pointer;
  user-select: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.goal-modal-card .goal-close-premium span {
  display: block;
  font-size: 30px;
  line-height: 1;
  font-weight: 500;
  transform: translateY(-1px);
}

.goal-modal-card .goal-close-premium:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 157, 99, .42);
  background: linear-gradient(180deg, #ffffff 0%, #eefbf4 100%);
  box-shadow: 0 18px 36px rgba(15, 23, 42, .12);
}

.goal-modal-card .goal-close-premium:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(31, 157, 99, .14), 0 18px 36px rgba(15, 23, 42, .12);
}

@media (max-width: 680px) {
  .goal-modal-card .goal-close-premium {
    width: 46px;
    height: 46px;
    min-width: 46px;
    border-radius: 15px;
  }

  .goal-modal-card .goal-close-premium span {
    font-size: 27px;
  }
}


/* STEP 042P — Obiettivi: rifinitura finale UX */
.goal-saving-safe-note {
  margin: -2px 0 12px;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 750;
}

.goal-saving-account-section .goal-choice-grid {
  margin-top: 0;
}

.goal-message-success {
  font-weight: 900;
}

.goal-message-error {
  font-weight: 900;
}


/* STEP 043 — Standard unico header e KPI pagine operative */
.dashboard-content,
.movements-content,
.accounts-content,
.budget-page,
.due-page,
.goals-page {
  gap: 22px;
}

/* Hero/header operativi: Bilancio, Scadenze, Obiettivi */
.budget-hero.card,
.due-hero.card,
.goals-hero.card {
  position: relative;
  overflow: visible;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-height: 172px;
  padding: 30px 34px;
  border-radius: 22px;
  border: 1px solid #cddbd2;
  background:
    radial-gradient(circle at 96% 8%, rgba(31, 157, 99, .08), transparent 30%),
    linear-gradient(135deg, #ffffff 0%, #f6fbf8 100%);
  box-shadow: 0 16px 38px rgba(15, 23, 42, .095);
}

.budget-hero .eyebrow,
.due-hero .eyebrow,
.goals-hero .eyebrow {
  margin: 0 0 8px;
  color: #6b7280;
  font-size: 13px;
  line-height: 1;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 900;
}

.budget-hero h1,
.due-hero h1,
.goals-hero h1 {
  margin: 0 0 10px;
  color: #0b2f26;
  font-size: clamp(38px, 4.6vw, 56px);
  line-height: .95;
  letter-spacing: -.055em;
}

.budget-hero p:not(.eyebrow),
.due-hero p:not(.eyebrow),
.goals-hero p:not(.eyebrow) {
  max-width: 780px;
  margin: 0;
  color: #6b7280;
  font-size: 17px;
  line-height: 1.42;
  font-weight: 520;
}

.budget-month-box,
.due-month-box,
.goals-hero-actions {
  justify-self: end;
}

.budget-month-box,
.due-month-box {
  border-color: rgba(15, 122, 79, .20);
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdfb 100%);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .075);
}

.budget-month-arrow,
.due-month-arrow {
  border-radius: 14px;
  border-color: #dce5dd;
  background: #f8fbf8;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .045);
}

.budget-month-arrow:hover,
.due-month-arrow:hover {
  background: #eefbf4;
  border-color: rgba(31, 157, 99, .38);
}

.budget-month-current,
.due-create-btn,
.goals-create-btn {
  border-radius: 16px;
  min-height: 52px;
  font-weight: 900;
}

/* KPI operative: stesso ritmo visuale */
.dashboard-kpi-grid,
.movements-summary-grid,
.accounts-hero-grid,
.budget-kpi-grid,
.due-kpi-grid,
.goals-kpi-grid {
  gap: 18px;
}

.movement-summary-card,
.account-hero-card,
.budget-kpi-card,
.due-kpi,
.goals-kpi {
  border-radius: 22px;
  min-height: 148px;
  padding: 22px 24px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .13);
}

.movement-summary-card span,
.account-hero-card span,
.budget-kpi-card span,
.due-kpi span,
.goals-kpi span {
  font-size: 15px;
  font-weight: 850;
  color: rgba(255,255,255,.88);
}

.movement-summary-card strong,
.account-hero-card strong,
.budget-kpi-card strong,
.due-kpi strong,
.goals-kpi strong {
  font-size: clamp(30px, 3vw, 40px);
  line-height: 1;
  letter-spacing: -.045em;
  white-space: nowrap;
}

.movement-summary-card small,
.account-hero-card small,
.budget-kpi-card small,
.due-kpi small,
.goals-kpi small {
  font-size: 14px;
  font-weight: 750;
  color: rgba(255,255,255,.82);
}

.budget-kpi-card::after,
.due-kpi::after,
.goals-kpi::after,
.movement-summary-card::after,
.account-hero-card::after {
  background: rgba(255,255,255,.15);
}

@media (max-width: 1180px) {
  .budget-hero.card,
  .due-hero.card,
  .goals-hero.card {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .budget-month-box,
  .due-hero-actions,
  .goals-hero-actions {
    justify-self: start;
  }
}

@media (max-width: 760px) {
  .budget-hero.card,
  .due-hero.card,
  .goals-hero.card {
    padding: 24px 20px;
    min-height: auto;
  }

  .budget-hero h1,
  .due-hero h1,
  .goals-hero h1 {
    font-size: clamp(34px, 12vw, 44px);
  }

  .budget-hero p:not(.eyebrow),
  .due-hero p:not(.eyebrow),
  .goals-hero p:not(.eyebrow) {
    font-size: 15px;
  }

  .due-hero-actions {
    flex-wrap: wrap;
    width: 100%;
  }

  .due-month-box,
  .budget-month-box,
  .goals-create-btn,
  .due-create-btn {
    width: 100%;
  }
}


/* STEP 043A — Struttura unica pagine operative: Header → KPI → Contenuto */
.operation-page-header {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-height: 154px;
  padding: 28px 34px;
  border-radius: 22px;
  border: 1px solid #cddbd2;
  background:
    radial-gradient(circle at 96% 8%, rgba(31, 157, 99, .08), transparent 30%),
    linear-gradient(135deg, #ffffff 0%, #f6fbf8 100%);
  box-shadow: 0 16px 38px rgba(15, 23, 42, .095);
}

.operation-page-header .eyebrow {
  margin: 0 0 8px;
  color: #6b7280;
  font-size: 13px;
  line-height: 1;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 900;
}

.operation-page-header h1 {
  margin: 0 0 10px;
  color: #0b2f26;
  font-size: clamp(38px, 4.4vw, 54px);
  line-height: .95;
  letter-spacing: -.055em;
}

.operation-page-header p:not(.eyebrow) {
  max-width: 780px;
  margin: 0;
  color: #6b7280;
  font-size: 17px;
  line-height: 1.42;
  font-weight: 520;
}

.operation-page-header-actions,
.due-hero-actions,
.goals-hero-actions {
  justify-self: end;
}

/* Forza ordine strutturale coerente nelle aree operative */
.dashboard-content .operation-page-header,
.movements-content .operation-page-header,
.accounts-content .operation-page-header,
.budget-page .operation-page-header,
.due-page .operation-page-header,
.goals-page .operation-page-header {
  order: 1;
}

.dashboard-kpi-grid,
.movements-summary-grid,
.accounts-hero-grid,
.budget-summary-grid,
.due-kpi-grid,
.goals-kpi-grid {
  order: 2;
}

.dashboard-premium-grid,
.movements-panel,
.accounts-panel,
.budget-board-card,
.due-list-card,
.goals-list-card {
  order: 3;
}

/* KPI: ritmo comune e correzione classi reali */
.dashboard-kpi-grid,
.movements-summary-grid,
.accounts-hero-grid,
.budget-summary-grid,
.due-kpi-grid,
.goals-kpi-grid {
  display: grid;
  gap: 18px;
  margin-top: 0;
}

.movement-summary-card,
.account-hero-card,
.budget-summary-card,
.due-kpi,
.goals-kpi {
  border-radius: 22px;
  min-height: 148px;
  padding: 22px 24px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .13);
}

.budget-summary-card {
  position: relative;
  overflow: hidden;
  color: #fff;
}

.budget-summary-card::after {
  content: '';
  position: absolute;
  right: -34px;
  top: -34px;
  width: 112px;
  height: 112px;
  border-radius: 999px;
  background: rgba(255,255,255,.15);
}

.budget-summary-card span,
.budget-summary-card strong,
.budget-summary-card small {
  position: relative;
  z-index: 1;
}

.movement-summary-card span,
.account-hero-card span,
.budget-summary-card span,
.due-kpi span,
.goals-kpi span {
  font-size: 15px;
  font-weight: 850;
  color: rgba(255,255,255,.88);
}

.movement-summary-card strong,
.account-hero-card strong,
.budget-summary-card strong,
.due-kpi strong,
.goals-kpi strong {
  font-size: clamp(30px, 3vw, 40px);
  line-height: 1;
  letter-spacing: -.045em;
  white-space: nowrap;
}

.movement-summary-card small,
.account-hero-card small,
.budget-summary-card small,
.due-kpi small,
.goals-kpi small {
  font-size: 14px;
  font-weight: 750;
  color: rgba(255,255,255,.82);
}

/* Header controls coerenti */
.budget-month-box,
.due-month-box {
  border-color: rgba(15, 122, 79, .20);
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdfb 100%);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .075);
}

.budget-month-arrow,
.due-month-arrow {
  border-radius: 14px;
  border-color: #dce5dd;
  background: #f8fbf8;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .045);
}

.budget-month-current,
.due-create-btn,
.goals-create-btn,
.accounts-create-action {
  border-radius: 16px;
  min-height: 52px;
  font-weight: 900;
}

/* Mantiene i pannelli contenuto come terzo blocco, senza diventare header pagina */
.movements-panel,
.accounts-panel,
.budget-board-card,
.due-list-card,
.goals-list-card {
  margin-top: 0;
}

@media (max-width: 1180px) {
  .operation-page-header {
    grid-template-columns: 1fr;
    align-items: start;
    min-height: auto;
  }

  .operation-page-header-actions,
  .due-hero-actions,
  .goals-hero-actions,
  .budget-month-box {
    justify-self: start;
  }
}

@media (max-width: 760px) {
  .operation-page-header {
    padding: 24px 20px;
  }

  .operation-page-header h1 {
    font-size: clamp(34px, 12vw, 44px);
  }

  .operation-page-header p:not(.eyebrow) {
    font-size: 15px;
  }

  .due-hero-actions {
    flex-wrap: wrap;
    width: 100%;
  }

  .due-month-box,
  .budget-month-box,
  .goals-create-btn,
  .due-create-btn,
  .accounts-create-action {
    width: 100%;
  }
}


/* STEP 043B — KPI subito sotto topbar, senza card titolo/sottotitolo */
.dashboard-content,
.movements-content,
.accounts-content,
.budget-page,
.due-page,
.goals-page {
  gap: 18px;
}

/* Le KPI sono il primo blocco reale sotto la topbar */
.dashboard-kpi-grid,
.movements-summary-grid,
.accounts-hero-grid,
.budget-summary-grid,
.due-kpi-grid,
.goals-kpi-grid {
  order: 1 !important;
  margin-top: 0 !important;
}

/* Azioni compatte sotto KPI, non hero gigante */
.page-compact-actions {
  order: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-height: auto;
  margin: -2px 0 2px;
}

.page-compact-actions .due-hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: nowrap;
}

.budget-board-card,
.due-list-card,
.goals-list-card,
.movements-panel,
.accounts-panel,
.dashboard-premium-grid {
  order: 3 !important;
}

/* Neutralizza eventuali header residui introdotti nello step precedente */
.operation-page-header.dashboard-page-header,
.operation-page-header.movements-page-header,
.operation-page-header.accounts-page-header {
  display: none !important;
}

/* Pagine operative: niente card descrittive grandi sopra le KPI */
.budget-hero.card,
.due-hero.card,
.goals-hero.card {
  display: none !important;
}

/* Controlli compatti */
.page-compact-actions .budget-month-box,
.page-compact-actions .due-month-box {
  width: auto;
  min-width: 330px;
}

.page-compact-actions .goals-create-btn,
.page-compact-actions .due-create-btn {
  min-width: 210px;
}

/* KPI leggermente più compatte per stare subito in alto */
.movement-summary-card,
.account-hero-card,
.budget-summary-card,
.due-kpi,
.goals-kpi {
  min-height: 138px;
}

@media (max-width: 900px) {
  .page-compact-actions,
  .page-compact-actions .due-hero-actions {
    justify-content: stretch;
    flex-wrap: wrap;
  }

  .page-compact-actions .budget-month-box,
  .page-compact-actions .due-month-box,
  .page-compact-actions .goals-create-btn,
  .page-compact-actions .due-create-btn {
    width: 100%;
    min-width: 0;
  }
}


/* STEP 043C — Scadenze: ripristino bottone Nuova scadenza */
.due-compact-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: -2px;
}

.due-compact-actions .due-create-btn {
  min-width: 220px;
  min-height: 54px;
  border-radius: 16px;
  font-weight: 950;
  box-shadow: 0 14px 30px rgba(15, 122, 79, .20);
}

@media (max-width: 760px) {
  .due-compact-actions {
    justify-content: stretch;
  }

  .due-compact-actions .due-create-btn {
    width: 100%;
    min-width: 0;
  }
}


/* STEP 242L — Scadenze: bottone nella card e accento rosso record */
.due-list-head {
  align-items: flex-start;
}

.due-list-head .due-list-create-btn {
  min-width: 220px;
  min-height: 54px;
  border-radius: 16px;
  font-weight: 950;
  box-shadow: 0 14px 30px rgba(15, 122, 79, .20);
}

@media (max-width: 760px) {
  .due-list-head .due-list-create-btn {
    width: 100%;
    min-width: 0;
  }
}

/* STEP 044 — Bilancio: budget reale per categoria */
.budget-edit-btn {
  appearance: none;
  border: 1px solid #dce5dd;
  background: linear-gradient(180deg, #ffffff 0%, #f6faf7 100%);
  color: #0f7a4f;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 12px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .055);
}

.budget-edit-btn:hover {
  border-color: rgba(31, 157, 99, .38);
  background: #eefbf4;
}

.budget-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: none;
  place-items: center;
  padding: 26px;
  background: rgba(8, 22, 17, .54);
  backdrop-filter: blur(12px);
}

.budget-modal-backdrop.is-open {
  display: grid !important;
}

.budget-modal-card {
  width: min(720px, 100%);
  max-height: min(88vh, 860px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid #dce5dd;
  background: #fff;
  box-shadow: 0 30px 80px rgba(7, 31, 25, .28);
}

.budget-modal-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding: 28px 30px 22px;
  border-bottom: 1px solid #dce5dd;
  background: linear-gradient(135deg, #ffffff 0%, #f4faf6 100%);
}

.budget-modal-icon {
  width: 66px;
  height: 66px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: #eaf7ef;
  font-size: 30px;
}

.budget-modal-header h2 {
  margin: 0 0 6px;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -.045em;
  color: #0b2f26;
}

.budget-modal-header p:not(.eyebrow) {
  margin: 0;
  color: #6b7280;
}

.budget-modal-close {
  all: unset;
  box-sizing: border-box;
  width: 50px;
  height: 50px;
  border-radius: 16px;
  border: 1px solid #dce5dd;
  background: #fff;
  color: #0b2f26;
  display: grid;
  place-items: center;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(15,23,42,.08);
}

.budget-modal-scroll {
  overflow-y: auto;
  padding: 26px 30px;
}

.budget-form {
  display: grid;
  gap: 18px;
}

.budget-category-preview-card {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid #dce5dd;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f6faf7 100%);
  padding: 16px;
  box-shadow: 0 12px 26px rgba(15,23,42,.06);
}

.budget-category-preview-card strong {
  display: block;
  font-size: 20px;
  color: #111827;
}

.budget-category-preview-card small {
  display: block;
  color: #6b7280;
  font-weight: 750;
}


/* STEP 046A — Fix input premium modale budget */
.budget-form .form-field span {
  display: block;
  margin-bottom: 9px;
  font-weight: 750;
  color: #4b5563;
}

.budget-form input {
  width: 100%;
  min-height: 60px;
  border: 1px solid #dce5dd;
  border-radius: 18px;
  padding: 0 18px;
  font-size: 18px;
  font-weight: 650;
  color: #111827;
  outline: none;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.045);
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.budget-form input:focus {
  border-color: #1f9d63;
  background: #fbfffd;
  box-shadow: 0 0 0 4px rgba(31, 157, 99, .14), 0 14px 30px rgba(15, 23, 42, 0.055);
}

.budget-form input::placeholder {
  color: #9ca3af;
  font-weight: 600;
}

.budget-live-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #dce5dd;
  border-radius: 18px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(15,23,42,.055);
}

.budget-live-card span {
  display: block;
  color: #6b7280;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 5px;
}

.budget-live-card strong {
  display: block;
  color: #0b2f26;
  font-size: 20px;
  letter-spacing: -.04em;
}

.budget-live-card.budget-row-ok {
  background: linear-gradient(180deg, #eefbf4 0%, #ffffff 100%);
  border-color: rgba(31,157,99,.26);
}

.budget-live-card.budget-row-warning {
  background: linear-gradient(180deg, #fff8e8 0%, #ffffff 100%);
  border-color: rgba(245,158,11,.30);
}

.budget-live-card.budget-row-over {
  background: linear-gradient(180deg, #fff1f1 0%, #ffffff 100%);
  border-color: rgba(240,68,68,.28);
}

.budget-modal-footer {
  margin: 0;
}

@media (max-width: 760px) {
  .budget-modal-backdrop {
    padding: 12px;
    align-items: end;
  }

  .budget-modal-card {
    max-height: 92vh;
    border-radius: 24px 24px 18px 18px;
  }

  .budget-modal-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .budget-modal-icon {
    display: none;
  }

  
.budget-live-card {
    grid-template-columns: 1fr;
  }
}


/* STEP 044A — Bilancio: rendere evidente gestione budget */
.budget-action-strip {
  order: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid #cddbd2;
  border-radius: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #f4faf6 100%);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .075);
}

.budget-action-strip strong {
  display: block;
  color: #0b2f26;
  font-size: 18px;
  letter-spacing: -.02em;
}

.budget-action-strip span,
.budget-action-strip small {
  color: #6b7280;
  font-weight: 750;
}

.budget-action-strip small {
  text-align: right;
}

.budget-edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 156px;
  min-height: 42px;
  border: 1px solid rgba(31, 157, 99, .30);
  background: linear-gradient(135deg, #1f9d63, #0f7a4f);
  color: #fff;
  border-radius: 13px;
  font-weight: 950;
  box-shadow: 0 12px 24px rgba(15, 122, 79, .18);
}

.budget-edit-btn:hover {
  background: linear-gradient(135deg, #28ad71, #0f7a4f);
  border-color: rgba(31, 157, 99, .45);
  box-shadow: 0 16px 30px rgba(15, 122, 79, .24);
  transform: translateY(-1px);
}

.budget-table th:last-child,
.budget-table td:last-child {
  text-align: right;
  min-width: 180px;
}

@media (max-width: 760px) {
  .budget-action-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .budget-action-strip small {
    text-align: left;
  }

  .budget-edit-btn {
    width: 100%;
  }
}


/* STEP 044B — Bilancio: ordine corretto KPI → controlli → tabella */
.budget-page {
  display: grid;
  gap: 18px;
}

.budget-page > .budget-summary-grid {
  order: 1 !important;
}

.budget-page > .budget-compact-actions {
  order: 2 !important;
}

.budget-page > .budget-action-strip {
  order: 3 !important;
}

.budget-page > .budget-table-card {
  order: 4 !important;
}

/* La tabella deve restare contenuto operativo, mai sopra le KPI */
.budget-table-card {
  margin-top: 0;
}

/* Colonna azioni visibile e leggibile */
.budget-table th:last-child,
.budget-table td:last-child {
  text-align: right;
  min-width: 190px;
  width: 190px;
}

.budget-table-wrap {
  overflow-x: auto;
}

.budget-table {
  min-width: 980px;
}


/* STEP 044C — Bilancio: bottone Imposta budget compatto */
.budget-edit-btn {
  min-width: 118px !important;
  width: auto !important;
  min-height: 34px !important;
  padding: 7px 11px !important;
  border-radius: 11px !important;
  gap: 5px !important;
  font-size: 13px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  box-shadow: 0 8px 18px rgba(15, 122, 79, .14) !important;
}

.budget-edit-btn span[aria-hidden="true"] {
  font-size: 14px;
  line-height: 1;
  transform: translateY(-.5px);
}


/* STEP 242S — Bilancio: simbolo + bianco nel bottone Imposta budget */
.budget-page .budget-edit-btn > span[aria-hidden="true"] {
  color:#ffffff !important;
  font-weight:950 !important;
  font-size:16px !important;
  line-height:1 !important;
}

.budget-table th:last-child,
.budget-table td:last-child {
  width: 142px !important;
  min-width: 142px !important;
  text-align: right !important;
  padding-right: 12px !important;
}

@media (max-width: 760px) {
  .budget-edit-btn {
    min-width: 112px !important;
    padding: 7px 10px !important;
    font-size: 12.5px !important;
  }

  .budget-table th:last-child,
  .budget-table td:last-child {
    width: 132px !important;
    min-width: 132px !important;
  }
}


/* STEP 044D — Bilancio: riequilibrio colonne categoria / stato / azioni */
.budget-table {
  min-width: 940px !important;
}

.budget-table th:nth-child(1),
.budget-table td:nth-child(1) {
  width: 22% !important;
  max-width: 22% !important;
}

.budget-table th:nth-child(2),
.budget-table td:nth-child(2),
.budget-table th:nth-child(3),
.budget-table td:nth-child(3),
.budget-table th:nth-child(4),
.budget-table td:nth-child(4) {
  width: 11.5% !important;
  max-width: 11.5% !important;
}

.budget-table th:nth-child(5),
.budget-table td:nth-child(5) {
  width: 16% !important;
  max-width: 16% !important;
}

.budget-table th:nth-child(6),
.budget-table td:nth-child(6) {
  width: 11% !important;
  max-width: 11% !important;
}

.budget-table th:nth-child(7),
.budget-table td:nth-child(7) {
  width: 16.5% !important;
  max-width: 16.5% !important;
  min-width: 150px !important;
  text-align: right !important;
  padding-right: 14px !important;
}

.budget-table td:nth-child(6) {
  text-align: center;
}

.budget-status-pill {
  font-size: 11px !important;
  padding: 0 8px !important;
}

.budget-category-cell {
  gap: 9px !important;
}

.budget-category-icon {
  width: 34px !important;
  height: 34px !important;
  border-radius: 12px !important;
  font-size: 16px !important;
}

.budget-category-cell strong {
  font-size: 13.5px !important;
}

.budget-category-cell small {
  font-size: 11.5px !important;
}

.budget-edit-btn {
  min-width: 122px !important;
  max-width: 122px !important;
  justify-content: center !important;
  margin-left: auto !important;
}

@media (max-width: 980px) {
  .budget-table {
    min-width: 900px !important;
  }

  .budget-table th:nth-child(1),
  .budget-table td:nth-child(1) {
    width: 20% !important;
    max-width: 20% !important;
  }

  .budget-table th:nth-child(7),
  .budget-table td:nth-child(7) {
    min-width: 144px !important;
  }
}


/* STEP 045 — Hover/focus bottoni globali coerenti
   Standard: niente movimento verticale sui bottoni standard.
   Hover premium tramite colore, bordo e ombra morbida.
*/
:root {
  --button-hover-shadow: 0 12px 26px rgba(15, 23, 42, .11);
  --button-hover-shadow-green: 0 12px 26px rgba(15, 122, 79, .20);
  --button-hover-shadow-red: 0 12px 26px rgba(180, 35, 24, .18);
  --button-focus-ring: 0 0 0 4px rgba(31, 157, 99, .16);
}

button,
.btn,
.topbar-pill,
.modal-close,
.modal-close-btn,
.goal-close-premium,
.budget-modal-close,
.budget-edit-btn,
.accounts-create-action,
.due-create-btn,
.goals-create-btn,
.budget-month-arrow,
.due-month-arrow,
.due-date-today,
.account-icon-action,
.movement-action-btn,
.budget-edit-btn {
  transform: none !important;
}

.btn,
.topbar-pill,
.modal-close,
.modal-close-btn,
.goal-close-premium,
.budget-modal-close,
.budget-edit-btn,
.accounts-create-action,
.due-create-btn,
.goals-create-btn,
.budget-month-arrow,
.due-month-arrow,
.due-date-today,
.account-icon-action,
.movement-action-btn {
  transition:
    background-color .18s ease,
    background .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    color .18s ease,
    opacity .18s ease !important;
}

.btn:hover,
.topbar-pill:hover,
.modal-close:hover,
.modal-close-btn:hover,
.goal-close-premium:hover,
.budget-modal-close:hover,
.budget-edit-btn:hover,
.accounts-create-action:hover,
.due-create-btn:hover,
.goals-create-btn:hover,
.budget-month-arrow:hover,
.due-month-arrow:hover,
.due-date-today:hover,
.account-icon-action:hover,
.movement-action-btn:hover {
  transform: none !important;
}

.btn-primary:hover,
.accounts-create-action:hover,
.due-create-btn:hover,
.goals-create-btn:hover,
.budget-edit-btn:hover {
  box-shadow: var(--button-hover-shadow-green) !important;
  filter: brightness(1.02);
}

.btn-danger:hover {
  box-shadow: var(--button-hover-shadow-red) !important;
  filter: brightness(1.02);
}

.btn-ghost:hover,
.topbar-pill:hover,
.budget-month-arrow:hover,
.due-month-arrow:hover,
.due-date-today:hover,
.modal-close:hover,
.modal-close-btn:hover,
.goal-close-premium:hover,
.budget-modal-close:hover,
.account-icon-action:hover,
.movement-action-btn:hover {
  box-shadow: var(--button-hover-shadow) !important;
}

.btn:focus-visible,
.topbar-pill:focus-visible,
.modal-close:focus-visible,
.modal-close-btn:focus-visible,
.goal-close-premium:focus-visible,
.budget-modal-close:focus-visible,
.budget-edit-btn:focus-visible,
.accounts-create-action:focus-visible,
.due-create-btn:focus-visible,
.goals-create-btn:focus-visible,
.budget-month-arrow:focus-visible,
.due-month-arrow:focus-visible,
.due-date-today:focus-visible,
.account-icon-action:focus-visible,
.movement-action-btn:focus-visible {
  outline: none !important;
  box-shadow: var(--button-focus-ring), var(--button-hover-shadow) !important;
}

/* FAB identitario: mantiene hover stabile senza salto verticale */
.fab:hover,
.scroll-top-button:hover {
  transform: none !important;
  filter: brightness(1.03);
  box-shadow: 0 16px 34px rgba(15, 122, 79, .24) !important;
}


/* STEP 046 — Audit UI mirato post Bilancio / bottoni
   Fix solo visuali: allinea hover/focus residui e respiro tra blocchi operativi.
   Nessuna modifica logica.
*/
.dashboard-content,
.movements-content,
.accounts-content,
.budget-page,
.due-page,
.goals-page,
.settings-layout {
  row-gap: 20px;
}

.budget-page > .budget-summary-grid,
.due-page > .due-kpi-grid,
.goals-page > .goals-kpi-grid,
.movements-content > .movements-summary-grid,
.accounts-content > .accounts-hero-grid,
.dashboard-content > .dashboard-kpi-grid {
  margin-bottom: 28px !important;
}

.budget-action-strip,
.page-compact-actions,
.movements-toolbar {
  margin-top: 0 !important;
}

.budget-table-card,
.due-list-card,
.goals-list-card,
.movements-panel,
.accounts-panel,
.settings-panel {
  margin-top: 0 !important;
}

/* Hover residui non ancora coperti dallo STEP 045: niente salto verticale. */
.premium-card-header button,
.movement-filter-tab,
.movement-period-nav,
.movement-period-all,
.movement-period-preset,
.movement-custom-date-control button,
.movement-custom-apply,
.movement-custom-reset,
.account-edit-action,
.account-type-option,
.account-color-option,
.account-color-swatch,
.category-choice,
.category-icon-option,
.icon-action-btn,
.movement-modal-x,
.movement-choice-pill,
.due-status-choice,
.custom-choice-group button,
.goal-choice-grid button,
.due-choice-grid button,
.goal-date-clear {
  transition:
    background-color .18s ease,
    background .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    color .18s ease,
    opacity .18s ease !important;
}

.premium-card-header button:hover,
.movement-filter-tab:hover,
.movement-period-nav:hover,
.movement-period-all:hover,
.movement-period-preset:hover,
.movement-custom-date-control button:hover,
.movement-custom-apply:hover,
.movement-custom-reset:hover,
.account-edit-action:hover,
.account-type-option:hover,
.account-color-option:hover,
.account-color-swatch:hover,
.category-choice:hover,
.category-icon-option:hover,
.icon-action-btn:hover,
.movement-modal-x:hover,
.movement-choice-pill:hover,
.due-status-choice:hover,
.custom-choice-group button:hover,
.goal-choice-grid button:hover,
.due-choice-grid button:hover,
.goal-date-clear:hover {
  transform: none !important;
  box-shadow: var(--button-hover-shadow) !important;
}

.account-real-card:hover {
  transform: none !important;
}

.movement-select-option:hover {
  transform: none !important;
}

.account-edit-action:focus-visible,
.icon-action-btn:focus-visible,
.movement-filter-tab:focus-visible,
.premium-card-header button:focus-visible,
.category-choice:focus-visible,
.category-icon-option:focus-visible,
.account-type-option:focus-visible,
.movement-choice-pill:focus-visible {
  outline: none !important;
  box-shadow: var(--button-focus-ring), var(--button-hover-shadow) !important;
}

@media (max-width: 760px) {
  .dashboard-content,
  .movements-content,
  .accounts-content,
  .budget-page,
  .due-page,
  .goals-page,
  .settings-layout {
    row-gap: 18px;
  }

  .budget-action-strip {
    gap: 10px;
  }
}

/* STEP 047 — Pagina Famiglia */
.family-content{display:grid;gap:22px}.family-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}.family-kpi-card{position:relative;overflow:hidden;background:#fff;border:1px solid rgba(220,229,221,.95);border-radius:22px;box-shadow:0 14px 34px rgba(15,23,42,.075);padding:22px;display:flex;align-items:center;gap:16px;min-height:138px}.family-kpi-card:before{content:"";position:absolute;inset:auto -34px -52px auto;width:130px;height:130px;border-radius:50%;background:rgba(31,157,99,.08);pointer-events:none}.family-kpi-main{background:linear-gradient(135deg,#0F7A4F,#095B3A);border-color:rgba(255,255,255,.18);color:#fff}.family-kpi-main:before{background:rgba(255,255,255,.14)}.family-kpi-main small,.family-kpi-main em{color:rgba(255,255,255,.78)}.family-kpi-icon{position:relative;z-index:1;width:52px;height:52px;border-radius:18px;display:grid;place-items:center;background:rgba(31,157,99,.12);font-size:25px;box-shadow:inset 0 0 0 1px rgba(31,157,99,.12)}.family-kpi-main .family-kpi-icon{background:rgba(255,255,255,.16);box-shadow:inset 0 0 0 1px rgba(255,255,255,.18)}.family-kpi-card div{position:relative;z-index:1;min-width:0}.family-kpi-card small{display:block;color:#6b7280;font-weight:850;text-transform:uppercase;letter-spacing:.06em;font-size:12px}.family-kpi-card strong{display:block;margin-top:4px;color:#0b2f26;font-size:29px;line-height:1.08;letter-spacing:-.04em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.family-kpi-main strong{color:#fff}.family-kpi-card em{display:block;margin-top:5px;color:#6b7280;font-style:normal;font-weight:750;font-size:13px}.family-layout{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(320px,.75fr);gap:22px;align-items:stretch}.family-main-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(340px,.85fr);gap:22px;align-items:start}.family-card-header p:not(.eyebrow){margin:5px 0 0}.family-summary-card,.family-invite-card,.family-members-card,.family-roles-card{border-color:rgba(220,229,221,.95)}.family-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px}.family-summary-grid div{border:1px solid #dce5dd;border-radius:18px;background:linear-gradient(180deg,#fff,#f8fbf8);padding:16px;box-shadow:0 10px 24px rgba(15,23,42,.045)}.family-summary-grid span{display:block;color:#6b7280;font-size:13px;font-weight:850;margin-bottom:5px}.family-summary-grid strong{display:block;color:#0b2f26;font-size:18px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.family-future-box{display:grid;grid-template-columns:42px minmax(0,1fr);gap:12px;align-items:center;margin:18px 0;padding:15px;border:1px solid rgba(47,128,237,.18);border-radius:18px;background:rgba(47,128,237,.07)}.family-future-box>span{width:42px;height:42px;border-radius:15px;display:grid;place-items:center;background:#fff;box-shadow:0 8px 18px rgba(15,23,42,.05)}.family-future-box strong,.family-future-box small{display:block}.family-future-box small{color:#6b7280}.family-disabled-action{width:100%;opacity:.72;cursor:not-allowed}.family-members-list{display:grid;gap:12px}.family-member-row{display:grid;grid-template-columns:52px minmax(0,1fr) auto;gap:14px;align-items:center;padding:16px;border:1px solid #dce5dd;border-radius:18px;background:#fff;box-shadow:0 10px 26px rgba(15,23,42,.055)}.family-member-row:hover{border-color:rgba(31,157,99,.28);box-shadow:0 14px 30px rgba(15,23,42,.08)}.family-member-avatar{width:52px;height:52px;border-radius:18px;display:grid;place-items:center;background:rgba(31,157,99,.10);font-size:24px}.family-member-main{min-width:0}.family-member-title{display:flex;align-items:center;gap:8px;min-width:0}.family-member-title strong{font-size:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.family-member-main small{display:block;margin-top:3px;color:#6b7280;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.family-you-pill{display:inline-flex;align-items:center;min-height:24px;border-radius:999px;padding:3px 8px;background:rgba(31,157,99,.12);color:#0f7a4f;font-size:12px;font-weight:900}.family-member-side{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.family-role-pill{display:inline-flex;align-items:center;min-height:31px;border-radius:999px;padding:6px 10px;background:#f4f7f4;border:1px solid #dce5dd;color:#374151;font-size:13px;font-weight:850}.family-role-list{display:grid;gap:11px}.family-role-list>div{display:grid;grid-template-columns:44px minmax(0,1fr);gap:12px;align-items:start;border:1px solid #dce5dd;border-radius:17px;padding:14px;background:#fff}.family-role-list span{width:44px;height:44px;border-radius:15px;display:grid;place-items:center;background:#f4f7f4}.family-role-list p{margin:0}.family-role-list strong,.family-role-list small{display:block}.family-role-list small{color:#6b7280;margin-top:2px}.family-empty-state{border:1px dashed #dce5dd;border-radius:20px;background:#f8faf8;padding:30px;text-align:center}.family-empty-state strong{display:block;font-size:18px;color:#111827}.family-empty-state p{margin:5px 0 0;color:#6b7280}.badge-danger{background:rgba(240,68,68,.12);color:#F04444}@media(max-width:1200px){.family-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.family-layout,.family-main-grid{grid-template-columns:1fr}.family-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:720px){.family-kpi-grid,.family-summary-grid{grid-template-columns:1fr}.family-member-row{grid-template-columns:46px minmax(0,1fr);align-items:start}.family-member-avatar{width:46px;height:46px;border-radius:16px}.family-member-side{grid-column:2;justify-content:flex-start}.family-kpi-card strong{font-size:25px}}

/* STEP 047D — Fix responsive e overflow pagina Famiglia
   Solo UI: evita overflow orizzontale e permette alle card Famiglia di andare a capo correttamente. */
body[data-page="famiglia"] {
  overflow-x: hidden;
}

body[data-page="famiglia"] .main-area,
body[data-page="famiglia"] .content-area,
body[data-page="famiglia"] .family-content {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}

body[data-page="famiglia"] .family-content {
  padding-left: clamp(18px, 2.3vw, 34px);
  padding-right: clamp(18px, 2.3vw, 34px);
}

body[data-page="famiglia"] .family-kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  width: 100%;
  min-width: 0;
}

body[data-page="famiglia"] .family-kpi-card,
body[data-page="famiglia"] .family-summary-card,
body[data-page="famiglia"] .family-invite-card,
body[data-page="famiglia"] .family-members-card,
body[data-page="famiglia"] .family-roles-card {
  min-width: 0;
  max-width: 100%;
}

body[data-page="famiglia"] .family-layout,
body[data-page="famiglia"] .family-main-grid {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 1180px) {
  body[data-page="famiglia"] .family-layout {
    grid-template-columns: minmax(0, 1.18fr) minmax(280px, .82fr);
  }

  body[data-page="famiglia"] .family-main-grid {
    grid-template-columns: minmax(0, 1.18fr) minmax(300px, .82fr);
  }
}

@media (min-width: 1500px) {
  body[data-page="famiglia"] .family-layout {
    grid-template-columns: minmax(0, 1.32fr) minmax(320px, .68fr);
  }

  body[data-page="famiglia"] .family-main-grid {
    grid-template-columns: minmax(0, 1.28fr) minmax(320px, .72fr);
  }
}

/* La legenda ruoli è rimossa: la card membri occupa l'intera riga. */
body[data-page="famiglia"] .family-main-grid {
  grid-template-columns: minmax(0, 1fr) !important;
}

body[data-page="famiglia"] .family-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body[data-page="famiglia"] .family-member-row {
  min-width: 0;
}

body[data-page="famiglia"] .family-member-title,
body[data-page="famiglia"] .family-member-main,
body[data-page="famiglia"] .family-member-side,
body[data-page="famiglia"] .family-role-list > div,
body[data-page="famiglia"] .family-future-box {
  min-width: 0;
}

body[data-page="famiglia"] .family-card-header {
  min-width: 0;
  flex-wrap: wrap;
}

body[data-page="famiglia"] .family-kpi-card strong,
body[data-page="famiglia"] .family-summary-grid strong,
body[data-page="famiglia"] .family-member-title strong,
body[data-page="famiglia"] .family-member-main small {
  max-width: 100%;
}

@media (max-width: 760px) {
  body[data-page="famiglia"] .family-kpi-grid,
  body[data-page="famiglia"] .family-layout,
  body[data-page="famiglia"] .family-main-grid,
  body[data-page="famiglia"] .family-summary-grid {
    grid-template-columns: 1fr;
  }

  body[data-page="famiglia"] .family-kpi-card {
    padding: 18px;
  }
}

.family-member-confirm-shell[hidden] {
  display: none !important;
}

.family-member-confirm-shell {
  position: fixed;
  inset: 0;
  z-index: 190;
  display: grid;
  place-items: center;
  padding: 24px;
}

.family-member-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 31, 25, .48);
  backdrop-filter: blur(5px);
}

.family-member-confirm-card {
  position: relative;
  z-index: 1;
  width: min(460px, 100%);
  padding: 30px;
  border: 1px solid rgba(220, 229, 221, .98);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(7, 31, 25, .28);
}

.family-member-confirm-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: #fff6df;
  font-size: 23px;
}

.family-member-confirm-card h2 {
  margin: 6px 0 10px;
  color: #123c2f;
}

.family-member-confirm-card .muted {
  margin: 0;
  line-height: 1.6;
}

.family-member-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 26px;
}

@media (max-width: 520px) {
  .family-member-confirm-card {
    padding: 24px;
  }

  .family-member-confirm-actions {
    flex-direction: column-reverse;
  }

  .family-member-confirm-actions .btn {
    width: 100%;
  }
}

/* STEP 048 — Famiglia: modale invito protetto senza invio reale */
.family-open-invite {
  width: 100%;
  min-height: 52px;
}

.family-invite-modal-shell[hidden] {
  display: none !important;
}

.family-invite-modal-shell {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: grid;
  place-items: center;
  padding: 24px;
}

.family-invite-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 31, 25, .45);
  backdrop-filter: blur(5px);
}

.family-invite-modal-card {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: calc(100dvh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(220, 229, 221, .98);
  border-radius: 30px;
  background: linear-gradient(180deg, #fff 0%, #fbfdfb 100%);
  box-shadow: 0 34px 95px rgba(7, 31, 25, .30);
}

.family-invite-modal-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px 24px 18px;
  border-bottom: 1px solid rgba(220, 229, 221, .82);
  background: radial-gradient(circle at 100% 0%, rgba(31, 157, 99, .11), transparent 36%);
}

.family-invite-modal-header h2 {
  margin: 0;
  color: #111827;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: -.04em;
}

.family-invite-modal-header .muted {
  margin: 6px 0 0;
  color: #6b7280;
}

.family-invite-modal-icon {
  width: 60px;
  height: 60px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: 28px;
  background: rgba(31, 157, 99, .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), 0 14px 28px rgba(15, 122, 79, .12);
}

.family-invite-close {
  margin-left: auto;
  width: 46px;
  height: 46px;
  border: 1px solid #dce5dd;
  border-radius: 16px;
  background: #fff;
  color: #0b2f26;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
}

.family-invite-close:hover,
.family-invite-close:focus-visible {
  transform: none !important;
  border-color: rgba(31, 157, 99, .28);
  box-shadow: var(--button-hover-shadow);
  outline: none;
}

.family-invite-form {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.family-invite-scroll {
  min-height: 0;
  overflow: auto;
  padding: 22px 24px;
  display: grid;
  gap: 18px;
}

.family-invite-scroll::-webkit-scrollbar {
  width: 10px;
}

.family-invite-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.family-invite-scroll::-webkit-scrollbar-thumb {
  background: rgba(9, 91, 58, .38);
  border: 3px solid transparent;
  border-radius: 999px;
  background-clip: content-box;
}

.family-field {
  display: grid;
  gap: 9px;
}

.family-field > span {
  color: #4b5563;
  font-size: 15px;
  font-weight: 850;
}

.family-field input,
.family-field textarea {
  width: 100%;
  border: 1px solid #dce5dd;
  border-radius: 18px;
  background: #fff;
  color: #111827;
  font: inherit;
  font-weight: 750;
  padding: 16px 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .045);
  outline: none;
  resize: vertical;
}

.family-field input:focus,
.family-field textarea:focus {
  border-color: #1f9d63;
  box-shadow: 0 0 0 4px rgba(31, 157, 99, .12), 0 14px 26px rgba(15, 23, 42, .08);
}

.family-role-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.family-role-choice {
  min-height: 78px;
  border: 1px solid #dce5dd;
  border-radius: 18px;
  background: #fff;
  color: #111827;
  text-align: left;
  padding: 15px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .045);
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
}

.family-role-choice:hover,
.family-role-choice:focus-visible {
  transform: none !important;
  border-color: rgba(31, 157, 99, .28);
  box-shadow: var(--button-hover-shadow);
  outline: none;
}

.family-role-choice.is-selected {
  border-color: rgba(31, 157, 99, .42);
  background: linear-gradient(180deg, rgba(31, 157, 99, .10), rgba(31, 157, 99, .04));
  box-shadow: 0 0 0 4px rgba(31, 157, 99, .10), 0 14px 28px rgba(15, 122, 79, .10);
}

.family-role-choice strong,
.family-role-choice small {
  display: block;
}

.family-role-choice strong {
  font-size: 16px;
}

.family-role-choice small {
  margin-top: 4px;
  color: #6b7280;
  font-weight: 750;
}

.family-protected-note {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  border: 1px solid rgba(47, 128, 237, .20);
  border-radius: 20px;
  background: rgba(47, 128, 237, .07);
  padding: 16px;
}

.family-protected-note > span {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .05);
}

.family-protected-note strong,
.family-protected-note small {
  display: block;
}

.family-protected-note small {
  margin-top: 3px;
  color: #6b7280;
}

.family-invite-footer {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 12px;
  padding: 18px 24px 22px;
  border-top: 1px solid rgba(220, 229, 221, .86);
  background: #fff;
}

.family-invite-footer .btn {
  min-height: 52px;
  border-radius: 16px;
  font-weight: 850;
}

.family-role-list > div {
  position: relative;
}

.family-role-list > div:after {
  content: "Predisposto";
  justify-self: start;
  margin-top: 6px;
  display: inline-flex;
  width: fit-content;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  background: rgba(47, 128, 237, .10);
  color: #2f80ed;
  font-size: 12px;
  font-weight: 900;
}

@media (max-width: 760px) {
  .family-invite-modal-shell {
    align-items: end;
    place-items: end center;
    padding: 14px;
  }

  .family-invite-modal-card {
    max-height: calc(100dvh - 28px);
    border-radius: 26px 26px 18px 18px;
  }

  .family-invite-modal-header {
    padding: 21px 20px 16px;
  }

  .family-invite-modal-header h2 {
    font-size: 26px;
  }

  .family-invite-scroll {
    padding: 18px 20px;
  }

  .family-role-choice-grid,
  .family-invite-footer {
    grid-template-columns: 1fr;
  }

  .family-invite-footer {
    padding: 16px 20px 20px;
  }
}


/* STEP 049 — Famiglia: rifinitura UI membri e stato inviti predisposti */
body[data-page="famiglia"] .family-status.form-message-success {
  border-color: rgba(31, 157, 99, .24);
  background: linear-gradient(180deg, rgba(31, 157, 99, .12), rgba(31, 157, 99, .06));
  color: #0f7a4f;
  font-weight: 850;
}

body[data-page="famiglia"] .family-member-card-enhanced {
  position: relative;
  align-items: start;
  overflow: hidden;
  border-radius: 20px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdfb 100%);
}

body[data-page="famiglia"] .family-member-card-enhanced.is-current-member {
  border-color: rgba(31, 157, 99, .34);
  box-shadow: 0 0 0 4px rgba(31, 157, 99, .06), 0 16px 34px rgba(15, 23, 42, .075);
}

body[data-page="famiglia"] .family-member-card-enhanced.is-current-member:before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  border-radius: inherit;
  background: linear-gradient(180deg, #1f9d63 0%, #0f7a4f 100%);
  pointer-events: none;
}

body[data-page="famiglia"] .family-member-avatar {
  background: linear-gradient(180deg, rgba(31, 157, 99, .14), rgba(31, 157, 99, .07));
  box-shadow: inset 0 0 0 1px rgba(31, 157, 99, .14);
}

body[data-page="famiglia"] .family-member-title strong {
  color: #111827;
  font-size: 18px;
  letter-spacing: -.02em;
}

body[data-page="famiglia"] .family-member-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

body[data-page="famiglia"] .family-member-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(220, 229, 221, .9);
  border-radius: 999px;
  background: #f8faf8;
  color: #4b5563;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
}

body[data-page="famiglia"] .family-member-side {
  align-items: flex-end;
  flex-direction: column;
}

body[data-page="famiglia"] .family-member-actions {
  width: 100%;
  margin-top: 6px;
  padding-top: 9px;
  border-top: 1px solid rgba(220, 229, 221, .8);
}

body[data-page="famiglia"] .family-member-actions-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

body[data-page="famiglia"] .family-member-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

body[data-page="famiglia"] .family-member-action svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

body[data-page="famiglia"] .family-member-action:focus-visible {
  outline: 3px solid rgba(15, 122, 79, .26);
  outline-offset: 2px;
}

body[data-page="famiglia"] .family-member-action-neutral {
  background: #eef7f1;
  border-color: #bfe1ca;
  color: #0b6a3e;
}

body[data-page="famiglia"] .family-member-action-danger {
  background: #fff1f1;
  border-color: #f0c2c2;
  color: #b42318;
}

body[data-page="famiglia"] .family-member-action:disabled {
  cursor: wait;
  opacity: .65;
}

@media (hover: hover) {
  body[data-page="famiglia"] .family-member-action:not(:disabled) {
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease;
  }

  body[data-page="famiglia"] .family-member-action-neutral:not(:disabled):hover {
    transform: translateY(-2px);
    background: #dff3e6;
    border-color: #8dc9a2;
    box-shadow: 0 8px 16px rgba(11, 106, 62, .16);
  }

  body[data-page="famiglia"] .family-member-action-danger:not(:disabled):hover {
    transform: translateY(-2px);
    background: #ffe4e4;
    border-color: #e79b9b;
    box-shadow: 0 8px 16px rgba(180, 35, 24, .15);
  }

  body[data-page="famiglia"] .family-member-action:not(:disabled):active {
    transform: translateY(0);
    box-shadow: none;
  }
}

@media (min-width: 721px) {
  body[data-page="famiglia"] .family-member-card-enhanced {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
  }

  body[data-page="famiglia"] .family-member-side {
    display: flex;
    align-items: center;
    flex-direction: row;
    gap: 20px;
  }

  body[data-page="famiglia"] .family-member-statuses {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
  }

  body[data-page="famiglia"] .family-member-actions {
    width: auto;
    min-width: 180px;
    margin: 0;
    padding: 0 0 0 18px;
    border-top: 0;
    border-left: 1px solid rgba(220, 229, 221, .9);
  }

  body[data-page="famiglia"] .family-member-actions-buttons {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  body[data-page="famiglia"] .family-member-statuses {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
}

body[data-page="famiglia"] .family-role-pill {
  background: rgba(9, 91, 58, .08);
  border-color: rgba(9, 91, 58, .16);
  color: #095b3a;
}

/* STEP 085 — Inviti premium e profondità del blocco persone */
body[data-page="famiglia"] .family-member-side .family-role-pill,
body[data-page="famiglia"] .family-member-side .badge {
  font-weight: 500;
}

body[data-page="famiglia"] .family-invite-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(15, 122, 79, .18);
  border-radius: 24px;
  background: linear-gradient(145deg, #ffffff 0%, #f6fbf8 100%);
  box-shadow: 0 22px 48px rgba(12, 57, 39, .12), 0 3px 8px rgba(12, 57, 39, .06);
}

body[data-page="famiglia"] .family-invite-card:after {
  content: none;
}

body[data-page="famiglia"] .family-invite-card .family-card-header {
  align-items: flex-start;
  margin-bottom: 18px;
}

body[data-page="famiglia"] .family-invite-card .eyebrow {
  color: #547064;
  font-weight: 900;
  letter-spacing: .1em;
}

body[data-page="famiglia"] .family-invite-card h2 {
  color: #10251c;
  font-size: clamp(25px, 2.1vw, 31px);
  letter-spacing: -.04em;
}

body[data-page="famiglia"] .family-invite-card > p {
  max-width: 48ch;
  color: #42584c;
  font-size: 16px;
  line-height: 1.6;
}

body[data-page="famiglia"] .family-prepared-badge {
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid rgba(15, 122, 79, .14);
  background: #eaf8ef;
  color: #0b7547;
  box-shadow: 0 6px 14px rgba(15, 122, 79, .10);
}

body[data-page="famiglia"] .family-future-box {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  margin: 22px 0 20px;
  padding: 17px;
  border: 1px solid rgba(15, 122, 79, .16);
  border-radius: 17px;
  background: linear-gradient(135deg, #eef9f2 0%, #f9fdfb 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 8px 20px rgba(12, 57, 39, .055);
}

body[data-page="famiglia"] .family-future-box > span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 7px 16px rgba(12, 57, 39, .10);
  font-size: 21px;
}

body[data-page="famiglia"] .family-future-box strong {
  color: #18382a;
  font-size: 15px;
}

body[data-page="famiglia"] .family-future-box small {
  display: block;
  margin-top: 4px;
  color: #5c7064;
  font-size: 13px;
  line-height: 1.45;
}

body[data-page="famiglia"] .family-open-invite {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 58px;
  margin-top: 2px;
  border: 0;
  border-radius: 15px;
  background: linear-gradient(135deg, #15915b 0%, #0f7a4f 100%);
  box-shadow: 0 13px 25px rgba(15, 122, 79, .23);
  font-size: 16px;
  font-weight: 900;
}

body[data-page="famiglia"] .family-open-invite svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

@media (hover: hover) {
  body[data-page="famiglia"] .family-open-invite:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #19a467 0%, #0f7a4f 100%);
    box-shadow: 0 17px 30px rgba(15, 122, 79, .28);
  }
}

body[data-page="famiglia"] .family-members-card {
  border-color: #dce5dd;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .07) !important;
}

body[data-page="famiglia"] .family-members-list {
  gap: 16px;
  padding: 0 7px 7px 0;
}

body[data-page="famiglia"] .family-member-card-enhanced {
  border-color: #dce5dd;
  box-shadow: 4px 5px 0 #e1e6e3 !important;
}

body[data-page="famiglia"] .family-member-card-enhanced.is-current-member {
  border-color: #c8ddd0;
  box-shadow: 4px 5px 0 #e1e6e3 !important;
}

@media (max-width: 720px) {
  body[data-page="famiglia"] .family-member-card-enhanced {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  body[data-page="famiglia"] .family-member-side {
    grid-column: 2;
    align-items: flex-start;
    flex-direction: row;
  }
}


/* STEP 049A — Fix leggibilità card “Famiglia attiva”
   Solo UI: migliora contrasto e gestione titolo lungo nella KPI verde Famiglia. */
body[data-page="famiglia"] .family-kpi-main {
  gap: 14px;
}

body[data-page="famiglia"] .family-kpi-main small {
  color: rgba(236, 253, 245, .92);
  font-weight: 950;
  letter-spacing: .075em;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .12);
}

body[data-page="famiglia"] .family-kpi-main em {
  color: rgba(220, 252, 231, .88);
  font-weight: 850;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .10);
}

body[data-page="famiglia"] .family-kpi-main strong {
  color: #ffffff;
  font-size: clamp(24px, 1.9vw, 27px);
  line-height: 1.04;
  letter-spacing: -.045em;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
  max-width: 100%;
}

body[data-page="famiglia"] .family-kpi-main .family-kpi-icon {
  flex: 0 0 52px;
}

@media (max-width: 760px) {
  body[data-page="famiglia"] .family-kpi-main strong {
    font-size: 25px;
  }
}

/* STEP 050 — Patrimonio: prima struttura UI premium senza database */
body[data-page="patrimonio"] {
  overflow-x: hidden;
}

body[data-page="patrimonio"] .content-area,
body[data-page="patrimonio"] .patrimonio-content {
  min-width: 0;
  max-width: 100%;
}

body[data-page="patrimonio"] .patrimonio-content {
  display: grid;
  gap: 26px;
}

.patrimonio-status {
  margin: 0;
}

.patrimonio-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 20px;
  min-width: 0;
}

.patrimonio-kpi-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  min-height: 170px;
  border-radius: 24px;
  border: 1px solid #dce5dd;
  background: #fff;
  box-shadow: var(--card-shadow);
  padding: 24px;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}

.patrimonio-kpi-card:after {
  content: "";
  position: absolute;
  right: -32px;
  bottom: -36px;
  width: 132px;
  height: 132px;
  border-radius: 999px;
  background: rgba(31, 157, 99, .08);
  pointer-events: none;
}

.patrimonio-kpi-card > * {
  position: relative;
  z-index: 1;
}

.patrimonio-kpi-main {
  background: linear-gradient(135deg, #0f7a4f, #0b5d3e);
  color: #fff;
  border-color: rgba(255,255,255,.16);
}

.patrimonio-kpi-main:after {
  background: rgba(255,255,255,.12);
}

.patrimonio-kpi-icon {
  width: 68px;
  height: 68px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: rgba(31, 157, 99, .12);
  border: 1px solid rgba(31, 157, 99, .18);
  font-size: 30px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2);
}

.patrimonio-kpi-main .patrimonio-kpi-icon {
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.18);
}

.patrimonio-kpi-card small,
.patrimonio-kpi-card em {
  display: block;
  font-style: normal;
  color: #6b7280;
  font-weight: 850;
}

.patrimonio-kpi-card small {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 13px;
}

.patrimonio-kpi-card strong {
  display: block;
  margin: 5px 0 4px;
  color: #072f25;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.05;
  font-weight: 950;
  white-space: normal;
}

.patrimonio-kpi-main small,
.patrimonio-kpi-main em,
.patrimonio-kpi-main strong {
  color: #fff;
}

.patrimonio-kpi-main small,
.patrimonio-kpi-main em {
  opacity: .88;
}

.patrimonio-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, .85fr);
  gap: 24px;
  min-width: 0;
}

.patrimonio-card-header {
  align-items: flex-start;
}

.patrimonio-assets-card,
.patrimonio-info-card,
.patrimonio-categories-card {
  min-width: 0;
}

.patrimonio-empty-state {
  border: 1px dashed #b9dbc9;
  border-radius: 24px;
  background: linear-gradient(180deg, #f7fcf9, #ffffff);
  padding: 34px;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 12px;
  min-height: 280px;
}

.patrimonio-empty-state > span {
  width: 86px;
  height: 86px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  background: rgba(31, 157, 99, .12);
  border: 1px solid rgba(31, 157, 99, .18);
  font-size: 42px;
}

.patrimonio-empty-state strong {
  font-size: 25px;
  line-height: 1.15;
  color: #111827;
}

.patrimonio-empty-state p {
  max-width: 560px;
  margin: 0;
  color: #6b7280;
  font-size: 17px;
}

.patrimonio-formula-box {
  margin-top: 22px;
  border: 1px solid #dce5dd;
  border-radius: 20px;
  background: #f8faf8;
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  text-align: center;
}

.patrimonio-formula-box span {
  min-height: 54px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: #fff;
  border: 1px solid #dce5dd;
  color: #0b2f26;
  font-weight: 900;
}

.patrimonio-formula-box strong {
  color: #0f7a4f;
  font-size: 24px;
}

.patrimonio-category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 16px;
}

.patrimonio-category-card {
  min-width: 0;
  border: 1px solid #dce5dd;
  border-radius: 20px;
  background: #fff;
  padding: 20px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
  display: grid;
  gap: 8px;
}

.patrimonio-category-card span {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(31, 157, 99, .1);
  border: 1px solid rgba(31, 157, 99, .15);
  font-size: 26px;
}

.patrimonio-category-card strong {
  font-size: 20px;
  line-height: 1.15;
  color: #111827;
}

.patrimonio-category-card small {
  color: #6b7280;
  font-weight: 700;
  line-height: 1.45;
}

.patrimonio-modal-shell[hidden] {
  display: none !important;
}

.patrimonio-modal-shell {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: grid;
  place-items: center;
  padding: 24px;
}

.patrimonio-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 31, 25, .58);
  backdrop-filter: blur(10px);
}

.patrimonio-modal-card {
  position: relative;
  z-index: 1;
  width: min(940px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  background: #fff;
  border: 1px solid #dce5dd;
  border-radius: 30px;
  box-shadow: 0 34px 90px rgba(7, 31, 25, .32);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.patrimonio-modal-header {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 30px;
  border-bottom: 1px solid #dce5dd;
  background: linear-gradient(135deg, #ffffff, #f7fcf9);
}

.patrimonio-modal-icon {
  width: 78px;
  height: 78px;
  border-radius: 25px;
  display: grid;
  place-items: center;
  background: rgba(31, 157, 99, .1);
  font-size: 36px;
}

.patrimonio-modal-header h2 {
  margin: 0;
  font-size: clamp(31px, 4vw, 42px);
  line-height: 1.05;
  color: #111827;
}

.patrimonio-modal-header .muted {
  margin: 7px 0 0;
  font-size: 18px;
}

.patrimonio-modal-close {
  width: 62px;
  height: 62px;
  border-radius: 20px;
  border: 1px solid #dce5dd;
  background: #fff;
  color: #0b2f26;
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .08);
}

.patrimonio-modal-form {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}

.patrimonio-modal-scroll {
  min-height: 0;
  overflow-y: auto;
  padding: 30px;
  display: grid;
  gap: 22px;
}

.patrimonio-modal-scroll::-webkit-scrollbar {
  width: 10px;
}

.patrimonio-modal-scroll::-webkit-scrollbar-thumb {
  background: rgba(15, 122, 79, .35);
  border-radius: 999px;
}

.patrimonio-field {
  display: grid;
  gap: 10px;
  font-weight: 900;
  color: #4b5563;
}

.patrimonio-field input,
.patrimonio-field textarea {
  width: 100%;
  border: 1px solid #dce5dd;
  border-radius: 18px;
  background: #fff;
  color: #111827;
  padding: 16px 18px;
  font-size: 18px;
  font-weight: 800;
  outline: none;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .04);
}

.patrimonio-field textarea {
  resize: vertical;
  min-height: 110px;
}

.patrimonio-field input:focus,
.patrimonio-field textarea:focus {
  border-color: #1f9d63;
  box-shadow: 0 0 0 4px rgba(31, 157, 99, .14), 0 14px 34px rgba(15, 23, 42, .07);
}

.patrimonio-field-grid,
.patrimonio-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.patrimonio-choice {
  border: 1px solid #dce5dd;
  border-radius: 18px;
  background: #fff;
  color: #111827;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .04);
}

.patrimonio-choice-icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(31, 157, 99, .1);
  border: 1px solid rgba(31, 157, 99, .16);
  font-size: 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75);
}

.patrimonio-choice strong {
  display: block;
  font-size: 19px;
  line-height: 1.15;
}

.patrimonio-choice small {
  display: block;
  margin-top: 4px;
  color: #6b7280;
  font-weight: 700;
}

.patrimonio-choice.is-selected {
  border-color: rgba(31, 157, 99, .35);
  background: linear-gradient(180deg, rgba(31,157,99,.12), rgba(31,157,99,.04));
  box-shadow: 0 0 0 4px rgba(31, 157, 99, .08), 0 14px 30px rgba(31, 157, 99, .1);
}

.patrimonio-choice.is-selected .patrimonio-choice-icon {
  background: rgba(31, 157, 99, .16);
  border-color: rgba(31, 157, 99, .28);
}

.patrimonio-choice.is-disabled,
.patrimonio-choice:disabled {
  cursor: not-allowed;
  opacity: .72;
}

.patrimonio-choice.is-disabled:hover,
.patrimonio-choice:disabled:hover {
  transform: none;
}

.patrimonio-protected-note {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(47, 128, 237, .22);
  border-radius: 22px;
  background: rgba(47, 128, 237, .08);
  padding: 18px;
}

.patrimonio-protected-note > span {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: #fff;
}

.patrimonio-protected-note strong,
.patrimonio-protected-note small {
  display: block;
}

.patrimonio-protected-note small {
  color: #6b7280;
  margin-top: 2px;
}

.patrimonio-modal-footer {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 16px;
  padding: 24px 30px;
  border-top: 1px solid #dce5dd;
  background: #fff;
}

.patrimonio-modal-footer .btn {
  min-height: 62px;
  font-size: 18px;
}

@media (max-width: 1250px) {
  .patrimonio-kpi-grid,
  .patrimonio-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .patrimonio-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .patrimonio-kpi-grid,
  .patrimonio-category-grid,
  .patrimonio-field-grid,
  .patrimonio-choice-grid,
  .patrimonio-modal-footer {
    grid-template-columns: 1fr;
  }

  .patrimonio-kpi-card {
    grid-template-columns: 58px minmax(0, 1fr);
    min-height: 140px;
    padding: 20px;
  }

  .patrimonio-kpi-icon {
    width: 58px;
    height: 58px;
    border-radius: 19px;
  }

  .patrimonio-empty-state {
    padding: 24px;
  }

  .patrimonio-modal-shell {
    padding: 14px;
  }

  .patrimonio-modal-card {
    width: calc(100vw - 28px);
    max-height: calc(100vh - 28px);
    border-radius: 24px;
  }

  .patrimonio-modal-header {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 22px;
  }

  .patrimonio-modal-icon {
    display: none;
  }

  .patrimonio-modal-scroll {
    padding: 22px;
  }

  .patrimonio-formula-box {
    grid-template-columns: 1fr;
  }
}


/* STEP 050A — Uniformare KPI Famiglia e Patrimonio senza icone
   Solo UI: rimuove le icone grandi dalle KPI e riallinea leggibilità/testi allo standard Famyro. */
body[data-page="famiglia"] .family-kpi-card,
body[data-page="patrimonio"] .patrimonio-kpi-card {
  min-height: 132px;
  align-items: center;
}

body[data-page="famiglia"] .family-kpi-icon,
body[data-page="patrimonio"] .patrimonio-kpi-icon {
  display: none !important;
}

body[data-page="famiglia"] .family-kpi-card {
  padding: 22px 24px;
  gap: 0;
}

body[data-page="famiglia"] .family-kpi-card div {
  width: 100%;
}

body[data-page="famiglia"] .family-kpi-card small,
body[data-page="patrimonio"] .patrimonio-kpi-card small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 780;
  letter-spacing: .055em;
}

body[data-page="famiglia"] .family-kpi-card em,
body[data-page="patrimonio"] .patrimonio-kpi-card em {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 640;
  line-height: 1.25;
}

body[data-page="famiglia"] .family-kpi-card strong,
body[data-page="patrimonio"] .patrimonio-kpi-card strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-page="famiglia"] .family-kpi-main small,
body[data-page="famiglia"] .family-kpi-main em {
  color: rgba(236, 253, 245, .92);
}

body[data-page="famiglia"] .family-kpi-main strong {
  display: block;
  font-size: clamp(25px, 2.05vw, 30px);
  line-height: 1.06;
  white-space: nowrap;
  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
  overflow-wrap: normal;
}

body[data-page="patrimonio"] .patrimonio-kpi-grid {
  grid-template-columns: repeat(4, minmax(210px, 1fr));
}

body[data-page="patrimonio"] .patrimonio-kpi-card {
  grid-template-columns: minmax(0, 1fr);
  padding: 22px 24px;
}

body[data-page="patrimonio"] .patrimonio-kpi-card strong {
  font-size: clamp(30px, 2.7vw, 38px);
  margin: 6px 0 4px;
}

body[data-page="patrimonio"] .patrimonio-kpi-card small {
  font-size: 12.5px;
}

body[data-page="patrimonio"] .patrimonio-kpi-card em {
  font-size: 15px;
}

@media (max-width: 1250px) {
  body[data-page="patrimonio"] .patrimonio-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body[data-page="famiglia"] .family-kpi-card,
  body[data-page="patrimonio"] .patrimonio-kpi-card {
    min-height: 118px;
    padding: 18px;
  }

  body[data-page="patrimonio"] .patrimonio-kpi-grid {
    grid-template-columns: 1fr;
  }
}

/* STEP 051 — Patrimonio reale: lettura beni da dati applicazione */
.patrimonio-assets-list {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}


/* STEP 052A — Fix stato vuoto Patrimonio dopo salvataggio reale */
.patrimonio-empty-state[hidden] {
  display: none !important;
}

.patrimonio-assets-list[hidden] {
  display: none !important;
}

.patrimonio-asset-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border: 1px solid #dce5dd;
  border-radius: 22px;
  background: #ffffff;
  padding: 18px 20px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
}

.patrimonio-asset-main {
  min-width: 0;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.patrimonio-asset-type {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(31, 157, 99, .10);
  border: 1px solid rgba(31, 157, 99, .16);
  font-size: 25px;
}

.patrimonio-asset-main strong,
.patrimonio-asset-value strong {
  display: block;
  color: #111827;
}

.patrimonio-asset-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 19px;
  line-height: 1.15;
}

.patrimonio-asset-main small,
.patrimonio-asset-value small {
  display: block;
  color: #6b7280;
  font-weight: 700;
  margin-top: 4px;
}

.patrimonio-asset-value {
  text-align: right;
  min-width: 150px;
}

.patrimonio-asset-value strong {
  font-size: 22px;
  line-height: 1.1;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .patrimonio-asset-row {
    grid-template-columns: 1fr;
  }

  .patrimonio-asset-value {
    text-align: left;
    min-width: 0;
    padding-left: 68px;
  }
}

/* STEP 053 — Patrimonio: lettura debiti e finanziamenti collegati */
.patrimonio-net-card {
  margin-top: 24px;
}

.patrimonio-debts-card {
  min-width: 0;
}

.patrimonio-debts-empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
  padding: 30px 22px;
  border: 1px dashed rgba(15, 122, 79, 0.28);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(240, 250, 245, 0.74));
}

.patrimonio-debts-empty[hidden] {
  display: none !important;
}

.patrimonio-debts-empty > span {
  width: 58px;
  height: 58px;
  display: inline-grid;
  place-items: center;
  border-radius: 20px;
  background: #E7F6EF;
  border: 1px solid #BFE8D4;
  font-size: 27px;
}

.patrimonio-debts-empty strong {
  font-size: 22px;
  color: #071328;
}

.patrimonio-debts-empty p {
  margin: 0;
  max-width: 420px;
  color: #647084;
  font-size: 15px;
  line-height: 1.45;
}

.patrimonio-debts-list {
  display: grid;
  gap: 14px;
}

.patrimonio-debts-list[hidden] {
  display: none !important;
}

.patrimonio-debt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid #E0E7E1;
  background: #FFFFFF;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

.patrimonio-debt-main {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.patrimonio-debt-type {
  width: 50px;
  height: 50px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 16px;
  border: 1px solid #F4C7C7;
  background: #FFF1F1;
  font-size: 24px;
}

.patrimonio-debt-main strong,
.patrimonio-debt-value strong {
  color: #071328;
  font-weight: 850;
}

.patrimonio-debt-main small,
.patrimonio-debt-value small {
  display: block;
  margin-top: 5px;
  color: #667085;
  font-size: 14px;
  font-weight: 650;
}

.patrimonio-debt-value {
  text-align: right;
  flex: 0 0 auto;
}

.patrimonio-debt-value strong {
  font-size: 24px;
}

@media (max-width: 760px) {
  .patrimonio-debt-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .patrimonio-debt-value {
    text-align: left;
  }
}

/* STEP 054 — Patrimonio: salvataggio reale nuovo debito */
body[data-page="patrimonio"] .patrimonio-card-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

body[data-page="patrimonio"] .patrimonio-card-actions .btn {
  min-height: 42px;
  padding-inline: 16px;
  border-radius: 14px;
  white-space: nowrap;
}

.patrimonio-modal-icon.debt,
.patrimonio-protected-note.debt > span {
  background: #EEF5FF;
  border-color: #CFE0FF;
}

.patrimonio-debt-type-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.patrimonio-linked-assets-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.patrimonio-linked-choice strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.patrimonio-debt-modal-card .patrimonio-modal-scroll {
  padding-bottom: 128px;
}

@media (max-width: 760px) {
  body[data-page="patrimonio"] .patrimonio-card-actions {
    width: 100%;
    justify-content: flex-start;
  }

  body[data-page="patrimonio"] .patrimonio-card-actions .btn,
  body[data-page="patrimonio"] .patrimonio-card-actions .badge {
    width: auto;
  }

  .patrimonio-debt-type-grid,
  .patrimonio-linked-assets-grid {
    grid-template-columns: 1fr;
  }
}

/* STEP 055 — Patrimonio: modifica ed eliminazione beni patrimoniali */
.patrimonio-asset-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.patrimonio-asset-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}

.patrimonio-asset-actions .btn {
  min-height: 40px;
  padding-inline: 14px;
  border-radius: 14px;
}

.patrimonio-confirm-shell {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.patrimonio-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 47, 38, .64);
  backdrop-filter: blur(10px);
}

.patrimonio-confirm-card {
  position: relative;
  width: min(560px, 100%);
  display: grid;
  gap: 18px;
  border: 1px solid #dce5dd;
  border-radius: 28px;
  background: #ffffff;
  padding: 30px;
  box-shadow: 0 34px 80px rgba(15, 23, 42, .26);
}

.patrimonio-confirm-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: rgba(240, 68, 68, .1);
  border: 1px solid rgba(240, 68, 68, .18);
  font-size: 30px;
}

.patrimonio-confirm-card h2 {
  margin: 0;
  color: #111827;
  font-size: 28px;
  line-height: 1.1;
}

.patrimonio-confirm-card p:not(.eyebrow) {
  margin: 8px 0 0;
  color: #6b7280;
  font-size: 17px;
  line-height: 1.45;
}

.patrimonio-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.patrimonio-confirm-actions .btn {
  min-height: 54px;
}

@media (max-width: 760px) {
  .patrimonio-asset-row {
    grid-template-columns: 1fr;
  }

  .patrimonio-asset-actions {
    justify-content: flex-start;
    padding-left: 68px;
  }

  .patrimonio-confirm-actions {
    grid-template-columns: 1fr;
  }
}

/* STEP 056 — Patrimonio: modifica ed eliminazione debiti */
.patrimonio-debt-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
}

.patrimonio-debt-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}

.patrimonio-debt-actions .btn {
  min-height: 40px;
  padding-inline: 14px;
  border-radius: 14px;
}

@media (max-width: 760px) {
  .patrimonio-debt-row {
    grid-template-columns: 1fr;
  }

  .patrimonio-debt-actions {
    justify-content: flex-start;
    padding-left: 66px;
  }
}

/* STEP 057 — Debiti dedicati e Patrimonio alleggerito */
body[data-page="debiti"] .content-area,
body[data-page="debiti"] .debiti-content {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body[data-page="debiti"] .debiti-content {
  display: grid;
  gap: 28px;
}

.debiti-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 24px;
}

.debiti-kpi-card {
  position: relative;
  overflow: hidden;
  min-height: 160px;
  padding: 28px;
  border: 1px solid var(--color-border-soft);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.debiti-kpi-card:after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -42px;
  width: 132px;
  height: 132px;
  border-radius: 999px;
  background: rgba(15, 122, 79, 0.08);
}

.debiti-kpi-main {
  background: linear-gradient(135deg, #0f7a4f, #0b5f40);
  color: #fff;
}

.debiti-kpi-main:after {
  background: rgba(255, 255, 255, 0.12);
}

.debiti-kpi-card > * {
  position: relative;
  z-index: 1;
}

.debiti-kpi-card small {
  font-size: 0.82rem;
  line-height: 1.1;
  color: var(--color-text-muted);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.debiti-kpi-card strong {
  display: block;
  font-size: clamp(2rem, 3vw, 2.65rem);
  line-height: 1;
  color: #062a20;
  font-weight: 900;
  white-space: nowrap;
}

.debiti-kpi-card em {
  color: var(--color-text-muted);
  font-style: normal;
  font-weight: 650;
  line-height: 1.35;
}

.debiti-kpi-main small,
.debiti-kpi-main strong,
.debiti-kpi-main em {
  color: #fff;
}

.debiti-main-card,
.debiti-help-card {
  border-radius: 22px;
  border: 1px solid var(--color-border-soft);
  box-shadow: var(--card-shadow);
}

.debiti-card-header {
  align-items: flex-start;
  gap: 18px;
}

.debiti-card-header .patrimonio-card-actions {
  align-items: flex-end;
  gap: 12px;
}

.debiti-empty-state {
  margin-top: 24px;
  min-height: 320px;
  border: 1px dashed rgba(31, 157, 99, 0.32);
  border-radius: 22px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 38px 24px;
  background: linear-gradient(135deg, rgba(31, 157, 99, 0.04), rgba(255,255,255,0.8));
}

.debiti-empty-state span {
  width: 82px;
  height: 82px;
  display: inline-grid;
  place-items: center;
  border-radius: 24px;
  background: #e5f5ee;
  border: 1px solid #b7e6cf;
  font-size: 2rem;
  margin-bottom: 16px;
}

.debiti-empty-state strong {
  display: block;
  font-size: 1.65rem;
  margin-bottom: 8px;
  color: var(--color-text);
}

.debiti-empty-state p {
  max-width: 620px;
  margin: 0 auto 22px;
  color: var(--color-text-muted);
  font-size: 1.05rem;
  line-height: 1.55;
}


/* STEP 058B — Debiti: nascondi davvero lo stato vuoto quando esistono debiti */
.debiti-empty-state[hidden],
.debiti-list[hidden] {
  display: none !important;
}

.debiti-list {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.debiti-row {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) minmax(380px, 1.35fr) auto;
  gap: 22px;
  align-items: center;
  padding: 22px;
  border: 1px solid var(--color-border-soft);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

.debiti-row-main {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.debiti-row-icon {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #fff2e4;
  border: 1px solid #ffd7ad;
  font-size: 1.6rem;
}

.debiti-row-main strong {
  display: block;
  color: var(--color-text);
  font-size: 1.18rem;
  line-height: 1.25;
}

.debiti-row-main small {
  display: block;
  color: var(--color-text-muted);
  font-weight: 650;
  margin-top: 4px;
}

.debiti-row-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 14px;
}

.debiti-row-metrics div {
  padding: 12px 14px;
  border-radius: 16px;
  background: #f8fbf8;
  border: 1px solid rgba(220, 229, 221, 0.9);
}

.debiti-row-metrics small {
  display: block;
  color: var(--color-text-muted);
  font-weight: 750;
  font-size: 0.78rem;
  margin-bottom: 6px;
}

.debiti-row-metrics strong {
  display: block;
  color: #062a20;
  font-size: 1.08rem;
  line-height: 1.1;
  white-space: nowrap;
}

.debiti-row-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.debiti-help-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.patrimonio-debts-summary-card .patrimonio-card-header {
  align-items: flex-start;
}

.patrimonio-debts-summary {
  margin-top: 28px;
  padding: 24px;
  border-radius: 20px;
  border: 1px solid rgba(245, 158, 11, 0.25);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(255,255,255,0.82));
  display: grid;
  gap: 18px;
}

.patrimonio-debts-summary small,
.patrimonio-debts-summary span {
  display: block;
  color: var(--color-text-muted);
  font-weight: 700;
}

.patrimonio-debts-summary strong {
  display: block;
  margin: 6px 0;
  font-size: 2.3rem;
  line-height: 1;
  color: #062a20;
  white-space: nowrap;
}

@media (max-width: 1200px) {
  .debiti-kpi-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
  .debiti-row {
    grid-template-columns: 1fr;
  }
  .debiti-row-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .debiti-kpi-grid,
  .debiti-row-metrics {
    grid-template-columns: 1fr;
  }
  .debiti-card-header,
  .debiti-help-card {
    display: grid;
  }
  .debiti-row {
    padding: 18px;
  }
}


/* STEP 058 — Spaziatura Dashboard e tooltip sidebar chiusa
   Fix solo UI: più respiro tra KPI Dashboard e card sottostanti; tooltip descrittivi sulle icone quando la sidebar è chiusa.
*/
body[data-page="dashboard"] .dashboard-kpi-grid {
  margin-bottom: 30px !important;
}

body[data-page="dashboard"] .dashboard-premium-grid,
body[data-page="dashboard"] .dashboard-grid {
  margin-top: 0 !important;
}

.sidebar[data-global-sidebar] .sidebar-link {
  position: relative;
}

.app-shell.sidebar-collapsed .sidebar[data-global-sidebar] .sidebar-link::after {
  content: attr(data-sidebar-tooltip);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
  min-width: max-content;
  max-width: 220px;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(11, 47, 38, .96);
  color: #fff;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.15;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .22);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  white-space: nowrap;
  z-index: 80;
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.app-shell.sidebar-collapsed .sidebar[data-global-sidebar] .sidebar-link::before {
  content: "";
  position: absolute;
  left: calc(100% + 6px);
  top: 50%;
  transform: translateY(-50%);
  border-width: 6px 6px 6px 0;
  border-style: solid;
  border-color: transparent rgba(11, 47, 38, .96) transparent transparent;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 81;
  transition: opacity .16s ease, visibility .16s ease;
}

.app-shell.sidebar-collapsed .sidebar[data-global-sidebar] .sidebar-link:hover::after,
.app-shell.sidebar-collapsed .sidebar[data-global-sidebar] .sidebar-link:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

.app-shell.sidebar-collapsed .sidebar[data-global-sidebar] .sidebar-link:hover::before,
.app-shell.sidebar-collapsed .sidebar[data-global-sidebar] .sidebar-link:focus-visible::before {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 980px) {
  .app-shell.sidebar-collapsed .sidebar[data-global-sidebar] .sidebar-link::before,
  .app-shell.sidebar-collapsed .sidebar[data-global-sidebar] .sidebar-link::after {
    display: none;
  }
}

/* STEP 059 — Debiti: sezione accredito denaro */
.debiti-credit-section {
  border: 1px solid rgba(47, 128, 237, .18);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(47, 128, 237, .055), rgba(31, 157, 99, .045));
  padding: 18px;
}

.patrimonio-credit-grid {
  margin-top: 10px;
}

.debiti-credit-note,
.debiti-credit-empty {
  margin: 12px 2px 0;
  font-size: .95rem;
  line-height: 1.45;
}

.debiti-credit-empty[hidden] {
  display: none !important;
}

/* STEP 061 — Rate debiti e pagamenti periodici */
.debiti-row-actions .btn-primary.btn-sm {
  box-shadow: 0 10px 22px rgba(31, 157, 99, .18);
}

.debiti-payment-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.debiti-payment-summary > div {
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f8fbf8);
  border: 1px solid rgba(220, 229, 221, .95);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .055);
}

.debiti-payment-summary small {
  display: block;
  color: var(--color-text-muted);
  font-size: .78rem;
  font-weight: 850;
  margin-bottom: 6px;
}

.debiti-payment-summary strong {
  display: block;
  color: #062a20;
  font-size: 1.05rem;
  line-height: 1.15;
}

.debiti-payment-note {
  border-color: rgba(31, 157, 99, .16);
  background: linear-gradient(135deg, rgba(31, 157, 99, .08), rgba(47, 128, 237, .045));
}

@media (max-width: 760px) {
  .debiti-payment-summary {
    grid-template-columns: 1fr;
  }

  .debiti-row-actions {
    flex-wrap: wrap;
  }
}


/* STEP 061A — Fix click azioni Debiti */
.debiti-row-actions,
.debiti-row-actions .btn {
  position: relative;
  z-index: 5;
  pointer-events: auto !important;
}

/* STEP 061B — Debiti: scelta eliminazione movimento collegato */
.patrimonio-confirm-card-wide {
  width: min(760px, calc(100vw - 32px));
}

.patrimonio-confirm-actions-3 {
  grid-template-columns: 1fr 1fr 1.25fr;
}

.patrimonio-confirm-actions-3 .btn {
  min-width: 0;
  white-space: normal;
  text-align: center;
}

@media (max-width: 760px) {
  .patrimonio-confirm-actions-3 {
    grid-template-columns: 1fr;
  }
}

/* STEP 062 — Report reali base */
.report-page-content {
  display: grid;
  gap: 22px;
}

.report-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 2px;
}

.report-toolbar h2 {
  margin: 0 0 6px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.report-toolbar p {
  margin: 0;
}

.report-period-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.report-period-controls > strong {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 14px;
  background: #f4f7f4;
  border: 1px solid #dce5dd;
  color: #0b2f26;
  font-size: 15px;
  text-transform: capitalize;
}

.report-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.report-kpi {
  position: relative;
  overflow: hidden;
  min-height: 136px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 22px;
  padding: 22px;
  color: #fff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .10);
}

.report-kpi::after {
  content: "";
  position: absolute;
  width: 128px;
  height: 128px;
  right: -38px;
  bottom: -48px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  pointer-events: none;
}

.report-kpi span,
.report-kpi small,
.report-kpi strong {
  position: relative;
  z-index: 1;
}

.report-kpi span {
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: .88;
}

.report-kpi strong {
  font-size: clamp(28px, 2.6vw, 40px);
  line-height: 1;
  letter-spacing: -.04em;
  white-space: nowrap;
}

.report-kpi strong .currency-decimals {
  font-size: .56em;
}

.report-kpi small {
  color: rgba(255, 255, 255, .82);
  font-weight: 700;
}

.report-kpi-income { background: linear-gradient(135deg, #1f9d63, #0f7a4f); }
.report-kpi-expense { background: linear-gradient(135deg, #f04444, #b42318); }
.report-kpi-balance { background: linear-gradient(135deg, #0b6f51, #0b2f26); }
.report-kpi-saving-rate { background: linear-gradient(135deg, #2f80ed, #1d4ed8); }

.report-grid {
  display: grid;
  grid-template-columns: 1.25fr .95fr;
  gap: 22px;
}

.report-card-large {
  grid-column: span 2;
}

.report-list,
.report-movements {
  display: grid;
  gap: 12px;
}

.report-row,
.report-account-row,
.report-movement-row {
  display: grid;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid #edf2ee;
}

.report-row:last-child,
.report-account-row:last-child,
.report-movement-row:last-child {
  border-bottom: 0;
}

.report-row {
  grid-template-columns: 14px minmax(0, 1fr) auto;
}

.report-account-row,
.report-movement-row {
  grid-template-columns: 46px minmax(0, 1fr) auto;
}

.report-row-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--report-row-color, #6b7280);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--report-row-color, #6b7280) 14%, transparent);
}

.report-row strong,
.report-account-row strong,
.report-movement-row strong {
  display: block;
  font-size: 15px;
  color: #111827;
}

.report-row small,
.report-account-row small,
.report-movement-row small {
  display: block;
  color: #6b7280;
  font-size: 13px;
}

.report-row em,
.report-account-row em,
.report-movement-row em {
  font-style: normal;
  font-weight: 900;
  text-align: right;
  color: #0b2f26;
  white-space: nowrap;
}

.report-account-row em {
  display: grid;
  gap: 2px;
  font-size: 13px;
}

.report-progress {
  display: block;
  height: 8px;
  margin-top: 8px;
  border-radius: 999px;
  background: #edf2ee;
  overflow: hidden;
}

.report-progress b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--color-header-green);
}

.report-trend-chart {
  min-height: 260px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
  padding: 18px 10px 4px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fbfdfb, #fff);
  border: 1px solid #edf2ee;
}

.report-trend-month {
  min-width: 0;
  display: grid;
  gap: 9px;
  text-align: center;
}

.report-trend-bars {
  height: 150px;
  display: flex;
  justify-content: center;
  align-items: end;
  gap: 7px;
  padding-top: 8px;
}

.report-trend-bars span {
  width: 18px;
  min-height: 8px;
  border-radius: 999px 999px 6px 6px;
  box-shadow: 0 10px 18px rgba(15, 23, 42, .08);
}

.report-trend-bars .income { background: linear-gradient(180deg, #22c779, #0f7a4f); }
.report-trend-bars .expense { background: linear-gradient(180deg, #ff6b6b, #f04444); }

.report-trend-month strong {
  color: #111827;
  font-size: 13px;
  text-transform: capitalize;
}

.report-trend-month small {
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
}

@media(max-width: 1180px) {
  .report-toolbar {
    flex-direction: column;
  }

  .report-period-controls {
    justify-content: flex-start;
  }

  .report-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-grid {
    grid-template-columns: 1fr;
  }

  .report-card-large {
    grid-column: span 1;
  }
}

@media(max-width: 640px) {
  .report-kpi-grid {
    grid-template-columns: 1fr;
  }

  .report-period-controls,
  .report-period-controls .btn,
  .report-period-controls > strong {
    width: 100%;
  }

  .report-row,
  .report-account-row,
  .report-movement-row {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .report-row {
    grid-template-columns: 14px minmax(0, 1fr);
  }

  .report-row em,
  .report-account-row em,
  .report-movement-row em {
    grid-column: 2;
    text-align: left;
  }

  .report-trend-chart {
    gap: 8px;
    overflow-x: auto;
  }

  .report-trend-month {
    min-width: 70px;
  }
}

/* STEP 064 — Audit finale MVP: micro-rifiniture globali */
.report-toolbar,
.ai-toolbar {
  min-width: 0;
}

.report-period-controls .btn,
.ai-period-controls .btn {
  white-space: nowrap;
}

.settings-placeholder-box {
  border-style: solid;
  background: linear-gradient(135deg, #ffffff, #f7fbf8);
}

@media (max-width: 640px) {
  .report-toolbar,
  .ai-toolbar {
    padding: 18px;
  }

  .report-kpi,
  .ai-mini-card {
    min-height: auto;
  }
}

/* STEP 066 — Impostazioni famiglia: sezioni in preparazione */
.settings-overview-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  margin-top:18px;
}
.settings-placeholder-box strong{
  display:block;
  color:var(--color-text);
  margin-bottom:6px;
}
.settings-placeholder-box span{
  display:block;
  color:var(--color-text-muted);
  line-height:1.55;
}
@media(max-width:980px){
  .settings-overview-grid{grid-template-columns:1fr;}
}


/* STEP 066A — Impostazioni: menu interno compatto
   Fix mirato: trasforma le voci della navigazione interna in bottoni compatti.
   Non modifica le sezioni operative Categorie, Conti o Lingua.
*/
.settings-layout{
  grid-template-columns:minmax(230px,.48fr) minmax(0,1.8fr);
  gap:22px;
}
.settings-nav-card{
  padding:18px!important;
}
.settings-nav-card .eyebrow{
  margin-bottom:6px!important;
}
.settings-nav-card h2{
  margin:0 0 10px!important;
}
.settings-nav-card > .muted{
  font-size:14px!important;
  line-height:1.45!important;
  margin:0 0 14px!important;
}
.settings-shortcuts{
  display:grid;
  gap:7px!important;
  margin-top:12px!important;
}
.settings-shortcut{
  position:relative;
  display:grid!important;
  grid-template-columns:28px minmax(0,1fr)!important;
  grid-template-areas:
    "icon title"
    "icon meta"!important;
  column-gap:10px!important;
  row-gap:1px!important;
  align-items:center!important;
  min-height:54px!important;
  padding:9px 11px!important;
  border-radius:13px!important;
  text-decoration:none!important;
}
.settings-shortcut span{
  grid-area:icon;
  width:28px!important;
  height:28px!important;
  border-radius:10px!important;
  font-size:15px!important;
  display:grid!important;
  place-items:center!important;
}
.settings-shortcut strong{
  grid-area:title;
  font-size:14.5px!important;
  line-height:1.18!important;
  margin:0!important;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.settings-shortcut small{
  grid-area:meta;
  font-size:11.5px!important;
  line-height:1.25!important;
  margin:0!important;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  color:var(--color-text-muted);
}
.settings-shortcut.active,
.settings-shortcut[aria-current="page"]{
  background:linear-gradient(180deg, rgba(31,157,99,.12) 0%, rgba(31,157,99,.06) 100%)!important;
  border-color:rgba(31,157,99,.55)!important;
  box-shadow:0 0 0 3px rgba(31,157,99,.10), 0 10px 22px rgba(15,23,42,.07)!important;
}
.settings-shortcut.active::before,
.settings-shortcut[aria-current="page"]::before{
  content:"";
  position:absolute;
  left:-1px;
  top:10px;
  bottom:10px;
  width:3px;
  border-radius:99px;
  background:var(--color-positive);
}
.settings-shortcut:hover{
  transform:none!important;
}
@media(max-width:1100px){
  .settings-layout{
    grid-template-columns:1fr;
  }
  .settings-nav-card{
    position:static!important;
  }
  .settings-shortcuts{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
@media(max-width:640px){
  .settings-nav-card{
    padding:16px!important;
  }
  .settings-shortcuts{
    grid-template-columns:1fr!important;
  }
  .settings-shortcut{
    min-height:50px!important;
  }
}

/* STEP 066B — Impostazioni: area menu interna distinta dai contenuti */
.settings-layout{
  grid-template-columns:minmax(286px,.62fr) minmax(0,1.75fr);
  gap:26px;
}
.settings-nav-card{
  background:linear-gradient(180deg,#0B2F26 0%,#0F4F39 58%,#0B2F26 100%)!important;
  border:1px solid rgba(255,255,255,.12)!important;
  box-shadow:0 20px 46px rgba(11,47,38,.22)!important;
  color:#fff!important;
}
.settings-nav-card .eyebrow{
  color:rgba(255,255,255,.72)!important;
  letter-spacing:.12em;
}
.settings-nav-card h2{
  color:#fff!important;
}
.settings-nav-card .muted{
  color:rgba(255,255,255,.78)!important;
}
.settings-shortcuts{
  gap:8px;
  margin-top:16px;
}
.settings-shortcut{
  grid-template-columns:32px minmax(0,1fr);
  gap:10px;
  min-height:54px;
  padding:10px 12px;
  background:rgba(255,255,255,.08)!important;
  border:1px solid rgba(255,255,255,.14)!important;
  color:#fff!important;
  box-shadow:none!important;
}
.settings-shortcut:hover{
  background:rgba(255,255,255,.13)!important;
  border-color:rgba(255,255,255,.22)!important;
  transform:none!important;
}
.settings-shortcut span{
  width:30px;
  height:30px;
  border-radius:11px;
  background:rgba(255,255,255,.12)!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.08);
}
.settings-shortcut strong{
  color:#fff!important;
  font-size:15px;
  line-height:1.1;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.settings-shortcut small{
  color:rgba(255,255,255,.68)!important;
  font-size:12px;
  line-height:1.2;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.settings-shortcut.active{
  background:#fff!important;
  color:#0B2F26!important;
  border-color:rgba(255,255,255,.85)!important;
  box-shadow:0 14px 28px rgba(0,0,0,.18)!important;
}
.settings-shortcut.active::before{
  background:#1F9D63!important;
}
.settings-shortcut.active span{
  background:#EAF7F0!important;
  box-shadow:none;
}
.settings-shortcut.active strong{
  color:#0B2F26!important;
}
.settings-shortcut.active small{
  color:#64748B!important;
}
.settings-panel.card,
.settings-panel.card-large{
  background:#fff!important;
  border-color:#DCE5DD!important;
  box-shadow:0 14px 34px rgba(15,23,42,.08)!important;
}
@media(max-width:1100px){
  .settings-layout{grid-template-columns:1fr;gap:18px}
  .settings-nav-card{position:static!important}
  .settings-shortcuts{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:640px){
  .settings-nav-card{padding:20px 18px!important;border-radius:20px!important}
  .settings-shortcuts{grid-template-columns:1fr;gap:8px}
  .settings-shortcut{min-height:50px;padding:9px 11px}
}


/* STEP 066C — Impostazioni: menu interno distinto ma più leggero
   Fix mirato: sostituisce lo sfondo troppo scuro dello STEP 066B con una
   superficie soft verde/salvia, diversa dai contenuti bianchi e dalla sidebar.
*/
.settings-nav-card{
  background:linear-gradient(180deg,#EEF8F1 0%,#E4F2EA 54%,#F7FBF8 100%)!important;
  border:1px solid #BFDCCB!important;
  box-shadow:0 16px 36px rgba(15,91,58,.13)!important;
  color:var(--color-text)!important;
}
.settings-nav-card .eyebrow{
  color:#4A7B63!important;
  letter-spacing:.12em;
}
.settings-nav-card h2{
  color:#0F172A!important;
}
.settings-nav-card .muted{
  color:#5F6F68!important;
}
.settings-shortcut{
  background:rgba(255,255,255,.72)!important;
  border:1px solid rgba(143,184,158,.62)!important;
  color:#0F172A!important;
  box-shadow:0 8px 18px rgba(15,91,58,.055)!important;
}
.settings-shortcut:hover{
  background:#FFFFFF!important;
  border-color:#87C7A2!important;
  box-shadow:0 10px 22px rgba(15,91,58,.09)!important;
  transform:none!important;
}
.settings-shortcut span{
  background:#F4FAF6!important;
  box-shadow:inset 0 0 0 1px rgba(27,106,81,.08)!important;
}
.settings-shortcut strong{
  color:#111827!important;
}
.settings-shortcut small{
  color:#64748B!important;
}
.settings-shortcut.active,
.settings-shortcut[aria-current="page"]{
  background:#FFFFFF!important;
  color:#0B2F26!important;
  border-color:#45B67E!important;
  box-shadow:0 0 0 3px rgba(31,157,99,.12), 0 12px 26px rgba(15,91,58,.12)!important;
}
.settings-shortcut.active::before,
.settings-shortcut[aria-current="page"]::before{
  background:#1F9D63!important;
}
.settings-shortcut.active span,
.settings-shortcut[aria-current="page"] span{
  background:#EAF7F0!important;
  box-shadow:none!important;
}
.settings-shortcut.active strong,
.settings-shortcut[aria-current="page"] strong{
  color:#0B2F26!important;
}
.settings-shortcut.active small,
.settings-shortcut[aria-current="page"] small{
  color:#4B6358!important;
}
@media(max-width:640px){
  .settings-nav-card{
    background:linear-gradient(180deg,#F1FAF4 0%,#EAF6EF 100%)!important;
  }
}

/* STEP 066D — Impostazioni: indicatore attivo più morbido
   Fix mirato: l'accento della voce attiva resta interno al bottone,
   più sottile e con estremi arrotondati, senza effetto barra tagliata.
*/
.settings-shortcut.active::before,
.settings-shortcut[aria-current="page"]::before{
  left:9px!important;
  top:14px!important;
  bottom:14px!important;
  width:2px!important;
  border-radius:999px!important;
  background:linear-gradient(180deg,
    rgba(31,157,99,0) 0%,
    rgba(31,157,99,.72) 16%,
    #1F9D63 50%,
    rgba(31,157,99,.72) 84%,
    rgba(31,157,99,0) 100%
  )!important;
  box-shadow:0 0 0 1px rgba(31,157,99,.08), 0 2px 8px rgba(31,157,99,.24)!important;
}
.settings-shortcut.active,
.settings-shortcut[aria-current="page"]{
  padding-left:14px!important;
}
@media(max-width:640px){
  .settings-shortcut.active::before,
  .settings-shortcut[aria-current="page"]::before{
    left:8px!important;
    top:13px!important;
    bottom:13px!important;
  }
}


/* STEP 066E — Impostazioni: sfondo menu soft più definito
   Fix mirato: scurisce leggermente il fondo salvia del menu Impostazioni
   senza tornare all'effetto sidebar scura e mantenendo separazione dai contenuti.
*/
.settings-nav-card{
  background:linear-gradient(180deg,#DDEFE5 0%,#D2E8DA 54%,#EAF5EE 100%)!important;
  border-color:#A9D0B8!important;
  box-shadow:0 16px 36px rgba(15,91,58,.16)!important;
}
.settings-nav-card .eyebrow{
  color:#3F7158!important;
}
.settings-nav-card .muted{
  color:#51655C!important;
}
.settings-shortcut{
  background:rgba(255,255,255,.76)!important;
  border-color:rgba(115,166,136,.68)!important;
}
.settings-shortcut:hover{
  border-color:#6FBE91!important;
}
@media(max-width:640px){
  .settings-nav-card{
    background:linear-gradient(180deg,#E1F1E7 0%,#D6EBDE 100%)!important;
  }
}

/* STEP 066F — Impostazioni: bottone attivo verde scuro
   Fix mirato: rende la voce attiva del menu Impostazioni più evidente con
   sfondo verde scuro, mantenendo i bottoni compatti e lo sfondo menu soft.
*/
.settings-shortcut.active,
.settings-shortcut[aria-current="page"]{
  background:linear-gradient(135deg,#0F7A4F 0%,#0B5F40 100%)!important;
  color:#FFFFFF!important;
  border-color:#0A5A3C!important;
  box-shadow:0 12px 26px rgba(11,95,64,.24), 0 0 0 3px rgba(15,122,79,.12)!important;
}
.settings-shortcut.active::before,
.settings-shortcut[aria-current="page"]::before{
  background:linear-gradient(180deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,.68) 18%,
    #FFFFFF 50%,
    rgba(255,255,255,.68) 82%,
    rgba(255,255,255,0) 100%
  )!important;
  box-shadow:0 0 0 1px rgba(255,255,255,.10), 0 2px 8px rgba(255,255,255,.22)!important;
}
.settings-shortcut.active span,
.settings-shortcut[aria-current="page"] span{
  background:rgba(255,255,255,.16)!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.18)!important;
}
.settings-shortcut.active strong,
.settings-shortcut[aria-current="page"] strong{
  color:#FFFFFF!important;
}
.settings-shortcut.active small,
.settings-shortcut[aria-current="page"] small{
  color:rgba(255,255,255,.78)!important;
}
.settings-shortcut.active:hover,
.settings-shortcut[aria-current="page"]:hover{
  background:linear-gradient(135deg,#118457 0%,#0B6846 100%)!important;
  border-color:#0B6846!important;
}

/* STEP 066H — Impostazioni: avvisi richiudibili e card lingua premium
   Fix mirato: l'avviso globale non resta più fisso a occupare spazio e
   le card Italiano/English sono più curate con bandierine e contrasto premium.
*/
.form-message-dismissible{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:14px!important;
  padding:13px 14px 13px 16px!important;
}
.form-message-dismissible span{
  min-width:0!important;
}
.form-message-close{
  width:30px!important;
  height:30px!important;
  flex:0 0 auto!important;
  display:grid!important;
  place-items:center!important;
  border:1px solid rgba(15,23,42,.08)!important;
  border-radius:999px!important;
  background:rgba(255,255,255,.62)!important;
  color:currentColor!important;
  font-size:20px!important;
  line-height:1!important;
  font-weight:850!important;
  cursor:pointer!important;
  box-shadow:0 6px 16px rgba(15,23,42,.06)!important;
  transition:transform .16s ease,background .16s ease,box-shadow .16s ease!important;
}
.form-message-close:hover{
  transform:translateY(-1px)!important;
  background:#fff!important;
  box-shadow:0 10px 22px rgba(15,23,42,.10)!important;
}
.settings-language-grid{
  gap:14px!important;
}
.settings-language-option{
  position:relative!important;
  overflow:hidden!important;
  min-height:118px!important;
  grid-template-columns:auto minmax(0,1fr)!important;
  grid-template-areas:
    "flag copy"
    "flag badge"!important;
  align-items:center!important;
  gap:12px 15px!important;
  border-radius:20px!important;
  padding:18px!important;
  background:linear-gradient(145deg,#FFFFFF 0%,#F7FBF8 100%)!important;
  border-color:#D6E8DB!important;
  box-shadow:0 14px 30px rgba(15,23,42,.065)!important;
}
.settings-language-option::after{
  content:""!important;
  position:absolute!important;
  right:-34px!important;
  bottom:-42px!important;
  width:112px!important;
  height:112px!important;
  border-radius:999px!important;
  background:rgba(31,157,99,.07)!important;
  pointer-events:none!important;
}
.settings-language-option:hover{
  border-color:#8FD0A6!important;
  box-shadow:0 18px 38px rgba(15,23,42,.10)!important;
}
.settings-language-option.is-selected{
  background:linear-gradient(145deg,#EAF8EF 0%,#FFFFFF 72%)!important;
  border-color:#1F9D63!important;
  box-shadow:0 16px 36px rgba(31,157,99,.14),0 0 0 4px rgba(31,157,99,.10)!important;
}
.settings-language-flag{
  grid-area:flag!important;
  position:relative!important;
  z-index:1!important;
  width:58px!important;
  height:58px!important;
  border-radius:18px!important;
  display:grid!important;
  place-items:center!important;
  background:linear-gradient(145deg,#FFFFFF,#ECF7F0)!important;
  border:1px solid rgba(31,157,99,.18)!important;
  box-shadow:0 12px 24px rgba(15,91,58,.10),inset 0 0 0 1px rgba(255,255,255,.72)!important;
}
.settings-language-flag span{
  font-size:30px!important;
  filter:saturate(1.08)!important;
}
.settings-language-icon{
  display:none!important;
}
.settings-language-copy{
  grid-area:copy!important;
  position:relative!important;
  z-index:1!important;
}
.settings-language-copy strong{
  font-size:18px!important;
  letter-spacing:-.02em!important;
  color:#0B2F26!important;
}
.settings-language-copy small{
  max-width:30rem!important;
  color:#52645B!important;
  font-size:13.5px!important;
}
.settings-language-option em{
  grid-area:badge!important;
  justify-self:start!important;
  position:relative!important;
  z-index:1!important;
  background:rgba(15,122,79,.11)!important;
  border:1px solid rgba(15,122,79,.14)!important;
}
.settings-language-option.is-selected em{
  background:#0F7A4F!important;
  color:#FFFFFF!important;
  border-color:#0F7A4F!important;
}
@media(max-width:640px){
  .form-message-dismissible{
    align-items:flex-start!important;
  }
  .settings-language-option{
    min-height:104px!important;
    padding:15px!important;
  }
  .settings-language-flag{
    width:50px!important;
    height:50px!important;
    border-radius:16px!important;
  }
  .settings-language-flag span{
    font-size:27px!important;
  }
}


/* STEP 066I — Fix avviso nascosto e bandierine lingua
   L'avviso impostazioni chiuso non lascia più la barra vuota; le card lingua
   forzano la visualizzazione delle bandierine anche dopo cache busting.
*/
.form-message[hidden],
.form-message-dismissible[hidden],
[data-settings-status][hidden]{
  display:none!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  min-height:0!important;
  height:0!important;
  overflow:hidden!important;
}
[data-settings-status]:empty{
  display:none!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  min-height:0!important;
}
.settings-language-option{
  grid-template-columns:58px minmax(0,1fr)!important;
}
.settings-language-flag{
  display:grid!important;
  opacity:1!important;
  visibility:visible!important;
}
.settings-language-flag span{
  display:block!important;
  line-height:1!important;
  font-size:30px!important;
}
.settings-language-option[data-language-option="it"] .settings-language-flag span::before{
  content:"🇮🇹";
}
.settings-language-option[data-language-option="en"] .settings-language-flag span::before{
  content:"🇬🇧";
}
.settings-language-option[data-language-option="it"] .settings-language-flag span,
.settings-language-option[data-language-option="en"] .settings-language-flag span{
  font-size:0!important;
}
.settings-language-option[data-language-option="it"] .settings-language-flag span::before,
.settings-language-option[data-language-option="en"] .settings-language-flag span::before{
  font-size:30px!important;
}
@media(max-width:640px){
  .settings-language-option[data-language-option="it"] .settings-language-flag span::before,
  .settings-language-option[data-language-option="en"] .settings-language-flag span::before{
    font-size:27px!important;
  }
}

/* STEP 066J — Lingua e formato: card più compatte e bandiere reali
   Rimossi i badge Attiva/Preview e sostituiti IT/GB con bandiere grafiche.
*/
.settings-language-grid{
  gap:14px!important;
}
.settings-language-option{
  min-height:96px!important;
  grid-template-columns:58px minmax(0,1fr)!important;
  grid-template-areas:"flag copy"!important;
  padding:16px 18px!important;
  align-items:center!important;
}
.settings-language-option em{
  display:none!important;
}
.settings-language-copy strong{
  margin-bottom:4px!important;
}
.settings-language-flag{
  width:58px!important;
  height:58px!important;
  border-radius:18px!important;
  overflow:hidden!important;
  background:#ffffff!important;
  border:1px solid rgba(15,122,79,.16)!important;
  box-shadow:0 12px 24px rgba(15,91,58,.10), inset 0 0 0 1px rgba(255,255,255,.78)!important;
}
.settings-language-flag > span{
  display:block!important;
  width:36px!important;
  height:26px!important;
  border-radius:7px!important;
  overflow:hidden!important;
  font-size:0!important;
  line-height:0!important;
  box-shadow:0 6px 14px rgba(15,23,42,.12), inset 0 0 0 1px rgba(15,23,42,.08)!important;
}
.settings-language-flag > span::before,
.settings-language-flag > span::after{
  content:""!important;
}
.settings-language-flag .flag-it{
  background:linear-gradient(90deg,#159447 0 33.33%,#ffffff 33.33% 66.66%,#d62828 66.66% 100%)!important;
}
.settings-language-flag .flag-gb{
  position:relative!important;
  background:
    linear-gradient(90deg,transparent 0 42%,#fff 42% 58%,transparent 58% 100%),
    linear-gradient(0deg,transparent 0 38%,#fff 38% 62%,transparent 62% 100%),
    linear-gradient(90deg,transparent 0 46%,#c8102e 46% 54%,transparent 54% 100%),
    linear-gradient(0deg,transparent 0 43%,#c8102e 43% 57%,transparent 57% 100%),
    #012169!important;
}
.settings-language-flag .flag-gb::before{
  content:""!important;
  position:absolute!important;
  inset:-8px!important;
  background:
    linear-gradient(32deg,transparent 0 43%,#fff 43% 49%,#c8102e 49% 53%,#fff 53% 59%,transparent 59% 100%),
    linear-gradient(-32deg,transparent 0 43%,#fff 43% 49%,#c8102e 49% 53%,#fff 53% 59%,transparent 59% 100%)!important;
  opacity:.95!important;
}
.settings-language-option[data-language-option="it"] .settings-language-flag span::before,
.settings-language-option[data-language-option="en"] .settings-language-flag span::before{
  font-size:0!important;
}
@media(max-width:640px){
  .settings-language-option{
    min-height:86px!important;
    padding:13px 15px!important;
    grid-template-columns:52px minmax(0,1fr)!important;
  }
  .settings-language-flag{
    width:52px!important;
    height:52px!important;
    border-radius:16px!important;
  }
  .settings-language-flag > span{
    width:33px!important;
    height:24px!important;
    border-radius:6px!important;
  }
}

/* STEP 066K — Impostazioni: hover scuro e bandiera UK migliorata
   Fix mirato: il passaggio mouse sui bottoni del menu anticipa lo stato attivo
   verde scuro; la bandiera English usa una resa grafica più pulita tramite SVG.
*/
.settings-shortcut:not(.active):not([aria-current="page"]):hover{
  background:linear-gradient(135deg,#0F7A4F 0%,#0B6846 100%)!important;
  border-color:#0B6846!important;
  color:#FFFFFF!important;
  box-shadow:0 12px 26px rgba(11,95,64,.22),0 0 0 3px rgba(15,122,79,.10)!important;
  transform:translateY(-1px)!important;
}
.settings-shortcut:not(.active):not([aria-current="page"]):hover span{
  background:rgba(255,255,255,.16)!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.18)!important;
}
.settings-shortcut:not(.active):not([aria-current="page"]):hover strong{
  color:#FFFFFF!important;
}
.settings-shortcut:not(.active):not([aria-current="page"]):hover small{
  color:rgba(255,255,255,.78)!important;
}
.settings-language-flag .flag-gb{
  position:relative!important;
  background-color:#012169!important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 36'%3E%3CclipPath id='a'%3E%3Cpath d='M0 0h60v36H0z'/%3E%3C/clipPath%3E%3Cg clip-path='url(%23a)'%3E%3Cpath fill='%23012169' d='M0 0h60v36H0z'/%3E%3Cpath stroke='%23fff' stroke-width='9' d='M-6-4l72 44M66-4L-6 40'/%3E%3Cpath stroke='%23c8102e' stroke-width='5.4' d='M-6-4l72 44M66-4L-6 40'/%3E%3Cpath stroke='%23fff' stroke-width='15' d='M30 0v36M0 18h60'/%3E%3Cpath stroke='%23c8102e' stroke-width='9' d='M30 0v36M0 18h60'/%3E%3C/g%3E%3C/svg%3E")!important;
  background-size:cover!important;
  background-position:center!important;
  background-repeat:no-repeat!important;
}
.settings-language-flag .flag-gb::before,
.settings-language-flag .flag-gb::after{
  content:none!important;
  display:none!important;
}
.settings-language-flag .flag-it{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 36'%3E%3Cpath fill='%23009246' d='M0 0h20v36H0z'/%3E%3Cpath fill='%23fff' d='M20 0h20v36H20z'/%3E%3Cpath fill='%23ce2b37' d='M40 0h20v36H40z'/%3E%3C/svg%3E")!important;
  background-size:cover!important;
  background-position:center!important;
  background-repeat:no-repeat!important;
}

/* STEP 066L — Impostazioni: scelta valuta principale
   Sezione compatta e selezionabile per Euro, Sterlina e Dollaro nella pagina
   Lingua e formato dati. Per ora aggiorna preferenza e anteprime, non tutti gli
   importi globali dell'app.
*/
.settings-currency-section{
  background:linear-gradient(145deg,#FFFFFF 0%,#F7FBF8 100%)!important;
}
.settings-currency-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:12px!important;
}
.settings-currency-option{
  position:relative!important;
  width:100%!important;
  min-height:112px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:12px!important;
  padding:16px!important;
  border:1px solid #D6E8DB!important;
  border-radius:18px!important;
  background:linear-gradient(145deg,#FFFFFF 0%,#F9FCFA 100%)!important;
  box-shadow:0 12px 26px rgba(15,23,42,.055)!important;
  cursor:pointer!important;
  appearance:none!important;
  -webkit-appearance:none!important;
  text-align:left!important;
  overflow:hidden!important;
  transition:transform .16s ease,border-color .16s ease,background .16s ease,box-shadow .16s ease!important;
}
.settings-currency-option::after{
  content:""!important;
  position:absolute!important;
  right:-34px!important;
  bottom:-46px!important;
  width:112px!important;
  height:112px!important;
  border-radius:999px!important;
  background:rgba(31,157,99,.065)!important;
  pointer-events:none!important;
}
.settings-currency-option:hover{
  transform:translateY(-1px)!important;
  border-color:#0F7A4F!important;
  background:linear-gradient(135deg,#0F7A4F 0%,#0B6846 100%)!important;
  box-shadow:0 16px 34px rgba(11,95,64,.20)!important;
}
.settings-currency-option.is-selected{
  border-color:#0B6846!important;
  background:linear-gradient(135deg,#0F7A4F 0%,#0B6846 100%)!important;
  box-shadow:0 16px 34px rgba(11,95,64,.22),0 0 0 4px rgba(15,122,79,.10)!important;
}
.settings-currency-symbol{
  position:relative!important;
  z-index:1!important;
  width:48px!important;
  height:48px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:16px!important;
  background:rgba(15,122,79,.08)!important;
  border:1px solid rgba(15,122,79,.14)!important;
  color:#0B2F26!important;
  font-size:28px!important;
  font-weight:900!important;
  line-height:1!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.72)!important;
}
.settings-currency-copy{
  position:relative!important;
  z-index:1!important;
  display:block!important;
}
.settings-currency-copy strong{
  display:block!important;
  color:#0B2F26!important;
  font-size:17px!important;
  font-weight:850!important;
  line-height:1.15!important;
  letter-spacing:-.02em!important;
}
.settings-currency-copy small{
  display:block!important;
  margin-top:5px!important;
  color:#5F6F66!important;
  font-size:12.8px!important;
  line-height:1.32!important;
}
.settings-currency-option:hover .settings-currency-symbol,
.settings-currency-option.is-selected .settings-currency-symbol{
  background:rgba(255,255,255,.16)!important;
  border-color:rgba(255,255,255,.22)!important;
  color:#FFFFFF!important;
}
.settings-currency-option:hover .settings-currency-copy strong,
.settings-currency-option.is-selected .settings-currency-copy strong{
  color:#FFFFFF!important;
}
.settings-currency-option:hover .settings-currency-copy small,
.settings-currency-option.is-selected .settings-currency-copy small{
  color:rgba(255,255,255,.78)!important;
}
@media(max-width:760px){
  .settings-currency-grid{
    grid-template-columns:1fr!important;
  }
  .settings-currency-option{
    min-height:92px!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:flex-start!important;
  }
  .settings-currency-symbol{
    flex:0 0 auto!important;
  }
}

/* STEP 067 — Profilo famiglia reale */
.settings-profile-panel .card-header{
  align-items: flex-start;
}

.settings-profile-hero{
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px;
  border: 1px solid rgba(15, 122, 79, 0.16);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(236, 248, 240, 0.95), rgba(255, 255, 255, 0.94));
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
  margin-bottom: 18px;
}

.settings-profile-avatar{
  width: 74px;
  height: 74px;
  border-radius: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 34px;
  background: linear-gradient(145deg, #0B2F26, #1B6A51);
  box-shadow: 0 16px 28px rgba(11, 47, 38, 0.22);
}

.settings-profile-main{
  flex: 1;
  min-width: 0;
}

.settings-profile-main h3{
  margin: 2px 0 4px;
  font-size: 28px;
  line-height: 1.05;
  color: var(--color-text);
}

.settings-profile-main p:last-child{
  margin: 0;
  color: var(--color-text-muted);
  font-size: 14px;
}

.settings-profile-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.settings-profile-info-card{
  padding: 16px;
  border: 1px solid rgba(220, 229, 221, 0.95);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  min-width: 0;
}

.settings-profile-info-icon{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 122, 79, 0.1);
  margin-bottom: 10px;
}

.settings-profile-info-card small{
  display: block;
  color: var(--color-text-muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.settings-profile-info-card strong{
  display: block;
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.2;
}

.settings-profile-note{
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid rgba(15, 122, 79, 0.14);
  border-radius: 18px;
  background: rgba(244, 247, 244, 0.78);
  color: var(--color-text-muted);
}

.settings-profile-note strong{
  color: var(--color-header-deep);
}

.family-profile-modal{
  max-width: 760px;
}

.family-profile-modal-scroll{
  max-height: min(68vh, 640px);
}

.settings-profile-choice-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.settings-profile-choice-grid.two{
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-profile-choice-grid.three{
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.settings-profile-choice{
  width: 100%;
  min-height: 106px;
  border: 1px solid rgba(220, 229, 221, 0.92);
  border-radius: 18px;
  padding: 14px;
  background: #fff;
  color: var(--color-text);
  text-align: left;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease, color .18s ease;
}

.settings-profile-choice:hover,
.settings-profile-choice.is-selected{
  background: linear-gradient(145deg, #0B2F26, #145D46);
  border-color: rgba(11, 47, 38, 0.86);
  color: #fff;
  box-shadow: 0 14px 28px rgba(11, 47, 38, 0.18);
  transform: translateY(-1px);
}

.settings-profile-choice span:first-child,
.settings-profile-currency-symbol{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  background: rgba(15, 122, 79, 0.1);
  font-size: 22px;
  font-weight: 800;
}

.settings-profile-choice:hover span:first-child,
.settings-profile-choice.is-selected span:first-child,
.settings-profile-choice:hover .settings-profile-currency-symbol,
.settings-profile-choice.is-selected .settings-profile-currency-symbol{
  background: rgba(255, 255, 255, 0.16);
}

.settings-profile-choice strong{
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}

.settings-profile-choice small{
  display: block;
  color: var(--color-text-muted);
  line-height: 1.25;
}

.settings-profile-choice:hover small,
.settings-profile-choice.is-selected small{
  color: rgba(255,255,255,0.76);
}

.settings-profile-choice-flag{
  overflow: hidden;
}

.settings-profile-choice-flag > span{
  width: 30px;
  height: 22px;
  border-radius: 5px;
  display: block;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
}

.settings-profile-choice-flag .flag-it{
  background: linear-gradient(90deg, #169B62 0 33.333%, #FFFFFF 33.333% 66.666%, #CE2B37 66.666% 100%);
}

.settings-profile-choice-flag .flag-gb{
  background: #123C7C;
}

.settings-profile-choice-flag .flag-gb::before,
.settings-profile-choice-flag .flag-gb::after{
  content: '';
  position: absolute;
  inset: 0;
}

.settings-profile-choice-flag .flag-gb::before{
  background:
    linear-gradient(32deg, transparent 42%, #fff 42% 50%, #C8102E 50% 55%, #fff 55% 63%, transparent 63%),
    linear-gradient(-32deg, transparent 42%, #fff 42% 50%, #C8102E 50% 55%, #fff 55% 63%, transparent 63%);
}

.settings-profile-choice-flag .flag-gb::after{
  background:
    linear-gradient(90deg, transparent 38%, #fff 38% 45%, #C8102E 45% 55%, #fff 55% 62%, transparent 62%),
    linear-gradient(0deg, transparent 35%, #fff 35% 43%, #C8102E 43% 57%, #fff 57% 65%, transparent 65%);
}

@media (max-width: 960px){
  .settings-profile-hero{
    align-items: flex-start;
    flex-direction: column;
  }
  .settings-profile-grid,
  .settings-profile-choice-grid,
  .settings-profile-choice-grid.three{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px){
  .settings-profile-grid,
  .settings-profile-choice-grid,
  .settings-profile-choice-grid.two,
  .settings-profile-choice-grid.three{
    grid-template-columns: 1fr;
  }
  .settings-profile-main h3{
    font-size: 24px;
  }
}

/* STEP 067A — Profilo famiglia: campo nome premium, bandiere e permessi
   Fix mirato della modale Profilo famiglia: niente campo nativo visivamente grezzo,
   bandiere coerenti nelle scelte Paese/Lingua e UI più premium.
*/
.family-profile-name-field{
  gap: 8px;
}
.family-profile-name-control{
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(15,122,79,.22);
  background: linear-gradient(145deg,#FFFFFF 0%,#F7FBF8 100%);
  box-shadow: 0 10px 22px rgba(15,23,42,.055), inset 0 0 0 1px rgba(255,255,255,.72);
  color: var(--color-text);
  font-size: 17px;
  font-weight: 760;
  line-height: 1.28;
  outline: none;
  cursor: text;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.family-profile-name-control:focus{
  border-color: #0F7A4F;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(15,122,79,.10), 0 14px 28px rgba(15,23,42,.075);
}
.family-profile-name-control:empty::before{
  content: attr(data-placeholder);
  color: #87948b;
  font-weight: 650;
}
.settings-profile-choice-flag{
  width: 48px!important;
  height: 48px!important;
  border-radius: 16px!important;
  display: inline-grid!important;
  place-items: center!important;
  margin-bottom: 10px!important;
  background: rgba(15,122,79,.08)!important;
  border: 1px solid rgba(15,122,79,.14)!important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.72)!important;
  overflow: hidden!important;
}
.settings-profile-choice-flag > span{
  width: 34px!important;
  height: 24px!important;
  border-radius: 6px!important;
  display: block!important;
  overflow: hidden!important;
  box-shadow: 0 7px 15px rgba(15,23,42,.14), inset 0 0 0 1px rgba(15,23,42,.08)!important;
  line-height: 0!important;
  font-size: 0!important;
  background-size: cover!important;
  background-position: center!important;
  background-repeat: no-repeat!important;
}
.settings-profile-choice-flag .flag-it{
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 36'%3E%3Cpath fill='%23009246' d='M0 0h20v36H0z'/%3E%3Cpath fill='%23fff' d='M20 0h20v36H20z'/%3E%3Cpath fill='%23ce2b37' d='M40 0h20v36H40z'/%3E%3C/svg%3E")!important;
}
.settings-profile-choice-flag .flag-gb{
  background-color: #012169!important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 36'%3E%3CclipPath id='a'%3E%3Cpath d='M0 0h60v36H0z'/%3E%3C/clipPath%3E%3Cg clip-path='url(%23a)'%3E%3Cpath fill='%23012169' d='M0 0h60v36H0z'/%3E%3Cpath stroke='%23fff' stroke-width='9' d='M-6-4l72 44M66-4L-6 40'/%3E%3Cpath stroke='%23c8102e' stroke-width='5.4' d='M-6-4l72 44M66-4L-6 40'/%3E%3Cpath stroke='%23fff' stroke-width='15' d='M30 0v36M0 18h60'/%3E%3Cpath stroke='%23c8102e' stroke-width='9' d='M30 0v36M0 18h60'/%3E%3C/g%3E%3C/svg%3E")!important;
}
.settings-profile-choice-flag .flag-us{
  background-color: #fff!important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 36'%3E%3Cpath fill='%23fff' d='M0 0h60v36H0z'/%3E%3Cg fill='%23b22234'%3E%3Cpath d='M0 0h60v2.77H0zM0 5.54h60v2.77H0zM0 11.08h60v2.77H0zM0 16.62h60v2.77H0zM0 22.15h60v2.77H0zM0 27.69h60v2.77H0zM0 33.23h60V36H0z'/%3E%3C/g%3E%3Cpath fill='%233c3b6e' d='M0 0h27.8v19.4H0z'/%3E%3Cg fill='%23fff'%3E%3Ccircle cx='4' cy='3' r='1'/%3E%3Ccircle cx='9' cy='3' r='1'/%3E%3Ccircle cx='14' cy='3' r='1'/%3E%3Ccircle cx='19' cy='3' r='1'/%3E%3Ccircle cx='24' cy='3' r='1'/%3E%3Ccircle cx='6.5' cy='7' r='1'/%3E%3Ccircle cx='11.5' cy='7' r='1'/%3E%3Ccircle cx='16.5' cy='7' r='1'/%3E%3Ccircle cx='21.5' cy='7' r='1'/%3E%3Ccircle cx='4' cy='11' r='1'/%3E%3Ccircle cx='9' cy='11' r='1'/%3E%3Ccircle cx='14' cy='11' r='1'/%3E%3Ccircle cx='19' cy='11' r='1'/%3E%3Ccircle cx='24' cy='11' r='1'/%3E%3Ccircle cx='6.5' cy='15' r='1'/%3E%3Ccircle cx='11.5' cy='15' r='1'/%3E%3Ccircle cx='16.5' cy='15' r='1'/%3E%3Ccircle cx='21.5' cy='15' r='1'/%3E%3C/g%3E%3C/svg%3E")!important;
}
.settings-profile-choice-flag .flag-gb::before,
.settings-profile-choice-flag .flag-gb::after{
  content: none!important;
  display: none!important;
}
.settings-profile-choice-globe > span{
  width: 34px!important;
  height: 34px!important;
  border-radius: 12px!important;
  display: grid!important;
  place-items: center!important;
  font-size: 22px!important;
  line-height: 1!important;
  background: rgba(255,255,255,.66)!important;
  box-shadow: none!important;
}
.settings-profile-choice:hover .settings-profile-choice-flag,
.settings-profile-choice.is-selected .settings-profile-choice-flag{
  background: rgba(255,255,255,.16)!important;
  border-color: rgba(255,255,255,.22)!important;
}


/* STEP 067B — Profilo famiglia: scelte compatte in modale */
.family-profile-modal .family-profile-option-group{
  gap:8px;
}
.family-profile-modal .settings-profile-choice-grid.compact,
.family-profile-modal .settings-profile-choice-grid.compact.two,
.family-profile-modal .settings-profile-choice-grid.compact.three{
  grid-template-columns:repeat(auto-fit,minmax(132px,1fr));
  gap:8px;
}
.family-profile-modal .settings-profile-choice.is-compact{
  min-height:58px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:16px;
}
.family-profile-modal .settings-profile-choice.is-compact strong{
  display:block;
  margin:0;
  font-size:14px;
  line-height:1.1;
}
.family-profile-modal .settings-profile-choice.is-compact small{
  display:none;
}
.family-profile-modal .settings-profile-choice.is-compact .settings-profile-choice-flag{
  width:36px!important;
  height:36px!important;
  min-width:36px!important;
  margin:0!important;
  border-radius:13px!important;
}
.family-profile-modal .settings-profile-choice.is-compact .settings-profile-choice-flag > span{
  width:26px!important;
  height:19px!important;
  border-radius:5px!important;
}
.family-profile-modal .settings-profile-choice.is-compact .settings-profile-currency-symbol{
  width:36px!important;
  height:36px!important;
  min-width:36px!important;
  margin:0!important;
  border-radius:13px!important;
  font-size:20px;
}
.family-profile-modal .settings-profile-choice.is-compact .settings-profile-choice-globe > span{
  width:26px!important;
  height:26px!important;
  border-radius:10px!important;
  font-size:18px!important;
}
@media(max-width:680px){
  .family-profile-modal .settings-profile-choice-grid.compact,
  .family-profile-modal .settings-profile-choice-grid.compact.two,
  .family-profile-modal .settings-profile-choice-grid.compact.three{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:420px){
  .family-profile-modal .settings-profile-choice-grid.compact,
  .family-profile-modal .settings-profile-choice-grid.compact.two,
  .family-profile-modal .settings-profile-choice-grid.compact.three{
    grid-template-columns:1fr;
  }
}

/* STEP 067C — Profilo famiglia: spaziatura gruppi scelte modale */
.family-profile-modal .family-profile-option-group{
  margin-top:18px;
  padding-top:2px;
}
.family-profile-modal .family-profile-name-field + .family-profile-option-group{
  margin-top:20px;
}
.family-profile-modal .family-profile-option-group > span:first-child{
  display:block;
  margin-bottom:10px;
  font-weight:850;
  color:#1f2937;
}
.family-profile-modal .settings-profile-choice-grid.compact,
.family-profile-modal .settings-profile-choice-grid.compact.two,
.family-profile-modal .settings-profile-choice-grid.compact.three{
  row-gap:10px;
}
@media(max-width:680px){
  .family-profile-modal .family-profile-option-group{
    margin-top:16px;
  }
  .family-profile-modal .family-profile-name-field + .family-profile-option-group{
    margin-top:18px;
  }
}


/* STEP 067C — Profilo famiglia: bandiere reali nella card riepilogo */
.settings-profile-avatar{
  overflow: hidden;
  background: linear-gradient(145deg, rgba(15,122,79,.13), rgba(255,255,255,.96));
  border: 1px solid rgba(15,122,79,.18);
  box-shadow: 0 16px 28px rgba(11,47,38,.14), inset 0 0 0 1px rgba(255,255,255,.78);
}
.settings-profile-avatar-flag{
  width: 52px;
  height: 38px;
  border-radius: 12px;
  display: block;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(15,23,42,.16), inset 0 0 0 1px rgba(15,23,42,.08);
}
.settings-profile-avatar-flag > span{
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background-size: cover!important;
  background-position: center!important;
  background-repeat: no-repeat!important;
}
.settings-profile-avatar-flag .flag-it{
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 36'%3E%3Cpath fill='%23009246' d='M0 0h20v36H0z'/%3E%3Cpath fill='%23fff' d='M20 0h20v36H20z'/%3E%3Cpath fill='%23ce2b37' d='M40 0h20v36H40z'/%3E%3C/svg%3E")!important;
}
.settings-profile-avatar-flag .flag-gb{
  background-color: #012169!important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 36'%3E%3CclipPath id='a'%3E%3Cpath d='M0 0h60v36H0z'/%3E%3C/clipPath%3E%3Cg clip-path='url(%23a)'%3E%3Cpath fill='%23012169' d='M0 0h60v36H0z'/%3E%3Cpath stroke='%23fff' stroke-width='9' d='M-6-4l72 44M66-4L-6 40'/%3E%3Cpath stroke='%23c8102e' stroke-width='5.4' d='M-6-4l72 44M66-4L-6 40'/%3E%3Cpath stroke='%23fff' stroke-width='15' d='M30 0v36M0 18h60'/%3E%3Cpath stroke='%23c8102e' stroke-width='9' d='M30 0v36M0 18h60'/%3E%3C/g%3E%3C/svg%3E")!important;
}
.settings-profile-avatar-flag .flag-us{
  background-color: #fff!important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 36'%3E%3Cpath fill='%23fff' d='M0 0h60v36H0z'/%3E%3Cg fill='%23b22234'%3E%3Cpath d='M0 0h60v2.77H0zM0 5.54h60v2.77H0zM0 11.08h60v2.77H0zM0 16.62h60v2.77H0zM0 22.15h60v2.77H0zM0 27.69h60v2.77H0zM0 33.23h60V36H0z'/%3E%3C/g%3E%3Cpath fill='%233c3b6e' d='M0 0h27.8v19.4H0z'/%3E%3Cg fill='%23fff'%3E%3Ccircle cx='4' cy='3' r='1'/%3E%3Ccircle cx='9' cy='3' r='1'/%3E%3Ccircle cx='14' cy='3' r='1'/%3E%3Ccircle cx='19' cy='3' r='1'/%3E%3Ccircle cx='24' cy='3' r='1'/%3E%3Ccircle cx='6.5' cy='7' r='1'/%3E%3Ccircle cx='11.5' cy='7' r='1'/%3E%3Ccircle cx='16.5' cy='7' r='1'/%3E%3Ccircle cx='21.5' cy='7' r='1'/%3E%3Ccircle cx='4' cy='11' r='1'/%3E%3Ccircle cx='9' cy='11' r='1'/%3E%3Ccircle cx='14' cy='11' r='1'/%3E%3Ccircle cx='19' cy='11' r='1'/%3E%3Ccircle cx='24' cy='11' r='1'/%3E%3Ccircle cx='6.5' cy='15' r='1'/%3E%3Ccircle cx='11.5' cy='15' r='1'/%3E%3Ccircle cx='16.5' cy='15' r='1'/%3E%3Ccircle cx='21.5' cy='15' r='1'/%3E%3C/g%3E%3C/svg%3E")!important;
}
.settings-profile-avatar-flag .flag-gb::before,
.settings-profile-avatar-flag .flag-gb::after{
  content: none!important;
  display: none!important;
}
.settings-profile-avatar-globe{
  width: 52px;
  height: 52px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  font-size: 30px;
  background: rgba(255,255,255,.72);
  box-shadow: inset 0 0 0 1px rgba(15,122,79,.12), 0 10px 20px rgba(15,23,42,.10);
}

/* STEP 068 — Impostazioni: Membri e ruoli reali */
.settings-members-card .card-header {
  align-items: flex-start;
  gap: 18px;
}

.settings-members-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 20px;
}

.settings-members-list {
  display: grid;
  gap: 12px;
}

.settings-member-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid rgba(11, 47, 38, 0.12);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(244, 250, 246, 0.9));
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.settings-member-avatar {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0B2F26, #1B6A51);
  color: #ffffff;
  font-weight: 900;
  letter-spacing: 0.04em;
  box-shadow: 0 12px 24px rgba(11, 47, 38, 0.16);
}


.settings-member-avatar.has-photo,
.settings-member-profile-avatar-inner.has-photo {
  padding: 0;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(15, 122, 79, 0.18);
}

.settings-member-avatar.has-photo img,
.settings-member-profile-avatar-inner.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.settings-member-main {
  min-width: 0;
}

.settings-member-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.settings-member-title-row h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  color: var(--color-text);
}

.settings-member-main p {
  margin: 0;
  color: var(--color-text-muted);
  font-weight: 650;
  overflow-wrap: anywhere;
}

.settings-member-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.settings-member-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(15, 122, 79, 0.08);
  border: 1px solid rgba(15, 122, 79, 0.12);
}

.settings-member-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.settings-member-lock {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.24);
  color: #92400e;
  font-weight: 900;
  white-space: nowrap;
}

.settings-members-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  margin-top: 18px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(15, 122, 79, 0.14);
  background: rgba(236, 253, 245, 0.72);
  color: #0f3d2f;
}

.settings-note-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 122, 79, 0.12);
  color: #0f7a4f;
  font-weight: 900;
}

.settings-members-note strong {
  display: block;
  margin-bottom: 4px;
  color: #0b2f26;
}

.settings-members-note p {
  margin: 0;
  color: #49665b;
  font-weight: 650;
  line-height: 1.45;
}

.settings-member-modal {
  max-width: 780px;
}

.settings-member-modal-scroll {
  display: grid;
  gap: 18px;
}

.settings-role-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.settings-role-choice {
  appearance: none;
  border: 1px solid rgba(11, 47, 38, 0.12);
  border-radius: 18px;
  background: #ffffff;
  min-height: 94px;
  padding: 16px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.settings-role-choice strong,
.settings-role-choice span {
  display: block;
}

.settings-role-choice strong {
  color: var(--color-text);
  font-size: 17px;
  margin-bottom: 6px;
}

.settings-role-choice span {
  color: var(--color-text-muted);
  font-weight: 650;
  line-height: 1.35;
}

.settings-role-choice:hover,
.settings-role-choice.is-selected {
  background: linear-gradient(135deg, #0B2F26, #145C46);
  border-color: rgba(15, 122, 79, 0.72);
  box-shadow: 0 16px 32px rgba(11, 47, 38, 0.16);
  transform: translateY(-1px);
}

.settings-role-choice:hover strong,
.settings-role-choice:hover span,
.settings-role-choice.is-selected strong,
.settings-role-choice.is-selected span {
  color: #ffffff;
}


.settings-member-profile-modal {
  max-width: 820px;
}

.settings-member-profile-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(15, 122, 79, 0.16);
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.8), rgba(255, 255, 255, 0.94));
}

.settings-member-profile-head strong,
.settings-member-profile-head span {
  display: block;
}

.settings-member-profile-head strong {
  color: var(--color-text);
  font-size: 18px;
  margin-bottom: 3px;
}

.settings-member-profile-head > div:last-child > span:not(.badge) {
  color: var(--color-text-muted);
  font-weight: 700;
  overflow-wrap: anywhere;
  margin-bottom: 8px;
}

.settings-member-profile-avatar-inner {
  width: 68px;
  height: 68px;
  border-radius: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0B2F26, #1B6A51);
  color: #ffffff;
  font-weight: 950;
  letter-spacing: 0.04em;
  font-size: 22px;
  box-shadow: 0 16px 30px rgba(11, 47, 38, 0.18);
}

.settings-member-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.settings-avatar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.settings-avatar-note {
  display: block;
  margin-top: 8px;
  color: var(--color-text-muted);
  font-weight: 650;
  line-height: 1.35;
}


/* STEP PORTALE 036 — Upload foto profilo su server */
.settings-avatar-field {
  gap: 10px;
}

.settings-avatar-upload-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(15, 122, 79, 0.20);
  background:
    radial-gradient(circle at top right, rgba(212, 175, 55, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(236, 253, 245, 0.82));
  box-shadow: 0 18px 42px rgba(11, 47, 38, 0.10);
}

.settings-avatar-upload-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0B2F26, #1B6A51);
  color: #ffffff;
  font-size: 23px;
  box-shadow: 0 14px 28px rgba(11, 47, 38, 0.18);
}

.settings-avatar-upload-content {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.settings-avatar-upload-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.settings-avatar-upload-title strong {
  color: #0b2f26;
  font-size: 17px;
  line-height: 1.15;
}

.settings-avatar-upload-title em {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.16);
  border: 1px solid rgba(212, 175, 55, 0.28);
  color: #765b13;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.settings-avatar-upload-card p {
  margin: 0;
  color: #5c6f66;
  font-weight: 700;
  line-height: 1.45;
}

.settings-avatar-upload-card .settings-avatar-actions {
  margin-top: 2px;
}


/* STEP PORTALE 037 — Rifinitura visuale campi Modifica profilo */
.settings-member-profile-modal .form-field > span {
  color: #111827;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.settings-member-profile-modal .premium-input {
  border: 1.5px solid rgba(15, 91, 58, 0.24);
  background: #ffffff;
  color: #111827;
  box-shadow:
    0 14px 32px rgba(15, 23, 42, 0.075),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.settings-member-profile-modal .premium-input::placeholder {
  color: #7a817c;
  font-weight: 750;
}

.settings-member-profile-modal .premium-input:hover {
  border-color: rgba(15, 91, 58, 0.34);
  box-shadow:
    0 16px 36px rgba(15, 23, 42, 0.09),
    0 0 0 3px rgba(15, 122, 79, 0.045),
    inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

.settings-member-profile-modal .premium-input:focus {
  border-color: rgba(15, 122, 79, 0.74);
  box-shadow:
    0 0 0 4px rgba(31, 157, 99, 0.14),
    0 16px 36px rgba(15, 23, 42, 0.10);
}

.settings-member-profile-modal .premium-input[readonly] {
  background: #ffffff;
  color: #111827;
  border-color: rgba(15, 91, 58, 0.22);
  opacity: 1;
}

.settings-member-profile-modal .settings-avatar-note {
  color: #0b2f26;
  font-weight: 900;
}

.settings-member-profile-modal .settings-avatar-upload-card {
  border-color: rgba(15, 91, 58, 0.28);
  box-shadow:
    0 22px 48px rgba(11, 47, 38, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.settings-member-selected-box {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(15, 122, 79, 0.18);
  background: rgba(236, 253, 245, 0.66);
}

.settings-member-selected-box strong,
.settings-member-selected-box span {
  display: block;
}

.settings-member-selected-box strong {
  color: var(--color-text);
  font-size: 18px;
  margin-bottom: 4px;
}

.settings-member-selected-box span {
  color: var(--color-text-muted);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.badge-neutral,
.badge-muted {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
  border-color: rgba(100, 116, 139, 0.16);
}

.btn-small {
  min-height: 40px;
  padding: 0 14px;
  font-size: 14px;
}

@media (max-width: 760px) {
  .settings-members-summary,
  .settings-role-choice-grid {
    grid-template-columns: 1fr;
  }

  .settings-member-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .settings-member-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .settings-member-profile-grid {
    grid-template-columns: 1fr;
  }

  .settings-member-profile-head {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .settings-avatar-upload-card {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .settings-avatar-upload-title,
  .settings-avatar-upload-card .settings-avatar-actions {
    justify-content: center;
  }

  .settings-member-actions .btn,
  .settings-member-lock {
    width: 100%;
    justify-content: center;
  }
}

/* STEP 069 — Topbar profilo utente attivo */
.topbar-profile-wrap{
  position:relative;
  display:inline-flex;
  align-items:center;
  z-index:35;
}
.topbar-profile-wrap .topbar-profile{
  min-height:52px;
  padding:0;
  border-radius:0;
  background:transparent;
  border:0;
  cursor:pointer;
  box-shadow:none;
  transition:opacity .18s ease, transform .18s ease;
}
.topbar-profile-wrap .topbar-profile:hover,
.topbar-profile-wrap.is-open .topbar-profile{
  background:transparent;
  border-color:transparent;
  box-shadow:none;
  transform:none;
}
.topbar-profile-wrap .topbar-profile:hover .profile-avatar,
.topbar-profile-wrap.is-open .topbar-profile .profile-avatar{
  box-shadow:0 14px 30px rgba(0,0,0,.24), 0 0 0 3px rgba(255,255,255,.22);
}
.topbar-profile-text{
  min-width:112px;
}
.topbar-profile-arrow{
  width:28px;
  height:28px;
  border-radius:999px;
  display:grid;
  place-items:center;
  margin-left:4px;
  font-style:normal;
  color:#fff;
  background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.16);
  transition:transform .18s ease, background .18s ease, border-color .18s ease;
}
.topbar-profile-wrap .topbar-profile:hover .topbar-profile-arrow,
.topbar-profile-wrap.is-open .topbar-profile-arrow{
  background:rgba(255,255,255,.24);
  border-color:rgba(255,255,255,.28);
}
.topbar-profile-wrap.is-open .topbar-profile-arrow{
  transform:rotate(180deg);
}
.profile-avatar.has-image{
  overflow:hidden;
  padding:0;
  background:#fff;
}
.profile-avatar.has-image img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.topbar-profile-menu{
  position:absolute;
  right:0;
  top:calc(100% + 12px);
  width:280px;
  padding:10px;
  border-radius:20px;
  border:1px solid rgba(220,229,221,.95);
  background:rgba(255,255,255,.98);
  box-shadow:0 24px 70px rgba(15,23,42,.22);
  color:#111827;
  z-index:80;
}
.topbar-profile-menu[hidden]{display:none!important;}
.topbar-profile-menu::before{
  content:"";
  position:absolute;
  right:24px;
  top:-7px;
  width:14px;
  height:14px;
  transform:rotate(45deg);
  background:#fff;
  border-left:1px solid rgba(220,229,221,.95);
  border-top:1px solid rgba(220,229,221,.95);
}
.topbar-profile-menu button{
  width:100%;
  min-height:58px;
  display:grid;
  grid-template-columns:38px minmax(0,1fr);
  grid-template-rows:auto auto;
  column-gap:10px;
  align-items:center;
  text-align:left;
  border:0;
  border-radius:15px;
  padding:10px;
  background:transparent;
  color:#111827;
  cursor:pointer;
  transition:background .16s ease, color .16s ease, transform .16s ease;
}
.topbar-profile-menu button:hover{
  background:#eef7f1;
  color:#0b5d3d;
  transform:translateX(2px);
}
.topbar-profile-menu button > span{
  grid-row:1 / span 2;
  width:38px;
  height:38px;
  border-radius:13px;
  display:grid;
  place-items:center;
  background:#eef7f1;
  color:#0f7a4f;
}
.topbar-profile-menu button strong{
  display:block;
  font-size:14px;
  line-height:1.1;
}
.topbar-profile-menu button small{
  display:block;
  margin-top:3px;
  color:#6b7280;
  font-size:12px;
  line-height:1.2;
}
.topbar-profile-menu button.is-danger:hover{
  background:rgba(240,68,68,.1);
  color:#b42318;
}
.topbar-profile-menu button.is-danger > span{
  background:rgba(240,68,68,.1);
  color:#f04444;
}
@media(max-width:980px){
  .topbar-profile-wrap .topbar-profile-text{display:none!important;}
  .topbar-profile-arrow{margin-left:0;}
  .topbar-profile-menu{right:0;width:min(280px,calc(100vw - 36px));}
}

/* STEP 071 — Impostazioni: Notifiche e preferenze avvisi */
.settings-notifications-panel{
  overflow:hidden;
}
.settings-notifications-header .badge{
  white-space:nowrap;
}
.settings-notification-summary{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  margin:22px 0;
}
.settings-notification-mini-state{
  background:linear-gradient(135deg,#ffffff 0%,#f1fbf5 100%);
}
.settings-notification-section{
  border:1px solid rgba(15,122,79,.14);
  border-radius:22px;
  padding:20px;
  background:linear-gradient(180deg,#ffffff 0%,#f7fbf8 100%);
  box-shadow:0 14px 34px rgba(15,23,42,.055);
  margin-top:18px;
}
.settings-notification-section-soft{
  background:linear-gradient(135deg,rgba(31,157,99,.08),rgba(255,255,255,.96));
}
.settings-subsection-icon{
  width:42px;
  height:42px;
  border-radius:15px;
  display:grid;
  place-items:center;
  background:rgba(31,157,99,.12);
  color:#0f7a4f;
  font-size:20px;
  flex:0 0 auto;
}
.settings-subsection-title p{
  margin:5px 0 0;
  color:var(--color-text-muted);
  line-height:1.45;
}
.settings-notification-list{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-top:16px;
}
.settings-notification-option{
  width:100%;
  display:grid;
  grid-template-columns:44px minmax(0,1fr) 54px;
  gap:13px;
  align-items:center;
  text-align:left;
  border:1px solid rgba(15,122,79,.16);
  border-radius:18px;
  background:#fff;
  padding:14px;
  cursor:pointer;
  box-shadow:0 12px 28px rgba(15,23,42,.05);
  transition:border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.settings-notification-option:hover{
  border-color:rgba(15,122,79,.36);
  box-shadow:0 16px 32px rgba(15,23,42,.08);
  transform:translateY(-1px);
}
.settings-notification-option.is-active{
  background:linear-gradient(135deg,#0b4f3a,#0f6b4a);
  border-color:rgba(255,255,255,.18);
  box-shadow:0 18px 38px rgba(11,79,58,.20);
}
.settings-notification-icon{
  width:44px;
  height:44px;
  border-radius:15px;
  display:grid;
  place-items:center;
  background:rgba(31,157,99,.10);
  box-shadow:inset 0 0 0 1px rgba(15,122,79,.12);
  font-size:20px;
}
.settings-notification-option.is-active .settings-notification-icon{
  background:rgba(255,255,255,.14);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.18);
}
.settings-notification-copy{
  display:grid;
  gap:4px;
  min-width:0;
}
.settings-notification-copy strong,
.settings-notification-channel strong{
  color:var(--color-text);
  font-size:16px;
  line-height:1.2;
}
.settings-notification-copy small,
.settings-notification-channel small{
  color:var(--color-text-muted);
  line-height:1.35;
  font-weight:650;
}
.settings-notification-option.is-active .settings-notification-copy strong,
.settings-notification-option.is-active .settings-notification-copy small{
  color:#fff;
}
.settings-notification-switch{
  justify-self:end;
  width:50px;
  height:28px;
  border-radius:999px;
  background:#e5eee8;
  border:1px solid rgba(15,122,79,.14);
  padding:3px;
  transition:background .18s ease, border-color .18s ease;
}
.settings-notification-switch span{
  display:block;
  width:20px;
  height:20px;
  border-radius:999px;
  background:#fff;
  box-shadow:0 4px 10px rgba(15,23,42,.18);
  transition:transform .18s ease;
}
.settings-notification-option.is-active .settings-notification-switch{
  background:rgba(255,255,255,.22);
  border-color:rgba(255,255,255,.28);
}
.settings-notification-option.is-active .settings-notification-switch span{
  transform:translateX(20px);
  background:#fff;
}
.settings-notification-channels{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-top:16px;
}
.settings-notification-channel{
  display:grid;
  grid-template-columns:44px minmax(0,1fr) auto;
  gap:13px;
  align-items:center;
  border:1px dashed rgba(15,122,79,.24);
  border-radius:18px;
  background:rgba(255,255,255,.72);
  padding:14px;
}
@media(max-width:980px){
  .settings-notification-summary,
  .settings-notification-list,
  .settings-notification-channels{
    grid-template-columns:1fr;
  }
}
@media(max-width:560px){
  .settings-notification-section{padding:16px;border-radius:18px;}
  .settings-notification-option,
  .settings-notification-channel{grid-template-columns:40px minmax(0,1fr);}
  .settings-notification-switch,
  .settings-notification-channel .badge{grid-column:2;justify-self:start;}
}

/* STEP 071B — soglia saldo basso configurabile */
.settings-notification-option-wrap{
  display:grid;
  gap:10px;
  min-width:0;
}
.settings-notification-threshold{
  display:none;
  border:1px solid rgba(15,122,79,.18);
  border-radius:18px;
  background:linear-gradient(135deg,rgba(244,250,247,.96),rgba(255,255,255,.9));
  padding:12px 14px;
  box-shadow:0 12px 26px rgba(15,23,42,.05);
}
.settings-notification-threshold.is-visible{
  display:grid;
  gap:8px;
}
.settings-notification-threshold label{
  font-size:13px;
  font-weight:850;
  color:var(--color-header-deep);
  letter-spacing:.02em;
}
.settings-notification-threshold-row{
  display:flex;
  align-items:center;
  gap:10px;
}
.settings-notification-threshold-input{
  max-width:160px;
  font-weight:850;
  font-size:18px;
}
.settings-notification-threshold-row span{
  width:42px;
  height:42px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background:rgba(15,122,79,.10);
  color:var(--color-header-deep);
  font-size:20px;
  font-weight:900;
}
.settings-notification-threshold small{
  color:var(--color-text-muted);
  line-height:1.4;
  font-weight:650;
}
@media(max-width:560px){
  .settings-notification-threshold-row{align-items:stretch;}
  .settings-notification-threshold-input{max-width:none;flex:1;}
}

/* STEP 072 — Centro notifiche interno topbar */
.topbar-notification-wrap{
  position:relative;
  display:inline-flex;
  align-items:center;
}
.topbar-notification{
  cursor:pointer;
  transition:background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.topbar-notification:hover,
.topbar-notification-wrap.is-open .topbar-notification{
  background:rgba(255,255,255,.18);
  transform:translateY(-1px);
  box-shadow:0 12px 26px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.12);
}
.topbar-notification[aria-expanded="true"]{
  outline:2px solid rgba(255,255,255,.2);
  outline-offset:2px;
}
.topbar-notification-panel{
  position:absolute;
  top:calc(100% + 14px);
  right:0;
  width:min(430px,calc(100vw - 38px));
  background:#fff;
  color:#111827;
  border:1px solid rgba(220,229,221,.95);
  border-radius:22px;
  box-shadow:0 28px 80px rgba(7,31,25,.25);
  z-index:70;
  overflow:visible;
}
.topbar-notification-panel[hidden]{display:none!important;}
.topbar-notification-panel::before{
  content:"";
  position:absolute;
  right:18px;
  top:-8px;
  width:18px;
  height:18px;
  background:#fff;
  border-left:1px solid rgba(220,229,221,.95);
  border-top:1px solid rgba(220,229,221,.95);
  transform:rotate(45deg);
  z-index:1;
  box-shadow:-4px -4px 10px rgba(15,23,42,.035);
}

.topbar-notification-panel > *{
  position:relative;
  z-index:2;
}
.topbar-notification-head{
  border-top-left-radius:22px;
  border-top-right-radius:22px;
}
.topbar-notification-list,
.topbar-notification-empty{
  background:#fff;
}
.topbar-notification-list:last-child,
.topbar-notification-empty:last-child{
  border-bottom-left-radius:22px;
  border-bottom-right-radius:22px;
}
.topbar-notification-head{
  position:relative;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding:18px 18px 14px;
  background:linear-gradient(135deg,#f5fbf7,#ffffff);
  border-bottom:1px solid #edf2ee;
}
.topbar-notification-head strong{
  display:block;
  font-size:20px;
  line-height:1.1;
  color:#0b2f26;
}
.topbar-notification-head small{
  display:block;
  margin-top:4px;
  color:#6b7280;
  font-weight:750;
}
.topbar-notification-head button{
  border:1px solid rgba(31,157,99,.18);
  background:rgba(31,157,99,.1);
  color:#0f7a4f;
  border-radius:14px;
  padding:7px 10px;
  font-size:14px;
  line-height:1.15;
  font-weight:500;
  cursor:pointer;
  white-space:nowrap;
}
.topbar-notification-head button:hover{
  background:#0b5d3d;
  color:#fff;
}
.topbar-notification-list{
  display:grid;
  gap:8px;
  max-height:min(430px,60vh);
  overflow:auto;
  padding:14px;
}
.topbar-notification-item{
  display:grid;
  grid-template-columns:40px minmax(0,1fr);
  gap:12px;
  align-items:flex-start;
  padding:12px;
  border:1px solid #e5eee7;
  border-radius:16px;
  background:#fff;
  text-decoration:none;
  color:#111827;
  transition:background .18s ease,border-color .18s ease,transform .18s ease;
}
.topbar-notification-item:hover{
  transform:translateY(-1px);
  border-color:rgba(31,157,99,.32);
  background:#f7fbf8;
}
.topbar-notification-item.is-read{
  opacity:.68;
}
.topbar-notification-dot{
  width:40px;
  height:40px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background:rgba(47,128,237,.1);
  font-size:20px;
}
.topbar-notification-item.is-danger .topbar-notification-dot{background:rgba(240,68,68,.12);}
.topbar-notification-item.is-warning .topbar-notification-dot{background:rgba(245,158,11,.14);}
.topbar-notification-item.is-success .topbar-notification-dot{background:rgba(31,157,99,.12);}
.topbar-notification-item.is-ai .topbar-notification-dot{background:rgba(124,77,255,.12);}
.topbar-notification-copy strong{
  display:block;
  font-size:15px;
  line-height:1.2;
  color:#0b2f26;
}
.topbar-notification-copy small{
  display:block;
  margin-top:4px;
  color:#5f6c7b;
  line-height:1.35;
  font-weight:700;
}
.topbar-notification-empty{
  padding:22px;
  text-align:center;
  border:1px dashed #dce5dd;
  border-radius:18px;
  background:#f8fbf8;
  color:#64748b;
  font-weight:800;
}
.topbar-notification-empty strong{
  display:block;
  color:#0b2f26;
  font-size:17px;
  margin-bottom:4px;
}
.topbar-notification-empty small{
  display:block;
  color:#6b7280;
  font-weight:700;
  line-height:1.4;
}
@media(max-width:640px){
  .topbar-notification-panel{
    right:auto;
    left:50%;
    transform:translateX(-50%);
    width:min(360px,calc(100vw - 28px));
  }
  .topbar-notification-panel::before{right:calc(50% - 9px);}
  .topbar-notification-list{max-height:55vh;}
}

/* STEP 073 — Impostazioni: Sicurezza account base */
.settings-security-panel .settings-section-header {
  align-items: flex-start;
}

.settings-security-summary {
  margin-top: 26px;
}

.settings-security-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(15, 122, 79, 0.2);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(15, 122, 79, 0.1), rgba(255, 255, 255, 0.96));
  box-shadow: 0 18px 38px rgba(11, 47, 38, 0.08);
}

.settings-security-avatar {
  width: 70px;
  height: 70px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: #0b4a38;
  color: #ffffff;
  font-weight: 900;
  font-size: 28px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 14px 32px rgba(11, 47, 38, 0.18);
  flex: 0 0 auto;
}

.settings-security-main h3 {
  margin: 4px 0 10px;
  font-size: 24px;
  color: var(--color-text);
  word-break: break-word;
}

.settings-security-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-security-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.settings-security-facts article {
  padding: 16px;
  border: 1px solid rgba(11, 47, 38, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
}

.settings-security-facts span {
  display: block;
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 6px;
}

.settings-security-facts strong {
  display: block;
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.3;
  word-break: break-word;
}

.settings-security-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 26px;
}

.settings-security-action {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(11, 47, 38, 0.12);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.05);
}

.settings-security-action-icon {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: rgba(15, 122, 79, 0.1);
  font-size: 21px;
}

.settings-security-action strong {
  display: block;
  color: var(--color-text);
  font-size: 17px;
  margin-bottom: 4px;
}

.settings-security-action small {
  display: block;
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.35;
}

.settings-security-action-danger {
  border-color: rgba(240, 68, 68, 0.18);
  background: linear-gradient(135deg, rgba(240, 68, 68, 0.06), #ffffff);
}

.settings-security-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 24px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(15, 122, 79, 0.18);
  background: rgba(15, 122, 79, 0.07);
  color: #254236;
}

.settings-security-note span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: rgba(15, 122, 79, 0.12);
  color: #0f7a4f;
  font-weight: 900;
}

.settings-security-note p {
  margin: 0;
  line-height: 1.45;
  font-weight: 700;
}

@media (max-width: 980px) {
  .settings-security-facts,
  .settings-security-grid {
    grid-template-columns: 1fr;
  }

  .settings-security-action {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .settings-security-action .badge {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 640px) {
  .settings-security-card {
    align-items: flex-start;
    padding: 18px;
  }

  .settings-security-avatar {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    font-size: 23px;
  }

  .settings-security-main h3 {
    font-size: 20px;
  }
}


/* STEP 074 — Impostazioni: Dati e privacy base */
.settings-privacy-panel .settings-section-header {
  align-items: flex-start;
}

.settings-privacy-summary {
  margin-top: 26px;
}

.settings-privacy-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(15, 122, 79, 0.2);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(15, 122, 79, 0.1), rgba(255, 255, 255, 0.96));
  box-shadow: 0 18px 38px rgba(11, 47, 38, 0.08);
}

.settings-privacy-avatar {
  width: 70px;
  height: 70px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: #0b4a38;
  color: #ffffff;
  font-weight: 900;
  font-size: 28px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 14px 32px rgba(11, 47, 38, 0.18);
  flex: 0 0 auto;
}

.settings-privacy-main h3 {
  margin: 4px 0 10px;
  font-size: 24px;
  color: var(--color-text);
  word-break: break-word;
}

.settings-privacy-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-privacy-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.settings-privacy-facts article {
  padding: 16px;
  border: 1px solid rgba(11, 47, 38, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
}

.settings-privacy-facts span {
  display: block;
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 6px;
}

.settings-privacy-facts strong {
  display: block;
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.3;
  word-break: break-word;
}

.settings-privacy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 26px;
}

.settings-privacy-action {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(11, 47, 38, 0.12);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.05);
}

.settings-privacy-action-icon {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: rgba(15, 122, 79, 0.1);
  font-size: 21px;
}

.settings-privacy-action strong {
  display: block;
  color: var(--color-text);
  font-size: 17px;
  margin-bottom: 4px;
}

.settings-privacy-action small {
  display: block;
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.35;
}

.settings-privacy-action-danger {
  border-color: rgba(240, 68, 68, 0.18);
  background: linear-gradient(135deg, rgba(240, 68, 68, 0.06), #ffffff);
}

.settings-privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 24px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(15, 122, 79, 0.18);
  background: rgba(15, 122, 79, 0.07);
  color: #254236;
}

.settings-privacy-note span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: rgba(15, 122, 79, 0.12);
  color: #0f7a4f;
  font-weight: 900;
}

.settings-privacy-note p {
  margin: 0;
  line-height: 1.45;
  font-weight: 700;
}

@media (max-width: 980px) {
  .settings-privacy-facts,
  .settings-privacy-grid {
    grid-template-columns: 1fr;
  }

  .settings-privacy-action {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .settings-privacy-action .badge {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 640px) {
  .settings-privacy-card {
    align-items: flex-start;
    padding: 18px;
  }

  .settings-privacy-avatar {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    font-size: 23px;
  }

  .settings-privacy-main h3 {
    font-size: 20px;
  }
}

/* STEP 075 — Impostazioni: Moduli attivi base */
.settings-modules-panel .settings-section-header {
  align-items: flex-start;
}

.settings-modules-summary {
  margin-top: 26px;
}

.settings-modules-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(47, 128, 237, 0.2);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(47, 128, 237, 0.1), rgba(255, 255, 255, 0.96));
  box-shadow: 0 18px 38px rgba(11, 47, 38, 0.08);
}

.settings-modules-avatar {
  width: 70px;
  height: 70px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: #0b4a38;
  color: #ffffff;
  font-weight: 900;
  font-size: 28px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 14px 32px rgba(11, 47, 38, 0.18);
  flex: 0 0 auto;
}

.settings-modules-main h3 {
  margin: 4px 0 10px;
  font-size: 24px;
  color: var(--color-text);
  word-break: break-word;
}

.settings-modules-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-modules-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.settings-modules-facts article {
  padding: 16px;
  border: 1px solid rgba(11, 47, 38, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
}

.settings-modules-facts span,
.settings-modules-counter-row span {
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 800;
}

.settings-modules-facts span {
  display: block;
  margin-bottom: 6px;
}

.settings-modules-facts strong {
  display: block;
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.3;
  word-break: break-word;
}

.settings-modules-counter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.settings-modules-counter-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border: 1px solid rgba(11, 47, 38, 0.1);
  border-radius: 999px;
  background: #ffffff;
}

.settings-modules-counter-row strong {
  color: var(--color-text);
  font-size: 15px;
}

.settings-modules-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 26px;
}

.settings-module-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(11, 47, 38, 0.12);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.05);
}

.settings-module-card.is-active {
  border-color: rgba(31, 157, 99, 0.22);
  background: linear-gradient(135deg, rgba(31, 157, 99, 0.06), #ffffff);
}

.settings-module-card.is-included {
  border-color: rgba(47, 128, 237, 0.2);
  background: linear-gradient(135deg, rgba(47, 128, 237, 0.05), #ffffff);
}

.settings-module-card.is-premium {
  border-color: rgba(245, 158, 11, 0.22);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.06), #ffffff);
}

.settings-module-card.is-future {
  border-color: rgba(107, 114, 128, 0.18);
  background: linear-gradient(135deg, rgba(107, 114, 128, 0.06), #ffffff);
}

.settings-module-icon {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: rgba(15, 122, 79, 0.1);
  font-size: 21px;
}

.settings-module-card strong {
  display: block;
  color: var(--color-text);
  font-size: 17px;
  margin-bottom: 4px;
}

.settings-module-card small {
  display: block;
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.35;
}

.settings-modules-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 24px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(47, 128, 237, 0.18);
  background: rgba(47, 128, 237, 0.07);
  color: #25364d;
}

.settings-modules-note span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: rgba(47, 128, 237, 0.12);
  color: #2f80ed;
  font-weight: 900;
}

.settings-modules-note p {
  margin: 0;
  line-height: 1.45;
  font-weight: 700;
}

@media (max-width: 980px) {
  .settings-modules-facts,
  .settings-modules-list {
    grid-template-columns: 1fr;
  }

  .settings-module-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .settings-module-card .badge {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 640px) {
  .settings-modules-card {
    align-items: flex-start;
    padding: 18px;
  }

  .settings-modules-avatar {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    font-size: 23px;
  }

  .settings-modules-main h3 {
    font-size: 20px;
  }
}

/* STEP 076 — Lingua e valuta: riepilogo più chiaro */
.settings-locale-card .card-header .muted{
  max-width:760px;
}
.settings-locale-summary .settings-mini-state strong{
  word-break:break-word;
}
@media(max-width:1100px){
  .settings-locale-summary{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

/* STEP 077 — Impostazioni: Budget predefiniti più chiari */
.settings-budget-panel .settings-section-header {
  align-items: flex-start;
}

.settings-budget-summary {
  margin-top: 26px;
}

.settings-budget-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(15, 122, 79, 0.2);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(15, 122, 79, 0.1), rgba(255, 255, 255, 0.96));
  box-shadow: 0 18px 38px rgba(11, 47, 38, 0.08);
}

.settings-budget-avatar {
  width: 70px;
  height: 70px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: #0b4a38;
  color: #ffffff;
  font-weight: 900;
  font-size: 28px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 14px 32px rgba(11, 47, 38, 0.18);
  flex: 0 0 auto;
}

.settings-budget-main h3 {
  margin: 4px 0 10px;
  font-size: 24px;
  color: var(--color-text);
  word-break: break-word;
}

.settings-budget-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-budget-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.settings-budget-facts article {
  padding: 16px;
  border: 1px solid rgba(11, 47, 38, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
}

.settings-budget-facts span,
.settings-budget-category-amount span {
  display: block;
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 800;
}

.settings-budget-facts span {
  margin-bottom: 6px;
}

.settings-budget-facts strong {
  display: block;
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.3;
  word-break: break-word;
}

.settings-budget-education,
.settings-budget-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 24px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(15, 122, 79, 0.16);
  background: rgba(15, 122, 79, 0.07);
  color: #174636;
}

.settings-budget-note {
  border-color: rgba(47, 128, 237, 0.18);
  background: rgba(47, 128, 237, 0.07);
  color: #25364d;
}

.settings-budget-education span,
.settings-budget-note span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: rgba(15, 122, 79, 0.12);
  color: #0f7a4f;
  font-weight: 900;
}

.settings-budget-note span {
  background: rgba(47, 128, 237, 0.12);
  color: #2f80ed;
}

.settings-budget-education p,
.settings-budget-note p {
  margin: 0;
  line-height: 1.45;
  font-weight: 700;
}

.settings-budget-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 24px;
}

.settings-budget-category {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(11, 47, 38, 0.12);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.05);
}

.settings-budget-category.is-configured {
  border-color: rgba(31, 157, 99, 0.22);
  background: linear-gradient(135deg, rgba(31, 157, 99, 0.06), #ffffff);
}

.settings-budget-category.is-missing {
  border-color: rgba(245, 158, 11, 0.22);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.06), #ffffff);
}

.settings-budget-category.is-inactive {
  border-color: rgba(107, 114, 128, 0.18);
  background: linear-gradient(135deg, rgba(107, 114, 128, 0.06), #ffffff);
}

.settings-budget-category-icon {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: rgba(15, 122, 79, 0.1);
  font-size: 21px;
}

.settings-budget-category-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.settings-budget-category-title strong {
  display: block;
  color: var(--color-text);
  font-size: 17px;
}

.settings-budget-category-main small {
  display: block;
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.35;
}

.settings-budget-category-amount {
  min-width: 170px;
  text-align: right;
}

.settings-budget-category-amount strong {
  display: block;
  margin-top: 4px;
  color: var(--color-text);
  font-size: 18px;
}

.settings-budget-empty {
  padding: 18px;
  border: 1px dashed rgba(11, 47, 38, 0.18);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.8);
}

.settings-budget-empty strong,
.settings-budget-empty span {
  display: block;
}

.settings-budget-empty strong {
  margin-bottom: 6px;
  color: var(--color-text);
}

.settings-budget-empty span {
  color: var(--color-text-muted);
  font-weight: 700;
  line-height: 1.45;
}

@media (max-width: 980px) {
  .settings-budget-facts {
    grid-template-columns: 1fr;
  }

  .settings-budget-category {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .settings-budget-category-amount {
    grid-column: 2;
    min-width: 0;
    text-align: left;
  }
}

@media (max-width: 640px) {
  .settings-budget-hero {
    align-items: flex-start;
    padding: 18px;
  }

  .settings-budget-avatar {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    font-size: 23px;
  }

  .settings-budget-main h3 {
    font-size: 20px;
  }
}

/* STEP 078 — Impostazioni: Scadenze e promemoria più chiari */
.settings-reminders-summary {
  margin-top: 26px;
}

.settings-reminders-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(15, 122, 79, 0.2);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(15, 122, 79, 0.1), rgba(255, 255, 255, 0.96));
  box-shadow: 0 18px 38px rgba(11, 47, 38, 0.08);
}

.settings-reminders-avatar {
  width: 70px;
  height: 70px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: #0b4a38;
  color: #ffffff;
  font-weight: 900;
  font-size: 28px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 14px 32px rgba(11, 47, 38, 0.18);
  flex: 0 0 auto;
}

.settings-reminders-main h3 {
  margin: 4px 0 10px;
  font-size: 24px;
  color: var(--color-text);
  word-break: break-word;
}

.settings-reminders-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-reminders-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.settings-reminders-facts article {
  padding: 16px;
  border: 1px solid rgba(11, 47, 38, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
}

.settings-reminders-facts span {
  display: block;
  margin-bottom: 6px;
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 800;
}

.settings-reminders-facts strong {
  display: block;
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.3;
  word-break: break-word;
}

.settings-reminders-education,
.settings-reminders-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 24px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(15, 122, 79, 0.16);
  background: rgba(15, 122, 79, 0.07);
  color: #174636;
}

.settings-reminders-note {
  border-color: rgba(47, 128, 237, 0.18);
  background: rgba(47, 128, 237, 0.07);
  color: #25364d;
}

.settings-reminders-education span,
.settings-reminders-note span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: rgba(15, 122, 79, 0.12);
  color: #0f7a4f;
  font-weight: 900;
}

.settings-reminders-note span {
  background: rgba(47, 128, 237, 0.12);
  color: #2f80ed;
}

.settings-reminders-education p,
.settings-reminders-note p {
  margin: 0;
  line-height: 1.45;
  font-weight: 700;
}

.settings-reminders-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 24px;
}

.settings-reminders-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(11, 47, 38, 0.12);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.05);
}

.settings-reminders-item.is-active {
  border-color: rgba(31, 157, 99, 0.22);
  background: linear-gradient(135deg, rgba(31, 157, 99, 0.06), #ffffff);
}

.settings-reminders-item.is-prepared {
  border-color: rgba(47, 128, 237, 0.22);
  background: linear-gradient(135deg, rgba(47, 128, 237, 0.06), #ffffff);
}

.settings-reminders-item.is-future {
  border-color: rgba(245, 158, 11, 0.22);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.06), #ffffff);
}

.settings-reminders-item-icon {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: rgba(15, 122, 79, 0.1);
  font-size: 21px;
}

.settings-reminders-item-title,
.settings-reminders-upcoming-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.settings-reminders-item-title strong,
.settings-reminders-upcoming-head strong {
  display: block;
  color: var(--color-text);
  font-size: 17px;
}

.settings-reminders-item-main small {
  display: block;
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.35;
}

.settings-reminders-upcoming {
  padding: 18px;
  border: 1px solid rgba(11, 47, 38, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
}

.settings-reminders-upcoming-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid rgba(11, 47, 38, 0.08);
}

.settings-reminders-upcoming-row span {
  color: var(--color-text);
  font-weight: 800;
}

.settings-reminders-upcoming-row strong {
  color: var(--color-text-muted);
  font-size: 14px;
  text-align: right;
}

.settings-reminders-upcoming p,
.settings-reminders-warning {
  margin: 10px 0 0;
  color: var(--color-text-muted);
  font-weight: 700;
  line-height: 1.45;
}

.settings-reminders-warning {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(245, 158, 11, 0.22);
  background: rgba(245, 158, 11, 0.08);
  color: #7a4a05;
}

@media (max-width: 980px) {
  .settings-reminders-facts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .settings-reminders-hero {
    align-items: flex-start;
    padding: 18px;
  }

  .settings-reminders-avatar {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    font-size: 23px;
  }

  .settings-reminders-main h3 {
    font-size: 20px;
  }

  .settings-reminders-upcoming-row {
    display: block;
  }

  .settings-reminders-upcoming-row strong {
    display: block;
    margin-top: 4px;
    text-align: left;
  }
}

/* STEP 080 — Impostazioni: Categorie e sottocategorie riepilogo migliorato */
.settings-category-summary {
  margin-top: 26px;
}

.settings-categories-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(15, 122, 79, 0.2);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(15, 122, 79, 0.1), rgba(255, 255, 255, 0.96));
  box-shadow: 0 18px 38px rgba(11, 47, 38, 0.08);
}

.settings-categories-avatar {
  width: 70px;
  height: 70px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: #0b4a38;
  color: #ffffff;
  font-weight: 900;
  font-size: 28px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 14px 32px rgba(11, 47, 38, 0.18);
  flex: 0 0 auto;
}

.settings-categories-main h3 {
  margin: 4px 0 10px;
  font-size: 24px;
  color: var(--color-text);
  word-break: break-word;
}

.settings-categories-badges,
.settings-categories-counter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-categories-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.settings-categories-facts article {
  padding: 16px;
  border: 1px solid rgba(11, 47, 38, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
}

.settings-categories-facts span {
  display: block;
  margin-bottom: 6px;
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 800;
}

.settings-categories-facts strong {
  display: block;
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.3;
  word-break: break-word;
}

.settings-categories-counter-row {
  margin-top: 14px;
}

.settings-categories-counter-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border: 1px solid rgba(11, 47, 38, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 800;
}

.settings-categories-counter-row strong {
  color: var(--color-text);
}

.settings-category-education-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 24px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(15, 122, 79, 0.16);
  background: rgba(15, 122, 79, 0.07);
  color: #174636;
}

.settings-category-education-note span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: rgba(15, 122, 79, 0.12);
  color: #0f7a4f;
  font-weight: 900;
}

.settings-category-education-note p {
  margin: 0;
  line-height: 1.45;
  font-weight: 700;
}

/* STEP 080A — Fix spaziatura card Categorie e azioni */
.settings-category-education-note + .settings-actions-row {
  margin-top: 24px;
}

.settings-category-section .settings-actions-row {
  row-gap: 12px;
}

@media (max-width: 980px) {
  .settings-categories-facts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .settings-categories-hero {
    align-items: flex-start;
    padding: 18px;
  }

  .settings-categories-avatar {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    font-size: 23px;
  }

  .settings-categories-main h3 {
    font-size: 20px;
  }
}


/* STEP 080B — Fix card riepilogo Categorie senza stile pillola */
.settings-category-summary .settings-categories-facts article {
  border: 1px solid rgba(11, 47, 38, 0.2);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbf8 100%);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.settings-category-summary .settings-categories-facts article:hover {
  border-color: rgba(15, 122, 79, 0.28);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.11);
}

.settings-category-summary .settings-categories-facts span {
  color: #4b5f58;
}

.settings-category-summary .settings-categories-facts strong {
  color: #062f23;
  font-weight: 900;
}

.settings-categories-counter-row {
  gap: 12px;
}

.settings-categories-counter-row span {
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid rgba(11, 47, 38, 0.18);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbf9 100%);
  color: #34443f;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.07);
}

.settings-categories-counter-row strong {
  color: #062f23;
  font-weight: 900;
}

@media (max-width: 760px) {
  .settings-categories-counter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .settings-categories-counter-row span {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .settings-categories-counter-row {
    grid-template-columns: 1fr;
  }
}

/* STEP 081 — Audit UI Impostazioni: niente effetto pillola e card più visibili */
.settings-layout .badge,
.settings-layout .card .badge,
.settings-layout .settings-section-header .badge,
.settings-layout .settings-module-card .badge,
.settings-layout .settings-security-action .badge,
.settings-layout .settings-privacy-action .badge,
.settings-layout .settings-notification-channel .badge,
.settings-layout .settings-categories-badges .badge,
.settings-layout .settings-modules-badges .badge,
.settings-layout .settings-security-badges .badge,
.settings-layout .settings-privacy-badges .badge,
.settings-layout .settings-reminders-badges .badge,
.settings-layout .settings-budget-badges .badge{
  border-radius:11px!important;
  border:1px solid currentColor;
  padding:7px 10px!important;
  box-shadow:0 8px 16px rgba(15,23,42,.045);
}

.settings-layout .btn,
.settings-layout .settings-account-manage-btn,
.settings-layout .settings-profile-choice,
.settings-layout .settings-account-choice,
.settings-layout .settings-notification-option{
  border-radius:14px!important;
}

.settings-layout .settings-mini-state,
.settings-layout .settings-profile-info-card,
.settings-layout .settings-member-card,
.settings-layout .settings-account-preference-panel,
.settings-layout .settings-account-visibility-box,
.settings-layout .settings-account-overview-box,
.settings-layout .settings-account-manage-box,
.settings-layout .settings-account-methods-box,
.settings-layout .settings-account-education-note,
.settings-layout .settings-budget-facts article,
.settings-layout .settings-reminders-facts article,
.settings-layout .settings-categories-facts article,
.settings-layout .settings-modules-facts article,
.settings-layout .settings-security-facts article,
.settings-layout .settings-privacy-facts article,
.settings-layout .settings-module-card,
.settings-layout .settings-security-action,
.settings-layout .settings-privacy-action,
.settings-layout .settings-reminders-item,
.settings-layout .settings-reminders-upcoming,
.settings-layout .settings-budget-category,
.settings-layout .settings-notification-section,
.settings-layout .settings-notification-channel{
  border-color:rgba(11,47,38,.18)!important;
  border-radius:16px!important;
  background:linear-gradient(180deg,#ffffff 0%,#f7fbf8 100%)!important;
  box-shadow:0 16px 34px rgba(15,23,42,.075)!important;
}

.settings-layout .settings-mini-state,
.settings-layout .settings-profile-info-card,
.settings-layout .settings-budget-facts article,
.settings-layout .settings-reminders-facts article,
.settings-layout .settings-categories-facts article,
.settings-layout .settings-modules-facts article,
.settings-layout .settings-security-facts article,
.settings-layout .settings-privacy-facts article{
  min-height:92px;
}

.settings-layout .settings-mini-state strong,
.settings-layout .settings-profile-info-card strong,
.settings-layout .settings-budget-facts strong,
.settings-layout .settings-reminders-facts strong,
.settings-layout .settings-categories-facts strong,
.settings-layout .settings-modules-facts strong,
.settings-layout .settings-security-facts strong,
.settings-layout .settings-privacy-facts strong{
  color:#062f23!important;
  font-weight:900!important;
}

.settings-layout .settings-mini-state span,
.settings-layout .settings-profile-info-card small,
.settings-layout .settings-budget-facts span,
.settings-layout .settings-reminders-facts span,
.settings-layout .settings-categories-facts span,
.settings-layout .settings-modules-facts span,
.settings-layout .settings-security-facts span,
.settings-layout .settings-privacy-facts span{
  color:#455a52!important;
  font-weight:800!important;
}

.settings-layout .settings-modules-counter-row span,
.settings-layout .settings-categories-counter-row span{
  min-height:48px;
  padding:11px 14px!important;
  border:1px solid rgba(11,47,38,.18)!important;
  border-radius:14px!important;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbf9 100%)!important;
  box-shadow:0 12px 26px rgba(15,23,42,.07)!important;
  color:#34443f!important;
}

.settings-layout .settings-modules-counter-row strong,
.settings-layout .settings-categories-counter-row strong{
  color:#062f23!important;
  font-weight:900!important;
}

.settings-layout .settings-budget-education,
.settings-layout .settings-budget-note,
.settings-layout .settings-reminders-education,
.settings-layout .settings-reminders-note,
.settings-layout .settings-category-education-note,
.settings-layout .settings-modules-note,
.settings-layout .settings-security-note,
.settings-layout .settings-privacy-note,
.settings-layout .settings-account-education-note,
.settings-layout .settings-profile-note{
  border-radius:16px!important;
  border-color:rgba(11,47,38,.18)!important;
  box-shadow:0 14px 30px rgba(15,23,42,.055)!important;
}

.settings-layout .settings-budget-hero,
.settings-layout .settings-reminders-hero,
.settings-layout .settings-categories-hero,
.settings-layout .settings-modules-card,
.settings-layout .settings-security-card,
.settings-layout .settings-privacy-card,
.settings-layout .settings-profile-hero{
  border-radius:18px!important;
  border-color:rgba(11,47,38,.20)!important;
  box-shadow:0 18px 40px rgba(11,47,38,.09)!important;
}

.settings-layout .settings-budget-avatar,
.settings-layout .settings-reminders-avatar,
.settings-layout .settings-categories-avatar,
.settings-layout .settings-modules-avatar,
.settings-layout .settings-security-avatar,
.settings-layout .settings-privacy-avatar,
.settings-layout .settings-profile-avatar,
.settings-layout .settings-member-avatar,
.settings-layout .settings-module-icon,
.settings-layout .settings-security-action-icon,
.settings-layout .settings-privacy-action-icon,
.settings-layout .settings-reminders-item-icon,
.settings-layout .settings-budget-category-icon,
.settings-layout .settings-subsection-icon,
.settings-layout .settings-notification-icon{
  border-radius:14px!important;
}

@media(max-width:760px){
  .settings-layout .settings-mini-state,
  .settings-layout .settings-profile-info-card,
  .settings-layout .settings-budget-facts article,
  .settings-layout .settings-reminders-facts article,
  .settings-layout .settings-categories-facts article,
  .settings-layout .settings-modules-facts article,
  .settings-layout .settings-security-facts article,
  .settings-layout .settings-privacy-facts article{
    min-height:auto;
  }
}

/* STEP 082 — Audit UI globale Famyro: contrasto card e componenti non a pillola
   Fix solo CSS: rende più visibili le card chiare e trasforma bottoni/badge/contatori troppo arrotondati
   in elementi rettangolari premium con angoli moderati. Non modifica logiche operative. */
:root{
  --famyro-card-visible-border: rgba(11, 47, 38, .18);
  --famyro-card-visible-shadow: 0 16px 34px rgba(15, 23, 42, .078);
  --famyro-card-visible-bg: linear-gradient(180deg, #ffffff 0%, #f8fbf9 100%);
  --famyro-radius-card-premium: 16px;
  --famyro-radius-control-premium: 13px;
}

/* Card chiare: più separate dallo sfondo globale senza appesantire la UI. */
.card,
.auth-card,
.hero-card,
.quick-sheet,
.family-summary-grid div,
.family-member-row,
.family-role-list > div,
.patrimonio-kpi-card,
.patrimonio-card,
.debiti-kpi-card,
.debiti-card,
.report-card,
.ai-panel,
.ai-insight-item,
.budget-summary-card,
.budget-table td,
.due-card,
.due-date-box,
.goals-card,
.goal-card,
.settings-layout .card{
  border-color: var(--famyro-card-visible-border) !important;
  box-shadow: var(--famyro-card-visible-shadow) !important;
}

/* Bottoni e controlli: rettangolari premium, non pillole. */
.btn,
.topbar-pill,
.topbar-pill-primary,
.topbar-pill-secondary,
.topbar-profile-arrow,
.topbar-notification-head button,
.form-message-close,
.due-date-today,
.movement-choice-pill,
.sidebar-promo-btn,
.auth-card .btn,
.landing-nav .btn,
.quick-sheet .btn{
  border-radius: var(--famyro-radius-control-premium) !important;
}

/* Badge, tag e stati: mantengono compattezza ma perdono l'effetto pillola. */
.badge,
.budget-status-pill,
.category-type-pill,
.due-month-pill,
.due-status-badge,
.family-you-pill,
.family-role-pill,
.family-role-list > div::after,
.family-prepared-badge,
.goal-priority-badge,
.movement-real-badge,
.settings-member-meta span,
.settings-member-lock,
.settings-modules-counter-row span,
.settings-categories-counter-row span{
  border-radius: 11px !important;
  border-color: rgba(11, 47, 38, .16) !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .045) !important;
}

/* Contatori/riepiloghi compatti: mini-card rettangolari premium su tutta la piattaforma. */
.settings-modules-counter-row span,
.settings-categories-counter-row span,
.family-member-meta span,
.settings-member-meta span{
  background: var(--famyro-card-visible-bg) !important;
  color: #34443f !important;
}

/* Indicatori decorativi interni alle card: meno tondeggianti, più coerenti con lo stile rettangolare. */
.budget-summary-card::after,
.due-kpi::after,
.goals-kpi::after,
.patrimonio-kpi-card::after,
.debiti-kpi-card::after,
.report-kpi::after,
.settings-language-option::after,
.settings-currency-option::after{
  border-radius: 26px !important;
}

/* Barre/progress e dot restano funzionali, ma con angolo meno estremo dove visivamente sembrano pillole. */
.budget-progress-track,
.budget-progress-track span,
.goal-progress-line,
.report-progress,
.report-trend-bars span{
  border-radius: 8px !important;
}

/* Mantieni intatti toggle switch e scrollbar: sono controlli funzionali, non card o bottoni. */
.toggle-switch,
.toggle-switch span,
.settings-notification-switch,
.settings-notification-switch span,
.premium-modal-scroll::-webkit-scrollbar-thumb,
.movement-modal-card::-webkit-scrollbar-thumb,
.movement-editor-scroll::-webkit-scrollbar-thumb,
.family-invite-scroll::-webkit-scrollbar-thumb,
.patrimonio-modal-scroll::-webkit-scrollbar-thumb{
  /* nessun override intenzionale */
}

/* STEP 082A — KPI globali senza decorazioni
   Uniforma le KPI Famyro eliminando rettangoli, cerchi e pseudo-elementi decorativi laterali.
   Le KPI restano colorate, piene, leggibili e premium, senza elementi grafici aggiuntivi. */
.kpi-card,
.movement-summary-card,
.account-hero-card,
.budget-kpi-card,
.budget-summary-card,
.due-kpi,
.goals-kpi,
.family-kpi-card,
.patrimonio-kpi-card,
.debiti-kpi-card,
.report-kpi {
  overflow: hidden;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .15) !important;
}

.kpi-card::before,
.kpi-card::after,
.movement-summary-card::before,
.movement-summary-card::after,
.account-hero-card::before,
.account-hero-card::after,
.budget-kpi-card::before,
.budget-kpi-card::after,
.budget-summary-card::before,
.budget-summary-card::after,
.due-kpi::before,
.due-kpi::after,
.goals-kpi::before,
.goals-kpi::after,
.family-kpi-card::before,
.family-kpi-card::after,
.patrimonio-kpi-card::before,
.patrimonio-kpi-card::after,
.patrimonio-kpi-main::before,
.patrimonio-kpi-main::after,
.debiti-kpi-card::before,
.debiti-kpi-card::after,
.debiti-kpi-main::before,
.debiti-kpi-main::after,
.report-kpi::before,
.report-kpi::after {
  content: none !important;
  display: none !important;
}

.kpi-card > *,
.movement-summary-card > *,
.account-hero-card > *,
.budget-kpi-card > *,
.budget-summary-card > *,
.due-kpi > *,
.goals-kpi > *,
.family-kpi-card > *,
.patrimonio-kpi-card > *,
.debiti-kpi-card > *,
.report-kpi > * {
  position: relative;
  z-index: 1;
}

/* STEP 083 — Report: KPI subito sotto topbar e importi uniformi */
.report-page-content{
  gap:20px;
}

.report-page-content .report-kpi-grid{
  order:1;
  margin-top:0;
}

.report-page-content .report-toolbar{
  order:2;
}

.report-page-content .form-message{
  order:3;
}

.report-page-content .report-grid{
  order:4;
}

.report-toolbar-compact{
  padding:18px 22px;
  align-items:center;
}

.report-toolbar-compact h2{
  font-size:22px;
  margin-bottom:4px;
}

.report-toolbar-compact .muted{
  font-size:15px;
}

.report-kpi{
  min-height:132px;
  border-radius:18px;
  box-shadow:0 18px 38px rgba(15,23,42,.13);
}

.report-kpi::after{
  content:none!important;
  display:none!important;
}

.report-kpi strong{
  display:block;
  white-space:nowrap;
  letter-spacing:-.055em;
  font-variant-numeric:tabular-nums;
}

.report-kpi strong .currency-decimals-enhanced{
  display:inline!important;
  white-space:nowrap!important;
  letter-spacing:-.055em!important;
}

.report-kpi strong .currency-decimals{
  display:inline!important;
  font-size:.46em!important;
  line-height:1!important;
  margin-left:-.035em!important;
  letter-spacing:-.04em!important;
  vertical-align:baseline!important;
}

@media(max-width:900px){
  .report-toolbar-compact{
    align-items:flex-start;
  }
}

/* STEP 086 — Admin SaaS: centro di controllo globale base
   Layout premium, KPI subito sotto topbar, card visibili su sfondo chiaro,
   componenti rettangolari con angoli moderati e nessun controllo nativo. */
body[data-page="admin"] .admin-saas-page{
  display:grid;
  gap:22px;
}
body[data-page="admin"] .admin-kpi-grid{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:16px;
  margin:0;
}
body[data-page="admin"] .admin-kpi-card{
  min-height:156px;
  border:1px solid rgba(255,255,255,.22);
  border-radius:18px;
  padding:20px;
  color:#fff;
  box-shadow:0 16px 34px rgba(15,23,42,.12);
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  overflow:hidden;
  position:relative;
}
body[data-page="admin"] .admin-kpi-card::after{
  content:"";
  position:absolute;
  width:92px;
  height:92px;
  right:-34px;
  top:-28px;
  border-radius:28px;
  background:rgba(255,255,255,.13);
  transform:rotate(10deg);
}
body[data-page="admin"] .admin-kpi-card span{
  position:relative;
  z-index:1;
  font-size:14px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:rgba(255,255,255,.88);
}
body[data-page="admin"] .admin-kpi-card strong{
  position:relative;
  z-index:1;
  font-size:44px;
  line-height:1;
  letter-spacing:-.04em;
  color:#fff;
}
body[data-page="admin"] .admin-kpi-card small{
  position:relative;
  z-index:1;
  color:rgba(255,255,255,.86);
  font-weight:750;
  line-height:1.35;
}
body[data-page="admin"] .admin-kpi-card-forest{background:linear-gradient(135deg,#0B2F26,#095B3A)}
body[data-page="admin"] .admin-kpi-card-green{background:linear-gradient(135deg,#0F7A4F,#1F9D63)}
body[data-page="admin"] .admin-kpi-card-blue{background:linear-gradient(135deg,#1D4ED8,#2F80ED)}
body[data-page="admin"] .admin-kpi-card-purple{background:linear-gradient(135deg,#5B35D5,#7C4DFF)}
body[data-page="admin"] .admin-kpi-card-red{background:linear-gradient(135deg,#B42318,#F04444)}
body[data-page="admin"] .admin-kpi-card-status{background:linear-gradient(135deg,#0F5E4A,#0B2F26)}

body[data-page="admin"] .admin-control-grid{
  display:grid;
  grid-template-columns:minmax(0,1.45fr) minmax(340px,.75fr);
  gap:20px;
}
body[data-page="admin"] .admin-panel{
  background:linear-gradient(180deg,#FDFEFB,#EEF7F0);
  border:1px solid #C8DCCE;
  border-radius:18px;
  box-shadow:0 14px 32px rgba(15,23,42,.085);
  padding:22px;
  min-width:0;
}
body[data-page="admin"] .admin-panel-large{
  grid-column:auto;
}
body[data-page="admin"] .admin-panel-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:14px;
}
body[data-page="admin"] .admin-eyebrow{
  margin:0 0 5px;
  color:#64748B;
  font-size:12px;
  font-weight:900;
  letter-spacing:.13em;
  text-transform:uppercase;
}
body[data-page="admin"] .admin-panel h2{
  margin:0;
  font-size:23px;
  line-height:1.1;
  color:#0B2F26;
}
body[data-page="admin"] .admin-panel-copy{
  margin:0 0 16px;
  color:#526174;
  font-weight:650;
}
body[data-page="admin"] .admin-status-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:30px;
  border-radius:10px;
  padding:6px 10px;
  font-size:12px;
  font-weight:900;
  letter-spacing:.02em;
  white-space:nowrap;
  border:1px solid transparent;
}
body[data-page="admin"] .admin-status-chip-ready{
  color:#0F5E4A;
  background:#DCF7E8;
  border-color:#B7E6C9;
}
body[data-page="admin"] .admin-status-chip-info{
  color:#1D4ED8;
  background:#E6F0FF;
  border-color:#BBD3FF;
}
body[data-page="admin"] .admin-status-chip-warning{
  color:#92400E;
  background:#FFF1D6;
  border-color:#F7D28A;
}
body[data-page="admin"] .admin-table-shell{
  border:1px solid #CFE0D3;
  border-radius:16px;
  overflow:auto;
  background:#F8FCF8;
}
body[data-page="admin"] .admin-table{
  min-width:760px;
  background:#F8FCF8;
}
body[data-page="admin"] .admin-table th{
  background:#EAF4EC;
  color:#455366;
  font-size:13px;
  font-weight:900;
  letter-spacing:.04em;
  text-transform:uppercase;
}
body[data-page="admin"] .admin-table td{
  background:rgba(255,255,255,.58);
  color:#253041;
  font-weight:650;
}
body[data-page="admin"] .admin-table tbody tr:nth-child(even) td{
  background:#F0F8F1;
}
body[data-page="admin"] .admin-plan-list,
body[data-page="admin"] .admin-check-list,
body[data-page="admin"] .admin-system-list{
  display:grid;
  gap:12px;
}
body[data-page="admin"] .admin-plan-item,
body[data-page="admin"] .admin-system-item,
body[data-page="admin"] .admin-check-item,
body[data-page="admin"] .admin-module-item{
  border:1px solid #CFE0D3;
  border-radius:14px;
  background:linear-gradient(180deg,#F9FDFA,#EDF6EF);
  box-shadow:0 8px 18px rgba(15,23,42,.055);
}
body[data-page="admin"] .admin-plan-item,
body[data-page="admin"] .admin-system-item{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding:14px;
}
body[data-page="admin"] .admin-plan-item strong,
body[data-page="admin"] .admin-system-item strong,
body[data-page="admin"] .admin-module-item strong{
  color:#0B2F26;
  font-size:16px;
}
body[data-page="admin"] .admin-plan-item p{
  margin:4px 0 0;
  color:#64748B;
  font-weight:650;
  line-height:1.35;
}
body[data-page="admin"] .admin-plan-item > span{
  color:#0F5E4A;
  font-size:13px;
  font-weight:900;
  white-space:nowrap;
}
body[data-page="admin"] .admin-module-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
body[data-page="admin"] .admin-module-item{
  padding:14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
body[data-page="admin"] .admin-module-item span{
  color:#526174;
  font-size:13px;
  font-weight:850;
  text-align:right;
}
body[data-page="admin"] .admin-ai-box{
  border:1px solid rgba(124,77,255,.28);
  border-radius:16px;
  background:linear-gradient(135deg,#F1ECFF,#F8F6FF);
  padding:20px;
  display:grid;
  gap:8px;
}
body[data-page="admin"] .admin-ai-box strong{
  color:#5B35D5;
  font-size:52px;
  line-height:1;
  letter-spacing:-.04em;
}
body[data-page="admin"] .admin-ai-box span{
  color:#0B2F26;
  font-weight:900;
}
body[data-page="admin"] .admin-ai-box p{
  margin:0;
  color:#64748B;
  font-weight:650;
}
body[data-page="admin"] .admin-check-item{
  display:grid;
  grid-template-columns:34px 1fr;
  gap:10px;
  align-items:center;
  padding:12px;
}
body[data-page="admin"] .admin-check-item span{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:10px;
  color:#0F5E4A;
  background:#DCF7E8;
  font-weight:1000;
}
body[data-page="admin"] .admin-check-item p{
  margin:0;
  color:#253041;
  font-weight:750;
  line-height:1.35;
}
body[data-page="admin"] .admin-system-item span{
  color:#64748B;
  font-weight:850;
}
body[data-page="admin"] .admin-system-item strong{
  text-align:right;
  font-size:14px;
}
@media(max-width:1280px){
  body[data-page="admin"] .admin-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  body[data-page="admin"] .admin-control-grid{grid-template-columns:1fr}
  body[data-page="admin"] .admin-module-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
  body[data-page="admin"] .admin-kpi-grid{grid-template-columns:1fr}
  body[data-page="admin"] .admin-module-grid{grid-template-columns:1fr}
  body[data-page="admin"] .admin-panel{padding:18px;border-radius:16px}
  body[data-page="admin"] .admin-panel-header{flex-direction:column}
  body[data-page="admin"] .admin-plan-item,
  body[data-page="admin"] .admin-module-item,
  body[data-page="admin"] .admin-system-item{flex-direction:column;align-items:flex-start}
  body[data-page="admin"] .admin-module-item span,
  body[data-page="admin"] .admin-system-item strong{text-align:left}
}

/* STEP 087 — Admin SaaS: struttura Famiglie preparatoria
   Sezione famiglie più operativa, pronta al collegamento dati futuro.
   Nessun controllo nativo, nessuna pillola, card visibili su sfondo chiaro. */
body[data-page="admin"] .admin-families-panel{
  grid-column:1 / -1;
}
body[data-page="admin"] .admin-family-summary{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin:16px 0;
}
body[data-page="admin"] .admin-family-summary-card{
  border:1px solid #C8DCCE;
  border-radius:14px;
  background:linear-gradient(180deg,#F2FAF4,#E5F2E9);
  box-shadow:0 10px 22px rgba(15,23,42,.07);
  padding:14px;
  display:grid;
  gap:5px;
}
body[data-page="admin"] .admin-family-summary-card span{
  color:#526174;
  font-size:12px;
  font-weight:900;
  letter-spacing:.07em;
  text-transform:uppercase;
}
body[data-page="admin"] .admin-family-summary-card strong{
  color:#0B2F26;
  font-size:30px;
  line-height:1;
  letter-spacing:-.03em;
}
body[data-page="admin"] .admin-family-summary-card small{
  color:#64748B;
  font-weight:750;
}
body[data-page="admin"] .admin-family-table-shell{
  border-color:#BFD8C6;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.68), 0 10px 24px rgba(15,23,42,.05);
}
body[data-page="admin"] .admin-family-table{
  min-width:1180px;
}
body[data-page="admin"] .admin-family-table th{
  padding:15px 14px;
}
body[data-page="admin"] .admin-family-table td{
  padding:16px 14px;
  vertical-align:middle;
}
body[data-page="admin"] .admin-family-name,
body[data-page="admin"] .admin-family-owner,
body[data-page="admin"] .admin-module-count{
  display:grid;
  gap:4px;
}
body[data-page="admin"] .admin-family-name strong,
body[data-page="admin"] .admin-family-owner strong,
body[data-page="admin"] .admin-module-count strong{
  color:#0B2F26;
  font-size:15px;
  line-height:1.15;
}
body[data-page="admin"] .admin-family-name span,
body[data-page="admin"] .admin-family-owner span,
body[data-page="admin"] .admin-module-count span,
body[data-page="admin"] .admin-last-activity{
  color:#64748B;
  font-size:13px;
  font-weight:750;
}
body[data-page="admin"] .admin-plan-tag{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:30px;
  border-radius:10px;
  padding:6px 10px;
  color:#0F5E4A;
  background:#DFF4E6;
  border:1px solid #B9E2C5;
  font-size:12px;
  font-weight:950;
  white-space:nowrap;
}
body[data-page="admin"] .admin-module-count strong{
  font-size:18px;
}
body[data-page="admin"] .admin-future-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
body[data-page="admin"] .admin-action-button{
  min-height:34px;
  border:1px solid #BFD8C6;
  border-radius:10px;
  padding:7px 10px;
  background:linear-gradient(180deg,#F2FAF4,#E5F2E9);
  color:#0B2F26;
  font-size:12px;
  font-weight:900;
  box-shadow:0 7px 16px rgba(15,23,42,.055);
  opacity:.72;
  cursor:not-allowed;
}
body[data-page="admin"] .admin-action-button:disabled{
  color:#425466;
}
@media(max-width:1280px){
  body[data-page="admin"] .admin-family-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
  body[data-page="admin"] .admin-family-summary{grid-template-columns:1fr}
  body[data-page="admin"] .admin-family-summary-card{padding:13px}
}

/* STEP 088 — Admin SaaS: struttura Piani e limiti preparatoria
   Piani SaaS leggibili, limiti chiari, moduli inclusi e azioni future disabilitate.
   Nessun controllo nativo, niente pillole, card con contrasto su sfondo chiaro. */
body[data-page="admin"] .admin-plans-panel{
  grid-column:1 / -1;
}
body[data-page="admin"] .admin-plan-summary{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:12px;
  margin:16px 0 18px;
}
body[data-page="admin"] .admin-plan-summary-card{
  border:1px solid #C3D8C8;
  border-radius:14px;
  background:linear-gradient(180deg,#F4FAF5,#E5F1E8);
  box-shadow:0 10px 22px rgba(15,23,42,.07);
  padding:14px;
  display:grid;
  gap:5px;
}
body[data-page="admin"] .admin-plan-summary-card span{
  color:#526174;
  font-size:12px;
  font-weight:900;
  letter-spacing:.07em;
  text-transform:uppercase;
}
body[data-page="admin"] .admin-plan-summary-card strong{
  color:#0B2F26;
  font-size:30px;
  line-height:1;
  letter-spacing:-.03em;
}
body[data-page="admin"] .admin-plan-summary-card small{
  color:#64748B;
  font-weight:750;
  line-height:1.25;
}
body[data-page="admin"] .admin-plan-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
}
body[data-page="admin"] .admin-plan-card{
  border:1px solid #BED6C4;
  border-radius:16px;
  background:linear-gradient(180deg,#F8FCF8,#EAF4EC);
  box-shadow:0 14px 28px rgba(15,23,42,.075);
  padding:16px;
  display:flex;
  flex-direction:column;
  gap:14px;
  min-width:0;
}
body[data-page="admin"] .admin-plan-card-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}
body[data-page="admin"] .admin-plan-card-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:28px;
  border-radius:9px;
  padding:6px 9px;
  background:#DFF4E6;
  border:1px solid #B9E2C5;
  color:#0F5E4A;
  font-size:12px;
  font-weight:950;
  letter-spacing:.02em;
}
body[data-page="admin"] .admin-plan-card h3{
  margin:10px 0 0;
  color:#0B2F26;
  font-size:24px;
  line-height:1.05;
  letter-spacing:-.02em;
}
body[data-page="admin"] .admin-plan-price{
  display:grid;
  gap:3px;
  text-align:right;
  color:#0B2F26;
}
body[data-page="admin"] .admin-plan-price strong{
  font-size:22px;
  line-height:1;
  letter-spacing:-.03em;
  white-space:nowrap;
}
body[data-page="admin"] .admin-plan-price span{
  color:#64748B;
  font-size:12px;
  font-weight:850;
  white-space:nowrap;
}
body[data-page="admin"] .admin-plan-note{
  margin:0;
  color:#526174;
  font-weight:700;
  line-height:1.42;
}
body[data-page="admin"] .admin-plan-limits{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
}
body[data-page="admin"] .admin-plan-limits div{
  border:1px solid #CFE0D3;
  border-radius:12px;
  background:linear-gradient(180deg,#F1F8F2,#E4F0E7);
  padding:10px;
  display:grid;
  gap:5px;
  min-width:0;
}
body[data-page="admin"] .admin-plan-limits span,
body[data-page="admin"] .admin-plan-modules > span{
  color:#64748B;
  font-size:12px;
  font-weight:900;
  letter-spacing:.06em;
  text-transform:uppercase;
}
body[data-page="admin"] .admin-plan-limits strong{
  color:#0B2F26;
  font-size:18px;
  line-height:1.05;
  overflow-wrap:anywhere;
}
body[data-page="admin"] .admin-plan-modules{
  display:grid;
  gap:9px;
}
body[data-page="admin"] .admin-plan-modules div{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}
body[data-page="admin"] .admin-plan-modules em{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  border-radius:9px;
  padding:6px 9px;
  background:#EEF7F0;
  border:1px solid #C8DCCE;
  color:#253041;
  font-size:12px;
  font-style:normal;
  font-weight:850;
}
body[data-page="admin"] .admin-plan-footer{
  margin-top:auto;
  padding-top:2px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
@media(max-width:1280px){
  body[data-page="admin"] .admin-plan-summary{grid-template-columns:repeat(3,minmax(0,1fr))}
  body[data-page="admin"] .admin-plan-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
  body[data-page="admin"] .admin-plan-summary,
  body[data-page="admin"] .admin-plan-grid{grid-template-columns:1fr}
  body[data-page="admin"] .admin-plan-card{padding:14px;border-radius:15px}
  body[data-page="admin"] .admin-plan-card-header{flex-direction:column}
  body[data-page="admin"] .admin-plan-price{text-align:left}
  body[data-page="admin"] .admin-plan-limits{grid-template-columns:1fr}
}

/* STEP 088B — Admin SaaS: Piani più sintetici e leggibili.
   Correzione UX: niente accozzaglia di chip/testi dentro le card piano. */
body[data-page="admin"] .admin-plan-summary-compact{
  grid-template-columns:repeat(4,minmax(0,1fr));
  margin:14px 0 16px;
}
body[data-page="admin"] .admin-plan-table-shell{
  margin-top:10px;
  overflow:auto;
}
body[data-page="admin"] .admin-plan-table{
  min-width:980px;
}
body[data-page="admin"] .admin-plan-table th,
body[data-page="admin"] .admin-plan-table td{
  vertical-align:middle;
}
body[data-page="admin"] .admin-plan-table td{
  color:#334155;
  font-weight:750;
}
body[data-page="admin"] .admin-plan-table td > strong{
  display:block;
  color:#0B2F26;
  font-size:16px;
  line-height:1.1;
  white-space:nowrap;
}
body[data-page="admin"] .admin-plan-main{
  display:grid;
  gap:4px;
}
body[data-page="admin"] .admin-plan-main strong{
  color:#0B2F26;
  font-size:18px;
  line-height:1.1;
}
body[data-page="admin"] .admin-plan-main span,
body[data-page="admin"] .admin-muted-line{
  display:block;
  color:#64748B;
  font-size:12px;
  font-weight:850;
  line-height:1.2;
}
@media(max-width:1280px){
  body[data-page="admin"] .admin-plan-summary-compact{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
  body[data-page="admin"] .admin-plan-summary-compact{grid-template-columns:1fr}
}

/* STEP 089 — Admin SaaS: Moduli attivabili preparatori.
   Tabella sintetica, niente accozzaglia di chip, niente card bianche su sfondo chiaro. */
body[data-page="admin"] .admin-modules-panel{
  grid-column:1 / -1;
}
body[data-page="admin"] .admin-modules-table-shell{
  margin-top:10px;
  border-color:#BFD8C6;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.68), 0 10px 24px rgba(15,23,42,.05);
}
body[data-page="admin"] .admin-modules-table{
  min-width:1120px;
}
body[data-page="admin"] .admin-modules-table th,
body[data-page="admin"] .admin-modules-table td{
  vertical-align:middle;
}
body[data-page="admin"] .admin-modules-table td{
  color:#334155;
  font-weight:750;
  line-height:1.35;
}
body[data-page="admin"] .admin-modules-table td:first-child strong{
  color:#0B2F26;
  font-size:16px;
  line-height:1.15;
  white-space:nowrap;
}

/* STEP 090 — Admin SaaS: Uso AI e limiti preparatorio.
   Vista sintetica, nessun dato reale dati applicazione, barre progresso compatte e non invasive. */
body[data-page="admin"] .admin-ai-usage-panel{
  grid-column:1 / -1;
}
body[data-page="admin"] .admin-ai-summary{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin:14px 0 16px;
}
body[data-page="admin"] .admin-ai-summary-card{
  border:1px solid #C7D8D7;
  border-radius:14px;
  background:linear-gradient(180deg,#F5FAFA,#E6F1F3);
  box-shadow:0 10px 22px rgba(15,23,42,.07);
  padding:14px;
  display:grid;
  gap:5px;
}
body[data-page="admin"] .admin-ai-summary-card span{
  color:#526174;
  font-size:12px;
  font-weight:900;
  letter-spacing:.07em;
  text-transform:uppercase;
}
body[data-page="admin"] .admin-ai-summary-card strong{
  color:#0B2F26;
  font-size:30px;
  line-height:1;
  letter-spacing:-.03em;
}
body[data-page="admin"] .admin-ai-summary-card small{
  color:#64748B;
  font-weight:750;
  line-height:1.25;
}
body[data-page="admin"] .admin-ai-table-shell{
  margin-top:10px;
  border-color:#BFD8C6;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.68), 0 10px 24px rgba(15,23,42,.05);
}
body[data-page="admin"] .admin-ai-table{
  min-width:1040px;
}
body[data-page="admin"] .admin-ai-table th,
body[data-page="admin"] .admin-ai-table td{
  vertical-align:middle;
}
body[data-page="admin"] .admin-ai-table td{
  color:#334155;
  font-weight:750;
}
body[data-page="admin"] .admin-ai-table td > strong{
  color:#0B2F26;
  font-size:16px;
  line-height:1.1;
  white-space:nowrap;
}
body[data-page="admin"] .admin-progress-cell{
  display:grid;
  grid-template-columns:44px minmax(120px,1fr);
  align-items:center;
  gap:10px;
  min-width:190px;
}
body[data-page="admin"] .admin-progress-cell span{
  color:#0B2F26;
  font-size:13px;
  font-weight:950;
}
body[data-page="admin"] .admin-progress-track{
  height:10px;
  border-radius:7px;
  background:#DDEBE1;
  border:1px solid #C3D8C8;
  overflow:hidden;
}
body[data-page="admin"] .admin-progress-track i{
  display:block;
  height:100%;
  border-radius:7px;
  background:linear-gradient(90deg,#0F7A4F,#2F80ED);
}
body[data-page="admin"] .admin-progress-track-warning i{
  background:linear-gradient(90deg,#F59E0B,#F04444);
}
@media(max-width:1280px){
  body[data-page="admin"] .admin-ai-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
  body[data-page="admin"] .admin-ai-summary{grid-template-columns:1fr}
}

/* STEP 091 — Admin SaaS: Sicurezza e log preparatorio.
   Vista sintetica, log placeholder locali, badge rettangolari premium e nessuna card bianca piatta. */
body[data-page="admin"] .admin-security-panel{
  grid-column:1 / -1;
}
body[data-page="admin"] .admin-security-summary{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin:14px 0 16px;
}
body[data-page="admin"] .admin-security-summary-card{
  border:1px solid #C8D8CC;
  border-radius:14px;
  background:linear-gradient(180deg,#F4FAF5,#E5F1E8);
  box-shadow:0 10px 22px rgba(15,23,42,.07);
  padding:14px;
  display:grid;
  gap:5px;
}
body[data-page="admin"] .admin-security-summary-card span{
  color:#526174;
  font-size:12px;
  font-weight:900;
  letter-spacing:.07em;
  text-transform:uppercase;
}
body[data-page="admin"] .admin-security-summary-card strong{
  color:#0B2F26;
  font-size:30px;
  line-height:1;
  letter-spacing:-.03em;
}
body[data-page="admin"] .admin-security-summary-card small{
  color:#64748B;
  font-weight:750;
  line-height:1.25;
}
body[data-page="admin"] .admin-security-table-shell{
  margin-top:10px;
  border-color:#BFD8C6;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.68), 0 10px 24px rgba(15,23,42,.05);
}
body[data-page="admin"] .admin-security-table{
  min-width:1120px;
}
body[data-page="admin"] .admin-security-table th,
body[data-page="admin"] .admin-security-table td{
  vertical-align:middle;
}
body[data-page="admin"] .admin-security-table td{
  color:#334155;
  font-weight:750;
  line-height:1.35;
}
body[data-page="admin"] .admin-security-table td > strong{
  color:#0B2F26;
  font-size:15px;
  line-height:1.1;
  white-space:nowrap;
}
@media(max-width:1280px){
  body[data-page="admin"] .admin-security-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
  body[data-page="admin"] .admin-security-summary{grid-template-columns:1fr}
}

/* STEP 092 — Admin SaaS: Stato sistema preparatorio.
   Vista sintetica del sistema, tabella compatta e versione progetto senza muri di testo. */
body[data-page="admin"] .admin-system-panel{
  grid-column:1 / -1;
}
body[data-page="admin"] .admin-system-table-shell{
  margin-top:10px;
  border-color:#BFD8C6;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.68), 0 10px 24px rgba(15,23,42,.05);
}
body[data-page="admin"] .admin-system-table{
  min-width:1080px;
}
body[data-page="admin"] .admin-system-table th,
body[data-page="admin"] .admin-system-table td{
  vertical-align:middle;
}
body[data-page="admin"] .admin-system-table td{
  color:#334155;
  font-weight:750;
  line-height:1.35;
}
body[data-page="admin"] .admin-system-table td > strong{
  color:#0B2F26;
  font-size:15px;
  line-height:1.1;
  white-space:nowrap;
}
body[data-page="admin"] .admin-version-card{
  margin-top:14px;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}
body[data-page="admin"] .admin-version-card > div{
  border:1px solid #C8D8CC;
  border-radius:14px;
  background:linear-gradient(180deg,#F4FAF5,#E5F1E8);
  box-shadow:0 10px 22px rgba(15,23,42,.07);
  padding:14px;
  display:grid;
  gap:6px;
  min-width:0;
}
body[data-page="admin"] .admin-version-card span{
  color:#526174;
  font-size:12px;
  font-weight:900;
  letter-spacing:.07em;
  text-transform:uppercase;
}
body[data-page="admin"] .admin-version-card strong{
  color:#0B2F26;
  font-size:16px;
  line-height:1.2;
  font-weight:950;
}
@media(max-width:1280px){
  body[data-page="admin"] .admin-version-card{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
  body[data-page="admin"] .admin-version-card{grid-template-columns:1fr}
}


/* STEP 093 — Admin SaaS: navigazione interna sezioni.
   Barra compatta sotto le KPI, bottoni rettangolari premium, niente pillole e niente controlli nativi. */
body[data-page="admin"] .admin-section-nav{
  position:sticky;
  top:14px;
  z-index:8;
  display:flex;
  align-items:center;
  gap:10px;
  overflow-x:auto;
  border:1px solid #BDD6C5;
  border-radius:16px;
  background:linear-gradient(180deg,#F2FAF4,#E4F0E7);
  box-shadow:0 14px 30px rgba(15,23,42,.085);
  padding:10px;
  scroll-padding:10px;
}
body[data-page="admin"] .admin-section-nav::-webkit-scrollbar{
  height:8px;
}
body[data-page="admin"] .admin-section-nav::-webkit-scrollbar-thumb{
  background:#BFD8C6;
  border-radius:8px;
}
body[data-page="admin"] .admin-section-nav-button{
  flex:0 0 auto;
  min-height:40px;
  border:1px solid #BFD8C6;
  border-radius:10px;
  padding:9px 12px;
  background:linear-gradient(180deg,#FAFEFB,#EAF4EC);
  color:#0B2F26;
  font-size:13px;
  font-weight:950;
  letter-spacing:.01em;
  box-shadow:0 8px 18px rgba(15,23,42,.055);
  cursor:pointer;
  transition:background .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease,color .18s ease;
}
body[data-page="admin"] .admin-section-nav-button:hover,
body[data-page="admin"] .admin-section-nav-button:focus-visible{
  border-color:#0F7A4F;
  background:linear-gradient(180deg,#EAF7EE,#D9EEDF);
  box-shadow:0 12px 24px rgba(15,23,42,.09);
  outline:none;
  transform:translateY(-1px);
}
body[data-page="admin"] .admin-section-nav-button.is-active{
  border-color:#0F7A4F;
  background:linear-gradient(135deg,#0B2F26,#0F7A4F);
  color:#fff;
  box-shadow:0 14px 28px rgba(15,122,79,.18);
}
body[data-page="admin"] .admin-panel[id]{
  scroll-margin-top:96px;
}
@media(max-width:760px){
  body[data-page="admin"] .admin-section-nav{
    top:10px;
    border-radius:14px;
    padding:8px;
  }
  body[data-page="admin"] .admin-section-nav-button{
    min-height:38px;
    padding:8px 10px;
    font-size:12px;
  }
  body[data-page="admin"] .admin-panel[id]{
    scroll-margin-top:88px;
  }
}

/* STEP 094 — Admin SaaS: rifinitura UX generale e leggibilità sezioni.
   Pulizia visiva senza nuove funzioni: spacing più coerente, intestazioni compatte,
   tabelle più respirate e navigazione interna meno invasiva. */
body[data-page="admin"] .admin-saas-page{
  gap:18px;
}
body[data-page="admin"] .admin-kpi-grid{
  gap:14px;
}
body[data-page="admin"] .admin-kpi-card{
  min-height:142px;
  padding:18px;
  border-radius:16px;
}
body[data-page="admin"] .admin-kpi-card strong{
  font-size:40px;
}
body[data-page="admin"] .admin-kpi-card small{
  max-width:220px;
}
body[data-page="admin"] .admin-section-nav{
  top:12px;
  gap:8px;
  padding:8px;
  border-radius:14px;
  box-shadow:0 10px 24px rgba(15,23,42,.075);
}
body[data-page="admin"] .admin-section-nav-button{
  min-height:36px;
  padding:8px 11px;
  border-radius:9px;
  font-size:12px;
}
body[data-page="admin"] .admin-control-grid{
  gap:18px;
}
body[data-page="admin"] .admin-panel{
  padding:20px;
  border-radius:16px;
}
body[data-page="admin"] .admin-panel-header{
  align-items:center;
  margin-bottom:10px;
}
body[data-page="admin"] .admin-panel h2{
  font-size:21px;
  line-height:1.12;
}
body[data-page="admin"] .admin-eyebrow{
  margin-bottom:4px;
  font-size:11px;
}
body[data-page="admin"] .admin-panel-copy{
  max-width:820px;
  margin:0 0 12px;
  font-size:14px;
  line-height:1.35;
  color:#5B6878;
}
body[data-page="admin"] .admin-family-summary,
body[data-page="admin"] .admin-plan-summary,
body[data-page="admin"] .admin-ai-summary,
body[data-page="admin"] .admin-security-summary{
  gap:10px;
  margin:12px 0 14px;
}
body[data-page="admin"] .admin-family-summary-card,
body[data-page="admin"] .admin-plan-summary-card,
body[data-page="admin"] .admin-ai-summary-card,
body[data-page="admin"] .admin-security-summary-card,
body[data-page="admin"] .admin-version-card > div{
  padding:12px;
  border-radius:13px;
  gap:4px;
}
body[data-page="admin"] .admin-family-summary-card strong,
body[data-page="admin"] .admin-plan-summary-card strong,
body[data-page="admin"] .admin-ai-summary-card strong,
body[data-page="admin"] .admin-security-summary-card strong{
  font-size:27px;
}
body[data-page="admin"] .admin-table-shell{
  border-radius:14px;
}
body[data-page="admin"] .admin-table th{
  padding:12px 13px;
  font-size:12px;
}
body[data-page="admin"] .admin-table td,
body[data-page="admin"] .admin-family-table td{
  padding:13px;
  line-height:1.3;
}
body[data-page="admin"] .admin-status-chip,
body[data-page="admin"] .admin-plan-tag{
  min-height:28px;
  border-radius:9px;
  padding:5px 9px;
}
body[data-page="admin"] .admin-action-button{
  min-height:32px;
  border-radius:9px;
  padding:6px 9px;
}
body[data-page="admin"] .admin-version-card{
  margin-top:12px;
  gap:10px;
}
body[data-page="admin"] .admin-panel[id]{
  scroll-margin-top:86px;
}
@media(max-width:760px){
  body[data-page="admin"] .admin-kpi-card{
    min-height:126px;
  }
  body[data-page="admin"] .admin-kpi-card strong{
    font-size:36px;
  }
  body[data-page="admin"] .admin-panel{
    padding:16px;
  }
  body[data-page="admin"] .admin-panel-header{
    align-items:flex-start;
  }
}


/* STEP 094A — Admin SaaS: leggibilità tabelle e rimozione scroll famiglie.
   Fix mirato da screenshot: testi grigi meno grandi/meno bold e tabella Famiglie senza scrollbar orizzontale su desktop. */
body[data-page="admin"] .admin-table th{
  color:#4B5563;
  font-size:11.5px;
  font-weight:800;
  letter-spacing:.035em;
}
body[data-page="admin"] .admin-table td{
  color:#475569;
  font-size:14px;
  font-weight:600;
  line-height:1.32;
}
body[data-page="admin"] .admin-table td > strong{
  color:#0B2F26;
  font-size:14.5px;
  font-weight:800;
  line-height:1.16;
}
body[data-page="admin"] .admin-plan-table td,
body[data-page="admin"] .admin-modules-table td,
body[data-page="admin"] .admin-security-table td,
body[data-page="admin"] .admin-system-table td{
  color:#475569;
  font-size:14px;
  font-weight:600;
}
body[data-page="admin"] .admin-plan-table td > strong,
body[data-page="admin"] .admin-modules-table td:first-child strong,
body[data-page="admin"] .admin-security-table td > strong,
body[data-page="admin"] .admin-system-table td > strong{
  font-size:14.5px;
  font-weight:800;
}
body[data-page="admin"] .admin-plan-table td:nth-child(3),
body[data-page="admin"] .admin-plan-table td:nth-child(5),
body[data-page="admin"] .admin-modules-table td:nth-child(2),
body[data-page="admin"] .admin-modules-table td:nth-child(3),
body[data-page="admin"] .admin-modules-table td:nth-child(5),
body[data-page="admin"] .admin-security-table td:nth-child(2),
body[data-page="admin"] .admin-security-table td:nth-child(3),
body[data-page="admin"] .admin-security-table td:nth-child(4),
body[data-page="admin"] .admin-security-table td:nth-child(5),
body[data-page="admin"] .admin-system-table td:nth-child(3),
body[data-page="admin"] .admin-system-table td:nth-child(4){
  color:#4F5F72;
  font-weight:600;
}
body[data-page="admin"] .admin-family-table-shell{
  overflow:hidden;
}
body[data-page="admin"] .admin-family-table{
  width:100%;
  min-width:0;
  table-layout:fixed;
}
body[data-page="admin"] .admin-family-table th,
body[data-page="admin"] .admin-family-table td{
  padding:11px 12px;
}
body[data-page="admin"] .admin-family-table th:nth-child(1),
body[data-page="admin"] .admin-family-table td:nth-child(1){width:18%;}
body[data-page="admin"] .admin-family-table th:nth-child(2),
body[data-page="admin"] .admin-family-table td:nth-child(2){width:20%;}
body[data-page="admin"] .admin-family-table th:nth-child(3),
body[data-page="admin"] .admin-family-table td:nth-child(3){width:10%;}
body[data-page="admin"] .admin-family-table th:nth-child(4),
body[data-page="admin"] .admin-family-table td:nth-child(4){width:7%;}
body[data-page="admin"] .admin-family-table th:nth-child(5),
body[data-page="admin"] .admin-family-table td:nth-child(5){width:10%;}
body[data-page="admin"] .admin-family-table th:nth-child(6),
body[data-page="admin"] .admin-family-table td:nth-child(6){width:10%;}
body[data-page="admin"] .admin-family-table th:nth-child(7),
body[data-page="admin"] .admin-family-table td:nth-child(7){width:11%;}
body[data-page="admin"] .admin-family-table th:nth-child(8),
body[data-page="admin"] .admin-family-table td:nth-child(8){width:14%;}
body[data-page="admin"] .admin-family-name strong,
body[data-page="admin"] .admin-family-owner strong,
body[data-page="admin"] .admin-module-count strong{
  font-size:14.5px;
  font-weight:800;
}
body[data-page="admin"] .admin-family-name span,
body[data-page="admin"] .admin-family-owner span,
body[data-page="admin"] .admin-module-count span,
body[data-page="admin"] .admin-last-activity{
  color:#64748B;
  font-size:12.5px;
  font-weight:650;
}
body[data-page="admin"] .admin-module-count strong{
  font-size:16px;
}
body[data-page="admin"] .admin-future-actions{
  gap:6px;
}
body[data-page="admin"] .admin-action-button{
  min-height:30px;
  padding:6px 8px;
  font-size:11.5px;
  font-weight:750;
}
@media(max-width:980px){
  body[data-page="admin"] .admin-family-table-shell{
    overflow:auto;
  }
  body[data-page="admin"] .admin-family-table{
    min-width:920px;
    table-layout:auto;
  }
}


/* STEP 095 — Admin SaaS sezioni dedicate */
.sidebar-admin-group {
  margin: 10px 12px 0;
  padding: 12px 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.sidebar-admin-group > p {
  margin: 0 0 8px;
  padding: 0 8px;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.56);
}

.sidebar-admin-nav {
  display: grid;
  gap: 6px;
}

.sidebar-admin-nav .sidebar-link {
  min-height: 40px;
  padding-top: 8px;
  padding-bottom: 8px;
  border-radius: 12px;
}

.sidebar-admin-nav .sidebar-link span:last-child {
  font-size: 14px;
  font-weight: 650;
}

.sidebar-admin-nav .sidebar-icon {
  width: 28px;
  height: 28px;
}

body.sidebar-collapsed .sidebar-admin-group > p {
  display: none;
}

body.sidebar-collapsed .sidebar-admin-group {
  margin-inline: 8px;
  padding-inline: 0;
}

.admin-saas-section-page {
  display: grid;
  gap: 18px;
}

.admin-dashboard-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  border: 1px solid rgba(27, 106, 81, 0.22);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(232, 244, 237, 0.92), rgba(255, 255, 255, 0.86));
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
}

.admin-dashboard-intro h2 {
  margin: 0 0 6px;
  font-size: 24px;
  line-height: 1.15;
  color: #0B2F26;
}

.admin-dashboard-intro p:last-child {
  margin: 0;
  max-width: 720px;
  color: #5f6b7a;
  font-size: 15px;
  font-weight: 550;
  line-height: 1.45;
}

.admin-hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.admin-hub-card {
  display: grid;
  gap: 10px;
  min-height: 154px;
  padding: 20px;
  text-decoration: none;
  border: 1px solid rgba(27, 106, 81, 0.24);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(244, 249, 246, 0.96), rgba(232, 244, 237, 0.84));
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
  color: #0B2F26;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.admin-hub-card:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 122, 79, 0.44);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.10);
}

.admin-hub-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(15, 122, 79, 0.12);
  color: #095B3A;
  font-size: 22px;
}

.admin-hub-card strong {
  font-size: 19px;
  line-height: 1.2;
}

.admin-hub-card small {
  color: #607083;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 560;
}

.admin-saas-section-page .admin-panel {
  margin-top: 0;
}

@media (max-width: 1180px) {
  .admin-hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .admin-dashboard-intro {
    display: grid;
  }

  .admin-hub-grid {
    grid-template-columns: 1fr;
  }
}

/* STEP 096 — Admin SaaS: restyling premium completo e allineamento griglie
   Fix mirato su tutte le pagine Admin create allo STEP 095: header ordinato,
   KPI subito visibili, data-card premium, tabelle coerenti e sottopagine coperte
   anche con body[data-page^="admin-"]. Nessun collegamento dati applicazione. */
body[data-page="admin"] .admin-premium-page,
body[data-page^="admin-"] .admin-premium-page,
body[data-page^="admin-"] .admin-saas-page{
  display:grid;
  gap:18px;
  align-content:start;
}

body[data-page="admin"] .admin-page-header,
body[data-page^="admin-"] .admin-page-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:22px;
  padding:22px 24px;
  border:1px solid rgba(27,106,81,.26);
  border-radius:18px;
  background:linear-gradient(135deg,#EAF5EE 0%,#F7FBF8 52%,#E4F1E8 100%);
  box-shadow:0 16px 38px rgba(15,23,42,.085);
}

body[data-page="admin"] .admin-page-header > div,
body[data-page^="admin-"] .admin-page-header > div{
  min-width:0;
  display:grid;
  gap:8px;
}

body[data-page="admin"] .admin-page-breadcrumb,
body[data-page^="admin-"] .admin-page-breadcrumb{
  margin:0;
  color:#0F5E4A;
  font-size:12px;
  font-weight:900;
  letter-spacing:.12em;
  text-transform:uppercase;
}

body[data-page="admin"] .admin-page-header h1,
body[data-page^="admin-"] .admin-page-header h1{
  margin:0;
  color:#0B2F26;
  font-size:32px;
  line-height:1.08;
  letter-spacing:-.035em;
}

body[data-page="admin"] .admin-page-header p:last-child,
body[data-page^="admin-"] .admin-page-header p:last-child{
  margin:0;
  max-width:820px;
  color:#536174;
  font-size:15px;
  font-weight:650;
  line-height:1.45;
}

body[data-page="admin"] .admin-page-kpi-grid,
body[data-page^="admin-"] .admin-page-kpi-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  margin:0;
}

body[data-page="admin"] .admin-metric-card,
body[data-page^="admin-"] .admin-metric-card{
  min-height:124px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:8px;
  padding:18px;
  border-radius:17px;
  color:#fff;
  border:1px solid rgba(255,255,255,.22);
  box-shadow:0 16px 34px rgba(15,23,42,.12);
  position:relative;
  overflow:hidden;
}

body[data-page="admin"] .admin-metric-card::after,
body[data-page^="admin-"] .admin-metric-card::after{
  content:"";
  position:absolute;
  width:82px;
  height:82px;
  right:-28px;
  top:-28px;
  border-radius:24px;
  background:rgba(255,255,255,.13);
  transform:rotate(11deg);
}

body[data-page="admin"] .admin-metric-card span,
body[data-page^="admin-"] .admin-metric-card span,
body[data-page="admin"] .admin-metric-card strong,
body[data-page^="admin-"] .admin-metric-card strong,
body[data-page="admin"] .admin-metric-card small,
body[data-page^="admin-"] .admin-metric-card small{
  position:relative;
  z-index:1;
}

body[data-page="admin"] .admin-metric-card span,
body[data-page^="admin-"] .admin-metric-card span{
  font-size:12px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:rgba(255,255,255,.88);
}

body[data-page="admin"] .admin-metric-card strong,
body[data-page^="admin-"] .admin-metric-card strong{
  font-size:36px;
  line-height:1;
  letter-spacing:-.04em;
  color:#fff;
}

body[data-page="admin"] .admin-metric-card small,
body[data-page^="admin-"] .admin-metric-card small{
  color:rgba(255,255,255,.86);
  font-size:13px;
  font-weight:750;
  line-height:1.35;
}

body[data-page="admin"] .admin-metric-card-forest,
body[data-page^="admin-"] .admin-metric-card-forest{background:linear-gradient(135deg,#0B2F26,#095B3A)}
body[data-page="admin"] .admin-metric-card-green,
body[data-page^="admin-"] .admin-metric-card-green{background:linear-gradient(135deg,#0F7A4F,#1F9D63)}
body[data-page="admin"] .admin-metric-card-blue,
body[data-page^="admin-"] .admin-metric-card-blue{background:linear-gradient(135deg,#1D4ED8,#2F80ED)}
body[data-page="admin"] .admin-metric-card-purple,
body[data-page^="admin-"] .admin-metric-card-purple{background:linear-gradient(135deg,#5B35D5,#7C4DFF)}

body[data-page="admin"] .admin-data-card,
body[data-page^="admin-"] .admin-data-card{
  min-width:0;
  padding:20px;
  border:1px solid #C8DCCE;
  border-radius:18px;
  background:linear-gradient(180deg,#F7FCF8 0%,#EDF6EF 100%);
  box-shadow:0 16px 38px rgba(15,23,42,.085);
}

body[data-page="admin"] .admin-data-toolbar,
body[data-page^="admin-"] .admin-data-toolbar{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin-bottom:16px;
}

body[data-page="admin"] .admin-data-toolbar > div,
body[data-page^="admin-"] .admin-data-toolbar > div{
  display:grid;
  gap:5px;
  min-width:0;
}

body[data-page="admin"] .admin-data-toolbar h2,
body[data-page^="admin-"] .admin-data-toolbar h2{
  margin:0;
  color:#0B2F26;
  font-size:22px;
  line-height:1.12;
  letter-spacing:-.02em;
}

body[data-page="admin"] .admin-data-toolbar p:not(.admin-eyebrow),
body[data-page^="admin-"] .admin-data-toolbar p:not(.admin-eyebrow){
  margin:0;
  max-width:760px;
  color:#5B6878;
  font-size:14px;
  font-weight:650;
  line-height:1.4;
}

body[data-page="admin"] .admin-data-note,
body[data-page^="admin-"] .admin-data-note{
  display:inline-flex;
  align-items:center;
  min-height:32px;
  padding:7px 10px;
  border:1px solid #BFD8C6;
  border-radius:10px;
  color:#0F5E4A;
  background:#E4F5EA;
  font-size:12px;
  font-weight:850;
  white-space:nowrap;
}

body[data-page="admin"] .admin-table-shell,
body[data-page^="admin-"] .admin-table-shell{
  width:100%;
  border:1px solid #C8DCCE;
  border-radius:16px;
  overflow:hidden;
  background:#FDFEFB;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.72), 0 10px 24px rgba(15,23,42,.045);
}

body[data-page="admin"] .admin-table,
body[data-page^="admin-"] .admin-table{
  width:100%;
  min-width:0;
  border-collapse:collapse;
  table-layout:fixed;
  background:#FDFEFB;
}

body[data-page="admin"] .admin-table th,
body[data-page^="admin-"] .admin-table th{
  padding:13px 14px;
  background:linear-gradient(180deg,#EAF4EC,#DFECE3);
  color:#435164;
  font-size:11.5px;
  font-weight:850;
  letter-spacing:.045em;
  text-transform:uppercase;
  text-align:left;
  border-bottom:1px solid #C8DCCE;
}

body[data-page="admin"] .admin-table td,
body[data-page^="admin-"] .admin-table td{
  padding:14px;
  vertical-align:middle;
  background:rgba(255,255,255,.76);
  color:#475569;
  font-size:14px;
  font-weight:600;
  line-height:1.34;
  border-bottom:1px solid rgba(200,220,206,.78);
  word-break:normal;
  overflow-wrap:anywhere;
}

body[data-page="admin"] .admin-table tbody tr:nth-child(even) td,
body[data-page^="admin-"] .admin-table tbody tr:nth-child(even) td{
  background:#F3FAF5;
}

body[data-page="admin"] .admin-table tbody tr:last-child td,
body[data-page^="admin-"] .admin-table tbody tr:last-child td{
  border-bottom:0;
}

body[data-page="admin"] .admin-table td > strong,
body[data-page^="admin-"] .admin-table td > strong,
body[data-page="admin"] .admin-family-name strong,
body[data-page^="admin-"] .admin-family-name strong,
body[data-page="admin"] .admin-family-owner strong,
body[data-page^="admin-"] .admin-family-owner strong,
body[data-page="admin"] .admin-module-count strong,
body[data-page^="admin-"] .admin-module-count strong,
body[data-page="admin"] .admin-plan-main strong,
body[data-page^="admin-"] .admin-plan-main strong{
  color:#0B2F26;
  font-size:14.5px;
  font-weight:850;
  line-height:1.16;
}

body[data-page="admin"] .admin-family-name,
body[data-page^="admin-"] .admin-family-name,
body[data-page="admin"] .admin-family-owner,
body[data-page^="admin-"] .admin-family-owner,
body[data-page="admin"] .admin-module-count,
body[data-page^="admin-"] .admin-module-count,
body[data-page="admin"] .admin-plan-main,
body[data-page^="admin-"] .admin-plan-main{
  display:grid;
  gap:4px;
}

body[data-page="admin"] .admin-family-name span,
body[data-page^="admin-"] .admin-family-name span,
body[data-page="admin"] .admin-family-owner span,
body[data-page^="admin-"] .admin-family-owner span,
body[data-page="admin"] .admin-module-count span,
body[data-page^="admin-"] .admin-module-count span,
body[data-page="admin"] .admin-plan-main span,
body[data-page^="admin-"] .admin-plan-main span,
body[data-page="admin"] .admin-muted-line,
body[data-page^="admin-"] .admin-muted-line,
body[data-page="admin"] .admin-last-activity,
body[data-page^="admin-"] .admin-last-activity{
  color:#64748B;
  font-size:12.5px;
  font-weight:700;
}

body[data-page="admin"] .admin-status-chip,
body[data-page^="admin-"] .admin-status-chip,
body[data-page="admin"] .admin-plan-tag,
body[data-page^="admin-"] .admin-plan-tag{
  min-height:28px;
  border-radius:9px;
  padding:5px 9px;
  font-size:11.5px;
  font-weight:850;
}

body[data-page="admin"] .admin-plan-tag,
body[data-page^="admin-"] .admin-plan-tag{
  display:inline-flex;
  align-items:center;
  color:#0F5E4A;
  background:#E4F5EA;
  border:1px solid #BFD8C6;
}

body[data-page="admin"] .admin-future-actions,
body[data-page^="admin-"] .admin-future-actions{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}

body[data-page="admin"] .admin-action-button,
body[data-page^="admin-"] .admin-action-button{
  min-height:32px;
  padding:7px 10px;
  border-radius:9px;
  border:1px solid #BFD8C6;
  background:linear-gradient(180deg,#F8FCF8,#EAF4EC);
  color:#0F5E4A;
  box-shadow:0 6px 14px rgba(15,23,42,.055);
  font-size:12px;
  font-weight:850;
  opacity:1;
  cursor:not-allowed;
}

body[data-page="admin"] .admin-progress-cell,
body[data-page^="admin-"] .admin-progress-cell{
  display:grid;
  gap:7px;
}

body[data-page="admin"] .admin-progress-track,
body[data-page^="admin-"] .admin-progress-track{
  height:8px;
  border-radius:8px;
  overflow:hidden;
  background:#DCE8DF;
}

body[data-page="admin"] .admin-progress-track i,
body[data-page^="admin-"] .admin-progress-track i{
  display:block;
  height:100%;
  border-radius:8px;
  background:linear-gradient(90deg,#0F7A4F,#1F9D63);
}

body[data-page="admin"] .admin-progress-track-warning i,
body[data-page^="admin-"] .admin-progress-track-warning i{
  background:linear-gradient(90deg,#F59E0B,#F04444);
}

body[data-page="admin"] .admin-version-card,
body[data-page^="admin-"] .admin-version-card{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin-top:16px;
}

body[data-page="admin"] .admin-version-card > div,
body[data-page^="admin-"] .admin-version-card > div{
  padding:14px;
  border:1px solid #C8DCCE;
  border-radius:14px;
  background:linear-gradient(180deg,#F2FAF4,#E5F2E9);
  box-shadow:0 10px 22px rgba(15,23,42,.055);
}

body[data-page="admin"] .admin-version-card span,
body[data-page^="admin-"] .admin-version-card span{
  display:block;
  margin-bottom:5px;
  color:#64748B;
  font-size:12px;
  font-weight:850;
  text-transform:uppercase;
  letter-spacing:.055em;
}

body[data-page="admin"] .admin-version-card strong,
body[data-page^="admin-"] .admin-version-card strong{
  color:#0B2F26;
  font-size:14px;
  line-height:1.28;
}

body[data-page="admin"] .admin-hub-grid,
body[data-page^="admin-"] .admin-hub-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}

body[data-page="admin"] .admin-hub-card,
body[data-page^="admin-"] .admin-hub-card{
  min-height:150px;
  display:grid;
  gap:10px;
  padding:18px;
  border:1px solid #C8DCCE;
  border-radius:16px;
  background:linear-gradient(135deg,#F7FCF8,#EAF4EC);
  box-shadow:0 12px 28px rgba(15,23,42,.065);
  text-decoration:none;
  color:#0B2F26;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

body[data-page="admin"] .admin-hub-card:hover,
body[data-page^="admin-"] .admin-hub-card:hover{
  transform:translateY(-2px);
  border-color:rgba(15,122,79,.45);
  box-shadow:0 18px 38px rgba(15,23,42,.10);
}

body[data-page="admin"] .admin-hub-icon,
body[data-page^="admin-"] .admin-hub-icon{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:13px;
  background:#E4F5EA;
  color:#095B3A;
  font-size:21px;
}

body[data-page="admin"] .admin-hub-card strong,
body[data-page^="admin-"] .admin-hub-card strong{
  font-size:18px;
  line-height:1.2;
}

body[data-page="admin"] .admin-hub-card small,
body[data-page^="admin-"] .admin-hub-card small{
  color:#607083;
  font-size:14px;
  line-height:1.42;
  font-weight:600;
}

@media(max-width:1280px){
  body[data-page="admin"] .admin-page-kpi-grid,
  body[data-page^="admin-"] .admin-page-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  body[data-page="admin"] .admin-hub-grid,
  body[data-page^="admin-"] .admin-hub-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  body[data-page="admin"] .admin-version-card,
  body[data-page^="admin-"] .admin-version-card{grid-template-columns:repeat(2,minmax(0,1fr));}
}

@media(max-width:980px){
  body[data-page="admin"] .admin-table-shell,
  body[data-page^="admin-"] .admin-table-shell{overflow:auto;}
  body[data-page="admin"] .admin-table,
  body[data-page^="admin-"] .admin-table{min-width:920px;table-layout:auto;}
}

@media(max-width:760px){
  body[data-page="admin"] .admin-page-header,
  body[data-page^="admin-"] .admin-page-header,
  body[data-page="admin"] .admin-data-toolbar,
  body[data-page^="admin-"] .admin-data-toolbar{display:grid;}
  body[data-page="admin"] .admin-page-header,
  body[data-page^="admin-"] .admin-page-header,
  body[data-page="admin"] .admin-data-card,
  body[data-page^="admin-"] .admin-data-card{padding:16px;border-radius:16px;}
  body[data-page="admin"] .admin-page-header h1,
  body[data-page^="admin-"] .admin-page-header h1{font-size:27px;}
  body[data-page="admin"] .admin-page-kpi-grid,
  body[data-page^="admin-"] .admin-page-kpi-grid,
  body[data-page="admin"] .admin-hub-grid,
  body[data-page^="admin-"] .admin-hub-grid,
  body[data-page="admin"] .admin-version-card,
  body[data-page^="admin-"] .admin-version-card{grid-template-columns:1fr;}
}

/* STEP 097 — Admin SaaS: famiglie in sola lettura e testi pubblici semplificati. */
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(1),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(1){width:17%;}
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(2),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(2){width:18%;}
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(3),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(3){width:11%;}
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(4),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(4){width:10%;}
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(5),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(5){width:8%;}
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(6),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(6){width:8%;}
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(7),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(7){width:10%;}
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(8),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(8){width:10%;}
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(9),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(9){width:8%;}

body[data-page="admin-famiglie"] .admin-empty-state{
  display:flex;
  flex-direction:column;
  gap:4px;
  padding:18px;
  color:#475569;
}

body[data-page="admin-famiglie"] .admin-empty-state strong{
  color:#0f172a;
  font-size:16px;
}

/* STEP 101 — Admin SaaS: gestione Piani operativa protetta */
body[data-page="admin-piani"] .admin-toolbar-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}
body[data-page="admin-piani"] .admin-primary-action{
  min-height:42px;
  padding:11px 15px;
  border:1px solid rgba(15,122,79,.28);
  border-radius:12px;
  background:linear-gradient(135deg,#0F7A4F,#1F9D63);
  color:#fff;
  font-size:13px;
  font-weight:900;
  box-shadow:0 12px 24px rgba(15,122,79,.20);
  cursor:pointer;
  transition:transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
body[data-page="admin-piani"] .admin-primary-action:hover{
  transform:translateY(-1px);
  box-shadow:0 16px 30px rgba(15,122,79,.25);
  filter:saturate(1.04);
}
body[data-page="admin-piani"] .admin-action-button:not(:disabled){
  cursor:pointer;
  background:linear-gradient(180deg,#FFFFFF,#EAF4EC);
  color:#0B5F49;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
body[data-page="admin-piani"] .admin-action-button:not(:disabled):hover{
  transform:translateY(-1px);
  border-color:rgba(15,122,79,.34);
  box-shadow:0 10px 20px rgba(15,23,42,.10);
}
body[data-page="admin-piani"] .admin-plan-actions{
  align-items:flex-start;
}
.admin-plan-modal-shell[hidden]{display:none!important}
.admin-plan-modal-shell{
  position:fixed;
  inset:0;
  z-index:140;
  display:grid;
  place-items:center;
  padding:22px;
}
.admin-plan-modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(7,31,25,.38);
  backdrop-filter:blur(4px);
}
.admin-plan-modal{
  width:min(760px,100%);
}
.admin-plan-form{
  min-height:0;
  display:flex;
  flex-direction:column;
}
.admin-plan-form-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.admin-plan-field{
  display:grid;
  gap:7px;
  color:#0B2F26;
  font-weight:850;
}
.admin-plan-field-wide{
  grid-column:1/-1;
}
.admin-plan-field span{
  color:#435164;
  font-size:13px;
  font-weight:850;
}
.admin-plan-field input{
  width:100%;
  min-height:48px;
  border:1px solid #C8DCCE;
  border-radius:14px;
  background:#FFFFFF;
  padding:12px 13px;
  color:#0B2F26;
  font-size:15px;
  font-weight:750;
  outline:none;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9);
}
.admin-plan-field input:focus{
  border-color:rgba(15,122,79,.48);
  box-shadow:0 0 0 4px rgba(15,122,79,.12);
}
.admin-plan-status-choice{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-top:16px;
  padding:12px;
  border:1px solid #C8DCCE;
  border-radius:16px;
  background:linear-gradient(180deg,#F2FAF4,#EAF4EC);
}
.admin-plan-status-choice button{
  min-height:44px;
  border:1px solid #BFD8C6;
  border-radius:12px;
  background:#FFFFFF;
  color:#0B2F26;
  font-weight:900;
  cursor:pointer;
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.admin-plan-status-choice button.is-active{
  background:linear-gradient(135deg,#0F7A4F,#1F9D63);
  color:#fff;
  border-color:rgba(15,122,79,.36);
  box-shadow:0 10px 22px rgba(15,122,79,.18);
}
.admin-form-message{
  margin:14px 0 0;
  padding:12px 14px;
  border:1px solid rgba(47,128,237,.25);
  border-radius:14px;
  background:rgba(47,128,237,.08);
  color:#1D4ED8;
  font-size:14px;
  font-weight:750;
}
.admin-form-message.is-error{
  border-color:rgba(240,68,68,.25);
  background:rgba(240,68,68,.08);
  color:#B42318;
}
.admin-form-message.is-success{
  border-color:rgba(31,157,99,.25);
  background:rgba(31,157,99,.10);
  color:#0F7A4F;
}
@media(max-width:760px){
  .admin-plan-modal-shell{align-items:end;place-items:end center;padding:14px}
  .admin-plan-form-grid{grid-template-columns:1fr}
  body[data-page="admin-piani"] .admin-toolbar-actions{justify-content:flex-start;width:100%}
  body[data-page="admin-piani"] .admin-primary-action{width:100%}
}

/* STEP 101A/101B — Admin Piani: azioni quadrate orizzontali con tooltip custom ed elimina protetto */
body[data-page="admin-piani"] .admin-table-shell{
  overflow:visible;
}
body[data-page="admin-piani"] .admin-table th:last-child,
body[data-page="admin-piani"] .admin-table td:last-child{
  width:196px;
  overflow:visible;
}
body[data-page="admin-piani"] .admin-table td{
  overflow:visible;
}
body[data-page="admin-piani"] .admin-plan-actions.admin-icon-action-bar{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  flex-wrap:nowrap;
  gap:8px;
  min-width:176px;
  position:relative;
  overflow:visible;
}
body[data-page="admin-piani"] .admin-icon-action-button{
  width:38px;
  height:38px;
  min-width:38px;
  min-height:38px;
  display:inline-grid;
  place-items:center;
  padding:0;
  border-radius:10px;
  border:1px solid rgba(15,122,79,.22);
  background:linear-gradient(180deg,#FFFFFF,#EAF4EC);
  color:#0B5F49;
  box-shadow:0 8px 18px rgba(15,23,42,.075);
  font-size:17px;
  line-height:1;
  position:relative;
  overflow:visible;
}
body[data-page="admin-piani"] .admin-icon-action-button span{
  display:block;
  transform:translateY(-.5px);
}
body[data-page="admin-piani"] .admin-icon-action-button:not(:disabled){
  cursor:pointer;
}
body[data-page="admin-piani"] .admin-icon-action-button:not(:disabled):hover,
body[data-page="admin-piani"] .admin-icon-action-button:not(:disabled):focus-visible{
  transform:translateY(-1px);
  border-color:rgba(15,122,79,.42);
  background:linear-gradient(180deg,#FFFFFF,#DFF2E5);
  box-shadow:0 13px 24px rgba(15,23,42,.12);
  outline:none;
}
body[data-page="admin-piani"] .admin-icon-action-button:disabled{
  opacity:.52;
  cursor:not-allowed;
}
body[data-page="admin-piani"] .admin-icon-action-button::after{
  content:attr(data-tooltip);
  position:absolute;
  left:50%;
  bottom:calc(100% + 9px);
  transform:translateX(-50%) translateY(4px);
  min-width:max-content;
  max-width:180px;
  padding:7px 9px;
  border-radius:9px;
  background:#0B2F26;
  color:#FFFFFF;
  box-shadow:0 12px 24px rgba(15,23,42,.18);
  font-size:11.5px;
  font-weight:850;
  letter-spacing:0;
  line-height:1.15;
  text-align:center;
  white-space:nowrap;
  opacity:0;
  pointer-events:none;
  z-index:80;
  transition:opacity .16s ease, transform .16s ease;
}
body[data-page="admin-piani"] .admin-icon-action-button::before{
  content:"";
  position:absolute;
  left:50%;
  bottom:calc(100% + 4px);
  width:8px;
  height:8px;
  background:#0B2F26;
  transform:translateX(-50%) rotate(45deg) translateY(4px);
  opacity:0;
  pointer-events:none;
  z-index:79;
  transition:opacity .16s ease, transform .16s ease;
}
body[data-page="admin-piani"] .admin-icon-action-button:not(:disabled):hover::after,
body[data-page="admin-piani"] .admin-icon-action-button:not(:disabled):focus-visible::after,
body[data-page="admin-piani"] .admin-icon-action-button:not(:disabled):hover::before,
body[data-page="admin-piani"] .admin-icon-action-button:not(:disabled):focus-visible::before{
  opacity:1;
  transform:translateX(-50%) translateY(0);
}
body[data-page="admin-piani"] .admin-icon-action-button:not(:disabled):hover::before,
body[data-page="admin-piani"] .admin-icon-action-button:not(:disabled):focus-visible::before{
  transform:translateX(-50%) rotate(45deg) translateY(0);
}

body[data-page="admin-piani"] .admin-icon-action-button.admin-icon-action-danger{
  border-color:rgba(240,68,68,.26);
  background:linear-gradient(180deg,#FFFFFF,#FFF0F0);
  color:#B42318;
}
body[data-page="admin-piani"] .admin-icon-action-button.admin-icon-action-danger:not(:disabled):hover,
body[data-page="admin-piani"] .admin-icon-action-button.admin-icon-action-danger:not(:disabled):focus-visible{
  border-color:rgba(240,68,68,.48);
  background:linear-gradient(180deg,#FFFFFF,#FFE3E3);
  color:#9F1F18;
}
body[data-page="admin-piani"] .admin-icon-action-button.admin-icon-action-danger::after,
body[data-page="admin-piani"] .admin-icon-action-button.admin-icon-action-danger::before{
  background:#7F1D1D;
}

@media(max-width:980px){
  body[data-page="admin-piani"] .admin-table-shell{
    overflow:auto;
  }
}

/* STEP 101D — Admin Piani: diagnostica permessi */
.admin-primary-action.is-disabled,
.admin-primary-action:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.12);
  transform: none !important;
}

.admin-form-message {
  line-height: 1.45;
}

/* STEP 101E — Admin Piani: diagnostica sessione Admin */
body[data-page="admin-piani"] .admin-diagnostic-card{
  margin:22px 0 24px;
  padding:22px;
  border:1px solid rgba(245,158,11,.34);
  border-radius:20px;
  background:linear-gradient(135deg,#FFF9EC 0%,#F2FBF5 100%);
  box-shadow:0 18px 42px rgba(15,23,42,.08);
}
body[data-page="admin-piani"] .admin-diagnostic-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin-bottom:18px;
}
body[data-page="admin-piani"] .admin-diagnostic-header h3{
  margin:4px 0 6px;
  font-size:22px;
  color:#083A2B;
}
body[data-page="admin-piani"] .admin-diagnostic-header p{
  margin:0;
  color:#536174;
  font-weight:700;
}
body[data-page="admin-piani"] .admin-status-chip-warning{
  color:#8A4B00;
  background:#FFF1D6;
  border-color:rgba(245,158,11,.38);
}
body[data-page="admin-piani"] .admin-diagnostic-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}
body[data-page="admin-piani"] .admin-diagnostic-grid > div{
  min-width:0;
  padding:14px 16px;
  border:1px solid rgba(9,91,58,.16);
  border-radius:16px;
  background:rgba(255,255,255,.72);
  box-shadow:0 10px 24px rgba(15,23,42,.05);
}
body[data-page="admin-piani"] .admin-diagnostic-grid span{
  display:block;
  margin-bottom:6px;
  font-size:12px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#657386;
}
body[data-page="admin-piani"] .admin-diagnostic-grid strong{
  display:block;
  color:#083A2B;
  font-size:14px;
  font-weight:900;
  line-height:1.35;
  word-break:break-word;
}
@media(max-width:1100px){
  body[data-page="admin-piani"] .admin-diagnostic-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:640px){
  body[data-page="admin-piani"] .admin-diagnostic-header{
    flex-direction:column;
  }
  body[data-page="admin-piani"] .admin-diagnostic-grid{
    grid-template-columns:1fr;
  }
}

/* STEP 102 — Admin Moduli: azioni operative protette */
body[data-page="admin-moduli"] .admin-table-shell{
  overflow:visible;
}
body[data-page="admin-moduli"] .admin-table th:last-child,
body[data-page="admin-moduli"] .admin-table td:last-child{
  width:152px;
  overflow:visible;
}
body[data-page="admin-moduli"] .admin-table td{
  overflow:visible;
}
body[data-page="admin-moduli"] .admin-module-actions.admin-icon-action-bar{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  flex-wrap:nowrap;
  gap:8px;
  min-width:132px;
  position:relative;
  overflow:visible;
}
body[data-page="admin-moduli"] .admin-icon-action-button{
  width:38px;
  height:38px;
  min-width:38px;
  min-height:38px;
  display:inline-grid;
  place-items:center;
  padding:0;
  border-radius:10px;
  border:1px solid rgba(15,122,79,.22);
  background:linear-gradient(180deg,#FFFFFF,#EAF4EC);
  color:#0B5F49;
  box-shadow:0 8px 18px rgba(15,23,42,.075);
  font-size:17px;
  line-height:1;
  position:relative;
  overflow:visible;
}
body[data-page="admin-moduli"] .admin-icon-action-button span{
  display:block;
  transform:translateY(-.5px);
}
body[data-page="admin-moduli"] .admin-icon-action-button:not(:disabled){
  cursor:pointer;
}
body[data-page="admin-moduli"] .admin-icon-action-button:not(:disabled):hover,
body[data-page="admin-moduli"] .admin-icon-action-button:not(:disabled):focus-visible{
  transform:translateY(-1px);
  border-color:rgba(15,122,79,.42);
  background:linear-gradient(180deg,#FFFFFF,#DFF2E5);
  box-shadow:0 13px 24px rgba(15,23,42,.12);
  outline:none;
}
body[data-page="admin-moduli"] .admin-icon-action-button:disabled{
  opacity:.52;
  cursor:not-allowed;
}
body[data-page="admin-moduli"] .admin-icon-action-button::after{
  content:attr(data-tooltip);
  position:absolute;
  left:50%;
  bottom:calc(100% + 9px);
  transform:translateX(-50%) translateY(4px);
  min-width:max-content;
  max-width:180px;
  padding:7px 9px;
  border-radius:9px;
  background:#0B2F26;
  color:#FFFFFF;
  box-shadow:0 12px 24px rgba(15,23,42,.18);
  font-size:11.5px;
  font-weight:850;
  line-height:1.15;
  text-align:center;
  white-space:nowrap;
  opacity:0;
  pointer-events:none;
  z-index:80;
  transition:opacity .16s ease, transform .16s ease;
}
body[data-page="admin-moduli"] .admin-icon-action-button::before{
  content:"";
  position:absolute;
  left:50%;
  bottom:calc(100% + 4px);
  width:8px;
  height:8px;
  background:#0B2F26;
  transform:translateX(-50%) rotate(45deg) translateY(4px);
  opacity:0;
  pointer-events:none;
  z-index:79;
  transition:opacity .16s ease, transform .16s ease;
}
body[data-page="admin-moduli"] .admin-icon-action-button:not(:disabled):hover::after,
body[data-page="admin-moduli"] .admin-icon-action-button:not(:disabled):focus-visible::after,
body[data-page="admin-moduli"] .admin-icon-action-button:not(:disabled):hover::before,
body[data-page="admin-moduli"] .admin-icon-action-button:not(:disabled):focus-visible::before{
  opacity:1;
  transform:translateX(-50%) translateY(0);
}
body[data-page="admin-moduli"] .admin-icon-action-button:not(:disabled):hover::before,
body[data-page="admin-moduli"] .admin-icon-action-button:not(:disabled):focus-visible::before{
  transform:translateX(-50%) rotate(45deg) translateY(0);
}
body[data-page="admin-moduli"] .admin-icon-action-button.admin-icon-action-danger{
  border-color:rgba(240,68,68,.26);
  background:linear-gradient(180deg,#FFFFFF,#FFF0F0);
  color:#B42318;
}
body[data-page="admin-moduli"] .admin-icon-action-button.admin-icon-action-danger:not(:disabled):hover,
body[data-page="admin-moduli"] .admin-icon-action-button.admin-icon-action-danger:not(:disabled):focus-visible{
  border-color:rgba(240,68,68,.48);
  background:linear-gradient(180deg,#FFFFFF,#FFE3E3);
  color:#9F1F18;
}
body[data-page="admin-moduli"] .admin-icon-action-button.admin-icon-action-danger::after,
body[data-page="admin-moduli"] .admin-icon-action-button.admin-icon-action-danger::before{
  background:#7F1D1D;
}

@media(max-width:980px){
  body[data-page="admin-moduli"] .admin-table-shell{
    overflow:auto;
  }
}


/* STEP 102A — Admin Moduli: ordine visivo e diagnostica compatta */
body[data-page="admin-moduli"] .content-area{padding-top:34px;}
body[data-page="admin-moduli"] .admin-page-header{margin-bottom:22px;align-items:center;}
body[data-page="admin-moduli"] .admin-page-header h1{max-width:820px;}
body[data-page="admin-moduli"] .admin-page-header p[data-admin-module-note]{max-width:760px;}
body[data-page="admin-moduli"] .admin-page-kpi-grid{margin-bottom:24px;}
body[data-page="admin-moduli"] .admin-section-modules{padding:24px;border-radius:22px;background:linear-gradient(180deg,#fff,#f8fbf8);border:1px solid rgba(11,47,38,.12);box-shadow:0 18px 46px rgba(15,23,42,.08);}
body[data-page="admin-moduli"] .admin-data-toolbar{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:18px;padding-bottom:18px;border-bottom:1px solid rgba(11,47,38,.10);}
body[data-page="admin-moduli"] .admin-data-toolbar h2{margin:2px 0 4px;font-size:26px;line-height:1.1;}
body[data-page="admin-moduli"] .admin-data-toolbar p{margin:0;}
body[data-page="admin-moduli"] .admin-toolbar-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;min-width:260px;}
body[data-page="admin-moduli"] .admin-primary-action{
  min-height:42px;
  padding:11px 15px;
  border:1px solid rgba(15,122,79,.28);
  border-radius:12px;
  background:linear-gradient(135deg,#0F7A4F,#1F9D63);
  color:#fff;
  font-size:13px;
  font-weight:900;
  line-height:1;
  box-shadow:0 12px 24px rgba(15,122,79,.20);
  cursor:pointer;
  white-space:nowrap;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  transition:transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
body[data-page="admin-moduli"] .admin-primary-action:hover{
  transform:translateY(-1px);
  box-shadow:0 16px 30px rgba(15,122,79,.25);
  filter:saturate(1.04);
}
body[data-page="admin-moduli"] .admin-primary-action:disabled,
body[data-page="admin-moduli"] .admin-primary-action.is-disabled{
  opacity:.55;
  filter:grayscale(.12);
  box-shadow:none;
  cursor:not-allowed;
  transform:none!important;
}
body[data-page="admin-moduli"] .admin-data-note{min-height:40px;display:inline-flex;align-items:center;justify-content:center;border-radius:14px;padding:0 14px;font-weight:900;}
body[data-page="admin-moduli"] .admin-diagnostic-card{margin:0 0 18px;padding:16px;border-radius:18px;background:#fff8ec;border:1px solid rgba(245,158,11,.28);box-shadow:none;}
body[data-page="admin-moduli"] .admin-diagnostic-header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:12px;}
body[data-page="admin-moduli"] .admin-diagnostic-header h3{margin:0 0 2px;font-size:18px;line-height:1.2;}
body[data-page="admin-moduli"] .admin-diagnostic-header p{margin:0;color:#6b7280;font-size:14px;}
body[data-page="admin-moduli"] .admin-diagnostic-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;}
body[data-page="admin-moduli"] .admin-diagnostic-grid>div{background:rgba(255,255,255,.78);border:1px solid rgba(245,158,11,.20);border-radius:14px;padding:10px 12px;min-width:0;}
body[data-page="admin-moduli"] .admin-diagnostic-grid span{display:block;margin:0 0 4px;color:#64748b;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;}
body[data-page="admin-moduli"] .admin-diagnostic-grid strong{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#10231d;font-size:14px;line-height:1.35;}
body[data-page="admin-moduli"] .admin-modules-table-shell{border-radius:18px;overflow:visible;border:1px solid rgba(11,47,38,.12);background:#fff;}
body[data-page="admin-moduli"] .admin-modules-table{width:100%;min-width:0;table-layout:fixed;}
body[data-page="admin-moduli"] .admin-modules-table th{padding:15px 12px;background:#edf6ef;color:#334155;font-size:11px;letter-spacing:.04em;text-transform:uppercase;white-space:normal;line-height:1.25;}
body[data-page="admin-moduli"] .admin-modules-table td{padding:16px 12px;border-bottom:1px solid rgba(11,47,38,.09);vertical-align:middle;min-width:0;overflow-wrap:anywhere;word-break:normal;}
body[data-page="admin-moduli"] .admin-modules-table th:nth-child(1),
body[data-page="admin-moduli"] .admin-modules-table td:nth-child(1){width:18%;}
body[data-page="admin-moduli"] .admin-modules-table th:nth-child(2),
body[data-page="admin-moduli"] .admin-modules-table td:nth-child(2){width:27%;color:#475569;font-weight:700;line-height:1.35;}
body[data-page="admin-moduli"] .admin-modules-table th:nth-child(3),
body[data-page="admin-moduli"] .admin-modules-table td:nth-child(3){width:18%;color:#334155;font-weight:800;}
body[data-page="admin-moduli"] .admin-modules-table th:nth-child(4),
body[data-page="admin-moduli"] .admin-modules-table td:nth-child(4){width:8%;text-align:center;}
body[data-page="admin-moduli"] .admin-modules-table th:nth-child(5),
body[data-page="admin-moduli"] .admin-modules-table td:nth-child(5){width:10%;text-align:center;}
body[data-page="admin-moduli"] .admin-modules-table th:nth-child(6),
body[data-page="admin-moduli"] .admin-modules-table td:nth-child(6){width:19%;text-align:right;}
body[data-page="admin-moduli"] .admin-plan-main strong{font-size:16px;color:#082f25;}
body[data-page="admin-moduli"] .admin-plan-main span{display:block;margin-top:4px;color:#64748b;font-size:13px;font-weight:800;}
body[data-page="admin-moduli"] .admin-icon-action-bar{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:nowrap;}
body[data-page="admin-moduli"] .admin-icon-action-button{width:40px;height:40px;border-radius:13px;display:inline-grid;place-items:center;padding:0;flex:0 0 40px;}
@media (max-width:1100px){
  body[data-page="admin-moduli"] .admin-modules-table-shell{overflow-x:auto;}
  body[data-page="admin-moduli"] .admin-modules-table{min-width:760px;}
}
@media (max-width:900px){body[data-page="admin-moduli"] .admin-data-toolbar{flex-direction:column;}body[data-page="admin-moduli"] .admin-toolbar-actions{justify-content:flex-start;min-width:0;width:100%;}body[data-page="admin-moduli"] .admin-diagnostic-grid{grid-template-columns:1fr;}}


/* STEP 102G — Admin Moduli: tabella desktop senza scroll orizzontale */
body[data-page="admin-moduli"] .admin-modules-table .admin-plan-main span{overflow-wrap:anywhere;}
body[data-page="admin-moduli"] .admin-modules-table .badge{white-space:normal;}

/* STEP 103 — Accademia Famyro */
body[data-page="academy"] .academy-content{padding:26px 28px 118px;display:grid;gap:22px;}
body[data-page="academy"] .academy-hero{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(300px,.55fr);gap:26px;align-items:stretch;padding:30px;background:radial-gradient(circle at 10% 0%,rgba(31,157,99,.14),transparent 34%),linear-gradient(135deg,#ffffff,#f0f8f2);}
body[data-page="academy"] .academy-kicker{margin:0 0 8px;color:#0f7a4f;font-size:13px;font-weight:950;letter-spacing:.12em;text-transform:uppercase;}
body[data-page="academy"] .academy-hero h2{font-size:42px;line-height:1.02;letter-spacing:-.055em;margin:0 0 12px;color:#0b2f26;}
body[data-page="academy"] .academy-hero p{max-width:760px;margin:0;color:#4b5563;font-size:18px;line-height:1.6;font-weight:650;}
body[data-page="academy"] .academy-hero-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:22px;}
body[data-page="academy"] .academy-hero-panel{border:1px solid rgba(15,122,79,.18);border-radius:18px;padding:22px;background:linear-gradient(180deg,#ffffff,#eef8f1);box-shadow:inset 0 1px 0 rgba(255,255,255,.8),0 14px 28px rgba(15,23,42,.06);display:flex;flex-direction:column;justify-content:center;}
body[data-page="academy"] .academy-panel-icon{width:72px;height:72px;border-radius:19px;display:grid;place-items:center;margin-bottom:18px;background:rgba(31,157,99,.13);color:#0b2f26;font-size:40px;line-height:1;}
body[data-page="academy"] .academy-hero-panel strong{font-size:22px;line-height:1.15;color:#10221b;}
body[data-page="academy"] .academy-hero-panel p{font-size:15px;margin:8px 0 16px;color:#4b5563;}
body[data-page="academy"] .academy-progress-line{height:10px;border-radius:999px;background:#dbe7de;overflow:hidden;margin-bottom:8px;}
body[data-page="academy"] .academy-progress-line i{display:block;width:25%;height:100%;border-radius:999px;background:linear-gradient(135deg,#20a464,#0f7a4f);}
body[data-page="academy"] .academy-hero-panel small{font-size:13px;color:#607166;font-weight:850;}
body[data-page="academy"] .academy-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;}
body[data-page="academy"] .academy-kpi-card{position:relative;overflow:hidden;border-radius:18px;padding:22px 22px 20px;color:#fff;box-shadow:0 18px 34px rgba(9,31,24,.13),inset 0 1px 0 rgba(255,255,255,.16);min-height:132px;}
body[data-page="academy"] .academy-kpi-card:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 15% 10%,rgba(255,255,255,.24),transparent 36%);pointer-events:none;}
body[data-page="academy"] .academy-kpi-card span,body[data-page="academy"] .academy-kpi-card strong,body[data-page="academy"] .academy-kpi-card small{position:relative;display:block;}
body[data-page="academy"] .academy-kpi-card span{font-size:15px;font-weight:900;}
body[data-page="academy"] .academy-kpi-card strong{font-size:36px;letter-spacing:-.05em;margin:10px 0 4px;}
body[data-page="academy"] .academy-kpi-card small{font-size:13px;color:rgba(255,255,255,.84);font-weight:750;}
body[data-page="academy"] .academy-kpi-card.is-green{background:linear-gradient(135deg,#1f9d63,#09623f);}
body[data-page="academy"] .academy-kpi-card.is-teal{background:linear-gradient(135deg,#0f7a65,#063f34);}
body[data-page="academy"] .academy-kpi-card.is-blue{background:linear-gradient(135deg,#2f80ed,#1859a9);}
body[data-page="academy"] .academy-kpi-card.is-purple{background:linear-gradient(135deg,#7c4dff,#4c2aa9);}
body[data-page="academy"] .academy-main-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(300px,.65fr);gap:18px;}
body[data-page="academy"] .premium-card-header p{margin:6px 0 0;color:#6b7280;font-size:14px;font-weight:650;}
body[data-page="academy"] .academy-soft-badge{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:7px 12px;border-radius:12px;background:rgba(31,157,99,.1);border:1px solid rgba(31,157,99,.18);color:#0f7a4f;font-size:13px;font-weight:950;white-space:nowrap;}
body[data-page="academy"] .academy-lesson-preview{display:grid;grid-template-columns:58px minmax(0,1fr) auto;gap:16px;align-items:center;padding:18px;border:1px solid #dce5dd;border-radius:16px;background:#f7fbf8;}
body[data-page="academy"] .academy-lesson-number{width:52px;height:52px;border-radius:15px;display:grid;place-items:center;background:#0f7a4f;color:#fff;font-size:18px;font-weight:950;box-shadow:0 12px 24px rgba(15,122,79,.2);}
body[data-page="academy"] .academy-lesson-preview strong{display:block;font-size:20px;color:#10221b;margin-bottom:4px;}
body[data-page="academy"] .academy-lesson-preview small{display:block;color:#6b7280;font-weight:650;line-height:1.45;}
body[data-page="academy"] .academy-lesson-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:14px;}
body[data-page="academy"] .academy-lesson-steps span{padding:12px;border-radius:12px;background:#eef7f1;border:1px solid #dcebdd;color:#12382c;font-size:13px;font-weight:900;text-align:center;}
body[data-page="academy"] .academy-ai-card{background:radial-gradient(circle at 90% 0%,rgba(124,77,255,.12),transparent 34%),linear-gradient(180deg,#ffffff,#fbfaff);}
body[data-page="academy"] .academy-ai-card p{color:#4b5563;font-size:15px;line-height:1.6;font-weight:650;}
body[data-page="academy"] .academy-suggestion-box{margin-top:18px;padding:16px;border-radius:15px;background:rgba(124,77,255,.08);border:1px solid rgba(124,77,255,.16);}
body[data-page="academy"] .academy-suggestion-box strong,body[data-page="academy"] .academy-suggestion-box small{display:block;}
body[data-page="academy"] .academy-suggestion-box strong{color:#1f163f;font-size:16px;margin-bottom:4px;}
body[data-page="academy"] .academy-suggestion-box small{color:#5b4b88;font-weight:750;line-height:1.45;}
body[data-page="academy"] .academy-section{display:grid;gap:16px;}
body[data-page="academy"] .academy-section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;}
body[data-page="academy"] .academy-section-head h2{margin:0;color:#10221b;font-size:28px;letter-spacing:-.04em;}
body[data-page="academy"] .academy-course-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;}
body[data-page="academy"] .academy-course-card{display:flex;flex-direction:column;gap:16px;background:linear-gradient(180deg,#ffffff,#f7fbf8);}
body[data-page="academy"] .academy-course-icon{width:54px;height:54px;border-radius:16px;display:grid;place-items:center;background:#eef7ef;border:1px solid #dcebdd;font-size:27px;}
body[data-page="academy"] .academy-course-card h3{margin:0 0 7px;font-size:22px;line-height:1.1;color:#0b2f26;letter-spacing:-.035em;}
body[data-page="academy"] .academy-course-card p{margin:0;color:#4b5563;line-height:1.48;font-weight:650;}
body[data-page="academy"] .academy-course-card ul{list-style:none;margin:auto 0 0;padding:0;display:grid;gap:9px;}
body[data-page="academy"] .academy-course-card li{position:relative;padding-left:18px;color:#374151;font-size:14px;font-weight:800;line-height:1.35;}
body[data-page="academy"] .academy-course-card li:before{content:"";position:absolute;left:0;top:.58em;width:7px;height:7px;border-radius:50%;background:#1f9d63;}
body[data-page="academy"] .academy-glossary-list{display:grid;gap:12px;margin:0;}
body[data-page="academy"] .academy-glossary-list div{padding:14px;border-radius:14px;background:#f7fbf8;border:1px solid #e0ebe2;}
body[data-page="academy"] .academy-glossary-list dt{font-size:16px;font-weight:950;color:#0b2f26;margin-bottom:5px;}
body[data-page="academy"] .academy-glossary-list dd{margin:0;color:#4b5563;font-weight:650;line-height:1.45;}
body[data-page="academy"] .academy-quiz-card{padding:16px;border-radius:16px;background:#f7fbf8;border:1px solid #dce5dd;}
body[data-page="academy"] .academy-quiz-card strong{display:block;font-size:17px;color:#0b2f26;margin-bottom:6px;}
body[data-page="academy"] .academy-quiz-card p{margin:0 0 14px;color:#4b5563;font-weight:700;}
body[data-page="academy"] .academy-quiz-options{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
body[data-page="academy"] .academy-quiz-options button{border:1px solid #cfe2d3;background:#fff;border-radius:12px;min-height:44px;color:#0b2f26;font-weight:950;cursor:pointer;}
body[data-page="academy"] .academy-quiz-options button:hover{background:#eef7f1;}
@media(max-width:1380px){body[data-page="academy"] .academy-kpi-grid,body[data-page="academy"] .academy-course-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:980px){body[data-page="academy"] .academy-hero,body[data-page="academy"] .academy-main-grid{grid-template-columns:1fr;}body[data-page="academy"] .academy-lesson-preview{grid-template-columns:52px minmax(0,1fr);}body[data-page="academy"] .academy-lesson-preview .btn{grid-column:1/-1;}body[data-page="academy"] .academy-lesson-steps{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:640px){body[data-page="academy"] .academy-content{padding:20px 18px 110px;}body[data-page="academy"] .academy-hero{padding:22px;}body[data-page="academy"] .academy-hero h2{font-size:32px;}body[data-page="academy"] .academy-hero p{font-size:16px;}body[data-page="academy"] .academy-kpi-grid,body[data-page="academy"] .academy-course-grid,body[data-page="academy"] .academy-lesson-steps,body[data-page="academy"] .academy-quiz-options{grid-template-columns:1fr;}body[data-page="academy"] .academy-section-head{align-items:flex-start;flex-direction:column;}body[data-page="academy"] .academy-hero-actions .btn{width:100%;justify-content:center;}}

/* STEP 104 — Accademia lezioni demo */
body[data-page="academy"] .academy-course-card{cursor:pointer;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;}
body[data-page="academy"] .academy-course-card:hover,
body[data-page="academy"] .academy-course-card:focus-visible{transform:translateY(-2px);border-color:rgba(31,157,99,.32);box-shadow:0 18px 34px rgba(15,23,42,.11);outline:none;}
body[data-page="academy"] .academy-course-cta{width:100%;min-height:44px;border:1px solid rgba(15,122,79,.22);border-radius:12px;background:linear-gradient(135deg,#1f9d63,#0f7a4f);color:#fff;font-weight:950;font-size:14px;cursor:pointer;box-shadow:0 12px 22px rgba(15,122,79,.16);}
body[data-page="academy"] .academy-course-cta:hover{filter:brightness(1.02);box-shadow:0 15px 26px rgba(15,122,79,.2);}
.academy-lesson-modal{position:fixed;inset:0;z-index:2600;display:grid;place-items:center;padding:24px;background:rgba(8,25,20,.56);backdrop-filter:blur(12px);}
.academy-lesson-modal[hidden]{display:none;}
.academy-lesson-dialog{width:min(940px,calc(100vw - 42px));max-height:calc(100vh - 42px);display:flex;flex-direction:column;overflow:hidden;border-radius:28px;background:linear-gradient(180deg,#ffffff,#f7fbf8);border:1px solid rgba(207,226,211,.9);box-shadow:0 34px 86px rgba(5,18,14,.38);}
.academy-lesson-head{display:grid;grid-template-columns:70px minmax(0,1fr) 54px;gap:18px;align-items:center;padding:26px 28px;border-bottom:1px solid #dce5dd;background:radial-gradient(circle at 10% 0%,rgba(31,157,99,.12),transparent 34%),linear-gradient(135deg,#ffffff,#f1f8f3);}
.academy-lesson-icon{width:76px;height:76px;border-radius:21px;display:grid;place-items:center;background:rgba(31,157,99,.12);color:#0b2f26;font-size:42px;line-height:1;}
.academy-lesson-head h2{margin:0;color:#10221b;font-size:34px;line-height:1.05;letter-spacing:-.045em;}
.academy-lesson-meta{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px;}
.academy-lesson-meta span{display:inline-flex;min-height:30px;align-items:center;padding:6px 10px;border-radius:10px;background:#eef7f1;border:1px solid #dcebdd;color:#0f7a4f;font-size:12px;font-weight:950;}
.academy-lesson-close{width:48px;height:48px;border:1px solid #d4e2d7;border-radius:16px;background:#fff;color:#374151;font-size:34px;line-height:1;cursor:pointer;box-shadow:0 10px 22px rgba(15,23,42,.07);}
.academy-lesson-close:hover{background:#f3faf5;color:#0b2f26;}
.academy-lesson-body{overflow:auto;padding:24px 28px;display:grid;gap:16px;}
.academy-lesson-block{padding:18px;border:1px solid #dce5dd;border-radius:18px;background:#fff;box-shadow:0 10px 22px rgba(15,23,42,.045);}
.academy-lesson-block.is-summary{background:linear-gradient(135deg,#eef8f1,#ffffff);border-color:#cfe7d6;}
.academy-lesson-block h3{margin:0 0 8px;color:#0b2f26;font-size:18px;letter-spacing:-.02em;}
.academy-lesson-block p{margin:0;color:#4b5563;font-size:15px;line-height:1.62;font-weight:650;}
.academy-lesson-action-box{display:flex;align-items:center;justify-content:space-between;gap:18px;background:linear-gradient(135deg,#f7fbf8,#ffffff);}
.academy-lesson-action-box .btn{white-space:nowrap;}
.academy-lesson-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:14px;}
.academy-lesson-option{min-height:48px;padding:10px 12px;border-radius:13px;border:1px solid #cfe2d3;background:#fff;color:#0b2f26;font-weight:950;cursor:pointer;text-align:center;}
.academy-lesson-option:hover,.academy-lesson-option.is-selected{background:#eef7f1;border-color:#1f9d63;}
.academy-lesson-feedback{margin-top:12px;padding:13px 14px;border-radius:14px;font-weight:850;line-height:1.45;}
.academy-lesson-feedback.is-correct{background:#e9f8ef;border:1px solid #b8e2c5;color:#0f6b43;}
.academy-lesson-feedback.is-wrong{background:#fff6df;border:1px solid #f4d48a;color:#815500;}
.academy-lesson-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 28px;border-top:1px solid #dce5dd;background:#fff;}
.academy-lesson-footer span{color:#6b7280;font-size:13px;font-weight:800;}
body.modal-open{overflow:hidden;}
@media(max-width:760px){.academy-lesson-modal{padding:14px;}.academy-lesson-dialog{width:100%;max-height:calc(100vh - 28px);border-radius:22px;}.academy-lesson-head{grid-template-columns:64px minmax(0,1fr) 46px;padding:20px;gap:12px;}.academy-lesson-icon{width:62px;height:62px;border-radius:18px;font-size:34px;}.academy-lesson-head h2{font-size:26px;}.academy-lesson-body{padding:18px;}.academy-lesson-options{grid-template-columns:1fr;}.academy-lesson-action-box{align-items:stretch;flex-direction:column;}.academy-lesson-footer{align-items:stretch;flex-direction:column-reverse;padding:16px 18px;}.academy-lesson-footer .btn{width:100%;justify-content:center;}}

/* STEP 104A — Accademia card corsi stile oro */
body[data-page="academy"] .academy-course-card{position:relative;overflow:hidden;border:1px solid rgba(131,89,27,.22);background:radial-gradient(circle at 18% 10%,rgba(255,248,224,.72),transparent 22%),linear-gradient(135deg,#fbefc6 0%,#f2d686 42%,#ddb054 100%);box-shadow:0 18px 34px rgba(93,61,13,.16),inset 0 1px 0 rgba(255,255,255,.42);}
body[data-page="academy"] .academy-course-card::after{content:"";position:absolute;inset:auto -12% -32% auto;width:180px;height:180px;border-radius:50%;background:radial-gradient(circle,rgba(255,255,255,.22),transparent 68%);pointer-events:none;}
body[data-page="academy"] .academy-course-card h3{color:#45290f;}
body[data-page="academy"] .academy-course-card p{color:#65441b;}
body[data-page="academy"] .academy-course-card li{color:#553918;}
body[data-page="academy"] .academy-course-card li:before{background:#8c5d18;box-shadow:0 0 0 4px rgba(255,245,214,.38);}
body[data-page="academy"] .academy-course-icon{background:linear-gradient(180deg,rgba(255,249,234,.94),rgba(244,221,164,.98));border:1px solid rgba(160,115,39,.2);box-shadow:inset 0 1px 0 rgba(255,255,255,.5),0 12px 20px rgba(124,83,21,.12);}
body[data-page="academy"] .academy-course-cta{border:1px solid rgba(91,58,15,.22);background:linear-gradient(135deg,#72501f,#4c3213);box-shadow:0 12px 24px rgba(76,50,19,.22);color:#fff7e7;}
body[data-page="academy"] .academy-course-cta:hover{filter:none;background:linear-gradient(135deg,#805824,#563818);box-shadow:0 15px 28px rgba(76,50,19,.28);}
body[data-page="academy"] .academy-course-card:hover,
body[data-page="academy"] .academy-course-card:focus-visible{transform:translateY(-2px);border-color:rgba(132,90,22,.42);box-shadow:0 22px 40px rgba(93,61,13,.22),inset 0 1px 0 rgba(255,255,255,.42);outline:none;}

/* STEP 104C — Accademia icone contestuali più grandi */

/* STEP 104D — Accademia: card modale più evidenti + quiz premium */
.academy-lesson-body{background:linear-gradient(180deg,#f4f8f5 0%,#eef5f1 100%);}
.academy-lesson-block{position:relative;padding:22px;border:1px solid #cfe0d3;border-radius:22px;background:linear-gradient(180deg,#ffffff 0%,#fbfdfb 100%);box-shadow:0 14px 30px rgba(15,23,42,.06);}
.academy-lesson-block::before{content:"";position:absolute;left:0;top:18px;bottom:18px;width:4px;border-radius:999px;background:linear-gradient(180deg,#1f9d63,#0f7a4f);opacity:.95;}
.academy-lesson-block h3{margin:0 0 10px;color:#0b2f26;font-size:19px;letter-spacing:-.025em;}
.academy-lesson-block p{color:#4b5563;font-size:15px;line-height:1.7;font-weight:700;}
.academy-lesson-block.is-summary{background:linear-gradient(135deg,#eef8f1 0%,#ffffff 100%);border-color:#bfe0ca;box-shadow:0 18px 34px rgba(20,94,62,.08);}
.academy-lesson-block.academy-lesson-action-box{background:linear-gradient(135deg,#f7fbf8 0%,#ffffff 100%);}
.academy-lesson-block.academy-lesson-quiz{padding:24px;border-color:#d8d2b8;background:radial-gradient(circle at top right,rgba(255,244,210,.8),transparent 26%),linear-gradient(135deg,#fff8e8 0%,#ffffff 46%,#f7fbf8 100%);box-shadow:0 18px 38px rgba(126,95,24,.12);}
.academy-lesson-block.academy-lesson-quiz::before{background:linear-gradient(180deg,#d2a53c,#9d6f17);}
.academy-lesson-quiz h3{display:flex;align-items:center;gap:10px;font-size:21px;color:#3f2b0d;}
.academy-lesson-quiz h3::before{content:"Quiz";display:inline-flex;align-items:center;justify-content:center;min-width:54px;height:26px;padding:0 10px;border-radius:999px;background:linear-gradient(135deg,#7b5a1e,#5e4316);color:#fff6df;font-size:11px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;box-shadow:0 8px 18px rgba(94,67,22,.24);}
.academy-lesson-quiz [data-lesson-quiz-question]{display:block;margin-top:4px;color:#4b5563;font-size:16px;font-weight:800;}
.academy-lesson-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:18px;}
.academy-lesson-option{min-height:88px;padding:18px 16px;border-radius:18px;border:1px solid #d9e7dc;background:linear-gradient(180deg,#ffffff 0%,#fbfdfb 100%);color:#0b2f26;font-size:16px;font-weight:900;line-height:1.35;cursor:pointer;text-align:center;box-shadow:0 10px 20px rgba(15,23,42,.05);transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease,background .18s ease;}
.academy-lesson-option:hover{transform:translateY(-2px);border-color:#9fbdab;box-shadow:0 14px 24px rgba(15,23,42,.08);}
.academy-lesson-option.is-selected{background:linear-gradient(135deg,#eef7f1,#ffffff);border-color:#1f9d63;box-shadow:0 16px 28px rgba(31,157,99,.16);}
.academy-lesson-feedback{margin-top:16px;padding:15px 16px;border-radius:16px;font-weight:900;line-height:1.55;box-shadow:0 10px 20px rgba(15,23,42,.04);}
.academy-lesson-feedback.is-correct{background:linear-gradient(135deg,#e9f8ef,#f8fdf9);border:1px solid #b8e2c5;color:#0f6b43;}
.academy-lesson-feedback.is-wrong{background:linear-gradient(135deg,#fff6df,#fffdfa);border:1px solid #f4d48a;color:#815500;}
@media(max-width:760px){.academy-lesson-block{padding:18px;border-radius:20px;}.academy-lesson-block::before{top:14px;bottom:14px;}.academy-lesson-option{min-height:72px;padding:16px 14px;font-size:15px;}.academy-lesson-quiz h3{font-size:19px;}}

/* STEP 105D — Accademia: accento sinistro card corretto con curvatura morbida */
.academy-lesson-body{
  padding:30px 34px;
  gap:20px;
  background:linear-gradient(180deg,#f4f8f5 0%,#edf5f0 100%);
}
.academy-lesson-block{
  --academy-card-accent:#1f9d63;
  --academy-card-accent-deep:#0f7a4f;
  position:relative;
  min-height:118px;
  overflow:visible;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:10px;
  padding:24px 28px 24px 42px;
  border-radius:22px;
  border:1px solid #c9ddcf;
  background:
    linear-gradient(90deg,rgba(31,157,99,.045) 0%,rgba(31,157,99,.018) 42px,rgba(255,255,255,0) 112px),
    linear-gradient(180deg,#ffffff 0%,#fbfdfb 100%);
  box-shadow:
    0 16px 34px rgba(15,23,42,.07),
    inset 0 1px 0 rgba(255,255,255,.86),
    inset 1px 0 0 rgba(255,255,255,.92);
}
.academy-lesson-block::before{
  content:"";
  position:absolute;
  z-index:0;
  left:-1px;
  top:-1px;
  bottom:-1px;
  width:7px;
  border-radius:22px 0 0 22px;
  background:linear-gradient(180deg,var(--academy-card-accent) 0%,var(--academy-card-accent-deep) 100%);
  box-shadow:6px 0 18px rgba(31,157,99,.10);
  pointer-events:none;
}
.academy-lesson-block::after{
  content:"";
  position:absolute;
  z-index:0;
  left:7px;
  top:1px;
  bottom:1px;
  width:22px;
  border-radius:20px 0 0 20px;
  background:linear-gradient(90deg,rgba(31,157,99,.07) 0%,rgba(31,157,99,.025) 54%,rgba(31,157,99,0) 100%);
  pointer-events:none;
}
.academy-lesson-block > *{
  position:relative;
  z-index:1;
}
.academy-lesson-block h3{
  margin:0;
  color:#0b2f26;
  font-size:21px;
  line-height:1.15;
  letter-spacing:-.035em;
}
.academy-lesson-block p{
  max-width:820px;
  margin:0;
  color:#4b5563;
  font-size:16px;
  line-height:1.68;
  font-weight:700;
}
.academy-lesson-block.is-summary{
  min-height:126px;
  border-color:#b9dcc5;
  background:
    linear-gradient(90deg,rgba(31,157,99,.055) 0%,rgba(31,157,99,.02) 46px,rgba(255,255,255,0) 116px),
    radial-gradient(circle at top left,rgba(31,157,99,.08),transparent 34%),
    linear-gradient(135deg,#f3fbf6 0%,#ffffff 100%);
  box-shadow:0 18px 34px rgba(20,94,62,.08), inset 0 1px 0 rgba(255,255,255,.86), inset 1px 0 0 rgba(255,255,255,.92);
}
.academy-lesson-action-box{
  min-height:132px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  justify-content:initial;
  column-gap:22px;
  row-gap:16px;
  padding-right:28px;
  background:
    linear-gradient(90deg,rgba(31,157,99,.05) 0%,rgba(31,157,99,.018) 46px,rgba(255,255,255,0) 116px),
    linear-gradient(135deg,#f7fbf8 0%,#ffffff 100%);
}
.academy-lesson-action-box .btn{
  min-height:54px;
  align-self:center;
  justify-content:center;
  padding-inline:22px;
  border-radius:14px;
  white-space:nowrap;
  box-shadow:0 16px 28px rgba(31,157,99,.18);
}
.academy-lesson-block.academy-lesson-quiz{
  --academy-card-accent:#d2a53c;
  --academy-card-accent-deep:#7b5a1e;
  min-height:150px;
  padding:28px 30px 28px 42px;
  border-color:#d6c98f;
  background:
    linear-gradient(90deg,rgba(217,170,63,.07) 0%,rgba(217,170,63,.026) 48px,rgba(255,255,255,0) 118px),
    radial-gradient(circle at 94% 0%,rgba(255,236,176,.88),transparent 28%),
    linear-gradient(135deg,#fff8e7 0%,#fffdf7 48%,#f5fbf7 100%);
  box-shadow:0 20px 42px rgba(126,95,24,.14), inset 0 1px 0 rgba(255,255,255,.78), inset 1px 0 0 rgba(255,255,255,.86);
}
.academy-lesson-block.academy-lesson-quiz::before{
  width:7px;
  border-radius:22px 0 0 22px;
  background:linear-gradient(180deg,#e0b449 0%,#b98622 48%,#7b5a1e 100%);
  box-shadow:6px 0 18px rgba(126,95,24,.10);
}
.academy-lesson-block.academy-lesson-quiz::after{
  left:7px;
  top:1px;
  bottom:1px;
  width:22px;
  border-radius:20px 0 0 20px;
  background:linear-gradient(90deg,rgba(217,170,63,.075) 0%,rgba(217,170,63,.028) 55%,rgba(217,170,63,0) 100%);
}
.academy-lesson-quiz h3{
  display:flex;
  align-items:center;
  gap:12px;
  font-size:23px;
  color:#3f2b0d;
}
.academy-lesson-quiz h3::before{
  content:"Quiz";
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:62px;
  height:30px;
  padding:0 10px;
  border-radius:12px;
  background:linear-gradient(135deg,#7b5a1e,#5e4316);
  color:#fff6df;
  font-size:11px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  box-shadow:0 8px 18px rgba(94,67,22,.24);
}
.academy-lesson-quiz [data-lesson-quiz-question]{
  display:block;
  margin-top:0;
  color:#5f4a21;
  font-size:16px;
  line-height:1.58;
  font-weight:800;
}
.academy-lesson-options{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  margin-top:20px;
}
.academy-lesson-option{
  min-height:88px;
  padding:18px 16px;
  border-radius:18px;
  border:1px solid #d9e7dc;
  background:linear-gradient(180deg,#ffffff 0%,#fbfdfb 100%);
  color:#0b2f26;
  font-size:16px;
  font-weight:900;
  line-height:1.35;
  cursor:pointer;
  text-align:center;
  box-shadow:0 10px 20px rgba(15,23,42,.05);
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease,background .18s ease;
}
.academy-lesson-option:hover{
  transform:translateY(-2px);
  border-color:#9fbdab;
  box-shadow:0 14px 24px rgba(15,23,42,.08);
}
.academy-lesson-option.is-selected{
  background:linear-gradient(135deg,#eef7f1,#ffffff);
  border-color:#1f9d63;
  box-shadow:0 16px 28px rgba(31,157,99,.16);
}
.academy-lesson-feedback{
  margin-top:16px;
  padding:15px 16px;
  border-radius:16px;
  font-weight:900;
  line-height:1.55;
  box-shadow:0 10px 20px rgba(15,23,42,.04);
}
.academy-lesson-feedback.is-correct{
  background:linear-gradient(135deg,#e9f8ef,#f8fdf9);
  border:1px solid #b8e2c5;
  color:#0f6b43;
}
.academy-lesson-feedback.is-wrong{
  background:linear-gradient(135deg,#fff6df,#fffdfa);
  border:1px solid #f4d48a;
  color:#815500;
}
@media(max-width:760px){
  .academy-lesson-body{
    padding:18px;
    gap:16px;
  }
  .academy-lesson-block{
    min-height:auto;
    padding:22px 20px 22px 38px;
    border-radius:20px;
  }
  .academy-lesson-block::before{
    left:-1px;
    top:-1px;
    bottom:-1px;
    width:6px;
    border-radius:20px 0 0 20px;
  }
  .academy-lesson-block::after{
    left:6px;
    top:1px;
    bottom:1px;
    width:18px;
    border-radius:18px 0 0 18px;
  }
  .academy-lesson-block h3{
    font-size:19px;
  }
  .academy-lesson-block p{
    font-size:15px;
  }
  .academy-lesson-action-box{
    grid-template-columns:1fr;
    padding-right:20px;
  }
  .academy-lesson-action-box .btn{
    width:100%;
  }
  .academy-lesson-block.academy-lesson-quiz{
    padding:24px 20px 24px 38px;
  }
  .academy-lesson-quiz h3{
    align-items:flex-start;
    flex-direction:column;
    font-size:20px;
  }
  .academy-lesson-option{
    min-height:72px;
    padding:16px 14px;
    font-size:15px;
  }
}

/* STEP 105E — Accademia: contenimento geometrico accento card e quiz */
.academy-lesson-block{
  position:relative;
  isolation:isolate;
  overflow:hidden;
  box-sizing:border-box;
  align-items:stretch;
  justify-content:flex-start;
  padding:26px 28px 26px 44px;
  background:
    linear-gradient(90deg,var(--academy-card-accent) 0 7px,rgba(31,157,99,.055) 7px 28px,rgba(31,157,99,.018) 28px 74px,rgba(255,255,255,0) 128px),
    linear-gradient(180deg,#ffffff 0%,#fbfdfb 100%);
}
.academy-lesson-block::before,
.academy-lesson-block::after{
  content:none !important;
  display:none !important;
}
.academy-lesson-block.is-summary{
  background:
    linear-gradient(90deg,var(--academy-card-accent) 0 7px,rgba(31,157,99,.06) 7px 30px,rgba(31,157,99,.02) 30px 76px,rgba(255,255,255,0) 128px),
    radial-gradient(circle at top left,rgba(31,157,99,.075),transparent 34%),
    linear-gradient(135deg,#f3fbf6 0%,#ffffff 100%);
}
.academy-lesson-action-box{
  overflow:hidden;
  background:
    linear-gradient(90deg,var(--academy-card-accent) 0 7px,rgba(31,157,99,.055) 7px 30px,rgba(31,157,99,.018) 30px 76px,rgba(255,255,255,0) 128px),
    linear-gradient(135deg,#f7fbf8 0%,#ffffff 100%);
}
.academy-lesson-block.academy-lesson-quiz{
  overflow:hidden;
  min-height:auto;
  align-items:stretch;
  justify-content:flex-start;
  padding:28px 30px 30px 44px;
  background:
    linear-gradient(90deg,#d2a53c 0 7px,rgba(217,170,63,.08) 7px 30px,rgba(217,170,63,.026) 30px 78px,rgba(255,255,255,0) 130px),
    radial-gradient(circle at 94% 0%,rgba(255,236,176,.82),transparent 28%),
    linear-gradient(135deg,#fff8e7 0%,#fffdf7 52%,#f5fbf7 100%);
}
.academy-lesson-quiz h3{
  position:static;
  margin:0 0 4px;
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:12px;
  line-height:1.18;
}
.academy-lesson-quiz h3::before{
  position:static;
  flex:0 0 auto;
  transform:none;
  margin:0;
}
.academy-lesson-options{
  width:100%;
  box-sizing:border-box;
  margin-top:20px;
  margin-bottom:0;
}
.academy-lesson-option{
  box-sizing:border-box;
}
@media(max-width:760px){
  .academy-lesson-block{
    padding:22px 20px 22px 40px;
    background:
      linear-gradient(90deg,var(--academy-card-accent) 0 6px,rgba(31,157,99,.055) 6px 25px,rgba(31,157,99,.018) 25px 64px,rgba(255,255,255,0) 110px),
      linear-gradient(180deg,#ffffff 0%,#fbfdfb 100%);
  }
  .academy-lesson-block.is-summary{
    background:
      linear-gradient(90deg,var(--academy-card-accent) 0 6px,rgba(31,157,99,.06) 6px 25px,rgba(31,157,99,.02) 25px 64px,rgba(255,255,255,0) 110px),
      radial-gradient(circle at top left,rgba(31,157,99,.075),transparent 34%),
      linear-gradient(135deg,#f3fbf6 0%,#ffffff 100%);
  }
  .academy-lesson-action-box{
    background:
      linear-gradient(90deg,var(--academy-card-accent) 0 6px,rgba(31,157,99,.055) 6px 25px,rgba(31,157,99,.018) 25px 64px,rgba(255,255,255,0) 110px),
      linear-gradient(135deg,#f7fbf8 0%,#ffffff 100%);
  }
  .academy-lesson-block.academy-lesson-quiz{
    padding:24px 20px 26px 40px;
    background:
      linear-gradient(90deg,#d2a53c 0 6px,rgba(217,170,63,.08) 6px 25px,rgba(217,170,63,.026) 25px 66px,rgba(255,255,255,0) 112px),
      radial-gradient(circle at 94% 0%,rgba(255,236,176,.82),transparent 28%),
      linear-gradient(135deg,#fff8e7 0%,#fffdf7 52%,#f5fbf7 100%);
  }
  .academy-lesson-quiz h3{
    align-items:flex-start;
    flex-direction:column;
  }
}


/* STEP 105F — Accademia: layout modale lezioni semplificato e quiz sempre leggibile */
.academy-lesson-dialog{
  width:min(980px,calc(100vw - 42px));
  max-height:calc(100vh - 32px);
}
.academy-lesson-head{
  flex:0 0 auto;
}
.academy-lesson-body{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  display:flex;
  flex-direction:column;
  gap:18px;
  padding:28px 34px 32px;
  scroll-padding-bottom:32px;
  background:linear-gradient(180deg,#f4f8f5 0%,#edf5f0 100%);
}
.academy-lesson-footer{
  flex:0 0 auto;
}
.academy-lesson-block,
.academy-lesson-block.is-summary,
.academy-lesson-action-box,
.academy-lesson-block.academy-lesson-quiz{
  --academy-card-accent:#1f9d63;
  position:relative;
  isolation:isolate;
  overflow:hidden;
  flex:0 0 auto;
  box-sizing:border-box;
  width:100%;
  min-height:auto;
  display:block;
  padding:24px 28px 24px 34px;
  border-radius:22px;
  border:1px solid #c7dccd;
  background:linear-gradient(180deg,#ffffff 0%,#fbfdfb 100%);
  box-shadow:0 16px 34px rgba(15,23,42,.07), inset 0 1px 0 rgba(255,255,255,.86);
}
.academy-lesson-block::before,
.academy-lesson-block::after,
.academy-lesson-block.is-summary::before,
.academy-lesson-block.is-summary::after,
.academy-lesson-action-box::before,
.academy-lesson-action-box::after,
.academy-lesson-block.academy-lesson-quiz::before,
.academy-lesson-block.academy-lesson-quiz::after{
  content:none !important;
  display:none !important;
}
.academy-lesson-block{
  background:
    linear-gradient(90deg,var(--academy-card-accent) 0 5px,rgba(31,157,99,.055) 5px 26px,rgba(31,157,99,0) 92px),
    linear-gradient(180deg,#ffffff 0%,#fbfdfb 100%);
}
.academy-lesson-block.is-summary{
  background:
    linear-gradient(90deg,#1f9d63 0 5px,rgba(31,157,99,.06) 5px 28px,rgba(31,157,99,0) 94px),
    linear-gradient(135deg,#f3fbf6 0%,#ffffff 100%);
}
.academy-lesson-action-box{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:18px 22px;
  background:
    linear-gradient(90deg,#1f9d63 0 5px,rgba(31,157,99,.055) 5px 28px,rgba(31,157,99,0) 94px),
    linear-gradient(135deg,#f7fbf8 0%,#ffffff 100%);
}
.academy-lesson-action-box .btn{
  min-height:54px;
  border-radius:14px;
  justify-content:center;
  white-space:nowrap;
}
.academy-lesson-block h3{
  margin:0 0 10px;
  font-size:21px;
  line-height:1.18;
  color:#0b2f26;
  letter-spacing:-.035em;
}
.academy-lesson-block p{
  margin:0;
  max-width:880px;
  color:#4b5563;
  font-size:16px;
  line-height:1.62;
  font-weight:750;
}
.academy-lesson-block.academy-lesson-quiz{
  --academy-card-accent:#d2a53c;
  min-height:330px;
  padding:28px 30px 32px 34px;
  border-color:#d7c78a;
  background:
    linear-gradient(90deg,#d2a53c 0 5px,rgba(217,170,63,.09) 5px 30px,rgba(217,170,63,0) 98px),
    radial-gradient(circle at 94% 0%,rgba(255,236,176,.72),transparent 28%),
    linear-gradient(135deg,#fff8e7 0%,#fffdf7 52%,#f5fbf7 100%);
  box-shadow:0 18px 38px rgba(126,95,24,.14), inset 0 1px 0 rgba(255,255,255,.78);
}
.academy-lesson-quiz h3{
  position:relative;
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:12px;
  margin:0 0 16px;
  color:#3f2b0d;
  font-size:25px;
  line-height:1.14;
  letter-spacing:-.04em;
}
.academy-lesson-quiz h3::before{
  content:"Quiz";
  position:static;
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:70px;
  height:34px;
  padding:0 13px;
  border-radius:12px;
  background:linear-gradient(135deg,#7b5a1e,#5e4316);
  color:#fff6df;
  font-size:11px;
  font-weight:950;
  letter-spacing:.08em;
  text-transform:uppercase;
  box-shadow:0 8px 18px rgba(94,67,22,.22);
}
.academy-lesson-quiz [data-lesson-quiz-question]{
  display:block;
  margin:0 0 18px;
  color:#5f4a21;
  font-size:17px;
  line-height:1.45;
  font-weight:900;
}
.academy-lesson-options{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
  width:100%;
  margin:0;
  box-sizing:border-box;
}
.academy-lesson-option{
  box-sizing:border-box;
  min-height:92px;
  padding:18px 16px;
  border-radius:18px;
  border:1px solid #d9e7dc;
  background:linear-gradient(180deg,#ffffff 0%,#fbfdfb 100%);
  color:#0b2f26;
  font-size:16px;
  font-weight:950;
  line-height:1.35;
  text-align:center;
  box-shadow:0 10px 20px rgba(15,23,42,.055);
}
.academy-lesson-feedback{
  margin-top:16px;
}
@media(max-width:760px){
  .academy-lesson-dialog{
    width:100%;
    max-height:calc(100vh - 24px);
  }
  .academy-lesson-body{
    padding:18px 16px 24px;
    gap:16px;
  }
  .academy-lesson-block,
  .academy-lesson-block.is-summary,
  .academy-lesson-action-box,
  .academy-lesson-block.academy-lesson-quiz{
    padding:22px 18px 22px 30px;
    border-radius:20px;
    background:
      linear-gradient(90deg,var(--academy-card-accent) 0 5px,rgba(31,157,99,.055) 5px 24px,rgba(31,157,99,0) 78px),
      linear-gradient(180deg,#ffffff 0%,#fbfdfb 100%);
  }
  .academy-lesson-block.academy-lesson-quiz{
    min-height:auto;
    padding:24px 18px 26px 30px;
    background:
      linear-gradient(90deg,#d2a53c 0 5px,rgba(217,170,63,.09) 5px 24px,rgba(217,170,63,0) 80px),
      radial-gradient(circle at 94% 0%,rgba(255,236,176,.72),transparent 28%),
      linear-gradient(135deg,#fff8e7 0%,#fffdf7 52%,#f5fbf7 100%);
  }
  .academy-lesson-action-box{
    grid-template-columns:1fr;
  }
  .academy-lesson-action-box .btn{
    width:100%;
  }
  .academy-lesson-quiz h3{
    align-items:flex-start;
    flex-direction:column;
    font-size:21px;
    margin-bottom:14px;
  }
  .academy-lesson-options{
    grid-template-columns:1fr;
    gap:12px;
  }
  .academy-lesson-option{
    min-height:72px;
    padding:16px 14px;
    font-size:15px;
  }
}


/* STEP 106 — Academy: UX lezioni ristrutturata senza modale */
body[data-page="academy"] .academy-v2-content{padding:26px 28px 118px;display:grid;gap:22px;}
body[data-page="academy"] .academy-v2-hero{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(320px,.65fr);gap:24px;align-items:stretch;padding:30px;background:radial-gradient(circle at 8% 0%,rgba(31,157,99,.13),transparent 34%),linear-gradient(135deg,#ffffff 0%,#f0f8f2 100%);}
body[data-page="academy"] .academy-v2-eyebrow{display:inline-flex;align-items:center;gap:9px;margin:0 0 10px;color:#0f7a4f;font-size:13px;font-weight:950;letter-spacing:.11em;text-transform:uppercase;}
body[data-page="academy"] .academy-v2-eyebrow img{width:19px;height:19px;object-fit:contain;filter:drop-shadow(0 3px 6px rgba(15,122,79,.14));}
body[data-page="academy"] .academy-v2-hero h2{margin:0 0 12px;color:#0b2f26;font-size:42px;line-height:1.02;letter-spacing:-.055em;}
body[data-page="academy"] .academy-v2-hero p{max-width:780px;margin:0;color:#4b5563;font-size:18px;line-height:1.6;font-weight:650;}
body[data-page="academy"] .academy-v2-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:22px;}
body[data-page="academy"] .academy-v2-actions .btn span,body[data-page="academy"] .academy-v2-continue .btn span,body[data-page="academy"] .academy-v2-next-lesson .btn span{font-size:15px;}
body[data-page="academy"] .academy-v2-continue{border:1px solid rgba(15,122,79,.16);border-radius:18px;padding:22px;background:linear-gradient(180deg,#ffffff,#eef8f1);box-shadow:inset 0 1px 0 rgba(255,255,255,.86),0 16px 30px rgba(15,23,42,.07);display:grid;align-content:center;gap:9px;}
body[data-page="academy"] .academy-v2-card-icon{width:66px;height:66px;border-radius:18px;display:grid;place-items:center;background:rgba(31,157,99,.13);border:1px solid rgba(31,157,99,.14);font-size:34px;box-shadow:inset 0 1px 0 rgba(255,255,255,.65);}
body[data-page="academy"] .academy-v2-continue small{color:#0f7a4f;font-weight:950;text-transform:uppercase;letter-spacing:.08em;font-size:12px;}
body[data-page="academy"] .academy-v2-continue strong{font-size:23px;color:#0b2f26;line-height:1.14;letter-spacing:-.025em;}
body[data-page="academy"] .academy-v2-continue p{font-size:14px;margin:0;color:#607166;font-weight:750;}
body[data-page="academy"] .academy-v2-progress{height:10px;border-radius:99px;background:#dbe7de;overflow:hidden;margin:4px 0 8px;}
body[data-page="academy"] .academy-v2-progress i{display:block;height:100%;border-radius:99px;background:linear-gradient(135deg,#20a464,#0f7a4f);}
body[data-page="academy"] .academy-v2-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;}
body[data-page="academy"] .academy-v2-stats article{min-height:106px;border-radius:18px;padding:18px 18px;border:1px solid #dce5dd;background:linear-gradient(180deg,#ffffff,#f7fbf8);box-shadow:0 12px 28px rgba(15,23,42,.06);display:flex;align-items:center;gap:15px;}
body[data-page="academy"] .academy-v2-stats span{width:48px;height:48px;border-radius:15px;display:grid;place-items:center;background:#edf7f1;border:1px solid #dcebdd;font-size:24px;}
body[data-page="academy"] .academy-v2-stats strong{display:block;color:#0b2f26;font-size:25px;line-height:1;font-weight:950;letter-spacing:-.04em;}
body[data-page="academy"] .academy-v2-stats small{display:block;margin-top:5px;color:#6b7280;font-size:13px;font-weight:800;line-height:1.25;}
body[data-page="academy"] .academy-v2-layout{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(300px,.65fr);gap:18px;align-items:stretch;}
body[data-page="academy"] .academy-v2-feature,body[data-page="academy"] .academy-v2-side-note,body[data-page="academy"] .academy-v2-glossary,body[data-page="academy"] .academy-v2-roadmap{background:linear-gradient(180deg,#ffffff,#f8fbf8);}
body[data-page="academy"] .academy-v2-section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:18px;}
body[data-page="academy"] .academy-v2-section-head h2{margin:0;color:#0b2f26;font-size:28px;line-height:1.1;letter-spacing:-.04em;}
body[data-page="academy"] .academy-v2-section-head p{margin:8px 0 0;color:#4b5563;font-size:15px;line-height:1.55;font-weight:650;}
body[data-page="academy"] .academy-v2-next-lesson{display:grid;grid-template-columns:58px minmax(0,1fr) auto;gap:16px;align-items:center;padding:18px;border-radius:17px;border:1px solid #dce5dd;background:#f7fbf8;}
body[data-page="academy"] .academy-v2-lesson-number{width:52px;height:52px;border-radius:15px;background:#0f7a4f;color:#fff;display:grid;place-items:center;font-size:18px;font-weight:950;box-shadow:0 12px 24px rgba(15,122,79,.2);}
body[data-page="academy"] .academy-v2-next-lesson strong{display:block;color:#0b2f26;font-size:20px;line-height:1.15;margin-bottom:5px;}
body[data-page="academy"] .academy-v2-next-lesson small{display:block;color:#6b7280;font-weight:700;line-height:1.4;}
body[data-page="academy"] .academy-v2-mini-nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:14px;}
body[data-page="academy"] .academy-v2-mini-nav span{padding:12px;border-radius:13px;background:#eef7f1;border:1px solid #dcebdd;color:#12382c;font-size:13px;font-weight:900;text-align:center;}
body[data-page="academy"] .academy-v2-mini-nav b{display:inline-flex;margin-right:5px;color:#0f7a4f;}
body[data-page="academy"] .academy-v2-side-note{display:grid;align-content:center;gap:12px;}
body[data-page="academy"] .academy-v2-side-note h2{margin:0;color:#0b2f26;font-size:24px;letter-spacing:-.035em;}
body[data-page="academy"] .academy-v2-side-note p{margin:0;color:#4b5563;line-height:1.6;font-weight:650;}
body[data-page="academy"] .academy-v2-side-note small{display:block;padding:13px 14px;border-radius:14px;background:rgba(124,77,255,.08);border:1px solid rgba(124,77,255,.15);color:#5b4b88;font-weight:800;line-height:1.4;}
body[data-page="academy"] .academy-v2-section{display:grid;gap:16px;}
body[data-page="academy"] .academy-v2-label{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:7px 12px;border-radius:12px;background:rgba(31,157,99,.1);border:1px solid rgba(31,157,99,.18);color:#0f7a4f;font-size:13px;font-weight:950;white-space:nowrap;}
body[data-page="academy"] .academy-v2-path-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;}
body[data-page="academy"] .academy-v2-path-card{display:flex;flex-direction:column;gap:14px;min-height:380px;border:1px solid rgba(131,89,27,.18);background:radial-gradient(circle at 18% 10%,rgba(255,248,224,.7),transparent 23%),linear-gradient(135deg,#fffaf0 0%,#f6e7bd 48%,#ead18b 100%);box-shadow:0 18px 34px rgba(93,61,13,.12),inset 0 1px 0 rgba(255,255,255,.42);}
body[data-page="academy"] .academy-v2-path-top{display:flex;align-items:center;justify-content:flex-start;gap:16px;}
body[data-page="academy"] .academy-v2-path-top span{width:56px;height:56px;border-radius:16px;display:grid;place-items:center;background:linear-gradient(180deg,rgba(255,249,234,.95),rgba(244,221,164,.98));border:1px solid rgba(160,115,39,.2);font-size:27px;}
body[data-page="academy"] .academy-v2-path-top small{color:#7a551c;font-size:13.5px;font-weight:950;text-transform:uppercase;letter-spacing:.025em;text-align:left;line-height:1.15;}
body[data-page="academy"] .academy-v2-path-card h3{margin:0;color:#45290f;font-size:23px;line-height:1.12;letter-spacing:-.04em;}
body[data-page="academy"] .academy-v2-path-card p{margin:0;color:#65441b;font-weight:700;line-height:1.5;}
body[data-page="academy"] .academy-v2-path-card ul{list-style:none;margin:auto 0 0;padding:0;display:grid;gap:9px;}
body[data-page="academy"] .academy-v2-path-card li{display:flex;align-items:center;gap:8px;color:#553918;font-size:14px;font-weight:850;line-height:1.3;}
body[data-page="academy"] .academy-v2-open{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:12px 16px;border-radius:14px;border:1px solid rgba(91,58,15,.22);background:linear-gradient(135deg,#72501f,#4c3213);box-shadow:0 12px 24px rgba(76,50,19,.2);color:#fff7e7;font-size:15px;font-weight:950;text-decoration:none;}
body[data-page="academy"] .academy-v2-open:hover{background:linear-gradient(135deg,#805824,#563818);box-shadow:0 15px 28px rgba(76,50,19,.26);}
body[data-page="academy"] .academy-v2-glossary dl{display:grid;gap:12px;margin:0;}
body[data-page="academy"] .academy-v2-glossary dl div{padding:14px;border-radius:14px;background:#f7fbf8;border:1px solid #e0ebe2;}
body[data-page="academy"] .academy-v2-glossary dt{font-size:16px;font-weight:950;color:#0b2f26;margin-bottom:5px;}
body[data-page="academy"] .academy-v2-glossary dd{margin:0;color:#4b5563;font-weight:650;line-height:1.45;}
body[data-page="academy"] .academy-v2-topic-list{display:grid;gap:12px;}
body[data-page="academy"] .academy-v2-topic-list span{display:flex;align-items:center;gap:10px;padding:14px;border-radius:14px;background:#f7fbf8;border:1px solid #e0ebe2;color:#0b2f26;font-weight:850;}
body[data-page="academy"] .academy-v2-topic-list b{width:34px;height:34px;border-radius:11px;display:grid;place-items:center;background:#e9f4ed;color:#0f7a4f;}
body[data-page="academy"] .academy-lesson-breadcrumb{display:flex;align-items:center;gap:10px;font-size:14px;font-weight:850;color:#6b7280;}
body[data-page="academy"] .academy-lesson-breadcrumb a{color:#0f7a4f;text-decoration:none;font-weight:950;}
body[data-page="academy"] .academy-lesson-breadcrumb strong{color:#0b2f26;}
body[data-page="academy"] .academy-lesson-hero-v2{display:grid;grid-template-columns:92px minmax(0,1fr) auto;gap:20px;align-items:center;padding:28px;background:radial-gradient(circle at 8% 0%,rgba(31,157,99,.13),transparent 34%),linear-gradient(135deg,#ffffff,#f0f8f2);}
body[data-page="academy"] .academy-lesson-hero-icon{width:86px;height:86px;border-radius:23px;display:grid;place-items:center;background:rgba(31,157,99,.13);border:1px solid rgba(31,157,99,.15);font-size:45px;box-shadow:inset 0 1px 0 rgba(255,255,255,.7);}
body[data-page="academy"] .academy-lesson-hero-v2 h2{margin:0 0 8px;color:#0b2f26;font-size:38px;line-height:1.08;letter-spacing:-.055em;}
body[data-page="academy"] .academy-lesson-hero-v2 p{margin:0;color:#4b5563;font-size:17px;line-height:1.55;font-weight:700;max-width:860px;}
body[data-page="academy"] .academy-lesson-meta-v2{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px;}
body[data-page="academy"] .academy-lesson-meta-v2 span{display:inline-flex;align-items:center;gap:7px;min-height:34px;padding:7px 11px;border-radius:12px;background:rgba(31,157,99,.09);border:1px solid rgba(31,157,99,.16);color:#0b2f26;font-weight:900;font-size:13px;}
body[data-page="academy"] .academy-lesson-meta-v2 i{font-style:normal;}
body[data-page="academy"] .academy-lesson-hero-actions{display:grid;gap:10px;justify-items:stretch;min-width:210px;}
body[data-page="academy"] .academy-lesson-grid-v2{display:grid;grid-template-columns:270px minmax(0,1fr);gap:18px;align-items:start;}
body[data-page="academy"] .academy-lesson-nav-card{position:sticky;top:96px;display:grid;gap:9px;background:linear-gradient(180deg,#ffffff,#f7fbf8);}
body[data-page="academy"] .academy-lesson-nav-card strong{display:block;color:#0b2f26;font-size:18px;margin-bottom:4px;}
body[data-page="academy"] .academy-lesson-nav-card a{display:flex;align-items:center;gap:9px;min-height:42px;padding:10px 12px;border-radius:13px;background:#f1f8f3;border:1px solid #dcebdd;color:#12382c;text-decoration:none;font-size:14px;font-weight:900;}
body[data-page="academy"] .academy-lesson-nav-card a:hover{background:#e7f4ec;}
body[data-page="academy"] .academy-lesson-flow-v2{display:grid;gap:16px;}
body[data-page="academy"] .academy-lesson-section-card{display:grid;grid-template-columns:58px minmax(0,1fr);gap:17px;align-items:start;background:linear-gradient(180deg,#ffffff,#f9fcfa);border-color:#dce5dd;}
body[data-page="academy"] .academy-lesson-section-icon{width:54px;height:54px;border-radius:16px;display:grid;place-items:center;background:#edf7f1;border:1px solid #dcebdd;font-size:25px;}
body[data-page="academy"] .academy-lesson-section-card span{display:block;margin-bottom:5px;color:#0f7a4f;font-size:12px;font-weight:950;letter-spacing:.11em;text-transform:uppercase;}
body[data-page="academy"] .academy-lesson-section-card h3{margin:0 0 8px;color:#0b2f26;font-size:24px;line-height:1.15;letter-spacing:-.035em;}
body[data-page="academy"] .academy-lesson-section-card p{margin:0;color:#4b5563;font-size:16px;line-height:1.72;font-weight:700;}
body[data-page="academy"] .academy-lesson-link-card{grid-template-columns:58px minmax(0,1fr) auto;align-items:center;background:linear-gradient(135deg,#f7fbf8,#ffffff);}
body[data-page="academy"] .academy-lesson-link-card .btn{white-space:nowrap;}
body[data-page="academy"] .academy-lesson-quiz-card-v2{background:radial-gradient(circle at top right,rgba(255,244,210,.75),transparent 30%),linear-gradient(135deg,#fff8e8 0%,#ffffff 52%,#f8fbf8 100%);border-color:#d8d2b8;box-shadow:0 18px 38px rgba(126,95,24,.10);}
body[data-page="academy"] .academy-lesson-quiz-head-v2{display:flex;align-items:center;gap:16px;margin-bottom:18px;}
body[data-page="academy"] .academy-lesson-quiz-head-v2 > span{width:56px;height:56px;border-radius:16px;display:grid;place-items:center;background:linear-gradient(135deg,#7b5a1e,#5e4316);color:#fff6df;font-size:25px;box-shadow:0 12px 22px rgba(94,67,22,.22);}
body[data-page="academy"] .academy-lesson-quiz-head-v2 small{display:block;color:#7b5a1e;font-size:12px;font-weight:950;text-transform:uppercase;letter-spacing:.12em;margin-bottom:5px;}
body[data-page="academy"] .academy-lesson-quiz-head-v2 h3{margin:0;color:#3f2b0d;font-size:24px;line-height:1.2;letter-spacing:-.035em;}
body[data-page="academy"] .academy-lesson-options-v2{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;}
body[data-page="academy"] .academy-lesson-option-v2{min-height:88px;padding:18px 16px;border-radius:18px;border:1px solid #d9e7dc;background:linear-gradient(180deg,#ffffff,#fbfdfb);color:#0b2f26;font-size:16px;font-weight:950;line-height:1.35;cursor:pointer;text-align:center;box-shadow:0 10px 20px rgba(15,23,42,.05);transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease,background .18s ease;}
body[data-page="academy"] .academy-lesson-option-v2:hover{transform:translateY(-2px);border-color:#9fbdab;box-shadow:0 14px 24px rgba(15,23,42,.08);}
body[data-page="academy"] .academy-lesson-option-v2.is-selected{background:linear-gradient(135deg,#eef7f1,#ffffff);border-color:#1f9d63;box-shadow:0 16px 28px rgba(31,157,99,.16);}
body[data-page="academy"] .academy-lesson-feedback-v2{margin-top:16px;padding:15px 16px;border-radius:16px;font-weight:900;line-height:1.55;box-shadow:0 10px 20px rgba(15,23,42,.04);}
body[data-page="academy"] .academy-lesson-feedback-v2.is-correct{background:linear-gradient(135deg,#e9f8ef,#f8fdf9);border:1px solid #b8e2c5;color:#0f6b43;}
body[data-page="academy"] .academy-lesson-feedback-v2.is-wrong{background:linear-gradient(135deg,#fff6df,#fffdfa);border:1px solid #f4d48a;color:#815500;}
body[data-page="academy"] .academy-lesson-note{margin:14px 0 0;color:#6b7280;font-size:13px;font-weight:850;}
@media(max-width:1380px){body[data-page="academy"] .academy-v2-stats,body[data-page="academy"] .academy-v2-path-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:1060px){body[data-page="academy"] .academy-v2-hero,body[data-page="academy"] .academy-v2-layout,body[data-page="academy"] .academy-lesson-hero-v2,body[data-page="academy"] .academy-lesson-grid-v2{grid-template-columns:1fr;}body[data-page="academy"] .academy-lesson-nav-card{position:relative;top:auto;grid-template-columns:repeat(2,minmax(0,1fr));}body[data-page="academy"] .academy-lesson-nav-card strong{grid-column:1/-1;}body[data-page="academy"] .academy-lesson-hero-actions{display:flex;flex-wrap:wrap;min-width:0;}}
@media(max-width:760px){body[data-page="academy"] .academy-v2-content{padding:20px 18px 110px;}body[data-page="academy"] .academy-v2-hero,body[data-page="academy"] .academy-lesson-hero-v2{padding:22px;}body[data-page="academy"] .academy-v2-hero h2{font-size:32px;}body[data-page="academy"] .academy-lesson-hero-v2 h2{font-size:30px;}body[data-page="academy"] .academy-v2-stats,body[data-page="academy"] .academy-v2-path-grid,body[data-page="academy"] .academy-v2-mini-nav,body[data-page="academy"] .academy-lesson-options-v2,body[data-page="academy"] .academy-lesson-nav-card{grid-template-columns:1fr;}body[data-page="academy"] .academy-v2-next-lesson,body[data-page="academy"] .academy-lesson-section-card,body[data-page="academy"] .academy-lesson-link-card{grid-template-columns:1fr;}body[data-page="academy"] .academy-v2-next-lesson .btn,body[data-page="academy"] .academy-lesson-link-card .btn{width:100%;justify-content:center;}body[data-page="academy"] .academy-v2-section-head{align-items:flex-start;flex-direction:column;}body[data-page="academy"] .academy-lesson-hero-actions .btn{width:100%;justify-content:center;}}

/* STEP 107 — Academy: progressi demo lezioni */
body[data-page="academy"] .academy-v2-status-badge{
  align-self:flex-start;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:32px;
  padding:7px 11px;
  border-radius:12px;
  font-size:12px;
  font-weight:950;
  letter-spacing:.045em;
  text-transform:uppercase;
  border:1px solid rgba(91,58,15,.18);
  background:rgba(255,255,255,.48);
  color:#684616;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.58);
}
body[data-page="academy"] .academy-v2-status-badge.is-current,
body[data-page="academy"] .academy-v2-label.is-current{
  background:linear-gradient(135deg,#fff6df,#ffffff);
  border-color:rgba(245,158,11,.28);
  color:#835a10;
}
body[data-page="academy"] .academy-v2-status-badge.is-completed,
body[data-page="academy"] .academy-v2-label.is-completed{
  background:linear-gradient(135deg,#e8f8ee,#ffffff);
  border-color:rgba(31,157,99,.28);
  color:#0f6b43;
}
body[data-page="academy"] .academy-v2-status-badge.is-empty,
body[data-page="academy"] .academy-v2-label.is-empty{
  background:rgba(255,255,255,.52);
  border-color:rgba(91,58,15,.18);
  color:#684616;
}
body[data-page="academy"] .academy-v2-path-card.is-completed{
  border-color:rgba(31,157,99,.34);
  background:radial-gradient(circle at 18% 10%,rgba(232,248,238,.82),transparent 24%),linear-gradient(135deg,#f3fbf6 0%,#ffffff 50%,#e8f8ee 100%);
  box-shadow:0 18px 34px rgba(15,107,67,.12),inset 0 1px 0 rgba(255,255,255,.62);
}
body[data-page="academy"] .academy-v2-path-card.is-current{
  border-color:rgba(245,158,11,.36);
  box-shadow:0 18px 34px rgba(126,95,24,.15),inset 0 1px 0 rgba(255,255,255,.52);
}
body[data-page="academy"] [data-lesson-completion-pill]{
  transition:background .18s ease,border-color .18s ease,color .18s ease;
}
body[data-page="academy"] [data-lesson-completion-pill].is-completed{
  background:linear-gradient(135deg,#e8f8ee,#ffffff);
  border-color:rgba(31,157,99,.25);
  color:#0f6b43;
}
body[data-page="academy"] [data-complete-lesson].is-completed{
  background:linear-gradient(135deg,#0f7a4f,#0b5f3e);
  box-shadow:0 12px 24px rgba(15,122,79,.2);
}
body[data-page="academy"] .academy-lesson-bottom-nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:18px;
  background:linear-gradient(180deg,#ffffff,#f7fbf8);
}
body[data-page="academy"] .academy-lesson-step-links{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}
body[data-page="academy"] .academy-lesson-step-links .btn.is-disabled{
  opacity:.46;
  cursor:not-allowed;
  pointer-events:none;
  filter:grayscale(.25);
}
@media(max-width:760px){
  body[data-page="academy"] .academy-lesson-bottom-nav{
    align-items:stretch;
    flex-direction:column;
  }
  body[data-page="academy"] .academy-lesson-bottom-nav .btn,
  body[data-page="academy"] .academy-lesson-step-links{
    width:100%;
  }
  body[data-page="academy"] .academy-lesson-step-links{
    flex-direction:column;
    align-items:stretch;
  }
}


/* STEP 108 — Academy: UX percorso e contenuti lezioni */
body[data-page="academy"] .academy-v2-method{
  background:linear-gradient(135deg,#ffffff 0%,#f4fbf6 52%,#edf7f1 100%);
  border-color:#d7e6da;
}
body[data-page="academy"] .academy-v2-method-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}
body[data-page="academy"] .academy-v2-method-grid article{
  min-height:128px;
  padding:18px;
  border-radius:16px;
  border:1px solid #dcebdd;
  background:linear-gradient(180deg,#ffffff,#f7fbf8);
  box-shadow:0 10px 22px rgba(15,23,42,.045);
}
body[data-page="academy"] .academy-v2-method-grid b{
  width:42px;
  height:42px;
  border-radius:13px;
  display:grid;
  place-items:center;
  margin-bottom:12px;
  background:#0f7a4f;
  color:#fff;
  font-size:14px;
  box-shadow:0 10px 20px rgba(15,122,79,.18);
}
body[data-page="academy"] .academy-v2-method-grid strong{
  display:block;
  margin-bottom:7px;
  color:#0b2f26;
  font-size:18px;
  letter-spacing:-.025em;
}
body[data-page="academy"] .academy-v2-method-grid small{
  display:block;
  color:#5f6f65;
  font-size:14px;
  line-height:1.45;
  font-weight:750;
}
body[data-page="academy"] .academy-v2-card-tags{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:-2px;
}
body[data-page="academy"] .academy-v2-card-tags span{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:6px 10px;
  border-radius:11px;
  border:1px solid rgba(91,58,15,.17);
  background:rgba(255,255,255,.46);
  color:#654312;
  font-size:12px;
  font-weight:950;
}
body[data-page="academy"] .academy-v2-card-action{
  margin:0;
  padding:12px 13px;
  border-radius:14px;
  background:rgba(255,255,255,.42);
  border:1px solid rgba(91,58,15,.14);
  color:#4b3713;
  font-size:13px;
  line-height:1.4;
  font-weight:800;
}
body[data-page="academy"] .academy-v2-card-action b{
  color:#7a551c;
  font-weight:950;
}
body[data-page="academy"] .academy-v2-open i{
  font-style:normal;
}
body[data-page="academy"] .academy-lesson-outcomes{
  display:grid;
  grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr);
  gap:20px;
  align-items:center;
  background:linear-gradient(135deg,#ffffff 0%,#f4fbf6 60%,#eef7f1 100%);
  border-color:#d7e6da;
}
body[data-page="academy"] .academy-lesson-outcomes h3{
  margin:0 0 8px;
  color:#0b2f26;
  font-size:26px;
  line-height:1.15;
  letter-spacing:-.04em;
}
body[data-page="academy"] .academy-lesson-outcomes p{
  margin:0;
  color:#4b5563;
  font-size:16px;
  line-height:1.58;
  font-weight:700;
}
body[data-page="academy"] .academy-lesson-checklist{
  display:grid;
  gap:10px;
}
body[data-page="academy"] .academy-lesson-checklist span{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:12px 13px;
  border-radius:14px;
  background:#ffffff;
  border:1px solid #dcebdd;
  color:#12382c;
  font-size:14px;
  line-height:1.42;
  font-weight:850;
  box-shadow:0 8px 18px rgba(15,23,42,.04);
}
body[data-page="academy"] .academy-lesson-checklist b{
  width:22px;
  height:22px;
  border-radius:8px;
  flex:0 0 auto;
  display:grid;
  place-items:center;
  background:#e8f8ee;
  color:#0f6b43;
  font-size:13px;
}
body[data-page="academy"] .academy-lesson-method-card{
  background:linear-gradient(135deg,#ffffff,#f8fbf8);
}
body[data-page="academy"] .academy-lesson-method-steps{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin-top:12px;
}
body[data-page="academy"] .academy-lesson-method-steps article{
  padding:14px;
  border-radius:15px;
  background:#f1f8f3;
  border:1px solid #dcebdd;
}
body[data-page="academy"] .academy-lesson-method-steps b{
  display:inline-flex;
  margin:0 0 9px;
  color:#0f7a4f;
  font-size:12px;
  letter-spacing:.08em;
}
body[data-page="academy"] .academy-lesson-method-steps span{
  margin:0;
  color:#12382c;
  font-size:14px;
  line-height:1.45;
  font-weight:850;
  letter-spacing:0;
  text-transform:none;
}
body[data-page="academy"] .academy-lesson-recap{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  background:linear-gradient(135deg,#fffaf0,#ffffff 52%,#f4fbf6);
  border-color:#ded2ae;
}
body[data-page="academy"] .academy-lesson-recap h3{
  margin:0 0 7px;
  color:#3f2b0d;
  font-size:24px;
  line-height:1.15;
  letter-spacing:-.035em;
}
body[data-page="academy"] .academy-lesson-recap p{
  margin:0;
  color:#5f4a1f;
  font-size:15px;
  line-height:1.5;
  font-weight:750;
}
@media(max-width:1060px){
  body[data-page="academy"] .academy-lesson-outcomes,
  body[data-page="academy"] .academy-v2-method-grid{
    grid-template-columns:1fr;
  }
  body[data-page="academy"] .academy-lesson-method-steps{
    grid-template-columns:1fr;
  }
}
@media(max-width:760px){
  body[data-page="academy"] .academy-lesson-recap{
    align-items:stretch;
    flex-direction:column;
  }
  body[data-page="academy"] .academy-lesson-recap .btn{
    width:100%;
    justify-content:center;
  }
}

/* STEP 111 — Admin Academy: gestione corsi e lezioni in sola lettura */
body[data-page="admin-academy"] .admin-mini-kpi-card{
  display:grid;
  gap:8px;
  min-height:112px;
  padding:18px;
  border:1px solid rgba(27,106,81,.24);
  border-radius:17px;
  background:linear-gradient(135deg,#FFFFFF 0%,#F1F8F3 100%);
  box-shadow:0 14px 32px rgba(15,23,42,.08);
}
body[data-page="admin-academy"] .admin-mini-kpi-card span{
  color:#0F5E4A;
  font-size:12px;
  font-weight:900;
  letter-spacing:.10em;
  text-transform:uppercase;
}
body[data-page="admin-academy"] .admin-mini-kpi-card strong{
  color:#0B2F26;
  font-size:30px;
  line-height:1;
  letter-spacing:-.035em;
}
body[data-page="admin-academy"] .admin-mini-kpi-card small{
  color:#607083;
  font-size:13px;
  font-weight:700;
}
body[data-page="admin-academy"] .admin-academy-table td strong,
body[data-page="admin-academy"] .admin-academy-lessons-table td strong{
  display:block;
  color:#0B2F26;
  font-size:14px;
  line-height:1.25;
}
body[data-page="admin-academy"] .admin-academy-table td small,
body[data-page="admin-academy"] .admin-academy-lessons-table td small{
  display:block;
  margin-top:5px;
  color:#667085;
  font-size:12px;
  font-weight:700;
}


/* STEP 114 — Dashboard: card reali andamento mensile e obiettivi */
.dashboard-real-trend .dashboard-empty-state,
.goals-card .dashboard-empty-state{
  min-height:180px;
  display:grid;
  align-content:center;
  gap:8px;
  padding:18px;
  border-radius:16px;
  border:1px solid #dce5dd;
  background:linear-gradient(180deg,#ffffff,#f8fbf8);
  color:#4b5563;
}
.dashboard-real-trend .dashboard-empty-state strong,
.goals-card .dashboard-empty-state strong{
  color:#0b2f26;
  font-size:17px;
  line-height:1.2;
}
.dashboard-real-trend .dashboard-empty-state small,
.goals-card .dashboard-empty-state small{
  color:#6b7280;
  font-weight:700;
  line-height:1.45;
}
.goals-card .dashboard-empty-state a{
  color:#0f7a4f;
  font-weight:950;
  margin-top:4px;
}
.dashboard-real-goal .progress i{
  width:var(--goal-progress,0%);
}
.dashboard-real-goal:last-child{
  border-bottom:0;
}
.trend-card [data-dashboard-trend-month]{
  cursor:pointer;
  color:#0b2f26;
}


/* STEP 095 — Panoramica: periodo esplicito nelle card mensili */
body[data-page="dashboard"] .dashboard-card-period {
  margin: 5px 0 0;
  color: #6b7280;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
}

/* STEP 114A — Panoramica: stati vuoti con CTA e link nascosti */
.premium-card-header a[hidden],
.card-bottom-link[hidden]{
  display:none !important;
}
.dashboard-empty-state-cta{
  min-height:230px;
  display:flex !important;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  gap:10px;
  padding:24px;
  border-radius:18px;
  border:1px solid rgba(15,122,79,.18);
  background:
    radial-gradient(circle at 14% 0%,rgba(31,157,99,.14),transparent 38%),
    linear-gradient(180deg,#ffffff 0%,#f4fbf6 100%);
  box-shadow:0 14px 28px rgba(15,23,42,.055);
}
.dashboard-empty-state-cta > span{
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  border-radius:15px;
  background:#e8f7ef;
  border:1px solid #d8eee1;
  font-size:24px;
  box-shadow:0 10px 20px rgba(15,122,79,.10);
}
.dashboard-empty-state-cta strong{
  color:#0b2f26;
  font-size:20px;
  line-height:1.15;
  letter-spacing:-.02em;
}
.dashboard-empty-state-cta small{
  max-width:360px;
  color:#52615a;
  font-size:15px;
  font-weight:750;
  line-height:1.45;
}
.dashboard-empty-action{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  margin-top:4px;
  padding:10px 16px;
  border-radius:13px;
  background:linear-gradient(135deg,#1f9d63,#0f7a4f);
  color:#fff !important;
  font-weight:950;
  box-shadow:0 14px 28px rgba(15,122,79,.20);
}
.dashboard-empty-action:hover{
  transform:translateY(-1px);
  box-shadow:0 18px 34px rgba(15,122,79,.25);
}
.trend-card .dashboard-empty-state-cta{
  min-height:252px;
}
.goals-card .dashboard-empty-state-cta{
  min-height:300px;
}
.accounts-premium-card .dashboard-empty-state-cta{
  min-height:300px;
}


/* STEP 114B — Panoramica: stati vuoti centrati e CTA pulite */
.dashboard-empty-state-centered{
  width:100%;
  min-height:260px;
  display:flex !important;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:22px;
  text-align:center;
  border-radius:18px;
  border:1px solid rgba(15,122,79,.18);
  background:
    radial-gradient(circle at 50% 0%,rgba(31,157,99,.12),transparent 42%),
    linear-gradient(180deg,#ffffff 0%,#f5fbf7 100%);
  box-shadow:0 14px 28px rgba(15,23,42,.045);
}
.dashboard-empty-state-centered::before{
  content:"";
  width:42px;
  height:42px;
  border-radius:14px;
  background:
    linear-gradient(135deg,rgba(31,157,99,.18),rgba(15,122,79,.08)),
    #edf8f1;
  border:1px solid rgba(15,122,79,.16);
  box-shadow:0 10px 20px rgba(15,122,79,.09);
}
.dashboard-empty-state-centered strong{
  color:#0b2f26;
  font-size:20px;
  line-height:1.15;
  letter-spacing:-.02em;
}
.dashboard-empty-state-centered small{
  max-width:320px;
  color:#52615a;
  font-size:15px;
  font-weight:750;
  line-height:1.45;
}
.dashboard-empty-action-small{
  min-height:34px;
  margin-top:2px;
  padding:8px 13px;
  border-radius:11px;
  font-size:13px;
  letter-spacing:.01em;
  text-transform:uppercase;
}
.accounts-premium-card .dashboard-empty-state-centered,
.goals-card .dashboard-empty-state-centered{
  min-height:300px;
}
.trend-card .dashboard-empty-state-centered{
  min-height:250px;
}
.dashboard-real-trend{
  display:block;
}
.dashboard-real-trend .dashboard-empty-state-centered{
  position:relative;
}
@media(max-width:720px){
  .dashboard-empty-state-centered{
    min-height:220px;
    padding:18px;
  }
  .accounts-premium-card .dashboard-empty-state-centered,
  .goals-card .dashboard-empty-state-centered{
    min-height:240px;
  }
}


/* STEP 114C — Panoramica: icone stati vuoti */
.dashboard-empty-state-centered::before{
  display:grid;
  place-items:center;
  font-size:20px;
  font-weight:900;
  color:#0f7a4f;
}

.dashboard-empty-state-centered.is-accounts::before{
  content:"💳";
}

.dashboard-empty-state-centered.is-trend::before{
  content:"📈";
}

.dashboard-empty-state-centered.is-goals::before{
  content:"🎯";
}


/* STEP 114D — Panoramica: spese per categoria reali */
.category-card .donut-visual{
  background:var(--category-donut-gradient, conic-gradient(var(--slice-1,#2f80ed) 0 34%, var(--slice-2,#1f9d63) 34% 64%, var(--slice-3,#f59e0b) 64% 82%, var(--slice-4,#7c4dff) 82% 100%));
}
.category-card .donut-visual.is-empty{
  background:conic-gradient(#dce5dd 0 100%);
}
.category-card .donut-visual.is-empty::after{
  background:#f8fbf8;
}
.dashboard-category-empty{
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:6px !important;
  padding:14px 16px !important;
  border-radius:15px;
  border:1px solid rgba(15,122,79,.16);
  background:linear-gradient(180deg,#ffffff,#f6fbf8);
}
.dashboard-category-empty strong{
  color:#0b2f26;
  font-size:15px;
  line-height:1.2;
}
.dashboard-category-empty small{
  color:#63736b;
  font-size:13px;
  font-weight:750;
  line-height:1.35;
}


/* STEP 113I — Ripristino registrazione stabile */
body[data-page="register"] .auth-wizard-stepper{
  display:none !important;
}
body[data-page="register"] .auth-stepper{
  display:flex !important;
}
body[data-page="register"] .auth-card-onboarding{
  width:min(980px,100%);
  max-width:980px;
  overflow:visible;
}
body[data-page="register"] .auth-register-logo{
  display:flex;
  justify-content:center;
  align-items:center;
  width:100%;
  margin:0 auto 28px;
}
body[data-page="register"] .auth-register-logo img{
  display:block;
  width:min(360px,82vw);
  max-width:100%;
  height:auto;
  object-fit:contain;
}
body[data-page="register"] .auth-register-head{
  max-width:860px;
  margin-left:auto;
  margin-right:auto;
}
body[data-page="register"] .auth-kicker-centered{
  display:flex;
  width:max-content;
  max-width:100%;
  margin:0 auto 22px;
  justify-content:center;
  text-align:center;
}
body[data-page="register"] .auth-choice-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:12px;
}
body[data-page="register"] .auth-choice-card{
  min-height:164px;
}
body[data-page="register"] .auth-choice-card.is-selected{
  border:2px solid #0f7a4f;
  background:
    radial-gradient(circle at 18% 0%,rgba(31,157,99,.24),transparent 38%),
    linear-gradient(180deg,#ffffff 0%,#eaf8ef 100%);
  box-shadow:
    0 22px 44px rgba(15,122,79,.18),
    0 0 0 5px rgba(31,157,99,.10),
    inset 0 1px 0 rgba(255,255,255,.95);
  transform:translateY(-3px);
}
@media(max-width:1100px){
  body[data-page="register"] .auth-choice-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:720px){
  body[data-page="register"] .auth-choice-grid,
  body[data-page="register"] .auth-form-grid{
    grid-template-columns:1fr;
  }
  body[data-page="register"] .auth-card-onboarding{
    padding:24px;
    border-radius:24px;
  }
  body[data-page="register"] .auth-choice-card.is-selected{
    transform:none;
  }
}


/* STEP 113K — Registrazione: ripristino wizard grafico compatto */
body[data-page="register"] .auth-wizard-strip{
  width:100%;
  display:grid;
  grid-template-columns:minmax(0,1fr) 60px minmax(0,1fr) 60px minmax(0,1fr);
  align-items:stretch;
  margin:28px 0 22px;
  border:1px solid #dce5dd;
  border-radius:20px;
  overflow:hidden;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbf8 100%);
  box-shadow:0 14px 30px rgba(15,23,42,.065);
}
body[data-page="register"] .auth-wizard-strip-step{
  position:relative;
  min-height:70px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  padding:16px 18px;
  color:#7c8781;
  font-weight:900;
  background:rgba(255,255,255,.70);
}
body[data-page="register"] .auth-wizard-strip-step span{
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  border-radius:50%;
  border:1px solid #d3ddd6;
  background:#fff;
  color:#77827c;
  font-size:15px;
  font-weight:950;
  box-shadow:0 8px 18px rgba(15,23,42,.045);
}
body[data-page="register"] .auth-wizard-strip-step strong{
  min-width:0;
  color:inherit;
  font-size:16px;
  line-height:1.15;
  letter-spacing:-.015em;
}
body[data-page="register"] .auth-wizard-strip > i{
  position:relative;
  display:block;
  align-self:stretch;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbf8 100%);
}
body[data-page="register"] .auth-wizard-strip > i::before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:50%;
  height:2px;
  transform:translateY(-50%);
  background:#dce5dd;
}
body[data-page="register"] .auth-wizard-strip-step.is-active{
  color:#0b2f26;
  background:
    radial-gradient(circle at 18% 0%,rgba(31,157,99,.16),transparent 34%),
    linear-gradient(180deg,#ffffff 0%,#eef8f1 100%);
}
body[data-page="register"] .auth-wizard-strip-step.is-active::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:4px;
  background:linear-gradient(135deg,#1f9d63,#0f7a4f);
  box-shadow:0 -8px 20px rgba(15,122,79,.18);
}
body[data-page="register"] .auth-wizard-strip-step.is-active span{
  border-color:rgba(15,122,79,.38);
  background:linear-gradient(135deg,#1f9d63,#0f7a4f);
  color:#fff;
  box-shadow:0 12px 24px rgba(15,122,79,.24);
}
body[data-page="register"] .auth-stepper,
body[data-page="register"] .auth-wizard-stepper{
  display:none !important;
}
@media(max-width:780px){
  body[data-page="register"] .auth-wizard-strip{
    grid-template-columns:1fr;
  }
  body[data-page="register"] .auth-wizard-strip > i{
    min-height:18px;
  }
  body[data-page="register"] .auth-wizard-strip > i::before{
    left:50%;
    right:auto;
    top:0;
    bottom:0;
    width:2px;
    height:100%;
    transform:translateX(-50%);
  }
  body[data-page="register"] .auth-wizard-strip-step{
    justify-content:flex-start;
    min-height:58px;
  }
}


/* STEP 113L — Registrazione: fix layout wizard e form stabile */
body[data-page="register"] .auth-page-onboarding{
  min-height:100vh;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding:38px 22px;
}

body[data-page="register"] .auth-card-onboarding{
  width:min(980px,100%);
  max-width:980px;
  margin:0 auto;
  padding:38px;
  border-radius:28px;
  overflow:visible;
}

body[data-page="register"] .auth-register-logo{
  display:flex;
  justify-content:center;
  align-items:center;
  width:100%;
  margin:0 auto 24px;
}

body[data-page="register"] .auth-register-logo img{
  display:block;
  width:min(360px,78vw);
  max-width:100%;
  height:auto;
  object-fit:contain;
}

body[data-page="register"] .auth-register-head{
  max-width:860px;
  margin-left:auto;
  margin-right:auto;
}

body[data-page="register"] .auth-register-head h1{
  margin:18px 0 10px;
  font-size:46px;
  line-height:1.04;
  letter-spacing:-.055em;
}

body[data-page="register"] .auth-register-head p{
  max-width:920px;
  margin:0;
  font-size:17px;
  line-height:1.55;
}

body[data-page="register"] .auth-wizard-strip{
  width:100%;
  max-width:100%;
  margin:28px 0 26px;
  display:grid;
  grid-template-columns:minmax(0,1fr) 58px minmax(0,1fr) 58px minmax(0,1fr);
  align-items:stretch;
  border:1px solid #dce5dd;
  border-radius:20px;
  overflow:hidden;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbf8 100%);
  box-shadow:0 14px 30px rgba(15,23,42,.065);
}

body[data-page="register"] .auth-wizard-strip-step{
  min-width:0;
  min-height:68px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  padding:15px 16px;
}

body[data-page="register"] .auth-wizard-strip-step span{
  width:36px;
  height:36px;
  min-width:36px;
  border-radius:50%;
}

body[data-page="register"] .auth-wizard-strip-step strong{
  white-space:normal;
  overflow-wrap:anywhere;
}

body[data-page="register"] .auth-form-section{
  width:100%;
  max-width:100%;
  margin:0;
  padding:20px;
  border-radius:20px;
}

body[data-page="register"] .auth-form-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}

body[data-page="register"] .auth-form-section label{
  display:grid;
  gap:8px;
  min-width:0;
}

body[data-page="register"] .auth-form-section input:not([type="radio"]):not([type="checkbox"]){
  width:100%;
  min-width:0;
  height:58px;
  border-radius:16px;
}

body[data-page="register"] .auth-choice-grid{
  width:100%;
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:12px;
}

body[data-page="register"] .auth-choice-card{
  position:relative;
  min-width:0;
  min-height:164px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:flex-start;
  gap:8px;
  padding:16px;
  border-radius:18px;
  border:1px solid #dce5dd;
  background:linear-gradient(180deg,#ffffff,#f7fbf8);
  box-shadow:0 10px 22px rgba(15,23,42,.045);
  cursor:pointer;
}

body[data-page="register"] .auth-choice-card input[type="radio"]{
  position:absolute !important;
  opacity:0 !important;
  pointer-events:none !important;
  width:1px !important;
  height:1px !important;
  margin:0 !important;
}

body[data-page="register"] .auth-choice-card span{
  width:44px;
  height:44px;
  display:grid;
  place-items:center;
  border-radius:14px;
  background:#edf7f1;
  border:1px solid #dcebdd;
  font-size:23px;
}

body[data-page="register"] .auth-choice-card strong{
  color:#0b2f26;
  font-size:16px;
  line-height:1.15;
}

body[data-page="register"] .auth-choice-card small{
  color:#5f6f67;
  font-weight:700;
  line-height:1.35;
}

body[data-page="register"] .auth-choice-card.is-selected{
  border:2px solid #0f7a4f;
  background:
    radial-gradient(circle at 18% 0%,rgba(31,157,99,.24),transparent 38%),
    linear-gradient(180deg,#ffffff 0%,#eaf8ef 100%);
  box-shadow:
    0 22px 44px rgba(15,122,79,.18),
    0 0 0 5px rgba(31,157,99,.10),
    inset 0 1px 0 rgba(255,255,255,.95);
  transform:translateY(-3px);
}

body[data-page="register"] .auth-choice-card.is-selected::after{
  content:"✓";
  position:absolute;
  top:14px;
  right:14px;
  width:28px;
  height:28px;
  display:grid;
  place-items:center;
  border-radius:10px;
  background:linear-gradient(135deg,#1f9d63,#0f7a4f);
  color:#fff;
  font-size:15px;
  font-weight:950;
  box-shadow:0 10px 20px rgba(15,122,79,.24);
}

body[data-page="register"] .auth-privacy-check{
  display:flex !important;
  align-items:flex-start;
  gap:12px !important;
}

body[data-page="register"] .auth-privacy-check input[type="checkbox"]{
  width:20px;
  height:20px;
  flex:0 0 auto;
}

@media(max-width:1100px){
  body[data-page="register"] .auth-choice-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:780px){
  body[data-page="register"] .auth-wizard-strip{
    grid-template-columns:1fr;
  }

  body[data-page="register"] .auth-wizard-strip > i{
    min-height:18px;
  }

  body[data-page="register"] .auth-wizard-strip > i::before{
    left:50%;
    right:auto;
    top:0;
    bottom:0;
    width:2px;
    height:100%;
    transform:translateX(-50%);
  }

  body[data-page="register"] .auth-wizard-strip-step{
    justify-content:flex-start;
    min-height:58px;
  }
}

@media(max-width:720px){
  body[data-page="register"] .auth-page-onboarding{
    padding:22px 14px;
  }

  body[data-page="register"] .auth-card-onboarding{
    padding:24px;
    border-radius:24px;
  }

  body[data-page="register"] .auth-register-head h1{
    font-size:34px;
  }

  body[data-page="register"] .auth-form-grid,
  body[data-page="register"] .auth-choice-grid{
    grid-template-columns:1fr;
  }

  body[data-page="register"] .auth-choice-card.is-selected{
    transform:none;
  }
}


/* STEP 113M — Ripristino Login stabile protetta */
body[data-page="login"] .auth-card{
  width:min(520px,100%);
}

body[data-page="login"] .auth-login-logo{
  display:none !important;
}

body[data-page="login"] .brand{
  display:flex !important;
}

body[data-page="login"] .auth-card h1{
  text-align:left;
  margin-top:28px;
}

body[data-page="login"] .auth-card > p{
  text-align:left;
}

body[data-page="login"] .auth-create-account-link{
  display:none !important;
}

body[data-page="login"] .auth-card > a[href="register.html"]:not(.auth-create-account-link){
  display:inline-flex !important;
  width:auto !important;
  min-height:auto !important;
  margin-top:0 !important;
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  color:inherit !important;
  font-weight:inherit !important;
  transform:none !important;
}


/* STEP 113N — Ripristino Login con logo Famyro */
body[data-page="login"] .auth-card{
  width:min(560px,100%);
}

body[data-page="login"] .brand{
  display:none !important;
}

body[data-page="login"] .auth-login-logo{
  display:flex !important;
  justify-content:center;
  align-items:center;
  width:100%;
  margin:0 auto 28px;
  max-width:100%;
  overflow:hidden;
}

body[data-page="login"] .auth-login-logo img{
  display:block;
  width:min(340px,80vw);
  max-width:100%;
  height:auto;
  object-fit:contain;
  filter:drop-shadow(0 18px 34px rgba(11,47,38,.10));
}

body[data-page="login"] .auth-card h1{
  text-align:left;
  margin-top:8px;
}

body[data-page="login"] .auth-card > p{
  text-align:left;
}

body[data-page="login"] .auth-create-account-link{
  display:flex !important;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  width:max-content;
  max-width:100%;
  min-height:42px;
  margin:18px 0 0;
  padding:8px 0;
  border:0;
  background:transparent;
  box-shadow:none;
  color:#111827;
  font-weight:900;
  transform:none;
}

body[data-page="login"] .auth-create-account-link span{
  width:auto;
  height:auto;
  display:inline-grid;
  place-items:center;
  border-radius:0;
  background:transparent;
  color:inherit;
  font-size:17px;
  box-shadow:none;
}

body[data-page="login"] .auth-create-account-link strong{
  font-size:16px;
  letter-spacing:0;
}

body[data-page="login"] .auth-create-account-link:hover{
  transform:none;
  box-shadow:none;
  color:#0f7a4f;
}

@media(max-width:720px){
  body[data-page="login"] .auth-login-logo img{
    width:min(300px,78vw);
  }
}


/* STEP 113O — Login: CTA "Crea un account" centrata e più visibile */
body[data-page="login"] .auth-create-account-link{
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  gap:10px;
  width:max-content;
  max-width:100%;
  min-height:44px;
  margin:22px auto 0 !important;
  padding:10px 16px !important;
  border:1px solid rgba(15,122,79,.22);
  border-radius:14px;
  background:
    radial-gradient(circle at 18% 0%,rgba(31,157,99,.16),transparent 40%),
    linear-gradient(180deg,#ffffff 0%,#eef8f1 100%);
  box-shadow:0 12px 28px rgba(15,122,79,.10);
  color:#0b2f26 !important;
  font-weight:950;
  text-decoration:none;
}

body[data-page="login"] .auth-create-account-link span{
  display:inline-grid !important;
  place-items:center;
  width:20px;
  height:20px;
  font-size:15px;
}

body[data-page="login"] .auth-create-account-link strong{
  font-size:16px;
  line-height:1;
}

body[data-page="login"] .auth-create-account-link:hover{
  transform:translateY(-1px);
  border-color:rgba(15,122,79,.36);
  box-shadow:0 16px 32px rgba(15,122,79,.16);
  color:#0f7a4f !important;
}

@media(max-width:720px){
  body[data-page="login"] .auth-create-account-link{
    width:100%;
  }
}


/* STEP 113P — Login: centratura definitiva CTA "Crea un account" */
body[data-page="login"] .auth-card .auth-create-account-link{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:10px !important;
  width:fit-content !important;
  min-width:245px !important;
  max-width:100% !important;
  margin:22px auto 0 auto !important;
  padding:12px 20px !important;
  border:1px solid rgba(15,122,79,.28) !important;
  border-radius:15px !important;
  background:
    radial-gradient(circle at 18% 0%,rgba(31,157,99,.18),transparent 40%),
    linear-gradient(180deg,#ffffff 0%,#eef8f1 100%) !important;
  box-shadow:0 14px 30px rgba(15,122,79,.13) !important;
  color:#0b2f26 !important;
  text-align:center !important;
  font-weight:950 !important;
  text-decoration:none !important;
  transform:none;
}

body[data-page="login"] .auth-card .auth-create-account-link span{
  display:grid !important;
  place-items:center !important;
  width:22px !important;
  height:22px !important;
  flex:0 0 22px !important;
  font-size:16px !important;
}

body[data-page="login"] .auth-card .auth-create-account-link strong{
  display:block !important;
  font-size:16px !important;
  line-height:1 !important;
  white-space:nowrap !important;
}

body[data-page="login"] .auth-card .auth-create-account-link:hover{
  transform:translateY(-1px);
  border-color:rgba(15,122,79,.42) !important;
  box-shadow:0 18px 36px rgba(15,122,79,.18) !important;
  color:#0f7a4f !important;
}

@media(max-width:720px){
  body[data-page="login"] .auth-card .auth-create-account-link{
    width:100% !important;
    min-width:0 !important;
  }
}


/* STEP 113Q — Registrazione: badge "Crea il tuo spazio Famyro" */
body[data-page="register"] .auth-kicker,
body[data-page="register"] .auth-kicker-centered{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:max-content !important;
  max-width:100% !important;
  min-height:42px !important;
  margin:0 auto 24px !important;
  padding:9px 18px !important;
  border-radius:14px !important;
  border:1px solid rgba(15,122,79,.24) !important;
  background:
    radial-gradient(circle at 18% 0%,rgba(31,157,99,.18),transparent 40%),
    linear-gradient(180deg,#ffffff 0%,#eef8f1 100%) !important;
  color:#0f7a4f !important;
  font-size:14px !important;
  font-weight:950 !important;
  letter-spacing:.08em !important;
  line-height:1 !important;
  text-transform:uppercase !important;
  text-align:center !important;
  box-shadow:0 14px 28px rgba(15,122,79,.11) !important;
}

body[data-page="register"] .auth-kicker::before,
body[data-page="register"] .auth-kicker-centered::before{
  content:"";
  width:8px;
  height:8px;
  margin-right:10px;
  border-radius:999px;
  background:linear-gradient(135deg,#1f9d63,#0f7a4f);
  box-shadow:0 0 0 4px rgba(31,157,99,.12);
}

@media(max-width:720px){
  body[data-page="register"] .auth-kicker,
  body[data-page="register"] .auth-kicker-centered{
    width:100% !important;
    min-height:40px !important;
    padding:9px 14px !important;
    font-size:12px !important;
    letter-spacing:.06em !important;
  }
}


/* STEP 113R — Registrazione: link "Ho già un account" centrato */
body[data-page="register"] .auth-login-return-link{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:10px !important;
  width:fit-content !important;
  min-width:230px !important;
  max-width:100% !important;
  min-height:44px !important;
  margin:22px auto 0 !important;
  padding:10px 18px !important;
  border:1px solid rgba(15,122,79,.24) !important;
  border-radius:14px !important;
  background:
    radial-gradient(circle at 18% 0%,rgba(31,157,99,.16),transparent 40%),
    linear-gradient(180deg,#ffffff 0%,#eef8f1 100%) !important;
  color:#0b2f26 !important;
  font-weight:950 !important;
  text-decoration:none !important;
  box-shadow:0 14px 28px rgba(15,122,79,.10) !important;
}

body[data-page="register"] .auth-login-return-link span{
  width:26px !important;
  height:26px !important;
  display:grid !important;
  place-items:center !important;
  flex:0 0 26px !important;
  border-radius:10px !important;
  background:linear-gradient(135deg,#1f9d63,#0f7a4f) !important;
  color:#fff !important;
  font-size:15px !important;
  font-weight:950 !important;
  box-shadow:0 10px 20px rgba(15,122,79,.20) !important;
}

body[data-page="register"] .auth-login-return-link strong{
  display:block !important;
  font-size:16px !important;
  line-height:1 !important;
  white-space:nowrap !important;
}

body[data-page="register"] .auth-login-return-link:hover{
  transform:translateY(-1px);
  border-color:rgba(15,122,79,.42) !important;
  box-shadow:0 18px 34px rgba(15,122,79,.16) !important;
  color:#0f7a4f !important;
}

@media(max-width:720px){
  body[data-page="register"] .auth-login-return-link{
    width:100% !important;
    min-width:0 !important;
  }
}

/* STEP 116 — Admin Famiglie: KPI subito sotto topbar e stato database pulito */
body[data-page="admin-famiglie"] .admin-premium-page{
  gap:16px;
}

body[data-page="admin-famiglie"] .admin-family-kpi-grid{
  margin-top:0;
  order:0;
}

body[data-page="admin-famiglie"] .admin-family-page-header{
  order:1;
  padding:18px 22px;
}

body[data-page="admin-famiglie"] .admin-section-families{
  order:2;
}

body[data-page="admin-famiglie"] .admin-data-note-database{
  color:#0B5F46;
  background:linear-gradient(180deg,#E7F7ED,#DDF1E5);
  border-color:#A9D5B8;
}

@media (max-width: 760px){
  body[data-page="admin-famiglie"] .admin-family-page-header{
    padding:16px;
  }
}


/* STEP 117 — Admin Famiglie: rimozione hero duplicata, azioni inline premium e righe tabella più leggibili */
body[data-page="admin-famiglie"] .admin-section-families{
  margin-top:0;
}

body[data-page="admin-famiglie"] .admin-data-toolbar{
  align-items:flex-start;
}

body[data-page="admin-famiglie"] .admin-family-table-shell,
body[data-page="admin-famiglie"] .admin-family-table,
body[data-page="admin-famiglie"] .admin-family-table td{
  overflow:visible;
}

body[data-page="admin-famiglie"] .admin-family-table{
  min-width:1180px;
  border-collapse:separate;
  border-spacing:0 10px;
}

body[data-page="admin-famiglie"] .admin-family-table thead th{
  border-bottom:0;
}

body[data-page="admin-famiglie"] .admin-family-table tbody td{
  background:linear-gradient(180deg,#FFFFFF 0%,#FBFDFB 100%);
  border-top:1px solid #D8E4DB;
  border-bottom:1px solid #D8E4DB;
  box-shadow:0 10px 20px rgba(15,23,42,.045);
  transition:background .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease;
}

body[data-page="admin-famiglie"] .admin-family-table tbody tr:nth-child(even) td{
  background:linear-gradient(180deg,#F7FBF8 0%,#F1F7F3 100%);
}

body[data-page="admin-famiglie"] .admin-family-table tbody tr:hover td{
  background:linear-gradient(180deg,#F5FBF7 0%,#ECF6F0 100%);
  border-color:#C9DDD0;
  box-shadow:0 14px 28px rgba(15,23,42,.075);
}

body[data-page="admin-famiglie"] .admin-family-table tbody td:first-child{
  border-left:1px solid #D8E4DB;
  border-radius:18px 0 0 18px;
}

body[data-page="admin-famiglie"] .admin-family-table tbody td:last-child{
  border-right:1px solid #D8E4DB;
  border-radius:0 18px 18px 0;
}

body[data-page="admin-famiglie"] .admin-family-actions{
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  flex-wrap:nowrap;
}

body[data-page="admin-famiglie"] .admin-family-action-btn{
  width:38px;
  height:38px;
  min-height:38px;
  padding:0;
  border-radius:12px;
  border-color:#C9DDD0;
  background:linear-gradient(180deg,#FFFFFF 0%,#EEF6F1 100%);
  color:#0B5F46;
  box-shadow:0 10px 20px rgba(15,23,42,.075);
}

body[data-page="admin-famiglie"] .admin-family-action-btn:hover,
body[data-page="admin-famiglie"] .admin-family-action-btn:focus-visible{
  background:linear-gradient(180deg,#F8FCF9 0%,#E8F3EC 100%);
  border-color:rgba(15,122,79,.34);
  box-shadow:0 14px 26px rgba(15,23,42,.11);
}

body[data-page="admin-famiglie"] .admin-family-action-btn svg{
  width:18px;
  height:18px;
  fill:currentColor;
}

body[data-page="admin-famiglie"] .admin-family-table td:nth-child(9){
  min-width:102px;
}

@media(max-width:760px){
  body[data-page="admin-famiglie"] .admin-data-toolbar{
    gap:12px;
  }

  body[data-page="admin-famiglie"] .admin-family-table{
    border-spacing:0 8px;
  }
}


/* STEP 118 — Admin SaaS: rimozione header duplicati sotto topbar nelle sottosezioni */
body[data-page="admin"] .admin-premium-page,
body[data-page^="admin-"] .admin-premium-page{
  gap:16px;
}

body[data-page="admin"] .admin-page-kpi-grid,
body[data-page^="admin-"] .admin-page-kpi-grid{
  margin-top:0;
}


/* STEP 119 — Admin Famiglie: tabella senza scroll orizzontale e azioni stile compatto progetto */
body[data-page="admin-famiglie"] .admin-table-shell.admin-family-table-shell{
  overflow-x:hidden;
}

body[data-page="admin-famiglie"] .admin-family-table{
  width:100%;
  min-width:0;
  table-layout:fixed;
  border-spacing:0 12px;
}

body[data-page="admin-famiglie"] .admin-family-table thead th{
  padding:12px 10px;
  font-size:12px;
}

body[data-page="admin-famiglie"] .admin-family-table tbody td{
  padding:16px 10px;
}

body[data-page="admin-famiglie"] .admin-family-table th:nth-child(1),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(1){width:18%;}
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(2),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(2){width:18%;}
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(3),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(3){width:11%;}
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(4),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(4){width:9%;}
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(5),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(5){width:7%;}
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(6),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(6){width:7%;}
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(7),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(7){width:10%;}
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(8),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(8){width:10%;}
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(9),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(9){width:10%;}

body[data-page="admin-famiglie"] .admin-family-name strong,
body[data-page="admin-famiglie"] .admin-family-owner strong{
  font-size:14px;
}

body[data-page="admin-famiglie"] .admin-family-name span,
body[data-page="admin-famiglie"] .admin-family-owner span,
body[data-page="admin-famiglie"] .admin-last-activity{
  font-size:12px;
}

body[data-page="admin-famiglie"] .admin-plan-tag{
  min-height:28px;
  padding:5px 8px;
  font-size:11px;
}

body[data-page="admin-famiglie"] .admin-family-actions{
  gap:10px;
}

body[data-page="admin-famiglie"] .admin-family-action-btn{
  width:40px;
  height:40px;
  min-height:40px;
  border-radius:13px;
  border:1px solid #B8D9C4;
  background:linear-gradient(180deg,#FFFFFF 0%,#F2F9F5 100%);
  color:#0B5F46;
  box-shadow:0 8px 18px rgba(15,23,42,.06);
}

body[data-page="admin-famiglie"] .admin-family-action-btn:hover,
body[data-page="admin-famiglie"] .admin-family-action-btn:focus-visible{
  transform:translateY(-1px);
  border-color:rgba(15,122,79,.34);
  background:linear-gradient(180deg,#FFFFFF 0%,#ECF6F0 100%);
  box-shadow:0 12px 24px rgba(15,23,42,.10);
}

body[data-page="admin-famiglie"] .admin-family-action-btn-danger{
  border-color:#F1B8B1;
  color:#C63D34;
  background:linear-gradient(180deg,#FFF8F8 0%,#FFF1F1 100%);
}

body[data-page="admin-famiglie"] .admin-family-action-btn-danger:hover,
body[data-page="admin-famiglie"] .admin-family-action-btn-danger:focus-visible{
  border-color:#E68E86;
  background:linear-gradient(180deg,#FFF9F8 0%,#FFEFEF 100%);
  box-shadow:0 12px 24px rgba(198,61,52,.12);
}

body[data-page="admin-famiglie"] .admin-family-action-btn svg{
  width:17px;
  height:17px;
}

body[data-page="admin-famiglie"] .admin-family-table td:nth-child(9){
  min-width:0;
}

@media (max-width: 1180px){
  body[data-page="admin-famiglie"] .admin-table-shell.admin-family-table-shell{
    overflow-x:auto;
  }

  body[data-page="admin-famiglie"] .admin-family-table{
    min-width:1040px;
  }
}


/* STEP 120 — Admin Famiglie: colonna azioni più ampia e bottoni coerenti allo stile richiesto */
body[data-page="admin-famiglie"] .admin-table-shell.admin-family-table-shell{
  overflow-x:hidden;
}

body[data-page="admin-famiglie"] .admin-family-table{
  width:100%;
  min-width:0;
  table-layout:fixed;
}

body[data-page="admin-famiglie"] .admin-family-table th:nth-child(1),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(1){width:16%;}
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(2),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(2){width:17%;}
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(3),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(3){width:10%;}
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(4),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(4){width:8%;}
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(5),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(5){width:6%;}
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(6),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(6){width:6%;}
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(7),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(7){width:9%;}
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(8),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(8){width:10%;}
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(9),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(9){width:18%;}

body[data-page="admin-famiglie"] .admin-family-table td:nth-child(9){
  min-width:0;
  padding-left:12px;
  padding-right:12px;
}

body[data-page="admin-famiglie"] .admin-family-actions{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  flex-wrap:nowrap;
  overflow:visible;
  position:relative;
}

body[data-page="admin-famiglie"] .admin-family-action-btn{
  width:44px;
  height:44px;
  min-width:44px;
  min-height:44px;
  padding:0;
  border-radius:13px;
  border:1px solid #B8DCC7;
  background:linear-gradient(180deg,#FFFFFF 0%,#F3FAF6 100%);
  color:#006B50;
  box-shadow:0 10px 20px rgba(15,23,42,.065);
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

body[data-page="admin-famiglie"] .admin-family-action-btn svg{
  width:18px;
  height:18px;
  fill:currentColor;
}

body[data-page="admin-famiglie"] .admin-family-action-btn:hover,
body[data-page="admin-famiglie"] .admin-family-action-btn:focus-visible{
  transform:translateY(-1px);
  border-color:#8FCBAB;
  background:linear-gradient(180deg,#FFFFFF 0%,#ECF8F1 100%);
  box-shadow:0 14px 28px rgba(15,23,42,.12);
  outline:none;
}

body[data-page="admin-famiglie"] .admin-family-action-btn-danger{
  border-color:#F0BAB5;
  background:linear-gradient(180deg,#FFFFFF 0%,#FFF4F3 100%);
  color:#C7352F;
}

body[data-page="admin-famiglie"] .admin-family-action-btn-danger:hover,
body[data-page="admin-famiglie"] .admin-family-action-btn-danger:focus-visible{
  border-color:#E68982;
  background:linear-gradient(180deg,#FFFFFF 0%,#FFEFEF 100%);
  box-shadow:0 14px 28px rgba(199,53,47,.13);
}

body[data-page="admin-famiglie"] .admin-family-action-btn[data-tooltip]:before{
  bottom:calc(100% + 12px);
  border-radius:11px;
  padding:8px 11px;
  background:#073F32;
  font-size:12px;
  font-weight:900;
  box-shadow:0 14px 30px rgba(7,31,25,.24);
}

body[data-page="admin-famiglie"] .admin-family-action-btn[data-tooltip]:after{
  bottom:calc(100% + 6px);
  border-top-color:#073F32;
}

@media (max-width: 1180px){
  body[data-page="admin-famiglie"] .admin-table-shell.admin-family-table-shell{
    overflow-x:auto;
  }

  body[data-page="admin-famiglie"] .admin-family-table{
    min-width:1120px;
  }
}


/* STEP 121 — Admin Famiglie: responsabile più compatto, bottoni ridotti e tooltip elimina dentro card */
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(1),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(1){width:17%;}
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(2),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(2){width:14%;}
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(3),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(3){width:10%;}
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(4),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(4){width:8%;}
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(5),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(5){width:6%;}
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(6),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(6){width:6%;}
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(7),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(7){width:9%;}
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(8),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(8){width:10%;}
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(9),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(9){width:20%;}

body[data-page="admin-famiglie"] .admin-family-owner strong{
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

body[data-page="admin-famiglie"] .admin-family-owner span{
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

body[data-page="admin-famiglie"] .admin-family-actions{
  gap:8px;
}

body[data-page="admin-famiglie"] .admin-family-action-btn{
  width:40px;
  height:40px;
  min-width:40px;
  min-height:40px;
  border-radius:12px;
}

body[data-page="admin-famiglie"] .admin-family-action-btn svg{
  width:16px;
  height:16px;
}

body[data-page="admin-famiglie"] .admin-family-action-btn-danger[data-tooltip]:before{
  left:auto;
  right:0;
  transform:translateY(4px);
}

body[data-page="admin-famiglie"] .admin-family-action-btn-danger[data-tooltip]:after{
  left:auto;
  right:15px;
  transform:translateY(4px);
}

body[data-page="admin-famiglie"] .admin-family-action-btn-danger[data-tooltip]:hover:before,
body[data-page="admin-famiglie"] .admin-family-action-btn-danger[data-tooltip]:focus-visible:before,
body[data-page="admin-famiglie"] .admin-family-action-btn-danger[data-tooltip]:hover:after,
body[data-page="admin-famiglie"] .admin-family-action-btn-danger[data-tooltip]:focus-visible:after{
  transform:translateY(0);
}

@media (max-width: 1180px){
  body[data-page="admin-famiglie"] .admin-family-table{
    min-width:1080px;
  }
}


/* STEP 122 — Admin Famiglie: pulizia toolbar e più respiro sotto KPI */
body[data-page="admin-famiglie"] .admin-section-families{
  margin-top:8px;
}

body[data-page="admin-famiglie"] .admin-data-toolbar{
  display:block;
  padding-top:4px;
}

body[data-page="admin-famiglie"] .admin-data-toolbar h2{
  margin-top:0;
}

body[data-page="admin-famiglie"] .admin-data-toolbar .admin-eyebrow,
body[data-page="admin-famiglie"] .admin-data-toolbar .admin-data-note-database{
  display:none !important;
}


/* STEP 125 — Admin Famiglie: cappello tabella flush ai margini superiori */
body[data-page="admin-famiglie"] .admin-table-shell.admin-family-table-shell{
  padding:0 !important;
  background:#E3EFE6 !important;
  overflow:hidden !important;
}

body[data-page="admin-famiglie"] .admin-family-table{
  margin:0 !important;
  border-collapse:separate !important;
  border-spacing:0 !important;
}

body[data-page="admin-famiglie"] .admin-family-table thead,
body[data-page="admin-famiglie"] .admin-family-table thead tr{
  background:linear-gradient(180deg,#EAF4EC 0%,#DFECE3 100%) !important;
}

body[data-page="admin-famiglie"] .admin-family-table thead th{
  background:transparent !important;
  border-top:0 !important;
  border-bottom:1px solid #C8DCCE !important;
}

body[data-page="admin-famiglie"] .admin-family-table thead th:first-child{
  border-top-left-radius:16px;
}

body[data-page="admin-famiglie"] .admin-family-table thead th:last-child{
  border-top-right-radius:16px;
}

body[data-page="admin-famiglie"] .admin-family-table tbody tr:first-child td{
  border-top-width:12px;
  border-top-color:#FDFEFB;
}

body[data-page="admin-famiglie"] .admin-family-table tbody tr + tr td{
  border-top-width:12px;
  border-top-color:#FDFEFB;
}


/* STEP 126 — Admin Famiglie: modale Modifica famiglia operativa */
body[data-page="admin-famiglie"] .admin-family-edit-modal{
  width:min(720px,100%);
}

body[data-page="admin-famiglie"] .admin-family-edit-grid{
  gap:16px;
}

body[data-page="admin-famiglie"] .admin-family-choice-group{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  padding:10px;
  border:1px solid #C8DCCE;
  border-radius:16px;
  background:linear-gradient(180deg,#F2FAF4,#EAF4EC);
}

body[data-page="admin-famiglie"] .admin-family-currency-group{
  grid-template-columns:1fr;
}

body[data-page="admin-famiglie"] .admin-family-choice-group button{
  min-height:44px;
  border:1px solid #BFD8C6;
  border-radius:12px;
  background:#FFFFFF;
  color:#0B2F26;
  font-weight:900;
  cursor:pointer;
  box-shadow:0 8px 18px rgba(15,23,42,.05);
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}

body[data-page="admin-famiglie"] .admin-family-choice-group button:hover,
body[data-page="admin-famiglie"] .admin-family-choice-group button:focus-visible{
  transform:translateY(-1px);
  border-color:rgba(15,122,79,.34);
  box-shadow:0 12px 24px rgba(15,23,42,.09);
  outline:none;
}

body[data-page="admin-famiglie"] .admin-family-choice-group button.is-active{
  background:linear-gradient(135deg,#0F7A4F,#1F9D63);
  color:#FFFFFF;
  border-color:rgba(15,122,79,.36);
  box-shadow:0 12px 24px rgba(15,122,79,.18);
}

body[data-page="admin-famiglie"] .admin-family-readonly-status{
  display:grid;
  gap:6px;
  padding:14px 16px;
  border:1px solid #C8DCCE;
  border-radius:16px;
  background:linear-gradient(180deg,#F7FBF8,#EEF7F1);
  box-shadow:0 10px 22px rgba(15,23,42,.05);
}

body[data-page="admin-famiglie"] .admin-family-readonly-status span{
  color:#435164;
  font-size:13px;
  font-weight:900;
}

body[data-page="admin-famiglie"] .admin-family-readonly-status strong{
  color:#0B2F26;
  font-size:17px;
  font-weight:950;
}

body[data-page="admin-famiglie"] .admin-family-readonly-status small{
  color:#64748B;
  font-size:13px;
  font-weight:750;
  line-height:1.35;
}

@media(max-width:760px){
  body[data-page="admin-famiglie"] .admin-family-choice-group,
  body[data-page="admin-famiglie"] .admin-family-currency-group{
    grid-template-columns:1fr;
  }
}



/* STEP 127 — Admin Famiglie: modale consultiva Membri e ruoli */
body[data-page="admin-famiglie"] .admin-family-members-modal{
  width:min(820px,100%);
}

body[data-page="admin-famiglie"] .admin-family-members-summary{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin-bottom:16px;
}

body[data-page="admin-famiglie"] .admin-family-members-summary-card{
  border:1px solid #C8DCCE;
  border-radius:16px;
  background:linear-gradient(180deg,#F7FCF8,#EAF4EC);
  padding:14px;
  display:grid;
  gap:5px;
  box-shadow:0 10px 22px rgba(15,23,42,.055);
}

body[data-page="admin-famiglie"] .admin-family-members-summary-card span{
  color:#526174;
  font-size:11px;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.06em;
}

body[data-page="admin-famiglie"] .admin-family-members-summary-card strong{
  color:#0B2F26;
  font-size:18px;
  line-height:1.1;
}

body[data-page="admin-famiglie"] .admin-family-members-summary-card small{
  color:#64748B;
  font-size:12px;
  font-weight:750;
}

body[data-page="admin-famiglie"] .admin-family-members-list{
  display:grid;
  gap:10px;
}

body[data-page="admin-famiglie"] .admin-family-member-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:14px;
  padding:14px;
  border:1px solid #C8DCCE;
  border-radius:16px;
  background:linear-gradient(180deg,#FFFFFF,#F8FCF9);
  box-shadow:0 10px 22px rgba(15,23,42,.055);
}

body[data-page="admin-famiglie"] .admin-family-member-main{
  display:grid;
  gap:4px;
  min-width:0;
}

body[data-page="admin-famiglie"] .admin-family-member-main strong{
  color:#0B2F26;
  font-size:16px;
  line-height:1.15;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

body[data-page="admin-famiglie"] .admin-family-member-main span{
  color:#607087;
  font-size:13px;
  font-weight:750;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

body[data-page="admin-famiglie"] .admin-family-member-meta{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}

body[data-page="admin-famiglie"] .admin-family-member-chip{
  min-height:28px;
  padding:6px 9px;
  border:1px solid #B9E2C5;
  border-radius:10px;
  background:#DFF4E6;
  color:#0B5F46;
  font-size:12px;
  font-weight:950;
  white-space:nowrap;
}

body[data-page="admin-famiglie"] .admin-family-member-chip-soft{
  background:#F1F7F3;
  border-color:#C8DCCE;
  color:#435164;
}

body[data-page="admin-famiglie"] .admin-family-member-meta small{
  color:#64748B;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}

body[data-page="admin-famiglie"] .admin-family-members-empty{
  display:grid;
  gap:5px;
  padding:18px;
  border:1px solid #C8DCCE;
  border-radius:16px;
  background:linear-gradient(180deg,#FFFFFF,#F7FCF8);
  color:#607087;
  box-shadow:0 10px 22px rgba(15,23,42,.045);
}

body[data-page="admin-famiglie"] .admin-family-members-empty strong{
  color:#0B2F26;
}

body[data-page="admin-famiglie"] .admin-family-members-footer{
  grid-template-columns:1fr;
}

@media(max-width:760px){
  body[data-page="admin-famiglie"] .admin-family-members-summary,
  body[data-page="admin-famiglie"] .admin-family-member-row{
    grid-template-columns:1fr;
  }

  body[data-page="admin-famiglie"] .admin-family-member-meta{
    justify-content:flex-start;
  }
}


/* STEP 128 — Admin Famiglie: modale Modifica piano operativa */
body[data-page="admin-famiglie"] .admin-family-plan-modal{
  width:min(840px,100%);
}

body[data-page="admin-famiglie"] .admin-family-plan-current{
  margin-bottom:18px;
}

body[data-page="admin-famiglie"] .admin-family-plan-current-card{
  display:grid;
  gap:5px;
  padding:15px 16px;
  border:1px solid #C8DCCE;
  border-radius:16px;
  background:linear-gradient(180deg,#F7FCF8,#EAF4EC);
  box-shadow:0 10px 22px rgba(15,23,42,.055);
}

body[data-page="admin-famiglie"] .admin-family-plan-current-card span{
  color:#526174;
  font-size:11px;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.06em;
}

body[data-page="admin-famiglie"] .admin-family-plan-current-card strong{
  color:#0B2F26;
  font-size:19px;
  line-height:1.1;
}

body[data-page="admin-famiglie"] .admin-family-plan-current-card small{
  color:#64748B;
  font-size:13px;
  font-weight:750;
}

body[data-page="admin-famiglie"] .admin-family-plan-options{
  display:grid;
  gap:14px;
  padding-top:2px;
}

body[data-page="admin-famiglie"] .admin-family-plan-option{
  position:relative;
  width:100%;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:16px;
  min-height:86px;
  padding:15px 16px;
  border:1px solid #C8DCCE;
  border-radius:16px;
  background:linear-gradient(180deg,#FFFFFF,#F8FCF9);
  color:#0B2F26;
  text-align:left;
  cursor:pointer;
  box-shadow:0 10px 22px rgba(15,23,42,.055);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

body[data-page="admin-famiglie"] .admin-family-plan-option:hover,
body[data-page="admin-famiglie"] .admin-family-plan-option:focus-visible{
  transform:translateY(-1px);
  border-color:rgba(15,122,79,.36);
  box-shadow:0 14px 28px rgba(15,23,42,.09);
  outline:none;
}

body[data-page="admin-famiglie"] .admin-family-plan-option.is-active{
  border-color:rgba(15,122,79,.78);
  background:linear-gradient(180deg,#EAF8EF,#DDF2E6);
  box-shadow:0 0 0 4px rgba(31,157,99,.16),0 16px 32px rgba(15,23,42,.10);
}

body[data-page="admin-famiglie"] .admin-family-plan-option-main,
body[data-page="admin-famiglie"] .admin-family-plan-option-meta{
  display:grid;
  gap:5px;
  min-width:0;
}

body[data-page="admin-famiglie"] .admin-family-plan-option-main strong{
  color:#0B2F26;
  font-size:17px;
  line-height:1.1;
}

body[data-page="admin-famiglie"] .admin-family-plan-option-main span{
  color:#64748B;
  font-size:13px;
  font-weight:700;
  line-height:1.35;
}

body[data-page="admin-famiglie"] .admin-family-plan-option-meta{
  justify-items:end;
  text-align:right;
}

body[data-page="admin-famiglie"] .admin-family-plan-option-meta span{
  color:#0F7A4F;
  font-size:17px;
  font-weight:950;
  white-space:nowrap;
}

body[data-page="admin-famiglie"] .admin-family-plan-option-meta small{
  color:#64748B;
  font-size:12px;
  font-weight:750;
  white-space:nowrap;
}

body[data-page="admin-famiglie"] .admin-family-plan-empty{
  display:grid;
  gap:5px;
  padding:18px;
  border:1px solid #C8DCCE;
  border-radius:16px;
  background:linear-gradient(180deg,#FFFFFF,#F8FCF9);
  color:#64748B;
}

body[data-page="admin-famiglie"] .admin-family-plan-empty strong{
  color:#0B2F26;
}

@media(max-width:760px){
  body[data-page="admin-famiglie"] .admin-family-plan-option{
    grid-template-columns:1fr;
  }

  body[data-page="admin-famiglie"] .admin-family-plan-option-meta{
    justify-items:start;
    text-align:left;
  }

  body[data-page="admin-famiglie"] .admin-family-plan-option-meta small{
    white-space:normal;
  }
}


/* STEP 129 — Admin Famiglie: modale custom Disattiva famiglia */
body[data-page="admin-famiglie"] .admin-family-suspend-icon{
  background:rgba(198,61,52,.11);
  color:#C63D34;
}

body[data-page="admin-famiglie"] .admin-family-suspend-summary{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

body[data-page="admin-famiglie"] .admin-family-suspend-card{
  display:grid;
  gap:5px;
  min-height:82px;
  padding:15px 16px;
  border:1px solid #C8DCCE;
  border-radius:16px;
  background:linear-gradient(180deg,#FFFFFF,#F8FCF9);
  box-shadow:0 10px 22px rgba(15,23,42,.055);
}

body[data-page="admin-famiglie"] .admin-family-suspend-card span{
  color:#64748B;
  font-size:11px;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.06em;
}

body[data-page="admin-famiglie"] .admin-family-suspend-card strong{
  color:#0B2F26;
  font-size:17px;
  line-height:1.1;
}

body[data-page="admin-famiglie"] .admin-family-suspend-card small{
  color:#64748B;
  font-size:12px;
  font-weight:750;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

body[data-page="admin-famiglie"] .admin-family-suspend-warning{
  display:grid;
  gap:5px;
  margin-top:14px;
  padding:16px;
  border:1px solid #F1B8B1;
  border-radius:16px;
  background:linear-gradient(180deg,#FFF8F8,#FFF1F1);
  color:#8F2A24;
  box-shadow:0 10px 22px rgba(198,61,52,.065);
}

body[data-page="admin-famiglie"] .admin-family-suspend-warning strong{
  color:#9F2F28;
  font-size:15px;
}

body[data-page="admin-famiglie"] .admin-family-suspend-warning span{
  color:#8F4A45;
  font-size:13px;
  font-weight:700;
  line-height:1.4;
}

body[data-page="admin-famiglie"] .admin-status-chip-danger{
  color:#B42318;
  background:#FFF1F0;
  border-color:#FDA29B;
}

@media(max-width:760px){
  body[data-page="admin-famiglie"] .admin-family-suspend-summary{
    grid-template-columns:1fr;
  }
}

/* STEP 135 — Conti: toggle conti disattivati nella lista */
.accounts-inactive-toggle {
  min-height: 52px;
  border-radius: 16px;
  white-space: nowrap;
  font-weight: 850;
}

@media (max-width: 720px) {
  .accounts-inactive-toggle {
    width: 100%;
    justify-content: center;
  }
}

/* STEP 136 — Conti: gestione disattivati con azioni sicure */
.account-reactivate-action,
.account-linked-info-action{
  cursor:pointer;
  position:relative;
  z-index:2;
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  width:40px;
  height:40px;
  flex:0 0 40px;
  border-radius:12px;
  padding:0;
  background:#fff;
  box-shadow:0 8px 18px rgba(15,23,42,.06);
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease,background .18s ease,color .18s ease;
  overflow:visible!important;
}
.account-reactivate-action{
  border:1px solid rgba(31,157,99,.28);
  color:#0f7a4f;
  background:rgba(31,157,99,.07);
}
.account-reactivate-action:hover{
  transform:translateY(-1px);
  border-color:#1f9d63;
  color:#fff;
  background:#1f9d63;
  box-shadow:0 12px 24px rgba(31,157,99,.16);
}
.account-linked-info-action{
  border:1px solid rgba(245,158,11,.32);
  color:#b45309;
  background:rgba(245,158,11,.10);
}
.account-linked-info-action:hover{
  transform:translateY(-1px);
  border-color:#d97706;
  color:#fff;
  background:#d97706;
  box-shadow:0 12px 24px rgba(180,83,9,.16);
}
.account-reactivate-action .account-edit-icon-svg,
.account-linked-info-action .account-edit-icon-svg{
  width:18px;
  height:18px;
}
.account-card-actions .account-reactivate-action[data-tooltip]:before,
.account-card-actions .account-linked-info-action[data-tooltip]:before{
  content:attr(data-tooltip);
  position:absolute;
  top:calc(100% + 10px)!important;
  bottom:auto!important;
  right:0!important;
  z-index:80!important;
  padding:7px 10px;
  border-radius:10px;
  background:#0b2f26;
  color:#fff;
  font-size:12px;
  font-weight:800;
  letter-spacing:.01em;
  white-space:nowrap;
  box-shadow:0 12px 24px rgba(15,23,42,.18);
  opacity:0;
  transform:translateY(4px);
  pointer-events:none;
  transition:opacity .16s ease,transform .16s ease;
}
.account-card-actions .account-reactivate-action[data-tooltip]:after,
.account-card-actions .account-linked-info-action[data-tooltip]:after{
  content:"";
  position:absolute;
  top:calc(100% + 4px)!important;
  bottom:auto!important;
  right:14px!important;
  z-index:80!important;
  border:6px solid transparent;
  border-bottom-color:#0b2f26;
  opacity:0;
  transform:translateY(4px);
  pointer-events:none;
  transition:opacity .16s ease,transform .16s ease;
}
.account-card-actions .account-reactivate-action[data-tooltip]:hover:before,
.account-card-actions .account-reactivate-action[data-tooltip]:focus-visible:before,
.account-card-actions .account-reactivate-action[data-tooltip]:hover:after,
.account-card-actions .account-reactivate-action[data-tooltip]:focus-visible:after,
.account-card-actions .account-linked-info-action[data-tooltip]:hover:before,
.account-card-actions .account-linked-info-action[data-tooltip]:focus-visible:before,
.account-card-actions .account-linked-info-action[data-tooltip]:hover:after,
.account-card-actions .account-linked-info-action[data-tooltip]:focus-visible:after{
  opacity:1;
  transform:translateY(0);
}
.account-real-card.is-disabled .account-card-actions{
  min-width:136px;
}
.account-card-disabled-note{
  margin-top:12px;
  padding:10px 12px;
  border:1px solid rgba(245,158,11,.22);
  border-radius:12px;
  background:rgba(245,158,11,.10);
  color:#92400e;
  font-size:12px;
  font-weight:800;
  line-height:1.35;
}
.account-card-disabled-note-clear{
  border-color:rgba(31,157,99,.24);
  background:rgba(31,157,99,.08);
  color:#0f7a4f;
}
.account-delete-warning small{
  display:block;
  margin-top:2px;
  color:inherit;
  opacity:.82;
  font-weight:800;
}
@media(max-width:720px){
  .account-reactivate-action,
  .account-linked-info-action{width:38px;height:38px;flex-basis:38px}
  .account-card-actions .account-reactivate-action[data-tooltip]:before,
  .account-card-actions .account-reactivate-action[data-tooltip]:after,
  .account-card-actions .account-linked-info-action[data-tooltip]:before,
  .account-card-actions .account-linked-info-action[data-tooltip]:after{display:none}
  .account-real-card.is-disabled .account-card-actions{min-width:126px}
}

/* STEP 141 — Conti: switch visualizzazione Griglia / Lista */
.accounts-header-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:12px;
  flex-wrap:wrap;
}

.accounts-view-switch{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:5px;
  border:1px solid #C8DCCE;
  border-radius:16px;
  background:linear-gradient(180deg,#FFFFFF,#F4FAF6);
  box-shadow:0 12px 26px rgba(15,23,42,.07);
}

.accounts-view-button{
  min-height:42px;
  padding:0 15px;
  border:1px solid transparent;
  border-radius:12px;
  background:transparent;
  color:#506074;
  font-size:14px;
  font-weight:900;
  letter-spacing:-.01em;
  cursor:pointer;
  transition:background .18s ease,border-color .18s ease,color .18s ease,box-shadow .18s ease,transform .18s ease;
}

.accounts-view-button:hover,
.accounts-view-button:focus-visible{
  color:#0B2F26;
  background:rgba(31,157,99,.08);
  outline:none;
}

.accounts-view-button.is-active{
  color:#FFFFFF;
  border-color:#0F7A4F;
  background:linear-gradient(135deg,#1F9D63,#0F7A4F);
  box-shadow:0 10px 20px rgba(31,157,99,.22);
}

.accounts-list-view{
  display:block;
  width:100%;
}

.accounts-list-panel{
  display:grid;
  gap:12px;
}

.account-list-row{
  position:relative;
  display:grid;
  grid-template-columns:minmax(240px,1.4fr) minmax(160px,.7fr) minmax(190px,.8fr) auto;
  align-items:center;
  gap:18px;
  padding:16px 18px;
  border:1px solid #C9D8CE;
  border-radius:18px;
  background:linear-gradient(135deg,#FBFEFC 0%,#F0F7F2 100%);
  box-shadow:0 15px 36px rgba(15,47,38,.10),0 1px 0 rgba(255,255,255,.85) inset;
  overflow:visible;
}

.account-list-row::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  background:linear-gradient(135deg,rgba(255,255,255,.72),rgba(255,255,255,0) 44%);
  pointer-events:none;
}

.account-list-row > *{
  position:relative;
  z-index:1;
}

.account-list-row.is-disabled{
  opacity:.82;
  background:linear-gradient(135deg,#F7FAF8 0%,#EEF4EF 100%);
}

.account-list-main{
  display:flex;
  align-items:center;
  gap:13px;
  min-width:0;
}

.account-list-title{
  display:grid;
  gap:4px;
  min-width:0;
}

.account-list-title h3{
  margin:0;
  color:#40516A;
  font-size:20px;
  font-weight:950;
  line-height:1.1;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.account-list-title span,
.account-list-last span{
  color:#64748B;
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.055em;
}

.account-list-balance{
  display:grid;
  justify-items:start;
  gap:3px;
}

.account-list-balance .account-balance{
  font-size:28px;
  line-height:1;
}

.account-list-balance small{
  color:#007A47;
  font-size:13px;
  font-weight:950;
}

.account-list-row.is-disabled .account-list-balance small{
  color:#3E9A72;
}

.account-list-last{
  display:grid;
  gap:5px;
  min-width:0;
}

.account-list-last strong{
  color:#64748B;
  font-size:14px;
  font-weight:850;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.account-list-actions{
  justify-content:flex-end;
  min-width:max-content;
}

.account-list-note{
  grid-column:1 / -1;
  width:100%;
  padding:9px 12px;
  border:1px solid rgba(245,158,11,.22);
  border-radius:12px;
  background:rgba(245,158,11,.10);
  color:#92400E;
  font-size:12px;
  font-weight:850;
  line-height:1.35;
}

@media(max-width:980px){
  .account-list-row{
    grid-template-columns:1fr auto;
  }

  .account-list-last,
  .account-list-note{
    grid-column:1 / -1;
  }
}

@media(max-width:720px){
  .accounts-header-actions{
    width:100%;
    display:grid;
    grid-template-columns:1fr;
  }

  .accounts-view-switch{
    width:100%;
    justify-content:stretch;
  }

  .accounts-view-button{
    flex:1;
  }

  .account-list-row{
    grid-template-columns:1fr;
    gap:13px;
    padding:16px;
  }

  .account-list-balance,
  .account-list-actions{
    justify-items:start;
    justify-content:flex-start;
  }

  .account-list-actions{
    width:100%;
  }
}


/* STEP 143 — Conti: lista più leggera e drag & drop */
.account-list-row{
  cursor:grab;
}

.account-list-row:active{
  cursor:grabbing;
}

.account-list-title span,
.account-list-balance small,
.account-list-last strong{
  font-weight:600;
}

.account-list-balance small{
  letter-spacing:0;
}

.account-list-last strong{
  color:#6B7280;
}

.account-list-row.is-dragging{
  opacity:.62;
  transform:scale(.992);
  box-shadow:0 12px 26px rgba(15,47,38,.10);
}

.account-list-row.is-drag-over{
  border-color:#1F9D63;
  box-shadow:0 0 0 4px rgba(31,157,99,.13),0 18px 38px rgba(15,47,38,.13);
}

.accounts-list-view.is-sorting .account-list-row:not(.is-dragging){
  transition:border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

/* STEP 152 — Obiettivi: azioni modifica/elimina e modale eliminazione */
.goal-card-actions {
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.goal-card-action-btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 12px;
  padding: 10px 13px;
  border: 1px solid #cddbd2;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbf8 100%);
  color: #0b2f26;
  font-size: 14px;
  font-weight: 850;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .06);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.goal-card-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, .10);
}

.goal-card-action-edit {
  border-color: rgba(15, 122, 79, .22);
  color: #0f7a4f;
}

.goal-card-action-delete {
  border-color: rgba(239, 68, 68, .24);
  color: #c62020;
  background: linear-gradient(180deg, #ffffff 0%, #fff7f7 100%);
}

.goal-delete-modal-card {
  max-width: 680px;
}

.goal-delete-icon {
  background: #fff1f1;
}

.goal-delete-summary {
  padding: 18px;
  border: 1px solid #cddbd2;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbf8 100%);
  box-shadow: 0 14px 30px rgba(15, 23, 42, .07);
}

.goal-delete-summary strong {
  display: block;
  color: #111827;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.goal-delete-summary small {
  display: block;
  margin-top: 7px;
  color: #6b7280;
  font-size: 15px;
  font-weight: 750;
}

.goal-delete-warning {
  display: grid;
  gap: 6px;
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid #fecaca;
  border-radius: 18px;
  background: #fff5f5;
  color: #b91c1c;
  font-weight: 750;
}

.goal-delete-warning strong {
  font-size: 17px;
}

.goal-delete-warning span {
  line-height: 1.35;
}

@media (max-width: 680px) {
  .goal-card-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .goal-card-action-btn,
  .goal-add-saving-btn {
    width: 100%;
  }
}


/* STEP 153 — Panoramica: stato vuoto Andamento mensile centrato */
.dashboard-real-trend.is-empty{
  min-height:252px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding-left:0;
  border-bottom:1px solid #edf2ee;
  background:transparent;
}
.dashboard-real-trend.is-empty .dashboard-empty-state-centered{
  width:min(100%, 330px);
  max-width:330px;
  min-height:220px;
  margin:0 auto;
}
.trend-card .dashboard-real-trend.is-empty{
  padding-right:0;
}
@media(max-width:720px){
  .dashboard-real-trend.is-empty .dashboard-empty-state-centered{
    width:100%;
    max-width:none;
    min-height:210px;
  }
}


/* STEP 154 — Panoramica: centraggio preciso stato vuoto Andamento mensile */
.trend-card .dashboard-real-trend.is-empty{
  box-sizing:border-box;
  width:100%;
  min-height:252px;
  display:grid;
  place-items:center;
  padding:0;
  border-bottom:1px solid #edf2ee;
  background:transparent;
}
.trend-card .dashboard-real-trend.is-empty .dashboard-empty-state-centered{
  box-sizing:border-box;
  width:min(100%, 330px);
  max-width:330px;
  min-height:220px;
  margin:0 auto;
  transform:translateX(-14px);
}
@media(max-width:720px){
  .trend-card .dashboard-real-trend.is-empty .dashboard-empty-state-centered{
    width:100%;
    max-width:none;
    min-height:210px;
    transform:none;
  }
}


/* STEP 155 — Panoramica: centraggio reale stato vuoto Andamento mensile
   Fix definitivo: la card vuota non deve ereditare il padding-left dell'area grafico. */
.trend-card .line-chart-fake:has(> .dashboard-empty-state-centered),
.trend-card .dashboard-real-trend.is-empty{
  box-sizing:border-box !important;
  width:100% !important;
  min-height:252px !important;
  padding-left:0 !important;
  padding-right:0 !important;
  display:grid !important;
  place-items:center !important;
  border-bottom:1px solid #edf2ee !important;
  background:transparent !important;
}
.trend-card .line-chart-fake:has(> .dashboard-empty-state-centered) > .dashboard-empty-state-centered,
.trend-card .dashboard-real-trend.is-empty > .dashboard-empty-state-centered{
  box-sizing:border-box !important;
  width:min(100%, 330px) !important;
  max-width:330px !important;
  min-height:220px !important;
  margin-left:auto !important;
  margin-right:auto !important;
  justify-self:center !important;
  align-self:center !important;
  transform:none !important;
}
@media(max-width:720px){
  .trend-card .line-chart-fake:has(> .dashboard-empty-state-centered) > .dashboard-empty-state-centered,
  .trend-card .dashboard-real-trend.is-empty > .dashboard-empty-state-centered{
    width:100% !important;
    max-width:none !important;
    min-height:210px !important;
  }
}

/* STEP 157 — Panoramica: importi Conti e liquidità leggermente in grassetto */
.dashboard-content .premium-account-row .account-amount b{
  font-weight:700 !important;
}

/* STEP 159 — Panoramica: importi Conti e liquidità in grassetto pieno */
.dashboard-content .accounts-premium-card .premium-account-row .account-amount,
.dashboard-content .accounts-premium-card .premium-account-row .account-amount b{
  font-weight:850 !important;
}
.dashboard-content .accounts-premium-card .premium-account-row .account-amount .currency-decimals-enhanced,
.dashboard-content .accounts-premium-card .premium-account-row .account-amount .currency-decimals{
  font-weight:750 !important;
}

/* STEP 158 — Obiettivi: modale eliminazione nascosta di default */
.goal-modal-backdrop[hidden],
.goal-delete-backdrop[hidden],
.goal-saving-backdrop[hidden]{
  display:none !important;
}

/* STEP 161 — Suggerimenti Dashboard: colori riepilogo entrate/uscite/risparmio */
.dashboard-suggestions-summary > span.dashboard-suggestions-summary-item{
  color:#fff!important;
  border:1px solid rgba(255,255,255,.22)!important;
  box-shadow:0 16px 34px rgba(15,23,42,.12)!important;
}
.dashboard-suggestions-summary > span.dashboard-suggestions-summary-item strong,
.dashboard-suggestions-summary > span.dashboard-suggestions-summary-item small{
  color:#fff!important;
}
.dashboard-suggestions-summary > span.dashboard-suggestions-summary-item small{
  opacity:.88!important;
}
.dashboard-suggestions-summary > span.dashboard-suggestions-summary-item.is-income,
.dashboard-suggestions-summary > span.dashboard-suggestions-summary-item.is-positive{
  background:linear-gradient(135deg,#0f7a4f 0%,#23a66f 100%)!important;
}
.dashboard-suggestions-summary > span.dashboard-suggestions-summary-item.is-expense,
.dashboard-suggestions-summary > span.dashboard-suggestions-summary-item.is-negative{
  background:linear-gradient(135deg,#c92f38 0%,#f04444 100%)!important;
}


/* STEP 165 — Admin Famiglie: creazione manuale famiglia */
body[data-page="admin-famiglie"] .admin-family-toolbar{
  align-items:center;
  gap:18px;
}
body[data-page="admin-famiglie"] .admin-family-create-button{
  margin-left:auto;
  white-space:nowrap;
}
body[data-page="admin-famiglie"] .admin-family-create-section{
  display:grid;
  gap:10px;
  margin-top:16px;
}
body[data-page="admin-famiglie"] .admin-family-create-section > span{
  color:#435164;
  font-size:13px;
  font-weight:900;
}
body[data-page="admin-famiglie"] .admin-family-create-status-options{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  padding:12px;
  border:1px solid #C8DCCE;
  border-radius:16px;
  background:linear-gradient(180deg,#F2FAF4,#EAF4EC);
}
body[data-page="admin-famiglie"] .admin-family-create-status-options button{
  min-height:44px;
  border:1px solid #BFD8C6;
  border-radius:12px;
  background:#FFFFFF;
  color:#0B2F26;
  font-weight:900;
  cursor:pointer;
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
body[data-page="admin-famiglie"] .admin-family-create-status-options button:hover,
body[data-page="admin-famiglie"] .admin-family-create-status-options button:focus-visible{
  transform:translateY(-1px);
  outline:none;
  box-shadow:0 10px 22px rgba(15,23,42,.09);
}
body[data-page="admin-famiglie"] .admin-family-create-status-options button.is-active{
  border-color:rgba(15,122,79,.62);
  background:linear-gradient(135deg,#0F7A4F,#179B63);
  color:#FFFFFF;
  box-shadow:0 14px 26px rgba(15,122,79,.20);
}
@media(max-width:720px){
  body[data-page="admin-famiglie"] .admin-family-toolbar{
    align-items:flex-start;
  }
  body[data-page="admin-famiglie"] .admin-family-create-button{
    width:100%;
    margin-left:0;
  }
  body[data-page="admin-famiglie"] .admin-family-create-status-options{
    grid-template-columns:1fr;
  }
}

/* STEP 171 — Impostazioni: Piano e abbonamento */
.settings-billing-panel .card-header {
  align-items: flex-start;
}

.settings-billing-summary {
  margin-top: 26px;
}

.settings-billing-hero-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(255, 255, 255, 0.96));
  box-shadow: 0 18px 38px rgba(11, 47, 38, 0.08);
}

.settings-billing-avatar {
  width: 70px;
  height: 70px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: #0b4a38;
  color: #ffffff;
  font-weight: 900;
  font-size: 28px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 14px 32px rgba(11, 47, 38, 0.18);
  flex: 0 0 auto;
}

.settings-billing-main h3 {
  margin: 4px 0 10px;
  font-size: 24px;
  color: var(--color-text);
  word-break: break-word;
}

.settings-billing-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-billing-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.settings-billing-facts article {
  padding: 16px;
  border: 1px solid rgba(11, 47, 38, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
}

.settings-billing-facts span {
  display: block;
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 6px;
}

.settings-billing-facts strong {
  display: block;
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.3;
  word-break: break-word;
}

.settings-billing-status-line,
.settings-billing-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 18px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(15, 122, 79, 0.18);
  background: rgba(15, 122, 79, 0.07);
  color: #254236;
}

.settings-billing-status-line {
  display: grid;
  gap: 5px;
}

.settings-billing-status-line strong,
.settings-billing-note p {
  margin: 0;
  line-height: 1.45;
  font-weight: 800;
}

.settings-billing-status-line span {
  color: var(--color-text-muted);
  font-weight: 700;
}

.settings-billing-note span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: rgba(15, 122, 79, 0.12);
  color: #0f7a4f;
  font-weight: 900;
}

.settings-billing-section {
  margin-top: 26px;
  padding: 20px;
  border: 1px solid rgba(11, 47, 38, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.04);
}

.settings-subsection-icon.billing,
.settings-subsection-icon.billing-history {
  background: rgba(245, 158, 11, 0.14);
  color: #8a5a00;
}

.settings-billing-plan-grid {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.settings-billing-plan-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(11, 47, 38, 0.12);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.05);
}

.settings-billing-plan-card.is-current {
  border-color: rgba(245, 158, 11, 0.34);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), #ffffff);
}

.settings-billing-plan-card strong,
.settings-billing-history-box h4 {
  display: block;
  color: var(--color-text);
  font-size: 17px;
  margin: 0 0 5px;
}

.settings-billing-plan-card small,
.settings-billing-plan-price small,
.settings-billing-timeline-row small {
  display: block;
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.35;
}

.settings-billing-plan-price {
  text-align: right;
  color: var(--color-text);
  font-weight: 900;
}

.settings-billing-plan-price span {
  display: block;
  white-space: nowrap;
}

.settings-billing-history-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.settings-billing-history-box {
  padding: 18px;
  border: 1px solid rgba(11, 47, 38, 0.12);
  border-radius: 20px;
  background: #ffffff;
}

.settings-billing-timeline-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid rgba(11, 47, 38, 0.08);
}

.settings-billing-timeline-row:first-child {
  border-top: 0;
}

.settings-billing-timeline-row span {
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.settings-billing-loading,
.settings-billing-empty {
  padding: 18px;
  border: 1px solid rgba(11, 47, 38, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--color-text-muted);
  font-weight: 800;
}

.settings-billing-warning {
  border-color: rgba(240, 68, 68, 0.2);
  background: rgba(240, 68, 68, 0.07);
  color: #b91c1c;
}

@media (max-width: 980px) {
  .settings-billing-facts,
  .settings-billing-history-grid {
    grid-template-columns: 1fr;
  }

  .settings-billing-plan-card {
    grid-template-columns: 1fr;
  }

  .settings-billing-plan-price,
  .settings-billing-timeline-row span {
    text-align: left;
  }
}

@media (max-width: 620px) {
  .settings-billing-hero-card {
    align-items: flex-start;
  }

  .settings-billing-avatar {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    font-size: 23px;
  }

  .settings-billing-main h3 {
    font-size: 20px;
  }
}

/* STEP 171E — Famyro billing fallback warning */
.settings-billing-soft-warning {
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: rgba(255, 251, 235, 0.9);
  color: #7c4a03;
  border-radius: 18px;
  padding: 14px 16px;
  margin-bottom: 16px;
  font-weight: 750;
  line-height: 1.45;
}

/* STEP 172 — Admin Abbonamenti e pagamenti */
body[data-page="admin-abbonamenti"] .admin-billing-kpi-grid{
  margin-bottom:24px;
}

body[data-page="admin-abbonamenti"] .admin-billing-table-shell,
body[data-page="admin-abbonamenti"] .admin-billing-payments-table-shell{
  overflow:auto;
}

body[data-page="admin-abbonamenti"] .admin-billing-table,
body[data-page="admin-abbonamenti"] .admin-billing-payments-table{
  min-width:980px;
}

body[data-page="admin-abbonamenti"] .admin-billing-table td,
body[data-page="admin-abbonamenti"] .admin-billing-payments-table td{
  vertical-align:middle;
}

.admin-muted-cell{
  color:var(--muted, #647067);
  font-size:.88rem;
}


/* STEP 173 — Patrimonio: bottone Nuovo bene sempre visibile nella card contenuto */
.patrimonio-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 210px;
}

.patrimonio-add-asset-btn {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  box-shadow: 0 16px 30px rgba(15, 122, 79, .18);
  white-space: nowrap;
}

.patrimonio-add-asset-btn span {
  display: inline-block;
  margin-right: 6px;
  font-weight: 900;
}

@media (max-width: 720px) {
  .patrimonio-card-header {
    gap: 18px;
  }

  .patrimonio-header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .patrimonio-add-asset-btn {
    width: 100%;
  }
}

/* STEP 177 — Movimenti: filtri rapidi periodo e intervallo personalizzato */
.movements-toolbar {
  grid-template-columns: minmax(260px, auto) minmax(260px, 1fr);
}

/* STEP 178 — Movimenti: periodo in card a tutta larghezza */
.movement-period-field {
  grid-column: 1 / -1;
  order: -1;
  padding: 16px;
  border: 1px solid #dce8df;
  border-radius: 20px;
  background: linear-gradient(135deg, #f7fbf8, #eef7f1);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .055);
}

.movement-period-field > span {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
  font-weight: 850;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.movement-period-quick-control {
  width: 100%;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  padding: 8px;
  background: #ffffff;
}

.movement-period-preset {
  padding: 11px 13px;
  font-weight: 750;
  white-space: nowrap;
}

.movement-custom-range {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #dce8df;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}

.movement-custom-range[hidden] {
  display: none !important;
}

.movement-custom-date-card {
  display: grid;
  gap: 6px;
}

.movement-custom-date-card > span {
  font-size: 12px;
  font-weight: 850;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.movement-custom-date-control {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  align-items: center;
  min-height: 44px;
  border: 1px solid #dce5dd;
  border-radius: 14px;
  background: #f8fbf9;
  overflow: hidden;
}

.movement-custom-date-control button {
  appearance: none;
  -webkit-appearance: none;
  width: 38px;
  height: 42px;
  border: 0;
  background: transparent;
  color: #0f7a4f;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
}

.movement-custom-date-control strong {
  text-align: center;
  color: #102a22;
  font-size: 14px;
  font-weight: 850;
  text-transform: capitalize;
  white-space: nowrap;
}

.movement-custom-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.movement-custom-apply,
.movement-custom-reset {
  appearance: none;
  -webkit-appearance: none;
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid #dce5dd;
  padding: 0 14px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .05);
}

.movement-custom-apply {
  border-color: #0f7a4f;
  background: #0f7a4f;
  color: #ffffff;
}

.movement-custom-reset {
  background: #ffffff;
  color: #475569;
}

.movement-period-preset:hover,
.movement-custom-date-control button:hover,
.movement-custom-apply:hover,
.movement-custom-reset:hover {
  transform: none !important;
  box-shadow: var(--button-hover-shadow) !important;
}

@media (max-width: 1180px) {
  .movements-toolbar {
    grid-template-columns: 1fr;
  }

  .movement-period-field {
    grid-column: auto;
  }
}

@media (max-width: 760px) {
  .movement-period-quick-control {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .movement-period-all,
  .movement-period-preset {
    white-space: normal;
    min-height: 44px;
  }

  .movement-custom-range {
    grid-template-columns: 1fr;
  }

  .movement-custom-actions {
    justify-content: stretch;
  }

  .movement-custom-apply,
  .movement-custom-reset {
    flex: 1;
  }
}

/* STEP 179 — Movimenti: calendario custom filtro Da / A */
.movement-custom-date-display {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #102a22;
  font: inherit;
  font-size: 14px;
  font-weight: 850;
  text-align: center;
  text-transform: capitalize;
  white-space: nowrap;
  cursor: pointer;
}

.movement-custom-date-display:hover,
.movement-custom-date-display:focus-visible {
  color: #0f7a4f;
  outline: none;
}

.movement-custom-calendar {
  grid-column: 1 / -1;
  border: 1px solid #dce8df;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f8fbf9);
  box-shadow: 0 18px 38px rgba(15, 23, 42, .12);
  padding: 14px;
}

.movement-custom-calendar[hidden] {
  display: none !important;
}

.movement-calendar-topline,
.movement-calendar-header,
.movement-calendar-footer {
  display: flex;
  align-items: center;
  gap: 8px;
}

.movement-calendar-topline {
  justify-content: space-between;
  margin-bottom: 10px;
}

.movement-calendar-topline span {
  font-size: 12px;
  font-weight: 900;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.movement-calendar-topline button,
.movement-calendar-header button,
.movement-calendar-footer button,
.movement-calendar-day {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid #dce8df;
  background: #ffffff;
  color: #183b31;
  cursor: pointer;
  font: inherit;
  font-weight: 850;
  transition: background .16s ease, color .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.movement-calendar-topline button {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  font-size: 22px;
  line-height: 1;
}

.movement-calendar-header {
  justify-content: center;
  margin-bottom: 12px;
}

.movement-calendar-header strong {
  min-width: 190px;
  color: #102a22;
  font-size: 16px;
  font-weight: 900;
  text-align: center;
  text-transform: capitalize;
}

.movement-calendar-header button {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: #0f7a4f;
}

.movement-calendar-weekdays,
.movement-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
}

.movement-calendar-weekdays {
  margin-bottom: 7px;
}

.movement-calendar-weekdays span {
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.movement-calendar-day {
  min-height: 42px;
  border-radius: 12px;
  background: #f8fbf9;
}

.movement-calendar-day.is-empty {
  border-color: transparent;
  background: transparent;
  pointer-events: none;
}

.movement-calendar-day.is-today {
  border-color: #0f7a4f;
  color: #0f7a4f;
}

.movement-calendar-day.is-selected {
  border-color: #0f7a4f;
  background: #0f7a4f;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 122, 79, .22);
}

.movement-calendar-topline button:hover,
.movement-calendar-header button:hover,
.movement-calendar-footer button:hover,
.movement-calendar-day:hover {
  border-color: #0f7a4f;
  background: #eef8f2;
  color: #0f7a4f;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
}

.movement-calendar-day.is-selected:hover {
  background: #0f7a4f;
  color: #ffffff;
}

.movement-calendar-footer {
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e7eee9;
  color: #64748b;
  font-size: 13px;
  font-weight: 750;
}

.movement-calendar-footer button {
  min-height: 36px;
  border-radius: 12px;
  padding: 0 12px;
  color: #0f7a4f;
}

@media (max-width: 760px) {
  .movement-calendar-header strong {
    min-width: 120px;
    font-size: 14px;
  }

  .movement-calendar-header button {
    width: 34px;
    height: 34px;
  }

  .movement-calendar-day {
    min-height: 38px;
    border-radius: 10px;
  }
}


/* STEP 179C — Movimenti: tooltip custom calendario Da / A */
.movement-calendar-topline button[data-tooltip],
.movement-calendar-header button[data-tooltip],
.movement-calendar-footer button[data-tooltip] {
  position: relative;
}

.movement-calendar-topline button[data-tooltip]::before,
.movement-calendar-header button[data-tooltip]::before,
.movement-calendar-footer button[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translate(-50%, 4px);
  opacity: 0;
  pointer-events: none;
  z-index: 120;
  white-space: nowrap;
  padding: 7px 10px;
  border-radius: 10px;
  background: #0b2f26;
  color: #ffffff;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  box-shadow: 0 14px 28px rgba(7, 31, 25, .22);
  transition: opacity .16s ease, transform .16s ease;
}

.movement-calendar-topline button[data-tooltip]::after,
.movement-calendar-header button[data-tooltip]::after,
.movement-calendar-footer button[data-tooltip]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  transform: translate(-50%, 4px);
  opacity: 0;
  pointer-events: none;
  z-index: 120;
  border: 6px solid transparent;
  border-top-color: #0b2f26;
  transition: opacity .16s ease, transform .16s ease;
}

.movement-calendar-topline button[data-tooltip]:hover::before,
.movement-calendar-topline button[data-tooltip]:focus-visible::before,
.movement-calendar-header button[data-tooltip]:hover::before,
.movement-calendar-header button[data-tooltip]:focus-visible::before,
.movement-calendar-footer button[data-tooltip]:hover::before,
.movement-calendar-footer button[data-tooltip]:focus-visible::before,
.movement-calendar-topline button[data-tooltip]:hover::after,
.movement-calendar-topline button[data-tooltip]:focus-visible::after,
.movement-calendar-header button[data-tooltip]:hover::after,
.movement-calendar-header button[data-tooltip]:focus-visible::after,
.movement-calendar-footer button[data-tooltip]:hover::after,
.movement-calendar-footer button[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 760px) {
  .movement-calendar-topline button[data-tooltip]::before,
  .movement-calendar-header button[data-tooltip]::before,
  .movement-calendar-footer button[data-tooltip]::before,
  .movement-calendar-topline button[data-tooltip]::after,
  .movement-calendar-header button[data-tooltip]::after,
  .movement-calendar-footer button[data-tooltip]::after {
    display: none;
  }
}


/* STEP 180B — Movimenti: accento premium interno alla card */
.movement-real-row{
  --movement-accent:#0f7a4f;
  isolation:isolate;
  position:relative;
  overflow:hidden;
  padding-left:24px;
}
.movement-real-row::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  background:linear-gradient(90deg,var(--movement-accent) 0 8px,transparent 8px);
  pointer-events:none;
  z-index:0;
}
.movement-real-row::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  pointer-events:none;
  box-shadow:inset 1px 0 0 rgba(255,255,255,.62);
  z-index:1;
}
.movement-real-income{--movement-accent:#1f9d63}
.movement-real-expense{--movement-accent:#f04444}
.movement-real-transfer{--movement-accent:#2f80ed}
.movement-real-row > *{
  position:relative;
  z-index:2;
}
.movement-real-title strong{
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.movement-real-title strong::before{
  content:"";
  width:10px;
  height:10px;
  border-radius:50%;
  background:var(--movement-accent);
  box-shadow:0 0 0 4px color-mix(in srgb,var(--movement-accent) 14%,transparent);
  flex:0 0 auto;
}
@supports not (color:color-mix(in srgb,#000 10%,transparent)){
  .movement-real-title strong::before{box-shadow:0 0 0 4px rgba(15,122,79,.12)}
}


/* STEP 186 — Academy: nuova pagina percorso di apprendimento */
.academy-v2-mini-label{display:inline-flex;align-items:center;min-height:28px;padding:6px 10px;border-radius:10px;background:rgba(15,122,79,.1);border:1px solid rgba(15,122,79,.16);color:#0f7a4f;font-size:12px;font-weight:900;margin-bottom:10px}
.academy-v2-journey-cta{margin:16px 0 0}
.academy-journey-shell{padding-top:24px}.academy-journey-shell .premium-card{border-radius:24px}.academy-journey-hero,.academy-journey-steps,.academy-roadmap-block{background:radial-gradient(circle at top left,rgba(53,140,110,.18),transparent 28%),linear-gradient(180deg,#102b24 0%,#0a1c18 100%);border-color:rgba(142,185,162,.14);color:#eef6f1;box-shadow:0 24px 54px rgba(4,20,15,.28)}.academy-journey-hero{display:grid;grid-template-columns:1.3fr .8fr;gap:22px;overflow:hidden}.academy-journey-eyebrow{display:inline-flex;align-items:center;gap:10px;font-size:12px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:rgba(236,247,242,.74)}.academy-journey-eyebrow img{width:18px;height:18px;object-fit:contain;filter:drop-shadow(0 4px 10px rgba(0,0,0,.2))}.academy-journey-hero h2{margin:12px 0 10px;font-size:44px;line-height:1.02;letter-spacing:-.04em;color:#fff}.academy-journey-hero p{margin:0;color:rgba(236,247,242,.78);font-size:17px;max-width:720px}.academy-journey-hero-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:22px}.academy-journey-summary{background:linear-gradient(180deg,rgba(255,255,255,.06),rgba(255,255,255,.02));border:1px solid rgba(230,213,162,.18);border-radius:22px;padding:22px;display:grid;gap:12px;align-self:stretch}.academy-journey-summary small{color:rgba(236,247,242,.7);font-size:13px;text-transform:uppercase;letter-spacing:.08em}.academy-journey-summary strong{font-size:44px;line-height:1;color:#fff;letter-spacing:-.04em}.academy-journey-summary p{margin:0;color:rgba(236,247,242,.82)}.academy-journey-summary-bar{height:12px;border-radius:999px;background:rgba(255,255,255,.08);overflow:hidden}.academy-journey-summary-bar i,.academy-journey-progress i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#34d399,#f0d48a)}.academy-journey-summary-meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.academy-journey-summary-meta span{border:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.03);border-radius:16px;padding:12px}.academy-journey-summary-meta b{display:block;font-size:17px;color:#fff;line-height:1.2}.academy-journey-summary-meta small{display:block;margin-top:4px;font-size:11px;color:rgba(236,247,242,.62);text-transform:none;letter-spacing:0}.academy-journey-steps{position:relative;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;align-items:start}.academy-journey-steps-line{position:absolute;left:88px;right:88px;top:43px;height:2px;background:linear-gradient(90deg,rgba(52,211,153,.9),rgba(240,212,138,.3))}.academy-journey-step{position:relative;display:grid;justify-items:center;text-align:center;gap:8px;z-index:1}.academy-journey-step b{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:#0f211c;border:2px solid rgba(255,255,255,.16);color:#fff;font-size:18px;box-shadow:0 0 0 6px rgba(255,255,255,.02)}.academy-journey-step strong{font-size:18px;color:#fff}.academy-journey-step small{color:rgba(236,247,242,.66);line-height:1.45}.academy-journey-step.is-current b{background:linear-gradient(135deg,#34d399,#0f7a4f);border-color:rgba(255,255,255,.28);box-shadow:0 0 18px rgba(52,211,153,.38)}.academy-journey-featured{margin-top:22px}.academy-journey-section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;margin-bottom:18px}.academy-journey-section-head h2{margin:10px 0 8px;font-size:31px;line-height:1.05;color:#11261f;letter-spacing:-.03em}.academy-journey-section-head p{margin:0;color:#65766e;max-width:760px}.academy-journey-featured .academy-journey-section-head h2,.academy-roadmap-block .academy-journey-section-head h2{color:#fff}.academy-journey-featured .academy-journey-section-head p,.academy-roadmap-block .academy-journey-section-head p{color:rgba(236,247,242,.74)}.academy-journey-feature-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}.academy-journey-feature-card{position:relative;overflow:hidden;background:linear-gradient(180deg,rgba(12,34,28,.95),rgba(9,24,20,.98));border:1px solid rgba(218,193,133,.16);border-radius:22px;padding:18px;display:grid;gap:12px;box-shadow:inset 0 1px 0 rgba(255,255,255,.04),0 16px 34px rgba(0,0,0,.2)}.academy-journey-feature-card:before{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(255,255,255,.03),transparent 26%);pointer-events:none}.academy-journey-feature-top{display:flex;align-items:center;justify-content:space-between;gap:10px}.academy-journey-feature-number{width:28px;height:28px;border-radius:9px;display:grid;place-items:center;background:rgba(255,255,255,.05);border:1px solid rgba(218,193,133,.24);font-size:13px;font-weight:900;color:#f3dd9d}.academy-journey-feature-state{display:inline-flex;align-items:center;min-height:30px;padding:6px 10px;border-radius:10px;font-size:12px;font-weight:900;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.05);color:#eef6f1}.academy-journey-feature-state.is-current{background:rgba(52,211,153,.14);border-color:rgba(52,211,153,.3);color:#8ef0c9}.academy-journey-feature-state.is-completed{background:rgba(52,211,153,.12);border-color:rgba(240,212,138,.34);color:#f6e2a4}.academy-journey-feature-art{height:132px;border-radius:20px;border:1px solid rgba(255,255,255,.08);background:radial-gradient(circle at 50% 30%,rgba(52,211,153,.25),transparent 36%),linear-gradient(180deg,#132c25 0%,#0d201b 100%);display:grid;place-items:center}.academy-journey-feature-art span{font-size:70px;line-height:1;filter:drop-shadow(0 10px 18px rgba(0,0,0,.22))}.academy-journey-feature-card small{font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:#f3dd9d;font-weight:800}.academy-journey-feature-card h3{margin:0;color:#fff;font-size:23px;line-height:1.1;letter-spacing:-.03em}.academy-journey-feature-card p{margin:0;color:rgba(236,247,242,.74);line-height:1.5}.academy-journey-progress{height:8px;border-radius:999px;background:rgba(255,255,255,.08);overflow:hidden}.academy-journey-progress-meta{display:flex;align-items:center;justify-content:space-between;gap:10px;color:rgba(236,247,242,.72);font-size:12px;font-weight:800}.academy-journey-progress-meta b{color:#f3dd9d}.academy-journey-open{display:flex;align-items:center;justify-content:center;gap:10px;min-height:54px;border-radius:16px;padding:12px 16px;background:linear-gradient(135deg,#7a5318,#5a3a10);color:#fff;font-weight:900;box-shadow:0 14px 32px rgba(0,0,0,.24)}.academy-journey-open:hover{transform:translateY(-1px)}.academy-roadmap-block{margin-top:20px}.academy-roadmap-badge{display:inline-flex;align-items:center;min-height:34px;padding:7px 12px;border-radius:11px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.12);font-size:12px;font-weight:900;color:#eef6f1}.academy-roadmap-badge.is-live{background:rgba(52,211,153,.12);border-color:rgba(52,211,153,.24);color:#9cf2d0}.academy-roadmap-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.academy-roadmap-card{display:grid;gap:10px;min-height:172px;padding:18px;border-radius:20px;background:linear-gradient(180deg,rgba(255,255,255,.05),rgba(255,255,255,.03));border:1px solid rgba(255,255,255,.08);color:#eef6f1;box-shadow:inset 0 1px 0 rgba(255,255,255,.03)}.academy-roadmap-card b{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:rgba(243,221,157,.1);border:1px solid rgba(243,221,157,.24);color:#f3dd9d;font-size:14px}.academy-roadmap-card strong{font-size:19px;line-height:1.15;color:#fff}.academy-roadmap-card small{color:rgba(236,247,242,.7);line-height:1.45}.academy-roadmap-card span{margin-top:auto;color:#f3dd9d;font-weight:900;font-size:13px}.academy-roadmap-card.is-live{background:linear-gradient(180deg,rgba(52,211,153,.08),rgba(255,255,255,.03));border-color:rgba(52,211,153,.18)}.academy-roadmap-card.is-live span{color:#9cf2d0}@media(max-width:1220px){.academy-journey-feature-grid,.academy-roadmap-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.academy-journey-hero{grid-template-columns:1fr}.academy-journey-steps{grid-template-columns:repeat(2,minmax(0,1fr))}.academy-journey-steps-line{display:none}}@media(max-width:720px){.academy-journey-shell{padding:18px 18px 110px}.academy-journey-hero h2{font-size:34px}.academy-journey-summary-meta{grid-template-columns:1fr}.academy-journey-feature-grid,.academy-roadmap-grid,.academy-journey-steps{grid-template-columns:1fr}.academy-journey-section-head{flex-direction:column;align-items:flex-start}.academy-journey-feature-card{padding:16px}.academy-journey-open{min-height:50px}}

/* STEP 187 — Academy percorso: fix contrasto sezione lezioni fondamentali */
.academy-journey-featured{
  margin-top:22px;
  padding:24px;
  border-radius:24px;
  background:
    radial-gradient(circle at 16% 0%, rgba(52,211,153,.18), transparent 34%),
    linear-gradient(180deg, #102b24 0%, #0a1c18 100%);
  border:1px solid rgba(142,185,162,.14);
  box-shadow:0 24px 54px rgba(4,20,15,.24);
}
.academy-journey-featured .academy-journey-section-head{
  margin-bottom:22px;
}
.academy-journey-featured .academy-journey-section-head h2{
  color:#ffffff!important;
}
.academy-journey-featured .academy-journey-section-head p{
  color:rgba(236,247,242,.76)!important;
}
.academy-journey-featured .academy-journey-eyebrow{
  color:rgba(236,247,242,.78)!important;
}

/* STEP 189 — Academy lezione: stile dark premium coerente con percorso */
.academy-lesson-dark-page .main-area{
  background:#eaf1ec;
}
.academy-lesson-dark-shell{
  background:
    radial-gradient(circle at 16% 2%, rgba(15,122,79,.18), transparent 34%),
    linear-gradient(180deg,#eaf1ec 0%,#f4f7f4 100%);
}
.academy-lesson-dark-shell .academy-lesson-hero-v2,
.academy-lesson-dark-shell .academy-lesson-main-v2,
.academy-lesson-dark-shell .academy-lesson-side-v2,
.academy-lesson-dark-shell .academy-lesson-quiz-v2,
.academy-lesson-dark-shell .academy-lesson-recap-v2,
.academy-lesson-dark-shell .academy-lesson-method-v2,
.academy-lesson-dark-shell .academy-lesson-nav-v2{
  background:
    radial-gradient(circle at 16% 0%, rgba(52,211,153,.15), transparent 34%),
    linear-gradient(180deg,#102b24 0%,#0a1c18 100%)!important;
  border:1px solid rgba(142,185,162,.14)!important;
  color:#eef6f1!important;
  box-shadow:0 24px 54px rgba(4,20,15,.24)!important;
}
.academy-lesson-dark-shell .academy-lesson-hero-v2{
  overflow:hidden;
}
.academy-lesson-dark-shell .academy-lesson-breadcrumb-v2,
.academy-lesson-dark-shell .academy-lesson-eyebrow-v2,
.academy-lesson-dark-shell .academy-lesson-meta-v2,
.academy-lesson-dark-shell .academy-lesson-side-v2 small,
.academy-lesson-dark-shell .academy-lesson-side-v2 p,
.academy-lesson-dark-shell .academy-lesson-main-v2 p,
.academy-lesson-dark-shell .academy-lesson-recap-v2 p,
.academy-lesson-dark-shell .academy-lesson-method-v2 p,
.academy-lesson-dark-shell .academy-lesson-quiz-v2 p{
  color:rgba(236,247,242,.74)!important;
}
.academy-lesson-dark-shell .academy-lesson-hero-v2 h2,
.academy-lesson-dark-shell .academy-lesson-main-v2 h2,
.academy-lesson-dark-shell .academy-lesson-main-v2 h3,
.academy-lesson-dark-shell .academy-lesson-side-v2 h2,
.academy-lesson-dark-shell .academy-lesson-recap-v2 h2,
.academy-lesson-dark-shell .academy-lesson-method-v2 h2,
.academy-lesson-dark-shell .academy-lesson-quiz-v2 h2{
  color:#ffffff!important;
}
.academy-lesson-dark-shell .academy-lesson-badge-v2,
.academy-lesson-dark-shell .academy-lesson-pill-v2,
.academy-lesson-dark-shell .academy-lesson-completion-pill{
  border-radius:12px!important;
  background:rgba(255,255,255,.06)!important;
  border:1px solid rgba(243,221,157,.22)!important;
  color:#f3dd9d!important;
}
.academy-lesson-dark-shell .academy-lesson-icon-v2{
  background:radial-gradient(circle at 50% 28%,rgba(52,211,153,.30),transparent 46%),linear-gradient(180deg,#132c25,#0d201b)!important;
  border:1px solid rgba(255,255,255,.10)!important;
  box-shadow:0 18px 42px rgba(0,0,0,.22)!important;
}
.academy-lesson-dark-shell .academy-lesson-checklist-v2 span,
.academy-lesson-dark-shell .academy-lesson-method-steps-v2 article,
.academy-lesson-dark-shell .academy-lesson-option-v2,
.academy-lesson-dark-shell .academy-lesson-note-v2,
.academy-lesson-dark-shell .academy-lesson-example-v2{
  background:rgba(255,255,255,.045)!important;
  border:1px solid rgba(255,255,255,.09)!important;
  color:#eef6f1!important;
  border-radius:16px!important;
}
.academy-lesson-dark-shell .academy-lesson-checklist-v2 b,
.academy-lesson-dark-shell .academy-lesson-method-steps-v2 b{
  color:#9cf2d0!important;
}
.academy-lesson-dark-shell .academy-lesson-option-v2{
  text-align:left;
  cursor:pointer;
  box-shadow:none!important;
}
.academy-lesson-dark-shell .academy-lesson-option-v2:hover,
.academy-lesson-dark-shell .academy-lesson-option-v2.is-selected{
  border-color:rgba(52,211,153,.34)!important;
  background:rgba(52,211,153,.10)!important;
}
.academy-lesson-dark-shell .academy-lesson-open-v2,
.academy-lesson-dark-shell .academy-lesson-action-v2,
.academy-lesson-dark-shell [data-complete-lesson],
.academy-lesson-dark-shell .academy-lesson-nav-v2 a{
  border-radius:16px!important;
}
.academy-lesson-dark-shell .academy-lesson-nav-v2 a{
  background:rgba(255,255,255,.05)!important;
  border:1px solid rgba(255,255,255,.10)!important;
  color:#eef6f1!important;
}
.academy-lesson-dark-shell .academy-lesson-nav-v2 a:not(.is-disabled):hover{
  border-color:rgba(52,211,153,.34)!important;
  background:rgba(52,211,153,.10)!important;
}
.academy-lesson-dark-shell .academy-lesson-nav-v2 a.is-disabled{
  opacity:.42;
}
.academy-lesson-dark-shell .academy-lesson-feedback-v2{
  border-radius:16px!important;
}
.academy-lesson-dark-shell .btn-primary,
.academy-lesson-dark-shell .academy-lesson-open-v2,
.academy-lesson-dark-shell .academy-lesson-action-v2{
  background:linear-gradient(135deg,#7a5318,#5a3a10)!important;
  color:#fff!important;
  box-shadow:0 14px 32px rgba(0,0,0,.24)!important;
}
.academy-lesson-dark-shell .btn-secondary{
  background:rgba(255,255,255,.06)!important;
  color:#eef6f1!important;
  border:1px solid rgba(255,255,255,.12)!important;
}
@media(max-width:720px){
  .academy-lesson-dark-shell{
    padding:18px 18px 110px;
  }
}

/* STEP 190 — Academy lezione: dark premium agganciato alle classi reali */
.academy-lesson-dark-page .main-area{
  background:#eaf1ec!important;
}
.academy-lesson-dark-shell{
  padding-top:24px;
  background:
    radial-gradient(circle at 16% 2%, rgba(15,122,79,.18), transparent 34%),
    linear-gradient(180deg,#eaf1ec 0%,#f4f7f4 100%)!important;
}
.academy-lesson-dark-shell .academy-lesson-breadcrumb{
  margin-bottom:18px;
}
.academy-lesson-dark-shell .academy-lesson-breadcrumb a,
.academy-lesson-dark-shell .academy-lesson-breadcrumb span,
.academy-lesson-dark-shell .academy-lesson-breadcrumb strong{
  color:#0b2f26!important;
}
.academy-lesson-dark-shell .academy-lesson-hero-v2,
.academy-lesson-dark-shell .academy-lesson-nav-card,
.academy-lesson-dark-shell .academy-lesson-section-card,
.academy-lesson-dark-shell .academy-lesson-quiz-card-v2,
.academy-lesson-dark-shell .academy-lesson-recap,
.academy-lesson-dark-shell .academy-lesson-bottom-nav,
.academy-lesson-dark-shell .academy-lesson-outcomes{
  background:
    radial-gradient(circle at 16% 0%, rgba(52,211,153,.15), transparent 34%),
    linear-gradient(180deg,#102b24 0%,#0a1c18 100%)!important;
  border:1px solid rgba(142,185,162,.16)!important;
  color:#eef6f1!important;
  box-shadow:0 24px 54px rgba(4,20,15,.24)!important;
}
.academy-lesson-dark-shell .academy-lesson-hero-v2,
.academy-lesson-dark-shell .academy-lesson-section-card,
.academy-lesson-dark-shell .academy-lesson-quiz-card-v2,
.academy-lesson-dark-shell .academy-lesson-recap,
.academy-lesson-dark-shell .academy-lesson-bottom-nav,
.academy-lesson-dark-shell .academy-lesson-outcomes{
  border-radius:24px!important;
}
.academy-lesson-dark-shell h2,
.academy-lesson-dark-shell h3,
.academy-lesson-dark-shell .academy-lesson-nav-card strong{
  color:#ffffff!important;
}
.academy-lesson-dark-shell p,
.academy-lesson-dark-shell small,
.academy-lesson-dark-shell .academy-v2-eyebrow,
.academy-lesson-dark-shell .academy-lesson-meta-v2,
.academy-lesson-dark-shell .academy-lesson-section-card span,
.academy-lesson-dark-shell .academy-lesson-note{
  color:rgba(236,247,242,.76)!important;
}
.academy-lesson-dark-shell .academy-v2-eyebrow{
  letter-spacing:.08em;
}
.academy-lesson-dark-shell .academy-lesson-hero-icon,
.academy-lesson-dark-shell .academy-lesson-section-icon{
  background:
    radial-gradient(circle at 50% 28%,rgba(52,211,153,.30),transparent 46%),
    linear-gradient(180deg,#132c25,#0d201b)!important;
  border:1px solid rgba(255,255,255,.10)!important;
  box-shadow:0 18px 42px rgba(0,0,0,.22)!important;
}
.academy-lesson-dark-shell .academy-lesson-meta-v2 span,
.academy-lesson-dark-shell [data-lesson-completion-pill]{
  border-radius:12px!important;
  background:rgba(255,255,255,.06)!important;
  border:1px solid rgba(243,221,157,.22)!important;
  color:#f3dd9d!important;
}
.academy-lesson-dark-shell .academy-lesson-nav-card a,
.academy-lesson-dark-shell .academy-lesson-method-steps article,
.academy-lesson-dark-shell .academy-lesson-options-v2 button,
.academy-lesson-dark-shell .academy-lesson-checklist span{
  background:rgba(255,255,255,.045)!important;
  border:1px solid rgba(255,255,255,.09)!important;
  color:#eef6f1!important;
  border-radius:16px!important;
  box-shadow:none!important;
}
.academy-lesson-dark-shell .academy-lesson-options-v2 button{
  text-align:left;
  cursor:pointer;
}
.academy-lesson-dark-shell .academy-lesson-nav-card a:hover,
.academy-lesson-dark-shell .academy-lesson-options-v2 button:hover,
.academy-lesson-dark-shell .academy-lesson-options-v2 button.is-selected{
  border-color:rgba(52,211,153,.34)!important;
  background:rgba(52,211,153,.10)!important;
}
.academy-lesson-dark-shell .btn-primary,
.academy-lesson-dark-shell [data-lesson-action],
.academy-lesson-dark-shell [data-complete-lesson]{
  background:linear-gradient(135deg,#7a5318,#5a3a10)!important;
  color:#fff!important;
  border:0!important;
  box-shadow:0 14px 32px rgba(0,0,0,.24)!important;
}
.academy-lesson-dark-shell .btn-secondary,
.academy-lesson-dark-shell .academy-lesson-bottom-nav a{
  background:rgba(255,255,255,.06)!important;
  color:#eef6f1!important;
  border:1px solid rgba(255,255,255,.12)!important;
}
.academy-lesson-dark-shell .academy-lesson-bottom-nav a.is-disabled{
  opacity:.42;
}
.academy-lesson-dark-shell .academy-lesson-feedback-v2{
  border-radius:16px!important;
}
.academy-lesson-dark-shell .academy-lesson-feedback-v2.is-correct{
  background:rgba(52,211,153,.12)!important;
  border:1px solid rgba(52,211,153,.28)!important;
  color:#9cf2d0!important;
}
.academy-lesson-dark-shell .academy-lesson-feedback-v2.is-wrong{
  background:rgba(245,158,11,.12)!important;
  border:1px solid rgba(245,158,11,.26)!important;
  color:#f3dd9d!important;
}
@media(max-width:720px){
  .academy-lesson-dark-shell{
    padding:18px 18px 110px;
  }
}

/* STEP 191 — Academy lezione: forzatura reale dark premium */
body.academy-lesson-premium-force{
  background:#eaf1ec!important;
}
body.academy-lesson-premium-force .main-area{
  background:#eaf1ec!important;
}
.academy-lesson-premium-force-shell{
  padding-top:26px!important;
  background:
    radial-gradient(circle at 14% 0%, rgba(15,122,79,.18), transparent 32%),
    linear-gradient(180deg,#eaf1ec 0%,#f4f7f4 100%)!important;
}
.academy-lesson-premium-force-shell .academy-lesson-breadcrumb{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  margin:0 0 18px!important;
  color:#0b2f26!important;
  font-weight:850!important;
}
.academy-lesson-premium-force-shell .academy-lesson-breadcrumb a,
.academy-lesson-premium-force-shell .academy-lesson-breadcrumb span,
.academy-lesson-premium-force-shell .academy-lesson-breadcrumb strong{
  color:#0b2f26!important;
}
.academy-lesson-premium-force-shell .academy-lesson-premium-card-force{
  background:
    radial-gradient(circle at 18% 0%, rgba(52,211,153,.16), transparent 34%),
    linear-gradient(180deg,#102b24 0%,#071b16 100%)!important;
  border:1px solid rgba(142,185,162,.18)!important;
  color:#eef6f1!important;
  box-shadow:0 24px 54px rgba(4,20,15,.26)!important;
  border-radius:24px!important;
}
.academy-lesson-premium-force-shell .academy-lesson-hero-v2{
  display:grid!important;
  grid-template-columns:92px minmax(0,1fr) auto!important;
  gap:20px!important;
  align-items:center!important;
}
.academy-lesson-premium-force-shell h1,
.academy-lesson-premium-force-shell h2,
.academy-lesson-premium-force-shell h3,
.academy-lesson-premium-force-shell strong{
  color:#ffffff!important;
}
.academy-lesson-premium-force-shell p,
.academy-lesson-premium-force-shell small,
.academy-lesson-premium-force-shell i,
.academy-lesson-premium-force-shell .academy-v2-eyebrow,
.academy-lesson-premium-force-shell .academy-lesson-meta-v2,
.academy-lesson-premium-force-shell .academy-lesson-note{
  color:rgba(236,247,242,.76)!important;
}
.academy-lesson-premium-force-shell .academy-v2-eyebrow{
  display:inline-flex!important;
  align-items:center!important;
  gap:8px!important;
  color:#f3dd9d!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
  font-weight:900!important;
}
.academy-lesson-premium-force-shell .academy-lesson-hero-icon,
.academy-lesson-premium-force-shell .academy-lesson-section-icon{
  background:
    radial-gradient(circle at 50% 28%,rgba(52,211,153,.32),transparent 46%),
    linear-gradient(180deg,#173c31,#0b211b)!important;
  border:1px solid rgba(255,255,255,.12)!important;
  box-shadow:0 18px 42px rgba(0,0,0,.24)!important;
  color:#fff!important;
}
.academy-lesson-premium-force-shell .academy-lesson-meta-v2 span,
.academy-lesson-premium-force-shell [data-lesson-completion-pill]{
  display:inline-flex!important;
  align-items:center!important;
  gap:7px!important;
  border-radius:12px!important;
  background:rgba(255,255,255,.06)!important;
  border:1px solid rgba(243,221,157,.22)!important;
  color:#f3dd9d!important;
}
.academy-lesson-premium-force-shell .academy-lesson-grid-v2{
  display:grid!important;
  grid-template-columns:280px minmax(0,1fr)!important;
  gap:20px!important;
}
.academy-lesson-premium-force-shell .academy-lesson-nav-card{
  align-self:start!important;
  position:sticky!important;
  top:118px!important;
}
.academy-lesson-premium-force-shell .academy-lesson-nav-card a,
.academy-lesson-premium-force-shell .academy-lesson-method-steps article,
.academy-lesson-premium-force-shell .academy-lesson-options-v2 button,
.academy-lesson-premium-force-shell .academy-lesson-checklist span{
  background:rgba(255,255,255,.045)!important;
  border:1px solid rgba(255,255,255,.10)!important;
  color:#eef6f1!important;
  border-radius:16px!important;
  box-shadow:none!important;
}
.academy-lesson-premium-force-shell .academy-lesson-nav-card a{
  display:flex!important;
  align-items:center!important;
  gap:9px!important;
  min-height:42px!important;
  padding:10px 12px!important;
  font-weight:850!important;
}
.academy-lesson-premium-force-shell .academy-lesson-flow-v2{
  display:grid!important;
  gap:16px!important;
}
.academy-lesson-premium-force-shell .academy-lesson-section-card{
  display:grid!important;
  grid-template-columns:56px minmax(0,1fr)!important;
  gap:16px!important;
  align-items:flex-start!important;
}
.academy-lesson-premium-force-shell .academy-lesson-section-card > div:last-child > span{
  color:#f3dd9d!important;
  font-weight:900!important;
}
.academy-lesson-premium-force-shell .academy-lesson-link-card{
  grid-template-columns:56px minmax(0,1fr) auto!important;
}
.academy-lesson-premium-force-shell .academy-lesson-options-v2{
  display:grid!important;
  gap:10px!important;
}
.academy-lesson-premium-force-shell .academy-lesson-options-v2 button{
  text-align:left!important;
  cursor:pointer!important;
  padding:14px 16px!important;
}
.academy-lesson-premium-force-shell .academy-lesson-nav-card a:hover,
.academy-lesson-premium-force-shell .academy-lesson-options-v2 button:hover,
.academy-lesson-premium-force-shell .academy-lesson-options-v2 button.is-selected{
  border-color:rgba(52,211,153,.36)!important;
  background:rgba(52,211,153,.10)!important;
}
.academy-lesson-premium-force-shell .btn-primary,
.academy-lesson-premium-force-shell [data-lesson-action],
.academy-lesson-premium-force-shell [data-complete-lesson]{
  background:linear-gradient(135deg,#7a5318,#5a3a10)!important;
  color:#fff!important;
  border:0!important;
  box-shadow:0 14px 32px rgba(0,0,0,.24)!important;
}
.academy-lesson-premium-force-shell .btn-secondary,
.academy-lesson-premium-force-shell .academy-lesson-bottom-nav a{
  background:rgba(255,255,255,.06)!important;
  color:#eef6f1!important;
  border:1px solid rgba(255,255,255,.12)!important;
}
.academy-lesson-premium-force-shell .academy-lesson-bottom-nav{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:14px!important;
}
.academy-lesson-premium-force-shell .academy-lesson-step-links{
  display:flex!important;
  gap:10px!important;
  flex-wrap:wrap!important;
}
.academy-lesson-premium-force-shell .academy-lesson-feedback-v2{
  border-radius:16px!important;
}
.academy-lesson-premium-force-shell .academy-lesson-feedback-v2.is-correct{
  background:rgba(52,211,153,.12)!important;
  border:1px solid rgba(52,211,153,.28)!important;
  color:#9cf2d0!important;
}
.academy-lesson-premium-force-shell .academy-lesson-feedback-v2.is-wrong{
  background:rgba(245,158,11,.12)!important;
  border:1px solid rgba(245,158,11,.26)!important;
  color:#f3dd9d!important;
}
@media(max-width:1100px){
  .academy-lesson-premium-force-shell .academy-lesson-grid-v2{
    grid-template-columns:1fr!important;
  }
  .academy-lesson-premium-force-shell .academy-lesson-nav-card{
    position:static!important;
  }
  .academy-lesson-premium-force-shell .academy-lesson-hero-v2{
    grid-template-columns:1fr!important;
  }
}
@media(max-width:720px){
  .academy-lesson-premium-force-shell{
    padding:18px 18px 110px!important;
  }
  .academy-lesson-premium-force-shell .academy-lesson-section-card,
  .academy-lesson-premium-force-shell .academy-lesson-link-card{
    grid-template-columns:1fr!important;
  }
  .academy-lesson-premium-force-shell .academy-lesson-bottom-nav{
    align-items:stretch!important;
    flex-direction:column!important;
  }
}

/* STEP 192 — Academy: warning persistenza Supabase */
.academy-persistence-warning{
  margin:0 0 18px!important;
  border-radius:16px!important;
  border:1px solid rgba(245,158,11,.34)!important;
  background:rgba(245,158,11,.12)!important;
  color:#7c4a03!important;
  font-weight:850!important;
}

/* STEP 197 — Academy: quiz premium */
.academy-lesson-premium-force-shell .academy-lesson-quiz-premium{
  position:relative!important;
  overflow:hidden!important;
  padding:26px!important;
  background:
    radial-gradient(circle at 12% 0%, rgba(240,212,138,.16), transparent 32%),
    radial-gradient(circle at 86% 8%, rgba(52,211,153,.12), transparent 28%),
    linear-gradient(180deg,#102b24 0%,#071b16 100%)!important;
}
.academy-lesson-premium-force-shell .academy-lesson-quiz-premium:before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:7px;
  background:linear-gradient(180deg,#f3dd9d,#34d399);
  border-radius:24px 0 0 24px;
  opacity:.9;
}
.academy-lesson-premium-force-shell .academy-lesson-quiz-head-v2{
  display:grid!important;
  grid-template-columns:62px minmax(0,1fr)!important;
  gap:16px!important;
  align-items:start!important;
  margin-bottom:18px!important;
}
.academy-lesson-premium-force-shell .academy-quiz-icon{
  width:58px!important;
  height:58px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:18px!important;
  background:rgba(243,221,157,.12)!important;
  border:1px solid rgba(243,221,157,.26)!important;
  box-shadow:0 18px 36px rgba(0,0,0,.22)!important;
  font-size:26px!important;
}
.academy-lesson-premium-force-shell .academy-lesson-quiz-head-v2 small{
  display:inline-flex!important;
  align-items:center!important;
  min-height:30px!important;
  padding:6px 10px!important;
  border-radius:10px!important;
  background:rgba(255,255,255,.06)!important;
  border:1px solid rgba(255,255,255,.10)!important;
  color:#f3dd9d!important;
  font-weight:950!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
}
.academy-lesson-premium-force-shell .academy-lesson-quiz-head-v2 h3{
  margin:12px 0 8px!important;
  font-size:28px!important;
  line-height:1.1!important;
}
.academy-lesson-premium-force-shell .academy-lesson-quiz-head-v2 p{
  margin:0!important;
  color:rgba(236,247,242,.72)!important;
}
.academy-lesson-premium-force-shell .academy-quiz-options-premium{
  display:grid!important;
  gap:12px!important;
}
.academy-lesson-premium-force-shell .academy-quiz-options-premium .academy-lesson-option-v2{
  display:grid!important;
  grid-template-columns:44px minmax(0,1fr)!important;
  gap:13px!important;
  align-items:center!important;
  min-height:64px!important;
  padding:13px 15px!important;
  background:rgba(255,255,255,.045)!important;
  border:1px solid rgba(255,255,255,.10)!important;
  color:#eef6f1!important;
  border-radius:18px!important;
  font-weight:900!important;
  transition:transform .18s ease,border-color .18s ease,background .18s ease!important;
}
.academy-lesson-premium-force-shell .academy-quiz-options-premium .academy-lesson-option-v2:hover{
  transform:translateY(-1px)!important;
  border-color:rgba(52,211,153,.36)!important;
  background:rgba(52,211,153,.10)!important;
}
.academy-lesson-premium-force-shell .academy-quiz-options-premium .academy-lesson-option-v2.is-selected{
  border-color:rgba(243,221,157,.38)!important;
  background:linear-gradient(135deg,rgba(52,211,153,.13),rgba(243,221,157,.10))!important;
}
.academy-quiz-option-index{
  width:40px!important;
  height:40px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:13px!important;
  background:rgba(243,221,157,.12)!important;
  border:1px solid rgba(243,221,157,.24)!important;
  color:#f3dd9d!important;
  font-weight:950!important;
}
.academy-quiz-option-text{
  color:#eef6f1!important;
  line-height:1.35!important;
}
.academy-lesson-premium-force-shell .academy-quiz-feedback-premium{
  display:grid!important;
  gap:5px!important;
  margin-top:16px!important;
  padding:16px 18px!important;
  border-radius:18px!important;
  font-weight:850!important;
}
.academy-lesson-premium-force-shell .academy-quiz-feedback-premium[hidden]{
  display:none!important;
}
.academy-lesson-premium-force-shell .academy-quiz-feedback-premium strong{
  font-size:18px!important;
}
.academy-lesson-premium-force-shell .academy-quiz-feedback-premium span{
  color:inherit!important;
  opacity:.88!important;
}
.academy-lesson-premium-force-shell .academy-quiz-note{
  margin-top:14px!important;
  padding:13px 15px!important;
  border-radius:16px!important;
  background:rgba(255,255,255,.04)!important;
  border:1px solid rgba(255,255,255,.08)!important;
}
@media(max-width:720px){
  .academy-lesson-premium-force-shell .academy-lesson-quiz-head-v2,
  .academy-lesson-premium-force-shell .academy-quiz-options-premium .academy-lesson-option-v2{
    grid-template-columns:1fr!important;
  }
  .academy-lesson-premium-force-shell .academy-quiz-icon,
  .academy-quiz-option-index{
    width:42px!important;
    height:42px!important;
  }
}

/* STEP 198 — Academy: quiz più chiaro e accattivante */
.academy-lesson-premium-force-shell .academy-quiz-redesign{
  position:relative!important;
  overflow:hidden!important;
  padding:0!important;
  background:
    radial-gradient(circle at 12% 0%, rgba(240,212,138,.16), transparent 30%),
    radial-gradient(circle at 88% 0%, rgba(52,211,153,.13), transparent 30%),
    linear-gradient(180deg,#102b24 0%,#071b16 100%)!important;
  border:1px solid rgba(142,185,162,.18)!important;
  border-radius:26px!important;
  box-shadow:0 24px 54px rgba(4,20,15,.26)!important;
}
.academy-lesson-premium-force-shell .academy-quiz-redesign:before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:5px;
  background:linear-gradient(90deg,#34d399,#f3dd9d,#34d399);
  opacity:.95;
}
.academy-lesson-premium-force-shell .academy-quiz-redesign-head{
  display:grid!important;
  grid-template-columns:72px minmax(0,1fr)!important;
  gap:18px!important;
  align-items:start!important;
  padding:28px 30px 22px!important;
  border-bottom:1px solid rgba(255,255,255,.08)!important;
}
.academy-lesson-premium-force-shell .academy-quiz-redesign-icon{
  width:66px!important;
  height:66px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:20px!important;
  background:
    radial-gradient(circle at 50% 25%, rgba(243,221,157,.32), transparent 48%),
    linear-gradient(180deg,rgba(255,255,255,.09),rgba(255,255,255,.04))!important;
  border:1px solid rgba(243,221,157,.28)!important;
  color:#f3dd9d!important;
  font-size:34px!important;
  font-weight:950!important;
  box-shadow:0 18px 38px rgba(0,0,0,.24)!important;
}
.academy-lesson-premium-force-shell .academy-quiz-redesign-head span{
  display:inline-flex!important;
  width:max-content!important;
  min-height:30px!important;
  align-items:center!important;
  padding:6px 10px!important;
  border-radius:10px!important;
  background:rgba(243,221,157,.10)!important;
  border:1px solid rgba(243,221,157,.24)!important;
  color:#f3dd9d!important;
  font-size:12px!important;
  font-weight:950!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
}
.academy-lesson-premium-force-shell .academy-quiz-redesign-head h3{
  margin:12px 0 8px!important;
  color:#fff!important;
  font-size:30px!important;
  line-height:1.12!important;
  letter-spacing:-.03em!important;
}
.academy-lesson-premium-force-shell .academy-quiz-redesign-head p{
  margin:0!important;
  color:rgba(236,247,242,.74)!important;
  font-size:16px!important;
  line-height:1.5!important;
}
.academy-lesson-premium-force-shell .academy-quiz-redesign-body{
  padding:24px 30px 22px!important;
}
.academy-lesson-premium-force-shell .academy-quiz-redesign-options{
  display:grid!important;
  gap:12px!important;
}
.academy-lesson-premium-force-shell .academy-quiz-choice{
  display:grid!important;
  grid-template-columns:48px minmax(0,1fr)!important;
  gap:14px!important;
  align-items:center!important;
  width:100%!important;
  min-height:66px!important;
  padding:13px 15px!important;
  border-radius:18px!important;
  background:rgba(255,255,255,.045)!important;
  border:1px solid rgba(255,255,255,.10)!important;
  color:#eef6f1!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.03)!important;
  text-align:left!important;
  cursor:pointer!important;
  transition:transform .16s ease,border-color .16s ease,background .16s ease,box-shadow .16s ease!important;
}
.academy-lesson-premium-force-shell .academy-quiz-choice:hover{
  transform:translateY(-1px)!important;
  border-color:rgba(52,211,153,.38)!important;
  background:rgba(52,211,153,.10)!important;
  box-shadow:0 12px 28px rgba(0,0,0,.18)!important;
}
.academy-lesson-premium-force-shell .academy-quiz-choice.is-selected{
  border-color:rgba(243,221,157,.44)!important;
  background:
    linear-gradient(135deg,rgba(52,211,153,.14),rgba(243,221,157,.10))!important;
  box-shadow:0 14px 30px rgba(0,0,0,.20)!important;
}
.academy-quiz-choice-letter{
  width:44px!important;
  height:44px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:14px!important;
  background:rgba(243,221,157,.12)!important;
  border:1px solid rgba(243,221,157,.26)!important;
  color:#f3dd9d!important;
  font-weight:950!important;
  font-size:17px!important;
}
.academy-quiz-choice-text{
  color:#eef6f1!important;
  font-weight:900!important;
  line-height:1.38!important;
}
.academy-lesson-premium-force-shell .academy-quiz-redesign-feedback{
  margin-top:16px!important;
  padding:16px 18px!important;
  border-radius:18px!important;
  display:grid!important;
  gap:5px!important;
  font-weight:850!important;
}
.academy-lesson-premium-force-shell .academy-quiz-redesign-feedback[hidden]{
  display:none!important;
}
.academy-lesson-premium-force-shell .academy-quiz-redesign-feedback strong{
  color:inherit!important;
  font-size:18px!important;
}
.academy-lesson-premium-force-shell .academy-quiz-redesign-feedback span{
  color:inherit!important;
  opacity:.88!important;
}
.academy-lesson-premium-force-shell .academy-quiz-redesign-footer{
  display:flex!important;
  align-items:center!important;
  gap:12px!important;
  padding:18px 30px 24px!important;
  border-top:1px solid rgba(255,255,255,.08)!important;
  background:rgba(255,255,255,.03)!important;
}
.academy-lesson-premium-force-shell .academy-quiz-redesign-footer span{
  width:34px!important;
  height:34px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:12px!important;
  background:rgba(52,211,153,.13)!important;
  border:1px solid rgba(52,211,153,.26)!important;
  color:#9cf2d0!important;
  font-weight:950!important;
  flex:0 0 34px!important;
}
.academy-lesson-premium-force-shell .academy-quiz-redesign-footer p{
  margin:0!important;
  color:rgba(236,247,242,.75)!important;
  font-weight:850!important;
}
@media(max-width:720px){
  .academy-lesson-premium-force-shell .academy-quiz-redesign-head{
    grid-template-columns:1fr!important;
    padding:24px 20px 20px!important;
  }
  .academy-lesson-premium-force-shell .academy-quiz-redesign-body{
    padding:20px!important;
  }
  .academy-lesson-premium-force-shell .academy-quiz-choice{
    grid-template-columns:1fr!important;
  }
  .academy-lesson-premium-force-shell .academy-quiz-redesign-footer{
    align-items:flex-start!important;
    padding:18px 20px 22px!important;
  }
}

/* STEP 199 — Academy: fix spaziatura feedback quiz */
.academy-quiz-redesign-feedback{
  display:flex !important;
  flex-direction:column !important;
  align-items:flex-start !important;
  gap:8px !important;
  line-height:1.45 !important;
}
.academy-quiz-redesign-feedback strong{
  display:block !important;
  margin:0 !important;
  line-height:1.15 !important;
}
.academy-quiz-redesign-feedback span{
  display:block !important;
  margin:0 !important;
  line-height:1.45 !important;
}
.academy-quiz-redesign-feedback.is-correct{
  background:linear-gradient(135deg, rgba(52,211,153,.16), rgba(16,185,129,.08)) !important;
  border:1px solid rgba(52,211,153,.28) !important;
}
.academy-quiz-redesign-feedback.is-wrong{
  background:linear-gradient(135deg, rgba(243,221,157,.18), rgba(184,134,11,.10)) !important;
  border:1px solid rgba(243,221,157,.28) !important;
}

/* STEP 200 — Academy: nuova panoramica landing dark premium */
.academy-overview-premium{
  padding-top:24px;
  background:
    radial-gradient(circle at 12% 0%, rgba(15,122,79,.22), transparent 34%),
    linear-gradient(180deg,#e6f0ea 0%,#f5f8f5 100%);
}
.academy-overview-hero-banner{
  display:block;
  position:relative;
  overflow:hidden;
  border-radius:28px;
  border:1px solid rgba(9,47,38,.16);
  box-shadow:0 28px 70px rgba(4,20,15,.26);
  background:#071b16;
  margin-bottom:22px;
}
.academy-overview-hero-banner img{
  display:block;
  width:100%;
  height:auto;
  min-height:260px;
  object-fit:cover;
}
.academy-overview-hero-banner:after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg,rgba(255,255,255,0),rgba(7,27,22,.05));
  pointer-events:none;
}
.academy-overview-hero-banner:hover{
  transform:translateY(-2px);
  box-shadow:0 34px 84px rgba(4,20,15,.30);
}
.academy-overview-intro,
.academy-overview-map,
.academy-overview-ai{
  background:
    radial-gradient(circle at 14% 0%, rgba(52,211,153,.16), transparent 34%),
    linear-gradient(180deg,#102b24 0%,#071b16 100%)!important;
  border:1px solid rgba(142,185,162,.16)!important;
  color:#eef6f1!important;
  box-shadow:0 24px 54px rgba(4,20,15,.24)!important;
  border-radius:26px!important;
}
.academy-overview-intro{
  display:grid;
  grid-template-columns:minmax(0,1.2fr) 420px;
  gap:22px;
  align-items:stretch;
  margin-bottom:22px;
}
.academy-overview-eyebrow{
  display:inline-flex;
  align-items:center;
  gap:10px;
  color:#f3dd9d;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.08em;
  font-size:12px;
}
.academy-overview-eyebrow img{
  width:18px;
  height:18px;
  object-fit:contain;
}
.academy-overview-intro h2,
.academy-overview-section-head h2,
.academy-overview-ai h2{
  margin:12px 0 10px;
  color:#fff;
  font-size:40px;
  line-height:1.05;
  letter-spacing:-.04em;
}
.academy-overview-intro p,
.academy-overview-section-head p,
.academy-overview-ai p{
  margin:0;
  color:rgba(236,247,242,.74);
  font-size:17px;
  line-height:1.55;
  max-width:780px;
}
.academy-overview-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:22px;
}
.academy-overview-progress-card{
  display:grid;
  gap:12px;
  padding:22px;
  border-radius:22px;
  background:linear-gradient(180deg,rgba(255,255,255,.06),rgba(255,255,255,.025));
  border:1px solid rgba(243,221,157,.18);
}
.academy-overview-progress-card small{
  color:rgba(236,247,242,.68);
  text-transform:uppercase;
  letter-spacing:.08em;
  font-weight:900;
}
.academy-overview-progress-card strong{
  color:#fff;
  font-size:54px;
  line-height:1;
  letter-spacing:-.05em;
}
.academy-overview-progress-card p{
  color:rgba(236,247,242,.78);
  margin:0;
}
.academy-overview-progress-bar{
  height:12px;
  border-radius:999px;
  background:rgba(255,255,255,.09);
  overflow:hidden;
}
.academy-overview-progress-bar i{
  display:block;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,#34d399,#f3dd9d);
}
.academy-overview-progress-card a{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:52px;
  border-radius:16px;
  background:linear-gradient(135deg,#7a5318,#5a3a10);
  color:#fff;
  font-weight:950;
  box-shadow:0 14px 32px rgba(0,0,0,.24);
}
.academy-overview-benefits{
  margin:24px 0;
}
.academy-overview-section-head{
  margin-bottom:16px;
}
.academy-overview-section-head h2{
  color:#102b24;
  font-size:32px;
}
.academy-overview-benefit-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}
.academy-overview-benefit-card{
  background:
    radial-gradient(circle at 20% 0%, rgba(52,211,153,.12), transparent 34%),
    linear-gradient(180deg,#102b24 0%,#0a1c18 100%)!important;
  border:1px solid rgba(142,185,162,.14)!important;
  color:#eef6f1!important;
  border-radius:22px!important;
  box-shadow:0 18px 42px rgba(4,20,15,.20)!important;
}
.academy-overview-benefit-card > span{
  width:56px;
  height:56px;
  display:grid;
  place-items:center;
  border-radius:18px;
  background:rgba(243,221,157,.10);
  border:1px solid rgba(243,221,157,.22);
  font-size:28px;
  margin-bottom:16px;
}
.academy-overview-benefit-card h3{
  margin:0 0 8px;
  color:#fff;
  font-size:22px;
}
.academy-overview-benefit-card p{
  margin:0;
  color:rgba(236,247,242,.72);
  line-height:1.5;
}
.academy-overview-map{
  margin-bottom:22px;
}
.academy-overview-map .academy-overview-section-head h2,
.academy-overview-map .academy-overview-section-head p{
  color:#fff;
}
.academy-overview-step-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  margin-top:18px;
}
.academy-overview-step-grid article{
  padding:18px;
  border-radius:20px;
  background:rgba(255,255,255,.045);
  border:1px solid rgba(255,255,255,.09);
}
.academy-overview-step-grid b{
  width:40px;
  height:40px;
  display:grid;
  place-items:center;
  border-radius:13px;
  background:rgba(243,221,157,.12);
  border:1px solid rgba(243,221,157,.24);
  color:#f3dd9d;
  margin-bottom:14px;
}
.academy-overview-step-grid h3{
  margin:0 0 8px;
  color:#fff;
}
.academy-overview-step-grid p{
  margin:0;
  color:rgba(236,247,242,.72);
}
.academy-overview-wide-link{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-top:18px;
  padding:18px;
  border-radius:18px;
  background:linear-gradient(135deg,rgba(52,211,153,.12),rgba(243,221,157,.08));
  border:1px solid rgba(52,211,153,.18);
  color:#eef6f1;
}
.academy-overview-wide-link span{
  color:rgba(236,247,242,.72);
  font-weight:850;
}
.academy-overview-wide-link strong{
  color:#9cf2d0;
  font-weight:950;
}
.academy-overview-ai{
  display:grid;
  grid-template-columns:minmax(0,1fr) 320px;
  gap:20px;
  align-items:center;
}
.academy-overview-ai-panel{
  display:grid;
  gap:8px;
  justify-items:start;
  padding:22px;
  border-radius:22px;
  background:rgba(255,255,255,.045);
  border:1px solid rgba(243,221,157,.18);
}
.academy-overview-ai-panel span{
  width:62px;
  height:62px;
  display:grid;
  place-items:center;
  border-radius:20px;
  background:rgba(52,211,153,.12);
  border:1px solid rgba(52,211,153,.24);
  font-size:32px;
}
.academy-overview-ai-panel strong{
  color:#fff;
  font-size:20px;
}
.academy-overview-ai-panel small{
  color:rgba(236,247,242,.72);
  line-height:1.45;
}
@media(max-width:1100px){
  .academy-overview-intro,
  .academy-overview-ai{
    grid-template-columns:1fr;
  }
  .academy-overview-benefit-grid,
  .academy-overview-step-grid{
    grid-template-columns:1fr;
  }
}
@media(max-width:720px){
  .academy-overview-premium{
    padding:18px 18px 110px;
  }
  .academy-overview-hero-banner{
    border-radius:22px;
  }
  .academy-overview-hero-banner img{
    min-height:220px;
    object-position:center;
  }
  .academy-overview-intro h2,
  .academy-overview-ai h2{
    font-size:32px;
  }
  .academy-overview-section-head h2{
    font-size:27px;
  }
  .academy-overview-actions,
  .academy-overview-wide-link{
    align-items:stretch;
    flex-direction:column;
  }
}

/* STEP 201 — Academy panoramica: wording inclusivo e fix leggibilità heading */
.academy-overview-benefits .academy-overview-eyebrow{
  color:#0b5f43!important;
  background:rgba(15,122,79,.08)!important;
  border:1px solid rgba(15,122,79,.16)!important;
  border-radius:12px!important;
  padding:7px 10px!important;
  width:max-content!important;
}
.academy-overview-benefits .academy-overview-eyebrow img{
  filter:none!important;
  opacity:.9!important;
}
.academy-overview-benefits .academy-overview-section-head h2{
  color:#082c24!important;
  max-width:980px!important;
}

/* STEP 207 — Academy panoramica: fix icona "Perché entrare" */
.academy-overview-eyebrow-dot{
  gap:10px!important;
}
.academy-overview-dot{
  width:10px!important;
  height:10px!important;
  display:inline-block!important;
  border-radius:999px!important;
  background:linear-gradient(180deg,#22c55e,#0f7a4f)!important;
  box-shadow:0 0 0 4px rgba(15,122,79,.10)!important;
  flex:0 0 10px!important;
}

/* STEP 212 — Movimenti: bottone suggerimenti compatto e modale dedicata */
body[data-page="movimenti"] .topbar-actions .topbar-pill-primary{
  min-width:0!important;
  width:auto!important;
  padding-left:18px!important;
  padding-right:18px!important;
  gap:7px!important;
}

.movimenti-suggestions-modal{
  position:fixed;
  inset:0;
  z-index:1200;
  display:grid;
  place-items:center;
  padding:24px;
  background:rgba(4,20,15,.58);
  backdrop-filter:blur(10px);
}
.movimenti-suggestions-modal[hidden]{
  display:none!important;
}
.movimenti-suggestions-card{
  width:min(720px,100%);
  max-height:calc(100vh - 48px);
  overflow:auto;
  border-radius:26px;
  background:
    radial-gradient(circle at 10% 0%, rgba(52,211,153,.16), transparent 34%),
    linear-gradient(180deg,#102b24 0%,#071b16 100%);
  border:1px solid rgba(142,185,162,.18);
  box-shadow:0 28px 70px rgba(4,20,15,.38);
  color:#eef6f1;
}
.movimenti-suggestions-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  padding:26px 28px 18px;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.movimenti-suggestions-head small{
  display:block;
  color:#f3dd9d;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.08em;
  margin-bottom:8px;
}
.movimenti-suggestions-head h2{
  margin:0;
  color:#fff;
  font-size:32px;
  line-height:1.05;
  letter-spacing:-.03em;
}
.movimenti-suggestions-close{
  width:42px;
  height:42px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.06);
  color:#fff;
  font-size:24px;
  font-weight:900;
  cursor:pointer;
}
.movimenti-suggestions-list{
  display:grid;
  gap:12px;
  padding:22px 28px 28px;
}
.movimenti-suggestions-item{
  display:grid;
  grid-template-columns:44px minmax(0,1fr);
  gap:14px;
  align-items:start;
  padding:16px;
  border-radius:18px;
  background:rgba(255,255,255,.045);
  border:1px solid rgba(255,255,255,.09);
}
.movimenti-suggestions-item span{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:14px;
  background:rgba(243,221,157,.11);
  border:1px solid rgba(243,221,157,.22);
}
.movimenti-suggestions-item h3{
  margin:0 0 6px;
  color:#fff;
  font-size:18px;
}
.movimenti-suggestions-item p{
  margin:0;
  color:rgba(236,247,242,.74);
  line-height:1.45;
}

/* STEP 216 — Dashboard Panoramica: banner Academy in fondo */
.dashboard-academy-banner-section{
  margin:28px 0 110px;
}
.dashboard-academy-banner-link{
  display:block;
  overflow:hidden;
  border-radius:28px;
  background:#071b16;
  border:1px solid rgba(9,47,38,.16);
  box-shadow:0 24px 58px rgba(4,20,15,.22);
  transition:transform .18s ease, box-shadow .18s ease;
}
.dashboard-academy-banner-link:hover{
  transform:translateY(-2px);
  box-shadow:0 30px 72px rgba(4,20,15,.28);
}
.dashboard-academy-banner-link img{
  display:block;
  width:100%;
  height:auto;
  min-height:220px;
  object-fit:cover;
}
@media(max-width:720px){
  .dashboard-academy-banner-section{
    margin:22px 0 120px;
  }
  .dashboard-academy-banner-link{
    border-radius:22px;
  }
  .dashboard-academy-banner-link img{
    min-height:190px;
    object-position:center;
  }
}

/* STEP 217 — Dashboard: banner Academy contenuto come le card */
.dashboard-academy-banner-section{
  width:100%;
  max-width:calc(100% - 48px)!important;
  margin:28px auto 110px!important;
}
.dashboard-academy-banner-link{
  width:100%;
}
.dashboard-academy-banner-link img{
  width:100%;
  max-width:100%;
}
@media(max-width:720px){
  .dashboard-academy-banner-section{
    max-width:calc(100% - 28px)!important;
    margin:22px auto 120px!important;
  }
}

/* STEP 218 — Dashboard: distanza banner Academy coerente con card */
.dashboard-academy-banner-section{
  margin-top:18px!important;
}
@media(max-width:720px){
  .dashboard-academy-banner-section{
    margin-top:16px!important;
  }
}

/* STEP 220 — Dashboard: banner Academy più vicino alle card */
.dashboard-academy-banner-section{
  margin-top:12px!important;
}
@media(max-width:720px){
  .dashboard-academy-banner-section{
    margin-top:12px!important;
  }
}

/* STEP 221 — Dashboard: elimina spazio vuoto sopra banner Academy */
.dashboard-academy-banner-section{
  margin-top:0!important;
  padding-top:0!important;
  transform:translateY(-42px);
  margin-bottom:68px!important;
}
@media(max-width:720px){
  .dashboard-academy-banner-section{
    transform:translateY(-26px);
    margin-bottom:88px!important;
  }
}

/* STEP 222 — Dashboard: banner Academy rialzato di 12px */
.dashboard-academy-banner-section{
  transform:translateY(-54px)!important;
  margin-bottom:56px!important;
}
@media(max-width:720px){
  .dashboard-academy-banner-section{
    transform:translateY(-38px)!important;
    margin-bottom:76px!important;
  }
}

/* STEP 224 — Movimenti: filtri premium ordinati + topbar stabile */
body[data-page="movimenti"] .topbar-actions .topbar-pill-secondary,
body[data-page="movimenti"] .topbar-actions .topbar-month-trigger{
  display:none!important;
}
body[data-page="movimenti"] .topbar-actions .topbar-pill-primary{
  min-width:0!important;
  width:auto!important;
  padding-left:18px!important;
  padding-right:18px!important;
  gap:7px!important;
  justify-content:center!important;
}

/* Card filtri Movimenti: più ordinata e premium */
body[data-page="movimenti"] .movements-filters,
body[data-page="movimenti"] .movimenti-filters,
body[data-page="movimenti"] .filters-card,
body[data-page="movimenti"] .movements-filter-card,
body[data-page="movimenti"] [data-movements-filters]{
  display:grid!important;
  gap:18px!important;
  padding:22px!important;
  border-radius:24px!important;
  background:linear-gradient(180deg,rgba(15,122,79,.055),rgba(255,255,255,.72))!important;
  border:1px solid rgba(15,122,79,.14)!important;
  box-shadow:0 18px 42px rgba(4,20,15,.08)!important;
}

body[data-page="movimenti"] .filter-period,
body[data-page="movimenti"] .filters-period,
body[data-page="movimenti"] .period-filter,
body[data-page="movimenti"] .movements-period-filter{
  padding:16px!important;
  border-radius:20px!important;
  background:rgba(255,255,255,.72)!important;
  border:1px solid rgba(15,122,79,.12)!important;
}

body[data-page="movimenti"] .filter-tabs,
body[data-page="movimenti"] .filter-chip-row,
body[data-page="movimenti"] .period-tabs,
body[data-page="movimenti"] .movements-filter-tabs{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  gap:10px!important;
  width:100%!important;
  padding:8px!important;
  border-radius:18px!important;
  background:rgba(255,255,255,.78)!important;
  border:1px solid rgba(9,47,38,.08)!important;
}

body[data-page="movimenti"] .filter-tabs button,
body[data-page="movimenti"] .filter-chip-row button,
body[data-page="movimenti"] .period-tabs button,
body[data-page="movimenti"] .movements-filter-tabs button,
body[data-page="movimenti"] .filter-chip,
body[data-page="movimenti"] .period-chip{
  min-height:44px!important;
  padding:0 16px!important;
  border-radius:12px!important;
  font-weight:900!important;
  white-space:nowrap!important;
}

body[data-page="movimenti"] .filter-search,
body[data-page="movimenti"] .movements-search,
body[data-page="movimenti"] .search-filter{
  display:grid!important;
  gap:8px!important;
  min-width:260px!important;
}

body[data-page="movimenti"] .filter-search input,
body[data-page="movimenti"] .movements-search input,
body[data-page="movimenti"] .search-filter input,
body[data-page="movimenti"] input[type="search"]{
  min-height:58px!important;
  border-radius:16px!important;
  border:1px solid rgba(15,122,79,.16)!important;
  background:rgba(255,255,255,.90)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.75)!important;
}

body[data-page="movimenti"] .filters-row,
body[data-page="movimenti"] .movements-filters-row,
body[data-page="movimenti"] .filter-bottom-row{
  display:grid!important;
  grid-template-columns:minmax(320px,.65fr) minmax(280px,1fr)!important;
  gap:16px!important;
  align-items:end!important;
}

body[data-page="movimenti"] .filters-card > .form-label,
body[data-page="movimenti"] .movements-filters > .form-label,
body[data-page="movimenti"] .movimenti-filters > .form-label,
body[data-page="movimenti"] .filter-label,
body[data-page="movimenti"] .filters-label{
  color:#64748b!important;
  font-size:12px!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
  font-weight:950!important;
}

/* Modale suggerimenti Movimenti */
.movimenti-suggestions-modal{
  position:fixed;
  inset:0;
  z-index:1200;
  display:grid;
  place-items:center;
  padding:24px;
  background:rgba(4,20,15,.58);
  backdrop-filter:blur(10px);
}
.movimenti-suggestions-modal[hidden]{
  display:none!important;
}
.movimenti-suggestions-card{
  width:min(720px,100%);
  max-height:calc(100vh - 48px);
  overflow:auto;
  border-radius:26px;
  background:
    radial-gradient(circle at 10% 0%, rgba(52,211,153,.16), transparent 34%),
    linear-gradient(180deg,#102b24 0%,#071b16 100%);
  border:1px solid rgba(142,185,162,.18);
  box-shadow:0 28px 70px rgba(4,20,15,.38);
  color:#eef6f1;
}
.movimenti-suggestions-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  padding:26px 28px 18px;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.movimenti-suggestions-head small{
  display:block;
  color:#f3dd9d;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.08em;
  margin-bottom:8px;
}
.movimenti-suggestions-head h2{
  margin:0;
  color:#fff;
  font-size:32px;
  line-height:1.05;
  letter-spacing:-.03em;
}
.movimenti-suggestions-close{
  width:42px;
  height:42px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.06);
  color:#fff;
  font-size:24px;
  font-weight:900;
  cursor:pointer;
}
.movimenti-suggestions-list{
  display:grid;
  gap:12px;
  padding:22px 28px 28px;
}
.movimenti-suggestions-item{
  display:grid;
  grid-template-columns:44px minmax(0,1fr);
  gap:14px;
  align-items:start;
  padding:16px;
  border-radius:18px;
  background:rgba(255,255,255,.045);
  border:1px solid rgba(255,255,255,.09);
}
.movimenti-suggestions-item span{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:14px;
  background:rgba(243,221,157,.11);
  border:1px solid rgba(243,221,157,.22);
}
.movimenti-suggestions-item h3{
  margin:0 0 6px;
  color:#fff;
  font-size:18px;
}
.movimenti-suggestions-item p{
  margin:0;
  color:rgba(236,247,242,.74);
  line-height:1.45;
}

@media(max-width:900px){
  body[data-page="movimenti"] .filters-row,
  body[data-page="movimenti"] .movements-filters-row,
  body[data-page="movimenti"] .filter-bottom-row{
    grid-template-columns:1fr!important;
  }
}

/* STEP 225 — Movimenti: toolbar filtri compatta e premium */
body[data-page="movimenti"] .movements-panel{
  padding-bottom:22px!important;
}
body[data-page="movimenti"] .movements-header{
  margin-bottom:18px!important;
}
body[data-page="movimenti"] .movements-toolbar-premium{
  display:grid!important;
  gap:12px!important;
  padding:16px!important;
  border-radius:22px!important;
  background:linear-gradient(180deg,rgba(15,122,79,.055),rgba(255,255,255,.78))!important;
  border:1px solid rgba(15,122,79,.14)!important;
  box-shadow:0 16px 34px rgba(4,20,15,.07)!important;
}
body[data-page="movimenti"] .movement-period-field-premium{
  display:grid!important;
  gap:8px!important;
  padding:12px!important;
  border-radius:18px!important;
  background:rgba(255,255,255,.72)!important;
  border:1px solid rgba(15,122,79,.10)!important;
}
body[data-page="movimenti"] .movement-period-field-premium > span,
body[data-page="movimenti"] .movement-search-field > span{
  color:#64748b!important;
  font-size:12px!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
  font-weight:950!important;
}
body[data-page="movimenti"] .movement-period-quick-control{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  gap:8px!important;
  width:100%!important;
  padding:6px!important;
  border-radius:16px!important;
  background:rgba(255,255,255,.82)!important;
  border:1px solid rgba(9,47,38,.08)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.78)!important;
}
body[data-page="movimenti"] .movement-period-quick-control button,
body[data-page="movimenti"] .movement-filter-tabs button{
  min-height:38px!important;
  padding:0 13px!important;
  border-radius:11px!important;
  font-weight:900!important;
  white-space:nowrap!important;
}
body[data-page="movimenti"] .movement-filters-bottom-row{
  display:grid!important;
  grid-template-columns:minmax(300px,.52fr) minmax(360px,1fr)!important;
  gap:12px!important;
  align-items:end!important;
}
body[data-page="movimenti"] .movement-filter-tabs{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  gap:8px!important;
  min-height:58px!important;
  padding:6px!important;
  border-radius:16px!important;
  background:rgba(255,255,255,.82)!important;
  border:1px solid rgba(9,47,38,.08)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.78)!important;
}
body[data-page="movimenti"] .movement-search-field{
  display:grid!important;
  gap:8px!important;
}
body[data-page="movimenti"] .movement-search-field input{
  min-height:50px!important;
  border-radius:16px!important;
  border:1px solid rgba(15,122,79,.16)!important;
  background:rgba(255,255,255,.92)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.75)!important;
}
body[data-page="movimenti"] .movements-list{
  margin-top:16px!important;
}
@media(max-width:980px){
  body[data-page="movimenti"] .movement-filters-bottom-row{
    grid-template-columns:1fr!important;
  }
}
@media(max-width:720px){
  body[data-page="movimenti"] .movements-toolbar-premium{
    padding:12px!important;
  }
  body[data-page="movimenti"] .movement-period-quick-control,
  body[data-page="movimenti"] .movement-filter-tabs{
    gap:6px!important;
  }
  body[data-page="movimenti"] .movement-period-quick-control button,
  body[data-page="movimenti"] .movement-filter-tabs button{
    min-height:36px!important;
    padding:0 11px!important;
  }
}

/* STEP 226 — Movimenti: pannello filtri laterale */
body[data-page="movimenti"] .movements-panel-split{
  overflow:visible!important;
}
body[data-page="movimenti"] .movements-panel-split .movements-header{
  margin-bottom:18px!important;
  align-items:flex-start!important;
}
body[data-page="movimenti"] .movements-workspace{
  display:grid!important;
  grid-template-columns:300px minmax(0,1fr)!important;
  gap:18px!important;
  align-items:start!important;
}
body[data-page="movimenti"] .movements-filter-sidebar{
  position:sticky!important;
  top:18px!important;
  display:grid!important;
  gap:14px!important;
  padding:18px!important;
  border-radius:24px!important;
  background:
    radial-gradient(circle at 20% 0%, rgba(15,122,79,.11), transparent 34%),
    linear-gradient(180deg,rgba(255,255,255,.92),rgba(244,250,247,.82))!important;
  border:1px solid rgba(15,122,79,.16)!important;
  box-shadow:0 18px 42px rgba(4,20,15,.08)!important;
}
body[data-page="movimenti"] .movements-filter-sidebar-head{
  display:flex!important;
  align-items:center!important;
  gap:12px!important;
  padding-bottom:12px!important;
  border-bottom:1px solid rgba(15,122,79,.12)!important;
}
body[data-page="movimenti"] .movements-filter-sidebar-head > span{
  width:40px!important;
  height:40px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:14px!important;
  background:rgba(15,122,79,.10)!important;
  color:#0f7a4f!important;
  font-weight:950!important;
}
body[data-page="movimenti"] .movements-filter-sidebar-head strong{
  display:block!important;
  color:#092f26!important;
  font-size:18px!important;
  line-height:1.1!important;
}
body[data-page="movimenti"] .movements-filter-sidebar-head small{
  display:block!important;
  color:#64748b!important;
  font-weight:800!important;
  margin-top:2px!important;
}
body[data-page="movimenti"] .movement-period-field-premium,
body[data-page="movimenti"] .movement-filter-group,
body[data-page="movimenti"] .movement-search-field{
  display:grid!important;
  gap:9px!important;
}
body[data-page="movimenti"] .movement-period-field-premium{
  padding:0!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}
body[data-page="movimenti"] .movement-period-field-premium > span,
body[data-page="movimenti"] .movement-filter-group > span,
body[data-page="movimenti"] .movement-search-field > span{
  color:#64748b!important;
  font-size:12px!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
  font-weight:950!important;
}
body[data-page="movimenti"] .movement-period-quick-control,
body[data-page="movimenti"] .movement-filter-tabs{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:8px!important;
  width:100%!important;
  padding:8px!important;
  border-radius:18px!important;
  background:rgba(255,255,255,.74)!important;
  border:1px solid rgba(9,47,38,.09)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.78)!important;
}
body[data-page="movimenti"] .movement-period-quick-control button,
body[data-page="movimenti"] .movement-filter-tabs button{
  width:100%!important;
  min-height:42px!important;
  justify-content:flex-start!important;
  padding:0 13px!important;
  border-radius:12px!important;
  font-weight:900!important;
  white-space:nowrap!important;
  text-align:left!important;
}
body[data-page="movimenti"] .movement-search-field input{
  width:100%!important;
  min-height:50px!important;
  border-radius:16px!important;
  border:1px solid rgba(15,122,79,.16)!important;
  background:rgba(255,255,255,.92)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.75)!important;
}
body[data-page="movimenti"] .movements-list-shell{
  min-width:0!important;
  display:grid!important;
  gap:14px!important;
}
body[data-page="movimenti"] .movements-list{
  margin-top:0!important;
}
body[data-page="movimenti"] .movement-custom-range{
  margin-top:2px!important;
}
body[data-page="movimenti"] .movement-custom-date-card,
body[data-page="movimenti"] .movement-custom-actions{
  width:100%!important;
}
@media(max-width:1120px){
  body[data-page="movimenti"] .movements-workspace{
    grid-template-columns:260px minmax(0,1fr)!important;
    gap:14px!important;
  }
}
@media(max-width:900px){
  body[data-page="movimenti"] .movements-workspace{
    grid-template-columns:1fr!important;
  }
  body[data-page="movimenti"] .movements-filter-sidebar{
    position:relative!important;
    top:auto!important;
  }
  body[data-page="movimenti"] .movement-period-quick-control,
  body[data-page="movimenti"] .movement-filter-tabs{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
@media(max-width:560px){
  body[data-page="movimenti"] .movement-period-quick-control,
  body[data-page="movimenti"] .movement-filter-tabs{
    grid-template-columns:1fr!important;
  }
}

/* STEP 227 — Movimenti: periodo personalizzato in modale compatta */
body[data-page="movimenti"] .movement-custom-range:not([hidden]){
  position:fixed!important;
  inset:0!important;
  z-index:1250!important;
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:12px!important;
  align-content:center!important;
  justify-content:center!important;
  width:100%!important;
  max-width:none!important;
  min-height:100vh!important;
  padding:24px!important;
  background:rgba(4,20,15,.58)!important;
  backdrop-filter:blur(10px)!important;
}
body[data-page="movimenti"] .movement-custom-range:not([hidden])::before{
  content:"Periodo personalizzato";
  grid-column:1 / -1;
  width:min(560px,100%);
  justify-self:center;
  padding:18px 20px 0;
  border-radius:24px 24px 0 0;
  background:
    radial-gradient(circle at 10% 0%, rgba(52,211,153,.16), transparent 34%),
    linear-gradient(180deg,#102b24 0%,#071b16 100%);
  border:1px solid rgba(142,185,162,.18);
  border-bottom:0;
  color:#fff;
  font-size:24px;
  font-weight:950;
  letter-spacing:-.02em;
}
body[data-page="movimenti"] .movement-custom-range:not([hidden]) .movement-custom-date-card,
body[data-page="movimenti"] .movement-custom-range:not([hidden]) .movement-custom-actions,
body[data-page="movimenti"] .movement-custom-range:not([hidden]) .movement-custom-calendar{
  width:min(560px,100%)!important;
  justify-self:center!important;
  background:#ffffff!important;
  border:1px solid rgba(15,122,79,.14)!important;
  box-shadow:0 18px 42px rgba(4,20,15,.18)!important;
}
body[data-page="movimenti"] .movement-custom-range:not([hidden]) .movement-custom-date-card{
  padding:14px!important;
  border-radius:18px!important;
}
body[data-page="movimenti"] .movement-custom-range:not([hidden]) .movement-custom-date-card:first-child{
  justify-self:end!important;
  width:min(274px,100%)!important;
}
body[data-page="movimenti"] .movement-custom-range:not([hidden]) .movement-custom-date-card:nth-child(2){
  justify-self:start!important;
  width:min(274px,100%)!important;
}
body[data-page="movimenti"] .movement-custom-range:not([hidden]) .movement-custom-actions{
  grid-column:1 / -1!important;
  display:flex!important;
  justify-content:center!important;
  gap:10px!important;
  padding:14px!important;
  border-radius:0 0 20px 20px!important;
  margin-top:-1px!important;
}
body[data-page="movimenti"] .movement-custom-range:not([hidden]) .movement-custom-actions button{
  min-height:42px!important;
  padding:0 16px!important;
  border-radius:12px!important;
  font-weight:900!important;
}
body[data-page="movimenti"] .movement-custom-range:not([hidden]) .movement-custom-calendar:not([hidden]){
  grid-column:1 / -1!important;
  padding:14px!important;
  border-radius:18px!important;
  max-height:360px!important;
  overflow:auto!important;
}
body[data-page="movimenti"] .movement-custom-range:not([hidden]) .movement-custom-date-control{
  min-height:44px!important;
}
body[data-page="movimenti"] .movement-custom-range:not([hidden]) .movement-custom-date-display{
  font-size:18px!important;
  min-width:150px!important;
}
body[data-page="movimenti"] .movement-custom-range:not([hidden]) [data-custom-date-step]{
  width:38px!important;
  height:38px!important;
}
@media(max-width:640px){
  body[data-page="movimenti"] .movement-custom-range:not([hidden]){
    grid-template-columns:1fr!important;
    padding:18px!important;
  }
  body[data-page="movimenti"] .movement-custom-range:not([hidden]) .movement-custom-date-card:first-child,
  body[data-page="movimenti"] .movement-custom-range:not([hidden]) .movement-custom-date-card:nth-child(2){
    justify-self:center!important;
    width:min(560px,100%)!important;
  }
}

/* STEP 228 — Movimenti: cerca in header al posto del badge */
body[data-page="movimenti"] .movements-header{
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:24px!important;
}
body[data-page="movimenti"] .movements-header-search{
  width:min(440px,42vw)!important;
  display:grid!important;
  gap:6px!important;
  align-self:start!important;
}
body[data-page="movimenti"] .movement-search-field-header{
  display:grid!important;
  gap:6px!important;
}
body[data-page="movimenti"] .movement-search-field-header span{
  color:#64748b!important;
  font-size:12px!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
  font-weight:950!important;
}
body[data-page="movimenti"] .movement-search-field-header input{
  width:100%!important;
  min-height:48px!important;
  border-radius:16px!important;
  border:1px solid rgba(15,122,79,.16)!important;
  background:rgba(255,255,255,.92)!important;
  box-shadow:0 12px 28px rgba(4,20,15,.06), inset 0 1px 0 rgba(255,255,255,.75)!important;
  padding-left:16px!important;
  padding-right:16px!important;
}
body[data-page="movimenti"] .movements-status-hidden{
  display:none!important;
}
body[data-page="movimenti"] .movements-filter-sidebar{
  align-content:start!important;
}
@media(max-width:900px){
  body[data-page="movimenti"] .movements-header{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:14px!important;
  }
  body[data-page="movimenti"] .movements-header-search{
    width:100%!important;
  }
}

/* STEP 229 — Movimenti: modale Da/A sopra lista e centrata correttamente */
body[data-page="movimenti"] .movement-custom-range:not([hidden]){
  position:fixed!important;
  inset:0!important;
  z-index:99999!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:0!important;
  width:100vw!important;
  max-width:none!important;
  min-height:100vh!important;
  padding:24px!important;
  background:rgba(4,20,15,.64)!important;
  backdrop-filter:blur(12px)!important;
  isolation:isolate!important;
}
body[data-page="movimenti"] .movement-custom-range:not([hidden])::before{
  content:"Periodo personalizzato";
  width:min(560px,calc(100vw - 48px))!important;
  justify-self:auto!important;
  padding:18px 22px 12px!important;
  border-radius:24px 24px 0 0!important;
  background:
    radial-gradient(circle at 10% 0%, rgba(52,211,153,.18), transparent 34%),
    linear-gradient(180deg,#102b24 0%,#071b16 100%)!important;
  border:1px solid rgba(142,185,162,.22)!important;
  border-bottom:0!important;
  color:#fff!important;
  font-size:24px!important;
  font-weight:950!important;
  letter-spacing:-.02em!important;
  box-shadow:0 22px 60px rgba(4,20,15,.30)!important;
  z-index:100000!important;
}
body[data-page="movimenti"] .movement-custom-range:not([hidden]) .movement-custom-date-card,
body[data-page="movimenti"] .movement-custom-range:not([hidden]) .movement-custom-actions,
body[data-page="movimenti"] .movement-custom-range:not([hidden]) .movement-custom-calendar{
  position:relative!important;
  z-index:100000!important;
  width:min(560px,calc(100vw - 48px))!important;
  max-width:min(560px,calc(100vw - 48px))!important;
  justify-self:auto!important;
  background:#fff!important;
  border:1px solid rgba(15,122,79,.14)!important;
  box-shadow:0 18px 42px rgba(4,20,15,.22)!important;
}
body[data-page="movimenti"] .movement-custom-range:not([hidden]) .movement-custom-date-card{
  padding:13px 16px!important;
  border-radius:0!important;
  border-bottom:0!important;
}
body[data-page="movimenti"] .movement-custom-range:not([hidden]) .movement-custom-date-card:first-child,
body[data-page="movimenti"] .movement-custom-range:not([hidden]) .movement-custom-date-card:nth-child(2){
  justify-self:auto!important;
  width:min(560px,calc(100vw - 48px))!important;
}
body[data-page="movimenti"] .movement-custom-range:not([hidden]) .movement-custom-date-card:nth-child(2){
  border-top:1px solid rgba(15,122,79,.08)!important;
}
body[data-page="movimenti"] .movement-custom-range:not([hidden]) .movement-custom-actions{
  display:flex!important;
  justify-content:center!important;
  gap:10px!important;
  padding:14px!important;
  border-radius:0 0 22px 22px!important;
  margin-top:0!important;
}
body[data-page="movimenti"] .movement-custom-range:not([hidden]) .movement-custom-calendar:not([hidden]){
  margin-top:12px!important;
  padding:14px!important;
  border-radius:18px!important;
  max-height:340px!important;
  overflow:auto!important;
}
body[data-page="movimenti"] .movement-custom-range:not([hidden]) .movement-custom-date-control{
  min-height:42px!important;
}
body[data-page="movimenti"] .movement-custom-range:not([hidden]) .movement-custom-date-display{
  font-size:18px!important;
  min-width:150px!important;
}
body[data-page="movimenti"] .movement-custom-range:not([hidden]) [data-custom-date-step]{
  width:38px!important;
  height:38px!important;
}
body[data-page="movimenti"] .movements-list,
body[data-page="movimenti"] .movement-item,
body[data-page="movimenti"] .movement-card{
  z-index:auto!important;
}

/* STEP 230 — Movimenti: rimozione badge Caricamento header */
body[data-page="movimenti"] [data-movements-status],
body[data-page="movimenti"] .movements-status-hidden{
  display:none!important;
  width:0!important;
  height:0!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  overflow:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}

/* STEP 231 — Movimenti: Da/A vera modale sopra tutto */
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]){
  position:fixed!important;
  inset:0!important;
  z-index:2147483000!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:0!important;
  width:100vw!important;
  max-width:none!important;
  height:100vh!important;
  min-height:100vh!important;
  padding:24px!important;
  background:rgba(4,20,15,.68)!important;
  backdrop-filter:blur(14px)!important;
  overflow:auto!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal[hidden]{
  display:none!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden])::before{
  content:"Periodo personalizzato";
  width:min(560px,calc(100vw - 48px))!important;
  padding:18px 22px 12px!important;
  border-radius:24px 24px 0 0!important;
  background:
    radial-gradient(circle at 10% 0%, rgba(52,211,153,.18), transparent 34%),
    linear-gradient(180deg,#102b24 0%,#071b16 100%)!important;
  border:1px solid rgba(142,185,162,.22)!important;
  border-bottom:0!important;
  color:#fff!important;
  font-size:24px!important;
  font-weight:950!important;
  letter-spacing:-.02em!important;
  box-shadow:0 22px 60px rgba(4,20,15,.34)!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-date-card,
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-actions,
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar{
  width:min(560px,calc(100vw - 48px))!important;
  max-width:min(560px,calc(100vw - 48px))!important;
  background:#fff!important;
  border:1px solid rgba(15,122,79,.14)!important;
  box-shadow:0 18px 42px rgba(4,20,15,.24)!important;
  position:relative!important;
  z-index:2147483001!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-date-card{
  padding:13px 16px!important;
  border-radius:0!important;
  border-bottom:0!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-date-card:nth-child(2){
  border-top:1px solid rgba(15,122,79,.08)!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-actions{
  display:flex!important;
  justify-content:center!important;
  gap:10px!important;
  padding:14px!important;
  border-radius:0 0 22px 22px!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-actions button{
  min-height:42px!important;
  padding:0 16px!important;
  border-radius:12px!important;
  font-weight:900!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar:not([hidden]){
  margin-top:12px!important;
  padding:14px!important;
  border-radius:18px!important;
  max-height:340px!important;
  overflow:auto!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-date-control{
  min-height:42px!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-date-display{
  font-size:18px!important;
  min-width:150px!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) [data-custom-date-step]{
  width:38px!important;
  height:38px!important;
}
body[data-page="movimenti"] .movements-list-shell,
body[data-page="movimenti"] .movements-list,
body[data-page="movimenti"] .movement-item,
body[data-page="movimenti"] .movement-card{
  z-index:auto!important;
}

/* STEP 232 — Movimenti: modale Da/A dentro card unica e chiusura applica */
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden])::before{
  content:none!important;
  display:none!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]){
  gap:0!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-range-modal-title,
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-date-card,
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-actions{
  width:min(560px,calc(100vw - 48px))!important;
  max-width:min(560px,calc(100vw - 48px))!important;
  background:#fff!important;
  border-left:1px solid rgba(15,122,79,.14)!important;
  border-right:1px solid rgba(15,122,79,.14)!important;
  box-shadow:0 22px 58px rgba(4,20,15,.22)!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-range-modal-title{
  padding:22px 24px 18px!important;
  border-radius:26px 26px 0 0!important;
  background:
    radial-gradient(circle at 12% 0%, rgba(52,211,153,.20), transparent 36%),
    linear-gradient(180deg,#102b24 0%,#071b16 100%)!important;
  border-top:1px solid rgba(142,185,162,.22)!important;
  border-bottom:1px solid rgba(142,185,162,.14)!important;
  color:#fff!important;
  font-size:26px!important;
  line-height:1.1!important;
  font-weight:950!important;
  letter-spacing:-.025em!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-date-card{
  padding:16px 20px!important;
  border-radius:0!important;
  border-top:0!important;
  border-bottom:1px solid rgba(15,122,79,.08)!important;
  box-shadow:0 18px 42px rgba(4,20,15,.12)!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-actions{
  padding:16px 20px 18px!important;
  border-radius:0 0 26px 26px!important;
  border-top:0!important;
  border-bottom:1px solid rgba(15,122,79,.14)!important;
  box-shadow:0 24px 62px rgba(4,20,15,.24)!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar:not([hidden]){
  width:min(560px,calc(100vw - 48px))!important;
  max-width:min(560px,calc(100vw - 48px))!important;
  margin-top:12px!important;
  border-radius:20px!important;
  box-shadow:0 18px 42px rgba(4,20,15,.24)!important;
}

/* STEP 233 — Movimenti: calendario Da/A compatto senza scroll orizzontale */
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar:not([hidden]){
  width:min(440px,calc(100vw - 48px))!important;
  max-width:min(440px,calc(100vw - 48px))!important;
  padding:14px!important;
  border-radius:18px!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  max-height:390px!important;
  box-sizing:border-box!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar *{
  box-sizing:border-box!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar .custom-calendar,
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar [class*="calendar"]{
  max-width:100%!important;
  overflow-x:hidden!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar table{
  width:100%!important;
  table-layout:fixed!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar .calendar-header,
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar [class*="calendar-header"]{
  display:grid!important;
  grid-template-columns:40px 40px 1fr 40px 40px!important;
  align-items:center!important;
  gap:8px!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar .calendar-grid,
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar [class*="calendar-grid"],
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar .custom-calendar-grid{
  display:grid!important;
  grid-template-columns:repeat(7,minmax(0,1fr))!important;
  gap:6px!important;
  width:100%!important;
  max-width:100%!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar button,
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar .calendar-day,
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar [class*="day"]{
  min-width:0!important;
  width:auto!important;
  max-width:100%!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar [data-calendar-day],
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar .calendar-day{
  height:40px!important;
  min-height:40px!important;
  padding:0!important;
  border-radius:12px!important;
  font-size:16px!important;
  font-weight:900!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar [data-calendar-nav],
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar .calendar-nav,
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar button[aria-label*="mese"],
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar button[aria-label*="Mese"]{
  width:38px!important;
  height:38px!important;
  min-width:38px!important;
  border-radius:12px!important;
  padding:0!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar h3,
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar .calendar-title,
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar [class*="calendar-title"]{
  font-size:20px!important;
  line-height:1.1!important;
  text-align:center!important;
  white-space:nowrap!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar .calendar-weekdays,
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar [class*="weekday"]{
  display:grid!important;
  grid-template-columns:repeat(7,minmax(0,1fr))!important;
  gap:6px!important;
  width:100%!important;
  text-align:center!important;
}
@media(max-width:520px){
  body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar:not([hidden]){
    width:calc(100vw - 32px)!important;
    max-width:calc(100vw - 32px)!important;
    padding:12px!important;
  }
  body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar [data-calendar-day],
  body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar .calendar-day{
    height:36px!important;
    min-height:36px!important;
    font-size:14px!important;
    border-radius:10px!important;
  }
}

/* STEP 234 — Movimenti: calendario Da/A largo come card e scroll interno */
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]){
  overflow:hidden!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-range-modal-title,
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-date-card,
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-actions,
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar:not([hidden]){
  width:min(560px,calc(100vw - 48px))!important;
  max-width:min(560px,calc(100vw - 48px))!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar:not([hidden]){
  margin-top:12px!important;
  padding:16px!important;
  border-radius:22px!important;
  overflow:hidden!important;
  max-height:none!important;
  box-shadow:0 22px 58px rgba(4,20,15,.24)!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar:not([hidden]) > *{
  max-width:100%!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar{
  scrollbar-gutter:stable!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar .custom-calendar,
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar [class*="calendar"]{
  max-width:100%!important;
  overflow-x:hidden!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar .custom-calendar-body,
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar .calendar-body,
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar [class*="calendar-body"],
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar [class*="calendar-content"]{
  max-height:320px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  padding-right:8px!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar .calendar-grid,
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar [class*="calendar-grid"],
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar .custom-calendar-grid{
  grid-template-columns:repeat(7,minmax(0,1fr))!important;
  gap:8px!important;
  width:100%!important;
  max-width:100%!important;
  overflow:visible!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar [data-calendar-day],
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar .calendar-day{
  height:42px!important;
  min-height:42px!important;
  border-radius:13px!important;
  font-size:16px!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar::-webkit-scrollbar,
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar *::-webkit-scrollbar{
  width:8px!important;
  height:0!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar::-webkit-scrollbar-thumb,
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar *::-webkit-scrollbar-thumb{
  background:rgba(15,122,79,.28)!important;
  border-radius:999px!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar::-webkit-scrollbar-track,
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar *::-webkit-scrollbar-track{
  background:rgba(15,122,79,.06)!important;
  border-radius:999px!important;
}
@media(max-width:640px){
  body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-range-modal-title,
  body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-date-card,
  body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-actions,
  body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar:not([hidden]){
    width:calc(100vw - 32px)!important;
    max-width:calc(100vw - 32px)!important;
  }
  body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar [data-calendar-day],
  body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar .calendar-day{
    height:38px!important;
    min-height:38px!important;
    font-size:14px!important;
  }
}

/* STEP 235 — Movimenti: calendario Da/A con scroll interno completo */
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]){
  overflow:auto!important;
  align-items:center!important;
  justify-content:flex-start!important;
  padding-top:28px!important;
  padding-bottom:28px!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar:not([hidden]){
  width:min(560px,calc(100vw - 48px))!important;
  max-width:min(560px,calc(100vw - 48px))!important;
  max-height:42vh!important;
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  padding:16px 16px 18px!important;
  border-radius:22px!important;
  scrollbar-gutter:stable!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar:not([hidden]) .calendar-grid,
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar:not([hidden]) [class*="calendar-grid"],
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar:not([hidden]) .custom-calendar-grid{
  display:grid!important;
  grid-template-columns:repeat(7,minmax(0,1fr))!important;
  gap:8px!important;
  width:100%!important;
  max-width:100%!important;
  padding-bottom:8px!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar:not([hidden]) [data-calendar-day],
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar:not([hidden]) .calendar-day{
  height:40px!important;
  min-height:40px!important;
  border-radius:12px!important;
  font-size:16px!important;
  flex:0 0 auto!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar:not([hidden])::-webkit-scrollbar{
  width:8px!important;
  height:0!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar:not([hidden])::-webkit-scrollbar-thumb{
  background:rgba(15,122,79,.34)!important;
  border-radius:999px!important;
}
body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar:not([hidden])::-webkit-scrollbar-track{
  background:rgba(15,122,79,.08)!important;
  border-radius:999px!important;
}
@media(max-height:760px){
  body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-range-modal-title{
    padding-top:16px!important;
    padding-bottom:10px!important;
  }
  body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-date-card{
    padding-top:10px!important;
    padding-bottom:10px!important;
  }
  body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-actions{
    padding-top:12px!important;
    padding-bottom:12px!important;
  }
  body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar:not([hidden]){
    max-height:38vh!important;
  }
}
@media(max-width:640px){
  body[data-page="movimenti"] > .movement-custom-range-modal:not([hidden]) .movement-custom-calendar:not([hidden]){
    width:calc(100vw - 32px)!important;
    max-width:calc(100vw - 32px)!important;
    max-height:40vh!important;
  }
}

/* STEP 236 — Movimenti: modale Suggerimenti chiara stile Panoramica */
.movimenti-suggestions-modal{
  position:fixed!important;
  inset:0!important;
  z-index:1200!important;
  display:grid!important;
  place-items:center!important;
  padding:28px!important;
  background:rgba(4,20,15,.42)!important;
  backdrop-filter:blur(10px)!important;
}
.movimenti-suggestions-modal[hidden]{
  display:none!important;
}
.movimenti-suggestions-card{
  width:min(950px,100%)!important;
  max-height:calc(100vh - 56px)!important;
  overflow:hidden!important;
  border-radius:28px!important;
  background:
    radial-gradient(circle at 92% 0%, rgba(15,122,79,.12), transparent 30%),
    linear-gradient(180deg,#ffffff 0%,#f8fbf9 100%)!important;
  border:1px solid rgba(15,122,79,.14)!important;
  box-shadow:0 30px 80px rgba(4,20,15,.26)!important;
  color:#101828!important;
  display:flex!important;
  flex-direction:column!important;
}
.movimenti-suggestions-head{
  display:grid!important;
  grid-template-columns:72px minmax(0,1fr) 48px!important;
  align-items:start!important;
  gap:20px!important;
  padding:28px 30px 24px!important;
  border-bottom:1px solid rgba(15,122,79,.12)!important;
  background:
    radial-gradient(circle at 8% 0%, rgba(16,185,129,.10), transparent 30%),
    linear-gradient(180deg,#ffffff 0%,#f8fbf9 100%)!important;
}
.movimenti-suggestions-head::before{
  content:"💡"!important;
  width:72px!important;
  height:72px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:22px!important;
  background:linear-gradient(180deg,#ecfdf5,#e7f6ee)!important;
  box-shadow:0 14px 30px rgba(15,122,79,.10)!important;
  font-size:30px!important;
}
.movimenti-suggestions-head small{
  display:block!important;
  color:#667085!important;
  font-weight:950!important;
  text-transform:uppercase!important;
  letter-spacing:.12em!important;
  margin:0 0 6px!important;
  font-size:13px!important;
}
.movimenti-suggestions-head h2{
  margin:0!important;
  color:#101828!important;
  font-size:38px!important;
  line-height:1.02!important;
  letter-spacing:-.04em!important;
}
.movimenti-suggestions-close{
  width:46px!important;
  height:46px!important;
  border-radius:16px!important;
  border:1px solid rgba(15,122,79,.14)!important;
  background:#ffffff!important;
  color:#475467!important;
  font-size:30px!important;
  line-height:1!important;
  font-weight:850!important;
  cursor:pointer!important;
  box-shadow:0 10px 24px rgba(4,20,15,.08)!important;
}
.movimenti-suggestions-close:hover{
  background:#f3faf6!important;
  color:#092f26!important;
}
.movimenti-suggestions-list{
  display:grid!important;
  gap:12px!important;
  padding:24px 30px 30px!important;
  overflow:auto!important;
  scrollbar-gutter:stable!important;
}
.movimenti-suggestions-item{
  display:grid!important;
  grid-template-columns:52px minmax(0,1fr)!important;
  gap:16px!important;
  align-items:start!important;
  padding:18px 20px!important;
  border-radius:20px!important;
  background:#ffffff!important;
  border:1px solid rgba(15,122,79,.13)!important;
  box-shadow:0 14px 30px rgba(4,20,15,.055)!important;
}
.movimenti-suggestions-item span{
  width:48px!important;
  height:48px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:16px!important;
  background:linear-gradient(180deg,#ecfdf5,#e7f6ee)!important;
  border:1px solid rgba(15,122,79,.12)!important;
  font-size:22px!important;
}
.movimenti-suggestions-item h3{
  margin:0 0 6px!important;
  color:#101828!important;
  font-size:19px!important;
  line-height:1.2!important;
  letter-spacing:-.015em!important;
}
.movimenti-suggestions-item p{
  margin:0!important;
  color:#667085!important;
  font-size:16px!important;
  line-height:1.42!important;
}
.movimenti-suggestions-list::-webkit-scrollbar{
  width:8px!important;
}
.movimenti-suggestions-list::-webkit-scrollbar-thumb{
  background:rgba(15,122,79,.34)!important;
  border-radius:999px!important;
}
.movimenti-suggestions-list::-webkit-scrollbar-track{
  background:rgba(15,122,79,.06)!important;
  border-radius:999px!important;
}
@media(max-width:720px){
  .movimenti-suggestions-modal{
    padding:16px!important;
  }
  .movimenti-suggestions-card{
    border-radius:24px!important;
  }
  .movimenti-suggestions-head{
    grid-template-columns:56px minmax(0,1fr) 42px!important;
    gap:14px!important;
    padding:22px!important;
  }
  .movimenti-suggestions-head::before{
    width:56px!important;
    height:56px!important;
    border-radius:18px!important;
    font-size:25px!important;
  }
  .movimenti-suggestions-head h2{
    font-size:30px!important;
  }
  .movimenti-suggestions-list{
    padding:18px!important;
  }
  .movimenti-suggestions-item{
    grid-template-columns:44px minmax(0,1fr)!important;
    padding:15px!important;
  }
  .movimenti-suggestions-item span{
    width:42px!important;
    height:42px!important;
  }
  .movimenti-suggestions-item h3{
    font-size:18px!important;
  }
  .movimenti-suggestions-item p{
    font-size:15px!important;
  }
}

/* STEP 237 — Movimenti: modale Suggerimenti più stretta */
.movimenti-suggestions-card{
  width:min(760px,100%)!important;
}
@media(max-width:720px){
  .movimenti-suggestions-card{
    width:min(100%, calc(100vw - 32px))!important;
  }
}

/* STEP 242 — Bilancio: topbar senza bottoni e card istruzione rimossa */
body[data-page="bilancio"] .topbar-actions .topbar-pill-primary,
body[data-page="bilancio"] .topbar-actions .topbar-pill-secondary{
  display:none!important;
}

/* STEP 242I — Movimenti: tooltip azioni fuori dalla card
   Fix chirurgico: permette alle tooltip dei bottoni azione di uscire sopra la card senza clipping.
   Non modifica layout, contenuti, logica o altri componenti Movimenti. */
body[data-page="movimenti"] .movements-list-shell,
body[data-page="movimenti"] .movements-list,
body[data-page="movimenti"] .movement-real-row{
  overflow:visible!important;
}
body[data-page="movimenti"] .movement-real-row:hover,
body[data-page="movimenti"] .movement-real-row:focus-within{
  z-index:40!important;
}
body[data-page="movimenti"] .movement-row-actions{
  z-index:45!important;
}
body[data-page="movimenti"] .movement-action-btn[data-tooltip]::before,
body[data-page="movimenti"] .movement-action-btn[data-tooltip]::after{
  z-index:60!important;
}

/* STEP 242Y — Dashboard KPI: icone immagine Saldo e Risparmio */
body[data-page="dashboard"] .dashboard-kpi-card .dashboard-kpi-icon-img{display:block;object-fit:contain;filter:drop-shadow(0 6px 10px rgba(0,0,0,.14));}
body[data-page="dashboard"] .dashboard-kpi-card .dashboard-kpi-icon-money-bag{width:48px;height:48px;}
body[data-page="dashboard"] .dashboard-kpi-card .dashboard-kpi-icon-piggy-bank{width:50px;height:50px;}
@media(max-width:640px){body[data-page="dashboard"] .dashboard-kpi-card .dashboard-kpi-icon-money-bag,body[data-page="dashboard"] .dashboard-kpi-card .dashboard-kpi-icon-piggy-bank{width:44px;height:44px;}}


/* STEP CONTI 001 — Collegamento rapido ai movimenti del conto */
.account-movements-action{
  border-color:rgba(47,128,237,.26)!important;
  background:rgba(47,128,237,.07)!important;
  color:#1d4ed8!important;
}
.account-movements-action:hover,
.account-movements-action:focus-visible{
  border-color:#2F80ED!important;
  background:#2F80ED!important;
  color:#fff!important;
}
.account-movements-action .account-edit-icon-svg{
  width:18px;
  height:18px;
}
.account-card-actions .account-movements-action{
  display:inline-flex!important;
  visibility:visible!important;
  opacity:1!important;
  flex:0 0 40px;
  overflow:visible!important;
}
.account-card-actions .account-movements-action[data-tooltip]:before{
  content:attr(data-tooltip);
  position:absolute;
  top:calc(100% + 10px)!important;
  bottom:auto!important;
  right:0!important;
  z-index:80!important;
  padding:7px 10px;
  border-radius:10px;
  background:#0b2f26;
  color:#fff;
  font-size:12px;
  font-weight:800;
  letter-spacing:.01em;
  white-space:nowrap;
  box-shadow:0 12px 24px rgba(15,23,42,.18);
  opacity:0;
  transform:translateY(-4px)!important;
  pointer-events:none;
  transition:opacity .16s ease,transform .16s ease;
}
.account-card-actions .account-movements-action[data-tooltip]:after{
  content:"";
  position:absolute;
  top:calc(100% + 4px)!important;
  bottom:auto!important;
  right:14px!important;
  z-index:81!important;
  border:6px solid transparent!important;
  border-bottom-color:#0b2f26!important;
  opacity:0;
  transform:translateY(-4px)!important;
  pointer-events:none;
  transition:opacity .16s ease,transform .16s ease;
}
.account-card-actions .account-movements-action[data-tooltip]:hover:before,
.account-card-actions .account-movements-action[data-tooltip]:focus-visible:before,
.account-card-actions .account-movements-action[data-tooltip]:hover:after,
.account-card-actions .account-movements-action[data-tooltip]:focus-visible:after{
  opacity:1;
  transform:translateY(0)!important;
}
.account-real-card[data-account-card],
.account-list-row[data-account-card]{
  cursor:pointer;
}
.account-real-card[data-account-card].is-dragging,
.account-list-row[data-account-card].is-dragging{
  cursor:grabbing;
}
@media(max-width:720px){
  .account-card-actions .account-movements-action{flex-basis:38px}
  .account-card-actions .account-movements-action[data-tooltip]:before,
  .account-card-actions .account-movements-action[data-tooltip]:after{display:none}
}

/* STEP PWA 002 — Bottom Navigation mobile Famyro
   Navigazione APP visibile solo da smartphone. Desktop, sidebar e aree blindate restano invariati. */
.mobile-bottom-nav{
  display:none;
}

@media(max-width:760px){
  body{
    padding-bottom:calc(92px + env(safe-area-inset-bottom));
  }

  .mobile-bottom-nav{
    position:fixed;
    left:12px;
    right:12px;
    bottom:calc(12px + env(safe-area-inset-bottom));
    z-index:58;
    display:grid;
    grid-template-columns:1fr 1fr 74px 1fr 1fr;
    align-items:center;
    min-height:72px;
    padding:8px 10px;
    background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(244,249,246,.98));
    border:1px solid rgba(11,47,38,.16);
    border-radius:20px;
    box-shadow:0 22px 54px rgba(15,23,42,.18), inset 0 1px 0 rgba(255,255,255,.85);
    backdrop-filter:blur(16px);
  }

  .mobile-bottom-nav-item{
    min-width:0;
    min-height:54px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:4px;
    border:0;
    background:transparent;
    color:#51615c;
    font-weight:800;
    text-align:center;
    cursor:pointer;
    border-radius:14px;
    -webkit-tap-highlight-color:transparent;
  }

  .mobile-bottom-nav-item small{
    display:block;
    max-width:100%;
    font-size:10.5px;
    line-height:1.05;
    letter-spacing:-.01em;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  .mobile-bottom-nav-icon{
    width:24px;
    height:24px;
    display:grid;
    place-items:center;
  }

  .mobile-bottom-nav-icon img{
    width:22px;
    height:22px;
    object-fit:contain;
    display:block;
    filter:grayscale(1) opacity(.72);
  }

  .mobile-bottom-nav-item.active{
    color:#0f7a4f;
    background:rgba(31,157,99,.10);
    box-shadow:inset 0 0 0 1px rgba(31,157,99,.10);
  }

  .mobile-bottom-nav-item.active .mobile-bottom-nav-icon img{
    filter:none;
  }

  .mobile-bottom-nav-add{
    position:relative;
    align-self:center;
    min-height:68px;
    transform:translateY(-15px);
    color:#0b2f26;
  }

  .mobile-bottom-nav-add-icon{
    width:58px;
    height:58px;
    display:grid;
    place-items:center;
    border-radius:18px;
    background:linear-gradient(135deg,#20b76f,#09623f);
    color:#fff;
    border:5px solid #fff;
    box-shadow:0 18px 38px rgba(9,91,58,.32), inset 0 1px 0 rgba(255,255,255,.20);
    font-size:36px;
    line-height:1;
    font-weight:650;
  }

  .mobile-bottom-nav-add small{
    margin-top:-2px;
    color:#0b2f26;
    font-weight:900;
  }

  .fab,
  .premium-fab{
    display:none !important;
  }

  .content-area,
  .dashboard-content{
    padding-bottom:calc(112px + env(safe-area-inset-bottom)) !important;
  }

  .quick-sheet,
  .premium-quick-sheet{
    left:50% !important;
    right:auto !important;
    bottom:calc(100px + env(safe-area-inset-bottom)) !important;
    transform:translateX(-50%) !important;
    width:224px !important;
    z-index:70 !important;
  }

  .quick-sheet:after,
  .premium-quick-sheet:after{
    left:50% !important;
    right:auto !important;
    transform:translateX(-50%) !important;
  }

  .sheet-backdrop{
    z-index:56 !important;
  }
}

@media(max-width:380px){
  .mobile-bottom-nav{
    left:8px;
    right:8px;
    grid-template-columns:1fr 1fr 68px 1fr 1fr;
    padding-left:7px;
    padding-right:7px;
  }

  .mobile-bottom-nav-item small{
    font-size:10px;
  }

  .mobile-bottom-nav-add-icon{
    width:54px;
    height:54px;
    border-radius:17px;
    font-size:34px;
  }
}

/* STEP PWA 003 — Fix struttura mobile APP
   Su smartphone la sidebar desktop non deve restare aperta e la bottom nav deve restare ancorata alla viewport. */
@media(max-width:760px){
  html,
  body{
    width:100%;
    min-height:100%;
    overflow-x:hidden;
  }

  body:not([data-page="academy"]):not([data-page="ai"]):not([data-page^="admin"]) .app-shell,
  body:not([data-page="academy"]):not([data-page="ai"]):not([data-page^="admin"]) .app-shell.sidebar-collapsed{
    display:block !important;
    grid-template-columns:1fr !important;
    width:100% !important;
    min-height:100dvh;
  }

  body:not([data-page="academy"]):not([data-page="ai"]):not([data-page^="admin"]) .sidebar[data-global-sidebar]{
    display:none !important;
    visibility:hidden !important;
    width:0 !important;
    min-width:0 !important;
    max-width:0 !important;
    height:0 !important;
    min-height:0 !important;
    overflow:hidden !important;
    padding:0 !important;
    margin:0 !important;
    box-shadow:none !important;
  }

  body:not([data-page="academy"]):not([data-page="ai"]):not([data-page^="admin"]) .main-area{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
  }

  body:not([data-page="academy"]):not([data-page="ai"]):not([data-page^="admin"]) .topbar[data-global-topbar]{
    width:100% !important;
  }

  .mobile-bottom-nav{
    position:fixed !important;
    left:10px !important;
    right:10px !important;
    top:auto !important;
    bottom:calc(10px + env(safe-area-inset-bottom)) !important;
    z-index:2147483000 !important;
    transform:translate3d(0,0,0) !important;
    will-change:transform;
    margin:0 !important;
    pointer-events:auto;
  }

  .sheet-backdrop{
    position:fixed !important;
  }

  .quick-sheet,
  .premium-quick-sheet{
    position:fixed !important;
  }
}


/* STEP PWA 007 — Fix UX login APP e bottom navigation full width
   La bottom navigation globale non deve comparire nelle pagine auth e, quando usata nelle pagine gestionali mobile, deve essere una barra piena. */
body[data-page="login"] .mobile-bottom-nav,
body[data-page="register"] .mobile-bottom-nav {
  display:none !important;
}

@media (max-width: 900px) {
  .mobile-bottom-nav {
    left:0 !important;
    right:0 !important;
    bottom:0 !important;
    transform:none !important;
    width:100% !important;
    max-width:none !important;
    border-radius:0 !important;
    border-left:0 !important;
    border-right:0 !important;
    border-bottom:0 !important;
    border-top:1px solid rgba(15,122,79,.14) !important;
    padding:9px 12px calc(9px + env(safe-area-inset-bottom)) !important;
    background:rgba(255,250,242,.98) !important;
    box-shadow:0 -16px 42px rgba(16,64,45,.16) !important;
  }
}

/* STEP ACADEMY — prima lezione percorso: immagine custom */
.academy-journey-feature-card[data-journey-feature="budget"] .academy-journey-feature-art--budget{overflow:hidden;padding:8px;}
.academy-journey-feature-card[data-journey-feature="budget"] .academy-journey-feature-art--budget img{display:block;width:100%;height:100%;object-fit:cover;object-position:center;border-radius:16px;filter:drop-shadow(0 10px 18px rgba(0,0,0,.18));}


/* STEP PORTALE — Gestione conti: icone lista pulite */
body[data-page="conti"] .account-real-card .account-card-icon,
body[data-page="conti"] .account-list-row .account-card-icon {
  width: 74px !important;
  height: 74px !important;
  min-width: 74px !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  overflow: visible !important;
}

body[data-page="conti"] .account-real-card .account-card-icon.prepaid_card,
body[data-page="conti"] .account-real-card .account-card-icon.credit_card,
body[data-page="conti"] .account-real-card .account-card-icon.emergency_fund,
body[data-page="conti"] .account-real-card .account-card-icon.savings_account,
body[data-page="conti"] .account-real-card .account-card-icon.piggy_bank,
body[data-page="conti"] .account-real-card .account-card-icon.digital_wallet,
body[data-page="conti"] .account-list-row .account-card-icon.prepaid_card,
body[data-page="conti"] .account-list-row .account-card-icon.credit_card,
body[data-page="conti"] .account-list-row .account-card-icon.emergency_fund,
body[data-page="conti"] .account-list-row .account-card-icon.savings_account,
body[data-page="conti"] .account-list-row .account-card-icon.piggy_bank,
body[data-page="conti"] .account-list-row .account-card-icon.digital_wallet {
  background: transparent !important;
}

body[data-page="conti"] .account-real-card .account-card-icon .berrywallet-inline-icon,
body[data-page="conti"] .account-real-card .account-card-icon .berrywallet-inline-icon--square,
body[data-page="conti"] .account-list-row .account-card-icon .berrywallet-inline-icon,
body[data-page="conti"] .account-list-row .account-card-icon .berrywallet-inline-icon--square {
  width: 70px !important;
  height: 70px !important;
  object-fit: contain !important;
}

@media (max-width: 640px) {
  body[data-page="conti"] .account-real-card .account-card-icon,
  body[data-page="conti"] .account-list-row .account-card-icon {
    width: 68px !important;
    height: 68px !important;
    min-width: 68px !important;
  }

  body[data-page="conti"] .account-real-card .account-card-icon .berrywallet-inline-icon,
  body[data-page="conti"] .account-real-card .account-card-icon .berrywallet-inline-icon--square,
  body[data-page="conti"] .account-list-row .account-card-icon .berrywallet-inline-icon,
  body[data-page="conti"] .account-list-row .account-card-icon .berrywallet-inline-icon--square {
    width: 64px !important;
    height: 64px !important;
  }
}

/* STEP 243 — Movimenti: filtro categoria e sottocategoria */
body[data-page="movimenti"] .movement-category-filter-group,
body[data-page="movimenti"] .movement-subcategory-filter-group{
  display:grid!important;
  gap:9px!important;
}
body[data-page="movimenti"] .movement-subcategory-filter-group[hidden]{
  display:none!important;
}
body[data-page="movimenti"] .movement-category-filter-list{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:8px!important;
  width:100%!important;
  padding:8px!important;
  border-radius:18px!important;
  background:rgba(255,255,255,.74)!important;
  border:1px solid rgba(9,47,38,.09)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.78)!important;
  max-height:280px!important;
  overflow:auto!important;
}
body[data-page="movimenti"] .movement-category-filter-btn{
  appearance:none!important;
  -webkit-appearance:none!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:9px!important;
  width:100%!important;
  min-height:42px!important;
  padding:9px 13px!important;
  border:0!important;
  border-radius:12px!important;
  background:transparent!important;
  color:#375149!important;
  font:inherit!important;
  font-weight:900!important;
  line-height:1.15!important;
  text-align:left!important;
  cursor:pointer!important;
  transition:background .18s ease,color .18s ease,box-shadow .18s ease,transform .18s ease!important;
}
body[data-page="movimenti"] .movement-category-filter-btn:hover{
  background:#fff!important;
  color:#0f7a4f!important;
  box-shadow:0 8px 18px rgba(15,23,42,.06)!important;
  transform:translateY(-1px)!important;
}
body[data-page="movimenti"] .movement-category-filter-btn.active{
  background:#0f7a4f!important;
  color:#fff!important;
  box-shadow:0 10px 22px rgba(15,122,79,.22)!important;
}
body[data-page="movimenti"] .movement-category-filter-icon{
  width:24px!important;
  height:24px!important;
  min-width:24px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:9px!important;
  background:rgba(15,122,79,.10)!important;
  color:#0f7a4f!important;
  font-size:15px!important;
  line-height:1!important;
}
body[data-page="movimenti"] .movement-category-filter-btn.active .movement-category-filter-icon{
  background:rgba(255,255,255,.18)!important;
  color:#fff!important;
}
body[data-page="movimenti"] .movement-filter-empty-note{
  padding:12px 13px!important;
  border-radius:14px!important;
  background:rgba(255,255,255,.72)!important;
  border:1px dashed rgba(15,122,79,.18)!important;
  color:#64748b!important;
  font-size:13px!important;
  font-weight:800!important;
  line-height:1.35!important;
}
@media(max-width:900px){
  body[data-page="movimenti"] .movement-category-filter-list{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    max-height:320px!important;
  }
}
@media(max-width:560px){
  body[data-page="movimenti"] .movement-category-filter-list{
    grid-template-columns:1fr!important;
  }
}


/* STEP 243B — Movimenti: fix visuale dropdown Categoria/Sottocategoria */
body[data-page="movimenti"] .movement-category-filter-btn{
  align-items:center!important;
  min-width:0!important;
  overflow:hidden!important;
}
body[data-page="movimenti"] .movement-category-filter-icon{
  flex:0 0 24px!important;
  overflow:hidden!important;
  white-space:nowrap!important;
  text-indent:0!important;
  font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",system-ui,sans-serif!important;
  font-weight:700!important;
}
body[data-page="movimenti"] .movement-category-filter-label{
  display:block!important;
  min-width:0!important;
  flex:1 1 auto!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  line-height:1.2!important;
}
body[data-page="movimenti"] .movement-category-filter-btn.active .movement-category-filter-label{
  color:#fff!important;
}

/* STEP 244J — Modale modifica movimento: testi più leggibili, icone conti e spunta selezione */
.movement-editor-shell .movement-choice-grid {
  gap: 12px !important;
}

.movement-editor-shell .movement-choice-pill {
  position: relative !important;
  display: grid !important;
  grid-template-columns: 52px minmax(0, 1fr) 28px !important;
  align-items: center !important;
  gap: 12px !important;
  min-height: 76px !important;
  padding: 13px 14px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(11, 47, 38, .14) !important;
  background: linear-gradient(145deg, #ffffff 0%, #f8fbf8 100%) !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .045) !important;
}

.movement-editor-shell .movement-choice-pill:hover {
  border-color: rgba(15, 122, 79, .34) !important;
  background: linear-gradient(145deg, #ffffff 0%, #f1faf5 100%) !important;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .075) !important;
}

.movement-editor-shell .movement-choice-pill.active {
  border-color: #0f7a4f !important;
  background: linear-gradient(145deg, rgba(31, 157, 99, .13) 0%, rgba(31, 157, 99, .08) 100%) !important;
  box-shadow: 0 0 0 3px rgba(31, 157, 99, .12), 0 16px 32px rgba(15, 122, 79, .10) !important;
}

.movement-editor-shell .movement-choice-visual {
  width: 48px !important;
  height: 48px !important;
  border-radius: 14px !important;
  display: grid !important;
  place-items: center !important;
  background: linear-gradient(145deg, #ffffff 0%, #eef8f2 100%) !important;
  border: 1px solid rgba(31, 157, 99, .18) !important;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .055) !important;
  color: #0f7a4f !important;
  font-size: 22px !important;
  line-height: 1 !important;
  overflow: hidden !important;
}

.movement-editor-shell .movement-choice-account-img {
  width: 32px !important;
  height: 32px !important;
  object-fit: contain !important;
  display: block !important;
}

.movement-editor-shell .movement-choice-copy {
  min-width: 0 !important;
  display: grid !important;
  gap: 5px !important;
  text-align: left !important;
}

.movement-editor-shell .movement-choice-copy strong,
.movement-editor-shell .movement-choice-pill strong {
  font-size: 17px !important;
  line-height: 1.18 !important;
  font-weight: 800 !important;
  color: #111827 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.movement-editor-shell .movement-choice-copy small,
.movement-editor-shell .movement-choice-pill small {
  font-size: 14px !important;
  line-height: 1.25 !important;
  font-weight: 700 !important;
  color: #68766f !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.movement-editor-shell .movement-choice-check {
  width: 26px !important;
  height: 26px !important;
  border-radius: 9px !important;
  display: grid !important;
  place-items: center !important;
  justify-self: end !important;
  background: rgba(15, 122, 79, .12) !important;
  color: #0f7a4f !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  opacity: 0 !important;
  transform: scale(.84) !important;
  transition: opacity .18s ease, transform .18s ease, background .18s ease, color .18s ease !important;
}

.movement-editor-shell .movement-choice-pill.active .movement-choice-check {
  opacity: 1 !important;
  transform: scale(1) !important;
  background: #0f7a4f !important;
  color: #ffffff !important;
}

@media (max-width: 760px) {
  .movement-editor-shell .movement-choice-pill {
    grid-template-columns: 48px minmax(0, 1fr) 28px !important;
    min-height: 72px !important;
    padding: 12px !important;
  }

  .movement-editor-shell .movement-choice-visual {
    width: 44px !important;
    height: 44px !important;
  }

  .movement-editor-shell .movement-choice-copy strong,
  .movement-editor-shell .movement-choice-pill strong {
    font-size: 16px !important;
  }

  .movement-editor-shell .movement-choice-copy small,
  .movement-editor-shell .movement-choice-pill small {
    font-size: 13px !important;
  }
}


/* STEP 244L — Modale modifica movimento: icone conti pulite e no scroll su categoria/sottocategoria */
.movement-editor-shell .movement-choice-pill[data-edit-choice="account_id"],
.movement-editor-shell .movement-choice-pill[data-edit-choice="to_account_id"]{
  grid-template-columns: 58px minmax(0, 1fr) 28px !important;
}

.movement-editor-shell .movement-choice-pill[data-edit-choice="account_id"] .movement-choice-visual,
.movement-editor-shell .movement-choice-pill[data-edit-choice="to_account_id"] .movement-choice-visual{
  width: 54px !important;
  height: 54px !important;
  border-radius: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.movement-editor-shell .movement-choice-pill[data-edit-choice="account_id"] .movement-choice-account-img,
.movement-editor-shell .movement-choice-pill[data-edit-choice="to_account_id"] .movement-choice-account-img{
  width: 48px !important;
  height: 48px !important;
  object-fit: contain !important;
}

.movement-editor-shell .movement-choice-pill[data-edit-choice="account_id"] .berrywallet-inline-icon,
.movement-editor-shell .movement-choice-pill[data-edit-choice="to_account_id"] .berrywallet-inline-icon,
.movement-editor-shell .movement-choice-pill[data-edit-choice="account_id"] .berrywallet-inline-icon--square,
.movement-editor-shell .movement-choice-pill[data-edit-choice="to_account_id"] .berrywallet-inline-icon--square{
  width: 48px !important;
  height: 48px !important;
}

@media (max-width: 760px) {
  .movement-editor-shell .movement-choice-pill[data-edit-choice="account_id"],
  .movement-editor-shell .movement-choice-pill[data-edit-choice="to_account_id"]{
    grid-template-columns: 54px minmax(0, 1fr) 28px !important;
  }

  .movement-editor-shell .movement-choice-pill[data-edit-choice="account_id"] .movement-choice-visual,
  .movement-editor-shell .movement-choice-pill[data-edit-choice="to_account_id"] .movement-choice-visual{
    width: 50px !important;
    height: 50px !important;
  }

  .movement-editor-shell .movement-choice-pill[data-edit-choice="account_id"] .movement-choice-account-img,
  .movement-editor-shell .movement-choice-pill[data-edit-choice="to_account_id"] .movement-choice-account-img,
  .movement-editor-shell .movement-choice-pill[data-edit-choice="account_id"] .berrywallet-inline-icon,
  .movement-editor-shell .movement-choice-pill[data-edit-choice="to_account_id"] .berrywallet-inline-icon,
  .movement-editor-shell .movement-choice-pill[data-edit-choice="account_id"] .berrywallet-inline-icon--square,
  .movement-editor-shell .movement-choice-pill[data-edit-choice="to_account_id"] .berrywallet-inline-icon--square{
    width: 44px !important;
    height: 44px !important;
  }
}

/* STEP PWA 064 — Scadenze gestionale: icone pulite in modale nuova scadenza */
.due-account-choice,
.due-category-choice,
.due-category-only-choice,
.due-subcategory-choice {
  grid-template-columns: 58px minmax(0, 1fr);
}

.due-account-choice .due-choice-icon,
.due-category-choice .due-choice-icon,
.due-category-only-choice .due-choice-icon,
.due-subcategory-choice .due-choice-icon {
  width: 54px;
  height: 54px;
  background: transparent !important;
  border-radius: 0;
  color: #0f7a4f;
  font-size: 30px;
  overflow: visible;
}

.due-account-choice.is-selected .due-choice-icon,
.due-category-choice.is-selected .due-choice-icon,
.due-category-only-choice.is-selected .due-choice-icon,
.due-subcategory-choice.is-selected .due-choice-icon {
  background: transparent !important;
  color: #0f7a4f;
}

.due-account-choice .due-choice-icon .berrywallet-inline-icon,
.due-category-choice .due-choice-icon .berrywallet-inline-icon,
.due-category-only-choice .due-choice-icon .berrywallet-inline-icon,
.due-subcategory-choice .due-choice-icon .berrywallet-inline-icon {
  width: 48px;
  height: 44px;
}

.due-account-choice .due-choice-icon .berrywallet-inline-icon--square,
.due-category-choice .due-choice-icon .berrywallet-inline-icon--square,
.due-category-only-choice .due-choice-icon .berrywallet-inline-icon--square,
.due-subcategory-choice .due-choice-icon .berrywallet-inline-icon--square {
  width: 48px;
  height: 48px;
}

.due-account-choice .due-choice-balance {
  color: #0b7f4f;
}

.due-account-choice .due-choice-balance strong {
  font-size: 17px;
}

/* STEP 065 — Scadenze gestionale: ricorrenza base */
.due-frequency-group {
  padding: 16px;
  border: 1px solid rgba(15, 122, 79, 0.14);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(15, 122, 79, 0.045), rgba(255, 255, 255, 0.96));
}

.due-frequency-choice-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.due-frequency-choice {
  min-height: 92px;
  grid-template-columns: 1fr;
  justify-items: start;
  gap: 10px;
}

.due-frequency-choice .due-choice-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid rgba(15, 122, 79, 0.18);
  color: #0f7a4f;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.05);
}

.due-frequency-choice.is-selected .due-choice-icon {
  background: #0f7a4f;
  color: #ffffff;
}

.due-frequency-choice .due-choice-line {
  justify-content: flex-start;
}

.due-choice-helper {
  margin: 12px 0 0;
  color: #667085;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 600;
}

.due-frequency-mini {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(15, 122, 79, 0.08);
  color: #0b5b3a;
  border: 1px solid rgba(15, 122, 79, 0.16);
  font-size: 12px;
  font-weight: 750;
}

@media (max-width: 980px) {
  .due-frequency-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .due-frequency-choice-grid {
    grid-template-columns: 1fr;
  }
}

/* STEP PORTALE 009 — Report desktop premium completo */
body[data-page="report"] .report-v2{
  display:grid;
  gap:22px;
}

body[data-page="report"] .report-hero{
  display:flex;
  justify-content:space-between;
  align-items:stretch;
  gap:22px;
  padding:26px;
  border-radius:20px;
  background:
    radial-gradient(circle at 8% 0%, rgba(197,166,88,.18), transparent 34%),
    linear-gradient(135deg, #f8fcf8, #eef8f1 58%, #ffffff);
  border:1px solid rgba(12,83,55,.14);
  box-shadow:0 18px 42px rgba(15,23,42,.08);
}

body[data-page="report"] .report-hero-copy{
  max-width:720px;
}

body[data-page="report"] .report-hero h1{
  margin:0 0 8px;
  font-size:34px;
  line-height:1.05;
  letter-spacing:-.045em;
  color:#0b2f26;
}

body[data-page="report"] .report-hero p{
  margin:0;
  color:#56635f;
  font-size:16px;
  line-height:1.55;
}

body[data-page="report"] .report-hero-summary{
  min-width:260px;
  border-radius:18px;
  background:linear-gradient(135deg, #0f7a4f, #0b4f3b);
  color:#fff;
  padding:20px;
  display:grid;
  align-content:center;
  gap:6px;
  box-shadow:0 18px 38px rgba(15,122,79,.18);
}

body[data-page="report"] .report-hero-summary span,
body[data-page="report"] .report-hero-summary small{
  color:rgba(255,255,255,.78);
  font-weight:900;
  letter-spacing:.04em;
  text-transform:uppercase;
  font-size:12px;
}

body[data-page="report"] .report-hero-summary strong{
  display:block;
  font-size:24px;
  line-height:1.1;
  letter-spacing:-.03em;
}

body[data-page="report"] .report-period-panel{
  display:grid;
  grid-template-columns:minmax(220px,.8fr) minmax(360px,1.6fr) minmax(360px,1.4fr);
  align-items:center;
  gap:18px;
  padding:20px 22px;
  border-radius:20px;
  background:linear-gradient(135deg, #ffffff, #f4faf6);
  border:1px solid rgba(12,83,55,.13);
}

body[data-page="report"] .report-period-panel h2{
  margin:0;
  font-size:22px;
  letter-spacing:-.035em;
  color:#0b2f26;
}

body[data-page="report"] .report-preset-controls{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

body[data-page="report"] .report-period-btn{
  appearance:none;
  border:1px solid rgba(12,83,55,.16);
  border-radius:12px;
  background:linear-gradient(135deg, #f7fbf8, #ffffff);
  color:#24443b;
  font-weight:950;
  font-size:13px;
  padding:11px 13px;
  box-shadow:0 10px 24px rgba(15,23,42,.055);
  cursor:pointer;
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

body[data-page="report"] .report-period-btn:hover,
body[data-page="report"] .report-period-btn:focus-visible{
  transform:translateY(-1px);
  border-color:rgba(15,122,79,.36);
  box-shadow:0 14px 28px rgba(15,23,42,.08);
  outline:none;
}

body[data-page="report"] .report-period-btn.is-active{
  background:linear-gradient(135deg, #0f7a4f, #0b5d45);
  border-color:rgba(15,122,79,.44);
  color:#fff;
}

body[data-page="report"] .report-custom-range{
  display:grid;
  grid-template-columns:1fr 1fr auto;
  gap:10px;
  align-items:end;
}

body[data-page="report"] .report-custom-range label{
  display:grid;
  gap:7px;
  font-weight:950;
  color:#24443b;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.04em;
}

body[data-page="report"] .report-custom-range input{
  width:100%;
  min-height:44px;
  border:1px solid rgba(12,83,55,.18);
  border-radius:12px;
  background:linear-gradient(135deg, #ffffff, #f7fbf8);
  color:#10231e;
  font-weight:900;
  padding:0 12px;
  box-shadow:0 10px 22px rgba(15,23,42,.055);
}

body[data-page="report"] .report-custom-range input:focus{
  outline:none;
  border-color:rgba(15,122,79,.42);
  box-shadow:0 0 0 4px rgba(15,122,79,.12), 0 10px 22px rgba(15,23,42,.055);
}

body[data-page="report"] .report-v2-kpis{
  grid-template-columns:repeat(5,minmax(0,1fr));
}

body[data-page="report"] .report-v2-kpis .report-kpi{
  min-height:148px;
  padding:22px;
  display:grid;
  align-content:center;
  gap:7px;
}

body[data-page="report"] .report-kpi-daily-average{
  background:linear-gradient(135deg, #c5a658, #7a5b16);
}

body[data-page="report"] .report-layout-grid{
  display:grid;
  grid-template-columns:minmax(0,1.25fr) minmax(360px,.75fr);
  gap:22px;
}

body[data-page="report"] .report-card{
  border-radius:20px;
  background:linear-gradient(135deg, #ffffff, #f7fbf8);
  border:1px solid rgba(12,83,55,.13);
  box-shadow:0 18px 42px rgba(15,23,42,.08);
  overflow:hidden;
}

body[data-page="report"] .report-card-wide{
  grid-column:1 / -1;
}

body[data-page="report"] .report-card .premium-card-header{
  align-items:flex-start;
  gap:16px;
}

body[data-page="report"] .report-card .premium-card-header h2{
  margin:0;
  color:#0b2f26;
  letter-spacing:-.035em;
}

body[data-page="report"] .report-chart-legend{
  display:flex;
  flex-wrap:wrap;
  gap:10px 16px;
  margin:-4px 0 14px;
  color:#5d6a66;
  font-weight:900;
  font-size:13px;
}

body[data-page="report"] .report-chart-legend span{
  display:inline-flex;
  align-items:center;
  gap:8px;
}

body[data-page="report"] .report-chart-legend i{
  width:12px;
  height:12px;
  border-radius:4px;
  display:inline-block;
}

body[data-page="report"] .report-chart-legend .income{background:#16a34a;}
body[data-page="report"] .report-chart-legend .expense{background:#ef4444;}
body[data-page="report"] .report-chart-legend .net{background:#c5a658;}

body[data-page="report"] .report-v2-trend{
  min-height:288px;
  display:flex;
  grid-template-columns:none;
  align-items:end;
  gap:14px;
  overflow-x:auto;
  padding:20px 14px 8px;
  border-radius:18px;
  background:linear-gradient(180deg, #fbfdfb, #ffffff);
  border:1px solid rgba(12,83,55,.10);
}

body[data-page="report"] .report-trend-column{
  min-width:68px;
  flex:1 0 68px;
  display:grid;
  gap:9px;
  text-align:center;
}

body[data-page="report"] .report-v2-bars{
  height:168px;
  display:flex;
  justify-content:center;
  align-items:end;
  gap:6px;
  padding-top:8px;
}

body[data-page="report"] .report-v2-bars span{
  width:15px;
  min-height:8px;
  border-radius:8px 8px 4px 4px!important;
  box-shadow:0 12px 20px rgba(15,23,42,.09);
}

body[data-page="report"] .report-v2-bars .income{background:linear-gradient(180deg, #2bd981, #0f7a4f);}
body[data-page="report"] .report-v2-bars .expense{background:linear-gradient(180deg, #ff6b6b, #ef4444);}
body[data-page="report"] .report-v2-bars .net{background:linear-gradient(180deg, #e4c66d, #a67b1b);}
body[data-page="report"] .report-v2-bars .net.is-negative{background:linear-gradient(180deg, #fb923c, #ea580c);}

body[data-page="report"] .report-trend-column strong{
  color:#10231e;
  font-size:12px;
  font-weight:950;
  text-transform:capitalize;
}

body[data-page="report"] .report-trend-column small{
  color:#65746f;
  font-size:11px;
  font-weight:900;
}

body[data-page="report"] .report-donut-wrap{
  display:flex;
  align-items:center;
  gap:16px;
  margin:4px 0 18px;
  padding:16px;
  border-radius:18px;
  background:linear-gradient(135deg, #effaf3, #ffffff);
  border:1px solid rgba(12,83,55,.11);
}

body[data-page="report"] .report-donut{
  width:104px;
  height:104px;
  border-radius:50%;
  background:var(--report-donut, conic-gradient(#0f7a4f 0 100%));
  position:relative;
  box-shadow:0 18px 32px rgba(15,23,42,.10);
  flex:0 0 auto;
}

body[data-page="report"] .report-donut::after{
  content:"";
  position:absolute;
  inset:22px;
  border-radius:50%;
  background:#fff;
  box-shadow:inset 0 0 0 1px rgba(12,83,55,.08);
}

body[data-page="report"] .report-donut span{
  position:absolute;
  inset:0;
  z-index:1;
  display:grid;
  place-items:center;
  color:#0b2f26;
  font-weight:1000;
  font-size:20px;
}

body[data-page="report"] .report-donut-copy{
  min-width:0;
}

body[data-page="report"] .report-donut-copy strong{
  display:block;
  color:#0b2f26;
  font-size:18px;
  margin-bottom:4px;
}

body[data-page="report"] .report-donut-copy small{
  color:#65746f;
  font-weight:800;
}

body[data-page="report"] .report-category-row{
  align-items:center;
}

body[data-page="report"] .report-budget-list{
  display:grid;
  gap:12px;
}

body[data-page="report"] .report-budget-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  gap:14px;
  align-items:center;
  padding:16px;
  border-radius:16px;
  background:linear-gradient(135deg, #ffffff, #f6fbf7);
  border:1px solid rgba(12,83,55,.11);
  box-shadow:0 10px 24px rgba(15,23,42,.045);
}

body[data-page="report"] .report-budget-row strong{
  display:block;
  color:#10231e;
  font-size:15px;
  margin-bottom:3px;
}

body[data-page="report"] .report-budget-row small{
  display:block;
  color:#65746f;
  font-weight:800;
  font-size:13px;
}

body[data-page="report"] .report-budget-row em{
  font-style:normal;
  color:#0b2f26;
  font-weight:1000;
  white-space:nowrap;
}

body[data-page="report"] .report-status-badge{
  border-radius:11px;
  padding:8px 10px;
  font-size:12px;
  font-weight:950;
  border:1px solid rgba(12,83,55,.12);
  background:#eef8f1;
  color:#0f7a4f;
  white-space:nowrap;
}

body[data-page="report"] .report-budget-danger .report-status-badge{
  background:#fff1f1;
  color:#b42318;
  border-color:rgba(180,35,24,.18);
}

body[data-page="report"] .report-budget-warning .report-status-badge{
  background:#fff7df;
  color:#8a5d00;
  border-color:rgba(197,166,88,.26);
}

body[data-page="report"] .report-comparison-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
}

body[data-page="report"] .report-comparison-card{
  min-height:122px;
  display:grid;
  align-content:center;
  gap:6px;
  padding:18px;
  border-radius:18px;
  background:linear-gradient(135deg, #ffffff, #f6fbf7);
  border:1px solid rgba(12,83,55,.12);
  box-shadow:0 12px 28px rgba(15,23,42,.055);
}

body[data-page="report"] .report-comparison-card span{
  color:#65746f;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.04em;
  font-weight:950;
}

body[data-page="report"] .report-comparison-card strong{
  color:#0b2f26;
  font-size:25px;
  line-height:1;
  letter-spacing:-.045em;
}

body[data-page="report"] .report-comparison-card small{
  color:#65746f;
  font-weight:900;
}

body[data-page="report"] .report-comparison-positive{border-color:rgba(15,122,79,.20);}
body[data-page="report"] .report-comparison-warning{border-color:rgba(197,166,88,.28);}
body[data-page="report"] .report-comparison-danger{border-color:rgba(180,35,24,.20);}

body[data-page="report"] .report-insights{
  display:grid;
  gap:12px;
}

body[data-page="report"] .report-insight{
  display:grid;
  grid-template-columns:46px minmax(0,1fr);
  gap:12px;
  padding:15px;
  border-radius:16px;
  background:linear-gradient(135deg, #ffffff, #f6fbf7);
  border:1px solid rgba(12,83,55,.11);
  box-shadow:0 10px 24px rgba(15,23,42,.045);
}

body[data-page="report"] .report-insight > span{
  width:46px;
  height:46px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background:#eef8f1;
  box-shadow:inset 0 0 0 1px rgba(12,83,55,.08);
}

body[data-page="report"] .report-insight strong{
  display:block;
  color:#10231e;
  margin-bottom:3px;
}

body[data-page="report"] .report-insight p{
  margin:0;
  color:#65746f;
  font-size:13px;
  line-height:1.45;
  font-weight:750;
}

body[data-page="report"] .report-insight-positive > span{background:#eafaf1;}
body[data-page="report"] .report-insight-warning > span{background:#fff7df;}
body[data-page="report"] .report-insight-danger > span{background:#fff1f1;}

body[data-page="report"] .report-empty-state{
  padding:22px;
  border-radius:18px;
  background:linear-gradient(135deg, #f8fcf8, #ffffff);
  border:1px dashed rgba(12,83,55,.18);
  color:#65746f;
}

body[data-page="report"] .report-empty-state strong{
  display:block;
  color:#0b2f26;
  margin-bottom:4px;
}

body[data-page="report"] .report-empty-state p{
  margin:0;
}

@media(max-width:1320px){
  body[data-page="report"] .report-period-panel{
    grid-template-columns:1fr;
    align-items:start;
  }

  body[data-page="report"] .report-v2-kpis,
  body[data-page="report"] .report-comparison-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  body[data-page="report"] .report-layout-grid{
    grid-template-columns:1fr;
  }
}

@media(max-width:760px){
  body[data-page="report"] .report-hero{
    flex-direction:column;
    padding:20px;
  }

  body[data-page="report"] .report-hero h1{
    font-size:28px;
  }

  body[data-page="report"] .report-hero-summary{
    min-width:0;
  }

  body[data-page="report"] .report-v2-kpis,
  body[data-page="report"] .report-comparison-grid{
    grid-template-columns:1fr;
  }

  body[data-page="report"] .report-custom-range{
    grid-template-columns:1fr;
  }

  body[data-page="report"] .report-budget-row{
    grid-template-columns:1fr;
    align-items:start;
  }

  body[data-page="report"] .report-donut-wrap{
    flex-direction:column;
    align-items:flex-start;
  }
}

/* STEP PORTALE 010 — Report: filtro periodo premium e calendario custom */
body[data-page="report"] .report-period-panel{
  position:relative;
  overflow:visible;
  display:grid;
  grid-template-columns:1fr;
  gap:20px;
  padding:30px 36px 36px;
  border-radius:28px;
  background:
    radial-gradient(circle at 82% 0%, rgba(232, 193, 88, .28), transparent 38%),
    linear-gradient(135deg, #ffffff 0%, #fffaf0 46%, #f7fbf8 100%);
  border:1px solid rgba(197, 166, 88, .44);
  box-shadow:0 22px 46px rgba(15,23,42,.10), 0 8px 0 rgba(197,166,88,.22);
}

body[data-page="report"] .report-period-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:24px;
}

body[data-page="report"] .report-period-head h2{
  margin:4px 0 0;
  font-size:36px;
  line-height:1.05;
  letter-spacing:-.055em;
  color:#101828;
}

body[data-page="report"] .report-period-head p:last-child{
  margin:42px 0 0;
  color:#667085;
  font-size:18px;
  line-height:1.35;
  font-weight:900;
  text-align:right;
}

body[data-page="report"] .report-preset-controls{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:14px;
}

body[data-page="report"] .report-period-btn{
  min-height:76px;
  display:flex;
  align-items:center;
  gap:14px;
  justify-content:flex-start;
  padding:16px 20px;
  border-radius:20px;
  border:1px solid rgba(197,166,88,.34);
  background:linear-gradient(135deg, #fffdf8, #fff8e8);
  color:#101828;
  font-size:17px;
  font-weight:1000;
  letter-spacing:-.02em;
  box-shadow:0 14px 28px rgba(15,23,42,.075), inset 0 1px 0 rgba(255,255,255,.82);
}

body[data-page="report"] .report-period-btn span{
  width:40px;
  height:40px;
  border-radius:14px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  background:rgba(15,122,79,.08);
  box-shadow:inset 0 0 0 1px rgba(15,122,79,.08);
  font-size:19px;
}

body[data-page="report"] .report-period-btn:hover,
body[data-page="report"] .report-period-btn:focus-visible{
  transform:translateY(-1px);
  border-color:rgba(197,166,88,.58);
  background:linear-gradient(135deg, #ffffff, #fff5db);
  box-shadow:0 18px 34px rgba(15,23,42,.11);
  outline:none;
}

body[data-page="report"] .report-period-btn.is-active{
  background:linear-gradient(135deg, #19895e, #0b6047);
  color:#ffffff;
  border-color:rgba(15,122,79,.46);
  box-shadow:0 18px 34px rgba(15,122,79,.24), inset 0 1px 0 rgba(255,255,255,.18);
}

body[data-page="report"] .report-period-btn.is-active span{
  background:rgba(255,255,255,.16);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.12);
}

body[data-page="report"] .report-custom-range{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) 262px;
  gap:18px;
  align-items:end;
}

body[data-page="report"] .report-custom-range label{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  align-items:center;
  gap:14px;
  color:#101828;
  font-size:16px;
  font-weight:1000;
  text-transform:none;
  letter-spacing:0;
}

body[data-page="report"] .report-custom-range input[type="hidden"]{
  display:none!important;
}

body[data-page="report"] .report-date-field,
body[data-page="report"] .report-apply-period{
  appearance:none;
  width:100%;
  min-height:72px;
  border-radius:22px;
  border:1px solid rgba(197,166,88,.42);
  background:linear-gradient(135deg, #fffdf8, #fff8e8);
  color:#101828;
  box-shadow:0 16px 30px rgba(15,23,42,.08), inset 0 1px 0 rgba(255,255,255,.86);
  cursor:pointer;
}

body[data-page="report"] .report-date-field{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  padding:0 22px;
  text-align:left;
}

body[data-page="report"] .report-date-field strong{
  font-size:18px;
  font-weight:1000;
  letter-spacing:-.02em;
}

body[data-page="report"] .report-date-field:hover,
body[data-page="report"] .report-date-field:focus-visible,
body[data-page="report"] .report-apply-period:hover,
body[data-page="report"] .report-apply-period:focus-visible{
  outline:none;
  border-color:rgba(197,166,88,.62);
  box-shadow:0 20px 36px rgba(15,23,42,.12), 0 0 0 4px rgba(197,166,88,.12);
}

body[data-page="report"] .report-apply-period{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  padding:0 22px;
  font-size:18px;
  font-weight:1000;
}

body[data-page="report"] .report-apply-period span{
  width:40px;
  height:40px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background:rgba(15,122,79,.08);
}

body[data-page="report"] .report-date-calendar[hidden]{
  display:none!important;
}

body[data-page="report"] .report-date-calendar{
  position:absolute;
  left:84px;
  top:calc(100% - 26px);
  z-index:30;
  width:min(450px, calc(100vw - 64px));
}

body[data-page="report"] .report-calendar-card{
  padding:20px;
  border-radius:22px;
  background:#ffffff;
  border:1px solid rgba(197,166,88,.38);
  box-shadow:0 26px 56px rgba(15,23,42,.18), 0 0 0 1px rgba(255,255,255,.72) inset;
}

body[data-page="report"] .report-calendar-header{
  display:grid;
  grid-template-columns:54px minmax(0,1fr) 54px;
  align-items:center;
  gap:16px;
  margin-bottom:16px;
}

body[data-page="report"] .report-calendar-header button,
body[data-page="report"] .report-calendar-footer button{
  appearance:none;
  border:1px solid rgba(197,166,88,.38);
  background:linear-gradient(135deg, #fffdf8, #fff8e8);
  color:#a3740b;
  box-shadow:0 10px 22px rgba(15,23,42,.075), inset 0 1px 0 rgba(255,255,255,.82);
  cursor:pointer;
  font-weight:1000;
}

body[data-page="report"] .report-calendar-header button{
  width:54px;
  height:54px;
  border-radius:16px;
  font-size:34px;
  line-height:1;
}

body[data-page="report"] .report-calendar-header div{
  text-align:center;
  min-width:0;
}

body[data-page="report"] .report-calendar-header strong{
  display:block;
  color:#20242b;
  font-size:20px;
  line-height:1.15;
  font-weight:1000;
}

body[data-page="report"] .report-calendar-header em{
  display:block;
  color:#667085;
  font-size:15px;
  line-height:1.2;
  font-style:italic;
  font-weight:650;
  margin-top:3px;
}

body[data-page="report"] .report-calendar-weekdays,
body[data-page="report"] .report-calendar-grid{
  display:grid;
  grid-template-columns:repeat(7,1fr);
  gap:7px;
}

body[data-page="report"] .report-calendar-weekdays{
  margin-bottom:8px;
}

body[data-page="report"] .report-calendar-weekdays span{
  text-align:center;
  color:#667085;
  font-size:13px;
  line-height:1;
  font-weight:1000;
}

body[data-page="report"] .report-calendar-day{
  appearance:none;
  height:44px;
  border:0;
  border-radius:14px;
  background:transparent;
  color:#20242b;
  cursor:pointer;
  font-size:18px;
  font-weight:1000;
}

body[data-page="report"] .report-calendar-day.is-outside{
  color:#20242b;
  opacity:.92;
}

body[data-page="report"] .report-calendar-day.is-today{
  box-shadow:inset 0 0 0 2px rgba(197,166,88,.42);
}

body[data-page="report"] .report-calendar-day.is-selected{
  background:linear-gradient(135deg, #19895e, #0f7a4f);
  color:#ffffff;
  box-shadow:0 14px 22px rgba(15,122,79,.24);
}

body[data-page="report"] .report-calendar-day:hover,
body[data-page="report"] .report-calendar-day:focus-visible,
body[data-page="report"] .report-calendar-header button:hover,
body[data-page="report"] .report-calendar-header button:focus-visible,
body[data-page="report"] .report-calendar-footer button:hover,
body[data-page="report"] .report-calendar-footer button:focus-visible{
  outline:none;
  transform:translateY(-1px);
  box-shadow:0 14px 26px rgba(15,23,42,.11), inset 0 1px 0 rgba(255,255,255,.82);
}

body[data-page="report"] .report-calendar-day.is-selected:hover,
body[data-page="report"] .report-calendar-day.is-selected:focus-visible{
  box-shadow:0 16px 28px rgba(15,122,79,.28);
}

body[data-page="report"] .report-calendar-footer{
  display:grid;
  grid-template-columns:1fr 1fr 1.12fr;
  gap:10px;
  margin-top:16px;
}

body[data-page="report"] .report-calendar-footer button{
  min-height:52px;
  border-radius:16px;
  color:#20242b;
  font-size:17px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}

body[data-page="report"] .report-calendar-footer button.is-primary{
  background:linear-gradient(135deg, #19895e, #0f7a4f);
  border-color:rgba(15,122,79,.46);
  color:#ffffff;
}

/* STEP PORTALE 011 — Report: rifinitura posizione e testi filtro periodo */
body[data-page="report"] .report-page-content.report-v2{
  padding-top:12px;
}

body[data-page="report"] .report-period-panel{
  margin-top:0;
}

body[data-page="report"] .report-period-head h2{
  margin:0;
  font-size:34px;
  line-height:1.05;
}

body[data-page="report"] .report-period-btn{
  font-weight:600;
  white-space:nowrap;
  font-size:16px;
  line-height:1;
  letter-spacing:-.015em;
  gap:12px;
  padding:16px 18px;
}

body[data-page="report"] .report-period-btn.is-active{
  font-weight:650;
}

body[data-page="report"] .report-period-btn span{
  width:38px;
  height:38px;
  border-radius:13px;
}

@media(max-width:1320px){
  body[data-page="report"] .report-preset-controls{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }

  body[data-page="report"] .report-custom-range{
    grid-template-columns:1fr 1fr;
  }

  body[data-page="report"] .report-apply-period{
    grid-column:1 / -1;
  }
}

@media(max-width:760px){
  body[data-page="report"] .report-period-panel{
    padding:22px 18px 28px;
    border-radius:22px;
  }

  body[data-page="report"] .report-period-head{
    display:grid;
    gap:8px;
  }

  body[data-page="report"] .report-period-head h2{
    font-size:30px;
  }

  body[data-page="report"] .report-period-head p:last-child{
    margin:0;
    text-align:left;
    font-size:15px;
  }

  body[data-page="report"] .report-preset-controls,
  body[data-page="report"] .report-custom-range{
    grid-template-columns:1fr;
  }

  body[data-page="report"] .report-custom-range label{
    grid-template-columns:1fr;
    gap:8px;
  }

  body[data-page="report"] .report-date-calendar{
    position:fixed;
    left:12px;
    right:12px;
    top:50%;
    transform:translateY(-50%);
    width:auto;
  }

  body[data-page="report"] .report-calendar-card{
    padding:16px;
  }

  body[data-page="report"] .report-calendar-footer{
    grid-template-columns:1fr;
  }
}


/* STEP PORTALE 012 — Report: compattazione filtro e rimozione card Analisi periodo */
body[data-page="report"] .report-page-content.report-v2{
  padding-top:24px;
  gap:18px;
}

body[data-page="report"] .report-period-panel{
  margin-top:4px;
  gap:16px;
  padding:28px 36px 28px;
}

body[data-page="report"] .report-period-head{
  align-items:flex-start;
}

body[data-page="report"] .report-period-head h2{
  margin:6px 0 0;
  font-size:38px;
  line-height:1;
}

body[data-page="report"] .report-period-head p:last-child{
  margin:38px 0 0;
}

body[data-page="report"] .report-period-btn{
  min-height:68px;
  padding:14px 18px;
}

body[data-page="report"] .report-period-btn span{
  width:36px;
  height:36px;
  border-radius:12px;
}

body[data-page="report"] .report-date-field,
body[data-page="report"] .report-apply-period{
  min-height:64px;
  border-radius:20px;
}

body[data-page="report"] .report-custom-range{
  gap:16px;
}

@media(max-width:760px){
  body[data-page="report"] .report-page-content.report-v2{
    padding-top:18px;
  }

  body[data-page="report"] .report-period-panel{
    padding:24px 18px 24px;
  }
}


/* STEP PORTALE 013 — Report: titolo filtro più grande, card più bassa e più spazio sotto */
body[data-page="report"] .report-page-content.report-v2{
  padding-top:34px;
  gap:30px;
}

body[data-page="report"] .report-period-panel{
  margin-top:8px;
  padding:30px 36px 26px;
  gap:20px;
}

body[data-page="report"] .report-period-head h2{
  margin:14px 0 0;
  font-size:44px;
  line-height:.96;
  letter-spacing:-.045em;
}

body[data-page="report"] .report-period-head p:last-child{
  margin:48px 0 0;
}

@media(max-width:760px){
  body[data-page="report"] .report-page-content.report-v2{
    padding-top:24px;
    gap:22px;
  }

  body[data-page="report"] .report-period-panel{
    margin-top:4px;
    padding:26px 18px 24px;
  }

  body[data-page="report"] .report-period-head h2{
    margin-top:8px;
    font-size:34px;
  }

  body[data-page="report"] .report-period-head p:last-child{
    margin:0;
  }
}


/* STEP PORTALE 014 — Report: abbassamento titolo filtro e compattazione card */
body[data-page="report"] .report-page-content.report-v2{
  padding-top:38px;
  gap:34px;
}

body[data-page="report"] .report-period-panel{
  margin-top:10px;
  padding:20px 36px 22px;
  gap:14px;
}

body[data-page="report"] .report-period-head{
  align-items:flex-start;
  margin-bottom:0;
}

body[data-page="report"] .report-period-head h2{
  margin:26px 0 -2px;
  font-size:44px;
  line-height:.96;
  letter-spacing:-.045em;
}

body[data-page="report"] .report-period-head p:last-child{
  margin:52px 0 0;
}

body[data-page="report"] .report-preset-controls{
  margin-top:2px;
}

body[data-page="report"] .report-period-btn{
  min-height:64px;
  padding:12px 18px;
}

body[data-page="report"] .report-period-btn span{
  width:36px;
  height:36px;
  border-radius:12px;
}

body[data-page="report"] .report-custom-range{
  margin-top:2px;
  gap:16px;
}

body[data-page="report"] .report-date-field,
body[data-page="report"] .report-apply-period{
  min-height:60px;
  border-radius:20px;
}

@media(max-width:760px){
  body[data-page="report"] .report-page-content.report-v2{
    padding-top:26px;
    gap:24px;
  }

  body[data-page="report"] .report-period-panel{
    margin-top:6px;
    padding:18px 18px 22px;
    gap:14px;
  }

  body[data-page="report"] .report-period-head h2{
    margin-top:14px;
    font-size:34px;
  }

  body[data-page="report"] .report-period-head p:last-child{
    margin:0;
  }
}

/* STEP PORTALE 015 — Report: allineamento titolo Filtra riepilogo e card più compatta */
body[data-page="report"] .report-page-content.report-v2{
  padding-top:42px;
  gap:38px;
}

body[data-page="report"] .report-period-panel{
  margin-top:12px;
  padding:18px 36px 18px;
  gap:10px;
}

body[data-page="report"] .report-period-head{
  align-items:flex-start;
  min-height:88px;
  margin-bottom:0;
}

body[data-page="report"] .report-period-head h2{
  margin:54px 0 -8px;
  font-size:48px;
  line-height:.92;
  letter-spacing:-.052em;
}

body[data-page="report"] .report-period-head p:last-child{
  margin:54px 0 0;
}

body[data-page="report"] .report-preset-controls{
  margin-top:0;
}

body[data-page="report"] .report-custom-range{
  margin-top:0;
  gap:14px;
}

body[data-page="report"] .report-date-field,
body[data-page="report"] .report-apply-period{
  min-height:58px;
}

@media(max-width:760px){
  body[data-page="report"] .report-page-content.report-v2{
    padding-top:28px;
    gap:26px;
  }

  body[data-page="report"] .report-period-panel{
    margin-top:6px;
    padding:18px 18px 20px;
    gap:14px;
  }

  body[data-page="report"] .report-period-head{
    min-height:auto;
  }

  body[data-page="report"] .report-period-head h2{
    margin:12px 0 0;
    font-size:36px;
  }

  body[data-page="report"] .report-period-head p:last-child{
    margin:0;
  }
}


/* STEP PORTALE 016 — Report: compattazione reale card filtro periodo */
body[data-page="report"] .report-page-content.report-v2{
  padding-top:38px;
  gap:36px;
}

body[data-page="report"] .report-period-panel{
  margin-top:10px !important;
  padding:52px 36px 24px !important;
  gap:16px !important;
  align-content:start !important;
}

body[data-page="report"] .report-period-head{
  display:flex !important;
  align-items:flex-end !important;
  justify-content:space-between !important;
  min-height:0 !important;
  height:auto !important;
  margin:0 0 4px !important;
  gap:24px !important;
}

body[data-page="report"] .report-period-head h2{
  margin:0 !important;
  font-size:34px !important;
  line-height:1 !important;
  letter-spacing:-.045em !important;
  color:#101828 !important;
}

body[data-page="report"] .report-period-head p:last-child{
  margin:0 !important;
  align-self:flex-end !important;
  font-size:18px !important;
  line-height:1.15 !important;
  font-weight:850 !important;
}

body[data-page="report"] .report-preset-controls{
  margin-top:0 !important;
  gap:14px !important;
}

body[data-page="report"] .report-period-btn{
  min-height:64px !important;
  padding:12px 18px !important;
}

body[data-page="report"] .report-custom-range{
  margin-top:0 !important;
  gap:14px !important;
}

body[data-page="report"] .report-date-field,
body[data-page="report"] .report-apply-period{
  min-height:58px !important;
}

@media(max-width:760px){
  body[data-page="report"] .report-page-content.report-v2{
    padding-top:26px;
    gap:26px;
  }

  body[data-page="report"] .report-period-panel{
    padding:28px 18px 22px !important;
    gap:14px !important;
  }

  body[data-page="report"] .report-period-head{
    display:grid !important;
    align-items:start !important;
    gap:8px !important;
  }

  body[data-page="report"] .report-period-head h2{
    font-size:31px !important;
  }

  body[data-page="report"] .report-period-head p:last-child{
    text-align:left !important;
    font-size:15px !important;
  }
}

/* STEP PORTALE 017/018 — Report: sintesi del periodo sotto filtro */
body[data-page="report"] .report-summary-panel{
  position:relative;
  display:grid;
  gap:22px;
  padding:26px;
  border-radius:24px;
  overflow:hidden;
  background:
    radial-gradient(circle at 4% 0%, rgba(197,166,88,.22), transparent 30%),
    radial-gradient(circle at 96% 12%, rgba(15,122,79,.15), transparent 34%),
    linear-gradient(135deg, #edf7f0, #f7fbf8 54%, #eef7f2);
  border:1px solid rgba(12,83,55,.20);
  box-shadow:0 20px 48px rgba(15,23,42,.09), inset 0 1px 0 rgba(255,255,255,.72);
}

body[data-page="report"] .report-summary-head{
  position:relative;
  z-index:1;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:22px;
}

body[data-page="report"] .report-summary-copy{
  min-width:0;
}

body[data-page="report"] .report-section-kicker{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:6px 10px;
  border-radius:10px;
  background:rgba(15,122,79,.10);
  border:1px solid rgba(15,122,79,.14);
  color:#0f6b4d;
  font-size:12px;
  font-weight:950;
  letter-spacing:.075em;
  text-transform:uppercase;
}

body[data-page="report"] .report-summary-head h2{
  margin:10px 0 6px;
  color:#0b2f26;
  font-size:30px;
  line-height:1.05;
  letter-spacing:-.045em;
}

body[data-page="report"] .report-summary-head p{
  margin:0;
  max-width:720px;
  color:#5f6f69;
  font-size:16px;
  line-height:1.45;
  font-weight:750;
}

body[data-page="report"] .report-summary-period{
  flex:0 0 auto;
  min-width:246px;
  display:grid;
  gap:5px;
  padding:15px 17px;
  border-radius:18px;
  background:linear-gradient(135deg, rgba(255,255,255,.92), rgba(239,248,242,.92));
  border:1px solid rgba(12,83,55,.14);
  box-shadow:0 14px 30px rgba(15,23,42,.07), inset 0 1px 0 rgba(255,255,255,.85);
}

body[data-page="report"] .report-summary-period span{
  color:#6a7a74;
  font-size:11px;
  font-weight:950;
  letter-spacing:.08em;
  text-transform:uppercase;
}

body[data-page="report"] .report-summary-period strong{
  color:#0b2f26;
  font-size:16px;
  line-height:1.2;
  font-weight:1000;
}

body[data-page="report"] .report-summary-kpis{
  position:relative;
  z-index:1;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:16px;
  margin:0 !important;
  order:initial !important;
}

body[data-page="report"] .report-summary-kpis .report-kpi{
  min-height:144px;
  padding:22px;
  border-radius:20px;
  align-content:space-between;
  border:1px solid rgba(255,255,255,.30);
  box-shadow:0 18px 38px rgba(15,23,42,.13), inset 0 1px 0 rgba(255,255,255,.20);
}

body[data-page="report"] .report-summary-kpis .report-kpi::before{
  content:"";
  position:absolute;
  right:-42px;
  top:-46px;
  width:128px;
  height:128px;
  border-radius:50%;
  background:rgba(255,255,255,.13);
  pointer-events:none;
}

body[data-page="report"] .report-summary-kpis .report-kpi span{
  font-size:12px;
  letter-spacing:.09em;
  opacity:.88;
}

body[data-page="report"] .report-summary-kpis .report-kpi strong{
  font-size:clamp(26px, 2.35vw, 38px);
}

body[data-page="report"] .report-summary-kpis .report-kpi small{
  max-width:220px;
  font-size:13px;
  line-height:1.25;
}

@media(max-width:1180px){
  body[data-page="report"] .report-summary-head{
    align-items:flex-start;
    display:grid;
  }

  body[data-page="report"] .report-summary-period{
    min-width:0;
    width:100%;
  }

  body[data-page="report"] .report-summary-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}

@media(max-width:760px){
  body[data-page="report"] .report-summary-panel{
    padding:22px 18px;
    border-radius:22px;
    gap:18px;
  }

  body[data-page="report"] .report-summary-head h2{
    font-size:27px;
  }

  body[data-page="report"] .report-summary-head p{
    font-size:15px;
  }

  body[data-page="report"] .report-summary-kpis{
    grid-template-columns:1fr !important;
  }

  body[data-page="report"] .report-summary-kpis .report-kpi{
    min-height:128px;
  }
}

/* STEP PORTALE 019/021 — Report: andamento del periodo alleggerito */
/* REPORT 099 — componente mensile indipendente dal grafico di periodo */
body[data-page="report"] .report-monthly-trend-panel{
  margin:0 0 22px;
}

body[data-page="report"] .report-monthly-trend-chart{
  min-height:208px;
  margin-top:4px;
}

body[data-page="report"] .report-monthly-trend-tooltip{
  top:26px;
}

@media(max-width:760px){
  body[data-page="report"] .report-monthly-trend-panel{
    padding:18px;
  }
}

body[data-page="report"] .report-period-trend-panel{
  display:grid;
  gap:18px;
  padding:26px;
  border-radius:24px;
  overflow:hidden;
  background:
    radial-gradient(circle at 10% 0%, rgba(15,122,79,.10), transparent 30%),
    radial-gradient(circle at 92% 16%, rgba(197,166,88,.12), transparent 34%),
    linear-gradient(135deg, #ffffff, #f7fbf8 62%, #f1f8f4);
  border:1px solid rgba(12,83,55,.16);
  box-shadow:0 18px 44px rgba(15,23,42,.075), inset 0 1px 0 rgba(255,255,255,.82);
}

body[data-page="report"] .report-period-trend-head{
  display:block;
}

body[data-page="report"] .report-period-trend-copy{
  min-width:0;
}

body[data-page="report"] .report-period-trend-copy h2{
  margin:10px 0 6px;
  color:#0b2f26;
  font-size:30px;
  line-height:1.05;
  letter-spacing:-.045em;
}

body[data-page="report"] .report-period-trend-copy p{
  margin:0;
  max-width:760px;
  color:#5f6f69;
  font-size:16px;
  line-height:1.45;
  font-weight:750;
}

body[data-page="report"] .report-trend-visual-card{
  display:grid;
  gap:16px;
  padding:18px;
  border-radius:22px;
  background:linear-gradient(180deg, rgba(255,255,255,.95), rgba(248,252,249,.96));
  border:1px solid rgba(12,83,55,.12);
  box-shadow:0 14px 34px rgba(15,23,42,.06), inset 0 1px 0 rgba(255,255,255,.86);
}

body[data-page="report"] .report-trend-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
}

body[data-page="report"] .report-trend-visual-card .report-chart-legend{
  margin:0;
  flex:0 0 auto;
}

body[data-page="report"] .report-trend-compact-metrics{
  display:flex;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:8px;
  min-width:0;
}

body[data-page="report"] .report-trend-compact-metrics > span{
  display:inline-grid;
  grid-template-columns:auto;
  align-items:center;
  gap:2px;
  min-width:128px;
  padding:9px 12px;
  border-radius:14px;
  background:rgba(239,248,243,.72);
  border:1px solid rgba(12,83,55,.10);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.78);
}

body[data-page="report"] .report-trend-compact-metrics small{
  color:#6a7a74;
  font-size:10px;
  font-weight:950;
  letter-spacing:.08em;
  text-transform:uppercase;
}

body[data-page="report"] .report-trend-compact-metrics strong{
  color:#0b2f26;
  font-size:14px;
  line-height:1.15;
  font-weight:1000;
  letter-spacing:-.02em;
}

body[data-page="report"] .report-trend-compact-metrics em{
  color:#65746f;
  font-size:11px;
  line-height:1.1;
  font-style:normal;
  font-weight:850;
}

body[data-page="report"] .report-period-trend-chart{
  min-height:338px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(251,253,251,.98)),
    repeating-linear-gradient(to bottom, rgba(12,83,55,.07) 0 1px, transparent 1px 56px);
  border-color:rgba(12,83,55,.12);
}

body[data-page="report"] .report-period-trend-panel .report-empty-state{
  width:100%;
  min-height:230px;
  display:grid;
  place-items:center;
  text-align:center;
}

@media(max-width:1180px){
  body[data-page="report"] .report-trend-toolbar{
    align-items:flex-start;
    display:grid;
  }

  body[data-page="report"] .report-trend-compact-metrics{
    justify-content:flex-start;
  }
}

@media(max-width:760px){
  body[data-page="report"] .report-period-trend-panel{
    padding:22px 18px;
    border-radius:22px;
    gap:18px;
  }

  body[data-page="report"] .report-period-trend-copy h2{
    font-size:27px;
  }

  body[data-page="report"] .report-period-trend-copy p{
    font-size:15px;
  }

  body[data-page="report"] .report-trend-visual-card{
    padding:14px;
    border-radius:20px;
  }

  body[data-page="report"] .report-trend-compact-metrics{
    display:grid;
    grid-template-columns:1fr;
  }

  body[data-page="report"] .report-trend-compact-metrics > span{
    min-width:0;
  }

  body[data-page="report"] .report-period-trend-chart{
    min-height:286px;
  }
}


/* STEP PORTALE 022 — Report: restyle grafici ispirato ai riferimenti caricati */
body[data-page="report"] .report-trend-visual-card,
body[data-page="report"] .report-card{
  background:linear-gradient(180deg, #ffffff, #fbfdfb);
  border:1px solid rgba(12,83,55,.13);
  box-shadow:0 20px 46px rgba(15,23,42,.08), inset 0 1px 0 rgba(255,255,255,.86);
}

body[data-page="report"] .report-card .premium-card-header{
  padding-bottom:4px;
}

body[data-page="report"] .report-card .premium-card-header .eyebrow{
  color:#66756f;
  font-weight:950;
  letter-spacing:.07em;
}

body[data-page="report"] .report-period-trend-chart{
  min-height:380px;
  padding:18px 18px 14px;
  overflow:hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(252,253,252,.98)),
    repeating-linear-gradient(to bottom, rgba(12,83,55,.075) 0 1px, transparent 1px 58px);
}

body[data-page="report"] .report-chart-stage{
  width:100%;
  min-height:332px;
  display:grid;
  grid-template-columns:58px minmax(0,1fr);
  gap:16px;
  align-items:stretch;
}

body[data-page="report"] .report-chart-y-axis{
  min-height:286px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  align-items:flex-end;
  padding:6px 0 42px;
  color:#83908b;
  font-size:12px;
  font-weight:850;
  font-variant-numeric:tabular-nums;
}

body[data-page="report"] .report-chart-plot{
  min-width:0;
  position:relative;
  display:flex;
  align-items:end;
  gap:18px;
  overflow-x:auto;
  padding:12px 6px 0;
  background:
    repeating-linear-gradient(to bottom, rgba(12,83,55,.07) 0 1px, transparent 1px 58px);
  border-left:1px solid rgba(12,83,55,.12);
  border-bottom:1px solid rgba(12,83,55,.12);
}

body[data-page="report"] .report-trend-plot::-webkit-scrollbar{
  height:8px;
}

body[data-page="report"] .report-trend-plot::-webkit-scrollbar-thumb{
  background:rgba(12,83,55,.18);
  border-radius:10px;
}

body[data-page="report"] .report-period-trend-chart .report-trend-column{
  min-width:78px;
  flex:1 0 78px;
  gap:10px;
  align-self:end;
}

body[data-page="report"] .report-period-trend-chart .report-v2-bars{
  height:236px;
  gap:7px;
  padding-top:10px;
}

body[data-page="report"] .report-period-trend-chart .report-v2-bars span{
  width:18px;
  border-radius:10px 10px 4px 4px!important;
  box-shadow:0 12px 22px rgba(15,23,42,.12);
  opacity:.92;
  transition:opacity .18s ease, transform .18s ease;
}

body[data-page="report"] .report-period-trend-chart .report-v2-bars:hover span{
  opacity:1;
  transform:translateY(-2px);
}

body[data-page="report"] .report-period-trend-chart .report-trend-column strong{
  min-height:18px;
  color:#858f8b;
  font-size:12px;
  font-weight:850;
  text-transform:none;
}

body[data-page="report"] .report-donut-wrap{
  display:block;
  margin:2px 0 18px;
  padding:0;
  border:0;
  background:transparent;
  box-shadow:none;
}

body[data-page="report"] .report-donut-chart-card{
  display:grid;
  grid-template-columns:minmax(180px,240px) minmax(0,1fr);
  gap:18px;
  align-items:center;
  padding:18px;
  border-radius:22px;
  background:linear-gradient(135deg, #ffffff, #f7fbf8);
  border:1px solid rgba(12,83,55,.12);
  box-shadow:0 14px 34px rgba(15,23,42,.06);
}

body[data-page="report"] .report-donut-large{
  width:min(230px, 100%);
  aspect-ratio:1;
  height:auto;
  margin:auto;
  box-shadow:0 18px 38px rgba(15,23,42,.12);
}

body[data-page="report"] .report-donut-large::after{
  inset:28%;
  background:#fff;
  box-shadow:inset 0 0 0 1px rgba(12,83,55,.08), 0 0 0 14px rgba(255,255,255,.45);
}

body[data-page="report"] .report-donut-large span{
  font-size:28px;
  letter-spacing:-.04em;
}

body[data-page="report"] .report-donut-copy{
  align-self:end;
}

body[data-page="report"] .report-donut-legend{
  grid-column:1 / -1;
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:10px 16px;
  color:#7a8581;
  font-size:13px;
  font-weight:800;
}

body[data-page="report"] .report-donut-legend span{
  display:inline-flex;
  align-items:center;
  gap:7px;
}

body[data-page="report"] .report-donut-legend i{
  width:14px;
  height:14px;
  border-radius:4px;
  background:var(--legend-color,#0f7a4f);
  box-shadow:0 0 0 4px color-mix(in srgb, var(--legend-color,#0f7a4f) 16%, transparent);
}

body[data-page="report"] .report-donut-legend b{
  font-weight:850;
}

body[data-page="report"] .report-donut-legend em{
  color:#0b2f26;
  font-style:normal;
  font-weight:1000;
}

body[data-page="report"] .report-horizontal-bars{
  display:grid;
  gap:14px;
}

body[data-page="report"] .report-horizontal-row{
  display:grid;
  gap:8px;
  padding:12px 0;
  border-bottom:1px solid rgba(12,83,55,.08);
}

body[data-page="report"] .report-horizontal-row:last-child{
  border-bottom:0;
}

body[data-page="report"] .report-horizontal-row-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

body[data-page="report"] .report-horizontal-row-head span{
  min-width:0;
  display:inline-flex;
  align-items:center;
  gap:9px;
  color:#818b87;
  font-weight:850;
}

body[data-page="report"] .report-horizontal-row-head span i{
  width:12px;
  height:12px;
  border-radius:4px;
  background:var(--bar-color,#0f7a4f);
  box-shadow:0 0 0 5px color-mix(in srgb, var(--bar-color,#0f7a4f) 14%, transparent);
  flex:0 0 auto;
}

body[data-page="report"] .report-horizontal-row-head strong{
  color:#0b2f26;
  font-weight:1000;
  white-space:nowrap;
}

body[data-page="report"] .report-horizontal-track{
  height:20px;
  border-radius:8px;
  overflow:hidden;
  background:linear-gradient(90deg, rgba(12,83,55,.06), rgba(12,83,55,.03));
  border:1px solid rgba(12,83,55,.08);
}

body[data-page="report"] .report-horizontal-track b{
  display:block;
  width:var(--bar-width,0%);
  height:100%;
  border-radius:7px;
  background:linear-gradient(90deg, color-mix(in srgb, var(--bar-color,#0f7a4f) 72%, #ffffff), var(--bar-color,#0f7a4f));
  box-shadow:8px 0 18px color-mix(in srgb, var(--bar-color,#0f7a4f) 18%, transparent);
}

body[data-page="report"] .report-horizontal-row small{
  color:#7a8581;
  font-size:12px;
  font-weight:800;
}

body[data-page="report"] .report-budget-list{
  display:block;
}

body[data-page="report"] .report-stacked-legend{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:12px 18px;
  margin:0 0 16px;
  color:#7a8581;
  font-size:13px;
  font-weight:850;
}

body[data-page="report"] .report-stacked-legend span{
  display:inline-flex;
  align-items:center;
  gap:8px;
}

body[data-page="report"] .report-stacked-legend i{
  width:14px;
  height:14px;
  border-radius:4px;
  display:inline-block;
}

body[data-page="report"] .report-stacked-legend .spent{background:#6fc0ee;}
body[data-page="report"] .report-stacked-legend .left{background:#e2c766;}
body[data-page="report"] .report-stacked-legend .over{background:#ef4444;}

body[data-page="report"] .report-stacked-chart{
  min-height:292px;
  display:flex;
  align-items:end;
  gap:22px;
  overflow-x:auto;
  padding:18px 10px 8px 58px;
  border-radius:20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(252,253,252,.98)),
    repeating-linear-gradient(to bottom, rgba(12,83,55,.07) 0 1px, transparent 1px 58px);
  border:1px solid rgba(12,83,55,.10);
}

body[data-page="report"] .report-stacked-chart::-webkit-scrollbar{
  height:8px;
}

body[data-page="report"] .report-stacked-chart::-webkit-scrollbar-thumb{
  background:rgba(12,83,55,.18);
  border-radius:10px;
}

body[data-page="report"] .report-stacked-column{
  min-width:126px;
  flex:1 0 126px;
  display:grid;
  justify-items:center;
  gap:8px;
  text-align:center;
}

body[data-page="report"] .report-stack-bars{
  height:226px;
  width:82px;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  border-radius:12px 12px 5px 5px;
  overflow:hidden;
  background:rgba(12,83,55,.05);
  box-shadow:0 14px 26px rgba(15,23,42,.10);
}

body[data-page="report"] .report-stack-segment{
  display:block;
  width:100%;
  min-height:0;
}

body[data-page="report"] .report-stack-left{
  background:linear-gradient(180deg, #ead77f, #c5a658);
  opacity:.86;
}

body[data-page="report"] .report-stack-spent{
  background:linear-gradient(180deg, #8ad0f6, #56abe5);
}

body[data-page="report"] .report-budget-danger .report-stack-spent{
  background:linear-gradient(180deg, #ff7a7a, #ef4444);
}

body[data-page="report"] .report-budget-warning .report-stack-spent{
  background:linear-gradient(180deg, #ffb15f, #f97316);
}

body[data-page="report"] .report-stacked-column strong{
  max-width:132px;
  color:#7a8581;
  font-size:12px;
  line-height:1.25;
  font-weight:850;
  white-space:normal;
}

body[data-page="report"] .report-stacked-column small{
  color:#0b2f26;
  font-size:11px;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.04em;
}

@media(max-width:1180px){
  body[data-page="report"] .report-donut-chart-card{
    grid-template-columns:1fr;
    justify-items:center;
    text-align:center;
  }

  body[data-page="report"] .report-donut-copy{
    align-self:auto;
  }
}

@media(max-width:760px){
  body[data-page="report"] .report-period-trend-chart{
    min-height:320px;
    padding:14px;
  }

  body[data-page="report"] .report-chart-stage{
    grid-template-columns:44px minmax(0,1fr);
    gap:10px;
  }

  body[data-page="report"] .report-chart-y-axis{
    font-size:10px;
  }

  body[data-page="report"] .report-period-trend-chart .report-trend-column{
    min-width:68px;
    flex-basis:68px;
  }

  body[data-page="report"] .report-donut-large{
    width:min(210px, 100%);
  }

  body[data-page="report"] .report-horizontal-row-head{
    align-items:flex-start;
    display:grid;
  }

  body[data-page="report"] .report-stacked-chart{
    padding-left:18px;
  }
}


/* STEP PORTALE 023 — Spese per categoria a larghezza piena Report */
body[data-page="report"] .report-expense-category-panel{
  grid-column:1 / -1;
}

body[data-page="report"] .report-expense-category-panel .report-donut-wrap{
  margin:4px 0 24px;
}

body[data-page="report"] .report-expense-category-panel .report-donut-chart-card{
  grid-template-columns:minmax(260px,340px) minmax(0,1fr);
  gap:28px 34px;
  align-items:center;
  padding:26px 30px;
  border-radius:24px;
}

body[data-page="report"] .report-expense-category-panel .report-donut-large{
  width:min(310px,100%);
}

body[data-page="report"] .report-expense-category-panel .report-donut-large span{
  font-size:34px;
}

body[data-page="report"] .report-expense-category-panel .report-donut-copy{
  align-self:center;
  max-width:420px;
}

body[data-page="report"] .report-expense-category-panel .report-donut-copy strong{
  font-size:26px;
  letter-spacing:-.035em;
}

body[data-page="report"] .report-expense-category-panel .report-donut-copy small{
  display:block;
  max-width:250px;
  line-height:1.65;
  font-size:15px;
}

body[data-page="report"] .report-expense-category-panel .report-donut-legend{
  justify-content:flex-start;
  gap:12px 18px;
  padding-top:4px;
}

body[data-page="report"] .report-expense-category-panel .report-horizontal-bars{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:0 32px;
}

body[data-page="report"] .report-expense-category-panel .report-horizontal-row{
  min-width:0;
}

@media(max-width:1180px){
  body[data-page="report"] .report-expense-category-panel .report-donut-chart-card{
    grid-template-columns:minmax(220px,280px) minmax(0,1fr);
    gap:24px;
  }

  body[data-page="report"] .report-expense-category-panel .report-donut-large{
    width:min(270px,100%);
  }
}

@media(max-width:900px){
  body[data-page="report"] .report-expense-category-panel .report-horizontal-bars{
    grid-template-columns:1fr;
  }
}

@media(max-width:760px){
  body[data-page="report"] .report-expense-category-panel .report-donut-chart-card{
    grid-template-columns:1fr;
    justify-items:center;
    text-align:center;
    padding:22px;
  }

  body[data-page="report"] .report-expense-category-panel .report-donut-copy small{
    max-width:none;
  }

  body[data-page="report"] .report-expense-category-panel .report-donut-legend{
    justify-content:center;
  }
}

/* STEP PORTALE 024 — Report: barre andamento più rettangolari e tooltip custom */
body[data-page="report"] .report-period-trend-chart .report-trend-column{
  min-width:112px;
  flex:1 0 112px;
}

body[data-page="report"] .report-period-trend-chart .report-v2-bars{
  gap:9px;
  align-items:flex-end;
}

body[data-page="report"] .report-period-trend-chart .report-v2-bars span{
  position:relative;
  width:30px;
  min-height:7px;
  border-radius:6px 6px 2px 2px !important;
  box-shadow:0 12px 24px rgba(15,23,42,.13);
  outline:none;
  overflow:visible;
  cursor:default;
}

body[data-page="report"] .report-period-trend-chart .report-v2-bars span:hover,
body[data-page="report"] .report-period-trend-chart .report-v2-bars span:focus-visible{
  opacity:1;
  transform:translateY(-3px);
  z-index:6;
}

body[data-page="report"] .report-period-trend-chart .report-v2-bars span::after{
  content:attr(data-report-tooltip);
  position:absolute;
  left:50%;
  bottom:calc(100% + 12px);
  z-index:12;
  width:max-content;
  max-width:230px;
  padding:9px 11px;
  border-radius:7px;
  background:rgba(17,24,39,.90);
  color:#ffffff;
  font-size:12px;
  line-height:1.25;
  font-weight:900;
  letter-spacing:-.01em;
  box-shadow:0 16px 34px rgba(15,23,42,.24);
  transform:translateX(-50%) translateY(5px);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .16s ease, transform .16s ease, visibility .16s ease;
  white-space:nowrap;
}

body[data-page="report"] .report-period-trend-chart .report-v2-bars span::before{
  content:"";
  position:absolute;
  left:50%;
  bottom:calc(100% + 5px);
  z-index:13;
  width:10px;
  height:10px;
  background:rgba(17,24,39,.90);
  transform:translateX(-50%) rotate(45deg);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .16s ease, visibility .16s ease;
}

body[data-page="report"] .report-period-trend-chart .report-v2-bars span:hover::after,
body[data-page="report"] .report-period-trend-chart .report-v2-bars span:focus-visible::after{
  opacity:1;
  visibility:visible;
  transform:translateX(-50%) translateY(0);
}

body[data-page="report"] .report-period-trend-chart .report-v2-bars span:hover::before,
body[data-page="report"] .report-period-trend-chart .report-v2-bars span:focus-visible::before{
  opacity:1;
  visibility:visible;
}

@media(max-width:760px){
  body[data-page="report"] .report-period-trend-chart .report-trend-column{
    min-width:88px;
    flex-basis:88px;
  }

  body[data-page="report"] .report-period-trend-chart .report-v2-bars{
    gap:7px;
  }

  body[data-page="report"] .report-period-trend-chart .report-v2-bars span{
    width:23px;
    border-radius:5px 5px 2px 2px !important;
  }
}


/* STEP PORTALE 025 — Report: tooltip andamento sempre visibile e freccia pulita */
body[data-page="report"] .report-period-trend-chart{
  position:relative;
  overflow:visible;
}

body[data-page="report"] .report-period-trend-chart .report-v2-bars span::before,
body[data-page="report"] .report-period-trend-chart .report-v2-bars span::after{
  content:none!important;
  display:none!important;
}

body[data-page="report"] .report-chart-tooltip{
  position:absolute;
  z-index:40;
  display:flex;
  align-items:center;
  justify-content:center;
  width:max-content;
  max-width:min(260px, calc(100% - 20px));
  padding:9px 12px;
  border-radius:8px;
  background:rgba(17,24,39,.94);
  color:#ffffff;
  font-size:12px;
  line-height:1.25;
  font-weight:500;
  letter-spacing:0;
  white-space:nowrap;
  box-shadow:0 16px 34px rgba(15,23,42,.24);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:translateY(5px);
  transition:opacity .16s ease, transform .16s ease, visibility .16s ease;
}

body[data-page="report"] .report-chart-tooltip.is-visible{
  opacity:1;
  visibility:visible;
  transform:translateY(0);
}

body[data-page="report"] .report-chart-tooltip-text{
  display:block;
  font-weight:500;
}

body[data-page="report"] .report-chart-tooltip-arrow{
  position:absolute;
  left:var(--report-tooltip-arrow-left, 50%);
  bottom:-7px;
  width:0;
  height:0;
  border-left:7px solid transparent;
  border-right:7px solid transparent;
  border-top:8px solid rgba(17,24,39,.94);
  transform:translateX(-50%);
}

@media(max-width:760px){
  body[data-page="report"] .report-chart-tooltip{
    display:none;
  }
}

/* STEP PORTALE 027 — Entrate per categoria a larghezza piena con doughnut */
body[data-page="report"] .report-income-category-panel{
  grid-column:1 / -1;
}

body[data-page="report"] .report-income-category-panel .report-donut-wrap{
  margin:4px 0 24px;
}

body[data-page="report"] .report-income-category-panel .report-donut-chart-card{
  grid-template-columns:minmax(260px,340px) minmax(0,1fr);
  gap:28px 34px;
  align-items:center;
  padding:26px 30px;
  border-radius:24px;
}

body[data-page="report"] .report-income-category-panel .report-donut-large{
  width:min(310px,100%);
}

body[data-page="report"] .report-income-category-panel .report-donut-large span{
  font-size:34px;
}

body[data-page="report"] .report-income-category-panel .report-donut-copy{
  align-self:center;
  max-width:420px;
}

body[data-page="report"] .report-income-category-panel .report-donut-copy strong{
  font-size:26px;
  letter-spacing:-.035em;
}

body[data-page="report"] .report-income-category-panel .report-donut-copy small{
  display:block;
  max-width:250px;
  line-height:1.65;
  font-size:15px;
}

body[data-page="report"] .report-income-category-panel .report-donut-legend{
  justify-content:flex-start;
  gap:12px 18px;
  padding-top:4px;
}

body[data-page="report"] .report-income-category-panel .report-horizontal-bars{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:0 32px;
}

body[data-page="report"] .report-income-category-panel .report-horizontal-row{
  min-width:0;
}

@media(max-width:1180px){
  body[data-page="report"] .report-income-category-panel .report-donut-chart-card{
    grid-template-columns:minmax(220px,280px) minmax(0,1fr);
    gap:24px;
  }

  body[data-page="report"] .report-income-category-panel .report-donut-large{
    width:min(270px,100%);
  }
}

@media(max-width:900px){
  body[data-page="report"] .report-income-category-panel .report-horizontal-bars{
    grid-template-columns:1fr;
  }
}

@media(max-width:760px){
  body[data-page="report"] .report-income-category-panel .report-donut-chart-card{
    grid-template-columns:1fr;
    justify-items:center;
    text-align:center;
    padding:22px;
  }

  body[data-page="report"] .report-income-category-panel .report-donut-copy small{
    max-width:none;
  }

  body[data-page="report"] .report-income-category-panel .report-donut-legend{
    justify-content:center;
  }
}

/* STEP PORTALE 028 — Centratura doughnut e legenda categorie Report */
body[data-page="report"] .report-expense-category-panel .report-donut-wrap,
body[data-page="report"] .report-income-category-panel .report-donut-wrap{
  display:flex;
  justify-content:center;
  width:100%;
}

body[data-page="report"] .report-expense-category-panel .report-donut-chart-card,
body[data-page="report"] .report-income-category-panel .report-donut-chart-card{
  width:min(860px,100%);
  margin:0 auto;
  grid-template-columns:minmax(260px,340px) minmax(260px,360px);
  justify-content:center;
}

body[data-page="report"] .report-expense-category-panel .report-donut-copy,
body[data-page="report"] .report-income-category-panel .report-donut-copy{
  justify-self:start;
}

body[data-page="report"] .report-expense-category-panel .report-donut-legend,
body[data-page="report"] .report-income-category-panel .report-donut-legend{
  justify-content:center;
  max-width:760px;
  margin:0 auto;
}

@media(max-width:1180px){
  body[data-page="report"] .report-expense-category-panel .report-donut-chart-card,
  body[data-page="report"] .report-income-category-panel .report-donut-chart-card{
    width:min(760px,100%);
    grid-template-columns:minmax(220px,280px) minmax(240px,320px);
  }
}

@media(max-width:760px){
  body[data-page="report"] .report-expense-category-panel .report-donut-chart-card,
  body[data-page="report"] .report-income-category-panel .report-donut-chart-card{
    width:100%;
    grid-template-columns:1fr;
    justify-content:center;
  }

  body[data-page="report"] .report-expense-category-panel .report-donut-copy,
  body[data-page="report"] .report-income-category-panel .report-donut-copy{
    justify-self:center;
  }
}



/* STEP PORTALE 029 — Report: barre andamento più piatte e professionali */
body[data-page="report"] .report-period-trend-chart .report-v2-bars span{
  border-radius:2px 2px 1px 1px!important;
}

@media(max-width:760px){
  body[data-page="report"] .report-period-trend-chart .report-v2-bars span{
    border-radius:2px 2px 1px 1px!important;
  }
}

/* STEP PORTALE 030 — Report: tooltip doughnut e barre categorie dritte */
body[data-page="report"] .report-donut-chart-card{
  position:relative;
  overflow:visible;
}

body[data-page="report"] .report-donut-svg{
  background:transparent!important;
  overflow:visible;
}

body[data-page="report"] .report-donut-svg svg{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  display:block;
  z-index:0;
  overflow:visible;
}

body[data-page="report"] .report-donut-segment{
  cursor:default;
  outline:none;
  transition:opacity .16s ease, filter .16s ease;
}

body[data-page="report"] .report-donut-segment:hover,
body[data-page="report"] .report-donut-segment:focus-visible{
  opacity:.92;
  filter:drop-shadow(0 12px 18px rgba(15,23,42,.16));
}

body[data-page="report"] .report-category-tooltip{
  position:absolute;
  z-index:60;
  display:flex;
  align-items:center;
  justify-content:center;
  width:max-content;
  max-width:min(260px, calc(100% - 20px));
  padding:9px 12px;
  border-radius:8px;
  background:rgba(17,24,39,.94);
  color:#ffffff;
  font-size:12px;
  line-height:1.25;
  font-weight:500;
  letter-spacing:0;
  white-space:nowrap;
  box-shadow:0 16px 34px rgba(15,23,42,.24);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:translateY(5px);
  transition:opacity .16s ease, transform .16s ease, visibility .16s ease;
}

body[data-page="report"] .report-category-tooltip.is-visible{
  opacity:1;
  visibility:visible;
  transform:translateY(0);
}

body[data-page="report"] .report-category-tooltip-text{
  display:block;
  font-weight:500;
}

body[data-page="report"] .report-category-tooltip-arrow{
  position:absolute;
  left:var(--report-category-tooltip-arrow-left, 50%);
  bottom:-7px;
  width:0;
  height:0;
  border-left:7px solid transparent;
  border-right:7px solid transparent;
  border-top:8px solid rgba(17,24,39,.94);
  transform:translateX(-50%);
}

body[data-page="report"] .report-category-tooltip.is-below .report-category-tooltip-arrow{
  top:-7px;
  bottom:auto;
  border-top:0;
  border-bottom:8px solid rgba(17,24,39,.94);
}

body[data-page="report"] .report-expense-category-panel .report-horizontal-track,
body[data-page="report"] .report-income-category-panel .report-horizontal-track{
  border-radius:3px;
}

body[data-page="report"] .report-expense-category-panel .report-horizontal-track b,
body[data-page="report"] .report-income-category-panel .report-horizontal-track b{
  border-radius:2px;
}

@media(max-width:760px){
  body[data-page="report"] .report-category-tooltip{
    display:none;
  }
}


/* STEP PORTALE 031 — Report: ripristino doughnut pieno e tooltip settori */
body[data-page="report"] .report-donut-svg{
  background:var(--report-donut, conic-gradient(#0f7a4f 0 100%))!important;
}

body[data-page="report"] .report-donut-large::after{
  inset:28%!important;
  box-shadow:inset 0 0 0 1px rgba(12,83,55,.08), 0 0 0 14px rgba(255,255,255,.45);
}

body[data-page="report"] .report-donut-svg .report-donut-hit-map{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  display:block;
  z-index:3;
  overflow:visible;
}

body[data-page="report"] .report-donut-svg span{
  z-index:4;
  pointer-events:none;
}

body[data-page="report"] .report-donut-segment{
  pointer-events:all;
  cursor:pointer;
}

body[data-page="report"] .report-donut-segment:hover,
body[data-page="report"] .report-donut-segment:focus-visible{
  opacity:1;
  filter:none;
}

body[data-page="report"] .report-category-tooltip{
  z-index:90;
}

@media(max-width:760px){
  body[data-page="report"] .report-donut-large::after{
    inset:28%!important;
  }
}

/* STEP PORTALE 032 — Report: evidenza singole categorie sotto doughnut */
body[data-page="report"] .report-expense-category-panel .report-horizontal-bars,
body[data-page="report"] .report-income-category-panel .report-horizontal-bars{
  gap:16px 28px;
}

body[data-page="report"] .report-expense-category-panel .report-horizontal-row,
body[data-page="report"] .report-income-category-panel .report-horizontal-row{
  position:relative;
  gap:12px;
  padding:16px 18px;
  border:1px solid rgba(12,83,55,.18);
  border-radius:16px;
  background:linear-gradient(135deg, rgba(255,255,255,.98), rgba(245,251,247,.84));
  box-shadow:
    0 18px 34px rgba(15,23,42,.105),
    0 8px 16px rgba(12,83,55,.055);
  overflow:hidden;
  transition:box-shadow .18s ease, border-color .18s ease, transform .18s ease;
}

body[data-page="report"] .report-expense-category-panel .report-horizontal-row:hover,
body[data-page="report"] .report-income-category-panel .report-horizontal-row:hover{
  transform:translateY(-1px);
  border-color:rgba(12,83,55,.26);
  box-shadow:
    0 24px 46px rgba(15,23,42,.135),
    0 10px 22px rgba(12,83,55,.075);
}

body[data-page="report"] .report-expense-category-panel .report-horizontal-row::before,
body[data-page="report"] .report-income-category-panel .report-horizontal-row::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--bar-color,#0f7a4f) 16%, transparent), transparent 36%),
    linear-gradient(180deg, rgba(255,255,255,.34), transparent 58%);
  opacity:.96;
  pointer-events:none;
}

body[data-page="report"] .report-expense-category-panel .report-horizontal-row > *,
body[data-page="report"] .report-income-category-panel .report-horizontal-row > *{
  position:relative;
  z-index:1;
}

body[data-page="report"] .report-horizontal-row-head{
  align-items:flex-start;
}

body[data-page="report"] .report-horizontal-title{
  display:inline-flex!important;
  align-items:center;
  gap:10px!important;
  min-width:0;
  color:#0b2f26!important;
  font-weight:950!important;
}

body[data-page="report"] .report-horizontal-title i{
  width:16px!important;
  height:16px!important;
  border-radius:5px!important;
  background:var(--bar-color,#0f7a4f)!important;
  box-shadow:0 0 0 5px color-mix(in srgb, var(--bar-color,#0f7a4f) 16%, transparent)!important;
}

body[data-page="report"] .report-horizontal-title b{
  min-width:0;
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#0b2f26;
  font-size:17px;
  line-height:1.15;
  font-weight:1000;
  letter-spacing:-.025em;
}

body[data-page="report"] .report-horizontal-amount{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:32px;
  padding:6px 10px;
  border-radius:10px;
  background:#ffffff;
  border:1px solid rgba(12,83,55,.10);
  box-shadow:0 10px 22px rgba(15,23,42,.05);
  color:#0b2f26!important;
  font-size:15px;
  font-weight:1000;
}

body[data-page="report"] .report-expense-category-panel .report-horizontal-track,
body[data-page="report"] .report-income-category-panel .report-horizontal-track{
  height:16px;
  border-radius:4px;
  background:linear-gradient(90deg, rgba(12,83,55,.055), rgba(12,83,55,.025));
  border:1px solid rgba(12,83,55,.08);
}

body[data-page="report"] .report-expense-category-panel .report-horizontal-track b,
body[data-page="report"] .report-income-category-panel .report-horizontal-track b{
  border-radius:3px;
  box-shadow:8px 0 20px color-mix(in srgb, var(--bar-color,#0f7a4f) 16%, transparent);
}

body[data-page="report"] .report-horizontal-meta{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
}

body[data-page="report"] .report-horizontal-meta small,
body[data-page="report"] .report-horizontal-meta em{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:4px 8px;
  border-radius:8px;
  font-size:12px;
  line-height:1;
  font-weight:900;
  font-style:normal;
}

body[data-page="report"] .report-horizontal-meta small{
  color:#66756f;
  background:rgba(255,255,255,.78);
  border:1px solid rgba(12,83,55,.08);
}

body[data-page="report"] .report-horizontal-meta em{
  color:color-mix(in srgb, var(--bar-color,#0f7a4f) 78%, #0b2f26);
  background:color-mix(in srgb, var(--bar-color,#0f7a4f) 10%, #ffffff);
  border:1px solid color-mix(in srgb, var(--bar-color,#0f7a4f) 18%, transparent);
}

@media(max-width:760px){
  body[data-page="report"] .report-expense-category-panel .report-horizontal-row,
  body[data-page="report"] .report-income-category-panel .report-horizontal-row{
    padding:14px;
    border-radius:14px;
    box-shadow:0 14px 30px rgba(15,23,42,.10);
  }

  body[data-page="report"] .report-horizontal-row-head{
    gap:10px;
  }

  body[data-page="report"] .report-horizontal-title b{
    font-size:16px;
  }
}


/* STEP PORTALE 034 — Report: importi mini-card categorie più evidenti */
body[data-page="report"] .report-expense-category-panel .report-horizontal-amount,
body[data-page="report"] .report-income-category-panel .report-horizontal-amount{
  min-height:42px;
  min-width:96px;
  padding:8px 14px;
  border-radius:12px;
  font-size:22px;
  line-height:1;
  font-weight:1000;
  letter-spacing:-.035em;
  box-shadow:
    0 16px 32px rgba(15,23,42,.095),
    inset 0 1px 0 rgba(255,255,255,.92);
}

body[data-page="report"] .report-income-category-panel .report-horizontal-amount{
  color:#064735!important;
  border-color:rgba(6,71,53,.18);
  background:linear-gradient(180deg, #ffffff, rgba(232,248,241,.96));
}

body[data-page="report"] .report-expense-category-panel .report-horizontal-amount{
  color:#7a1717!important;
  border-color:rgba(122,23,23,.18);
  background:linear-gradient(180deg, #ffffff, rgba(255,240,240,.96));
}

body[data-page="report"] .report-horizontal-amount .currency-decimals,
body[data-page="report"] .report-horizontal-amount small{
  font-size:.58em;
  font-weight:1000;
  letter-spacing:-.02em;
}

@media(max-width:760px){
  body[data-page="report"] .report-expense-category-panel .report-horizontal-amount,
  body[data-page="report"] .report-income-category-panel .report-horizontal-amount{
    min-height:36px;
    min-width:82px;
    padding:7px 10px;
    font-size:19px;
  }
}


/* STEP PORTALE 039 — Bottone Modifica profilo premium e topbar Impostazioni pulita */
.settings-member-profile-btn {
  min-height: 46px;
  padding: 0 18px 0 14px;
  border-radius: 15px;
  border: 1px solid rgba(15, 122, 79, 0.28);
  background: linear-gradient(135deg, #0f7a4f 0%, #0b5f42 100%);
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.01em;
  box-shadow:
    0 16px 34px rgba(15, 122, 79, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.settings-member-profile-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(212, 175, 55, 0.34);
  background: linear-gradient(135deg, #118858 0%, #0b4f39 100%);
  box-shadow:
    0 20px 40px rgba(15, 122, 79, 0.30),
    0 0 0 3px rgba(212, 175, 55, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.settings-member-profile-btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 4px rgba(31, 157, 99, 0.16),
    0 18px 38px rgba(15, 122, 79, 0.28);
}

.settings-member-profile-btn-icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.settings-member-profile-btn-icon svg {
  width: 17px;
  height: 17px;
  display: block;
  fill: currentColor;
}

@media (max-width: 760px) {
  .settings-member-profile-btn {
    width: 100%;
    justify-content: center;
  }
}

/* STEP PORTALE 040 — Rifinitura blocco avatar Modifica profilo */
.settings-member-profile-modal .settings-avatar-upload-icon {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.20), transparent 34%),
    linear-gradient(135deg, #0B2F26, #0F7A4F);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 16px 30px rgba(11, 47, 38, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.settings-avatar-upload-icon .settings-avatar-upload-svg {
  width: 34px;
  height: 34px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.settings-member-profile-modal .settings-avatar-pick-btn {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 15px;
  border: 1.5px solid rgba(15, 91, 58, 0.24);
  background: linear-gradient(180deg, #ffffff, #f8fbf8);
  color: #0B2F26;
  font-weight: 950;
  gap: 9px;
  box-shadow:
    0 13px 26px rgba(15, 23, 42, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.settings-member-profile-modal .settings-avatar-pick-btn:hover,
.settings-member-profile-modal .settings-avatar-pick-btn:focus-visible {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #0F7A4F, #095B3A);
  border-color: rgba(15, 122, 79, 0.72);
  color: #ffffff;
  box-shadow:
    0 18px 34px rgba(15, 122, 79, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.settings-avatar-pick-btn .settings-avatar-btn-icon {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 122, 79, 0.10);
  color: currentColor;
  flex: 0 0 auto;
}

.settings-avatar-pick-btn:hover .settings-avatar-btn-icon,
.settings-avatar-pick-btn:focus-visible .settings-avatar-btn-icon {
  background: rgba(255, 255, 255, 0.16);
}

.settings-avatar-pick-btn .settings-avatar-btn-icon svg {
  width: 15px;
  height: 15px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.settings-member-profile-modal .settings-avatar-note {
  width: fit-content;
  max-width: 100%;
  color: #7F1D1D;
  font-weight: 950;
  letter-spacing: -0.01em;
}

/* STEP PORTALE 042 — Badge notifiche topbar visibile solo con almeno una notifica */
.topbar-notification [data-topbar-notification-badge][hidden],
.topbar-notification [data-topbar-notification-badge][aria-hidden="true"]{
  display:none!important;
}


/* STEP PORTALE 049 — Movimenti: paginazione ogni 10 record */
body[data-page="movimenti"] .movements-pagination{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:14px!important;
  margin-top:10px!important;
  padding:14px 16px!important;
  border:1px solid rgba(15,122,79,.14)!important;
  border-radius:18px!important;
  background:linear-gradient(135deg,rgba(255,255,255,.96),rgba(244,250,247,.90))!important;
  box-shadow:0 14px 32px rgba(15,23,42,.055)!important;
}
body[data-page="movimenti"] .movements-pagination-summary{
  color:#64748b!important;
  font-size:14px!important;
  font-weight:800!important;
}
body[data-page="movimenti"] .movements-pagination-summary strong{
  color:#092f26!important;
  font-weight:950!important;
}
body[data-page="movimenti"] .movements-pagination-controls{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:7px!important;
  flex-wrap:wrap!important;
}
body[data-page="movimenti"] .movements-pagination-page,
body[data-page="movimenti"] .movements-pagination-nav{
  min-width:38px!important;
  height:38px!important;
  display:inline-grid!important;
  place-items:center!important;
  border-radius:12px!important;
  border:1px solid rgba(15,122,79,.16)!important;
  background:#fff!important;
  color:#0b5b3a!important;
  font-size:14px!important;
  font-weight:950!important;
  cursor:pointer!important;
  box-shadow:0 10px 22px rgba(15,23,42,.055)!important;
  transition:transform .16s ease, box-shadow .16s ease, background .16s ease, color .16s ease, border-color .16s ease!important;
}
body[data-page="movimenti"] .movements-pagination-page:hover,
body[data-page="movimenti"] .movements-pagination-nav:hover:not(:disabled){
  transform:translateY(-1px)!important;
  border-color:rgba(15,122,79,.28)!important;
  box-shadow:0 14px 28px rgba(15,23,42,.085)!important;
}
body[data-page="movimenti"] .movements-pagination-page.active{
  background:#0f7a4f!important;
  border-color:#0f7a4f!important;
  color:#fff!important;
  box-shadow:0 14px 30px rgba(15,122,79,.20)!important;
}
body[data-page="movimenti"] .movements-pagination-nav:disabled{
  opacity:.42!important;
  cursor:not-allowed!important;
  transform:none!important;
  box-shadow:none!important;
}
body[data-page="movimenti"] .movements-pagination-gap{
  min-width:24px!important;
  display:inline-grid!important;
  place-items:center!important;
  color:#64748b!important;
  font-weight:950!important;
}
@media(max-width:720px){
  body[data-page="movimenti"] .movements-pagination{
    align-items:flex-start!important;
    flex-direction:column!important;
  }
  body[data-page="movimenti"] .movements-pagination-controls{
    width:100%!important;
    justify-content:flex-start!important;
  }
}


/* STEP PORTALE 050 — Movimenti: bottoni azione allineati allo stile Scadenze */
body[data-page="movimenti"] .movement-row-actions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  margin-top:8px;
  position:relative;
  z-index:45!important;
}
body[data-page="movimenti"] .movement-action-btn{
  position:relative;
  width:38px;
  height:38px;
  display:inline-grid;
  place-items:center;
  border-radius:14px;
  border:1px solid #dce5dd;
  background:#fff;
  color:#0f7a4f;
  font-size:14px;
  line-height:1;
  cursor:pointer;
  box-shadow:0 10px 22px rgba(15,23,42,.06);
  transform:none!important;
  transition:background .18s ease,border-color .18s ease,box-shadow .18s ease,color .18s ease,opacity .18s ease!important;
}
body[data-page="movimenti"] .movement-action-btn:hover{
  background:#f8fbf9;
  border-color:#bde8cf;
  color:#0b5b3a;
  box-shadow:0 12px 26px rgba(15,23,42,.11)!important;
  transform:none!important;
}
body[data-page="movimenti"] .movement-action-danger{
  color:#f04444;
  border-color:#ffd0d0;
}
body[data-page="movimenti"] .movement-action-danger:hover{
  background:#fff7f7;
  border-color:#ffb8b8;
  color:#dc2626;
  box-shadow:0 12px 26px rgba(180,35,24,.13)!important;
}
body[data-page="movimenti"] .movement-action-btn[data-tooltip]::after{
  content:attr(data-tooltip);
  position:absolute;
  left:50%;
  right:auto;
  bottom:calc(100% + 8px);
  transform:translateX(-50%) translateY(3px);
  opacity:0;
  pointer-events:none;
  white-space:nowrap;
  background:#0b2f26;
  color:#fff;
  border-radius:10px;
  padding:7px 9px;
  font-size:12px;
  font-weight:650;
  box-shadow:0 14px 28px rgba(7,31,25,.22);
  transition:opacity .16s ease,transform .16s ease;
  z-index:80!important;
}
body[data-page="movimenti"] .movement-action-btn[data-tooltip]::before{
  content:"";
  position:absolute;
  left:50%;
  right:auto;
  bottom:calc(100% + 3px);
  transform:translateX(-50%) translateY(3px);
  width:0;
  height:0;
  border:6px solid transparent;
  border-top-color:#0b2f26;
  opacity:0;
  pointer-events:none;
  transition:opacity .16s ease,transform .16s ease;
  z-index:80!important;
}
body[data-page="movimenti"] .movement-action-btn[data-tooltip]:hover::after,
body[data-page="movimenti"] .movement-action-btn[data-tooltip]:hover::before{
  opacity:1;
  transform:translateX(-50%) translateY(0);
}
body[data-page="movimenti"] .movement-action-btn:focus-visible{
  outline:none!important;
  box-shadow:0 0 0 4px rgba(31,157,99,.16),0 12px 26px rgba(15,23,42,.11)!important;
}
@media(max-width:760px){
  body[data-page="movimenti"] .movement-action-btn[data-tooltip]::before,
  body[data-page="movimenti"] .movement-action-btn[data-tooltip]::after{
    display:none;
  }
}


/* STEP PORTALE 051 — Movimenti: bottoni e tooltip identici a Scadenze */
body[data-page="movimenti"] .movement-row-actions{
  display:flex!important;
  justify-content:flex-end!important;
  gap:8px!important;
  position:relative!important;
  z-index:45!important;
}
body[data-page="movimenti"] .movement-action-btn{
  width:38px!important;
  height:38px!important;
  min-width:38px!important;
  min-height:38px!important;
  display:inline-grid!important;
  place-items:center!important;
  border-radius:14px!important;
  border:1px solid #dce5dd!important;
  background:#fff!important;
  color:#0f7a4f!important;
  cursor:pointer!important;
  box-shadow:0 10px 22px rgba(15,23,42,.06)!important;
  position:relative!important;
  font-size:14px!important;
  line-height:1!important;
  padding:0!important;
  box-sizing:border-box!important;
}
body[data-page="movimenti"] .movement-action-btn:hover{
  background:#fff!important;
  border-color:#dce5dd!important;
  color:#0f7a4f!important;
  box-shadow:0 10px 22px rgba(15,23,42,.06)!important;
  transform:none!important;
}
body[data-page="movimenti"] .movement-action-danger{
  color:#f04444!important;
  border-color:#ffd0d0!important;
}
body[data-page="movimenti"] .movement-action-danger:hover{
  background:#fff!important;
  color:#f04444!important;
  border-color:#ffd0d0!important;
  box-shadow:0 10px 22px rgba(15,23,42,.06)!important;
}
body[data-page="movimenti"] .movement-action-btn[data-tooltip]::before{
  content:none!important;
  display:none!important;
}
body[data-page="movimenti"] .movement-action-btn[data-tooltip]::after{
  content:attr(data-tooltip)!important;
  position:absolute!important;
  left:50%!important;
  right:auto!important;
  bottom:calc(100% + 8px)!important;
  transform:translateX(-50%)!important;
  white-space:nowrap!important;
  background:#0b2f26!important;
  color:#fff!important;
  border-radius:10px!important;
  padding:7px 9px!important;
  font-size:12px!important;
  font-weight:650!important;
  line-height:1.2!important;
  opacity:0!important;
  pointer-events:none!important;
  transition:opacity .16s ease,transform .16s ease!important;
  z-index:80!important;
  box-shadow:none!important;
}
body[data-page="movimenti"] .movement-action-btn[data-tooltip]:hover::after{
  opacity:1!important;
  transform:translateX(-50%) translateY(-2px)!important;
}
body[data-page="movimenti"] .movement-action-btn[data-tooltip]:hover::before{
  opacity:0!important;
  display:none!important;
}
@media(max-width:760px){
  body[data-page="movimenti"] .movement-action-btn[data-tooltip]::before,
  body[data-page="movimenti"] .movement-action-btn[data-tooltip]::after{
    display:none!important;
  }
}


/* STEP PORTALE 052 — Movimenti: bottoni identici a Scadenze e tooltip senza freccia */
body[data-page="movimenti"] .movement-row-actions{
  display:flex!important;
  justify-content:flex-end!important;
  gap:8px!important;
  margin-top:8px!important;
  position:relative!important;
  z-index:45!important;
  overflow:visible!important;
}
body[data-page="movimenti"] .movement-action-btn{
  width:38px!important;
  height:38px!important;
  min-width:38px!important;
  min-height:38px!important;
  display:inline-grid!important;
  place-items:center!important;
  padding:0!important;
  border-radius:14px!important;
  border:1px solid #dce5dd!important;
  background:#fff!important;
  color:#0f7a4f!important;
  box-shadow:0 10px 22px rgba(15,23,42,.06)!important;
  position:relative!important;
  overflow:visible!important;
  cursor:pointer!important;
  font-size:19px!important;
  font-weight:900!important;
  line-height:1!important;
  box-sizing:border-box!important;
  transform:none!important;
  transition:background .18s ease,border-color .18s ease,box-shadow .18s ease,color .18s ease,opacity .18s ease!important;
}
body[data-page="movimenti"] .movement-action-btn:hover,
body[data-page="movimenti"] .movement-action-btn:focus-visible{
  background:#fff!important;
  border-color:#dce5dd!important;
  color:#0f7a4f!important;
  box-shadow:0 10px 22px rgba(15,23,42,.06)!important;
  transform:none!important;
  outline:none!important;
}
body[data-page="movimenti"] .movement-action-danger,
body[data-page="movimenti"] .movement-action-danger:hover,
body[data-page="movimenti"] .movement-action-danger:focus-visible{
  color:#f04444!important;
  border-color:#ffd0d0!important;
  background:#fff!important;
}
body[data-page="movimenti"] .movement-action-btn[data-tooltip]::before,
body[data-page="movimenti"] .movement-action-btn[data-tooltip]:hover::before,
body[data-page="movimenti"] .movement-action-btn[data-tooltip]:focus-visible::before,
body[data-page="movimenti"] .movement-action-btn[data-tooltip]::before:hover{
  content:none!important;
  display:none!important;
  visibility:hidden!important;
  opacity:0!important;
  width:0!important;
  height:0!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  pointer-events:none!important;
}
body[data-page="movimenti"] .movement-action-btn[data-tooltip]::after{
  content:attr(data-tooltip)!important;
  position:absolute!important;
  left:50%!important;
  right:auto!important;
  bottom:calc(100% + 8px)!important;
  transform:translateX(-50%)!important;
  white-space:nowrap!important;
  background:#0b2f26!important;
  color:#fff!important;
  border:0!important;
  border-radius:10px!important;
  padding:7px 9px!important;
  font-size:12px!important;
  font-weight:650!important;
  line-height:1.2!important;
  opacity:0!important;
  pointer-events:none!important;
  transition:opacity .16s ease,transform .16s ease!important;
  z-index:90!important;
  box-shadow:none!important;
  clip-path:none!important;
}
body[data-page="movimenti"] .movement-action-btn[data-tooltip]:hover::after,
body[data-page="movimenti"] .movement-action-btn[data-tooltip]:focus-visible::after{
  opacity:1!important;
  transform:translateX(-50%) translateY(-2px)!important;
}
@media(max-width:760px){
  body[data-page="movimenti"] .movement-action-btn[data-tooltip]::before,
  body[data-page="movimenti"] .movement-action-btn[data-tooltip]::after{
    display:none!important;
  }
}


/* STEP PORTALE 053 — Movimenti: sfondi per tipo e filtri meno pesanti */
body[data-page="movimenti"] .movement-real-row.movement-real-expense{
  background:linear-gradient(135deg,rgba(240,68,68,.075),rgba(255,255,255,.94))!important;
  border-color:rgba(240,68,68,.18)!important;
}
body[data-page="movimenti"] .movement-real-row.movement-real-income{
  background:linear-gradient(135deg,rgba(31,157,99,.08),rgba(255,255,255,.94))!important;
  border-color:rgba(31,157,99,.18)!important;
}
body[data-page="movimenti"] .movement-real-row.movement-real-transfer{
  background:linear-gradient(135deg,rgba(47,128,237,.085),rgba(255,255,255,.94))!important;
  border-color:rgba(47,128,237,.18)!important;
}
body[data-page="movimenti"] .movement-real-row:hover{
  box-shadow:0 14px 30px rgba(15,23,42,.075)!important;
}
body[data-page="movimenti"] .movement-period-field-premium > span,
body[data-page="movimenti"] .movement-filter-group > span,
body[data-page="movimenti"] .movement-search-field > span{
  font-weight:720!important;
  letter-spacing:.065em!important;
}
body[data-page="movimenti"] .movement-filter-tabs button,
body[data-page="movimenti"] .movement-period-quick-control button,
body[data-page="movimenti"] .movement-category-filter-btn{
  font-weight:760!important;
}
body[data-page="movimenti"] .movements-filter-sidebar-head strong{
  font-weight:760!important;
}


/* STEP PORTALE 054 — Sidebar: rimozione card invito e linea sfumata sotto logo */
.sidebar[data-global-sidebar] .sidebar-logo-divider{
  width:70%;
  height:2px;
  flex:0 0 2px;
  margin:-24px auto 0;
  border-radius:999px;
  background:linear-gradient(90deg, transparent 0%, rgba(135, 231, 184, .42) 16%, rgba(205, 255, 228, .78) 50%, rgba(135, 231, 184, .42) 84%, transparent 100%);
  box-shadow:0 0 18px rgba(45, 212, 143, .24);
}
.app-shell.sidebar-collapsed .sidebar[data-global-sidebar] .sidebar-logo-divider{
  width:70%;
  height:2px;
  flex-basis:2px;
  margin:-20px auto 2px;
  background:linear-gradient(90deg, transparent 0%, rgba(135, 231, 184, .72) 50%, transparent 100%);
}
@media(max-width:980px){
  .sidebar[data-global-sidebar] .sidebar-logo-divider{
    width:70%;
    margin:-24px auto 0;
  }
}

/* STEP PORTALE 057 — Dashboard: tooltip doughnut spese per categoria */
.category-card .donut-visual.has-dashboard-tooltip {
  cursor: pointer;
}

.dashboard-donut-tooltip {
  position: absolute;
  z-index: 8;
  max-width: 230px;
  padding: 9px 12px;
  border-radius: 9px;
  background: #111827;
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.26);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 10px));
}

.dashboard-donut-tooltip[hidden] {
  display: none !important;
}

/* STEP 098 — Panoramica: tooltip valori nel grafico andamento */
.dashboard-trend-tooltip {
  position: absolute;
  z-index: 9;
  top: 26px;
  min-width: 176px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #111827;
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .26);
  font-size: 12px;
  line-height: 1.35;
  pointer-events: none;
  transform: translateX(-50%);
}

.dashboard-trend-tooltip strong,
.dashboard-trend-tooltip span {
  display: block;
}

.dashboard-trend-tooltip strong {
  margin-bottom: 4px;
  font-size: 13px;
}

.dashboard-trend-tooltip[hidden] {
  display: none !important;
}


/* STEP PORTALE 075 — Login: password dimenticata e pagina reset Supabase Auth */
body[data-page="login"] .auth-login-options{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  margin:-6px 0 2px;
}

body[data-page="login"] .auth-forgot-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  padding:0;
  border:0;
  background:transparent;
  color:#0f7a4f;
  font-size:14px;
  font-weight:900;
  line-height:1;
  cursor:pointer;
  box-shadow:none;
}

body[data-page="login"] .auth-forgot-link:hover{
  color:#0b2f26;
  text-decoration:underline;
  text-underline-offset:4px;
}

body[data-page="login"] .auth-forgot-link:disabled{
  opacity:.62;
  cursor:wait;
  text-decoration:none;
}

body[data-page="reset-password"] .auth-card{
  width:min(560px,100%);
}

body[data-page="reset-password"] .auth-login-logo{
  display:flex;
  justify-content:center;
  align-items:center;
  width:100%;
  margin:0 auto 28px;
  max-width:100%;
  overflow:hidden;
}

body[data-page="reset-password"] .auth-login-logo img{
  display:block;
  width:min(340px,80vw);
  max-width:100%;
  height:auto;
  object-fit:contain;
  filter:drop-shadow(0 18px 34px rgba(11,47,38,.10));
}

body[data-page="reset-password"] .auth-card h1{
  text-align:left;
  margin-top:8px;
}

body[data-page="reset-password"] .auth-card > p{
  text-align:left;
  color:#5f6f67;
  font-weight:700;
}

body[data-page="reset-password"] .auth-back-login-link{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  width:fit-content;
  min-width:210px;
  max-width:100%;
  margin:22px auto 0;
  padding:12px 20px;
  border:1px solid rgba(15,122,79,.28);
  border-radius:15px;
  background:
    radial-gradient(circle at 18% 0%,rgba(31,157,99,.18),transparent 40%),
    linear-gradient(180deg,#ffffff 0%,#eef8f1 100%);
  box-shadow:0 14px 30px rgba(15,122,79,.13);
  color:#0b2f26;
  text-align:center;
  font-weight:950;
  text-decoration:none;
}

body[data-page="reset-password"] .auth-back-login-link:hover{
  transform:translateY(-1px);
  border-color:rgba(15,122,79,.42);
  box-shadow:0 18px 36px rgba(15,122,79,.18);
  color:#0f7a4f;
}

@media(max-width:720px){
  body[data-page="login"] .auth-login-options{
    justify-content:center;
    margin-top:-4px;
  }

  body[data-page="reset-password"] .auth-login-logo img{
    width:min(300px,78vw);
  }

  body[data-page="reset-password"] .auth-back-login-link{
    width:100%;
    min-width:0;
  }
}

/* STEP PORTALE 077 — Dashboard desktop: stati vuoti account senza dati */
.dashboard-empty-action{
  border:0;
  cursor:pointer;
  text-decoration:none;
  font-family:inherit;
}
.dashboard-empty-state-wide{
  min-height:230px;
}
.category-card .donut-layout.is-empty,
.category-card .donut-layout:has(> .dashboard-empty-state-centered),
.recent-card .movement-list-placeholder.is-empty-state{
  display:grid;
  place-items:center;
  min-height:250px;
}
.category-card .donut-layout.is-empty > .dashboard-empty-state-centered,
.category-card .donut-layout > .dashboard-empty-state-centered,
.recent-card .movement-list-placeholder.is-empty-state > .dashboard-empty-state-centered{
  box-sizing:border-box;
  width:min(100%, 360px);
  max-width:360px;
  min-height:220px;
  margin:auto;
}
.dashboard-empty-state-centered.is-categories::before{
  content:"🧾";
}
.dashboard-empty-state-centered.is-movements::before{
  content:"↕";
}
.recent-card .movement-list-placeholder.is-empty-state > div{
  grid-template-columns:1fr;
  gap:10px;
  padding:22px;
  border-bottom:0;
}
@media(max-width:720px){
  .category-card .donut-layout.is-empty > .dashboard-empty-state-centered,
  .category-card .donut-layout > .dashboard-empty-state-centered,
  .recent-card .movement-list-placeholder.is-empty-state > .dashboard-empty-state-centered{
    width:100%;
    max-width:none;
    min-height:210px;
  }
}

/* STEP PORTALE 078 — Dashboard: stato vuoto Spese per categoria a tutta larghezza */
.category-card .donut-layout.is-empty,
.category-card .donut-layout:has(> .dashboard-empty-state-centered.is-categories){
  width:100%;
  display:grid;
  place-items:stretch;
  min-height:300px;
}

.category-card .donut-layout.is-empty > .dashboard-empty-state-centered.is-categories,
.category-card .donut-layout > .dashboard-empty-state-centered.is-categories{
  width:100%;
  max-width:none;
  min-height:280px;
  margin:0;
  align-self:stretch;
  justify-self:stretch;
}

.category-card .dashboard-empty-state-centered.is-categories small{
  max-width:440px;
}

@media(max-width:720px){
  .category-card .donut-layout.is-empty > .dashboard-empty-state-centered.is-categories,
  .category-card .donut-layout > .dashboard-empty-state-centered.is-categories{
    min-height:240px;
  }
}

/* STEP PORTALE 078B — Fix reale: stato vuoto Spese per categoria full width + cache bust */
body[data-page="dashboard"] .category-card .donut-layout.is-empty,
body[data-page="dashboard"] .category-card .donut-layout:has(> .dashboard-empty-state-centered.is-categories){
  display:grid !important;
  grid-template-columns:1fr !important;
  width:100% !important;
  max-width:none !important;
  min-height:300px !important;
  gap:0 !important;
  align-items:stretch !important;
  justify-items:stretch !important;
}

body[data-page="dashboard"] .category-card .donut-layout.is-empty > .dashboard-empty-state-centered.is-categories,
body[data-page="dashboard"] .category-card .donut-layout > .dashboard-empty-state-centered.is-categories{
  box-sizing:border-box !important;
  width:100% !important;
  max-width:none !important;
  min-width:0 !important;
  min-height:280px !important;
  margin:0 !important;
  align-self:stretch !important;
  justify-self:stretch !important;
  padding:28px 34px !important;
}

body[data-page="dashboard"] .category-card .dashboard-empty-state-centered.is-categories small{
  width:100% !important;
  max-width:470px !important;
}

@media(max-width:720px){
  body[data-page="dashboard"] .category-card .donut-layout.is-empty > .dashboard-empty-state-centered.is-categories,
  body[data-page="dashboard"] .category-card .donut-layout > .dashboard-empty-state-centered.is-categories{
    min-height:240px !important;
    padding:22px !important;
  }
}

/* STEP PORTALE 079 — Dashboard: icone e testi Conti e liquidità più vicini */
body[data-page="dashboard"] .accounts-premium-card .premium-account-row{
  grid-template-columns:56px minmax(0,1fr) auto !important;
  gap:8px !important;
  align-items:center !important;
}

body[data-page="dashboard"] .accounts-premium-card .premium-account-row .account-avatar{
  width:52px !important;
  height:52px !important;
  border-radius:16px !important;
  justify-self:start !important;
  font-size:25px !important;
}

body[data-page="dashboard"] .accounts-premium-card .premium-account-row .account-avatar-img{
  display:block !important;
  width:48px !important;
  height:48px !important;
  object-fit:contain !important;
}

body[data-page="dashboard"] .accounts-premium-card .premium-account-row > span:nth-child(2){
  min-width:0 !important;
  margin-left:-1px !important;
}

/* STEP PORTALE 080 — Obiettivi desktop: card più evidenti con bordo e ombra */
.goals-list-card .goal-card {
  border: 1px solid rgba(11, 47, 38, .20) !important;
  background: linear-gradient(180deg, #f2fbf6 0%, #eef9f2 100%) !important;
  box-shadow:
    0 22px 52px rgba(15, 47, 38, .12),
    0 8px 18px rgba(15, 23, 42, .055),
    inset 0 1px 0 rgba(255, 255, 255, .86) !important;
}

.goals-list-card .goal-card.is-completed {
  border-color: rgba(15, 122, 79, .22) !important;
  background: linear-gradient(135deg, #ffffff 0%, #f3fbf7 100%) !important;
  box-shadow:
    0 22px 52px rgba(15, 122, 79, .13),
    0 8px 18px rgba(15, 23, 42, .055),
    inset 0 1px 0 rgba(255, 255, 255, .88) !important;
}


/* STEP PORTALE 081 — Obiettivi desktop: ombra card più solida e meno sfumata */
.goals-list-card .goal-card {
  box-shadow:
    0 9px 0 rgba(11, 47, 38, .075),
    0 14px 0 rgba(15, 122, 79, .035),
    inset 0 1px 0 rgba(255, 255, 255, .88) !important;
}

.goals-list-card .goal-card.is-completed {
  box-shadow:
    0 9px 0 rgba(15, 122, 79, .085),
    0 14px 0 rgba(15, 122, 79, .035),
    inset 0 1px 0 rgba(255, 255, 255, .90) !important;
}


/* STEP PORTALE 086 — Login mobile: recupero password visibile e sfondo verde pieno */
body[data-page="login"]{
  min-height:100vh;
  min-height:100dvh;
  margin:0;
  background:linear-gradient(135deg,var(--color-sidebar-forest),var(--color-header-green)) !important;
  overflow-x:hidden;
  position:relative;
}

body[data-page="login"]::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
  background:linear-gradient(135deg,var(--color-sidebar-forest),var(--color-header-green));
}

body[data-page="login"] > *{
  position:relative;
  z-index:1;
}

body[data-page="login"] .auth-page{
  min-height:100vh;
  min-height:100dvh;
  background:transparent !important;
}

body[data-page="login"] .auth-login-options{
  display:flex !important;
  width:100%;
  justify-content:flex-end;
  align-items:center;
}

body[data-page="login"] .auth-forgot-link{
  display:inline-flex !important;
  visibility:visible !important;
  opacity:1 !important;
  align-items:center;
  justify-content:center;
  min-height:36px;
  color:#0f7a4f !important;
  text-decoration:none;
}

@supports (min-height:100svh){
  body[data-page="login"],
  body[data-page="login"] .auth-page{
    min-height:100svh;
  }
}

@media(max-width:720px){
  body[data-page="login"]{
    background:linear-gradient(135deg,#0b2f26 0%,#0f7a4f 100%) !important;
  }

  body[data-page="login"]::before{
    background:linear-gradient(135deg,#0b2f26 0%,#0f7a4f 100%);
  }

  body[data-page="login"] .auth-page{
    min-height:100vh;
    min-height:100dvh;
    padding:calc(22px + env(safe-area-inset-top,0px)) 18px calc(28px + env(safe-area-inset-bottom,0px));
    place-items:center;
  }

  @supports (min-height:100svh){
    body[data-page="login"] .auth-page{
      min-height:100svh;
    }
  }

  body[data-page="login"] .auth-card{
    margin:0 auto;
  }

  body[data-page="login"] .auth-login-options{
    justify-content:center !important;
    margin:-2px 0 4px !important;
  }

  body[data-page="login"] .auth-forgot-link{
    min-height:38px !important;
    padding:0 10px !important;
    font-size:14px !important;
    font-weight:950 !important;
    line-height:1.1 !important;
  }
}

/* STEP PORTALE 088 / 088B / 088C / 088E — Auth Google desktop su login e registrazione */
.auth-google-button{
  width:100%;
  min-height:60px;
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:14px;
  margin:22px 0 0;
  padding:10px 16px;
  border:1.5px solid #000000;
  border-radius:14px;
  background:#ffffff;
  color:#000000;
  text-align:left;
  box-shadow:5px 5px 0 #000000;
  cursor:pointer;
  transition:transform .18s ease,box-shadow .18s ease;
}

.auth-google-button:hover{
  transform:translate(-1px,-1px);
  box-shadow:6px 6px 0 #000000;
}

.auth-google-button:focus-visible{
  outline:3px solid #000000;
  outline-offset:3px;
}

.auth-google-button:active:not(:disabled):not(.is-loading){
  transform:translate(3px,3px);
  box-shadow:2px 2px 0 #000000;
}

.auth-google-button:disabled,
.auth-google-button.is-loading{
  cursor:wait;
  opacity:.82;
  transform:none;
}

.auth-google-button-visual,
.auth-google-button-tail,
.auth-google-connected-icon{
  width:40px;
  height:40px;
  flex:0 0 40px;
}

.auth-google-button-visual{
  display:grid;
  place-items:center;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}

.auth-google-connected-icon{
  display:grid;
  place-items:center;
  border-radius:12px;
  background:linear-gradient(180deg,#ffffff 0%,#f8fafc 100%);
  border:1px solid rgba(255,255,255,.30);
  box-shadow:0 6px 16px rgba(0,0,0,.16);
}

.auth-google-button-copy{
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:0;
}

.auth-google-button-copy strong{
  color:#000000;
  font-size:18px;
  font-weight:950;
  line-height:1.2;
  letter-spacing:-.01em;
}

.auth-google-logo{
  width:32px;
  height:32px;
  display:block;
}

.auth-provider-divider{
  display:flex;
  align-items:center;
  gap:12px;
  margin:18px 0 2px;
  color:#6b7a72;
  font-size:13px;
  font-weight:850;
  letter-spacing:.01em;
}

.auth-provider-divider::before,
.auth-provider-divider::after{
  content:"";
  height:1px;
  flex:1 1 auto;
  background:rgba(11,47,38,.12);
}

.auth-provider-divider span{
  white-space:nowrap;
}

body[data-page="register"] .auth-google-button-register{
  max-width:520px;
  margin:4px auto 0;
}

body[data-page="register"] .auth-provider-divider-register{
  width:min(520px,100%);
  margin:18px auto 6px;
}

body[data-page="register"] .auth-google-connected{
  display:flex;
  align-items:center;
  gap:13px;
  margin:0 0 18px;
  padding:14px 16px;
  border:1.5px solid rgba(66,133,244,.16);
  border-radius:18px;
  background:linear-gradient(180deg,#ffffff 0%,#f7fafc 100%);
  box-shadow:0 1px 0 rgba(66,133,244,.08),0 12px 28px rgba(11,47,38,.08);
}

body[data-page="register"] .auth-google-connected-icon{
  width:48px;
  height:48px;
  flex-basis:48px;
  position:relative;
  overflow:hidden;
  border-radius:15px;
}

body[data-page="register"] .auth-google-connected-icon.has-google-avatar{
  padding:0;
  background:#ffffff;
  border-color:rgba(11,47,38,.12);
}

body[data-page="register"] .auth-google-connected-icon.has-google-avatar .auth-google-logo{
  display:none;
}

body[data-page="register"] .auth-google-connected-avatar{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  border-radius:inherit;
}

body[data-page="register"] .auth-google-connected-avatar[hidden]{
  display:none !important;
}


body[data-page="register"] .auth-google-connected[hidden]{
  display:none !important;
}

body[data-page="register"] .auth-google-connected strong,
body[data-page="register"] .auth-google-connected small{
  display:block;
}

body[data-page="register"] .auth-google-connected strong{
  color:#0b2f26;
  font-size:15px;
  font-weight:950;
  line-height:1.25;
}

body[data-page="register"] .auth-google-connected small{
  margin-top:2px;
  color:#5f6f67;
  font-size:13px;
  font-weight:850;
  overflow-wrap:anywhere;
}

body[data-page="register"].is-google-registration [data-google-password-field]{
  display:none !important;
}

body[data-page="register"].is-google-registration input[name="email"]{
  color:#425149;
  background:linear-gradient(180deg,#f8fbf9 0%,#eef8f1 100%);
  cursor:not-allowed;
}

body[data-page="register"].is-google-registration .auth-provider-divider-register[hidden],
body[data-page="register"].is-google-registration .auth-google-button-register[hidden]{
  display:none !important;
}
@media(max-width:720px){
  .auth-provider-divider span{
    white-space:normal;
    text-align:center;
  }
}


/* STEP 047 — Admin Famiglie: azioni compatte, no overflow, stato Riattiva */
body[data-page="admin-famiglie"] .admin-family-table{
  min-width:1080px;
  table-layout:auto;
}
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(8),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(8){
  width:248px;
  min-width:248px;
}
body[data-page="admin-famiglie"] .admin-family-actions{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  flex-wrap:nowrap;
  white-space:nowrap;
  max-width:100%;
}
body[data-page="admin-famiglie"] .admin-family-action-btn{
  width:36px;
  height:36px;
  min-width:36px;
  flex:0 0 36px;
  border-radius:13px;
}
body[data-page="admin-famiglie"] .admin-family-action-btn svg{
  width:17px;
  height:17px;
}
body[data-page="admin-famiglie"] .admin-family-action-btn-success{
  color:#0f7a4f;
  border-color:rgba(31,157,99,.24);
  background:rgba(31,157,99,.08);
}
body[data-page="admin-famiglie"] .admin-family-action-btn-danger{
  color:#b42318;
  border-color:rgba(180,35,24,.20);
  background:rgba(180,35,24,.055);
}
@media(max-width:1100px){
  body[data-page="admin-famiglie"] .admin-family-table{min-width:1030px;}
  body[data-page="admin-famiglie"] .admin-family-table th:nth-child(8),
  body[data-page="admin-famiglie"] .admin-family-table td:nth-child(8){width:226px;min-width:226px;}
  body[data-page="admin-famiglie"] .admin-family-actions{gap:6px;}
  body[data-page="admin-famiglie"] .admin-family-action-btn{width:34px;height:34px;min-width:34px;flex-basis:34px;}
}


/* STEP 048 — Admin Famiglie: allarga Stato e sposta Azioni a destra */
body[data-page="admin-famiglie"] .admin-family-table-shell{
  overflow:auto!important;
}
body[data-page="admin-famiglie"] .admin-family-table{
  width:100%!important;
  min-width:1160px!important;
  table-layout:fixed!important;
}
body[data-page="admin-famiglie"] .admin-family-table th,
body[data-page="admin-famiglie"] .admin-family-table td{
  box-sizing:border-box!important;
}
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(1),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(1){width:18%!important;}
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(2),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(2){width:18%!important;}
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(3),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(3){width:10%!important;}
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(4),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(4){width:8%!important;}
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(5),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(5){width:6%!important;}
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(6),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(6){
  width:11%!important;
  min-width:118px!important;
}
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(7),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(7){width:10%!important;}
body[data-page="admin-famiglie"] .admin-family-table th:nth-child(8),
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(8){
  width:19%!important;
  min-width:224px!important;
  text-align:right!important;
}
body[data-page="admin-famiglie"] .admin-family-table td:nth-child(6) .admin-status-chip{
  white-space:nowrap!important;
  min-width:76px!important;
  justify-content:center!important;
}
body[data-page="admin-famiglie"] .admin-family-actions{
  justify-content:flex-end!important;
  margin-left:auto!important;
  gap:8px!important;
}
body[data-page="admin-famiglie"] .admin-family-action-btn{
  width:36px!important;
  height:36px!important;
  min-width:36px!important;
  flex:0 0 36px!important;
}
@media(max-width:1180px){
  body[data-page="admin-famiglie"] .admin-family-table{min-width:1120px!important;}
  body[data-page="admin-famiglie"] .admin-family-table th:nth-child(8),
  body[data-page="admin-famiglie"] .admin-family-table td:nth-child(8){min-width:214px!important;}
}

/* STEP IPAD LANDSCAPE PANORAMICA — dashboard desktop 981–1180px only */
@media (min-width:981px) and (max-width:1180px){
  /* Keep the dashboard sidebar expanded by default. The existing
     .sidebar-collapsed state remains available through its toggle. */
  body[data-page="dashboard"] .app-shell:not(.sidebar-collapsed){
    grid-template-columns:250px minmax(0,1fr)!important;
  }

  body[data-page="dashboard"] .app-shell:not(.sidebar-collapsed) .sidebar[data-global-sidebar]{
    padding:20px 14px;
    align-items:stretch;
    gap:16px;
  }

  body[data-page="dashboard"] .app-shell:not(.sidebar-collapsed) .sidebar[data-global-sidebar] .sidebar-toggle{
    display:grid;
  }

  body[data-page="dashboard"] .app-shell:not(.sidebar-collapsed) .sidebar[data-global-sidebar] .brand.brand-official{
    min-height:52px;
    padding:0 6px;
    justify-content:flex-start;
  }

  body[data-page="dashboard"] .app-shell:not(.sidebar-collapsed) .sidebar[data-global-sidebar] .brand-logo-full{
    display:block!important;
  }

  body[data-page="dashboard"] .app-shell:not(.sidebar-collapsed) .sidebar[data-global-sidebar] .brand-logo-compact{
    display:none!important;
  }

  body[data-page="dashboard"] .app-shell:not(.sidebar-collapsed) .sidebar[data-global-sidebar] .sidebar-nav{
    display:flex;
    flex-direction:column;
    width:100%;
    align-items:stretch;
    gap:3px;
  }

  body[data-page="dashboard"] .app-shell:not(.sidebar-collapsed) .sidebar[data-global-sidebar] .sidebar-link{
    width:auto;
    height:auto;
    min-height:42px;
    padding:9px 12px;
    justify-content:flex-start;
    border-radius:12px;
    white-space:normal;
  }

  body[data-page="dashboard"] .app-shell:not(.sidebar-collapsed) .sidebar[data-global-sidebar] .sidebar-link span:not(.sidebar-icon){
    display:inline!important;
  }

  body[data-page="dashboard"] .app-shell:not(.sidebar-collapsed) .sidebar[data-global-sidebar] .sidebar-icon{
    width:22px;
    min-width:22px;
  }

  body[data-page="dashboard"] .topbar[data-global-topbar]{
    display:grid;
    grid-template-columns:minmax(190px,1fr) auto;
    align-items:center;
    gap:16px;
    padding:16px 18px;
  }

  body[data-page="dashboard"] .topbar-actions{
    display:grid;
    grid-template-columns:repeat(4,max-content);
    align-items:center;
    gap:8px;
    flex-wrap:nowrap;
  }

  body[data-page="dashboard"] .topbar[data-global-topbar] .topbar-pill{
    min-height:40px!important;
    padding:8px 10px!important;
    font-size:13px;
    white-space:nowrap;
  }

  body[data-page="dashboard"] .topbar-notification,
  body[data-page="dashboard"] .profile-avatar{
    width:40px;
    height:40px;
  }

  body[data-page="dashboard"] .premium-fab,
  body[data-page="dashboard"] .fab{
    right:28px;
    bottom:28px;
    left:auto;
    width:68px;
    height:68px;
    border-radius:50%;
    font-size:44px;
    line-height:1;
  }

  body[data-page="dashboard"] .dashboard-content{
    padding-bottom:132px;
  }
}

/* STEP IPAD LANDSCAPE 002 — Rifinitura azioni topbar Dashboard (981–1180px) */
@media (min-width:981px) and (max-width:1180px){
  body[data-page="dashboard"] .topbar[data-global-topbar]{
    grid-template-columns:minmax(0,1fr) auto;
  }

  /* Nasconde esclusivamente l'azione suggerimenti: la data resta disponibile. */
  body[data-page="dashboard"] .topbar-actions .topbar-pill-primary{
    display:none!important;
  }

  body[data-page="dashboard"] .topbar-actions{
    min-width:0;
    grid-template-columns:max-content 40px minmax(0,max-content);
    align-items:center;
  }

  body[data-page="dashboard"] .topbar-profile-wrap,
  body[data-page="dashboard"] .topbar-profile-wrap .topbar-profile{
    min-width:0;
    min-height:40px;
    height:40px;
    align-items:center;
  }

  body[data-page="dashboard"] .topbar-profile-text{
    min-width:0;
    max-width:112px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  body[data-page="dashboard"] .topbar-profile-arrow{
    flex:0 0 28px;
  }

  body[data-page="dashboard"] .topbar-notification,
  body[data-page="dashboard"] .profile-avatar{
    flex:0 0 40px;
  }

  body[data-page="dashboard"] .premium-fab,
  body[data-page="dashboard"] .fab{
    width:68px!important;
    min-width:68px!important;
    max-width:68px!important;
    flex-basis:68px!important;
    height:68px!important;
    min-height:68px!important;
    max-height:68px!important;
    aspect-ratio:1 / 1;
    border-radius:50%!important;
    display:grid;
    place-items:center;
    padding:0;
    right:28px;
    bottom:28px;
  }
}


/* STEP IPAD LANDSCAPE 003 - sidebar chiusa verticale (981-1180px) */
@media (min-width:981px) and (max-width:1180px){
  body[data-page="dashboard"] .app-shell.sidebar-collapsed .sidebar[data-global-sidebar] .sidebar-nav{
    display:flex!important;
    grid-template-columns:none!important;
    flex-direction:column!important;
    flex-wrap:nowrap!important;
    align-items:center!important;
    justify-content:flex-start!important;
    width:100%!important;
  }

  body[data-page="dashboard"] .app-shell.sidebar-collapsed .sidebar[data-global-sidebar] .sidebar-link{
    width:48px!important;
    flex:0 0 48px!important;
  }
}

/* STEP IPAD LANDSCAPE 004 - campanella centrata (981-1180px) */
@media (min-width:981px) and (max-width:1180px){
  body[data-page="dashboard"] .topbar-notification{
    display:grid!important;
    place-items:center!important;
    padding:0!important;
    line-height:1!important;
  }
}

/* STEP IPAD TABLET 001 - layout portale condiviso (981-1180px) */
@media (min-width:981px) and (max-width:1180px){
  /* Sidebar chiusa: tutte le aree Desktop mantengono una sola colonna di icone. */
  body:not([data-page="app"]) .app-shell.sidebar-collapsed .sidebar[data-global-sidebar] .sidebar-nav{
    display:flex!important;
    grid-template-columns:none!important;
    flex-direction:column!important;
    flex-wrap:nowrap!important;
    align-items:center!important;
    justify-content:flex-start!important;
    width:100%!important;
  }

  body:not([data-page="app"]) .app-shell.sidebar-collapsed .sidebar[data-global-sidebar] .sidebar-link{
    width:48px!important;
    min-width:48px!important;
    max-width:48px!important;
    height:48px!important;
    min-height:48px!important;
    flex:0 0 48px!important;
  }

  /* Topbar condivisa: contenuta, con campanella e profilo allineati. */
  body:not([data-page="app"]) .topbar[data-global-topbar]{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:center!important;
    gap:16px!important;
    padding:16px 18px!important;
  }

  body:not([data-page="app"]) .topbar[data-global-topbar] .topbar-copy{
    min-width:0;
  }

  body:not([data-page="app"]) .topbar[data-global-topbar] .topbar-copy h1,
  body:not([data-page="app"]) .topbar[data-global-topbar] .topbar-copy > p{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  body:not([data-page="app"]) .topbar-actions{
    display:flex!important;
    min-width:0;
    flex-wrap:nowrap!important;
    align-items:center!important;
    gap:8px!important;
  }

  body:not([data-page="app"]) .topbar-actions .topbar-pill{
    min-height:40px!important;
    padding:8px 10px!important;
    max-width:132px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  body:not([data-page="app"]) .topbar-notification,
  body:not([data-page="app"]) .profile-avatar{
    width:40px!important;
    min-width:40px!important;
    height:40px!important;
    min-height:40px!important;
    flex:0 0 40px!important;
  }

  body:not([data-page="app"]) .topbar-notification{
    display:grid!important;
    place-items:center!important;
    padding:0!important;
    line-height:1!important;
  }

  body:not([data-page="app"]) .topbar-profile-wrap,
  body:not([data-page="app"]) .topbar-profile-wrap .topbar-profile{
    display:flex!important;
    min-width:0;
    min-height:40px!important;
    height:40px!important;
    align-items:center!important;
  }

  body:not([data-page="app"]) .topbar-profile-text{
    min-width:0;
    max-width:106px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  body:not([data-page="app"]) .topbar-profile-arrow{
    flex:0 0 28px!important;
  }
}

/* STEP IPAD TABLET 002 - sidebar aperta verticale globale (981-1180px) */
@media (min-width:981px) and (max-width:1180px){
  /* Sidebar aperta: neutralizza la griglia a due colonne sotto 1100 px. */
  body:not([data-page="app"]) .app-shell:not(.sidebar-collapsed) .sidebar[data-global-sidebar] .sidebar-nav{
    display:flex!important;
    grid-template-columns:none!important;
    flex-direction:column!important;
    flex-wrap:nowrap!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    width:100%!important;
    gap:3px!important;
  }

  body:not([data-page="app"]) .app-shell:not(.sidebar-collapsed) .sidebar[data-global-sidebar] .sidebar-link{
    width:100%!important;
    min-width:0!important;
    min-height:42px!important;
    height:auto!important;
    flex:0 0 auto!important;
    padding:9px 12px!important;
    justify-content:flex-start!important;
    white-space:normal!important;
  }

  body:not([data-page="app"]) .app-shell:not(.sidebar-collapsed) .sidebar[data-global-sidebar] .sidebar-link span:not(.sidebar-icon){
    display:inline!important;
  }
}

/* STEP BUDGET IPAD TABLET 001 - contenimento Bilancio (981-1180px) */
@media (min-width:981px) and (max-width:1180px){
  body[data-page="bilancio"] .main-area,
  body[data-page="bilancio"] .content-area,
  body[data-page="bilancio"] .budget-page{
    min-width:0!important;
    max-width:100%!important;
  }

  /* Le tre KPI restano nel canvas dell'iPad, senza comprimere o uscire. */
  body[data-page="bilancio"] .budget-summary-grid{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:12px!important;
    min-width:0!important;
  }

  body[data-page="bilancio"] .budget-summary-card{
    min-width:0!important;
    min-height:136px!important;
    padding:18px 16px!important;
  }

  body[data-page="bilancio"] .budget-summary-card strong{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    font-size:clamp(24px,3vw,32px)!important;
  }

  /* Solo la tabella, non la pagina, può scorrere in orizzontale. */
  body[data-page="bilancio"] .budget-table-card{
    min-width:0!important;
    max-width:100%!important;
    overflow:hidden!important;
  }

  body[data-page="bilancio"] .budget-table-wrap{
    width:100%!important;
    max-width:100%!important;
    overflow-x:auto!important;
    overscroll-behavior-x:contain;
  }

  body[data-page="bilancio"] .budget-table{
    min-width:940px!important;
  }

  /* Budget usa la stessa geometria della topbar già valida nelle altre aree. */
  body[data-page="bilancio"] .topbar-notification-wrap{
    display:flex!important;
    align-items:center!important;
    width:40px!important;
    height:40px!important;
    flex:0 0 40px!important;
  }

  body[data-page="bilancio"] .topbar-notification{
    display:grid!important;
    place-items:center!important;
    width:40px!important;
    height:40px!important;
    min-width:40px!important;
    min-height:40px!important;
    margin:0!important;
    padding:0!important;
    line-height:1!important;
  }
}

/* STEP FAB GLOBALE IPAD TABLET 001 - pulsante + circolare (981-1180px) */
@media (min-width:981px) and (max-width:1180px){
  body:not([data-page="app"]) .fab,
  body:not([data-page="app"]) .premium-fab{
    width:68px!important;
    min-width:68px!important;
    max-width:68px!important;
    height:68px!important;
    min-height:68px!important;
    max-height:68px!important;
    flex:0 0 68px!important;
    aspect-ratio:1 / 1!important;
    border-radius:50%!important;
    display:grid!important;
    place-items:center!important;
    padding:0!important;
    line-height:1!important;
    right:28px!important;
    bottom:28px!important;
    left:auto!important;
  }
}

/* STEP MOVIMENTI KPI IPAD TABLET 001 - tre KPI su una riga (981-1180px) */
.trial-lifecycle-banner{
  display:flex;
  align-items:center;
  gap:12px;
  margin:0 32px 18px;
  padding:13px 16px;
  border:1px solid rgba(191,123,0,.28);
  border-radius:14px;
  background:linear-gradient(100deg,#fff8df,#fffdf5);
  color:#684900;
  box-shadow:0 8px 20px rgba(104,73,0,.08);
}
.trial-lifecycle-banner-icon{font-size:20px;color:#b77800;}
.trial-lifecycle-banner div{display:grid;gap:3px;flex:1;min-width:0;}
.trial-lifecycle-banner strong{font-size:14px;line-height:1.25;}
.trial-lifecycle-banner span:not(.trial-lifecycle-banner-icon){font-size:13px;line-height:1.35;}
.trial-lifecycle-banner a{flex:0 0 auto;color:#075c42;font-size:13px;font-weight:800;text-decoration:none;}
.trial-lifecycle-banner a:hover{text-decoration:underline;}
@media (max-width:700px){.trial-lifecycle-banner{margin:0 16px 14px;align-items:flex-start;}.trial-lifecycle-banner a{padding-top:2px;}}

/* STEP MOVIMENTI KPI IPAD TABLET 001 - tre KPI su una riga (981-1180px) */
@media (min-width:981px) and (max-width:1180px){
  body[data-page="movimenti"] .movements-summary-grid{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:12px!important;
    min-width:0!important;
  }

  body[data-page="movimenti"] .movement-summary-card{
    min-width:0!important;
    min-height:126px!important;
    padding:18px 16px!important;
  }

  body[data-page="movimenti"] .movement-summary-card strong{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:clamp(24px,2.65vw,32px)!important;
  }
}

/* STEP BUDGET IPAD UX 001 - guida scroll e colonne ancorate (981-1180px) */
@media (min-width:981px) and (max-width:1180px){
  body[data-page="bilancio"] .budget-table-wrap{
    position:relative!important;
    isolation:isolate;
  }

  /* La categoria e l'azione restano sempre disponibili durante lo scroll. */
  body[data-page="bilancio"] .budget-table thead th:first-child,
  body[data-page="bilancio"] .budget-table tbody td:first-child{
    position:sticky!important;
    left:0;
    z-index:4;
    background:#fff!important;
    box-shadow:10px 0 14px -14px rgba(11,47,38,.52);
  }

  body[data-page="bilancio"] .budget-table thead th:last-child,
  body[data-page="bilancio"] .budget-table tbody td:last-child{
    position:sticky!important;
    right:0;
    z-index:5;
    background:#fff!important;
    box-shadow:-10px 0 14px -14px rgba(11,47,38,.52);
  }

  body[data-page="bilancio"] .budget-table thead th:first-child,
  body[data-page="bilancio"] .budget-table thead th:last-child{
    z-index:7;
    background:#f8fbf8!important;
  }
}


/* STEP PORTALE 089 — Registrazione mobile: Google su una riga + blocco overflow orizzontale intermittente */
@media (max-width:720px){
  html.page-register,
  html.page-register body[data-page="register"]{
    width:100%;
    max-width:100%;
    overflow-x:hidden !important;
  }

  @supports (overflow:clip){
    html.page-register,
    html.page-register body[data-page="register"]{
      overflow-x:clip !important;
    }
  }

  html.page-register body[data-page="register"] .auth-page-onboarding,
  html.page-register body[data-page="register"] .auth-card-onboarding,
  html.page-register body[data-page="register"] .auth-register-head,
  html.page-register body[data-page="register"] .auth-wizard-strip,
  html.page-register body[data-page="register"] .auth-register-form,
  html.page-register body[data-page="register"] .auth-form-section,
  html.page-register body[data-page="register"] .auth-form-grid,
  html.page-register body[data-page="register"] .auth-register-actions,
  html.page-register body[data-page="register"] .auth-provider-divider-register,
  html.page-register body[data-page="register"] .auth-google-button-register{
    min-width:0 !important;
    max-width:100% !important;
    box-sizing:border-box;
  }

  html.page-register body[data-page="register"] .auth-google-button-register{
    width:100%;
    grid-template-columns:34px minmax(0,1fr);
    gap:10px;
    padding:10px 14px;
  }

  html.page-register body[data-page="register"] .auth-google-button-register .auth-google-button-visual{
    width:34px;
    height:34px;
  }

  html.page-register body[data-page="register"] .auth-google-button-register .auth-google-logo{
    width:30px;
    height:30px;
  }

  html.page-register body[data-page="register"] .auth-google-button-register .auth-google-button-copy{
    min-width:0;
    justify-content:center;
    overflow:visible;
  }

  html.page-register body[data-page="register"] .auth-google-button-register .auth-google-button-copy strong{
    display:block;
    min-width:0;
    white-space:nowrap;
    overflow:visible;
    font-size:17px;
    line-height:1.15;
    letter-spacing:-.02em;
  }

  html.page-register body[data-page="register"] .auth-google-button-register .auth-google-button-tail{
    display:none;
  }

  html.page-register body[data-page="register"] .auth-google-button-register:active:not(:disabled):not(.is-loading){
    transform:translateY(2px);
    box-shadow:3px 3px 0 #000000;
  }
}

@media (max-width:360px){
  html.page-register body[data-page="register"] .auth-google-button-register{
    grid-template-columns:30px minmax(0,1fr);
    gap:8px;
    padding-left:11px;
    padding-right:11px;
  }

  html.page-register body[data-page="register"] .auth-google-button-register .auth-google-button-copy strong{
    font-size:16px;
  }
}


/* STEP PORTALE 090 — Login mobile: Google su una sola riga + protezione overflow */
@media (max-width:720px){
  html.page-login,
  html.page-login body[data-page="login"]{
    width:100%;
    max-width:100%;
    overflow-x:hidden !important;
  }

  @supports (overflow:clip){
    html.page-login,
    html.page-login body[data-page="login"]{
      overflow-x:clip !important;
    }
  }

  html.page-login body[data-page="login"] .auth-page,
  html.page-login body[data-page="login"] .auth-card,
  html.page-login body[data-page="login"] .auth-google-button,
  html.page-login body[data-page="login"] .auth-google-button-copy,
  html.page-login body[data-page="login"] .form-stack,
  html.page-login body[data-page="login"] label,
  html.page-login body[data-page="login"] input{
    min-width:0 !important;
    max-width:100% !important;
    box-sizing:border-box;
  }

  html.page-login body[data-page="login"] .auth-google-button{
    width:100%;
    grid-template-columns:34px minmax(0,1fr);
    gap:10px;
    padding:10px 14px;
  }

  html.page-login body[data-page="login"] .auth-google-button-visual{
    width:34px;
    height:34px;
  }

  html.page-login body[data-page="login"] .auth-google-logo{
    width:30px;
    height:30px;
  }

  html.page-login body[data-page="login"] .auth-google-button-copy{
    justify-content:center;
    overflow:visible;
  }

  html.page-login body[data-page="login"] .auth-google-button-copy strong{
    display:block;
    min-width:0;
    white-space:nowrap;
    overflow:visible;
    font-size:17px;
    line-height:1.15;
    letter-spacing:-.02em;
  }

  html.page-login body[data-page="login"] .auth-google-button-tail{
    display:none;
  }

  html.page-login body[data-page="login"] .auth-google-button:active:not(:disabled):not(.is-loading){
    transform:translateY(2px);
    box-shadow:3px 3px 0 #000000;
  }
}

@media (max-width:360px){
  html.page-login body[data-page="login"] .auth-google-button{
    grid-template-columns:30px minmax(0,1fr);
    gap:8px;
    padding-left:11px;
    padding-right:11px;
  }

  html.page-login body[data-page="login"] .auth-google-button-copy strong{
    font-size:16px;
  }
}

/* ============================================================
   HOTFIX v7.221 — riallineamento layout.js reale / CSS globale
   Ripristina dimensionamento e comportamento di:
   - banner editoriali Guide/Magazine nella sidebar
   - menu editoriali Guide/Magazine nella topbar
   - controlli Dashboard separati dalla topbar
   Nessuna modifica alla struttura o alla logica JavaScript.
   ============================================================ */

/* Sidebar — banner editoriali */
.sidebar[data-global-sidebar] .sidebar-editorial-banners{
  width:100%;
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:10px;
  margin:2px 0 0;
  padding:0 2px 4px;
  flex:0 0 auto;
}

.sidebar[data-global-sidebar] .sidebar-editorial-banner{
  display:block;
  width:100%;
  max-width:218px;
  margin:0 auto;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.14);
  border-radius:16px;
  background:rgba(255,255,255,.06);
  box-shadow:0 14px 28px rgba(0,0,0,.18);
  line-height:0;
  transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease;
}

.sidebar[data-global-sidebar] .sidebar-editorial-banner:hover,
.sidebar[data-global-sidebar] .sidebar-editorial-banner:focus-visible{
  transform:translateY(-2px);
  border-color:rgba(135,231,184,.44);
  box-shadow:0 18px 34px rgba(0,0,0,.24);
  outline:none;
}

.sidebar[data-global-sidebar] .sidebar-editorial-banner img{
  display:block;
  width:100%;
  height:auto;
  max-width:100%;
  object-fit:cover;
}

.sidebar[data-global-sidebar] .sidebar-editorial-divider{
  width:72%;
  height:1px;
  margin:0 auto;
  background:linear-gradient(90deg,transparent,rgba(135,231,184,.34),transparent);
}

/* Nella sidebar chiusa i banner non devono occupare o debordare. */
.app-shell.sidebar-collapsed .sidebar[data-global-sidebar] .sidebar-editorial-banners{
  display:none!important;
}

/* Topbar — gruppo editoriale */
.topbar[data-global-topbar] .topbar-actions{
  position:relative;
  flex-wrap:nowrap;
  justify-content:flex-end;
  min-width:0;
}

.topbar-editorial-menus{
  display:flex;
  align-items:center;
  gap:8px;
  flex:0 0 auto;
  position:relative;
}

.topbar-editorial-menu{
  position:relative;
  flex:0 0 auto;
}

.topbar-editorial-trigger{
  min-height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:9px 12px;
  border:1px solid rgba(255,255,255,.22);
  border-radius:12px;
  background:rgba(0,0,0,.12);
  color:#fff;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08);
  font:inherit;
  font-size:14px;
  font-weight:780;
  line-height:1;
  white-space:nowrap;
  cursor:pointer;
  transition:background .18s ease,border-color .18s ease,transform .18s ease;
}

.topbar-editorial-trigger:hover,
.topbar-editorial-menu.is-open .topbar-editorial-trigger{
  background:rgba(255,255,255,.18);
  border-color:rgba(255,255,255,.34);
}

.topbar-editorial-trigger:focus-visible{
  outline:3px solid rgba(255,255,255,.24);
  outline-offset:2px;
}

.topbar-editorial-menu-icon{
  width:22px;
  height:22px;
  min-width:22px;
  display:inline-grid;
  place-items:center;
  overflow:hidden;
  flex:0 0 22px;
}

.topbar-editorial-menu-icon img{
  display:block;
  width:22px!important;
  height:22px!important;
  max-width:22px!important;
  max-height:22px!important;
  object-fit:contain;
}

.topbar-editorial-chevron{
  width:14px;
  height:14px;
  flex:0 0 14px;
  fill:none;
  stroke:currentColor;
  stroke-width:2.2;
  stroke-linecap:round;
  stroke-linejoin:round;
  transition:transform .18s ease;
}

.topbar-editorial-menu.is-open .topbar-editorial-chevron{
  transform:rotate(180deg);
}

/* Dropdown Guide / Magazine */
.topbar-editorial-menu-panel{
  position:absolute;
  z-index:150;
  top:calc(100% + 12px);
  right:0;
  width:min(590px,calc(100vw - 330px));
  min-width:480px;
  padding:20px;
  border:1px solid rgba(15,122,79,.16);
  border-radius:20px;
  background:#fff;
  color:#0b2f26;
  box-shadow:0 24px 60px rgba(6,31,25,.24);
  text-align:left;
}

.topbar-editorial-menu-panel[hidden]{
  display:none!important;
}

.topbar-editorial-menu-panel::before{
  content:"";
  position:absolute;
  top:-7px;
  right:26px;
  width:14px;
  height:14px;
  background:#fff;
  border-left:1px solid rgba(15,122,79,.16);
  border-top:1px solid rgba(15,122,79,.16);
  transform:rotate(45deg);
}

.topbar-editorial-menu-eyebrow{
  margin:0 0 5px!important;
  color:#139b4e!important;
  font-size:11px!important;
  font-weight:850;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.topbar-editorial-menu-title{
  margin:0 0 16px!important;
  color:#0b2f26!important;
  font-size:18px!important;
  font-weight:850;
  line-height:1.25;
}

.topbar-editorial-menu-columns{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:8px 18px;
}

.topbar-editorial-menu-links,
.topbar-editorial-menu-side-links{
  display:grid;
  gap:6px;
  align-content:start;
}

.topbar-editorial-category-link{
  min-width:0;
  display:flex;
  align-items:center;
  gap:9px;
  min-height:42px;
  padding:8px 10px;
  border-radius:12px;
  color:#163f34;
  font-size:14px;
  font-weight:650;
  line-height:1.2;
  transition:background .16s ease,color .16s ease,transform .16s ease;
}

.topbar-editorial-category-link:hover,
.topbar-editorial-category-link:focus-visible{
  background:#edf8f1;
  color:#0f7a4f;
  transform:translateX(2px);
  outline:none;
}

.topbar-editorial-category-link .topbar-editorial-menu-icon{
  width:24px;
  height:24px;
  min-width:24px;
  flex-basis:24px;
}

.topbar-editorial-category-link .topbar-editorial-menu-icon img{
  width:24px!important;
  height:24px!important;
  max-width:24px!important;
  max-height:24px!important;
}

.topbar-editorial-menu-all{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-top:14px;
  padding:12px 14px;
  border-radius:13px;
  background:#0f7a4f;
  color:#fff;
  font-size:14px;
  font-weight:800;
}

.topbar-editorial-menu-all:hover,
.topbar-editorial-menu-all:focus-visible{
  background:#0b6542;
  color:#fff;
  outline:none;
}

/* Dashboard — i due controlli sono generati sotto la topbar da layout.js. */
.dashboard-topbar-controls{
  display:flex;
  align-items:center;
  gap:10px;
  padding:0 28px;
  margin-top:-1px;
  min-height:58px;
  background:linear-gradient(180deg,#0b6d48 0%,#0a5d3f 100%);
  border-top:1px solid rgba(255,255,255,.08);
  border-bottom:1px solid rgba(5,54,38,.16);
  box-shadow:0 10px 22px rgba(9,91,58,.10);
}

.dashboard-topbar-controls .topbar-pill{
  min-height:40px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:9px 14px;
  border:1px solid rgba(255,255,255,.20);
  border-radius:12px;
  background:rgba(255,255,255,.10);
  color:#fff;
  font-size:14px;
  font-weight:760;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08);
}

.dashboard-topbar-controls .topbar-pill:hover{
  background:rgba(255,255,255,.17);
}

.dashboard-month-arrow{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:24px;
  height:24px;
  border-radius:50%;
  background:#fff;
  color:#0f7a4f;
  font-size:17px;
  line-height:1;
}

/* Layout intermedio: mantieni la topbar ordinata senza far crescere i menu. */
@media(max-width:1240px) and (min-width:981px){
  .topbar[data-global-topbar]{
    padding-left:22px;
    padding-right:22px;
    gap:14px;
  }

  .topbar[data-global-topbar] .topbar-actions{
    gap:8px;
  }

  .topbar-editorial-trigger{
    padding:9px 10px;
    font-size:13px;
  }

  .topbar-editorial-trigger .topbar-editorial-menu-icon{
    width:20px;
    height:20px;
    min-width:20px;
    flex-basis:20px;
  }

  .topbar-editorial-trigger .topbar-editorial-menu-icon img{
    width:20px!important;
    height:20px!important;
    max-width:20px!important;
    max-height:20px!important;
  }

  .topbar-profile-text{
    display:none;
  }
}

@media(max-width:980px){
  .sidebar[data-global-sidebar] .sidebar-editorial-banners{
    display:none!important;
  }

  .topbar[data-global-topbar] .topbar-actions{
    flex-wrap:wrap;
    justify-content:flex-start;
  }

  .topbar-editorial-menus{
    order:1;
    width:auto;
  }

  .topbar-editorial-menu-panel{
    position:fixed;
    top:96px;
    left:18px;
    right:18px;
    width:auto;
    min-width:0;
    max-height:calc(100vh - 120px);
    overflow:auto;
  }

  .topbar-editorial-menu-panel::before{
    display:none;
  }

  .dashboard-topbar-controls{
    padding:10px 18px;
    min-height:0;
    flex-wrap:wrap;
  }
}

@media(max-width:640px){
  .topbar-editorial-menus{
    width:100%;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .topbar-editorial-trigger{
    width:100%;
    min-width:0;
  }

  .topbar-editorial-menu-columns{
    grid-template-columns:1fr;
  }

  .dashboard-topbar-controls .topbar-pill{
    flex:1 1 100%;
  }
}

/* ============================================================
   v7.222 — Dashboard topbar spacing + controlli su fondo chiaro
   + rifinitura mega menu editoriale
   ============================================================ */

/* Il banner Trial deve respirare rispetto alla topbar verde. */
.trial-lifecycle-banner{
  margin-top:18px!important;
  margin-bottom:12px!important;
}

/* Dashboard: i controlli mese/suggerimenti stanno nel fondo chiaro,
   subito sopra le KPI e allineati a destra. */
body[data-page="dashboard"] .dashboard-topbar-controls{
  justify-content:flex-end!important;
  min-height:0!important;
  margin:0!important;
  padding:4px 34px 8px!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}

body[data-page="dashboard"] .dashboard-topbar-controls .topbar-pill{
  min-height:42px!important;
  padding:9px 14px!important;
  border:1px solid rgba(15,122,79,.18)!important;
  border-radius:13px!important;
  background:#fff!important;
  color:#0b5f43!important;
  box-shadow:0 8px 20px rgba(11,47,38,.07)!important;
  cursor:pointer!important;
}

body[data-page="dashboard"] .dashboard-topbar-controls .topbar-pill:hover,
body[data-page="dashboard"] .dashboard-topbar-controls .topbar-pill:focus-visible{
  background:#f4fbf6!important;
  border-color:rgba(15,122,79,.32)!important;
  color:#075c42!important;
}

body[data-page="dashboard"] .dashboard-topbar-controls .dashboard-month-arrow{
  background:#eef8f2!important;
  color:#0f7a4f!important;
  border:1px solid rgba(15,122,79,.12);
}

/* Riduce il vuoto tra i controlli e la prima riga KPI. */
body[data-page="dashboard"] .content-area.dashboard-content{
  padding-top:12px!important;
}

/* Mega menu: due colonne realmente simmetriche da tre voci. */
.topbar-editorial-menu-columns{
  align-items:start;
  column-gap:24px;
}

.topbar-editorial-menu-links,
.topbar-editorial-menu-side-links{
  grid-template-rows:repeat(3,minmax(42px,auto));
}

@media(max-width:980px){
  .trial-lifecycle-banner{
    margin-top:14px!important;
  }

  body[data-page="dashboard"] .dashboard-topbar-controls{
    justify-content:flex-end!important;
    padding:4px 18px 8px!important;
    background:transparent!important;
  }

  body[data-page="dashboard"] .content-area.dashboard-content{
    padding-top:10px!important;
  }
}

@media(max-width:640px){
  .topbar-editorial-menu-links,
  .topbar-editorial-menu-side-links{
    grid-template-rows:none;
  }

  body[data-page="dashboard"] .dashboard-topbar-controls{
    justify-content:stretch!important;
  }
}


/* STEP BUDGET MENSILE DESKTOP 001 — selettore mese + indicazione modale */
body[data-page="bilancio"] .budget-month-toolbar{
  order:0;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:12px;
  width:100%;
  min-width:0;
}

body[data-page="bilancio"] .budget-month-toolbar .budget-month-box{
  display:grid;
  grid-template-columns:46px minmax(168px,1fr) 46px;
  align-items:center;
  gap:9px;
  width:auto;
  min-width:330px;
  max-width:100%;
  padding:8px;
  border-radius:16px;
}

body[data-page="bilancio"] .budget-month-toolbar .budget-month-box strong{
  min-width:0;
  font-size:17px;
  font-weight:850;
  overflow:hidden;
  text-overflow:ellipsis;
}

body[data-page="bilancio"] .budget-month-toolbar .budget-month-arrow{
  width:42px;
  height:42px;
  min-width:42px;
  border-radius:11px;
}

body[data-page="bilancio"] .budget-month-toolbar .budget-month-current{
  grid-column:auto;
  min-height:44px;
  padding:0 16px;
  border-radius:11px;
  white-space:nowrap;
  font-size:14px;
  font-weight:850;
}

body[data-page="bilancio"] .budget-modal-month{
  margin:5px 0 0!important;
  color:#0f7a4f!important;
  font-size:13px!important;
  font-weight:850!important;
}

@media (max-width:760px){
  body[data-page="bilancio"] .budget-month-toolbar{
    align-items:stretch;
    flex-direction:column;
    gap:9px;
  }

  body[data-page="bilancio"] .budget-month-toolbar .budget-month-box{
    width:100%;
    min-width:0;
    grid-template-columns:42px minmax(0,1fr) 42px;
  }

  body[data-page="bilancio"] .budget-month-toolbar .budget-month-arrow{
    width:40px;
    height:40px;
    min-width:40px;
  }

  body[data-page="bilancio"] .budget-month-toolbar .budget-month-current{
    width:100%;
  }
}


/* FAMYRO DESKTOP BUDGET — KPI identiche alla PWA */
body[data-page="bilancio"] .budget-summary-planned{
  background: linear-gradient(145deg, #176cb6 0%, #12558f 100%);
}

body[data-page="bilancio"] .budget-summary-spent{
  background: linear-gradient(145deg, #df6a3e 0%, #b9472f 100%);
}

body[data-page="bilancio"] .budget-summary-left{
  background: linear-gradient(145deg, #12935c 0%, #087247 100%);
}

body[data-page="bilancio"] .budget-summary-card span{
  color: rgba(255,255,255,.90);
}

body[data-page="bilancio"] .budget-summary-card strong{
  color: #fff;
  white-space: nowrap;
}

/* ============================================================
   DESKTOP ESPLORA RISORSE 001 — menu editoriale unificato
   ============================================================ */
.topbar-editorial-resources-panel{
  width:min(650px,calc(100vw - 330px));
  min-width:560px;
  padding:22px;
}

.topbar-editorial-resources-panel .topbar-editorial-menu-title{
  margin:0 0 6px!important;
  color:#0b2f26!important;
  font-size:20px!important;
  font-weight:850;
  line-height:1.2;
}

.topbar-editorial-menu-description{
  margin:0 0 18px!important;
  max-width:560px;
  color:#5c746c!important;
  font-size:14px!important;
  font-weight:560;
  line-height:1.5;
}

.topbar-editorial-resource-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}

.topbar-editorial-resource-card{
  min-width:0;
  min-height:146px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:12px;
  padding:15px;
  border:1px solid rgba(15,122,79,.13);
  border-radius:15px;
  background:#f8fcf9;
  color:#163f34;
  box-shadow:0 7px 18px rgba(11,47,38,.045);
  transition:background .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease;
}

.topbar-editorial-resource-card:hover,
.topbar-editorial-resource-card:focus-visible{
  background:#edf8f1;
  border-color:rgba(15,122,79,.28);
  color:#0f6f49;
  box-shadow:0 10px 24px rgba(11,47,38,.09);
  transform:translateY(-2px);
  outline:none;
}

.topbar-editorial-resource-card:focus-visible{
  outline:3px solid rgba(15,122,79,.18);
  outline-offset:2px;
}

.topbar-editorial-resource-icon{
  width:36px;
  height:36px;
  min-width:36px;
  display:grid;
  place-items:center;
  border-radius:10px;
  background:#eaf6ee;
  overflow:hidden;
  color:#0f7a4f;
}

.topbar-editorial-resource-icon img{
  display:block;
  width:28px!important;
  height:28px!important;
  max-width:28px!important;
  max-height:28px!important;
  object-fit:contain;
}

.topbar-editorial-resource-icon-svg svg{
  width:24px;
  height:24px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.topbar-editorial-resource-copy{
  min-width:0;
  display:grid;
  gap:5px;
}

.topbar-editorial-resource-copy strong{
  color:#0b2f26;
  font-size:15px;
  font-weight:850;
  line-height:1.2;
}

.topbar-editorial-resource-copy small{
  color:#5c746c;
  font-size:12.5px;
  font-weight:560;
  line-height:1.4;
}

@media(max-width:1240px) and (min-width:981px){
  .topbar-editorial-resources-panel{
    width:min(610px,calc(100vw - 280px));
    min-width:540px;
  }

  .topbar-editorial-resource-card{
    min-height:142px;
    padding:13px;
  }
}

/* Sotto la soglia desktop il nuovo mega menu non viene introdotto. */
@media(max-width:980px){
  .topbar-editorial-menus{
    display:none!important;
  }
}

/* DASHBOARD_KPI_ROW_COMPACT001 — Dashboard desktop: 4 KPI compatte su una riga tra 1101px e 1380px */
@media (min-width: 1101px) and (max-width: 1380px) {
  body[data-page="dashboard"] .dashboard-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body[data-page="dashboard"] .dashboard-kpi-card {
    position: relative;
    display: block;
    min-height: 142px;
    padding: 20px 16px;
  }

  body[data-page="dashboard"] .dashboard-kpi-card > div:last-child {
    min-width: 0;
  }

  body[data-page="dashboard"] .dashboard-kpi-card strong {
    font-size: clamp(25px, 2.1vw, 30px);
    line-height: 1.05;
    letter-spacing: -0.055em;
    white-space: nowrap;
  }

  body[data-page="dashboard"] .kpi-icon-bubble {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  body[data-page="dashboard"] .dashboard-kpi-card span {
    padding-right: 42px;
    font-size: 14px;
  }

  body[data-page="dashboard"] .dashboard-kpi-card small {
    font-size: 13px;
    line-height: 1.3;
  }
}
