/* ============================================================
   Gestionale Mobile Watt — design system (Inter, light-mode).
   ============================================================ */

/* Font Inter VENDORIZZATO (niente più Google Fonts CDN esterno):
   coerente con la filosofia self-contained del gestionale, funziona offline. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../vendor/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../vendor/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* ============ TEMA GRAFITE (scelto da Tommaso 17/07) ============
     Stessa famiglia del portale ateneo: base grafite quasi-nera SENZA
     tinta, card piatte bordo 1px, niente glow/gradienti decorativi,
     accento VERDE brand solo su nav attiva, dati e stati interattivi. */

  /* Ink (testo — chiaro su grafite) */
  --ink:        #F2F0EA;
  --ink-2:      #D8D5CD;
  --ink-3:      #A4A19A;
  --ink-4:      #85827B;
  --ink-5:      #64615C;
  --ink-inverse:#141416;             /* testo sopra elementi color --ink (pillole chiare) */

  /* Surfaces (grafite, un solo tono, solo la luminosità cambia) */
  --canvas:     #101011;
  --surface:    #19191B;
  --surface-2:  #222225;
  --surface-3:  #2A2A2E;

  /* Hairlines (chiare a bassa opacità: si sentono, non si vedono) */
  --line:       rgba(255,255,255,0.09);
  --line-2:     rgba(255,255,255,0.16);

  /* Accento primario = VERDE brand (il token si chiama --blue per storia:
     lo usano bottoni primari, nav, link — NON rinominare, cambia solo il valore) */
  --blue:       #34C759;
  --blue-ink:   #7ED9A0;
  --blue-soft:  rgba(52,199,89,0.16);
  --green:      #34C759;
  --green-ink:  #7ED9A0;
  --green-soft: rgba(52,199,89,0.15);
  --amber:      #F5A623;
  --amber-ink:  #F0B457;
  --amber-soft: rgba(245,166,35,0.15);
  --red:        #FF5D52;
  --red-ink:    #FF8A80;
  --red-soft:   rgba(255,99,88,0.14);
  --purple:     #9E74EC;
  --purple-ink: #BCA1F2;
  --purple-soft:rgba(142,91,232,0.18);

  /* Type */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;

  /* Radius */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 22px; --r-pill: 999px;

  /* Shadow → sul grafite le ombre non si leggono: ring 1px (depth-strategy unica) */
  --sh-xs: 0 0 0 1px rgba(255,255,255,0.05);
  --sh-sm: 0 0 0 1px rgba(255,255,255,0.06);
  --sh-md: 0 0 0 1px rgba(255,255,255,0.08), 0 12px 32px rgba(0,0,0,0.45);
  --sh-lg: 0 0 0 1px rgba(255,255,255,0.10), 0 24px 64px rgba(0,0,0,0.55);

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --sidebar-w: 230px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body {
  font-family: var(--font);
  background: var(--canvas);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.011em;
}
html, body { overflow-x: hidden; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.tnum { font-variant-numeric: tabular-nums; }
/* anti-orfani: titoli bilanciati, testi senza parole isolate a fine riga (interface-design skill) */
.page-head__title, .topbar__title, .drawer__title, h1, h2, h3 { text-wrap: balance; }
.page-head__sub, .mw-sub, p { text-wrap: pretty; }
/* Default inline-icon size. Any icon() SVG carries .ic; component rules like
   `.btn svg`/`.chip svg` (higher specificity) override this where needed. This
   prevents a bare icon dropped into a table cell or text from ballooning to
   fill its container. Chart SVGs use .chart/.spark, not .ic, so are unaffected. */
.ic { width: 15px; height: 15px; flex-shrink: 0; vertical-align: -2px; }

/* ============================================================ APP SHELL */
.app { min-height: 100vh; }
@view-transition { navigation: auto; }
.sidebar { view-transition-name: odr-sidebar; }
.main { view-transition-name: odr-main; }

.sidebar {
  background: transparent; padding: 22px 14px;
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0;
  width: var(--sidebar-w); height: 100vh; z-index: 60;
  overflow: hidden;                    /* il container non scrolla: scrolla solo .sidebar__scroll */
}
/* la navigazione scrolla quando le sezioni aperte superano l'altezza:
   brand resta in alto, footer resta in basso, niente più voci nascoste (es. Configurazione) */
.sidebar__scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden;
  scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.sidebar__scroll::-webkit-scrollbar { width: 7px; }
.sidebar__scroll::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 999px; }
.sidebar__brand { padding: 6px 10px 20px; flex-shrink: 0; }
.sidebar__logo { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15px; letter-spacing: -0.02em; }
.sidebar__logo-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--blue); color: var(--ink-inverse); display: grid; place-items: center; flex-shrink: 0; }
.sidebar__logo-mark svg { width: 15px; height: 15px; }
.sidebar__sub { font-size: 12.5px; color: var(--ink-4); margin-top: 6px; letter-spacing: 0.01em; padding-left: 1px; }
.sidebar__section { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-5); padding: 14px 10px 6px; }

.nav-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); color: var(--ink-2); font-weight: 500; font-size: 14.5px; transition: background 0.14s var(--ease), color 0.14s var(--ease); }
.nav-link svg { width: 17px; height: 17px; flex-shrink: 0; opacity: 0.85; }
.nav-link:hover { background: rgba(255,255,255,0.05); }
.nav-link--active { background: var(--surface-2); color: var(--ink); box-shadow: 0 0 0 1px rgba(255,255,255,0.08); }
.nav-link--active svg { opacity: 1; }
.nav-link__badge { margin-left: auto; font-size: 12.5px; font-weight: 600; background: var(--ink); color: var(--ink-inverse); border-radius: var(--r-pill); padding: 1px 7px; }
.nav-link--active .nav-link__badge { background: var(--blue); }

