/* ============================================================
   HelmSpring — Design System
   Brand kit v1.0 · Aurora palette · Sora
   ============================================================ */
:root {
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --gap: 16px;
  --sidebar-w: 266px;
  --font: "Sora", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SF Mono", "Cascadia Code", Consolas, monospace;
  --transition: 160ms cubic-bezier(.4,0,.2,1);

  /* ---- HelmSpring brand ---- */
  --brand-helm: #4F8BFF;
  --brand-spring: #FF5F9E;
  --plum-ink: #15111D;
  --paper: #EEF1F6;
  --aurora: linear-gradient(120deg, #2FE6C2 0%, #4A86FF 28%, #8A5BFF 55%, #D24FE0 80%, #FF5AA0 100%);

  /* ---- Redesign "Rotta / Paper" (Claude Design) ---- */
  --radius-md: 14px;
  --radius-xl: 20px;
  --radius-2xl: 22px;
  --radius-pill: 99px;
  /* 4 fasi */
  --phase-dream: #10B497;  --phase-dream-soft: rgba(16,180,151,.13);
  --phase-plan:  #3B6FE0;  --phase-plan-soft:  rgba(59,111,224,.12);
  --phase-track: #7C4DFF;  --phase-track-soft: rgba(124,77,255,.12);
  --phase-grow:  #E84C8A;  --phase-grow-soft:  rgba(232,76,138,.12);
  /* gradient accento */
  --grad-accent: linear-gradient(120deg, #4A86FF, #8A5BFF);
  --grad-accent-135: linear-gradient(135deg, #4A86FF, #8A5BFF);
  --grad-progress: linear-gradient(90deg, #4A86FF, #8A5BFF);
  --grad-index: linear-gradient(90deg, #7C4DFF, #E84C8A);
  --grad-card: linear-gradient(150deg, #FFFFFF, #F4F6FB);
  /* ombre Paper */
  --shadow-card: 0 8px 22px -18px rgba(21,17,29,.35);
  --shadow-hero: 0 12px 34px -24px rgba(21,17,29,.35);
  --shadow-btn: 0 8px 20px -8px rgba(74,134,255,.55);
}

/* ---- Dark theme (default) · Plum Ink ---- */
[data-theme="dark"] {
  --bg: #120E1A;
  --bg-elev: #1A1526;
  --bg-elev-2: #221B31;
  --bg-hover: #2A2140;
  --border: #2E2542;
  --border-soft: #221B31;
  --text: #EEF1F6;
  --text-dim: #A79FB8;
  --text-faint: #6E6683;
  --accent: #4A86FF;
  --accent-soft: #4A86FF22;
  --accent-2: #2FE6C2;
  --shadow: 0 8px 30px rgba(0,0,0,.5);
}
/* ---- Light theme · Paper (Claude Design) ---- */
[data-theme="light"] {
  --bg: #EEF1F6;
  --bg-elev: #ffffff;
  --bg-elev-2: #F4F6FB;
  --bg-hover: #EBEFF7;
  --border: #E7EBF3;
  --border-soft: #F1F4F9;
  --text: #15111D;
  --text-dim: #5B5568;
  --text-faint: #9A94A6;
  --accent: #3B6FE0;
  --accent-soft: #3B6FE015;
  --accent-2: #12B79A;
  --shadow: 0 10px 30px -14px rgba(21,17,29,.14);
}

/* Semantic / status colors */
:root {
  --crit: #ff5c72;
  --high: #ff9f43;
  --med:  #ffd166;
  --low:  #4fc1ff;
  --ok:   #34d8a8;
  --done: #6b7488;
  --income: #34d8a8;
  --expense: #ff5c72;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

/* login overlay */
.login-overlay { position: fixed; inset: 0; background: var(--bg); display: grid; place-items: center; z-index: 500; padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); }
.login-card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 18px; padding: 30px; width: 100%; max-width: 360px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.login-input { width: 100%; background: var(--bg); border: 1px solid var(--border); color: var(--text); padding: 11px 13px; border-radius: 8px; font-size: 14px; font-family: inherit; margin-bottom: 10px; }
.login-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.login-err { color: var(--crit); font-size: 12.5px; min-height: 18px; margin-bottom: 8px; }
.login-err.ok { color: var(--ok); }
.login-pass { position: relative; margin-bottom: 10px; }
.login-pass .login-input { margin-bottom: 0; padding-right: 42px; }
.login-pass .reveal { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: transparent; border: none; cursor: pointer; font-size: 15px; line-height: 1; padding: 6px; opacity: .7; }
.login-pass .reveal:hover { opacity: 1; }
.login-tabs { display: flex; gap: 6px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 4px; margin-bottom: 16px; }
.login-tab { flex: 1; background: transparent; border: none; color: var(--text-faint); font-family: inherit; font-size: 13px; font-weight: 600; padding: 8px 6px; border-radius: 7px; cursor: pointer; }
.login-tab:hover { color: var(--text); }
.login-tab.active { background: var(--bg-elev); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.25); }
/* honeypot: fuori dallo schermo, invisibile agli umani, visibile ai bot */
.login-hp-wrap { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.login-hp { width: 1px; height: 1px; }
.pill { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 99px; font-size: 11px; font-weight: 600; border: 1px solid var(--border); }
.sync-badge { font-size: 11px; text-align: center; padding: 3px 0 6px; min-height: 14px; font-weight: 600; }
.account-panel { display: flex; flex-direction: column; gap: 12px; }
.account-head { display: flex; align-items: center; gap: 14px; }
.account-avatar { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; color: #fff; background: var(--accent); }
.account-name { font-size: 16px; font-weight: 600; }
.account-email { font-size: 13px; color: var(--text-dim); margin: 2px 0 6px; }
.account-meta { font-size: 12px; color: var(--text-dim); }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

/* ============================================================ Layout */
#app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; height: 100vh; }

.sidebar {
  background: var(--bg-elev);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 18px 14px;
  gap: 8px;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 6px 8px 18px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  display: block; object-fit: cover;
  box-shadow: 0 4px 16px rgba(74,134,255,.35);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 16px; font-weight: 800; letter-spacing: .2px; }
.brand-text strong .bn-helm { color: var(--brand-helm); }
.brand-text strong .bn-spring { color: var(--brand-spring); }
.brand-text span { font-size: 11px; color: var(--text-faint); }

.nav { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; }
.nav-group {
  font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--text-faint); padding: 13px 12px 4px; user-select: none;
}
.nav-group:first-child { padding-top: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border: none; background: transparent;
  color: var(--text-dim); font-size: 13.5px; font-weight: 500;
  border-radius: var(--radius-sm); cursor: pointer; text-align: left;
  font-family: var(--font); transition: var(--transition);
}
.nav-item .ic { font-size: 15px; width: 18px; text-align: center; opacity: .85; }
.nav-label { flex: 1; min-width: 0; }
.nav-status {
  flex-shrink: 0; font-size: 18px; line-height: 1; width: 28px; height: 28px;
  display: grid; place-items: center; border-radius: 8px; cursor: pointer;
  color: var(--text-faint); transition: var(--transition);
  border: 1px solid transparent;
}
.nav-status:hover { background: var(--bg-elev-2); border-color: var(--border); transform: scale(1.15); }
.nav-status.status-pop { animation: navStatusPop .55s ease; }
@keyframes navStatusPop {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.55); box-shadow: 0 0 0 6px var(--accent-soft); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 transparent; }
}
.nav-item:hover { background: var(--bg-hover); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.sidebar-footer { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px; padding-top: 12px; border-top: 1px solid var(--border-soft); }
.ghost-btn {
  flex: 1; min-width: 64px; padding: 8px 6px; font-size: 11.5px; cursor: pointer;
  background: transparent; color: var(--text-dim); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-family: var(--font); transition: var(--transition);
}
.ghost-btn:hover { background: var(--bg-hover); color: var(--text); border-color: var(--text-faint); }

.main { display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 28px 16px; border-bottom: 1px solid var(--border-soft);
}
.topbar h1 { font-size: 22px; font-weight: 700; letter-spacing: -.3px; }
.topbar .muted { font-size: 12.5px; color: var(--text-faint); margin-top: 2px; }
.topbar-right { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.content { padding: 24px 28px 60px; overflow-y: auto; flex: 1; }

/* ============================================================ Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--bg-elev-2); color: var(--text); font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: var(--font); transition: var(--transition); white-space: nowrap;
}
.btn:hover { background: var(--bg-hover); border-color: var(--text-faint); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--crit); border-color: transparent; background: transparent; }
.btn.danger:hover { background: #ff5c7218; }
.btn.sm { padding: 6px 10px; font-size: 12px; }
.btn.icon { padding: 8px 10px; }

/* ============================================================ Cards / grid */
.grid { display: grid; gap: var(--gap); }
.cards-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.cards-4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.card {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
}
.card.pad-lg { padding: 22px; }
.card-title { font-size: 13px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 14px; }

.stat { display: flex; flex-direction: column; gap: 6px; }
.stat .value { font-size: 28px; font-weight: 750; letter-spacing: -.5px; }
.stat .label { font-size: 12px; color: var(--text-faint); }
.stat .delta { font-size: 12px; font-weight: 600; }
.delta.up { color: var(--ok); } .delta.down { color: var(--crit); }

/* progress bars */
.bar { height: 7px; border-radius: 99px; background: var(--bg-hover); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 99px; background: var(--accent); transition: width .4s ease; }

/* badges & chips */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; font-size: 11px; font-weight: 600; }
.badge.crit { background: #ff5c7220; color: var(--crit); }
.badge.high { background: #ff9f4320; color: var(--high); }
.badge.med  { background: #ffd16622; color: var(--med); }
.badge.low  { background: #4fc1ff20; color: var(--low); }
.badge.ok   { background: #34d8a820; color: var(--ok); }
.badge.muted{ background: var(--bg-hover); color: var(--text-dim); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }

/* ============================================================ Project cards */
.proj-card { cursor: pointer; transition: var(--transition); position: relative; overflow: hidden; }
.proj-card:hover { border-color: var(--text-faint); transform: translateY(-2px); box-shadow: var(--shadow); }
.proj-card .accent-line { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.proj-card h3 { font-size: 16px; margin-bottom: 5px; }
.proj-card .desc { font-size: 12.5px; color: var(--text-dim); min-height: 34px; }
.proj-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: 12px; color: var(--text-faint); }

/* ============================================================ Tables / lists */
.list { display: flex; flex-direction: column; gap: 8px; }
.row {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: var(--transition);
}
.row:hover { border-color: var(--text-faint); }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 550; font-size: 13.5px; }
.row .sub { font-size: 11.5px; color: var(--text-faint); }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============================================================ Forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12px; font-weight: 600; color: var(--text-dim); }
.field input, .field select, .field textarea {
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  padding: 9px 11px; border-radius: var(--radius-sm); font-family: var(--font); font-size: 13.5px;
  width: 100%; transition: var(--transition);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field textarea { resize: vertical; min-height: 70px; }
/* Date input: allineato a sinistra come i number, icona a destra (#19) */
.field input[type="date"] { text-align: left; }
.field input[type="date"]::-webkit-datetime-edit { text-align: left; padding: 0; }
.field input[type="date"]::-webkit-datetime-edit-fields-wrapper { padding: 0; }
.field input[type="date"]::-webkit-calendar-picker-indicator { margin-left: auto; opacity: .6; cursor: pointer; }
.field input[type="date"]:hover::-webkit-calendar-picker-indicator { opacity: 1; }
.field-row { display: flex; gap: 12px; }
.field-row > * { flex: 1; }
/* Input "carini" e coerenti in TUTTI i pannelli di modifica (drawer): gli input grezzi
   fuori dalle .field prendono bordo, padding, angoli e focus ring — niente aspetto "excel".
   Definito qui presto, così le regole .fp-* più sotto possono ancora personalizzare. */
.drawer-body input:not([type="range"]):not([type="checkbox"]):not([type="radio"]),
.drawer-body select {
  background: var(--bg-elev); border: 1px solid var(--border); color: var(--text);
  padding: 11px 13px; min-height: 44px; border-radius: 10px; font-family: var(--font);
  font-size: 15px; font-weight: 600; transition: var(--transition);
}
.drawer-body input:hover, .drawer-body select:hover { border-color: var(--text-faint); }
.drawer-body input:focus, .drawer-body select:focus { outline: none; background: var(--bg); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
/* label dei campi: più leggibili e spaziate */
.fp-fld label { margin-bottom: 2px; }
.hint { font-size: 11px; color: var(--text-faint); }

/* color swatches */
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 26px; height: 26px; border-radius: 8px; cursor: pointer; border: 2px solid transparent; }
.swatch.sel { border-color: var(--text); transform: scale(1.1); }

/* ============================================================ Modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(3px);
  display: grid; place-items: center; z-index: 160; padding: 24px;
}
.modal {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-lg);
  width: 100%; max-width: 540px; max-height: 88vh; overflow-y: auto; box-shadow: var(--shadow);
  animation: pop .18s ease;
}
.modal.wide { max-width: 720px; }
@keyframes pop { from { transform: scale(.96) translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px 0; }
.modal-head h2 { font-size: 18px; }
.modal-body { padding: 18px 22px; }
.modal-foot { padding: 14px 22px 20px; display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid var(--border-soft); margin-top: 4px; }
.x-btn { background: transparent; border: none; color: var(--text-faint); font-size: 22px; cursor: pointer; line-height: 1; }
.x-btn:hover { color: var(--text); }

/* ============================================================ Kanban */
.kanban { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; align-items: start; }
.kcol { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; min-height: 120px; }
.kcol.drag-over { border-color: var(--accent); background: var(--accent-soft); }
.kcol-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-dim); margin-bottom: 10px; padding: 0 4px; }
.kcol-head .count { background: var(--bg-hover); border-radius: 99px; padding: 1px 8px; font-size: 11px; }
.kcard {
  background: var(--bg-elev-2); border: 1px solid var(--border); border-left-width: 3px;
  border-radius: var(--radius-sm); padding: 11px 12px; margin-bottom: 9px; cursor: grab;
  transition: var(--transition);
}
.kcard:hover { border-color: var(--text-faint); }
.kcard:active { cursor: grabbing; }
.kcard.dragging { opacity: .45; }
.kcard .kt { font-size: 13px; font-weight: 550; margin-bottom: 7px; }
.kcard .kmeta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 11px; color: var(--text-faint); }

/* ============================================================ Gantt */
.gantt { overflow: auto; max-height: calc(100vh - 230px); border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elev); }
.gantt svg { display: block; }

/* ============================================================ Calendar */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--border-soft); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.cal-dow { background: var(--bg-elev); padding: 9px; text-align: center; font-size: 11px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: .5px; }
.cal-cell { background: var(--bg-elev); min-height: 104px; padding: 7px; cursor: pointer; transition: var(--transition); position: relative; }
.cal-cell:hover { background: var(--bg-hover); }
.cal-cell.other { opacity: .4; }
.cal-cell.today .cal-num { background: var(--accent); color: #fff; }
.cal-num { font-size: 12px; font-weight: 600; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.cal-ev { font-size: 10.5px; padding: 2px 6px; border-radius: 5px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 550; }

/* ============================================================ Misc */
.muted { color: var(--text-dim); }
.faint { color: var(--text-faint); }
.empty { text-align: center; padding: 60px 20px; color: var(--text-faint); }
.empty .big { font-size: 40px; opacity: .5; margin-bottom: 12px; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin: 26px 0 14px; }
.section-head h2 { font-size: 16px; font-weight: 650; }
.tabs { display: flex; gap: 4px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px; }
.tab { padding: 7px 14px; border: none; background: transparent; color: var(--text-dim); border-radius: 6px; cursor: pointer; font-size: 13px; font-weight: 550; font-family: var(--font); transition: var(--transition); }
.tab:hover { color: var(--text); }
.tab.active { background: var(--bg-hover); color: var(--text); }
.split { display: flex; gap: 8px; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.chiplist { display: flex; gap: 7px; flex-wrap: wrap; }
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--bg-elev-2); border: 1px solid var(--border); color: var(--text);
  padding: 12px 20px; border-radius: 10px; box-shadow: var(--shadow); z-index: 200; font-size: 13px; font-weight: 550;
  animation: pop .2s ease;
}
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-dim); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* ============================================================ Interactive Gantt */
.gx-host { display: flex; flex-direction: column; }
.gx-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.gx-scroll { position: relative; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elev); max-height: calc(100vh - 210px); cursor: grab; scrollbar-width: none; -ms-overflow-style: none; }
.gx-scroll.panning { cursor: grabbing; }
.gx-scroll.panning * { cursor: grabbing !important; }
.gx-scroll::-webkit-scrollbar { width: 0; height: 0; display: none; }
.gx-inner { position: relative; }
.gx-bg { position: absolute; z-index: 0; }
.gx-mline { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--border); }
.gx-weekend { position: absolute; top: 0; bottom: 0; background: var(--bg-elev-2); opacity: .6; }
.gx-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
/* header */
.gx-head { position: absolute; top: 0; z-index: 6; background: var(--bg-elev); border-bottom: 1px solid var(--border); }
.gx-head, .gx-corner { position: sticky; top: 0; }
.gx-hmonth { position: absolute; top: 0; height: 26px; line-height: 26px; padding-left: 8px; font-size: 12px; font-weight: 700; color: var(--text); border-left: 1px solid var(--border); box-sizing: border-box; white-space: nowrap; }
.gx-hday { position: absolute; top: 28px; height: 24px; line-height: 24px; text-align: center; font-size: 10px; color: var(--text-dim); border-left: 1px solid var(--border-soft); box-sizing: border-box; }
.gx-hday.today { background: var(--accent); color: #fff; font-weight: 700; }
.gx-hday.sun { color: var(--crit); }
.gx-hweek { position: absolute; top: 28px; height: 24px; line-height: 24px; text-align: center; font-size: 10px; color: var(--text-dim); border-left: 1px solid var(--border-soft); box-sizing: border-box; }
.gx-corner { left: 0; z-index: 8; background: var(--bg-elev); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 12px; color: var(--text-dim); }
/* rows */
.gx-row { position: absolute; left: 0; }
.gx-row:hover .gx-bar { filter: brightness(1.05); }
.gx-label { position: sticky; left: 0; z-index: 5; height: 100%; display: flex; align-items: center; gap: 7px; padding: 0 10px; background: var(--bg-elev); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border-soft); cursor: pointer; box-sizing: border-box; }
.gx-label:hover { background: var(--bg-hover); }
.gx-label.lvl0 { font-weight: 650; }
.gx-label.lvl1 { padding-left: 24px; font-weight: 550; }
.gx-label.lvl2 { padding-left: 40px; font-size: 12.5px; color: var(--text-dim); }
.gx-chev { cursor: pointer; color: var(--text-dim); font-size: 11px; width: 12px; margin-left: -4px; }
.gx-name { min-width: 0; }
/* bars */
.gx-bar { position: absolute; z-index: 2; border-radius: 6px; background: color-mix(in srgb, var(--barcol) 22%, transparent); border: 1px solid var(--barcol); cursor: grab; overflow: hidden; user-select: none; touch-action: none; }
.gx-bar.task { border-radius: 5px; }
.gx-bar.dragging { cursor: grabbing; z-index: 20; box-shadow: var(--shadow); }
.gx-bar.overdue { border-color: var(--crit); background: color-mix(in srgb, var(--crit) 20%, transparent); }
.gx-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--barcol); opacity: .85; border-radius: inherit; }
.gx-bar.overdue .gx-fill { background: var(--crit); }
.gx-cap { position: relative; z-index: 1; padding: 0 8px; line-height: 1; font-size: 11px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; height: 100%; display: flex; align-items: center; pointer-events: none; }
.gx-h { position: absolute; top: 0; bottom: 0; width: 7px; cursor: ew-resize; z-index: 3; }
.gx-hl { left: 0; } .gx-hr { right: 0; }
.gx-h:hover { background: rgba(255,255,255,.25); }
.gx-link { position: absolute; right: -5px; top: 50%; width: 11px; height: 11px; margin-top: -5.5px; border-radius: 50%; background: var(--bg-elev); border: 2px solid var(--barcol); cursor: crosshair; z-index: 4; opacity: 0; transition: opacity .12s; }
.gx-bar:hover .gx-link { opacity: 1; }
.gx-linkline { position: absolute; height: 2px; background: var(--accent); transform-origin: left center; z-index: 30; pointer-events: none; }
.gx-nodate { position: absolute; top: 50%; transform: translateY(-50%); font-size: 10.5px; color: var(--text-faint); }
/* dependency arrows */
.gx-deps { position: absolute; z-index: 3; pointer-events: none; overflow: visible; }
.gx-deps path { pointer-events: stroke; }
.gx-dep { fill: none; stroke: var(--text-dim); stroke-width: 1.5; }
.gx-dep:hover { stroke: var(--accent); stroke-width: 2.5; }
.gx-dep.bad { stroke: var(--crit); stroke-dasharray: 4 3; }
/* label extras: grip, actions */
.gx-grip { cursor: grab; color: var(--text-faint); font-size: 11px; letter-spacing: -2px; margin-left: -4px; opacity: 0; transition: opacity .12s; touch-action: none; user-select: none; }
.gx-row:hover .gx-grip { opacity: .7; }
.gx-grip:hover { opacity: 1; color: var(--text); }
.gx-grip:active { cursor: grabbing; }
.gx-acts { margin-left: auto; display: none; gap: 3px; align-items: center; }
.gx-row:hover .gx-acts { display: flex; }
.gx-actbtn { width: 20px; height: 20px; border-radius: 5px; border: 1px solid var(--border); background: var(--bg-elev-2); color: var(--text-dim); cursor: pointer; font-size: 13px; line-height: 1; display: grid; place-items: center; font-family: var(--font); }
.gx-actbtn:hover { background: var(--bg-hover); color: var(--text); border-color: var(--text-faint); }
.dot.diamond { border-radius: 2px; transform: rotate(45deg); width: 8px; height: 8px; }
/* milestone diamond marker on bar */
.gx-bar.ms { background: transparent; border: none; }
.gx-bar.ms .gx-fill { display: none; }
.gx-bar.ms::before { content: ""; position: absolute; left: 0; right: 12px; top: 50%; height: 4px; transform: translateY(-50%); background: color-mix(in srgb, var(--barcol) 45%, transparent); border-radius: 3px; }
.gx-diamond { position: absolute; right: 0; top: 50%; width: 13px; height: 13px; transform: translateY(-50%) rotate(45deg); border-radius: 2px; box-shadow: 0 0 0 2px var(--bg-elev); }
/* activity bars (K/J) */
.gx-bar.act { border-style: solid; border-radius: 8px; }
/* caption outside a narrow bar */
.gx-cap-out { position: absolute; transform: translateY(-50%); font-size: 11px; font-weight: 600; color: var(--text); white-space: nowrap; pointer-events: none; z-index: 2; }
/* reorder indicator */
.gx-reorder-ind { position: absolute; left: 0; right: 0; height: 2px; background: var(--accent); z-index: 25; box-shadow: 0 0 0 1px var(--accent); }
.gx-row.reordering { opacity: .5; }
/* gantt tooltip */
.gx-tip { position: fixed; z-index: 400; display: none; background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: 9px; box-shadow: var(--shadow); padding: 9px 12px; font-size: 12px; color: var(--text-dim); max-width: 280px; pointer-events: none; line-height: 1.5; }
.gx-tip-t { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.gx-tip-k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-faint); margin-bottom: 6px; }