.sidebar__footer { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.sidebar__footer > div { min-width: 0; }
.sidebar__footer-name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar__footer-role { font-size: 12.5px; color: var(--ink-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Main — floating content card on the tinted background */
.main {
  display: flex; flex-direction: column; min-width: 0;
  margin: 16px 16px 16px var(--sidebar-w);
  background: var(--surface); border-radius: 20px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06);
  height: calc(100vh - 32px); overflow-y: auto;
  /* overflow-y:auto da solo renderebbe AUTO anche l'asse X (spec CSS) → la
     pagina scorrerebbe destra/sinistra appena un elemento è largo. Regola di
     casa: MAI scroll orizzontale — l'asse X resta bloccato qui. */
  overflow-x: hidden;
}
.topbar { position: sticky; top: 0; z-index: 5; height: 57px; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; padding: 16px 28px; border-bottom: 1px solid var(--line); background: var(--surface); flex-shrink: 0; }
.topbar__title { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.topbar__right { display: flex; align-items: center; gap: 14px; }
.topbar__date { font-size: 13.5px; color: var(--ink-4); }
.avatar { width: 30px; height: 30px; border-radius: var(--r-pill); background: var(--ink); color: var(--ink-inverse); display: grid; place-items: center; font-size: 13px; font-weight: 600; }
.topbar-avatar { display: none; }
.content { padding: 26px 28px 48px; max-width: 1640px; width: 100%; }

/* ============================================================ PRIMITIVES */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-xs); }
.card__head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card__title { font-size: 15px; font-weight: 650; letter-spacing: -0.015em; }
.card__sub { font-size: 13px; color: var(--ink-4); margin-top: 2px; }
.eyebrow { font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-4); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: var(--r-pill); font-size: 14px; font-weight: 600; padding: 8px 16px; transition: background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease), transform 0.1s var(--ease); white-space: nowrap; }
.btn svg { width: 15px; height: 15px; }
/* feedback tattile al click: la UI "sente" il tocco (mossa dalla interface-design skill) */
.btn:active { transform: scale(0.97); }
.btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .btn:active { transform: none; } }
.btn--primary { background: var(--blue); color: var(--ink-inverse); }
.btn--primary:hover { background: var(--blue-ink); }
.btn--dark { background: var(--ink); color: var(--ink-inverse); }
.btn--dark:hover { filter: brightness(0.92); }
.btn--secondary { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn--secondary:hover { background: var(--surface-2); }
.btn--ghost { background: transparent; color: var(--ink-3); }
.btn--ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn--danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn--danger:hover { filter: brightness(1.05); }
.btn--danger svg { color: #fff; }
.btn--sm { padding: 5px 11px; font-size: 13px; }
.btn:disabled { opacity: 0.5; pointer-events: none; }

.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; padding: 3px 9px; border-radius: var(--r-pill); white-space: nowrap; }
.chip svg { width: 12px; height: 12px; }
.chip--neutral { background: var(--surface-2); color: var(--ink-3); }
.chip--blue { background: var(--blue-soft); color: var(--blue-ink); }
.chip--green { background: var(--green-soft); color: var(--green-ink); }
.chip--amber { background: var(--amber-soft); color: var(--amber-ink); }
.chip--red { background: var(--red-soft); color: var(--red-ink); }
.chip--purple { background: var(--purple-soft); color: var(--purple-ink); }

/* Status chip with dot */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status--todo { color: var(--ink-4); }
.status--contacted { color: var(--blue); }
.status--replied { color: var(--amber-ink); }
.status--call { color: var(--green-ink); }
.status--handoff { color: var(--purple-ink); }
.status--ko { color: var(--red-ink); }

/* Progress bar (pipeline position of a case) */
.scorebar { height: 6px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.scorebar__fill { height: 100%; border-radius: var(--r-pill); transition: width 0.9s var(--ease-out); }
.scorebar__fill--handoff { background: linear-gradient(90deg, #8E5BE8, #6B36C9); }
.scorebar__fill--call { background: linear-gradient(90deg, #34C759, #2EA84F); }
.scorebar__fill--replied { background: linear-gradient(90deg, #F5A623, #E08A00); }
.scorebar__fill--contacted { background: linear-gradient(90deg, #0071E3, #0058B9); }
.scorebar__fill--todo { background: var(--ink-5); }
.scorebar__fill--ko { background: linear-gradient(90deg, #FF3B30, #C9302A); }

/* ============================================================ METRIC STRIP */
.metrics { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.metric { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; box-shadow: var(--sh-xs); }
.metric__label { font-size: 13px; color: var(--ink-4); font-weight: 500; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.metric__label svg { width: 14px; height: 14px; }
.metric__value { font-size: 30px; font-weight: 750; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.metric__value small { font-size: 15px; font-weight: 600; color: var(--ink-4); letter-spacing: 0; }
.metric__delta { font-size: 13px; margin-top: 8px; color: var(--ink-4); }
.metric__delta b { color: var(--green-ink); }
.metric--link { cursor: pointer; transition: box-shadow 0.13s var(--ease), border-color 0.13s var(--ease), transform 0.13s var(--ease); }
.metric--link:hover { box-shadow: var(--sh-sm); border-color: var(--line-2); transform: translateY(-1px); }

/* clickable chip (opens a sub-list / drawer) */
.chip--link { cursor: pointer; transition: filter 0.13s var(--ease); }
.chip--link:hover { filter: brightness(0.95); text-decoration: underline; }

/* ============================================================ FUNNEL */
.funnel { display: flex; gap: 10px; }
.funnel__stage { flex: 1; background: var(--surface-2); border-radius: var(--r-md); padding: 14px 16px; position: relative; transition: transform 0.2s var(--ease); }
.funnel__stage:hover { transform: translateY(-2px); }
.funnel__count { font-size: 24px; font-weight: 750; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.funnel__label { font-size: 13px; color: var(--ink-3); margin-top: 3px; font-weight: 500; }
.funnel__stage--todo .funnel__count { color: var(--ink-3); }
.funnel__stage--contacted .funnel__count { color: var(--blue); }
.funnel__stage--replied .funnel__count { color: var(--amber-ink); }
.funnel__stage--call .funnel__count { color: var(--green-ink); }
.funnel__stage--handoff { background: var(--purple-soft); }
.funnel__stage--handoff .funnel__count { color: var(--purple-ink); }

/* ============================================================ TABLE / ROWS */
.lead-list { display: flex; flex-direction: column; }
/* --row-line: the height of the protocollo title line; every secondary stat
   column centers its content inside this same line so they all sit on the
   title's row instead of sagging into the gap above the meta line. */
/* last column is a FIXED width (not auto): the valore lives inside the
   opacity:0 actions cell, so an auto track would size to invisible content and
   vary per row — shrinking the 1fr cell and drifting every middle column left. */
.lead-row { display: grid; grid-template-columns: 1fr 150px 140px 150px 120px; align-items: start; gap: 16px; padding: 13px 20px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background 0.13s var(--ease); --row-line: 20px; }
.lead-row:last-child { border-bottom: none; }
.lead-row:hover { background: var(--surface-2); }
.lead-row > div { min-width: 0; }  /* let 1fr cell shrink so columns stay aligned (ellipsis instead of blowout) */
.lead-row__name { font-weight: 600; font-size: 14.5px; min-height: var(--row-line); display: flex; align-items: center; gap: 8px; }
.lead-row__name-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-row__meta { font-size: 13px; color: var(--ink-4); margin-top: 2px; display: flex; align-items: center; gap: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-row__cat { font-size: 13.5px; color: var(--ink-3); min-height: var(--row-line); line-height: var(--row-line); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-row__status, .lead-row__bar { display: flex; align-items: center; min-height: var(--row-line); }
.lead-row__bar .scorebar { width: 100%; }
.lead-row__val { font-size: 13.5px; color: var(--ink-2); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
/* Per-row share breakdown (mediator↔sede), wraps below the name/meta */
.lead-row__share { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.sharepill { display: inline-flex; align-items: baseline; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); background: var(--surface-2); padding: 2px 8px; border-radius: var(--r-pill); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.sharepill b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.sharepill--muted { color: var(--ink-4); background: transparent; padding-left: 2px; }
.lead-row__actions { display: flex; align-items: center; min-height: var(--row-line); gap: 6px; opacity: 0; transition: opacity 0.13s var(--ease); justify-content: flex-end; }
.lead-row:hover .lead-row__actions { opacity: 1; }

/* Grouped-by-sede collapsible list (Mediazioni → "Sede" view) */
.sede-group { border-bottom: 1px solid var(--line); }
.sede-group:last-child { border-bottom: none; }
.sede-group__head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 20px; background: transparent; border: none; text-align: left; font-family: inherit; transition: background 0.13s var(--ease); }
.sede-group__head:hover { background: var(--surface-2); }
.sede-group__chev { display: grid; place-items: center; color: var(--ink-4); transition: transform 0.15s var(--ease); }
.sede-group__chev svg { width: 16px; height: 16px; }
.sede-group.is-open .sede-group__chev { transform: rotate(90deg); }
.sede-group__name { font-weight: 600; font-size: 14.5px; }
.sede-group__count { margin-left: auto; font-size: 13.5px; font-weight: 650; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.sede-group__body { display: none; background: var(--surface-2); }
.sede-group.is-open .sede-group__body { display: block; }
.sede-group__body .lead-row { padding-left: 44px; background: transparent; }
.sede-group__body .lead-row:hover { background: var(--surface-3); }

.icon-btn { width: 30px; height: 30px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface); display: grid; place-items: center; color: var(--ink-3); transition: all 0.13s var(--ease); }
.icon-btn:hover { background: var(--ink); color: var(--ink-inverse); border-color: var(--ink); }
.icon-btn svg { width: 15px; height: 15px; }
.icon-btn:disabled { opacity: 0.35; pointer-events: none; }

.pager { display: flex; align-items: center; gap: 8px; }
.pager__range { font-size: 13px; color: var(--ink-4); font-weight: 500; font-variant-numeric: tabular-nums; }
.pager .icon-btn { width: 26px; height: 26px; }

.empty { padding: 48px 20px; text-align: center; color: var(--ink-4); font-size: 14px; }
.skeleton { padding: 16px 20px; }
.skeleton__row { height: 14px; border-radius: var(--r-pill); background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; margin: 10px 0; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Toolbar (filters) */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.search { flex: 1; min-width: 200px; position: relative; }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-4); }
.search input { width: 100%; padding: 9px 14px 9px 38px; border: 1px solid var(--line-2); border-radius: var(--r-pill); font-size: 14.5px; font-family: inherit; background: var(--surface); transition: all 0.15s var(--ease); }
.search input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.seg { display: inline-flex; background: var(--surface-2); border-radius: var(--r-pill); padding: 3px; flex-wrap: wrap; }
.seg button { border: none; background: transparent; padding: 6px 13px; border-radius: var(--r-pill); font-size: 13.5px; font-weight: 600; color: var(--ink-3); transition: all 0.13s var(--ease); }
.seg button.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--sh-xs); }

.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; padding: 6px 12px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-3); border: 1px solid transparent; transition: all 0.13s var(--ease); }
.fchip:hover { background: var(--surface-3); }
.fchip.is-active { background: var(--ink); color: var(--ink-inverse); }
.fchip small { opacity: 0.6; font-weight: 600; }

/* Active drill-down filters (set from Sedi / Mediatori), clearable */
.active-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.afilter { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; padding: 6px 10px 6px 12px; border-radius: var(--r-pill); background: var(--blue-soft); color: var(--blue); border: 1px solid transparent; transition: all 0.13s var(--ease); }
.afilter:hover { background: var(--blue); color: var(--ink-inverse); }
.afilter svg { width: 13px; height: 13px; }

/* ============================================================ DRAWER */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,0.55); opacity: 0; pointer-events: none; transition: opacity 0.28s var(--ease); z-index: 200; backdrop-filter: blur(1px); }
.scrim.is-open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; height: 100vh; height: 100dvh; width: 520px; max-width: 92vw; background: var(--surface); box-shadow: var(--sh-lg); transform: translateX(100%); transition: transform 0.34s var(--ease-out); z-index: 210; display: flex; flex-direction: column; }
.drawer.is-open { transform: none; }
.drawer__head { padding: 22px 24px 18px; border-bottom: 1px solid var(--line); flex-shrink: 0; position: relative; }
.drawer__close { position: absolute; top: 18px; right: 18px; width: 30px; height: 30px; border-radius: 50%; border: none; background: var(--surface-2); display: grid; place-items: center; color: var(--ink-3); }
.drawer__close:hover { background: var(--surface-3); color: var(--ink); }
.dh__type { font-size: 13px; font-weight: 600; color: var(--ink-4); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 5px; overflow-wrap: anywhere; }
.drawer__title { font-size: 21px; font-weight: 750; letter-spacing: -0.025em; padding-right: 36px; overflow-wrap: anywhere; }
.drawer__tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.drawer__tags .input { max-width: 100%; }
.drawer__body { padding: 0; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.dsec { padding: 18px 24px; border-bottom: 1px solid var(--line); }
.dsec:last-child { border-bottom: none; }
.dsec__hd { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-3); margin-bottom: 14px; }
.dsec__hd svg { width: 15px; height: 15px; color: var(--ink-4); }
.dsec__p { font-size: 14px; line-height: 1.55; color: var(--ink-2); }

.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; font-size: 14px; }
.kv__k { color: var(--ink-4); }
.kv__v { color: var(--ink); font-weight: 500; word-break: break-word; overflow-wrap: anywhere; min-width: 0; }
.kv__sub { font-size: 13px; color: var(--ink-4); font-weight: 500; margin-top: 3px; }
.kv__sub b { color: var(--ink-2); font-weight: 700; }

/* Timeline */
.timeline { display: flex; flex-direction: column; }
.tl-step { display: grid; grid-template-columns: 18px 1fr; gap: 12px; }
.tl-step__rail { display: flex; flex-direction: column; align-items: center; }
.tl-step__dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--surface); margin-top: 2px; flex-shrink: 0; }
.tl-step.is-done .tl-step__dot { background: var(--green); border-color: var(--green); }
.tl-step.is-pending .tl-step__dot { border-style: dashed; }
.tl-step__line { width: 2px; flex: 1; background: var(--line-2); margin: 3px 0; min-height: 14px; }
.tl-step.is-done .tl-step__line { background: var(--green); }
.tl-step:last-child .tl-step__line { display: none; }
.tl-step__body { padding-bottom: 16px; }
.tl-step__label { font-size: 14px; font-weight: 600; color: var(--ink); }
.tl-step.is-pending .tl-step__label { color: var(--ink-4); font-weight: 500; }
.tl-step__date { font-size: 13px; color: var(--ink-4); margin-top: 1px; font-variant-numeric: tabular-nums; }

.drawer__foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px; background: var(--surface); flex-shrink: 0; }
.drawer__foot .btn { flex: 1 1 auto; }
.drawer__foot .btn--ghost { flex: 0 0 auto; }

/* ============================================================ TOAST */
.toast-wrap { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 400; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--ink); color: var(--ink-inverse); padding: 11px 18px; border-radius: var(--r-pill); font-size: 14px; font-weight: 500; box-shadow: var(--sh-md); animation: toastIn 0.3s var(--ease-out); }
.toast svg { width: 16px; height: 16px; }
.toast--ok svg { color: var(--green); }
.toast--err svg { color: var(--red); }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ============================================================ INSIGHTS */
.insights { display: flex; flex-direction: column; gap: 14px; }
.insight { display: flex; gap: 12px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-xs); }
.insight__icon { width: 36px; height: 36px; border-radius: var(--r-md); display: grid; place-items: center; flex-shrink: 0; }
.insight__icon svg { width: 19px; height: 19px; }
.insight__icon--green { background: var(--green-soft); color: var(--green-ink); }
.insight__icon--blue { background: var(--blue-soft); color: var(--blue-ink); }
.insight__icon--amber { background: var(--amber-soft); color: var(--amber-ink); }
.insight__icon--purple { background: var(--purple-soft); color: var(--purple-ink); }
.insight__title { font-size: 14.5px; font-weight: 650; }
.insight__text { font-size: 13.5px; color: var(--ink-3); margin-top: 3px; line-height: 1.45; }

/* Category bars */
.catbar { display: flex; flex-direction: column; gap: 12px; }
.catbar__row { display: grid; grid-template-columns: 130px 1fr 60px; align-items: center; gap: 12px; }
.catbar__label { font-size: 13.5px; color: var(--ink-2); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catbar__track { height: 10px; background: var(--surface-3); border-radius: var(--r-pill); overflow: hidden; }
.catbar__fill { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--blue-ink)); border-radius: var(--r-pill); transition: width 0.9s var(--ease-out); }
.catbar__fill--green { background: linear-gradient(90deg, var(--green), var(--green-ink)); }
.catbar__n { font-size: 13.5px; font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; }
.catbar__row--link { cursor: pointer; border-radius: var(--r-sm); transition: background 0.13s var(--ease); }
.catbar__row--link:hover { background: var(--surface-2); }

/* ============================================================ DETAIL PAGES (sede / mediatore) */
.detail-page { animation: slideInRight 0.34s var(--ease-out); }
@keyframes slideInRight { from { opacity: 0; transform: translateX(34px); } to { opacity: 1; transform: none; } }
.detail-title { font-size: 26px; font-weight: 750; letter-spacing: -0.03em; margin-top: 4px; }
.backlink { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--ink-4); margin-bottom: 12px; }
.backlink:hover { color: var(--ink); }

/* Sidebar breadcrumb sub-item (e.g. Sedi › Roma) */
.nav-crumb { display: flex; align-items: center; gap: 8px; position: relative; margin: 1px 0; padding: 7px 10px 7px 30px; border-radius: var(--r-sm); font-size: 13.5px; font-weight: 600; color: var(--ink); background: var(--surface); box-shadow: 0 1px 2px rgba(60,40,30,0.05); }
.nav-crumb__rail { position: absolute; left: 18px; top: -9px; bottom: 50%; width: 9px; border-left: 1.5px solid var(--line-2); border-bottom: 1.5px solid var(--line-2); border-bottom-left-radius: 6px; }
.nav-crumb__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Period control sits in the topbar on every page */
.period-seg { margin-right: 2px; }

/* ============================================================ ANIMATIONS */
.anim-in { opacity: 0; transform: translateY(10px); animation: animIn 0.5s var(--ease-out) forwards; }
.anim-d1 { animation-delay: 0.06s; } .anim-d2 { animation-delay: 0.12s; }
.anim-d3 { animation-delay: 0.18s; } .anim-d4 { animation-delay: 0.24s; }
@keyframes animIn { to { opacity: 1; transform: none; } }
.spinner { width: 15px; height: 15px; border: 2px solid rgba(0,0,0,0.15); border-top-color: var(--ink); border-radius: 50%; animation: spin 0.7s linear infinite; }
.btn .spinner { border-color: rgba(255,255,255,0.35); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }

.section-title { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 14px; }
.muted { color: var(--ink-4); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.mt-24 { margin-top: 24px; } .mt-18 { margin-top: 18px; } .mb-18 { margin-bottom: 18px; }

/* Error banner (permission preflight) */
.banner { background: var(--red-soft); border: 1px solid rgba(255,59,48,0.25); border-radius: var(--r-lg); padding: 18px 20px; margin-bottom: 20px; }
.banner__title { font-weight: 700; color: var(--red-ink); margin-bottom: 8px; }
.banner pre { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; font-size: 13px; overflow-x: auto; margin-top: 10px; white-space: pre-wrap; }

/* ============================================================ LOGIN GATE */
#login-ov { position: fixed; inset: 0; z-index: 500; background: var(--canvas); display: grid; place-items: center; padding: 20px; }
.login-card { width: 330px; max-width: 92vw; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--sh-lg); padding: 34px 30px; text-align: center; }
.login-mark { width: 46px; height: 46px; border-radius: 13px; background: var(--ink); color: #fff; display: grid; place-items: center; margin: 0 auto 16px; }
.login-mark svg { width: 24px; height: 24px; }
.login-title { font-size: 18px; font-weight: 750; letter-spacing: -0.02em; }
.login-sub { font-size: 13.5px; color: var(--ink-4); margin: 6px 0 22px; }
#login-pw { width: 100%; padding: 11px 14px; border: 1px solid var(--line-2); border-radius: var(--r-md); font-size: 14px; font-family: inherit; margin-bottom: 12px; }
#login-pw:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.login-err { color: var(--red-ink); font-size: 13.5px; min-height: 18px; margin-top: 10px; }

/* ============================================================ CHARTS */
.chart { width: 100%; height: auto; display: block; }
.ch-grid { stroke: var(--line); stroke-width: 1; }
.ch-axis { fill: var(--ink-4); font-size: 12.5px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.spark { width: 120px; height: 30px; display: block; }
.chartwrap { position: relative; }
.chcross { position: absolute; top: 0; bottom: 26px; width: 1px; background: var(--ink-4); opacity: 0.35; pointer-events: none; }
.chtip { position: absolute; top: 4px; display: none; pointer-events: none; background: var(--ink); color: #fff; border-radius: var(--r-md); padding: 8px 11px; font-size: 13px; line-height: 1.5; box-shadow: var(--sh-md); white-space: nowrap; z-index: 6; }
.chtip__t { font-weight: 700; margin-bottom: 4px; }
.chtip__r { display: flex; align-items: center; gap: 7px; }
.chtip__sw { width: 9px; height: 9px; border-radius: 2px; flex-shrink: 0; }
.chtip__r b { margin-left: 14px; font-variant-numeric: tabular-nums; }

.chart-card { padding: 18px 20px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 2px 0 10px; }
.legchip { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.legchip__sw { width: 11px; height: 11px; border-radius: 3px; flex-shrink: 0; }

/* Dimension picker (reuses .seg look) */
.dim-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dim-pick label { font-size: 13px; color: var(--ink-4); font-weight: 600; }
.dimsel { font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r-pill); padding: 6px 12px; cursor: pointer; transition: all 0.13s var(--ease); }
.dimsel:hover { background: var(--surface-3); }
.dimsel:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }

/* ============================================================ DELTA PILL */
.delta { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; padding: 1px 7px; border-radius: var(--r-pill); }
.delta--up { color: var(--green-ink); background: var(--green-soft); }
.delta--down { color: var(--red-ink); background: var(--red-soft); }
.delta--flat { color: var(--ink-4); background: var(--surface-2); }

/* ============================================================ SCORE DOT */
.scoredot { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 650; color: var(--sc); }
.scoredot__d { width: 8px; height: 8px; border-radius: 50%; background: var(--sc); flex-shrink: 0; box-shadow: 0 0 0 3px color-mix(in srgb, var(--sc) 18%, transparent); }

/* ============================================================ FLOW */
.flow { padding: 4px 0 2px; }
.flow__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.flow__title { font-size: 14.5px; font-weight: 650; }
.flow__total { font-size: 20px; font-weight: 750; letter-spacing: -0.02em; }
.flow__total small { font-size: 12.5px; font-weight: 500; color: var(--ink-4); margin-left: 6px; letter-spacing: 0; }
.flowbar { display: flex; height: 14px; border-radius: var(--r-pill); overflow: hidden; background: var(--surface-3); gap: 2px; }
.flowbar__seg { background: var(--c); height: 100%; transition: width 0.8s var(--ease-out); min-width: 2px; }
.flow__rows { margin-top: 12px; display: flex; flex-direction: column; gap: 2px; }
.flow__row { display: grid; grid-template-columns: 14px 1fr auto auto; align-items: center; gap: 10px; padding: 5px 4px; border-radius: var(--r-sm); }
.flow__row:hover { background: var(--surface-2); }
.flow__dot { width: 9px; height: 9px; border-radius: 50%; }
.flow__label { font-size: 13.5px; color: var(--ink-2); font-weight: 500; }
.flow__pct { font-size: 13.5px; font-weight: 750; color: var(--ink); min-width: 38px; text-align: right; }
.flow__n { font-size: 13px; color: var(--ink-4); min-width: 54px; text-align: right; }

/* ============================================================ HEATMAP */
.heat { display: grid; gap: 3px; --heat-rh: 132px; align-items: stretch; }
.heat__corner { grid-column: 1; }
.heat__ch { font-size: 12px; font-weight: 600; color: var(--ink-4); text-align: center; align-self: end; padding-bottom: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.2; }
.heat__rh { font-size: 13px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; padding-right: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.heat__cell { border-radius: 6px; min-height: 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; cursor: default; transition: transform 0.1s var(--ease); }
.heat__cell:hover { transform: scale(1.06); box-shadow: var(--sh-sm); }
.heat__cell--empty { background: var(--surface-2); }
.heat__v { font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.heat__sub { font-size: 12px; opacity: 0.62; font-variant-numeric: tabular-nums; }

/* ============================================================ DISTRIBUTION BARS */
.distbars { display: flex; flex-direction: column; gap: 9px; }
.distbars__row { display: grid; grid-template-columns: 168px 1fr 56px 46px; align-items: center; gap: 12px; }
.distbars__label { font-size: 13.5px; color: var(--ink-2); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.distbars__track { height: 12px; background: var(--surface-3); border-radius: var(--r-pill); overflow: hidden; }
.distbars__fill { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--blue-ink)); border-radius: var(--r-pill); transition: width 0.8s var(--ease-out); }
.distbars__n { font-size: 13.5px; font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; }
.distbars__rate { font-size: 12.5px; font-weight: 700; text-align: center; padding: 2px 0; border-radius: var(--r-sm); font-variant-numeric: tabular-nums; }

/* Composition track (outcome-segmented bar) */
.comptrack { display: flex; height: 13px; background: var(--surface-3); border-radius: var(--r-pill); overflow: hidden; }
.compseg { height: 100%; transition: width 0.8s var(--ease-out); }
.compseg--accordo { background: linear-gradient(90deg, var(--green), var(--green-ink)); }
.compseg--altri { background: var(--red); opacity: 0.78; }
.compseg--incorso { background: var(--ink-5); opacity: 0.5; }
.complegend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
.complegend span { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-4); font-weight: 500; }
.complegend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* Cascade inline labels */
.casc-lab { fill: #fff; font-size: 8px; font-weight: 700; font-family: var(--font); pointer-events: none; }
.casc-name { fill: var(--ink-3); font-size: 8px; font-weight: 600; font-family: var(--font); }

/* Statistical "tell" panel */
.tells { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.tells__head { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.tells__head svg { width: 15px; height: 15px; color: var(--ink-4); }
.tell { display: flex; gap: 11px; align-items: flex-start; padding: 11px 14px; background: var(--surface-2); border-radius: var(--r-md); border-left: 3px solid var(--sc, var(--ink-5)); }
.tell__dot { margin-top: 2px; width: 8px; height: 8px; border-radius: 50%; background: var(--sc); flex-shrink: 0; }
.tell__txt { font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.tell__txt b { color: var(--ink); font-weight: 700; }

/* Polso scorecard — hero metric + dimmed secondaries */
.scorecard__hero { display: flex; align-items: baseline; gap: 9px; margin: 4px 0 2px; }
.scorecard__hero-v { font-size: 30px; font-weight: 780; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.scorecard__hero-l { font-size: 13px; color: var(--ink-4); font-weight: 600; }
.scorecard__sec { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 9px; opacity: 0.62; transition: opacity 0.15s var(--ease); }
.scorecard:hover .scorecard__sec { opacity: 0.92; }
.scorecard__sec .sm { font-size: 13px; color: var(--ink-3); display: inline-flex; align-items: baseline; gap: 4px; }
.scorecard__sec .sm b { color: var(--ink-2); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ============================================================ SCORECARDS (Polso) */
.pulse-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.pulse-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; box-shadow: var(--sh-xs); }
.pulse-kpi__label { font-size: 13px; color: var(--ink-4); font-weight: 500; margin-bottom: 8px; }
.pulse-kpi__row { display: flex; align-items: baseline; gap: 10px; }
.pulse-kpi__value { font-size: 30px; font-weight: 750; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.pulse-kpi__sub { font-size: 13px; color: var(--ink-4); margin-top: 8px; }

.scorecards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.scorecard { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--sc, var(--ink-5)); border-radius: var(--r-lg); padding: 15px 17px; box-shadow: var(--sh-xs); cursor: pointer; transition: box-shadow 0.15s var(--ease), transform 0.15s var(--ease); }
.scorecard:hover { box-shadow: var(--sh-md); transform: translateY(-2px); }
.scorecard__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.scorecard__name { font-size: 14.5px; font-weight: 700; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scorecard__mid { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.scorecard__metrics { display: flex; gap: 16px; }
.scorecard__metric .v { font-size: 17px; font-weight: 750; font-variant-numeric: tabular-nums; }
.scorecard__metric .l { font-size: 12px; color: var(--ink-4); font-weight: 500; }
.scorecard__spark { width: 100px; flex-shrink: 0; }
.scorecard__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-4); }

/* ============================================================ SCANNABLE TABLE CELLS (Attio-style) */
.heatcell { display: inline-flex; align-items: center; justify-content: center; min-width: 46px; padding: 2px 8px; border-radius: var(--r-sm); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.valcell { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: var(--r-pill); font-size: 13px; font-weight: 650; background: var(--green-soft); color: var(--green-ink); font-variant-numeric: tabular-nums; }

/* ============================================================ INSIGHT CARDS (page) */
.insight-card { display: flex; gap: 14px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--sc, var(--ink-5)); border-radius: var(--r-lg); box-shadow: var(--sh-xs); }
.insight-card__icon { width: 38px; height: 38px; border-radius: var(--r-md); display: grid; place-items: center; flex-shrink: 0; background: color-mix(in srgb, var(--sc) 14%, transparent); color: var(--sc); }
.insight-card__icon svg { width: 19px; height: 19px; }
.insight-card__body { min-width: 0; flex: 1; }
.insight-card__cat { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--sc); }
.insight-card__title { font-size: 15px; font-weight: 700; letter-spacing: -0.015em; margin: 3px 0 6px; }
.insight-card__text { font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.insight-card__support { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.isupport__row { display: grid; gap: 8px; padding: 7px 12px; font-size: 13px; border-bottom: 1px solid var(--line); }
.isupport__row:last-child { border-bottom: none; }
.isupport__row--head { background: var(--surface-2); font-weight: 700; color: var(--ink-3); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.04em; }
.isupport__row span:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.isupport__row span:first-child { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

@media (max-width: 1180px) { .metrics { grid-template-columns: repeat(3, 1fr); } .grid-3 { grid-template-columns: 1fr; } .pulse-kpis { grid-template-columns: repeat(2, 1fr); } }

/* ============================================================ MOBILE */
@media (max-width: 760px) {
  .app { display: block; }
  .main { margin: 0; height: auto; min-height: 100vh; border-radius: 0; box-shadow: none; overflow: visible; }
  .content { overflow-y: visible; padding: 16px 14px 90px; }
  .sidebar {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0;
    width: 100%; height: auto; flex-direction: row; gap: 4px;
    align-items: center; justify-content: space-around;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line); box-shadow: 0 -2px 14px rgba(0,0,0,0.05); z-index: 100;
  }
  .sidebar__brand, .sidebar__section, .sidebar__footer { display: none; }
  .nav-link { flex: 1; flex-direction: column; gap: 3px; padding: 6px 4px; font-size: 12px; justify-content: center; text-align: center; }
  .nav-link svg { width: 21px; height: 21px; opacity: 1; }
  .nav-link__badge { display: none; }
  .topbar { padding: 13px 16px; height: 52px; }
  .topbar__title { font-size: 17px; }
  .topbar__date { display: none; }
  .topbar-avatar { display: grid; }
  .metrics { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .metric__value { font-size: 24px; }
  .funnel { flex-wrap: wrap; gap: 8px; }
  .funnel__stage { flex: 1 1 28%; min-width: 96px; }
  .grid-2 { grid-template-columns: 1fr !important; }
  .insights { grid-template-columns: 1fr; }
  .lead-row { display: flex; align-items: center; gap: 10px; }
  .lead-row > div:first-child { flex: 1; min-width: 0; }
  .lead-row .scorebar, .lead-row__val, .lead-row__actions { display: none; }
  .card, .metric, .insight, .funnel__stage { min-width: 0; max-width: 100%; }
  .drawer { width: 100%; max-width: 100%; }
  .toast-wrap { bottom: 84px; }
  .grid-3 { grid-template-columns: 1fr !important; }
  .pulse-kpis { grid-template-columns: repeat(2, 1fr); }
  .scorecards { grid-template-columns: 1fr; }
  .distbars__row { grid-template-columns: 110px 1fr 48px 40px; gap: 8px; }
  .heat-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .heat { min-width: 520px; }
  .xsplit { grid-template-columns: 1fr !important; }
  .kanban { grid-auto-flow: row !important; grid-auto-columns: auto !important; grid-template-columns: 1fr !important; overflow: visible !important; }
  .cost-table__head, .cost-table__row { grid-template-columns: 1fr 64px 80px !important; }
  .cost-table__head span:nth-child(3), .cost-table__row span:nth-child(3) { display: none; }
}

/* ============================================================ SSV — BANDO STATUS COLORS */
.status--new      { color: var(--ink-4); }
.status--assigned { color: var(--blue); }
.status--work     { color: var(--amber-ink); }
.status--ready    { color: var(--blue-ink); }
.status--obs      { color: var(--purple-ink); }
.status--won      { color: var(--green-ink); }
.status--lost     { color: var(--red-ink); }
.status--skip     { color: var(--ink-5); }
.scorebar__fill--new      { background: var(--ink-5); }
.scorebar__fill--assigned { background: linear-gradient(90deg, #0071E3, #0058B9); }
.scorebar__fill--work     { background: linear-gradient(90deg, #F5A623, #E08A00); }
.scorebar__fill--ready    { background: linear-gradient(90deg, #5AC8FA, #0071E3); }
.scorebar__fill--obs      { background: linear-gradient(90deg, #8E5BE8, #6B36C9); }
.scorebar__fill--won      { background: linear-gradient(90deg, #34C759, #1E8E3E); }
.scorebar__fill--lost     { background: linear-gradient(90deg, #FF3B30, #C9302A); }
.scorebar__fill--skip     { background: var(--ink-5); }
.lead-row__meta--due { color: var(--red-ink); font-weight: 600; }

/* ============================================================ SSV — EXTRACTION VIEW (doc ↔ fields) */
.xsplit { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.docview { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--surface-2); }
.docview__bar { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: var(--surface); border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.docview__bar svg { width: 14px; height: 14px; color: var(--ink-4); }
.docview__bar > span:first-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docview__meta { margin-left: auto; font-size: 12.5px; color: var(--ink-4); font-weight: 500; flex-shrink: 0; white-space: nowrap; }
.docview__page { padding: 16px 14px 40px; display: flex; flex-direction: column; gap: 9px; min-height: 180px; position: relative; }
.docline { height: 8px; border-radius: var(--r-pill); background: var(--surface-3); }
.docline--hl { background: var(--amber-soft); box-shadow: 0 0 0 2px var(--amber-soft); }
.docview__stamp { position: absolute; bottom: 10px; left: 14px; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--purple-ink); background: var(--purple-soft); padding: 4px 9px; border-radius: var(--r-pill); }
.docview__stamp svg { width: 13px; height: 13px; }
.xsplit__fields { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.xfield { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: var(--r-sm); transition: background 0.13s var(--ease); }
.xfield:hover { background: var(--surface-2); }
.xfield__k { font-size: 12.5px; color: var(--ink-4); font-weight: 500; }
.xfield__v { font-size: 14px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ============================================================ SSV — SUPPLIER CONFIRMATIONS */
.conf-list { display: flex; flex-direction: column; gap: 8px; }
.conf-row { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: var(--r-md); background: var(--surface-2); border-left: 3px solid var(--ink-5); }
.conf-row__main { flex: 1; min-width: 0; }
.conf-row__svc { font-size: 14px; font-weight: 600; }
.conf-row__sub { font-size: 13px; color: var(--ink-4); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; }
.conf-row--green { border-left-color: var(--green); }
.conf-row--amber { border-left-color: var(--amber); }
.conf-row--red   { border-left-color: var(--red); background: var(--red-soft); }
.conf-row--blue  { border-left-color: var(--blue); }
.conf-row--neutral { border-left-color: var(--ink-5); }

/* ============================================================ SSV — TIMELINE EXTRA STATES */
.tl-step.is-active .tl-step__dot { background: var(--blue); border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.tl-step.is-active .tl-step__label { color: var(--blue-ink); font-weight: 700; }
.tl-step.is-blocked .tl-step__dot { background: var(--red); border-color: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.tl-step.is-blocked .tl-step__label { color: var(--red-ink); font-weight: 700; }

/* ============================================================ SSV — KANBAN (bandi pipeline) */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(248px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
.kcol { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); display: flex; flex-direction: column; min-height: 120px; }
.kcol__head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.kcol__dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.kcol__title { font-size: 13.5px; font-weight: 700; }
.kcol__count { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--ink-4); background: var(--surface); border-radius: var(--r-pill); padding: 1px 8px; }
.kcol__body { padding: 10px; display: flex; flex-direction: column; gap: 9px; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 11px 12px; box-shadow: var(--sh-xs); cursor: pointer; transition: box-shadow 0.14s var(--ease), transform 0.14s var(--ease); }
.kcard:hover { box-shadow: var(--sh-md); transform: translateY(-2px); }
.kcard__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kcard__school { font-size: 13.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kcard__dest { font-size: 13px; color: var(--ink-4); margin-top: 3px; display: flex; align-items: center; gap: 5px; }
.kcard__dest svg { width: 12px; height: 12px; }
.kcard__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-4); }

/* ============================================================ SSV — COST TABLE (preventivo) */
.cost-table { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.cost-table__head, .cost-table__row { display: grid; grid-template-columns: 1fr 110px 70px 90px 100px; align-items: center; gap: 10px; padding: 9px 14px; }
.cost-table__head { background: var(--surface-2); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-4); }
.cost-table__row { border-top: 1px solid var(--line); font-size: 13.5px; }
.cost-table__row:hover { background: var(--surface-2); }
.cost-table__sec { padding: 7px 14px; background: var(--surface-3); font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-3); }
.cost-table span.num { text-align: right; font-variant-numeric: tabular-nums; }
.cost-table__svc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mode-pill { display: inline-flex; font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: var(--r-pill); }
.mode-pill--corpo { background: var(--purple-soft); color: var(--purple-ink); }
.mode-pill--part { background: var(--blue-soft); color: var(--blue-ink); }
.cost-totals { display: flex; flex-direction: column; gap: 7px; }
.cost-totals__row { display: flex; align-items: center; justify-content: space-between; font-size: 14px; }
.cost-totals__row b { font-variant-numeric: tabular-nums; }
.cost-totals__row--grand { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; font-size: 16px; font-weight: 750; }
.cost-totals__row--cap { font-size: 13px; color: var(--ink-4); }

/* generic helpers used across SSV pages */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 1180px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
.op-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.op-chip .avatar { width: 24px; height: 24px; font-size: 12px; }

/* ============================================================ CRM-STANDARD — SIDEBAR SUBMENU (accordion) */
.nav-parent { width: 100%; background: none; border: 0; cursor: pointer; font: inherit; text-align: left; }
.nav-parent .nav-caret { margin-left: auto; transition: transform 0.18s var(--ease); color: var(--ink-4); }
.nav-parent.is-open .nav-caret { transform: rotate(90deg); }
.nav-sub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.22s var(--ease); }
.nav-sub.is-open { grid-template-rows: 1fr; }
.nav-sub__inner { overflow: hidden; }
.nav-link--sub { padding-left: 38px; font-size: 13.5px; }
.nav-link--sub .nav-link__mark { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-5); margin-right: 4px; flex-shrink: 0; }
.nav-link--sub.nav-link--active .nav-link__mark { background: var(--blue); }

/* ============================================================ CRM-STANDARD — STEPPER */
.steps { display: flex; align-items: center; gap: 10px; margin: 2px 0 22px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; background: none; border: 0; cursor: pointer; font-family: inherit; padding: 0; }
.step-dot { width: 23px; height: 23px; border-radius: var(--r-pill); display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 700; flex-shrink: 0; transition: all 0.16s var(--ease); }
.step.done .step-dot { background: var(--green); color: #fff; }
.step.done .step-label { color: var(--ink); }
.step.active .step-dot { background: var(--ink); color: #fff; box-shadow: 0 0 0 4px var(--surface-3); }
.step.active .step-label { color: var(--ink); font-weight: 700; }
.step.todo .step-dot { background: var(--surface); border: 1px solid var(--line-2, #d2d2d7); color: var(--ink-4); }
.step.todo .step-label { color: var(--ink-4); }
.step:hover .step-label { color: var(--ink); }
.step-line { width: 30px; height: 2px; background: var(--line); border-radius: var(--r-pill); }

/* ============================================================ CRM-STANDARD — PAGE HEAD + ACTION BAR */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head__title { font-size: 26px; font-weight: 750; letter-spacing: -0.02em; line-height: 1.1; }
.page-head__sub { font-size: 14.5px; font-weight: 500; color: var(--ink-4); margin-top: 5px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.action-bar { position: sticky; top: 0; z-index: 8; background: var(--surface); border-bottom: 1px solid var(--line); margin: -26px -28px 22px; padding: 14px 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.btn--success { background: var(--green); color: #fff; border-color: var(--green); }
.btn--success:hover { filter: brightness(1.05); }

/* ============================================================ CRM-STANDARD — STEP PANELS */
.step-panel { scroll-margin-top: 84px; }
.step-panel + .step-panel { margin-top: 18px; }
.step-panel__hd { display: flex; align-items: center; gap: 10px; margin: 26px 2px 12px; }
.step-panel__n { width: 24px; height: 24px; border-radius: var(--r-pill); background: var(--ink); color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.step-panel__t { font-size: 15px; font-weight: 700; }
.step-panel__s { font-size: 13.5px; color: var(--ink-4); margin-left: auto; font-weight: 500; }

/* ============================================================ CRM-STANDARD — FORM FIELDS */
.fgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.fgrid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 720px) { .fgrid, .fgrid--3 { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 5px; }
.field__label { font-size: 13px; font-weight: 600; color: var(--ink-4); display: flex; align-items: center; gap: 6px; }
.input { font: inherit; font-size: 14.5px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--ink); transition: border-color 0.14s var(--ease), box-shadow 0.14s var(--ease); width: 100%; }
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
textarea.input { resize: vertical; min-height: 64px; line-height: 1.45; }
.field__ai { font-size: 12px; color: var(--purple-ink); font-weight: 600; }

/* ============================================================ CRM-STANDARD — DROP ZONE */
.drop-zone { border: 2px dashed var(--line-2, #d2d2d7); border-radius: var(--r-md); padding: 22px 18px; text-align: center; background: var(--surface-2); cursor: pointer; transition: border-color .18s var(--ease), background .18s var(--ease), transform .18s var(--ease); }
.drop-zone:hover { border-color: var(--blue); background: var(--blue-soft); }
.drop-zone.is-dragging { border-color: var(--blue); background: var(--blue-soft); transform: scale(1.01); }
.drop-mark { width: 42px; height: 42px; border-radius: var(--r-md); background: linear-gradient(135deg, var(--blue-soft), var(--blue)); color: #fff; display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; transition: transform .18s var(--ease); }
.drop-zone:hover .drop-mark, .drop-zone.is-dragging .drop-mark { transform: translateY(-2px); }
.drop-title { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.drop-sub { font-size: 13px; font-weight: 500; color: var(--ink-4); }
.drop-formats { display: flex; gap: 5px; justify-content: center; margin-top: 11px; flex-wrap: wrap; }
.drop-fmt { font-size: 12px; font-weight: 700; letter-spacing: .03em; padding: 2px 8px; border-radius: var(--r-pill); background: var(--surface-3); color: var(--ink-4); }
.drop-file { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-md); background: var(--green-soft); margin-top: 12px; }
.drop-file__mark { width: 22px; height: 22px; border-radius: var(--r-pill); background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.drop-file__name { font-size: 13.5px; font-weight: 650; }
.drop-file__meta { margin-left: auto; font-size: 12.5px; color: var(--ink-4); }

/* ============================================================ CRM-STANDARD — ROSTER TABLE */
.rtable { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.rtable__head, .rtable__row { display: grid; grid-template-columns: 28px 1fr 130px 110px 36px; align-items: center; gap: 10px; padding: 8px 12px; }
.rtable__head { background: var(--surface-2); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-4); }
.rtable__row { border-top: 1px solid var(--line); font-size: 13.5px; }
.rtable__row:hover { background: var(--surface-2); }
.rtable__idx { color: var(--ink-5); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.role-pill { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: var(--r-pill); }
.role-pill--p { background: var(--blue-soft); color: var(--blue-ink); }
.role-pill--d { background: var(--purple-soft); color: var(--purple-ink); }
.role-pill--a { background: var(--amber-soft); color: var(--amber-ink); }

/* ============================================================ CRM-STANDARD — ACCESS CODE */
.code-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.code-chip { border: 1px dashed var(--line-2, #d2d2d7); border-radius: var(--r-md); padding: 12px; text-align: center; background: var(--surface-2); }
.code-chip__code { font-size: 16px; font-weight: 750; letter-spacing: 0.12em; font-variant-numeric: tabular-nums; }
.code-chip__who { font-size: 12.5px; color: var(--ink-4); margin-top: 4px; }

/* ============================================================ CRM-STANDARD — NUOVO VIAGGIO v2 */
/* bounded, internally-scrollable section boxes (page doesn't grow huge) */
.scrollbox { max-height: 340px; overflow: auto; }
.scrollbox--tall { max-height: 440px; }

/* editable trip title (replaces the page title) */
.trip-title-wrap { border-bottom: 2px solid var(--line); margin: 4px 0 6px; }
.trip-title-input { font-size: 24px; font-weight: 750; letter-spacing: -0.02em; border: 0; background: transparent; width: 100%; padding: 4px 0; color: var(--ink); font-family: inherit; }
.trip-title-input:focus { outline: none; }
.trip-title-hint { font-size: 13px; color: var(--ink-4); display: flex; align-items: center; gap: 6px; margin-bottom: 18px; }

/* slim upload variant */
.drop-zone--slim { padding: 12px 14px; display: flex; align-items: center; gap: 12px; text-align: left; }
.drop-zone--slim .drop-mark { margin: 0; width: 34px; height: 34px; }
.drop-zone--slim .drop-title { margin: 0; }
.drop-zone--slim .drop-formats { margin: 0 0 0 auto; }

.input--sm { padding: 6px 9px; font-size: 13.5px; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 18 18' fill='none' stroke='%2386868b' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 7l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }

/* participants table — scroll vertical (rows) + horizontal (columns) */
.ptable-wrap { overflow: auto; max-height: 300px; border: 1px solid var(--line); border-radius: var(--r-md); }
.ptable { width: 100%; min-width: 760px; border-collapse: collapse; }
.ptable th { position: sticky; top: 0; background: var(--surface-2); z-index: 1; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-4); font-weight: 700; text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ptable td { padding: 4px 7px; border-bottom: 1px solid var(--line); }
.ptable tr:last-child td { border-bottom: 0; }
.ptable td .input { border-color: transparent; background: transparent; width: 100%; }
.ptable td .input:hover { border-color: var(--line); }
.ptable td .input:focus { border-color: var(--blue); background: var(--surface); }
.ptable td.col-idx { color: var(--ink-5); font-size: 12.5px; text-align: center; }
.role-pill--admin   { background: var(--purple-soft); color: var(--purple-ink); }
.role-pill--turista { background: var(--blue-soft); color: var(--blue-ink); }

/* itinerario — left block palette, right program */
.palette { display: flex; flex-direction: column; gap: 8px; }
.palette__block { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); cursor: grab; font-size: 13.5px; font-weight: 600; transition: border-color 0.13s var(--ease), background 0.13s var(--ease); }
.palette__block:hover { border-color: var(--blue); background: var(--blue-soft); }
.palette__block svg { color: var(--ink-4); }
.palette__block .palette__plus { margin-left: auto; color: var(--blue); font-weight: 700; }
.palette__form { display: flex; flex-direction: column; gap: 7px; margin-top: 4px; padding: 11px; border: 1px dashed var(--line-2, #d2d2d7); border-radius: var(--r-md); background: var(--surface-2); }

.day-card { border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 10px; background: var(--surface); }
.day-card__hd { padding: 9px 12px; font-size: 13.5px; font-weight: 700; border-bottom: 1px solid var(--line); background: var(--surface-2); display: flex; align-items: center; gap: 8px; border-radius: var(--r-md) var(--r-md) 0 0; }
.day-list { list-style: none; padding: 8px 12px; margin: 0; }
.day-list li { display: flex; align-items: center; gap: 9px; padding: 5px 0; font-size: 13.5px; }
.day-list li + li { border-top: 1px solid var(--surface-3); }
.day-list .time { font-variant-numeric: tabular-nums; color: var(--ink-4); font-size: 13px; min-width: 40px; }
.day-list .bdot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); flex-shrink: 0; }

/* access codes — horizontal, sized + colored by role */
.gcode { display: inline-flex; align-items: center; gap: 10px; border: 1px dashed var(--line-2, #d2d2d7); border-radius: var(--r-md); padding: 10px 16px; }
.gcode__code { font-size: 20px; font-weight: 750; letter-spacing: 0.12em; }
.acode-row { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.acode { border-radius: var(--r-pill); display: inline-flex; align-items: center; gap: 8px; font-weight: 650; }
.acode--admin   { background: var(--purple-soft); color: var(--purple-ink); font-size: 14.5px; padding: 8px 14px; }
.acode--turista { background: var(--blue-soft);   color: var(--blue-ink);   font-size: 13px; padding: 5px 11px; }
.acode__code { font-variant-numeric: tabular-nums; letter-spacing: 0.1em; opacity: 0; max-width: 0; overflow: hidden; transition: opacity 0.18s var(--ease), max-width 0.18s var(--ease); }
.acode-row.is-revealed .acode__code { opacity: 0.6; max-width: 120px; }

/* ============================================================ CRM-STANDARD — VIAGGI LIST (bozze / in programma / tempo reale) */
.vl-bar { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.vl-metrics { display: flex; gap: 12px; flex-wrap: wrap; }
.vl-metrics .metric { min-width: 116px; padding: 12px 14px; }
.vl-seg { flex-shrink: 0; }
.vl-list { display: flex; flex-direction: column; gap: 8px; }
.vl-row { display: grid; grid-template-columns: 1.5fr 0.7fr 0.6fr 0.9fr max-content auto; gap: 13px; align-items: center; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); cursor: pointer; transition: background 0.13s var(--ease), box-shadow 0.13s var(--ease); }
/* bozze: la data di creazione è la PRIMA colonna, prima del nome */
.vl-row--dated { grid-template-columns: 64px 1.5fr 0.7fr 0.6fr 0.9fr max-content auto; }
.vl-row__orig { min-width: 96px; }
.vl-row__created { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; white-space: nowrap; font-variant-numeric: tabular-nums; border-right: 1px solid var(--line); padding-right: 12px; }
.vl-row__created b { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.vl-row__created span { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-4); }
.vcard-created { display: inline-flex; align-items: center; gap: 4px; font-weight: 650; color: var(--ink-3); }
.vcard-created svg { width: 12px; height: 12px; }

/* bozze: filtro provenienza + ordinamento — in alto a destra */
.vl-filterbar { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.vl-filterbar .fchip { display: inline-flex; align-items: center; gap: 6px; }
.vl-filterbar .fchip svg { width: 13px; height: 13px; }
.vl-filterbar .fchip b { font-weight: 700; opacity: 0.7; }
.vl-row:hover { background: var(--surface-2); box-shadow: var(--sh-xs); }
.vl-row__name { font-size: 14px; font-weight: 650; }
.vl-row__meta { font-size: 13px; color: var(--ink-4); margin-top: 2px; }
.vl-row__cell { font-size: 13px; color: var(--ink-3); }

/* ============================================================ CRM-STANDARD — NUOVO VIAGGIO v3 */
/* trip title inside the sticky action bar */
.ab-title-input { font-size: 17px; font-weight: 750; letter-spacing: -0.02em; border: 0; background: transparent; color: var(--ink); font-family: inherit; min-width: 280px; width: 100%; max-width: 520px; padding: 4px 0; }
.ab-left { flex: 1; min-width: 280px; }
.ab-crumb { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-4); }
.ab-title-input:focus { outline: none; }
.action-bar { align-items: center; }

/* itinerario — equal-height, internally scrolling columns */
.itin-col { display: flex; flex-direction: column; height: 540px; }
.itin-col .card__head { flex-shrink: 0; }
.itin-col__body { overflow: auto; padding: 14px 16px; flex: 1; }

/* service blocks (palette) + day items, color-coded by type via inline border/dot color */
.svc-block { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border: 1px solid var(--line); border-left-width: 3px; border-radius: var(--r-md); background: var(--surface); cursor: grab; font-size: 13.5px; font-weight: 600; transition: background 0.12s var(--ease); }
.svc-block:hover { background: var(--surface-2); }
.svc-block:active { cursor: grabbing; }
.svc-block .svc-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.day-card__hd .day-pill { font-size: 12px; font-weight: 700; color: var(--ink-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 1px 7px; margin-left: auto; }
.day-drop { padding: 6px 12px 10px; min-height: 38px; }
.day-drop.is-over { background: var(--blue-soft); outline: 2px dashed var(--blue); outline-offset: -4px; border-radius: var(--r-sm); }
.day-item { display: flex; align-items: center; gap: 9px; padding: 7px 12px 7px 20px; border-left: 3px solid var(--ink-5); background: var(--surface-2); border-radius: 6px; margin: 6px 0; font-size: 13.5px; }
.day-item .time { font-variant-numeric: tabular-nums; color: var(--ink-4); font-size: 12.5px; min-width: 38px; padding-left: 8px; }
.day-item .day-item__x { margin-left: auto; cursor: pointer; color: var(--ink-5); }
.day-item .day-item__x:hover { color: var(--red-ink); }

/* mini range calendar */
.cal { user-select: none; max-width: 280px; }
.cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 13.5px; font-weight: 700; }
.cal__nav { background: none; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; color: var(--ink-3); }
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal__dow { font-size: 12px; color: var(--ink-4); text-align: center; font-weight: 700; padding: 2px 0; text-transform: uppercase; }
.cal__day { text-align: center; padding: 7px 0; font-size: 13px; border-radius: 6px; cursor: pointer; transition: background 0.1s var(--ease); }
.cal__day:hover { background: var(--surface-3); }
.cal__day.is-edge { background: var(--blue); color: #fff; font-weight: 700; }
.cal__day.is-in { background: var(--blue-soft); color: var(--blue-ink); }
.cal__day.is-empty { visibility: hidden; cursor: default; }
.cal__out { font-size: 13px; color: var(--ink-3); margin-top: 8px; }

/* per-person vouchers */
.vou-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(214px, 1fr)); gap: 10px; }
.vou { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; background: var(--surface); border-left: 3px solid var(--blue); }
.vou--admin { border-left-color: var(--purple); background: linear-gradient(180deg, var(--purple-soft) 0%, var(--surface) 60%); }
.vou__top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.vou__name { font-size: 13.5px; font-weight: 650; }
.vou__code { font-size: 19px; font-weight: 750; letter-spacing: 0.14em; font-variant-numeric: tabular-nums; color: var(--ink); }
.vou__acts { display: flex; gap: 6px; margin-top: 9px; }

/* viaggi-list — i numeri di sintesi scorrono via con la pagina: resta sticky solo la topbar */
.vl-bar { padding: 12px 0; border-bottom: 1px solid var(--line); }
/* screen-adaptive: i KPI vanno a capo, MAI tagliati dal bordo (regola: niente
   scroll orizzontale e niente parti nascoste con la finestra ridotta) */
.vl-metrics { display: flex; gap: 12px; flex-wrap: wrap; flex: 1; }
.vl-metrics .metric { min-width: 134px; padding: 14px 16px; flex: 1 1 150px; }
.vl-metrics .metric__value { font-size: 24px; }
.m-ico--blue   { color: var(--blue); }
.m-ico--green  { color: var(--green-ink); }
.m-ico--purple { color: var(--purple-ink); }
.m-ico--amber  { color: var(--amber-ink); }
.m-ico--red    { color: var(--red-ink); }

/* ============================================================ CRM-STANDARD — NUOVO VIAGGIO v4 */
/* The grid/list switch + "Nuovo viaggio" now live in the page-head (fixed slot,
   identical across Bozze / In programma / Tempo reale) — never hidden by the
   metric tiles below. */
.page-head__tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* sidebar — "Nuovo viaggio" is the primary action: blue accent */
.nav-link--accent { color: var(--blue-ink); font-weight: 650; }
.nav-link--accent .nav-link__mark { background: var(--blue); }
.nav-link--accent:hover { background: var(--blue-soft); }
.nav-link--accent.nav-link--active { color: var(--blue-ink); }

/* quando — calendar opens only on click (popover) */
.cal-field { position: relative; }
.cal-trigger { display: flex; align-items: center; gap: 8px; text-align: left; cursor: pointer; color: var(--ink); }
.cal-trigger svg { color: var(--ink-4); flex-shrink: 0; }
.cal-trigger .cal-trigger__placeholder { color: var(--ink-4); }
.cal-trigger .cal-trigger__chev { margin-left: auto; color: var(--ink-4); transition: transform 0.16s var(--ease); }
.cal-field.is-open .cal-trigger__chev { transform: rotate(180deg); }
.cal-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--sh-md); padding: 14px; }
.cal-pop[hidden] { display: none; }

/* day program — each day gets its own accent color so they read apart */
.day-card { border-left-width: 3px; border-left-color: var(--day-accent, var(--line)); }
.day-card__hd .day-pill { color: var(--day-accent, var(--ink-4)); border-color: color-mix(in srgb, var(--day-accent, var(--ink-5)) 40%, var(--line)); }
.day-item { cursor: pointer; transition: background 0.12s var(--ease), box-shadow 0.12s var(--ease); }
.day-item:hover { box-shadow: var(--sh-sm); background: var(--blue-soft); }
.day-item__dur { font-size: 12px; font-weight: 700; color: var(--ink-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 1px 7px; }
.day-item__go { color: var(--ink-5); display: inline-flex; opacity: 0; transition: opacity 0.12s var(--ease); }
.day-item__go svg { width: 14px; height: 14px; }
.day-item:hover .day-item__go { opacity: 1; color: var(--blue); }

/* itinerary item editor (own modal — independent from the viaggio drawer) */
.imodal-scrim { position: fixed; inset: 0; background: rgba(0,0,0,0.42); backdrop-filter: blur(2px); z-index: 250; display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 28px 20px; opacity: 0; pointer-events: none; transition: opacity 0.22s var(--ease); }
.imodal-scrim.is-open { opacity: 1; pointer-events: auto; }
.imodal { width: 460px; max-width: 94vw; margin: auto; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-lg); transform: translateY(10px); transition: transform 0.24s var(--ease-out); }
.imodal-scrim.is-open .imodal { transform: none; }
.imodal__hd { display: flex; align-items: center; gap: 10px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); }
.imodal__badge { width: 30px; height: 30px; border-radius: var(--r-md); display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.imodal__title { font-size: 16px; font-weight: 700; letter-spacing: -0.015em; }
.imodal__close { margin-left: auto; width: 30px; height: 30px; border-radius: 50%; border: none; background: var(--surface-2); display: grid; place-items: center; color: var(--ink-3); }
.imodal__close:hover { background: var(--surface-3); color: var(--ink); }
.imodal__body { padding: 16px 20px; display: flex; flex-direction: column; gap: 13px; }
.imodal__foot { display: flex; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--surface); }
.imodal__foot .btn--primary { margin-left: auto; }
.im-attach { border: 1px dashed var(--line-2, #d2d2d7); border-radius: var(--r-md); padding: 12px; background: var(--surface-2); }
.im-attach__hd { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-4); display: flex; align-items: center; gap: 7px; margin-bottom: 9px; }
.im-attach__hd svg { width: 14px; height: 14px; }
.im-attach__note { font-size: 12.5px; color: var(--ink-4); margin-top: 9px; line-height: 1.45; display: flex; gap: 6px; }
.im-attach__note svg { width: 13px; height: 13px; flex-shrink: 0; margin-top: 1px; color: var(--blue); }

/* vouchers — compact, much less vertical space */
.vou-grid--compact { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.vou-grid--compact .vou { padding: 9px 11px; }
.vou-grid--compact .vou__top { margin-bottom: 5px; }
.vou-grid--compact .vou__name { font-size: 13px; }
.vou-grid--compact .vou__code { font-size: 14px; letter-spacing: 0.1em; }
.vou-grid--compact .vou__acts { margin-top: 7px; }
.scrollbox--short { max-height: 210px; }

/* brief — short fields on one row (Quando included), so there's no empty gap
   next to the "Cosa vogliono fare" box, which now sits full-width below */
.fgrid--brief { grid-template-columns: 1.2fr 0.7fr 1.2fr 1.5fr; }
@media (max-width: 880px) { .fgrid--brief { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .fgrid--brief { grid-template-columns: 1fr; } }

/* vouchers — collapsed view shows only a few; "+" reveals the rest */
.vou-collapse.is-collapsed .vou-grid .vou:nth-child(n+5) { display: none; }
.vou-toggle { margin-top: 8px; }

/* itinerary left column — palette only (the inline "add service" form is gone) */
.palette__hint { font-size: 13px; color: var(--ink-4); line-height: 1.45; margin-bottom: 12px; }

/* itinerary columns grow with content — no fixed-height inner scroll that traps
   the last day's events out of reach. The page scrolls normally instead. */
.itin-col { height: auto; }
.itin-col__body { overflow: visible; }

/* participants — show the whole loaded group: no inner scroll, fit to width */
.ptable-wrap--all { max-height: none; overflow: visible; }
.ptable-wrap--all .ptable { min-width: 0; }
/* full-height table flows in the page: header must NOT be sticky, or it
   floats up behind the sticky topbar/action-bar. Let it scroll with content. */
.ptable-wrap--all .ptable th { position: static; }

/* roster with native diagonal resize grip (bottom-right corner, like a
   textarea): drag the little lines to expand the list downward.
   Inside its own scroll context the sticky header is safe again. */
.roster-wrap { height: 330px; min-height: 150px; max-height: none; resize: vertical; overflow: auto; }
.roster-wrap .ptable th { position: sticky; top: 0; }

/* itinerary ↔ fornitori bridge */
.day-item__forn { font-size: 12px; font-weight: 650; color: var(--blue-ink); background: var(--blue-soft); border-radius: var(--r-pill); padding: 1px 8px; white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.im-forn-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; margin: 12px 0 4px; }

/* ============================================================ CRM-STANDARD — FORNITORI (prenotazioni + lista) */
/* filter chips */
.fchips { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
/* --gc (optional) = group color: tints the chip, fills it when active */
.fchip { font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); color: var(--gc, var(--ink-3)); cursor: pointer; }
.fchip:hover { background: var(--surface-2); }
.fchip.is-active { background: var(--gc, var(--ink)); color: #fff; border-color: var(--gc, var(--ink)); }

/* prenotazioni table */
.bk-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
.bk-table { min-width: 880px; }
.bk-head, .bk-row { display: grid; grid-template-columns: 1.9fr 1.3fr 88px 56px 50px 92px 92px 108px; gap: 12px; align-items: center; padding: 10px 14px; }
.bk-head { background: var(--surface-2); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-4); }
.bk-row { border-top: 1px solid var(--line); font-size: 13.5px; cursor: pointer; }
.bk-row:hover { background: var(--surface-2); }
.bk-svc { display: flex; align-items: center; gap: 9px; min-width: 0; }
.bk-svc__i { width: 27px; height: 27px; border-radius: 7px; display: flex; align-items: center; justify-content: center; background: var(--surface-3); color: var(--ink-3); flex-shrink: 0; }
.bk-svc__t { min-width: 0; }
.bk-svc__n { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-svc__f { font-size: 12.5px; color: var(--ink-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-cell { color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-num { font-variant-numeric: tabular-nums; }
.bk-price { font-weight: 700; font-variant-numeric: tabular-nums; }

/* fornitori grouped list */
.for-group { margin-top: 22px; }
.for-group__hd { display: flex; align-items: center; gap: 9px; margin: 0 2px 10px; font-size: 14px; font-weight: 700; }
.for-group__hd .for-ico { color: var(--ink-4); }
.for-group__hd .chip { margin-left: auto; }
.for-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.for-card { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); padding: 13px 15px; cursor: pointer; transition: box-shadow 0.13s var(--ease), transform 0.13s var(--ease); }
.for-card:hover { box-shadow: var(--sh-md); transform: translateY(-2px); }
.for-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.for-card__n { font-size: 14px; font-weight: 650; }
.for-card__cat { font-size: 12.5px; color: var(--ink-4); margin-top: 2px; }
.for-card__meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 11px; font-size: 13px; color: var(--ink-3); }
/* labeled variant: each value carries its own caption on top */
.for-card__meta--lbl { gap: 16px; align-items: flex-end; }
.fmx { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.fmx__k { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-4); white-space: nowrap; }
.fmx__v { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.fmx__v svg { width: 12px; height: 12px; }
.stars { color: var(--amber-ink); font-size: 13px; letter-spacing: 1px; }

/* ============================================================
   Email & Agenda
   ============================================================ */
.em-conn { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-3); background: var(--surface); border: 1px solid var(--line); padding: 5px 11px; border-radius: var(--r-pill); }
.em-conn__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }

/* ---- colored filter chips (also act as legend) ---- */
.em-fchips { gap: 8px; }
.em-fchips .fchip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); }
.em-fchips .fchip__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fc); flex: 0 0 8px; }
.em-fchips .fchip:hover { border-color: var(--fc); }
.em-fchips .fchip.is-active { background: var(--fc); border-color: var(--fc); color: #fff; }
.em-fchips .fchip.is-active .fchip__dot { background: rgba(255,255,255,0.9); }
.fchip__n { display: inline-block; min-width: 17px; padding: 0 5px; border-radius: var(--r-pill); background: var(--surface-3); color: var(--ink-3); font-size: 12px; font-weight: 700; line-height: 17px; text-align: center; }
.em-fchips .fchip.is-active .fchip__n { background: rgba(255,255,255,0.28); color: #fff; }
.em-fchips .fchip--off { opacity: 0.5; }
.em-fchips .fchip--off::after { content: '○'; margin-left: 2px; font-size: 11px; opacity: 0.8; }

/* ---- equal-height two-pane layout ---- */
.em-layout { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 16px; height: calc(100vh - 250px); min-height: 460px; }
.em-list, .em-reader { height: 100%; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-sm); min-width: 0; }
@media (max-width: 1240px) { .em-layout { grid-template-columns: 1fr; height: auto; } .em-list { max-height: 38vh; } .em-list, .em-reader { height: auto; } .em-reader { max-height: none; } }

.em-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--ink-4); font-size: 14px; }
.em-empty .ic { width: 30px; height: 30px; color: var(--ink-5); }

/* ---- list ---- */
.em-item { display: flex; gap: 11px; padding: 13px 15px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .15s var(--ease); position: relative; }
.em-item:last-child { border-bottom: 0; }
.em-item:hover { background: var(--surface-2); }
.em-item.is-active { background: var(--blue-soft); box-shadow: inset 3px 0 0 var(--blue); }
.em-item__av { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 13.5px; font-weight: 700; color: #fff; position: relative; }
.em-av--green { background: linear-gradient(135deg,#34C759,#1E8E3E); }
.em-av--blue  { background: linear-gradient(135deg,#0a84ff,#0058B9); }
.em-av--neutral { background: linear-gradient(135deg,#9aa0a6,#6E6E73); }
.em-item__body { min-width: 0; flex: 1; }
.em-item__top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.em-item__from { font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.em-item__time { font-size: 12.5px; color: var(--ink-4); white-space: nowrap; }
.em-star { color: var(--amber-ink); }
.em-item__subj { font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.em-item__prev { font-size: 13px; color: var(--ink-4); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.em-item__clip { color: var(--ink-3); margin-left: 6px; }
.em-item__clip .ic { width: 12px; height: 12px; vertical-align: -2px; }
.em-item__tags { margin-top: 7px; display: flex; gap: 5px; flex-wrap: wrap; }
.em-item.is-unread .em-item__from, .em-item.is-unread .em-item__subj { font-weight: 750; }
.em-item.is-unread .em-item__av::after { content: ''; position: absolute; top: -2px; right: -2px; width: 9px; height: 9px; border-radius: 50%; background: var(--blue); border: 2px solid var(--surface); }

/* ---- reader ---- */
.em-read { padding: 22px 24px 24px; }
.em-read__subjrow { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.em-read__subj { font-size: 18px; font-weight: 700; color: var(--ink); margin: 0; line-height: 1.3; min-width: 0; overflow-wrap: anywhere; }
.em-read__chips { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; flex-shrink: 0; }
.em-read__from { display: flex; gap: 12px; align-items: center; margin: 16px 0 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.em-read__who { min-width: 0; }
.em-read__name { font-size: 14.5px; font-weight: 650; color: var(--ink); overflow-wrap: anywhere; }
.em-read__addr { font-weight: 400; color: var(--ink-4); font-size: 13px; overflow-wrap: anywhere; }
.em-read__date { font-size: 13px; color: var(--ink-4); margin-top: 2px; }
.em-read__body { font-size: 14.5px; line-height: 1.65; color: var(--ink-2); overflow-wrap: anywhere; }
.em-att { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.em-att__chip { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 550; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 7px 12px; cursor: pointer; transition: background .15s; font-family: inherit; }
.em-att__chip:hover { background: var(--surface-3); }
.em-att__chip .ic { width: 14px; height: 14px; color: var(--blue-ink); }
.em-actions { display: flex; gap: 9px; margin: 22px 0 0; flex-wrap: wrap; }
.em-actions--right { justify-content: flex-end; }

/* rigenera con indicazioni dell'utente */
.em-regen { display: flex; gap: 8px; padding: 0 15px 13px; }
.em-regen .input { flex: 1; }

/* preventivo PDF modificabile: servizio | fornitore | importo */
.pdf__rowhd--edit, .pdf__row--edit { display: grid; grid-template-columns: 1fr 200px 96px; gap: 12px; align-items: center; }
.pdf__row--edit .pdf__imp { text-align: right; font-weight: 650; }
.pdf__row--edit .pdf__forn { min-width: 0; }
.pdf__rowhd--edit span:last-child { text-align: right; }

/* AI accent button */
.btn--ai { background: linear-gradient(135deg,#8E5BE8,#0071E3); color: #fff; border: 0; }
.btn--ai:hover { filter: brightness(1.06); }
.btn--ai .ic { color: #fff; }

/* ---- AI panel ---- */
.em-ai { margin-top: 16px; border: 1px solid var(--purple-soft); background: var(--surface-2); border-radius: var(--r-md); padding: 16px; }
.em-ai__hd { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--purple-ink); }
.em-ai__hd .ic { color: var(--purple); }
.em-ai__sub { font-weight: 500; color: var(--ink-4); font-size: 12.5px; margin-left: auto; }
.em-ai__presets { display: flex; flex-direction: column; gap: 8px; margin-top: 13px; }
.em-ai__q { display: flex; align-items: center; gap: 9px; text-align: left; font-family: inherit; font-size: 13.5px; font-weight: 550; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 11px 13px; cursor: pointer; transition: all .15s var(--ease); }
.em-ai__q:hover, .em-ai__q.is-active { border-color: var(--purple); background: var(--purple-soft); }
.em-ai__q .ic { flex: 0 0 16px; color: var(--purple-ink); }
.em-ai__out:not(:empty) { margin-top: 14px; }
.em-ai__think { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-3); }
.em-ai__think .ic { color: var(--purple); animation: emPulse 1s var(--ease) infinite; }
@keyframes emPulse { 0%,100% { opacity: .4; } 50% { opacity: 1; } }
.em-ai__src { font-size: 12.5px; color: var(--ink-4); display: flex; align-items: center; gap: 6px; margin-bottom: 11px; }
.em-ai__src .ic { width: 13px; height: 13px; }
.em-ai__src b { color: var(--ink-3); font-weight: 600; }
.em-ai__answer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 15px; }
.em-ai__lead { font-size: 14px; color: var(--ink-2); }
.em-ai__lead b { color: var(--ink); }
.em-ai__list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.em-ai__li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--surface-2); border-radius: var(--r-sm); }
.em-ai__li-n { flex: 0 0 20px; width: 20px; height: 20px; border-radius: 50%; background: var(--amber-soft); color: var(--amber-ink); font-size: 12.5px; font-weight: 700; display: grid; place-items: center; }
.em-ai__li-name { font-size: 14px; font-weight: 600; color: var(--ink); flex: 1; }
.em-ai__cta { display: flex; gap: 9px; margin-top: 14px; flex-wrap: wrap; align-items: center; }

/* preventivo card inside AI answer */
.em-prev { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.em-prev__hd { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 15px; background: var(--blue-soft); }
.em-prev__for { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.em-prev__meta { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.em-prev__tot { text-align: right; }
.em-prev__tot-l { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-4); }
.em-prev__tot-v { font-size: 18px; font-weight: 750; color: var(--blue-ink); }
.em-prev__rows { padding: 6px 15px 12px; }
.em-prev__row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.em-prev__row:last-child { border-bottom: 0; }
.em-prev__v { font-size: 13.5px; color: var(--ink-2); }
.em-prev__q { font-size: 12.5px; color: var(--ink-4); }
.em-prev__i { font-size: 13.5px; font-weight: 650; color: var(--ink); }

/* ---- draft reply box ---- */
.em-draft { margin-top: 18px; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--surface-2); overflow: hidden; }
.em-draft__hd { display: flex; align-items: center; justify-content: space-between; padding: 11px 15px; border-bottom: 1px solid var(--line); }
.em-draft__title { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--ink); }
.em-draft__title .ic { width: 14px; height: 14px; color: var(--blue-ink); }
.em-draft__tag { font-size: 12px; font-weight: 600; color: var(--green-ink); background: var(--green-soft); padding: 3px 9px; border-radius: var(--r-pill); }
.em-draft__text { width: 100%; box-sizing: border-box; border: 0; background: var(--surface); padding: 14px 15px; font-family: inherit; font-size: 14px; line-height: 1.6; color: var(--ink-2); resize: vertical; min-height: 150px; outline: none; }
.em-draft__foot { display: flex; gap: 9px; padding: 11px 15px; flex-wrap: wrap; }
.em-regen-row { display: flex; gap: 8px; padding: 0 15px 14px; flex-wrap: wrap; }
.em-regen-row .input { flex: 1; min-width: 220px; }
.em-draft__empty { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px; flex-wrap: wrap; }
.em-draft__empty span { font-size: 13px; color: var(--ink-3); }

/* ---- banner "avanzamento commerciale" (segnale dalla mail) ---- */
.em-sig { display: flex; align-items: flex-start; gap: 12px; margin-top: 16px; padding: 14px 15px;
  border: 1px solid var(--amber); border-left: 4px solid var(--amber); border-radius: var(--r-md); background: var(--amber-soft, #fff8ec); }
.em-sig__ic { font-size: 20px; line-height: 1.2; flex: 0 0 auto; }
.em-sig__bd { flex: 1; min-width: 0; }
.em-sig__tx { font-size: 13.5px; color: var(--ink); line-height: 1.5; }
.em-sig__ev { margin-top: 5px; font-size: 12.5px; font-style: italic; color: var(--ink-3); }
.em-sig__ft { display: flex; gap: 8px; flex: 0 0 auto; }
.em-auto--slim { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.em-auto__hint { font-size: 12.5px; color: var(--ink-3); }

/* ---- automation block ---- */
.em-auto { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; background: var(--surface); }
.em-auto__hd { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--ink); }
.em-auto__hd .ic { color: var(--purple); width: 15px; height: 15px; }
.em-auto__sub { font-size: 13px; color: var(--ink-4); margin: 3px 0 13px 23px; }
/* si adatta alla larghezza REALE del reader (auto-fit), non a quella della finestra */
.em-auto__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.em-auto__btn { display: flex; align-items: flex-start; gap: 11px; text-align: left; font-family: inherit; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 13px; cursor: pointer; transition: all .15s var(--ease); }
.em-auto__btn:hover { border-color: var(--line-2); background: var(--surface-3); transform: translateY(-1px); box-shadow: var(--sh-sm); }
.em-auto__ic { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; }
.em-auto__ic .ic { width: 16px; height: 16px; }
.em-auto__ic--blue { background: var(--blue-soft); color: var(--blue-ink); }
.em-auto__ic--green { background: var(--green-soft); color: var(--green-ink); }
.em-auto__ic--purple { background: var(--purple-soft); color: var(--purple-ink); }
.em-auto__tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.em-auto__tx b { font-size: 13.5px; font-weight: 650; color: var(--ink); }
.em-auto__tx i { font-size: 12.5px; font-style: normal; color: var(--ink-4); }

/* ---- modal ---- */
.em-modal-scrim { position: fixed; inset: 0; background: rgba(20,20,30,0.42); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; z-index: 200; padding: 24px; animation: emFade .18s var(--ease); }
@keyframes emFade { from { opacity: 0; } }
.em-modal { width: 100%; max-width: 480px; max-height: 88vh; overflow: hidden; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-lg); animation: emRise .22s var(--ease-out); }
.em-modal--wide { max-width: 620px; }
@keyframes emRise { from { transform: translateY(12px) scale(.99); opacity: 0; } }
.em-modal__hd { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 700; color: var(--ink); }
.em-modal__x { width: 30px; height: 30px; display: grid; place-items: center; border: 0; background: var(--surface-2); border-radius: 8px; cursor: pointer; color: var(--ink-3); }
.em-modal__x:hover { background: var(--surface-3); }
.em-modal__x .ic { width: 15px; height: 15px; }
.em-modal__bd { padding: 18px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 13px; }
.em-modal__bd--pad0 { padding: 0; background: var(--surface-2); }
.em-modal__ft { display: flex; gap: 9px; padding: 14px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.em-field { display: flex; flex-direction: column; gap: 5px; }
.em-field > span { font-size: 12.5px; font-weight: 650; color: var(--ink-3); text-transform: uppercase; letter-spacing: .3px; }
.em-field input, .em-field textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 10px 12px; font-family: inherit; font-size: 14px; color: var(--ink); background: var(--surface); outline: none; resize: vertical; }
.em-field input:focus, .em-field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.em-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.em-meet { display: flex; align-items: center; gap: 11px; padding: 12px 13px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.em-meet__ic { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: var(--green-soft); color: var(--green-ink); }
.em-meet__tx { flex: 1; min-width: 0; }
.em-meet__t { font-size: 13.5px; font-weight: 650; color: var(--ink); }
.em-meet__l { font-size: 13px; color: var(--blue-ink); margin-top: 1px; }

/* ---- PDF preview document ---- */
.pdf { background: #fff; color: #1D1D1F; margin: 18px; border-radius: 10px; box-shadow: var(--sh-md); padding: 26px 28px; }
.pdf__top { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: 16px; border-bottom: 2px solid var(--ink); }
.pdf__brand { font-size: 17px; font-weight: 750; color: var(--ink); }
.pdf__brandsub { font-size: 12px; color: var(--ink-4); margin-top: 2px; }
.pdf__doc { text-align: right; font-size: 14px; font-weight: 750; letter-spacing: 1px; color: var(--ink); }
.pdf__doc span { font-size: 12px; font-weight: 600; color: var(--ink-4); letter-spacing: .5px; }
.pdf__to { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 18px 0; }
.pdf__lbl { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-4); font-weight: 650; }
.pdf__val { font-size: 14px; font-weight: 650; color: var(--ink); margin-top: 3px; }
.pdf__sub { font-size: 12.5px; color: var(--ink-3); margin-top: 1px; }
.pdf__rows { margin-top: 6px; }
.pdf__rowhd { display: flex; justify-content: space-between; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-4); font-weight: 650; padding-bottom: 7px; border-bottom: 1px solid var(--line-2); }
.pdf__row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); }
.pdf__row span:last-child { font-weight: 650; color: var(--ink); }
.pdf__row--fee { color: var(--ink-3); font-style: italic; }
.pdf__tot { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 16px; padding-top: 14px; border-top: 2px solid var(--ink); }
.pdf__totv { font-size: 24px; font-weight: 750; color: var(--ink); margin-top: 2px; }
.pdf__perpax { text-align: right; }
.pdf__perpaxv { font-size: 15px; font-weight: 700; color: var(--blue-ink); margin-top: 2px; }
.pdf__note { margin-top: 16px; font-size: 12px; color: var(--ink-4); line-height: 1.5; }

/* fornitori — list (vertical) view */
.for-list { display: flex; flex-direction: column; gap: 7px; }
.for-lrow { display: grid; grid-template-columns: 1.7fr 1fr 92px 64px 96px auto; gap: 14px; align-items: center; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); cursor: pointer; transition: background 0.13s var(--ease); }
.for-lrow:hover { background: var(--surface-2); }

/* fornitori — legend (what the numbers mean) */
.for-legend { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; padding: 9px 14px; margin-bottom: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); font-size: 13px; color: var(--ink-3); }
.for-legend__item { display: inline-flex; align-items: center; gap: 6px; }
.for-legend__item svg { width: 13px; height: 13px; color: var(--ink-4); }
.for-legend__item .chip { padding: 0 7px; font-size: 12px; }
/* variant: inside the first group, between its header and the supplier cards */
.for-legend--inset { justify-content: flex-start; margin: 0 0 10px; padding: 7px 12px; }

/* fornitori — category jump bar (top) */
.for-jump { display: flex; gap: 7px; flex-wrap: wrap; margin: 4px 0 0; }
.for-jump .fchip { display: inline-flex; align-items: center; gap: 6px; }
.for-jump .fchip svg { width: 13px; height: 13px; }
.for-jump .fchip b { font-weight: 700; opacity: 0.7; }
.for-jump .fchip:hover { background: var(--surface-2); border-color: currentColor; }
/* anchor target: land below the sticky topbar */
.for-group { scroll-margin-top: 70px; }

/* ============================================================
   Email & Agenda — menu a tendina vista
   ============================================================ */
.viewdd { position: relative; display: inline-block; }
.viewdd__btn { display: inline-flex; align-items: center; gap: 8px; font-family: inherit; font-size: 20px; font-weight: 750; color: var(--ink); background: transparent; border: 0; padding: 2px 4px 2px 0; cursor: pointer; border-radius: var(--r-sm); }
.viewdd__btn:hover { color: var(--ink-2); }
.viewdd__caret { width: 16px; height: 16px; color: var(--ink-4); transition: transform .18s var(--ease); }
.viewdd.is-open .viewdd__caret { transform: rotate(180deg); }
.viewdd__menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 160px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--sh-md); padding: 5px; z-index: 80; }
.viewdd__item { display: block; width: 100%; text-align: left; font-family: inherit; font-size: 14px; font-weight: 600; color: var(--ink-2); background: transparent; border: 0; border-radius: var(--r-sm); padding: 9px 12px; cursor: pointer; }
.viewdd__item:hover { background: var(--surface-2); }
.viewdd__item.is-active { color: var(--blue-ink); background: var(--blue-soft); }

/* ============================================================
   Agenda — legenda + layout calendario / chat
   ============================================================ */
.cal-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.cal-leg { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.cal-leg__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--lc); display: inline-block; }

.ag-layout { display: grid; grid-template-columns: 1fr 320px; gap: 16px; height: calc(100vh - 250px); min-height: 480px; }
@media (max-width: 1080px) { .ag-layout { grid-template-columns: 1fr; height: auto; } }

/* ---- calendario ---- */
.cal-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-sm); overflow: hidden; }
.cal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.cal-head__title { font-size: 15px; font-weight: 750; color: var(--ink); }
.cal-head__nav { display: flex; gap: 6px; }
.cal-nav { min-width: 30px; height: 30px; padding: 0 10px; display: grid; place-items: center; font-family: inherit; font-size: 15px; font-weight: 600; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; }
.cal-nav:hover { background: var(--surface-3); }
.cal-nav--today { font-size: 13px; }
.cal-grid { flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); grid-template-rows: 30px; grid-auto-rows: minmax(0, 1fr); overflow-y: auto; }
.cal-dow { padding: 7px 9px 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-4); border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.cal-day { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px; min-height: 84px; display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day--off { background: var(--surface-2); }
.cal-day__n { font-size: 13px; font-weight: 650; color: var(--ink-3); }
.cal-day--today { background: var(--blue-soft); }
.cal-day--today .cal-day__n { width: 20px; height: 20px; display: grid; place-items: center; background: var(--blue); color: #fff; border-radius: 50%; }
.cal-ev { display: block; width: 100%; text-align: left; font-family: inherit; font-size: 12px; font-weight: 600; line-height: 1.3; padding: 3px 7px; border: 0; border-radius: 5px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.cal-ev--green  { background: var(--green); }
.cal-ev--blue   { background: var(--blue); }
.cal-ev--amber  { background: var(--amber); }
.cal-ev--purple { background: var(--purple); }
.cal-ev--red    { background: var(--red); }
.cal-ev--cont { opacity: .65; padding-top: 2px; padding-bottom: 2px; font-weight: 550; }
.cal-ev:hover { filter: brightness(1.08); }
.cal-more { font-size: 12px; font-weight: 600; color: var(--ink-4); padding-left: 2px; }

/* ---- chat con il calendario ---- */
.cal-chat { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-sm); overflow: hidden; }
.cal-chat__hd { display: flex; align-items: center; gap: 10px; padding: 13px 15px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.cal-chat__ic { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: linear-gradient(135deg,#8E5BE8,#0071E3); color: #fff; }
.cal-chat__ic .ic { width: 16px; height: 16px; }
.cal-chat__t { font-size: 14px; font-weight: 700; color: var(--ink); }
.cal-chat__s { font-size: 12px; color: var(--ink-4); margin-top: 1px; }
.cal-chat__msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.cal-msg { max-width: 88%; font-size: 13.5px; line-height: 1.5; padding: 9px 12px; border-radius: 13px; }
.cal-msg--ai { align-self: flex-start; background: var(--surface-2); color: var(--ink-2); border-bottom-left-radius: 4px; }
.cal-msg--user { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
.cal-msg b { color: inherit; }
.cal-think { color: var(--ink-4); font-style: italic; animation: emPulse 1s var(--ease) infinite; }
.cal-msg__ev { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 10px; margin: 7px 0; font-size: 13px; }
.cal-msg__ev .cal-leg__dot { margin-right: 6px; }
.cal-msg__when { color: var(--ink-4); font-size: 12.5px; }
.cal-chat__sugg { display: flex; flex-direction: column; gap: 6px; padding: 0 14px 10px; }
.cal-sugg { text-align: left; font-family: inherit; font-size: 13px; font-weight: 550; color: var(--purple-ink); background: var(--purple-soft); border: 1px solid transparent; border-radius: var(--r-pill); padding: 7px 12px; cursor: pointer; }
.cal-sugg:hover { border-color: var(--purple); }
.cal-chat__input { display: flex; gap: 8px; padding: 11px 13px; border-top: 1px solid var(--line); }
.cal-chat__input input { flex: 1; border: 1px solid var(--line-2); border-radius: var(--r-pill); padding: 9px 14px; font-family: inherit; font-size: 13.5px; color: var(--ink); outline: none; background: var(--surface); }
.cal-chat__input input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.cal-chat__send { flex: 0 0 36px; width: 36px; height: 36px; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; cursor: pointer; }
.cal-chat__send:hover { background: var(--blue-ink); }
.cal-chat__send .ic { width: 15px; height: 15px; }

/* ============ Offerte fornitori (aggregatore promo tour operator) ============ */
.of-live { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--green-ink); background: var(--green-soft); padding: 6px 12px; border-radius: var(--r-pill); white-space: nowrap; }
.of-live__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: ofPulse 1.7s ease-in-out infinite; }
@keyframes ofPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.3; transform: scale(0.75); } }
.of-filters { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.of-filters__sep { width: 1px; height: 20px; background: var(--line-2); margin: 0 5px; flex-shrink: 0; }
/* tutto deve stare nella pagina senza scroll orizzontale: niente min-width,
   colonne fisse strette, titolo e T.O. si comprimono con ellipsis */
.of-table { min-width: 720px; }
.bk-head.of-grid, .bk-row.of-grid { grid-template-columns: minmax(170px, 2fr) minmax(96px, 1fr) 80px 92px 44px 40px 74px 92px; gap: 9px; }
.of-old { text-decoration: line-through; color: var(--ink-4); font-weight: 500; font-size: 12px; margin-left: 4px; }
.of-row--dead { opacity: 0.45; }
.of-src { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.of-src svg { width: 12px; height: 12px; flex-shrink: 0; }
.of-quote { background: var(--surface-2); border-left: 3px solid var(--line-2); border-radius: var(--r-sm); padding: 12px 14px; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); white-space: pre-wrap; word-break: break-word; }

/* ============================================================ CRM-STANDARD — SMALL DROPDOWN FILTERS (.dd) */
.dd { position: relative; }
.dd__btn { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; padding: 7px 13px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); color: var(--ink-3); cursor: pointer; transition: background 0.13s var(--ease), border-color 0.13s var(--ease); }
.dd__btn:hover { background: var(--surface-2); }
.dd__btn b { color: var(--ink); font-weight: 700; }
.dd__btn.is-set { border-color: var(--blue); background: var(--blue-soft); color: var(--blue-ink); }
.dd__btn.is-set b { color: var(--blue-ink); }
/* chevron: points right when closed, rotates down when the menu is open */
.dd__chev { display: inline-flex; }
.dd__chev svg { width: 13px; height: 13px; color: var(--ink-4); transition: transform 0.18s var(--ease); }
.dd.is-open .dd__chev svg { transform: rotate(90deg); }
.dd__menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; min-width: 240px; max-height: 320px; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--sh-md); padding: 6px; display: flex; flex-direction: column; gap: 2px; }
/* display:flex would defeat the hidden attribute — keep closed menus closed */
.dd__menu[hidden] { display: none; }
.dd__item { display: flex; align-items: center; gap: 8px; text-align: left; padding: 8px 10px; border-radius: var(--r-sm); font-size: 13.5px; font-weight: 600; color: var(--ink-2); background: none; border: 0; cursor: pointer; font-family: inherit; }
.dd__item:hover { background: var(--surface-2); }
.dd__item.is-active { background: var(--blue-soft); color: var(--blue-ink); }
.dd__item svg { width: 14px; height: 14px; color: var(--ink-4); flex-shrink: 0; }
.dd__item.is-active svg { color: var(--blue-ink); }
.dd__n { margin-left: auto; font-size: 12.5px; font-weight: 700; color: var(--ink-4); background: var(--surface-3); border-radius: var(--r-pill); padding: 1px 7px; }

/* topbar breadcrumb: macro-area sempre in cima, sotto-sezione piu leggera */
.topbar__crumb-sep { margin: 0 8px; color: var(--ink-5); font-weight: 400; }
.topbar__crumb { color: var(--ink-3); font-weight: 550; }
.crumbbar { position: sticky; top: 0; z-index: 6; display: flex; align-items: center; justify-content: space-between; height: 57px; box-sizing: border-box; padding: 16px 28px; border-bottom: 1px solid var(--line); background: var(--surface); flex-shrink: 0; }

/* ============ Agenda: viste oggi / settimana con fasce orarie verticali ============ */
button.cal-more { border: 0; background: transparent; font-family: inherit; text-align: left; cursor: pointer; }
button.cal-more:hover { color: var(--ink-2); text-decoration: underline; }
.cal-tgwrap { flex: 1; overflow-y: auto; }
.cal-tg { display: flex; flex-direction: column; min-width: 0; }
.cal-tg__head, .cal-tg__allday, .cal-tg__body { display: grid; grid-template-columns: 56px repeat(var(--cols), 1fr); }
.cal-tg__head { position: sticky; top: 0; background: var(--surface); z-index: 2; border-bottom: 1px solid var(--line); }
.cal-tg__dow { padding: 8px 10px 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--ink-4); border-left: 1px solid var(--line); }
.cal-tg__dow b { display: block; font-size: 15px; font-weight: 700; color: var(--ink-2); letter-spacing: -0.01em; text-transform: none; margin-top: 1px; }
.cal-tg__dow--today { background: var(--blue-soft); }
.cal-tg__dow--today b { color: var(--blue); }
.cal-tg__allday { border-bottom: 1px solid var(--line); background: var(--surface-2); }
.cal-tg__gut { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: var(--ink-4); display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; }
.cal-tg__adcell { border-left: 1px solid var(--line); padding: 4px; display: flex; flex-direction: column; gap: 3px; min-height: 30px; min-width: 0; }
.cal-tg__hours { display: flex; flex-direction: column; }
.cal-tg__hour { font-size: 12px; color: var(--ink-4); text-align: right; padding-right: 8px; font-variant-numeric: tabular-nums; }
.cal-tg__col { position: relative; border-left: 1px solid var(--line); background-image: repeating-linear-gradient(to bottom, var(--line) 0, var(--line) 1px, transparent 1px, transparent 46px); min-width: 0; }
.cal-tg__ev { position: absolute; left: 4px; right: 4px; border: 0; border-radius: 6px; padding: 4px 8px; font-family: inherit; font-size: 12.5px; font-weight: 600; line-height: 1.35; color: #fff; text-align: left; cursor: pointer; overflow: hidden; box-shadow: var(--sh-xs); z-index: 1; }
.cal-tg__ev b { font-weight: 750; margin-right: 5px; }
.cal-tg__ev:hover { filter: brightness(1.08); }
.cal-tg__now { position: absolute; left: 0; right: 0; height: 2px; background: var(--red); z-index: 2; pointer-events: none; }
.cal-tg__now::before { content: ''; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }

/* agenda chat — candidate contact cards (chi? → è lui?) */
.cal-cands { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.cal-cand { text-align: left; padding: 8px 11px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); cursor: pointer; font: inherit; font-size: 13px; line-height: 1.45; transition: border-color 0.13s var(--ease), background 0.13s var(--ease); }
.cal-cand:hover { border-color: var(--blue); background: var(--blue-soft); }

/* header actions: bottoni di pagina alzati nella barra in alto */
.hdr-actions { display: flex; align-items: center; gap: 9px; margin-right: 4px; }

/* Intelligente — modale riconoscimento documento */
.drop-zone.is-over { border-color: var(--blue); background: var(--blue-soft); }
.smart-tipo { display: flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--ink-2); padding: 11px 13px; background: var(--purple-soft); border-radius: var(--r-md); }
.smart-tipo .ic { color: var(--purple-ink); flex: 0 0 16px; }
.smart-tipo b { color: var(--purple-ink); }
.smart-rows { display: flex; flex-direction: column; }
.smart-row { display: grid; grid-template-columns: 130px 1fr auto; gap: 12px; align-items: center; padding: 9px 2px; border-bottom: 1px solid var(--line); }
.smart-row:last-child { border-bottom: 0; }
.smart-row__k { font-size: 12.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .3px; color: var(--ink-4); }
.smart-row__v { font-size: 14px; font-weight: 550; color: var(--ink); }

/* ---------------- Contabilità (Entrate / Uscite) ---------------- */
.ct-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.ct-layout { display: grid; grid-template-columns: 1.65fr 1fr; gap: 18px; align-items: start; }
.ct-rows { display: flex; flex-direction: column; padding-bottom: 6px; }
.ct-row { display: grid; grid-template-columns: 112px minmax(0, 1.8fr) max-content max-content max-content 110px; gap: 12px; align-items: center; padding: 11px 20px; border-top: 1px solid var(--line); cursor: pointer; transition: background 0.13s var(--ease); }
.ct-row:hover { background: var(--surface-2); }
.ct-row__num { font-weight: 650; font-size: 12.8px; }
.ct-row__date { font-size: 13px; color: var(--ink-4); margin-top: 1px; }
.ct-row__who { font-weight: 600; font-size: 14px; }
.ct-row__desc { font-size: 13px; color: var(--ink-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.ct-row__amt { font-weight: 700; font-size: 14px; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 1280px) { .ct-row { grid-template-columns: 100px minmax(0, 1.5fr) max-content max-content 100px; } .ct-row > div:nth-child(4) { display: none; } }
@media (max-width: 1100px) { .ct-layout { grid-template-columns: 1fr; } .ct-metrics { grid-template-columns: repeat(2, 1fr); } }

/* ---------------- Team — leaderboard stile GitHub contributors ---------------- */
.tm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.tm-card { cursor: pointer; transition: box-shadow 0.13s var(--ease), transform 0.13s var(--ease); }
.tm-card:hover { box-shadow: var(--sh-sm); transform: translateY(-1px); }
.tm-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px 12px; }
.tm-rank { font-size: 14px; font-weight: 750; color: var(--ink-4); min-width: 28px; font-variant-numeric: tabular-nums; }
.tm-rank--top { color: var(--amber-ink, #B8860B); }
.tm-avatar { width: 38px; height: 38px; font-size: 14px; flex-shrink: 0; }
.tm-nome { font-size: 14.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; }
.tm-ruolo { font-size: 13px; color: var(--ink-4); margin-top: 2px; }
.tm-spark { margin-left: auto; text-align: right; flex-shrink: 0; }
.tm-spark__k { font-size: 12px; color: var(--ink-5); margin-top: 2px; }
.tm-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 0 20px 12px; }
.tm-stat__v { font-size: 19px; font-weight: 750; letter-spacing: -0.01em; }
.tm-stat__k { font-size: 12.5px; color: var(--ink-4); margin-top: 1px; }
.tm-months { position: relative; height: 15px; margin: 0 20px; font-size: 12px; color: var(--ink-5); }
.tm-months span { position: absolute; top: 0; }
.tm-squares { display: grid; grid-template-rows: repeat(7, 9px); grid-auto-flow: column; grid-auto-columns: 9px; gap: 2.5px; padding: 0 20px; overflow: hidden; }
.tm-sq { border-radius: 2px; background: var(--surface-3); }
.tm-sq--1 { background: #9be9a8; }
.tm-sq--2 { background: #40c463; }
.tm-sq--3 { background: #30a14e; }
.tm-sq--4 { background: #216e39; }
.tm-goals { padding: 12px 20px 16px; display: flex; flex-direction: column; gap: 8px; }
.tm-goal { display: grid; grid-template-columns: 78px 1fr 76px max-content; align-items: center; gap: 10px; font-size: 13px; }
.tm-goal__k { color: var(--ink-3); font-weight: 600; }
.tm-goal__track { height: 6px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.tm-goal__fill { display: block; height: 100%; border-radius: 4px; }
.tm-goal__fill--green { background: var(--green); }
.tm-goal__fill--amber { background: var(--amber); }
.tm-goal__fill--red { background: var(--red); }
.tm-goal__n { text-align: right; color: var(--ink-3); }
@media (max-width: 1100px) { .tm-grid { grid-template-columns: 1fr; } }

/* ============================================================
   Leads — realtà ricostruite dallo storico email
   ============================================================ */
.ld-mined { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink-3); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 11px 15px; margin-bottom: 14px; }
.ld-mined .ic { color: var(--purple); flex: 0 0 16px; }
.ld-mined b { color: var(--ink); }

/* lead caldi fermi (marcescenti) */
.ld-rotting:not(:empty) { background: var(--amber-soft); border: 1px solid rgba(245,166,35,.35); border-radius: var(--r-md); padding: 12px 15px; margin-bottom: 14px; }
.ld-rot__hd { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--amber-ink); }
.ld-rot__hd .ic { width: 15px; height: 15px; }
.ld-rot__row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.ld-rot__card { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; text-align: left; font-family: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 12px; cursor: pointer; transition: box-shadow .15s; }
.ld-rot__card:hover { box-shadow: var(--sh-sm); }
.ld-rot__n { font-size: 13.5px; font-weight: 650; color: var(--ink); }
.ld-rot__t { display: flex; align-items: center; gap: 7px; }
.ld-rot__ago { font-size: 12.5px; color: var(--ink-4); }

/* barra filtri */
.ld-bar { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.ld-bar__right { display: flex; align-items: center; gap: 9px; }
.ld-search { border: 1px solid var(--line-2); border-radius: var(--r-pill); padding: 8px 14px; font-family: inherit; font-size: 13.5px; color: var(--ink); background: var(--surface); outline: none; width: 220px; }
.ld-search:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }

/* tabella lead */
.ld-table { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-sm); overflow: hidden; }
.ld-head, .ld-row { display: grid; grid-template-columns: 2.2fr 1.1fr 1fr 1fr .5fr .8fr .8fr; gap: 12px; align-items: center; padding: 11px 18px; }
.ld-head > *, .ld-row > * { min-width: 0; }
@media (max-width: 1280px) { .ld-head, .ld-row { gap: 9px; padding: 11px 14px; } }
.ld-head { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-4); border-bottom: 1px solid var(--line-2); position: sticky; top: 0; background: var(--surface); }
.ld-row { border-bottom: 1px solid var(--line); cursor: pointer; transition: background .12s; }
.ld-row:last-child { border-bottom: 0; }
.ld-row:hover { background: var(--surface-2); }
.ld-who__n { font-size: 14px; font-weight: 650; color: var(--ink); }
.ld-who__s { font-size: 12.5px; color: var(--ink-4); margin-top: 1px; }
.ld-owner { display: flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--ink-2); }
.avatar--xs { width: 22px; height: 22px; font-size: 12px; flex: 0 0 22px; }
.ld-warm { display: flex; align-items: center; gap: 8px; }
.ld-warm .scorebar { flex: 1; max-width: 70px; }
.ld-warm--green { background: var(--green); }
.ld-warm--amber { background: var(--amber); }
.ld-warm--red { background: var(--red); }
.ld-warm > span { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.ld-num { text-align: right; font-size: 13.5px; color: var(--ink-2); }
.ld-cell { font-size: 13.5px; color: var(--ink-3); }
@media (max-width: 1000px) { .ld-head, .ld-row { grid-template-columns: 2fr 1fr 1fr; } .ld-head span:nth-child(n+4), .ld-row > div:nth-child(n+4) { display: none; } }

/* drawer dettaglio */
.drawer__sub { font-size: 13px; color: var(--ink-4); margin-top: 3px; }
.drawer__section { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-3); margin: 20px 0 10px; }
.ld-next { display: flex; gap: 10px; align-items: flex-start; background: var(--blue-soft); border-radius: var(--r-md); padding: 12px 14px; margin-top: 16px; }
.ld-next > div { min-width: 0; }
.ld-next .ic { color: var(--blue-ink); flex: 0 0 15px; margin-top: 1px; }
.ld-next__l { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--blue-ink); }
.ld-next__v { font-size: 14px; color: var(--ink); margin-top: 2px; overflow-wrap: anywhere; }
.ld-ev { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ld-ev > div { min-width: 0; }
.ld-ev:last-of-type { border-bottom: 0; }
.ld-ev__dir { flex: 0 0 26px; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; }
.ld-ev__dir .ic { width: 13px; height: 13px; }
.ld-ev__dir--in { background: var(--green-soft); color: var(--green-ink); }
.ld-ev__dir--out { background: var(--blue-soft); color: var(--blue-ink); }
.ld-ev__s { font-size: 13.5px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.ld-ev__d { font-size: 12.5px; color: var(--ink-4); margin-top: 1px; }

/* ============================================================ CONTABILITÀ v2 — layout verticale */
/* adempimenti a tutta larghezza: righe su due colonne */
.ct-ademp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 14px; }
@media (max-width: 900px) { .ct-ademp-grid { grid-template-columns: 1fr; } }

/* commercialista: barra orizzontale (da sinistra a destra) in fondo a Entrate/Uscite */
.ct-comm-bar { display: flex; align-items: center; gap: 22px; padding: 14px 20px; flex-wrap: wrap; }
.ct-comm-bar__id { display: flex; align-items: center; gap: 11px; min-width: 200px; }
.ct-comm-bar__name { font-size: 14.5px; font-weight: 700; }
.ct-comm-bar__sub { font-size: 13px; color: var(--ink-4); margin-top: 1px; }
.ct-comm-bar__cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ct-comm-bar__k { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-4); }
.ct-comm-bar__v { font-size: 13px; color: var(--ink-2); font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }
.ct-comm-bar__acts { display: flex; gap: 8px; margin-left: auto; flex-shrink: 0; }

/* pagina Commercialista */
.cm-layout { display: grid; grid-template-columns: 1.25fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 1080px) { .cm-layout { grid-template-columns: 1fr; } }
.cm-chat { display: flex; flex-direction: column; height: 560px; }
.cm-chat .cal-chat__msgs { flex: 1; overflow: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.cm-mailrow { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: var(--r-md); cursor: pointer; transition: background 0.13s var(--ease); }
.cm-mailrow:hover { background: var(--surface-2); }
.cm-mailrow__dir { width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cm-mailrow__dir--in { background: var(--blue-soft); color: var(--blue-ink); }
.cm-mailrow__dir--out { background: var(--green-soft); color: var(--green-ink); }
.cm-mailrow__obj { font-size: 13.5px; font-weight: 650; }
.cm-mailrow__prev { font-size: 13px; color: var(--ink-4); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.cm-mailrow__when { margin-left: auto; font-size: 12px; color: var(--ink-4); white-space: nowrap; flex-shrink: 0; }

/* ============ Marketing: stato vuoto + collegamento canali ============ */
.mk-dash { color: var(--ink-5); }
.mk-setup { padding: 16px 18px; }
.mk-setup__hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.mk-setup__sub { font-size: 13.5px; color: var(--ink-4); margin-top: 3px; }
.mk-srcs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.mk-src { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); min-width: 0; }
.mk-src.is-on { border-color: var(--green); background: var(--green-soft); }
.mk-src.is-flash { animation: mkFlash 1.2s var(--ease); }
@keyframes mkFlash { 0%, 60% { box-shadow: 0 0 0 3px var(--blue-soft); border-color: var(--blue); } 100% { box-shadow: none; } }
.mk-badge { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; color: #fff; font-size: 13px; flex-shrink: 0; }
.mk-src__t { display: flex; flex-direction: column; min-width: 0; flex: 0 0 168px; }
.mk-src__n { font-size: 14px; font-weight: 650; }
.mk-src__sub { font-size: 12.5px; color: var(--ink-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-src__in { flex: 1; min-width: 0; padding: 7px 10px; font-size: 13px; }
.mk-src__done { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; font-weight: 600; color: var(--green-ink); overflow: hidden; }
.mk-src__done svg { width: 13px; height: 13px; display: inline; vertical-align: -2px; }
.mk-src__done i { font-style: normal; font-size: 12px; font-weight: 500; color: var(--ink-4); }
.mk-sec { display: flex; align-items: baseline; gap: 10px; margin: 18px 2px 10px; }
.mk-sec__t { font-size: 14px; font-weight: 750; letter-spacing: -0.01em; }
.mk-sec__s { font-size: 13px; color: var(--ink-4); }
.mk-accgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.mk-acc { border: 1.5px dashed var(--line-2); border-radius: var(--r-lg); padding: 13px 14px; background: var(--surface); display: flex; flex-direction: column; gap: 11px; }
.mk-acc__top { display: flex; align-items: center; gap: 10px; }
.mk-acc__top > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.mk-acc__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.mk-acc__stats span { display: flex; justify-content: space-between; font-size: 13px; border-bottom: 1px dashed var(--line); padding-bottom: 4px; }
.mk-acc__stats i { font-style: normal; color: var(--ink-4); }
.mk-acc__cta { margin-top: auto; border: 0; background: var(--surface-2); border-radius: var(--r-pill); padding: 7px 12px; font-family: inherit; font-size: 13px; font-weight: 650; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.mk-acc__cta:hover { background: var(--ink); color: #fff; }
.mk-acc__cta svg { width: 13px; height: 13px; }
.mk-2col { display: grid; grid-template-columns: 1.55fr 1fr; gap: 12px; margin-top: 12px; }
/* i figli di grid/flex con dentro grafici (sparkline SVG) devono poter restringersi
   sotto la larghezza del contenuto, altrimenti sforano la traccia (min-width:auto di default) */
.mk-2col > *, .mk-accgrid > *, .mk-chgrid > *, .mk-card, .mk-acc { min-width: 0; }
.mk-card, .mk-acc { overflow: hidden; }
/* le sparkline non devono mai sporgere dalla loro card */
.mk-acc__spark { overflow: hidden; max-width: 120px; }
.mk-acc__spark svg { display: block; max-width: 100%; }
.mk-card { padding: 15px 17px; display: flex; flex-direction: column; }
.mk-card__hd { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.mk-card__hd b { font-size: 14.5px; font-weight: 750; letter-spacing: -0.01em; }
.mk-card__s { font-size: 13px; color: var(--ink-4); }
.mk-ghost { flex: 1; min-height: 180px; border: 1.5px dashed var(--line-2); border-radius: var(--r-md); background: repeating-linear-gradient(to top, var(--surface-2) 0, var(--surface-2) 1px, transparent 1px, transparent 36px); display: grid; place-items: center; }
.mk-ghost__note { font-size: 13px; color: var(--ink-4); background: var(--surface); padding: 6px 14px; border-radius: var(--r-pill); border: 1px solid var(--line); }
.mk-legend { display: flex; gap: 16px; align-items: center; font-size: 13px; color: var(--ink-3); margin-top: 10px; }
.mk-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.mk-fun { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 13px; }
.mk-fun__l { flex: 0 0 96px; color: var(--ink-3); }
.mk-fun__bar { flex: 1; height: 9px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.mk-fun__bar i { display: block; height: 100%; border-radius: var(--r-pill); background: var(--line-2); opacity: 0.6; }
.mk-fun > b { flex: 0 0 36px; text-align: right; font-size: 13px; }
.mk-funnel__ft { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); }
.mk-chgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.mk-ch { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); padding: 12px 14px; }
.mk-ch__rows { margin-top: 8px; }
.mk-ch__rows .mk-fun { border-bottom: 1px dashed var(--line); }
.mk-ch__rows .mk-fun:last-child { border-bottom: 0; }
.mk-ch__rows .mk-fun__l { flex: 1; }
.mk-ch__via { margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--ink-4); text-transform: uppercase; letter-spacing: 0.03em; }
.mk-empty { border: 1.5px dashed var(--line-2); border-radius: var(--r-md); padding: 22px 18px; font-size: 13.5px; color: var(--ink-4); text-align: center; }
@media (max-width: 1100px) { .mk-srcs, .mk-accgrid, .mk-chgrid { grid-template-columns: 1fr 1fr; } .mk-2col { grid-template-columns: 1fr; } }

/* ---- Team: barra griglia/lista + vista lista ---- */
.tm-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.tm-bar__title { font-size: 14px; font-weight: 700; color: var(--ink-3); }
.tm-list { display: flex; flex-direction: column; gap: 8px; }
.tm-row { display: grid; grid-template-columns: 26px 32px minmax(150px, 1.3fr) repeat(4, minmax(78px, 0.6fr)) max-content 112px; gap: 12px; align-items: center; padding: 10px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); cursor: pointer; transition: background 0.13s var(--ease), box-shadow 0.13s var(--ease); }
.tm-row:hover { background: var(--surface-2); box-shadow: var(--sh-xs); }
/* riga «Accessi e permessi»: layout proprio (NON la griglia della classifica tm-row,
   che ha 8 colonne e faceva accavallare nome/email/chip) */
.acc-row { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background 0.13s var(--ease); }
.acc-row:last-child { border-bottom: 0; }
.acc-row:hover { background: var(--surface-2); }
.acc-row__who { min-width: 0; flex: 1 1 auto; }
.acc-row__nome { font-size: 14.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-row__mail { font-size: 12.5px; color: var(--ink-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-row__chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; flex-shrink: 0; max-width: 60%; }
.tm-row__nome { font-size: 14.5px; font-weight: 700; display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; }
.tm-row__nome .ic { width: 13px; height: 13px; color: var(--amber-ink, #B8860B); }
.tm-row .tm-stat__v { font-size: 15px; }
.tm-row .tm-stat__k { font-size: 12px; }
.tm-row__goals { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tm-row__spark { text-align: right; }
@media (max-width: 1280px) { .tm-row { grid-template-columns: 26px 32px minmax(140px, 1.3fr) repeat(4, minmax(70px, 0.6fr)) max-content; } .tm-row__spark { display: none; } }
@media (max-width: 1100px) { .tm-row__goals { display: none; } .tm-row { grid-template-columns: 26px 32px minmax(120px, 1.3fr) repeat(4, minmax(60px, 0.6fr)); } }

/* Home: voce autonoma sopra "Operativo" */
.nav-home { margin: 2px 0 6px; }

/* ============================================================ HOME (Plancia) —
   sintesi a schede, tutta in una vista: niente scroll di pagina */
.content--home { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; padding: 16px 22px 18px; max-width: none; }
.home-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr 1.08fr; grid-template-rows: 1fr 1fr; gap: 13px; }
.hcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-xs); padding: 15px 17px; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.hcard--mail { grid-column: 3; grid-row: 1 / 3; }
.hcard__hd { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.hcard__ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.hcard__ic svg { width: 16px; height: 16px; color: #fff; }
.hcard__t { font-size: 14.5px; font-weight: 750; letter-spacing: -0.01em; }
.hstats { display: flex; gap: 8px; }
.hstat { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; text-decoration: none; color: inherit; transition: background 0.13s var(--ease), border-color 0.13s var(--ease), transform 0.13s var(--ease); }
.hstat:hover { background: var(--surface-2); border-color: var(--line-2); transform: translateY(-1px); }
.hstat b { display: block; font-size: 21px; font-weight: 750; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hstat span { display: block; font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.03em; color: var(--ink-4); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hcard__cta { margin-top: auto; padding-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
/* righe Azienda */
.hrows { display: flex; flex-direction: column; gap: 7px; flex: 1; min-height: 0; }
.hrow { flex: 1; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-md); text-decoration: none; color: inherit; min-height: 0; transition: background 0.13s var(--ease); }
.hrow:hover { background: var(--surface-2); }
.hrow__ic { display: inline-flex; color: var(--ink-4); }
.hrow__ic svg { width: 15px; height: 15px; }
.hrow b { font-size: 13.5px; font-weight: 700; }
.hrow__val { margin-left: auto; font-size: 13px; color: var(--ink-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hrow > svg:last-child { width: 14px; height: 14px; color: var(--ink-5); flex-shrink: 0; }
.hdot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin: 0 3px 1px 2px; }
/* mail recenti */
.hmail-list { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 7px; }
.hmail { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--r-md); cursor: pointer; min-height: 0; transition: background 0.13s var(--ease); }
.hmail:hover { background: var(--surface-2); }
.hmail--unread { border-left: 3px solid var(--amber); }
.hmail--unread .hmail__from { font-weight: 750; }
.hmail__av { width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0; }
.hmail__bd { min-width: 0; flex: 1; }
.hmail__from { display: block; font-size: 13px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hmail__subj { display: block; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hmail__time { font-size: 12px; color: var(--ink-4); flex-shrink: 0; }
@media (max-width: 1180px) {
  .content--home { overflow: auto; }
  .home-grid { grid-template-columns: 1fr 1fr; grid-template-rows: none; }
  .hcard--mail { grid-column: auto; grid-row: auto; }
}
@media (max-width: 760px) {
  .content--home { overflow: visible; height: auto; }
  .home-grid { grid-template-columns: 1fr; }
}

/* Leads: paginazione "mostra altri" per import massivi */
.ld-morebtn { display: block; width: 100%; margin-top: 8px; padding: 10px; border: 1px dashed var(--line-2); border-radius: var(--r-md); background: var(--surface); font-family: inherit; font-size: 13.5px; font-weight: 650; color: var(--ink-2); cursor: pointer; }
.ld-morebtn:hover { background: var(--surface-2); border-color: var(--ink-4); }

/* nuovo viaggio: titolo editabile dentro la pagina (l'header sopra non cambia mai) */
.trip-titlebar { border-bottom: 2px solid var(--line); margin: 0 0 18px; }
.trip-titlebar .ab-title-input { font-size: 22px; max-width: 100%; padding: 2px 0 8px; }
.ld-rot__more { align-self: center; font-size: 13px; font-weight: 650; color: var(--amber-ink); padding: 0 6px; }

/* ============ Home v2: hero scura + KPI + colonne vive ============ */
.hm-hero { position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 26px 28px; color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  background: var(--surface-2); box-shadow: var(--sh-sm); }
/* niente gradienti decorativi (regola grafite): la gerarchia la fanno testo e spazio */
.hm-hero__hi { font-size: 24px; font-weight: 750; letter-spacing: -0.025em; }
.hm-hero__sub { font-size: 14px; color: rgba(255, 255, 255, 0.62); margin-top: 3px; }
.hm-hero__chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.hm-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 550; color: rgba(255, 255, 255, 0.92); background: rgba(255, 255, 255, 0.09); border: 1px solid rgba(255, 255, 255, 0.16); border-radius: var(--r-pill); padding: 7px 13px; text-decoration: none; transition: background 0.14s var(--ease); position: relative; z-index: 1; }
.hm-chip:hover { background: rgba(255, 255, 255, 0.17); }
.hm-chip b { font-weight: 750; font-variant-numeric: tabular-nums; }
.hm-chip .hdot { width: 7px; height: 7px; border-radius: 50%; background: #34C759; display: inline-block; animation: ofPulse 1.7s ease-in-out infinite; }
.hm-hero__cta { display: flex; gap: 9px; position: relative; z-index: 1; flex-shrink: 0; }
.hm-btn-ghost { background: rgba(255, 255, 255, 0.1); color: #fff; border: 1px solid rgba(255, 255, 255, 0.22); }
.hm-btn-ghost:hover { background: rgba(255, 255, 255, 0.18); }
.hm-kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 12px 0; }
.hm-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 14px; text-decoration: none; color: var(--ink); box-shadow: var(--sh-xs); transition: transform 0.13s var(--ease), box-shadow 0.13s var(--ease); }
.hm-kpi:hover { transform: translateY(-2px); box-shadow: var(--sh-sm); }
.hm-kpi b { display: block; font-size: 22px; font-weight: 750; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.hm-kpi span { font-size: 12.5px; font-weight: 600; color: var(--ink-4); }
.hm-grid2 { display: grid; grid-template-columns: 1.15fr 1fr; gap: 12px; align-items: stretch; }
.hm-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-xs); padding: 15px 16px; display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.hm-card__hd { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 750; letter-spacing: -0.01em; margin-bottom: 2px; }
.hm-card__hd .hcard__ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: #fff; }
.hm-card__hd .hcard__ic svg { width: 14px; height: 14px; }
.hm-card__hd a { margin-left: auto; font-size: 13px; font-weight: 650; color: var(--blue); text-decoration: none; }
.hm-trip { border: 1px solid var(--line); border-left: 3px solid var(--green); border-radius: var(--r-md); padding: 10px 12px; cursor: pointer; transition: background 0.13s var(--ease); }
.hm-trip:hover { background: var(--surface-2); }
.hm-trip__route { font-size: 14px; font-weight: 650; display: flex; align-items: center; gap: 7px; }
.hm-trip__route .chip { margin-left: auto; }
.hm-trip__meta { font-size: 13px; color: var(--ink-4); margin: 3px 0 7px; }
.hm-next { font-size: 13px; color: var(--ink-3); background: var(--surface-2); border-radius: var(--r-md); padding: 9px 12px; display: flex; align-items: center; gap: 8px; margin-top: auto; cursor: pointer; }
.hm-next:hover { background: var(--surface-3); }
.hm-next svg { width: 14px; height: 14px; color: var(--ink-4); flex-shrink: 0; }
.hm-ev { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-md); cursor: pointer; transition: background 0.13s var(--ease); }
.hm-ev:hover { background: var(--surface-2); }
.hm-ev__when { flex: 0 0 52px; text-align: center; font-size: 12px; font-weight: 700; border-radius: 8px; padding: 5px 0; font-variant-numeric: tabular-nums; }
.hm-ev__when--today { background: var(--blue-soft); color: var(--blue-ink); }
.hm-ev__when--warn { background: var(--red-soft); color: var(--red-ink); }
.hm-ev__when--soon { background: var(--amber-soft); color: var(--amber-ink); }
.hm-ev__t { min-width: 0; }
.hm-ev__s { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-ev__d { font-size: 12.5px; color: var(--ink-4); margin-top: 1px; }
.hm-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.hm-q { display: flex; align-items: center; gap: 11px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 14px; text-decoration: none; color: var(--ink); box-shadow: var(--sh-xs); transition: transform 0.13s var(--ease), box-shadow 0.13s var(--ease); min-width: 0; }
.hm-q:hover { transform: translateY(-2px); box-shadow: var(--sh-sm); }
.hm-q__ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.hm-q__ic svg { width: 16px; height: 16px; }
.hm-q__t { min-width: 0; }
.hm-q__n { font-size: 14px; font-weight: 700; }
.hm-q__s { font-size: 12.5px; color: var(--ink-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-q > svg { margin-left: auto; width: 14px; height: 14px; color: var(--ink-5); flex-shrink: 0; }
@media (max-width: 1180px) { .hm-kpis { grid-template-columns: repeat(3, 1fr); } .hm-grid2 { grid-template-columns: 1fr 1fr; } .hm-quick { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .hm-grid2 { grid-template-columns: 1fr; } }

/* marketing — elementi dashboard popolata */
.mk-acc__spark { margin-left: auto; align-self: flex-start; }
.mk-up { color: var(--green-ink) !important; }
.mk-row { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.mk-row:last-child { border-bottom: 0; }
.mk-row__t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.mk-row__n { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.mk-kwhd, .mk-kwrow { display: grid; grid-template-columns: 1fr 44px 90px 60px; gap: 10px; align-items: center; padding: 8px 0; }
.mk-kwhd { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-4); border-bottom: 1px solid var(--line-2); }
.mk-kwrow { border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); }
.mk-kwrow:last-child { border-bottom: 0; }
.mk-kwhd span:nth-child(n+2), .mk-kwrow > :nth-child(n+2) { text-align: right; }
.mk-revhero { display: flex; align-items: center; gap: 14px; padding: 4px 0 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.mk-revscore { font-size: 34px; font-weight: 750; color: var(--ink); letter-spacing: -1px; }
.mk-stars { color: var(--amber-ink); letter-spacing: 1px; font-size: 14px; }
.mk-star--off { color: var(--ink-5); }

/* ============================================================
   MOBILE WATT — brand override + componenti generici
   ============================================================ */
:root {
  --mw: #03FF9D;            /* verde neon brand (logo, marchi) */
  /* accento primario in GRAFITE: verde brand acceso, testo-verde chiaro, soft traslucido */
  --blue: #2FBF6B;
  --blue-ink: #7ED9A0;
  --blue-soft: rgba(52,199,89,0.16);
}
.sidebar__logo-mark { background: #12281E; color: var(--mw); }

/* KPI compatti */
.mw-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.mw-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; box-shadow: var(--sh-xs); display: block; color: inherit; }
.mw-kpi b { display: block; font-size: 22px; font-weight: 750; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.mw-kpi span { font-size: 12.5px; color: var(--ink-4); font-weight: 550; }
.mw-kpi--accent b { color: var(--blue-ink); }
a.mw-kpi:hover { border-color: var(--line-2); box-shadow: var(--sh-sm); }

/* Tabella generica a griglia: la pagina imposta --cols */
.mw-table { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-xs); }
.mw-thead, .mw-row { display: grid; grid-template-columns: var(--cols); gap: 12px; align-items: center; padding: 10px 16px; }
.mw-thead > span, .mw-row > span { min-width: 0; overflow-wrap: anywhere; }
.mw-thead > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mw-thead { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-4); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.mw-row { border-bottom: 1px solid var(--line); font-size: 14px; transition: background 0.12s var(--ease); }
.mw-row[data-id] { cursor: pointer; }
.mw-row:hover { background: var(--surface-2); }
.mw-row:last-child { border-bottom: none; }
.mw-num { text-align: right; font-variant-numeric: tabular-nums; }
.mw-main { font-weight: 600; }
.mw-sub { font-size: 13px; color: var(--ink-4); font-weight: 400; }
.mw-dot { width: 8px; height: 8px; border-radius: 99px; display: inline-block; margin-right: 7px; flex-shrink: 0; }

/* layout a 2 colonne */
.mw-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 900px) { .mw-grid2 { grid-template-columns: 1fr; } }
.mw-sec { margin: 20px 0 10px; font-size: 14px; font-weight: 700; }

/* riga materiale commerciale (drawer lead + pagina Materiali) */
.mat-row { display: block; padding: 9px 12px; border: 1px solid var(--line); border-left: 3px solid var(--green); border-radius: var(--r-md); margin-bottom: 8px; background: var(--surface); cursor: pointer; transition: background 0.12s var(--ease); }
.mat-row:hover { background: var(--surface-2); }
.mat-row--neutral { border-left-color: var(--ink-5); }
.mat-row--amber { border-left-color: var(--amber); }
.mat-row__t { font-size: 13.5px; font-weight: 600; }
.mat-row__s { font-size: 13px; color: var(--ink-4); margin-top: 2px; line-height: 1.4; }