/* cash-flow chart hover tooltip */
.cf-wrap { position: relative; }
.cf-wrap svg { cursor: crosshair; }
.cf-tip { position: absolute; z-index: 30; pointer-events: none; background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: 9px; box-shadow: var(--shadow); padding: 8px 11px; font-size: 12px; min-width: 110px; }
.cf-tip-d { font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-faint); margin-bottom: 3px; }
.cf-tip-b { font-size: 16px; font-weight: 750; }
.cf-tip-x { font-size: 12px; font-weight: 600; margin-top: 2px; }

/* right drawer (cell detail) */
#drawerHost .drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.42); opacity: 0; transition: opacity .2s; z-index: 150; }
#drawerHost .drawer-overlay.open { opacity: 1; }
#drawerHost .drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 440px; max-width: 94vw; background: var(--bg-elev); border-left: 1px solid var(--border); box-shadow: -10px 0 40px rgba(0,0,0,.35); transform: translateX(100%); transition: transform .22s cubic-bezier(.4,0,.2,1); z-index: 151; display: flex; flex-direction: column; }
#drawerHost .drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border-soft); }
.drawer-head h3 { font-size: 16px; }
.drawer-body { padding: 16px 20px; overflow-y: auto; flex: 1; }
.dv-item { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 10px; }
.dv-item .dv-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.dv-item .dv-amt { font-weight: 700; }
.dv-item .dv-sub { font-size: 11.5px; color: var(--text-faint); margin-bottom: 8px; }
.dv-reclass { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dv-reclass select, .dv-reclass input { background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: 6px; padding: 6px 8px; font-size: 12.5px; font-family: var(--font); }
.dv-reclass input { flex: 1; min-width: 100px; }
.dv-actions { display: flex; gap: 6px; margin-top: 8px; }

/* bank accounts cards */
.acct-card { position: relative; overflow: hidden; cursor: pointer; transition: var(--transition); }
.acct-card:hover { border-color: var(--text-faint); }
.acct-card.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.acct-line { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.acct-bal { font-size: 22px; font-weight: 750; margin-top: 10px; letter-spacing: -.3px; }
.acct-card.total { background: var(--bg-elev-2); }

/* Agicap-style cash table */
.cashbars { overflow-x: auto; }
.cashbars svg { min-width: 640px; }
.ct-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); margin-top: 12px; }
table.ct { border-collapse: collapse; width: 100%; font-size: 12px; white-space: nowrap; }
.ct th, .ct td { padding: 8px 12px; border-bottom: 1px solid var(--border-soft); text-align: right; }
.ct thead th { position: sticky; top: 0; background: var(--bg-elev-2); z-index: 3; font-weight: 700; font-size: 11px; color: var(--text-dim); }
.ct .ct-rowlabel { position: sticky; left: 0; background: var(--bg-elev); text-align: left; min-width: 180px; z-index: 2; border-right: 1px solid var(--border); }
.ct thead .ct-rowlabel { z-index: 4; background: var(--bg-elev-2); }
.ct th.ct-col.current, .ct td.ct-num.current { background: var(--accent-soft); }
.ct tr.ct-total:hover td { background: var(--bg-hover); }
.ct .ct-total td, .ct .ct-total .ct-rowlabel { font-weight: 700; }
.ct .ct-total.in td.ct-num { color: var(--income); }
.ct .ct-total.out td.ct-num { color: var(--expense); }
.ct .ct-sub td.ct-num { color: var(--text-dim); }
.ct .ct-cat .ct-rowlabel { padding-left: 34px; color: var(--text-dim); font-weight: 400; }
.ct .ct-cat td.ct-num { color: var(--text-dim); font-size: 11.5px; }
.ct .ct-end td { font-weight: 800; border-top: 2px solid var(--border); }
.ct .ct-end td.ct-num, .ct .ct-end .ct-rowlabel { background: var(--bg-elev-2); }
.ct-chev { color: var(--text-faint); margin-right: 6px; font-size: 10px; }
.ct td.ct-num.ct-click { cursor: pointer; }
.ct td.ct-num.ct-click:hover { box-shadow: inset 0 0 0 1.5px var(--accent); }
.ct-grip { cursor: grab; color: var(--text-faint); font-size: 10px; letter-spacing: -2px; margin-right: 7px; opacity: 0; transition: opacity .12s; }
.ct tr.ct-cat:hover .ct-grip { opacity: .7; }
.ct-grip:hover { opacity: 1 !important; color: var(--text); }
.ct-grip:active { cursor: grabbing; }
.ct tr.ct-drop td { box-shadow: inset 0 2px 0 var(--accent); }

/* trading journal table */
.jt-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); margin-top: 10px; }
table.jt { border-collapse: collapse; width: 100%; font-size: 13px; }
.jt th, .jt td { padding: 8px 14px; border-bottom: 1px solid var(--border-soft); text-align: right; white-space: nowrap; }
.jt thead th { position: sticky; top: 0; background: var(--bg-elev-2); z-index: 2; font-size: 11px; font-weight: 700; color: var(--text-dim); }
.jt .jt-date { text-align: left; min-width: 210px; position: sticky; left: 0; background: var(--bg-elev); }
.jt thead .jt-date { z-index: 3; background: var(--bg-elev-2); }
.jt tbody tr:hover td { background: var(--bg-hover); }
.jt tbody tr:hover .jt-date { background: var(--bg-hover); }
.jt tr.weekend td, .jt tr.weekend .jt-date { background: var(--bg-elev-2); }
.jt tr.today .jt-date { color: var(--accent); font-weight: 700; }
.jt .jt-profit { font-weight: 700; }
.jt .jt-profit.pos { color: #16391a; background: #86c66f; }
.jt .jt-profit.neg { color: #fff; background: var(--crit); }
.jt .jt-bal { font-weight: 600; }
.jt .jt-note { text-align: left; max-width: 380px; white-space: normal; }
.jt .jt-note.bad { background: var(--crit); color: #fff; font-weight: 600; }
.jt .jt-note.good { color: var(--text-dim); }

/* assignee avatars */
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 700; flex: none; box-shadow: 0 0 0 1px var(--bg-elev); }
.avatar.sm { width: 18px; height: 18px; font-size: 9.5px; margin-left: 5px; }

/* budget bars */
.bbar { display: flex; flex-direction: column; gap: 12px; }
.bbar-row { display: grid; grid-template-columns: 80px 1fr 90px; align-items: center; gap: 12px; }
.bbar-label { font-size: 12px; color: var(--text-dim); }
.bbar-track { height: 10px; background: var(--bg-hover); border-radius: 99px; overflow: hidden; }
.bbar-fill { height: 100%; border-radius: 99px; transition: width .4s ease; }
.bbar-val { font-size: 12.5px; font-weight: 650; text-align: right; }

/* objectives checklist */
.obj { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border-soft); }
.obj:last-child { border-bottom: none; }
.obj input { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; }
.obj.done span { text-decoration: line-through; color: var(--text-faint); }

/* matrix */
.matrix { display: grid; grid-template-columns: auto 1fr 1fr; grid-template-rows: auto 1fr 1fr; gap: 8px; }
.matrix-cell { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; min-height: 110px; background: var(--bg-elev); }
.matrix-axis { display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--text-faint); text-transform: uppercase; letter-spacing: .5px; }
.matrix-tag { font-size: 11px; font-weight: 700; margin-bottom: 8px; }
.mini-task { font-size: 12px; padding: 5px 8px; background: var(--bg-elev-2); border-radius: 6px; margin-bottom: 5px; border-left: 3px solid var(--accent); }

/* calendar month enhancements */
.cal-cell-head { display: flex; align-items: center; justify-content: space-between; }
.cal-cell.weekend { background: var(--bg-elev-2); }
.cal-budget { font-size: 10px; font-weight: 700; }
/* Sundays in red */
.cal-dow.sunday { color: var(--crit); }
.cal-cell.sunday { background: #ff5c720d; }
.cal-cell.sunday .cal-num { color: var(--crit); }
.cal-cell.sunday.today .cal-num { color: #fff; background: var(--crit); }
table.agenda tr.sunday .ag-dow,
table.agenda tr.sunday .ag-day,
table.agenda tr.sunday .ag-mon { color: var(--crit); }

/* category picker (Notion-style) */
.catpick { position: relative; display: inline-block; }
.catpick-trigger { background: transparent; border: 1px dashed var(--border); color: var(--text-dim); padding: 5px 9px; border-radius: 7px; cursor: pointer; font-family: var(--font); font-size: 12px; display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.catpick-trigger:hover { border-color: var(--text-faint); background: var(--bg-hover); }
.catpick-trigger.compact { padding: 4px 8px; border-style: solid; }
.cat-chip { padding: 3px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; }
.catpick-dd { position: absolute; top: calc(100% + 4px); left: 0; z-index: 50; width: 230px; background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); padding: 8px; }
.catpick-search { width: 100%; background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: 7px; padding: 7px 9px; font-size: 13px; font-family: var(--font); margin-bottom: 6px; }
.catpick-search:focus { outline: none; border-color: var(--accent); }
.catpick-list { max-height: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.catpick-item { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.catpick-item:hover { background: var(--bg-hover); }
.catpick-item.create { color: var(--accent); font-weight: 600; }
.catpick-del { margin-left: auto; background: transparent; border: none; color: var(--text-faint); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 4px; }
.catpick-del:hover { color: var(--crit); }

/* vertical agenda table */
.agenda-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow: auto; max-height: calc(100vh - 230px); }
table.agenda { width: 100%; border-collapse: collapse; font-size: 13px; }
table.agenda th { position: sticky; top: 0; z-index: 10; background: var(--bg-elev-2); text-align: left; padding: 12px 14px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-dim); border-bottom: 1px solid var(--border); white-space: nowrap; }
table.agenda td { padding: 7px 12px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
table.agenda th select.ag-colpick { max-width: 150px; margin: -6px 0; padding: 4px 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
table.agenda tr.weekend td { background: var(--bg-elev-2); }
table.agenda tr.today td { background: var(--accent-soft); }
table.agenda tr.vac td { background: #34d8a814; }
table.agenda tr.month-start td { border-top: 2px solid var(--accent); }
table.agenda tr.month-start .ag-mon { color: var(--accent); font-weight: 700; }
table.agenda tr:hover td { background: var(--bg-hover); }
.col-date { width: 78px; text-align: center !important; }
.ag-dow { font-size: 10px; text-transform: uppercase; color: var(--text-faint); font-weight: 700; letter-spacing: .5px; }
.ag-day { font-size: 20px; font-weight: 750; line-height: 1.1; }
.ag-mon { font-size: 10px; color: var(--text-faint); }
tr.today .ag-day { color: var(--accent); }
.col-act { min-width: 150px; }
.col-budget { min-width: 180px; }
.col-saldo { width: 110px; text-align: right !important; font-size: 14px; white-space: nowrap; }
/* single-line cell: chips + adder inline, wrap only if needed */
.ag-cell { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ag-act { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; background: var(--bg-elev-2); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 6px; padding: 4px 9px; cursor: pointer; font-size: 12.5px; }
.ag-act:hover { border-color: var(--text-faint); }
.ag-act .truncate { max-width: 200px; }
.ag-flow { display: inline-flex; align-items: center; gap: 8px; background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: 6px; padding: 4px 9px; cursor: pointer; font-size: 12px; }
.ag-flow:hover { border-color: var(--text-faint); }
.ag-add { background: transparent; border: none; color: var(--text-faint); font-size: 12px; cursor: pointer; padding: 3px 4px; font-family: var(--font); white-space: nowrap; }
.ag-add:hover { color: var(--accent); }
.ag-input { width: auto; flex: 1 1 130px; min-width: 120px; background: var(--bg); border: 1px solid var(--accent); color: var(--text); border-radius: 6px; padding: 5px 8px; font-size: 12.5px; font-family: var(--font); }
.ag-input:focus { outline: none; }

@media (max-width: 780px) { .fin-2col { grid-template-columns: 1fr !important; } }

/* ---------------- Ruota della Vita ---------------- */
.lw-tabs { display: flex; gap: 6px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px; padding: 5px; margin-bottom: 16px; flex-wrap: wrap; }
.lw-tab { flex: 1; min-width: 96px; background: transparent; border: none; color: var(--text-faint); font-family: inherit; font-size: 13px; font-weight: 600; padding: 9px 8px; border-radius: 8px; cursor: pointer; }
.lw-tab:hover { color: var(--text); }
.lw-tab.active { background: var(--accent-soft); color: var(--accent); }
.lw-intro { margin-bottom: 16px; }
.lw-about { margin-bottom: 16px; border-left: 3px solid var(--accent); background: var(--accent-soft); }
.lw-about-title { font-size: 14px; font-weight: 700; margin-bottom: 6px; color: var(--accent); }
.lw-about-text { font-size: 13.5px; line-height: 1.55; color: var(--text-dim); }
.lw-about-text b { color: var(--text); font-weight: 650; }
.lw-next { margin-top: 16px; border: 1px solid var(--accent); background: var(--accent-soft); }
.lw-next-badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ok); margin-bottom: 8px; }
.lw-next-title { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.lw-next-text { font-size: 13.5px; line-height: 1.6; color: var(--text-dim); margin-bottom: 14px; }
.lw-next-text b { color: var(--text); font-weight: 650; }
.lw-next-btn { font-size: 14px; padding: 10px 18px; }
.mm-dream-tip { margin-bottom: 14px; }
.lw-step { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.lw-q { font-size: 18px; font-weight: 650; margin-bottom: 6px; }
.lw-layout { display: grid; grid-template-columns: minmax(340px, 1fr) 1.1fr; gap: 16px; align-items: start; }
.lw-single { max-width: 640px; margin: 0 auto; }
.lw-wheelbox { display: flex; flex-direction: column; }
.lw-wheelbox > svg { width: 100%; max-width: 460px; height: auto; align-self: center; }
.lw-sep-line { height: 1px; background: var(--border); margin: 16px 0 12px; }
.lw-avg { display: flex; gap: 8px; align-items: baseline; margin-top: 8px; }
.lw-avg strong { font-size: 20px; }
.lw-sections { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lw-sec { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.lw-sec-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.lw-sec-head .title { font-size: 13.5px; font-weight: 600; }
.lw-scnum { font-weight: 800; font-size: 16px; min-width: 14px; text-align: right; }
.lw-score { display: flex; gap: 6px; margin-bottom: 10px; }
.lw-dot { flex: 1; min-height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px 3px; border: 1px solid var(--border); background: var(--bg); color: var(--text-faint); border-radius: 9px; font-family: inherit; cursor: pointer; transition: background .12s, color .12s, border-color .12s; }
.lw-dot:hover { border-color: var(--c); color: var(--text); }
.lw-dot.on { background: var(--c); border-color: var(--c); color: #0b0f1a; }
.lw-dot-n { font-size: 15px; font-weight: 800; line-height: 1; }
.lw-dot-lab { font-size: 9.5px; font-weight: 600; line-height: 1.1; text-align: center; opacity: .9; }
.lw-notes { width: 100%; min-height: 46px; resize: vertical; }
.lw-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; }

/* percorso guidato Ruota della Vita */
.lw-wizard { margin-top: 16px; }
.lw-wiz-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.lw-wiz-badge { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 99px; padding: 3px 11px; }
.lw-wiz-bar { height: 7px; background: var(--bg); border: 1px solid var(--border); border-radius: 99px; overflow: hidden; margin-bottom: 12px; }
.lw-wiz-bar span { display: block; height: 100%; border-radius: 99px; transition: width .25s ease; }
.lw-wiz-text { font-size: 14.5px; line-height: 1.55; color: var(--text); margin-bottom: 14px; }
.lw-wiz-text b { font-weight: 700; }
.lw-wiz-btns { display: flex; align-items: center; gap: 10px; }
.lw-wiz-btns .grow { flex: 1; }
.lw-wiz-btns .btn { min-width: 130px; justify-content: center; }
@media (max-width: 560px) { .lw-wiz-btns .btn { min-width: 0; } }

/* Ottimizzazione mobile: ruota + punteggio + navigazione in una schermata senza scroll */
@media (max-width: 680px) {
  .main .content { padding: 12px !important; }
  .lw-intro { display: none; }                 /* la domanda della fase è già nel sottotitolo in alto */
  .lw-single { max-width: 100%; }
  .lw-wheelbox { padding: 12px 14px; }
  .lw-wheelbox > svg { max-width: 240px; }
  .lw-sep-line { margin: 8px 0 8px; }
  .lw-panel-head { margin-bottom: 6px; padding-bottom: 6px; }
  .lw-panel-title { font-size: 15px; }
  .lw-panel-prog { font-size: 10px; padding: 2px 7px; }
  .lw-panel-lab { margin: 2px 0 6px; font-size: 9.5px; }
  .lw-score { gap: 5px; }
  .lw-dot { min-height: 44px; border-radius: 8px; padding: 4px 2px; }
  .lw-dot-n { font-size: 14px; }
  .lw-dot-lab { font-size: 8.5px; }
  .lw-wizard { margin-top: 10px; padding: 12px 14px; }
  .lw-wiz-top { margin-bottom: 6px; }
  .lw-wiz-badge { font-size: 11px; padding: 2px 9px; }
  .lw-wiz-bar { margin-bottom: 8px; height: 6px; }
  .lw-wiz-text { font-size: 12.5px; line-height: 1.4; margin-bottom: 10px; }
  .lw-wiz-btns { gap: 7px; }
  .lw-wiz-btns .btn { min-width: 0; padding: 9px 12px; }
  .lw-wiz-btns .ghost-btn { padding: 8px; font-size: 11.5px; }
}

/* schermi corti: compatta ancora di più per stare senza scroll */
@media (max-width: 680px) and (max-height: 740px) {
  .main .content { padding: 8px !important; }
  .lw-wheelbox { padding: 8px 12px; }
  .lw-wheelbox > svg { max-width: 165px; }
  .lw-sep-line { margin: 5px 0; }
  .lw-panel-head { margin-bottom: 3px; padding-bottom: 3px; }
  .lw-panel-lab { margin: 1px 0 4px; }
  .lw-dot { min-height: 38px; }
  .lw-wizard { margin-top: 7px; padding: 9px 11px; }
  .lw-wiz-top { margin-bottom: 4px; }
  .lw-wiz-bar { margin-bottom: 6px; }
  .lw-wiz-text { font-size: 12px; line-height: 1.35; margin-bottom: 7px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .lw-wiz-btns .btn { padding: 8px 10px; }
}

/* pannello fetta selezionata + voci a punti */
.lw-panel { display: flex; flex-direction: column; }
.lw-panel-head { display: flex; align-items: center; gap: 9px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 2px solid var(--border); }
.lw-panel-title { font-size: 17px; font-weight: 700; }
.lw-panel-prog { font-size: 11px; font-weight: 700; color: var(--text-faint); background: var(--bg); border: 1px solid var(--border); padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.lw-panel-lab { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-faint); margin: 6px 0 8px; }
.lw-voci { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.lw-voce { display: flex; align-items: center; gap: 9px; background: var(--bg); border: 1px solid var(--border); border-radius: 9px; padding: 8px 10px; }
.lw-voce-empty { padding: 10px; text-align: center; border: 1px dashed var(--border); border-radius: 9px; font-size: 12.5px; }
.lw-bullet { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.lw-voce-txt { font-size: 13.5px; cursor: text; }
.lw-voce-del { background: transparent; border: none; color: var(--text-faint); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; border-radius: 6px; }
.lw-voce-del:hover { color: var(--crit); }
.lw-voce-addrow { display: flex; gap: 8px; }
.lw-voce-addrow .lw-voce-input { flex: 1; }
.lw-voce-add { min-width: 42px; justify-content: center; font-size: 18px; font-weight: 700; }
.lw-guide { display: flex; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 16px; }
.lw-guide .btn { flex: 1; justify-content: center; }

/* mappa mentale (fase Tra 3 anni) */
.mind-tree { list-style: none; margin: 0; padding-left: 16px; }
.mind-tree.root { padding-left: 0; }
.mind-tree:not(.root) { border-left: 1px solid var(--border); margin-left: 7px; }
.mind-node { position: relative; }
.mind-row { display: flex; align-items: center; gap: 7px; padding: 3px 4px; border-radius: 7px; min-height: 28px; }
.mind-row:hover { background: var(--bg); }
.mind-tog { width: 15px; flex: 0 0 auto; text-align: center; cursor: pointer; color: var(--text-faint); font-size: 10px; user-select: none; }
.mind-tog.leaf { cursor: default; font-size: 12px; }
.mind-txt { font-size: 13px; cursor: text; }
.mind-txt:hover { text-decoration: underline dotted var(--text-faint); }
.mind-val { font-size: 11px; font-weight: 600; border: 1px solid; border-radius: 99px; padding: 1px 8px; cursor: pointer; white-space: nowrap; }
.mind-acts { display: none; gap: 3px; margin-left: auto; }
.mind-row:hover .mind-acts { display: flex; }
.mind-act { background: transparent; border: 1px solid var(--border); color: var(--text-faint); width: 22px; height: 22px; border-radius: 6px; cursor: pointer; font-size: 13px; line-height: 1; padding: 0; }
.mind-act:hover { color: var(--text); border-color: var(--text-faint); }
.mind-act.del:hover { color: var(--crit); border-color: var(--crit); }
.mind-input { font-size: 13px; padding: 4px 7px; margin: 0; }
.mind-vinput { max-width: 200px; }
.mind-addrow { padding: 2px 4px; }
.mind-addbtn { background: transparent; border: 1px dashed var(--border); color: var(--text-faint); font-size: 11.5px; padding: 3px 9px; border-radius: 6px; cursor: pointer; }
.mind-addbtn:hover { color: var(--text); border-color: var(--text-faint); }
.mind-full { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.mind-area-head { display: flex; align-items: center; gap: 8px; border-bottom: 2px solid var(--border); padding-bottom: 8px; margin-bottom: 8px; }
.mind-area-head .faint { margin-left: auto; font-size: 11px; }

/* ---------------- MindMap: editor completo ---------------- */
.mm-holder2 { height: 82vh; min-height: 540px; }
.mm-app { display: flex; flex-direction: column; height: 100%; min-height: 0; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--bg); }
.mm-holder2.mm-app { height: 82vh; }
.mm-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 8px 10px; background: var(--bg-elev); border-bottom: 1px solid var(--border); }
.mm-tb { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg); color: var(--text); font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.mm-tb:hover { border-color: var(--text-faint); }
.mm-tb.del:hover { color: var(--crit); border-color: var(--crit); }
.mm-tsel { height: 30px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg); color: var(--text); font-family: inherit; font-size: 12.5px; padding: 0 6px; cursor: pointer; }
.mm-sep { width: 1px; height: 20px; background: var(--border); margin: 0 3px; }
.mm-stage { flex: 1; display: flex; min-height: 0; }
.mm-root { position: relative; flex: 1; overflow: hidden; background-color: var(--bg); background-image: radial-gradient(var(--border-soft) 1px, transparent 1px); background-size: 22px 22px; cursor: grab; user-select: none; outline: none; }
.mm-root.grabbing { cursor: grabbing; }
.mm-app.mm-linking .mm-root { cursor: crosshair; }
.mm-canvas { position: absolute; top: 0; left: 0; transform-origin: 0 0; will-change: transform; }
.mm-edges { position: absolute; top: 0; left: 0; overflow: visible; pointer-events: none; }
.mm-nodes { position: absolute; top: 0; left: 0; width: 6000px; height: 1px; }
/* nodi */
.mm-node { position: absolute; max-width: 210px; }
.mm-in { position: relative; display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 10px; padding: 7px 12px; box-shadow: 0 2px 6px rgba(0,0,0,.18); color: var(--text); cursor: grab; }
.mm-node.shp-pill .mm-in { border-radius: 999px; padding: 8px 16px; }
.mm-node.shp-rect .mm-in { border-radius: 4px; }
.mm-node.shp-ellipse .mm-in { border-radius: 50% / 60%; padding: 10px 18px; }
.mm-node.shp-underline .mm-in { background: transparent; border: none; border-bottom: 2.5px solid var(--c); border-radius: 0; box-shadow: none; padding: 4px 6px; }
.mm-node.shp-none .mm-in { background: transparent; border: none; box-shadow: none; padding: 4px 6px; }
.mm-node.d0 .mm-in { background: var(--grad-accent-135); border-color: transparent; color: #fff; font-weight: 800; box-shadow: 0 12px 26px -8px rgba(74,134,255,.55); }
.mm-node.d0 .mm-val { color: rgba(255,255,255,.75); }
.mm-node.d1 .mm-in { font-weight: 700; }
.mm-node.shp-pill .mm-in, .mm-node.d0 .mm-in { align-items: center; text-align: center; }
.mm-in.filled .mm-val { color: rgba(11,15,26,.72); }
.mm-node.fs-s .mm-txt { font-size: 12px; } .mm-node.fs-m .mm-txt { font-size: 13.5px; } .mm-node.fs-l .mm-txt { font-size: 16px; }
.mm-txt { line-height: 1.25; white-space: normal; word-break: break-word; }
.mm-val { font-size: 11px; font-weight: 600; color: var(--c); }
.mm-icons { display: inline-flex; gap: 3px; margin-bottom: 1px; }
.mm-ic { font-size: 13px; line-height: 1; }
.mm-note-dot { position: absolute; top: -7px; right: -7px; font-size: 11px; cursor: help; }
.mm-node.sel .mm-in { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.mm-app.mm-linking .mm-node.linkable .mm-in { cursor: crosshair; outline: 1px dashed var(--accent); }
.mm-app.mm-dragging { cursor: grabbing; }
.mm-node.mm-drag-src { opacity: .45; }
.mm-node.mm-drop .mm-in { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ok); }
.mm-input { font: inherit; font-size: 13px; padding: 2px 5px; border: 1px solid var(--accent); border-radius: 5px; background: var(--bg); color: var(--text); min-width: 120px; }
.mm-tog { position: absolute; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text-faint); font-size: 11px; font-weight: 700; line-height: 1; cursor: pointer; padding: 0; z-index: 3; }
.mm-tog:hover { color: var(--text); border-color: var(--text-faint); }
.mm-node.tog-right .mm-tog { right: -9px; } .mm-node.tog-left .mm-tog { left: -9px; }
.mm-node.tog-down .mm-tog { top: auto; bottom: -9px; left: 50%; transform: translateX(-50%); }
/* inspector */
.mm-inspector { width: 240px; flex: 0 0 240px; border-left: 1px solid var(--border); background: var(--bg-elev); padding: 12px; overflow-y: auto; }
.mm-ins-empty { font-size: 12.5px; line-height: 1.5; padding: 10px 4px; }
.mm-ins-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); margin-bottom: 10px; }
.mm-ins-row { margin-bottom: 11px; }
.mm-ins-lab { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); margin-bottom: 5px; }
.mm-ins-input { width: 100%; background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: 7px; padding: 6px 8px; font-family: inherit; font-size: 13px; resize: vertical; }
.mm-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.mm-chip { border: 1px solid var(--border); background: var(--bg); color: var(--text-faint); border-radius: 6px; padding: 4px 8px; font-family: inherit; font-size: 12px; cursor: pointer; }
.mm-chip:hover { color: var(--text); }
.mm-chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.mm-chip.ic { font-size: 14px; padding: 3px 6px; }
.mm-chip.del { color: var(--crit); border-color: transparent; }
.mm-chip.del:hover { border-color: var(--crit); }
.mm-sw { display: flex; flex-wrap: wrap; gap: 5px; }
.mm-sw-b { width: 22px; height: 22px; border-radius: 6px; border: 2px solid transparent; cursor: pointer; padding: 0; }
.mm-sw-b.on { border-color: var(--text); }
.mm-sw-b.none { background: var(--bg); border: 1px solid var(--border); position: relative; }
.mm-sw-b.none::after { content: "✕"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; color: var(--text-faint); }
@media (max-width: 820px) { .mm-inspector { display: none; } }
.lw-compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.lw-cmp-card { display: flex; flex-direction: column; align-items: center; transition: border-color .12s; }
.lw-cmp-card:hover { border-color: var(--text-faint); }
.lw-cmp-card.goal { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-soft); }
.lw-cmp-head { display: flex; justify-content: space-between; width: 100%; align-items: baseline; margin-bottom: 6px; }
.lw-cmp-head strong { font-size: 15px; }
.lw-read-card { margin-top: 16px; }
.lw-read { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.lw-read li { font-size: 13.5px; line-height: 1.55; color: var(--text-faint); padding-left: 2px; }
.lw-read li b { color: var(--text); font-weight: 700; }
.lw-legend { display: flex; flex-wrap: wrap; gap: 10px 16px; justify-content: center; margin-top: 16px; padding: 12px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px; }
.lw-leg { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-faint); }
@media (max-width: 1000px) { .lw-layout { grid-template-columns: 1fr; } .lw-wheelbox { position: static; } }
@media (max-width: 640px) { .lw-sections { grid-template-columns: 1fr; } .lw-compare { grid-template-columns: 1fr; } }

@media (max-width: 900px) {
  #app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .kanban { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   Piano Finanziario (FinPlan)
   ============================================================ */
.fp-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; padding: 12px 16px; }
/* --- Input/select FinPlan uniformi in dashboard E wizard (#16) --- */
.fp-toolbar input:not([type="range"]):not([type="checkbox"]):not([type="radio"]),
.fp-toolbar select,
.fp-fld input, .fp-fld select,
.fp-item input:not([type="range"]):not([type="checkbox"]):not([type="radio"]),
.fp-item select,
.fp-steprow input:not([type="range"]):not([type="checkbox"]):not([type="radio"]),
.fp-steprow select {
  background: var(--bg-elev); border: 1px solid var(--border); color: var(--text);
  min-height: 42px; padding: 9px 13px; border-radius: 10px;
  font-family: var(--font); font-size: 14px; font-weight: 600; transition: var(--transition);
}
.fp-toolbar select {
  padding-right: 34px; appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23948EA6' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center;
}
.fp-toolbar input:hover, .fp-toolbar select:hover, .fp-fld input:hover, .fp-fld select:hover,
.fp-item input:hover, .fp-item select:hover, .fp-steprow input:hover, .fp-steprow select:hover { border-color: var(--text-faint); }
.fp-toolbar input:focus, .fp-toolbar select:focus, .fp-fld input:focus, .fp-fld select:focus,
.fp-item input:focus, .fp-item select:focus, .fp-steprow input:focus, .fp-steprow select:focus {
  outline: none; background: var(--bg); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.fp-2col { gap: var(--gap); }
@media (max-width: 1100px) { .fp-2col { grid-template-columns: 1fr !important; } }

/* wizard */
.fp-steps { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.fp-step-chip { border: 1px solid var(--border); background: var(--bg-elev); color: var(--text-dim); border-radius: 999px; padding: 6px 13px; font-size: 12px; font-weight: 600; cursor: pointer; transition: var(--transition); font-family: var(--font); }
.fp-step-chip:hover { border-color: var(--accent); color: var(--text); }
.fp-step-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.fp-step-chip.done { color: var(--ok); border-color: var(--ok); }
.fp-stepbody { min-height: 260px; }

/* righe-editor compatte */
.fp-rowgrid { display: grid; gap: 8px; align-items: center; }
.fp-rowgrid input, .fp-rowgrid select { width: 100%; min-width: 0; }
.fp-rowhead { margin-bottom: 6px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-faint); font-weight: 600; }
.fp-debt { border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 10px; background: var(--bg-elev); }

/* card livelli stile di vita */
.fp-lvl-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 900px) { .fp-lvl-cards { grid-template-columns: 1fr 1fr; } }
.fp-lvl-card { border: 1.5px solid var(--border); border-radius: var(--radius); padding: 13px 14px; cursor: pointer; transition: var(--transition); background: var(--bg-elev); position: relative; }
.fp-lvl-card:hover { border-color: var(--lvl, var(--accent)); }
.fp-lvl-card.sel { border-color: var(--lvl, var(--accent)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lvl, var(--accent)) 22%, transparent); }
.fp-lvl-card .fp-lvl-tag { display: none; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--lvl, var(--accent)); }
.fp-lvl-card.sel .fp-lvl-tag { display: inline; }

/* tabella costi del wizard */
.fp-costtable td.ct-num { padding: 4px 8px; }
.fp-costtable td.ct-num input { width: 92px; text-align: right; }

/* azioni strategiche */
.fp-act { border: 1px solid var(--border-soft); border-left: 3px solid var(--text-faint); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 10px; background: var(--bg-elev); }
.fp-act.sev-crit { border-left-color: var(--crit); }
.fp-act.sev-high { border-left-color: var(--high); }
.fp-act.sev-med { border-left-color: var(--med); }
.fp-act.sev-ok { border-left-color: var(--ok); }

/* ---- FinPlan: stress test ---- */
.fp-stress { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.fp-stress-btn { display: flex; flex-direction: column; gap: 5px; text-align: left; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-elev); cursor: pointer; color: var(--text); font-family: var(--font); font-size: 13px; transition: var(--transition); }
.fp-stress-btn:hover { border-color: var(--accent); background: var(--bg-hover); }

/* ---- FinPlan: report stampabile ---- */
.fp-report { --bg: #ffffff; --bg-elev: #ffffff; --bg-elev-2: #f2f5fa; --bg-hover: #eef1f8; --border: #d9dfea; --border-soft: #e7ebf3; --text: #1a2030; --text-dim: #4a5468; --text-faint: #7a8398; --accent: #3b5bff; --accent-soft: #3b5bff15; --shadow: none;
  background: #fff; color: var(--text); padding: 26px; border-radius: var(--radius); border: 1px solid #d9dfea; }
.fp-rep-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; border-bottom: 2px solid var(--accent); padding-bottom: 14px; }
.fp-report .card { box-shadow: none; }
@media print {
  .sidebar, .topbar, .fp-noprint, #toast, .sync-badge { display: none !important; }
  #app { display: block !important; }
  .main { display: block !important; }
  .content { overflow: visible !important; padding: 0 !important; height: auto !important; }
  html, body { background: #fff !important; height: auto !important; overflow: visible !important; }
  .fp-report { border: none; padding: 0; border-radius: 0; }
  .fp-report .card { break-inside: avoid; }
}

/* ---- FinPlan: rifiniture stampa (report multipagina + tabelle larghe) ---- */
.fp-report { --accent-2: #109e76; }
@media print {
  #app { height: auto !important; }
  .main { overflow: visible !important; height: auto !important; }
  .fp-report { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .fp-report .brand-mark { box-shadow: none; }
  .fp-report .ct-scroll { overflow: visible !important; border: none; }
  .fp-report table.ct { white-space: normal; font-size: 9.5px; table-layout: fixed; }
  .fp-report .ct th, .fp-report .ct td { padding: 3px 5px; }
  .fp-report .ct .ct-rowlabel { min-width: 0; width: 90px; position: static; }
  .fp-report .ct thead th { position: static; }
}

/* ============================================================
   FinPlan v2 — wizard guidato, card editor, hero, guide
   ============================================================ */
/* hero */
.fp-hero { margin-top: 14px; }
.fp-hchips { display: flex; gap: 14px; flex-wrap: wrap; }
.fp-hchip { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.fp-hchip strong { font-size: 14px; }
.fp-hchip span { font-size: 10px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .4px; }
.fp-wizhero { border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 10px 12px 4px; margin-bottom: 16px; background: var(--bg); }

/* intro dei passi */
.fp-stepintro { display: flex; gap: 14px; align-items: flex-start; background: var(--accent-soft); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; }
.fp-stepintro-ic { font-size: 26px; line-height: 1; }
.fp-stepintro strong { font-size: 14px; }
.fp-stepintro p { margin: 4px 0 0; font-size: 12.5px; color: var(--text-dim); line-height: 1.55; }

/* card-voce negli editor (niente griglie Excel) */
.fp-item { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 12px; background: var(--bg-elev); }
.fp-item-grid { display: grid; gap: 10px; align-items: start; }
.fp-fld { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fp-fld label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-faint); font-weight: 600; }
.fp-fld input, .fp-fld select { width: 100%; min-width: 0; }
@media (max-width: 900px) { .fp-item-grid { grid-template-columns: 1fr 1fr !important; } }

/* input con unità di misura — suffisso in flex, mai sopra il numero (Fix #6/#7) */
.fp-unit { display: flex; align-items: stretch; min-width: 0; min-height: 42px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--bg-elev); }
.fp-unit:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.fp-unit input { flex: 1; min-width: 0; width: auto; text-align: right; border: none !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; padding-right: 8px; }
.fp-unit input:focus { box-shadow: none !important; }
.fp-unit > span { flex: 0 0 auto; display: flex; align-items: center; padding: 0 12px; font-size: 12.5px; font-weight: 600; color: var(--text-dim); background: var(--bg); border-left: 1px solid var(--border-soft); pointer-events: none; white-space: nowrap; }

/* riepilogo rata prestito: numero grande e leggibile */
.fp-rata { margin: 12px 0; padding: 12px 14px; border-radius: 12px; background: var(--bg-elev-2); border: 1px solid var(--border-soft); }
.fp-rata-main { display: flex; align-items: baseline; gap: 4px; }
.fp-rata-main strong { font-size: 26px; font-weight: 800; color: var(--text); letter-spacing: -0.5px; }
.fp-rata-unit { font-size: 14px; color: var(--text-dim); font-weight: 600; }
.fp-rata-sub { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 6px; font-size: 13px; color: var(--text-dim); }
.fp-rata-sub span { white-space: nowrap; }

/* pensionamento automatico */
.fp-pension { border: 1px solid var(--border-soft); border-radius: 10px; padding: 12px; background: var(--bg-elev); }
.fp-check { display: flex; align-items: center; gap: 9px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--text); }
.fp-check input[type="checkbox"] { width: 18px; height: 18px; min-height: 0; accent-color: var(--accent); cursor: pointer; }

/* chip tipo entrata / ruolo persona */
.fp-kchips { display: flex; gap: 6px; flex-wrap: wrap; }
.fp-kchip { border: 1px solid var(--border); background: var(--bg-elev); color: var(--text-dim); border-radius: 999px; padding: 7px 13px; font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: var(--font); transition: var(--transition); }
.fp-kchip:hover { border-color: var(--accent); }
.fp-kchip.sel { background: var(--accent); border-color: var(--accent); color: #fff; }

/* scelta scopo debito (investimento vs capriccio, spiegata) */
.fp-scope { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 700px) { .fp-scope { grid-template-columns: 1fr; } }
.fp-scope-card { border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 12px; cursor: pointer; transition: var(--transition); background: var(--bg-elev); }
.fp-scope-card:hover { border-color: var(--accent); }
.fp-scope-card.sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* pulsanti "aggiungi" descrittivi */
.fp-pick { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; text-align: left; padding: 10px 14px; border: 1px dashed var(--border); border-radius: var(--radius-sm); background: transparent; cursor: pointer; color: var(--text); font-family: var(--font); font-size: 13px; transition: var(--transition); max-width: 240px; }
.fp-pick:hover { border-color: var(--accent); background: var(--accent-soft); }

/* righe compatte (tappe, obiettivi, evoluzioni) */
.fp-steprow { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.fp-steprow input, .fp-steprow select { min-width: 0; }
.fp-steprow input[type="number"] { max-width: 110px; }
.fp-steprow .fp-unit { max-width: 150px; }
.fp-steprow > input:first-child { flex: 1; min-width: 140px; }

/* sotto-sezioni del passo Stile di vita */
.fp-subsec { border-top: 1px solid var(--border-soft); margin-top: 22px; padding-top: 16px; }

/* griglia costi per livello — ridisegnata (niente effetto Excel) */
.fp-costgrid { border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; }
.fp-cg-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 8px; align-items: center; padding: 7px 12px; border-bottom: 1px solid var(--border-soft); min-width: 720px; }
.fp-cg-row > div { min-width: 0; }
.fp-cg-row:last-child { border-bottom: none; }
.fp-cg-row:nth-child(even) { background: var(--bg); }
.fp-cg-head { background: var(--bg-elev-2) !important; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; padding: 9px 12px; }
.fp-cg-lvl { text-align: right; padding-right: 8px; }
.fp-cg-cat { font-size: 12.5px; color: var(--text-dim); }
.fp-cg-tot { background: var(--bg-elev-2) !important; font-size: 13px; padding: 10px 12px; }
.fp-cg-row .fp-unit input { padding: 6px 34px 6px 8px; font-size: 12.5px; }
.fp-cg-row .fp-unit > span { right: 8px; }


/* guida "come si legge" */
.fp-guide { border: 1px solid var(--border-soft); border-radius: var(--radius-sm); margin-bottom: 14px; background: var(--bg); }
.fp-guide-head { width: 100%; display: flex; justify-content: space-between; align-items: center; background: none; border: none; color: var(--text-dim); font-family: var(--font); font-size: 12.5px; font-weight: 600; padding: 10px 14px; cursor: pointer; }
.fp-guide-head:hover { color: var(--text); }
.fp-guide-chev { transition: var(--transition); }
.fp-guide.open .fp-guide-chev { transform: rotate(180deg); }
.fp-guide-body { display: none; padding: 2px 14px 12px; }
.fp-guide.open .fp-guide-body { display: block; }
.fp-guide-row { display: grid; grid-template-columns: 170px 1fr; gap: 10px; padding: 5px 0; font-size: 12.5px; border-top: 1px solid var(--border-soft); }
.fp-guide-row strong { color: var(--text); }
.fp-guide-row span { color: var(--text-dim); line-height: 1.5; }
@media (max-width: 700px) { .fp-guide-row { grid-template-columns: 1fr; gap: 2px; } }

/* righe interattive delle tabelle */
.fp .ct .ct-rowlabel.fp-edit { cursor: pointer; }
.fp .ct .ct-rowlabel.fp-edit:hover { color: var(--accent); }
.fp-edit-ic { opacity: 0; font-size: 10px; color: var(--accent); transition: var(--transition); }
.fp .ct .ct-rowlabel.fp-edit:hover .fp-edit-ic { opacity: 1; }
.fp-add-row td { cursor: pointer; color: var(--text-faint); font-size: 11.5px; padding: 6px 12px; }
.fp-add-row:hover td { color: var(--accent); background: var(--accent-soft); }

/* ============================================================
   FinPlan v3 — wizard "una domanda alla volta", mobile-first,
   slider stile di vita, scroll fix (note 14-19)
   ============================================================ */
/* --- scroll fix: usa l'altezza dinamica del viewport su mobile --- */
@supports (height: 100dvh) { @media (max-width: 900px) { #app { height: 100dvh; } } }

/* --- wizard: una domanda alla volta --- */
/* .fp-host deve risolvere l'altezza così che la nav sticky si ancori in fondo */
.fp-host { display: flex; flex-direction: column; min-height: 100%; }
.fp-wiz { flex: 1; width: 100%; max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; }
.fp-wiz-top { position: sticky; top: 0; z-index: 6; background: var(--bg); padding: 4px 0 10px; }
.fp-wiz-bar { height: 6px; border-radius: 999px; background: var(--bg-hover); overflow: hidden; }
.fp-wiz-bar > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .25s ease; }
.fp-wizhero { border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 10px 12px 6px; margin: 8px 0 4px; background: var(--bg-elev); }
.fp-wizhero-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }

.fp-q { flex: 1; padding: 18px 2px 8px; }
.fp-q-head { text-align: center; max-width: 560px; margin: 0 auto 18px; }
.fp-q-ic { font-size: 34px; line-height: 1; margin-bottom: 6px; }
.fp-q-title { font-size: 21px; margin: 0 0 8px; letter-spacing: -.3px; }
.fp-q-why { font-size: 13px; color: var(--text-dim); line-height: 1.55; margin: 0; }
.fp-q-body { margin-top: 4px; }

/* barra di navigazione sempre visibile in basso */
.fp-wiz-nav { position: sticky; bottom: 0; z-index: 20; display: flex; justify-content: space-between; gap: 12px;
  background: var(--bg); border-top: 1px solid var(--border); padding: 12px 0; margin-top: 10px; }
.fp-wiz-nav .btn { padding: 11px 18px; font-size: 14px; }
.fp-nav-main { flex: 1; max-width: 320px; justify-content: center; }

/* --- slider stile di vita (nota 18) --- */
.fp-lslider { margin-bottom: 14px; }
.fp-lslider-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.fp-range { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 999px;
  background: linear-gradient(90deg, #ff5c72, #ffd166, #4fc1ff, #a78bfa); outline: none; margin: 6px 0; }
.fp-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--lvl, var(--accent)); border: 3px solid var(--bg-elev); box-shadow: 0 2px 8px rgba(0,0,0,.35); cursor: grab; }
.fp-range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--lvl, var(--accent)); border: 3px solid var(--bg-elev); cursor: grab; }
.fp-range:active::-webkit-slider-thumb { cursor: grabbing; }
.fp-lticks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 4px; }
.fp-ltick { display: flex; flex-direction: column; gap: 1px; align-items: center; padding: 6px 4px; border: 1px solid transparent;
  border-radius: var(--radius-sm); background: none; cursor: pointer; font-family: var(--font); transition: var(--transition); }
.fp-ltick:hover { background: var(--bg-hover); }
.fp-ltick.sel { border-color: var(--lvl); background: color-mix(in srgb, var(--lvl) 12%, transparent); }
.fp-ltick-lab { font-size: 11.5px; font-weight: 700; color: var(--lvl); }
.fp-ltick-cost { font-size: 10.5px; color: var(--text-faint); }

/* --- mobile-first refinements --- */
@media (max-width: 760px) {
  .content { padding: 16px 14px 80px; }
  .fp-toolbar { padding: 10px 12px; }
  .fp-toolbar .split { width: 100%; }
  .fp-toolbar select { flex: 1; max-width: none !important; }
  .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; }
  .tabs .tab { white-space: nowrap; flex: 0 0 auto; }
  .fp-hchips { width: 100%; justify-content: space-between; gap: 8px; }
  .fp-hchip strong { font-size: 13px; }
  .cards-4 { grid-template-columns: 1fr 1fr; }
  .fp-lvl-cards { grid-template-columns: 1fr; }
  .fp-item-grid { grid-template-columns: 1fr !important; }
  .fp-scope { grid-template-columns: 1fr; }
  .fp-q-title { font-size: 19px; }
  .fp-q-ic { font-size: 30px; }
  .fp-wiz-nav .btn { padding: 13px 16px; }
  .fp-lticks .fp-ltick-cost { display: none; }
}
@media (max-width: 420px) {
  .cards-4 { grid-template-columns: 1fr; }
  .fp-hchips { flex-direction: column; align-items: stretch; }
  .fp-hchip { flex-direction: row; justify-content: space-between; }
}

/* --- FinPlan: navigazione finestra grafico (nota 20) + traguardo libertà (nota 21) --- */
.fp-hero-nav { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.fp-hero-nav .btn { padding: 3px 12px; font-size: 15px; line-height: 1; }
.fp-fitarget { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 12px; background: color-mix(in srgb, var(--high) 8%, var(--bg-elev)); }
.fp-fitarget input[type="number"] { max-width: 90px; }

/* --- FinPlan: costi come elenco pulito, non griglia Excel (nota 23) --- */
.fp-costlist { max-width: 520px; margin: 0 auto; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.fp-costrow { display: flex; align-items: center; gap: 12px; padding: 8px 14px; border-bottom: 1px solid var(--border-soft); }
.fp-costrow:last-child { border-bottom: none; }
.fp-costrow:nth-child(even) { background: var(--bg); }
.fp-costrow-lab { flex: 1; font-size: 13px; color: var(--text-dim); }
.fp-costrow .fp-unit { width: 140px; flex: 0 0 auto; }
.fp-costrow-tot { background: var(--bg-elev-2) !important; font-size: 14px; }
.fp-costrow-tot .fp-costrow-lab { color: var(--text); font-weight: 700; }

/* --- FinPlan: piani di ammortamento, griglia colorata stile Excel (nota 24) --- */
table.fp-amort .fp-amort-head { font-weight: 600; }
table.fp-amort .fp-amort-head span { display: inline-block; }
table.fp-amort tr:hover .fp-amort-head { filter: brightness(1.08); }
table.fp-amort .fp-amort-detail { padding-left: 30px; color: var(--text-dim); font-weight: 400; font-size: 11.5px; }
table.fp-amort td.ct-num { min-width: 58px; }

/* --- FinPlan: timeline painter dello stile di vita (nota 26) --- */
.fp-painter-box { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-elev); padding: 4px; overflow: hidden; }
.fp-painter-box svg { display: block; width: 100%; height: auto; }
.fp-painter-info { font-size: 12px; text-align: center; margin-top: 6px; min-height: 15px; font-weight: 600; color: var(--text-dim); }

/* --- FinPlan: grafico↔tabella collegati + scroll con la manina (nota 29) --- */
.ct td.fp-yhi, .ct th.fp-yhi { box-shadow: inset 0 0 0 999px var(--accent-soft); }
.ct-scroll.fp-drag { cursor: grab; }
.ct-scroll.fp-grabbing { cursor: grabbing; user-select: none; }
.ct-scroll.fp-grabbing * { pointer-events: none; }
.fp-hero .cf-wrap { cursor: grab; }

/* ============================================================
   ██ REDESIGN "Rotta / Paper" · Claude Design ██
   Livello di override sopra il design system storico.
   Shell (sidebar · topbar · footer) + card + home "La tua rotta".
   ============================================================ */

/* ---------- sfondo app ---------- */
body { background: var(--bg); }

/* ---------- SIDEBAR ---------- */
.sidebar { width: var(--sidebar-w); background: var(--bg-elev); border-right: 1px solid var(--border); padding: 0; gap: 0; }
.brand { padding: 22px 22px 14px; gap: 0; }
.brand-logo { display: block; width: 190px; max-width: 100%; height: auto; }
/* fallback mark+testo se il logo orizzontale non è usato */
.brand .brand-mark { width: 34px; height: 34px; border-radius: 10px; box-shadow: 0 6px 16px -6px rgba(74,134,255,.5); }
.brand .brand-text strong { font-size: 16px; }

.nav { padding: 4px 14px 14px; gap: 0; margin-top: 0; overflow-y: auto; }
.nav-group-block { --group: var(--accent); }
.nav-group-block:first-child { margin-top: 4px; }
.nav-group { display: flex; align-items: center; gap: 7px; padding: 15px 10px 7px; font-size: 10.5px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-faint); }
.nav-group-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--group); flex: none; }
.nav-item { position: relative; display: flex; align-items: center; gap: 11px; width: 100%; padding: 8px 10px; margin-bottom: 2px; border: none; background: transparent; border-radius: 11px; cursor: pointer; text-align: left; font-family: var(--font); transition: background var(--transition); }
.nav-ic { flex: none; width: 30px; height: 30px; border-radius: 9px; background: color-mix(in srgb, var(--group) 12%, var(--bg-elev-2)); color: var(--group); display: grid; place-items: center; font-size: 14px; transition: var(--transition); }
.nav-item .nav-label { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 500; color: var(--text-dim); }
.nav-item:hover { background: var(--bg-elev-2); }
.nav-item.active { background: color-mix(in srgb, var(--group) 9%, var(--bg-elev-2)); }
.nav-item.active .nav-ic { background: var(--group); color: #fff; }
.nav-item.active .nav-label { font-weight: 700; color: var(--text); }
.nav-item.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--group); }

/* footer: user card + controlli */
.sidebar-footer { margin-top: auto; flex-direction: column; align-items: stretch; gap: 8px; padding: 14px; border-top: 1px solid var(--border); }
.user-card { display: flex; align-items: center; gap: 11px; padding: 9px; border-radius: 12px; background: var(--bg-elev-2); border: 1px solid var(--border-soft); cursor: pointer; font-family: var(--font); text-align: left; width: 100%; }
.user-card:hover { border-color: var(--border); }
.user-av { flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--grad-accent-135); color: #fff; display: grid; place-items: center; font-size: 15px; font-weight: 700; }
.user-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.user-meta strong { font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta span { font-size: 11px; color: var(--text-faint); }
.user-gear { color: var(--text-faint); font-size: 15px; }
.foot-controls { display: flex; gap: 6px; }
.foot-controls .ghost-btn { flex: 1; border-radius: 10px; }

/* ---------- TOPBAR ---------- */
.topbar { height: 78px; padding: 0 34px; align-items: center; gap: 20px; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.topbar-left { flex: 1; min-width: 0; }
.topbar h1 { font-size: 20px; font-weight: 800; letter-spacing: -.4px; color: var(--text); }
.topbar .muted { font-size: 13px; color: var(--text-dim); margin-top: 1px; }
.topbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.route-progress { display: flex; align-items: center; gap: 8px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 99px; padding: 7px 14px; }
.route-progress .rp-track { width: 64px; height: 6px; border-radius: 99px; background: #E6EAF2; overflow: hidden; }
.route-progress .rp-fill { height: 100%; background: var(--grad-progress); border-radius: 99px; transition: width .4s ease; }
.route-progress .rp-pct { font-size: 12.5px; font-weight: 700; color: var(--text); }
.route-progress .rp-lab { font-size: 12px; color: var(--text-faint); }
.next-step-btn { border-radius: 12px; padding: 11px 18px; white-space: nowrap; }

/* Notifica admin: campanella richieste in attesa (topbar) + badge sulla voce Utenti */
.topbar-bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-elev); font-size: 18px; line-height: 1; cursor: pointer; flex: 0 0 auto; }
.topbar-bell:hover { border-color: var(--text-faint); }
.topbar-bell .bell-count { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--crit); color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; box-shadow: 0 2px 6px -1px rgba(0,0,0,.3); }
.nav-item .nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--crit); color: #fff; font-size: 11px; font-weight: 800; line-height: 20px; text-align: center; }
.account-cp-form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
/* Icone stilizzate monocromatiche (ereditano currentColor): occhio "mostra password" + tab account */
.login-pass .reveal { color: var(--text-dim); }
.login-pass .reveal svg { display: block; }
.tab-item .tab-ic svg { display: block; }
.tab-item.tab-acct { color: var(--text-faint); }   /* funzione secondaria: sempre in secondo piano */

.content { padding: 30px 34px 44px; }

/* ---------- BOTTONI ---------- */
.btn { border-radius: 12px; }
.btn.primary { background: var(--grad-accent); border: none; color: #fff; box-shadow: var(--shadow-btn); font-weight: 700; }
.btn.primary:hover { filter: brightness(1.05); }
.btn.sm { border-radius: 9px; }

/* ---------- CARD / STAT / BADGE ---------- */
.card { border-radius: 18px; border-color: var(--border); box-shadow: var(--shadow-card); }
.card-title { font-size: 11px; font-weight: 800; letter-spacing: 1.2px; color: var(--text-dim); }
.stat .value { font-weight: 800; letter-spacing: -.5px; }
.badge { border-radius: 99px; font-weight: 700; }
.tabs { background: var(--bg-elev); border-radius: 12px; }
.tab.active { background: var(--bg-elev-2); box-shadow: 0 1px 2px rgba(21,17,29,.06); }
.section-head h2 { font-weight: 750; }

/* overlay più leggeri sul tema chiaro */
[data-theme="light"] .modal-overlay { background: rgba(21,17,29,.34); }
[data-theme="light"] #drawerHost .drawer-overlay { background: rgba(21,17,29,.26); }
[data-theme="light"] .modal { box-shadow: 0 40px 100px -30px rgba(21,17,29,.4), 0 0 0 1px rgba(21,17,29,.05); }

/* punti canvas mappa un filo più marcati su carta */
[data-theme="light"] .mm-root { background-image: radial-gradient(#E4E9F1 1.3px, transparent 1.3px); background-size: 26px 26px; }

/* ============================================================
   HOME · "La tua rotta"
   ============================================================ */
.hs-home { display: flex; flex-direction: column; animation: hsFade .35s ease; }
@keyframes hsFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.hs-top { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; }
.hs-journey { background: var(--grad-card); border: 1px solid var(--border); border-radius: 22px; padding: 28px; display: flex; align-items: center; gap: 28px; box-shadow: var(--shadow-hero); }
.hs-ring { flex: none; width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; }
.hs-ring-inner { width: 104px; height: 104px; border-radius: 50%; background: var(--bg-elev); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.hs-ring-pct { font-size: 30px; font-weight: 800; color: var(--text); letter-spacing: -.5px; }
.hs-ring-lab { font-size: 10px; font-weight: 800; letter-spacing: 1px; color: var(--text-faint); }
.hs-journey-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 1.5px; color: var(--phase-track); text-transform: uppercase; }
.hs-journey-title { font-size: 23px; font-weight: 800; letter-spacing: -.4px; color: var(--text); margin-top: 6px; line-height: 1.2; }
.hs-journey-copy { font-size: 13.5px; line-height: 1.55; color: var(--text-dim); margin-top: 8px; max-width: 340px; }

.hs-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hs-kpi { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 18px; padding: 18px 20px; }
.hs-kpi-lab { font-size: 12px; color: var(--text-faint); font-weight: 600; }
.hs-kpi-val { font-size: 24px; font-weight: 800; letter-spacing: -.5px; margin-top: 8px; }
.hs-kpi-sub { font-size: 11.5px; color: var(--text-dim); margin-top: 2px; }

.hs-label { font-size: 12px; font-weight: 800; letter-spacing: 1.5px; color: var(--text-faint); text-transform: uppercase; margin: 30px 0 14px; }
.hs-phases { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.hs-phase { text-align: left; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 18px; padding: 20px; cursor: pointer; font-family: var(--font); box-shadow: var(--shadow-card); transition: transform var(--transition), box-shadow var(--transition); }
.hs-phase:hover { transform: translateY(-2px); box-shadow: var(--shadow-hero); }
.hs-phase-top { display: flex; align-items: center; justify-content: space-between; }
.hs-tile { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 19px; }
.hs-phase-pct { font-size: 19px; font-weight: 800; }
.hs-phase-en { font-size: 10.5px; font-weight: 800; letter-spacing: 1.5px; margin-top: 16px; }
.hs-phase-lab { font-size: 17px; font-weight: 800; color: var(--text); margin-top: 1px; }
.hs-phase-bar { height: 6px; border-radius: 99px; background: var(--bg-elev-2); margin-top: 12px; overflow: hidden; }
.hs-phase-bar > span { display: block; height: 100%; border-radius: 99px; transition: width .4s ease; }
.hs-phase-tools { font-size: 11.5px; color: var(--text-faint); margin-top: 10px; }

.hs-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 30px; }
.hs-steps { display: flex; flex-direction: column; gap: 10px; }
.hs-step { display: flex; align-items: center; gap: 14px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; cursor: pointer; font-family: var(--font); text-align: left; width: 100%; transition: border-color var(--transition); }
.hs-step:hover { border-color: var(--text-faint); }
.hs-step-tile { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 15px; }
.hs-step-main { flex: 1; min-width: 0; }
.hs-step-main strong { display: block; font-size: 14px; font-weight: 700; color: var(--text); }
.hs-step-main span { display: block; font-size: 12px; color: var(--text-faint); margin-top: 1px; }
.hs-step-arrow { color: #C4C9D6; font-size: 16px; }
.hs-recent { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 16px; padding: 4px 18px; box-shadow: var(--shadow-card); }
.hs-recent-row { display: flex; align-items: center; gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--border-soft); }
.hs-recent-row:last-child { border-bottom: none; }
.hs-recent-row .txt { flex: 1; font-size: 13.5px; color: var(--text); }
.hs-recent-row .time { font-size: 11.5px; color: var(--text-faint); }
.hs-recent-empty { padding: 26px 4px; text-align: center; color: var(--text-faint); font-size: 13px; }

@media (max-width: 1100px) {
  .hs-top { grid-template-columns: 1fr; }
  .hs-bottom { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .topbar { height: auto; padding: calc(14px + env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) 14px max(18px, env(safe-area-inset-left)); flex-wrap: wrap; }
  .content { padding: 18px max(16px, env(safe-area-inset-right)) 80px max(16px, env(safe-area-inset-left)); }
  .hs-phases { grid-template-columns: 1fr 1fr; }
  .route-progress { display: none; }
}
@media (max-width: 560px) {
  .hs-phases { grid-template-columns: 1fr; }
  .hs-kpis { grid-template-columns: 1fr; }
  .hs-journey { flex-direction: column; text-align: center; }
}

/* ---------- Progetti: card a bordo superiore colorato (design) ---------- */
.proj-card { overflow: hidden; }
.proj-card .accent-line { top: 0; left: 0; right: 0; bottom: auto; width: auto; height: 4px; }
.proj-card h3 { font-size: 17px; font-weight: 800; letter-spacing: -.2px; }

/* ---------- Task board (design) ---------- */
.kcol { background: var(--bg-elev-2); border-color: var(--border); border-radius: 18px; }
.kcol-head { text-transform: none; letter-spacing: 0; font-size: 13.5px; font-weight: 800; color: var(--text); }
.kcol-head .count { background: var(--bg-elev); color: var(--text-faint); font-weight: 700; }
.kcard { background: var(--bg-elev); border-radius: 12px; box-shadow: 0 4px 12px -10px rgba(21,17,29,.4); }
@media (max-width: 900px) { .kanban { grid-template-columns: 1fr 1fr; } }

/* ---------- Dashboard: card scura "Cresci" (unico accento scuro nel Paper) ---------- */
.hs-cresci { background: linear-gradient(140deg,#2B2440,#1C1730); border-radius: 20px; padding: 26px; color: #fff; cursor: pointer; display: flex; flex-direction: column; justify-content: center; box-shadow: var(--shadow-card); }
.hs-cresci:hover { filter: brightness(1.08); }
.hs-cresci-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(255,255,255,.6); }
.hs-cresci-title { font-size: 20px; font-weight: 800; margin-top: 10px; line-height: 1.25; }
.hs-cresci-copy { font-size: 13px; line-height: 1.55; color: rgba(255,255,255,.75); margin-top: 8px; }

/* ============================================================
   ONBOARDING · splash aurora + 4 tappe (Rotta)
   ============================================================ */
.onb-overlay { position: fixed; inset: 0; z-index: 600; background: radial-gradient(120% 80% at 50% -10%, #E7EAF2, #D9DDE7 60%); display: grid; place-items: center; padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); }
.onb-wrap { width: 100%; max-width: 440px; height: 100%; max-height: 840px; background: var(--bg-elev); border-radius: 28px; overflow: hidden; box-shadow: 0 40px 100px -30px rgba(21,17,29,.4), 0 0 0 1px rgba(21,17,29,.04); display: flex; flex-direction: column; }
.onb-wrap.aurora { background: var(--grad-aurora); }
.onb-screen { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 44px 30px; position: relative; overflow-y: auto; animation: hsFade .3s ease; }

.onb-welcome-card { background: rgba(255,255,255,.94); border-radius: 28px; padding: 34px 30px; display: flex; flex-direction: column; align-items: center; gap: 10px; box-shadow: 0 24px 60px -24px rgba(21,17,29,.45); }
.onb-mark { width: 86px; height: 86px; }
.onb-word { font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
.onb-word .bn-helm { color: var(--brand-helm); } .onb-word .bn-spring { color: var(--brand-spring); }
.onb-payoff { display: flex; gap: 8px; align-items: center; font-size: 11px; font-weight: 800; letter-spacing: 2px; }
.onb-payoff .onb-mid { color: #C4C9D6; }
.onb-welcome-copy { color: #fff; font-size: 15px; line-height: 1.6; margin-top: 28px; max-width: 320px; text-shadow: 0 1px 14px rgba(21,17,29,.4); }

.onb-title { font-size: 26px; font-weight: 800; letter-spacing: -.4px; color: var(--text); }
.onb-sub { font-size: 14px; line-height: 1.6; color: var(--text-dim); margin-top: 10px; max-width: 340px; }
.onb-phaselist { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; width: 100%; }
.onb-phase { display: flex; align-items: center; gap: 14px; text-align: left; background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; }
.onb-phase-tile { flex: none; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 20px; }
.onb-phase-en { font-size: 10.5px; font-weight: 800; letter-spacing: 1.5px; }
.onb-phase-it { font-size: 16px; font-weight: 800; color: var(--text); margin-top: 1px; }
.onb-phase-d { font-size: 12.5px; color: var(--text-faint); margin-top: 1px; }
.onb-flow { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 32px; }
.onb-flow-tile { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 23px; }
.onb-flow-arrow { color: var(--text-faint); font-size: 16px; }
.onb-ring { width: 150px; height: 150px; border-radius: 50%; background: conic-gradient(from 140deg, #2FE6C2, #4A86FF, #8A5BFF, #D24FE0, #FF5AA0, #2FE6C2); display: grid; place-items: center; margin-bottom: 28px; }
.onb-ring-inner { width: 120px; height: 120px; border-radius: 50%; background: var(--bg-elev); display: grid; place-items: center; }

.onb-skip { position: absolute; top: 20px; right: 20px; background: var(--bg-elev-2); color: var(--text-dim); border: none; border-radius: 99px; padding: 7px 15px; font-family: var(--font); font-size: 12.5px; font-weight: 700; cursor: pointer; }
.onb-wrap.aurora .onb-skip { background: rgba(255,255,255,.22); color: #fff; backdrop-filter: blur(4px); }

.onb-foot { flex: none; display: flex; align-items: center; gap: 14px; padding: 18px 24px 24px; border-top: 1px solid var(--border-soft); }
.onb-wrap.aurora .onb-foot { border-top-color: rgba(255,255,255,.25); }
.onb-back { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); font-size: 18px; cursor: pointer; font-family: var(--font); }
.onb-wrap.aurora .onb-back { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.35); color: #fff; }
.onb-dots { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; }
.onb-dot-i { width: 7px; height: 7px; border-radius: 99px; background: var(--border); transition: all .25s; }
.onb-dot-i.on { width: 22px; background: var(--phase-track); }
.onb-wrap.aurora .onb-dot-i { background: rgba(255,255,255,.4); }
.onb-wrap.aurora .onb-dot-i.on { background: #fff; }
.onb-next { min-width: 140px; justify-content: center; }
@media (max-height: 720px) { .onb-screen { padding: 24px 26px; } .onb-title { font-size: 22px; } }
/* Mobile: onboarding compatto per stare in una sola schermata senza scroll (segn. #1) */
@media (max-width: 560px) {
  .onb-overlay { padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
  .onb-wrap { max-height: none; border-radius: 24px; }
  .onb-screen { justify-content: safe center; padding: 26px 22px 18px; }
  .onb-title { font-size: 21px; }
  .onb-sub { font-size: 13px; margin-top: 8px; }
  .onb-phaselist { margin-top: 16px; gap: 9px; }
  .onb-phase { padding: 10px 13px; gap: 12px; border-radius: 14px; }
  .onb-phase-tile { width: 38px; height: 38px; border-radius: 11px; font-size: 18px; }
  .onb-phase-it { font-size: 15px; }
  .onb-phase-d { font-size: 12px; }
  .onb-welcome-card { padding: 26px 22px; }
  .onb-welcome-copy { margin-top: 16px; font-size: 14px; }
  .onb-mark { width: 72px; height: 72px; }
  .onb-word { font-size: 26px; }
  .onb-ring { width: 118px; height: 118px; margin-bottom: 20px; }
  .onb-ring-inner { width: 94px; height: 94px; }
  .onb-flow { margin-top: 22px; gap: 6px; }
  .onb-flow-tile { width: 46px; height: 46px; font-size: 20px; }
  .onb-foot { padding: 14px 18px calc(16px + env(safe-area-inset-bottom)); }
}

/* ---------- Calendario: "oggi" nel colore della fase Monitora (viola) ---------- */
.cal-cell.today { background: color-mix(in srgb, var(--phase-track) 10%, var(--bg-elev)); }
.cal-cell.today .cal-num { background: var(--phase-track); color: #fff; }

/* ---------- Trading: badge profitto verde tenue, leggibile su carta ---------- */
.jt .jt-profit.pos { color: #0d6b57; background: rgba(16,180,151,.18); }

/* ============================================================
   ██ BATCH CORREZIONI #1–#9 (feedback utente) ██
   ============================================================ */

/* #1 — logo nel login */
.login-logo { width: 46px; height: 46px; border-radius: 12px; box-shadow: 0 8px 20px -8px rgba(74,134,255,.5); }

/* #3 — slider stile di vita più tap-friendly su mobile */
@media (max-width: 640px) {
  .fp-ltick { padding: 12px 6px; min-height: 48px; border: 1px solid var(--border); }
  .fp-ltick.sel { border-color: var(--lvl); }
  .fp-range { height: 12px; }
  .fp-range::-webkit-slider-thumb { width: 32px; height: 32px; }
  .fp-range::-moz-range-thumb { width: 30px; height: 30px; }
}

/* #5 — costi come card verticali su mobile (campo a tutta larghezza) */
@media (max-width: 640px) {
  .fp-costrow { flex-direction: column; align-items: stretch; gap: 4px; padding: 12px 14px; }
  .fp-costrow-lab { font-size: 13.5px; }
  .fp-costrow .fp-unit { width: 100%; }
  .fp-costrow .fp-unit input { min-height: 44px; font-size: 16px; }
}

/* #8/#17 — avviso ANIMATO "ruota lo schermo" per le tabelle larghe di FinPlan (solo mobile verticale) */
.fp-rotate-hint { display: none; }
@media (max-width: 820px) and (orientation: portrait) {
  .fp-rotate-hint { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 11px 14px; border-radius: 12px; background: var(--accent-soft); border: 1px solid var(--border); color: var(--text-dim); font-size: 12.5px; font-weight: 600; animation: hsFade .35s ease; }
}
.fp-rotate-hint .rot-ic { font-size: 20px; display: inline-block; animation: rotHint 2.4s ease-in-out infinite; }
@keyframes rotHint { 0%, 30%, 100% { transform: rotate(0); } 55%, 80% { transform: rotate(90deg); } }

/* #13 — header/azioni topbar compatte su mobile (mappe e non solo) */
@media (max-width: 900px) {
  .topbar-actions .btn { padding: 7px 10px; font-size: 12px; }
  .topbar-actions .btn.icon { padding: 7px 9px; }
  .topbar-actions select { max-width: 148px !important; }
  .topbar-left h1 { font-size: 18px; }
}

/* #2a — intro Mappe Mentali */
.mm-intro { position: relative; }
.mm-intro-x { position: absolute; top: 12px; right: 12px; background: transparent; border: none; color: var(--text-faint); font-size: 18px; line-height: 1; cursor: pointer; }
.mm-intro-x:hover { color: var(--text); }
.mm-intro ol { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.mm-intro li { font-size: 13px; color: var(--text-dim); line-height: 1.5; }
.mm-intro li b { color: var(--text); }

/* #2b — canvas mappa visibile su mobile: header basso + toolbar scrollabile */
@media (max-width: 820px) {
  .mm-holder2 { height: auto; min-height: 0; }
  .mm-holder2.mm-app { height: 76vh; }
  .mm-tools { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .mm-tools::-webkit-scrollbar { display: none; }
  .mm-tb, .mm-tsel { flex: 0 0 auto; font-size: 11.5px; height: 28px; padding: 0 8px; }
}
@supports (height: 100dvh) { @media (max-width: 820px) { .mm-holder2.mm-app { height: 76dvh; } } }
.mm-scrollhint { position: absolute; right: 10px; bottom: 10px; z-index: 4; background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: 99px; padding: 6px 12px; font-size: 11.5px; color: var(--text-dim); box-shadow: var(--shadow); pointer-events: none; transition: opacity .3s; }

/* #2d — "+" inline sui nodi mappa */
.mm-add { position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--accent); background: var(--bg-elev); color: var(--accent); font-weight: 700; font-size: 12px; line-height: 1; cursor: pointer; padding: 0; z-index: 3; opacity: 0; transition: opacity .1s; display: grid; place-items: center; }
.mm-node:hover .mm-add, .mm-node.sel .mm-add { opacity: 1; }
.mm-add:hover { background: var(--accent); color: #fff; }
.mm-node .mm-add { right: -11px; top: calc(50% + 16px); }
.mm-node.tog-down .mm-add { top: auto; bottom: -11px; left: calc(50% + 16px); right: auto; }
.mm-node.s-l .mm-add { right: auto; left: -11px; }

/* mappa dei sogni: evidenzia ramo attivo (wizard #2c) */
.mm-app.mm-focus .mm-node:not(.mm-hl) .mm-in { opacity: .38; transition: opacity .2s; }
.mm-node.mm-hl .mm-in { box-shadow: 0 0 0 3px var(--accent-soft), 0 8px 20px -8px rgba(74,134,255,.5); }

/* #9 — TAB BAR MOBILE */
.tabbar { display: none; }
@media (max-width: 900px) {
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 120; background: rgba(247,248,251,.94); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border-top: 1px solid #E2E7F0; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .tab-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; background: none; border: none; padding: 6px 2px; cursor: pointer; font-family: var(--font); color: #A7A2B0; }
  .tab-item .tab-ic { font-size: 19px; line-height: 1; }
  .tab-item .tab-lb { font-size: 10px; font-weight: 700; letter-spacing: .2px; }
  .tab-item.active { color: var(--tabc, var(--accent)); }
  .main .content { padding-bottom: 84px; }
}

/* ===== BATCH 2 — audit mobile: overflow + tab bar + dashboard grid ===== */
/* dashboard: righe a due colonne responsive (niente più grid inline) */
.dash-2col { display: grid; gap: 20px; margin-top: 20px; }
.dash-2col.a { grid-template-columns: 1.5fr 1fr; }
.dash-2col.b { grid-template-columns: 1fr 1fr; }

@media (max-width: 900px) {
  html, body { overflow-x: hidden; }
  /* niente scrollbar classica sul contenuto: eviterebbe uno shift asimmetrico (contenuto non centrato) */
  .main .content { overflow-x: hidden; padding-bottom: 90px; scrollbar-width: none; }
  .main .content::-webkit-scrollbar { display: none; }
  /* topbar: nascondi prossimo-passo e progress (sforano); azioni a capo */
  .next-step-btn { display: none !important; }
  .route-progress { display: none !important; }
  .topbar-right { flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
  .topbar-actions { flex-wrap: wrap; justify-content: flex-end; }
  /* dashboard e blocchi a due colonne → una colonna */
  .dash-2col.a, .dash-2col.b { grid-template-columns: 1fr; }
  /* clearance tab bar per wizard/sticky-bottom */
  .fp-wiz-nav { bottom: 74px; }
}
/* lifewheel: il suo padding !important non deve coprire lo spazio della tab bar */
@media (max-width: 680px) { .main .content { padding-bottom: 90px !important; } }

/* bottom sheet menù fasi (mobile) */
.phsheet-ov { position: fixed; inset: 0; z-index: 130; background: rgba(21,17,29,.34); opacity: 0; transition: opacity .2s; }
.phsheet-ov.open { opacity: 1; }
.phsheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 131; background: var(--bg-elev); border-radius: 22px 22px 0 0; padding: 10px 16px calc(20px + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform .24s cubic-bezier(.4,0,.2,1); box-shadow: 0 -10px 40px rgba(21,17,29,.25); }
.phsheet.open { transform: none; }
.phsheet-grab { width: 40px; height: 4px; border-radius: 99px; background: var(--border); margin: 4px auto 12px; }
.phsheet-title { font-size: 11px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-faint); margin-bottom: 8px; }
.phsheet-item { display: flex; align-items: center; gap: 13px; width: 100%; padding: 13px 8px; border: none; background: none; cursor: pointer; font-family: var(--font); text-align: left; border-radius: 12px; }
.phsheet-item:active, .phsheet-item:hover { background: var(--bg-elev-2); }
.phsheet-item .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 15px; flex: none; }
.phsheet-item .lb { font-size: 15px; font-weight: 600; color: var(--text); }

/* ============================================================
   ██ PRO — badge nav + paywall (anteprima poi blocco) ██
   ============================================================ */
:root { --pro-grad: linear-gradient(120deg,#F5A623,#F7B733); }
/* badge PRO nelle voci di menù */
.nav-pro { margin-left: auto; font-size: 8.5px; font-weight: 800; letter-spacing: .5px; color: #fff; background: var(--pro-grad); padding: 2px 6px; border-radius: 6px; flex: none; box-shadow: 0 2px 6px -2px rgba(245,166,35,.6); }
.nav-item.active .nav-pro { box-shadow: none; }
body.pro-unlocked .nav-pro { display: none; }

/* overlay paywall sopra il contenuto della sezione */
.main { position: relative; }
.paywall-ov { position: absolute; inset: 0; z-index: 110; display: grid; place-items: center; padding: 24px; background: color-mix(in srgb, var(--bg) 52%, transparent); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); animation: hsFade .3s ease; }
.paywall-card { max-width: 430px; width: 100%; text-align: center; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 22px; padding: 34px 28px; box-shadow: 0 24px 60px -22px rgba(21,17,29,.45); }
.paywall-lock { width: 66px; height: 66px; margin: 0 auto; border-radius: 20px; display: grid; place-items: center; font-size: 30px; background: rgba(247,183,51,.14); }
.paywall-badge { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: 1.5px; color: #B8860B; background: rgba(247,183,51,.16); border-radius: 99px; padding: 4px 12px; margin: 14px 0 12px; }
.paywall-card h2 { font-size: 21px; font-weight: 800; letter-spacing: -.3px; color: var(--text); }
.paywall-card p { font-size: 13.5px; color: var(--text-dim); margin-top: 8px; line-height: 1.55; }
.paywall-card .paywall-cta { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; align-items: stretch; }
.paywall-card .btn.pro { background: var(--pro-grad); border: none; color: #fff; justify-content: center; box-shadow: 0 8px 20px -8px rgba(245,166,35,.6); }
.paywall-feats { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.paywall-feats li { font-size: 12.5px; color: var(--text-dim); display: flex; gap: 8px; }
.paywall-feats li b { color: var(--text); font-weight: 600; }

/* toggle PRO nella sezione Utenti */
.pro-switch { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 99px; border: 1px solid var(--border); background: var(--bg); cursor: pointer; font-family: var(--font); color: var(--text-dim); }
.pro-switch.on { background: var(--pro-grad); border-color: transparent; color: #fff; }
