:root {
  --asser-primary: #7d445e;
  --asser-secondary: #4b2338;
  --asser-deep: #2c1f29;
  --asser-accent: #b45f86;
  --asser-blush: #c98faa;
  --asser-forest: #284d47;
  --asser-muted: #726b67;
  --asser-border: #ded2d7;
  --asser-alt-bg: #f4e9ed;
  --asser-sand: #f6f1ec;
  --asser-ice: #edf4f2;
  --asser-text: #252129;
  --background: #fbf8f5;
  --shadow-soft: 0 20px 55px rgba(75, 35, 56, 0.09);
  --shadow-deep: 0 30px 90px rgba(44, 31, 41, 0.18);
}

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

.asser-ai-plugin-body {
  margin: 0;
  background:
    radial-gradient(circle at 8% 4%, rgba(201, 143, 170, 0.13), transparent 26rem),
    radial-gradient(circle at 92% 22%, rgba(40, 77, 71, 0.08), transparent 24rem),
    var(--background);
}

.asser-ai-app,
.asser-ai-site-shell,
.asser-ai-portal,
.asser-ai-staff {
  box-sizing: border-box;
  color: var(--asser-text);
  font-family: "Manrope", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}

.asser-ai-app *,
.asser-ai-site-shell *,
.asser-ai-portal *,
.asser-ai-staff *,
.asser-ai-app *::before,
.asser-ai-app *::after {
  box-sizing: border-box;
}

.asser-ai-app {
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 4%, rgba(201, 143, 170, 0.13), transparent 26rem),
    radial-gradient(circle at 92% 22%, rgba(40, 77, 71, 0.08), transparent 24rem),
    var(--background);
}

/* Sfumatura dinamica di sfondo per tutto il portale: strato fisso dietro
   ai bloom radiali sopra, che scorrono con la pagina, cosi' il colore
   di fondo si muove lentamente mentre il resto resta leggibile e fermo. */
.asser-ai-app::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    120deg,
    rgba(201, 143, 170, 0.16) 0%,
    rgba(125, 68, 94, 0.12) 25%,
    rgba(40, 77, 71, 0.14) 50%,
    rgba(246, 241, 236, 0.12) 75%,
    rgba(201, 143, 170, 0.16) 100%
  );
  background-size: 340% 340%;
  animation: asser-ai-gradient-drift 26s ease-in-out infinite;
}

@keyframes asser-ai-gradient-drift {
  0% {
    background-position: 0% 30%;
  }
  50% {
    background-position: 100% 70%;
  }
  100% {
    background-position: 0% 30%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .asser-ai-app::before {
    animation: none;
  }
}

.asser-ai-app a {
  color: inherit;
}

.asser-ai-app-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1.7rem;
  min-height: 78px;
  padding: 10px max(1rem, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid rgba(75, 35, 56, 0.09);
  background: rgba(251, 248, 245, 0.88);
  backdrop-filter: blur(18px) saturate(135%);
}

.asser-ai-app-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  color: #2f2933;
  text-decoration: none;
}

.asser-ai-logo-gem {
  position: relative;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 9px 10px 8px 12px;
  background: linear-gradient(145deg, rgba(255, 174, 219, 0.95), rgba(151, 63, 101, 0.96)), #9b5a76;
  clip-path: polygon(47% 0, 94% 18%, 100% 65%, 55% 100%, 8% 82%, 0 27%);
  box-shadow: inset 9px -8px 14px rgba(73, 26, 48, 0.22), inset -8px 7px 14px rgba(255, 205, 228, 0.48), 0 12px 28px rgba(91, 38, 63, 0.16);
  animation: asserGemTilt 5.5s ease-in-out infinite;
}

.asser-ai-app-logo strong,
.asser-ai-app-logo em {
  display: block;
  line-height: 1;
}

.asser-ai-app-logo strong {
  color: #7b3f5d;
  font-size: 22px;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.asser-ai-app-logo em {
  margin-top: 4px;
  color: #8a8588;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.22em;
}

.asser-ai-app-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(0.85rem, 1.8vw, 1.55rem);
  min-width: 0;
  font-size: 0.78rem;
  font-weight: 750;
}

.asser-ai-app-nav a {
  color: #5f565a;
  text-decoration: none;
}

.asser-ai-app-nav a:hover {
  color: var(--asser-primary);
}

.asser-ai-app-nav__cta,
.portal-button,
.asser-ai-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.45rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--asser-primary), var(--asser-secondary));
  color: #fff !important;
  font-size: 0.875rem;
  font-weight: 850;
  line-height: 1.1;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(75, 35, 56, 0.22);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.portal-button:hover,
.asser-ai-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(75, 35, 56, 0.27);
}

.portal-button--secondary,
.asser-ai-button:not(.asser-ai-button--primary) {
  border-color: rgba(75, 35, 56, 0.2);
  background: rgba(255, 255, 255, 0.86);
  color: var(--asser-secondary) !important;
  box-shadow: none;
}

.portal-button:disabled,
.asser-ai-button:disabled {
  opacity: 0.65;
  pointer-events: none;
}

/* Il bottone "Scegli file" di ogni <input type="file"> del plugin, non
   solo nei form appena aggiunti: restava il bottone grigio nativo del
   browser (title bar del sistema operativo), stonando con lo stile a
   pillola usato ovunque. ::file-selector-button e' supportato da tutti i
   browser correnti; dove non lo fosse, l'input resta comunque un normale
   selettore di file funzionante, solo senza questa rifinitura. */
.asser-ai-app input[type="file"],
.asser-ai-staff input[type="file"] {
  color: var(--asser-muted);
  font-family: inherit;
  font-size: 0.78rem;
}

.asser-ai-app input[type="file"]::file-selector-button,
.asser-ai-staff input[type="file"]::file-selector-button {
  margin-right: 0.7rem;
  padding: 0.55rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--asser-primary), var(--asser-secondary));
  color: #fff;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.asser-ai-app input[type="file"]::file-selector-button:hover,
.asser-ai-staff input[type="file"]::file-selector-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(75, 35, 56, 0.22);
}

.text-link {
  display: inline-flex;
  margin-top: 1.25rem;
  color: var(--asser-primary) !important;
  font-weight: 850;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.portal-card {
  padding: 1.35rem;
  border: 1px solid rgba(75, 35, 56, 0.11);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 35px rgba(75, 35, 56, 0.055);
}

.portal-card--priority {
  border-color: rgba(40, 77, 71, 0.22);
  background: linear-gradient(135deg, rgba(237, 244, 242, 0.96), rgba(255, 255, 255, 0.92));
}

.portal-kicker,
.portal-kicker-row {
  max-width: 100%;
  margin: 0 0 0.8rem;
  color: var(--asser-primary);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  line-height: 1.3;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.portal-kicker-row {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.6rem;
}

.portal-live-dot {
  width: 0.55rem;
  height: 0.55rem;
  flex: 0 0 auto;
  margin-top: 0.2rem;
  border-radius: 50%;
  background: var(--asser-forest);
  box-shadow: 0 0 0 6px rgba(40, 77, 71, 0.1);
  animation: pulse-dot 2.4s ease-in-out infinite;
}

.portal-title,
.portal-hero__copy h1,
.portal-section__heading h2,
.recommended-layout h2,
.portal-cta h2,
.faq-hero__copy h1,
.guide-document__intro h2,
.asser-ai-upload-hero h1 {
  margin: 0;
  color: var(--asser-secondary);
  font-family: "Sora", ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.asser-ai-app h1,
.asser-ai-app h2,
.asser-ai-app h3,
.asser-ai-app h4,
.asser-ai-app h5,
.asser-ai-app h6 {
  font-family: "Sora", ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0;
}

.portal-title {
  font-size: clamp(2rem, 4vw, 3.35rem);
}

.portal-lead {
  max-width: 44rem;
  margin: 1rem 0 0;
  color: var(--asser-muted);
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  line-height: 1.72;
}

.portal-home {
  overflow-x: clip;
}

.portal-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(420px, 0.98fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5.5rem);
  width: min(1180px, calc(100% - 2rem));
  min-height: 700px;
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.portal-hero > *,
.recommended-layout > *,
.portal-cta > *,
.faq-hero > * {
  min-width: 0;
}

.portal-hero__copy h1 {
  max-width: 720px;
  font-size: clamp(3.3rem, 6.4vw, 6.4rem);
  line-height: 0.98;
}

.portal-hero__copy h1 em {
  color: var(--asser-primary);
  font-style: normal;
}

.portal-hero__copy > p {
  max-width: 650px;
  margin: 1.6rem 0 0;
  color: var(--asser-muted);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  line-height: 1.72;
}

.portal-hero__actions,
.portal-hero__reassurance {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.portal-hero__actions {
  margin-top: 2rem;
}

.portal-hero__reassurance {
  margin-top: 1.5rem;
}

.portal-hero__reassurance span {
  position: relative;
  padding-left: 1rem;
  color: #665c60;
  font-size: 0.76rem;
  font-weight: 750;
}

.portal-hero__reassurance span::before {
  content: "";
  position: absolute;
  top: 0.42rem;
  left: 0;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: var(--asser-forest);
}

.analysis-visual {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 510px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 38px;
  background:
    radial-gradient(circle at 90% 8%, rgba(201, 143, 170, 0.32), transparent 24rem),
    linear-gradient(145deg, #271c25, #4b2338 55%, #284d47);
  box-shadow: var(--shadow-deep);
  color: #fff;
}

.analysis-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, #000, transparent 70%);
}

.analysis-visual__header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.analysis-visual__header i,
.analysis-result__status i {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #9ed3bd;
  box-shadow: 0 0 0 5px rgba(158, 211, 189, 0.1);
}

.analysis-document {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(150px, 0.75fr);
  gap: 1rem;
  padding: clamp(1.5rem, 4vw, 2.8rem);
}

.analysis-document__page {
  min-width: 0;
  min-height: 365px;
  padding: 2rem 1.65rem;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.2);
  transform: rotate(-2deg);
}

.document-line {
  display: block;
  width: 100%;
  height: 0.5rem;
  margin-bottom: 0.75rem;
  border-radius: 999px;
  background: #e9e2e4;
}

.document-line--short { width: 45%; }
.document-line--medium { width: 72%; }

.document-highlight {
  margin: 2rem -0.35rem;
  padding: 1rem;
  border: 2px solid rgba(125, 68, 94, 0.25);
  border-radius: 12px;
  background: var(--asser-alt-bg);
  color: var(--asser-secondary);
}

.document-highlight small,
.document-highlight strong,
.analysis-result span,
.analysis-result strong {
  display: block;
}

.document-highlight small {
  margin-bottom: 0.35rem;
  color: var(--asser-muted);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.document-highlight strong {
  font-size: 1.35rem;
}

.analysis-result {
  align-self: center;
  padding: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.analysis-result > p {
  margin: 0 0 1rem;
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.analysis-result > div:not(.analysis-result__status) {
  display: grid;
  gap: 0.25rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.analysis-result span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.68rem;
}

.analysis-result strong {
  color: #fff;
  font-size: 0.82rem;
}

.analysis-result__status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  color: #c7eadb;
  font-size: 0.67rem;
  font-weight: 850;
}

.analysis-result__status i {
  width: 0.4rem;
  height: 0.4rem;
}

.analysis-visual__scan {
  position: absolute;
  z-index: 3;
  top: 4.1rem;
  bottom: 1.5rem;
  left: 50%;
  width: 2px;
  background: linear-gradient(transparent, rgba(255, 255, 255, 0.8), transparent);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.72);
  animation: scan-line 4.8s ease-in-out infinite;
}

.portal-trust-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.3rem;
  padding: 1.1rem 1rem;
  border-block: 1px solid rgba(75, 35, 56, 0.08);
  background: rgba(255, 255, 255, 0.54);
  color: #6a6064;
  font-size: 0.75rem;
  font-weight: 750;
  text-align: center;
}

.portal-trust-strip p {
  margin: 0;
}

.portal-trust-strip span {
  width: 0.32rem;
  height: 0.32rem;
  border-radius: 50%;
  background: var(--asser-primary);
}

.portal-section {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(5rem, 10vw, 8rem) 0;
}

.portal-section--tinted {
  width: 100%;
  padding-inline: max(1rem, calc((100% - 1180px) / 2));
  background:
    linear-gradient(rgba(75, 35, 56, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(75, 35, 56, 0.04) 1px, transparent 1px),
    rgba(255, 255, 255, 0.55);
  background-size: 42px 42px, 42px 42px, auto;
}

.portal-section__heading {
  max-width: 760px;
}

.portal-section__heading--center {
  margin-inline: auto;
  text-align: center;
}

.portal-section__heading h2,
.recommended-layout h2,
.portal-cta h2 {
  font-size: clamp(2.3rem, 4.6vw, 4.4rem);
}

.portal-section__heading > p:last-child,
.recommended-layout > div > p,
.portal-cta > div > p:last-child {
  margin: 1.2rem 0 0;
  color: var(--asser-muted);
  font-size: 1.02rem;
  line-height: 1.72;
}

.analysis-area-grid,
.portal-info-grid {
  display: grid;
  gap: 1rem;
  margin-top: 3rem;
}

.analysis-area-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.analysis-area-grid article,
.portal-info-card {
  min-height: 220px;
  padding: 1.45rem;
  border: 1px solid rgba(75, 35, 56, 0.1);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.7);
}

.analysis-area-grid article > span,
.portal-process article > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.7rem;
  height: 2.7rem;
  margin-bottom: 2.4rem;
  border-radius: 50%;
  background: var(--asser-alt-bg);
  color: var(--asser-primary);
  font-size: 0.72rem;
  font-weight: 850;
}

.analysis-area-grid h3,
.portal-process h3,
.portal-info-card h2,
.portal-info-feature h2,
.portal-subtitle {
  margin: 0 0 0.8rem;
  color: var(--asser-secondary);
  font-size: 1.15rem;
  line-height: 1.2;
}

.analysis-area-grid p,
.portal-process p,
.portal-info-card p,
.portal-info-feature p {
  margin: 0;
  color: var(--asser-muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.recommended-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(380px, 1.1fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  width: min(1180px, 100%);
  margin: 0 auto;
}

.document-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: center;
}

.document-comparison > div {
  min-height: 230px;
  padding: 1.5rem;
  border: 1px solid rgba(75, 35, 56, 0.1);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.85);
}

.document-comparison small,
.document-comparison strong,
.document-comparison span {
  display: block;
}

.document-comparison small {
  margin-bottom: 4rem;
  color: var(--asser-muted);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.document-comparison strong {
  margin-bottom: 0.7rem;
  color: var(--asser-secondary);
  line-height: 1.25;
}

.document-comparison span {
  color: var(--asser-muted);
  font-size: 0.8rem;
}

.document-comparison__recommended {
  min-height: 285px !important;
  background: linear-gradient(150deg, var(--asser-secondary), var(--asser-forest)) !important;
  box-shadow: var(--shadow-deep);
  color: #fff;
}

.document-comparison__recommended small,
.document-comparison__recommended span {
  color: rgba(255, 255, 255, 0.68);
}

.document-comparison__recommended strong {
  color: #fff;
}

.portal-process {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
  margin-top: 3rem;
}

.portal-process::before {
  content: "";
  position: absolute;
  top: 1.65rem;
  left: 16%;
  right: 16%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--asser-border), transparent);
}

.portal-process article {
  position: relative;
  padding: 1.2rem 1.5rem;
  text-align: center;
}

.portal-process article > span {
  position: relative;
  z-index: 1;
  margin-bottom: 1.5rem;
  border: 1px solid var(--asser-border);
  background: var(--background);
}

.portal-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2rem;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto clamp(5rem, 9vw, 8rem);
  padding: clamp(2rem, 5vw, 4rem);
  border-radius: 34px;
  background: linear-gradient(135deg, var(--asser-secondary), var(--asser-forest));
  color: #fff;
  box-shadow: var(--shadow-deep);
}

.portal-cta h2,
.portal-cta .portal-kicker {
  color: #fff;
}

.portal-cta > div > p:last-child {
  color: rgba(255, 255, 255, 0.72);
}

.portal-info-page,
.guide-page,
.faq-content {
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 6.5rem) 0;
}

.portal-info-page--narrow {
  width: min(720px, calc(100% - 2rem));
}

.portal-info-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.portal-info-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.portal-info-grid--documents {
  gap: 0.75rem 1rem;
  margin-top: 1rem;
}

.portal-info-grid--documents .portal-info-card {
  display: flex;
  min-height: 64px;
  justify-content: center;
  flex-direction: column;
  padding: 0.9rem 1.25rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
}

.portal-info-grid--documents .portal-info-card p {
  color: var(--asser-text);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.35;
}

.portal-info-grid--documents .portal-card--priority {
  background: linear-gradient(135deg, rgba(237, 244, 242, 0.96), rgba(255, 255, 255, 0.94));
}

.portal-info-grid--documents .portal-badge {
  width: fit-content;
  margin-bottom: 0.45rem;
  padding: 0.25rem 0.58rem;
  font-size: 0.6rem;
}

.portal-info-feature {
  margin-top: 1.25rem;
}

.portal-badge {
  display: inline-flex;
  margin-bottom: 0.7rem;
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  background: var(--asser-forest);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.portal-clean-list,
.portal-pill-list,
.guide-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--asser-muted);
  line-height: 1.75;
}

.portal-pill-list {
  display: grid;
  gap: 0.65rem;
  padding: 0;
  list-style: none;
}

.portal-pill-list li {
  padding: 0.9rem 1rem;
  border: 1px solid var(--asser-border);
  border-radius: 16px;
  background: #fff;
  color: var(--asser-text);
  font-size: 0.9rem;
}

.faq-page {
  overflow-x: clip;
}

.faq-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  width: min(1180px, calc(100% - 2rem));
  min-height: 520px;
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 7rem) 0 3rem;
}

.faq-hero__copy h1 {
  font-size: clamp(2.8rem, 5.6vw, 5.6rem);
  line-height: 1;
}

.faq-hero__copy p:last-child {
  max-width: 700px;
  margin: 1.4rem 0 0;
  color: var(--asser-muted);
  font-size: 1.05rem;
  line-height: 1.72;
}

.faq-hero__panel {
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
  border: 1px solid rgba(75, 35, 56, 0.1);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
}

.faq-hero__metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.faq-hero__metric strong {
  color: var(--asser-secondary);
  font-size: 2.6rem;
}

.faq-hero__metric span,
.faq-hero__panel p {
  color: var(--asser-muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.faq-topic-nav {
  position: sticky;
  top: 78px;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  width: min(1120px, calc(100% - 2rem));
  margin: -1rem auto 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--asser-border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.faq-topic-nav span {
  padding-right: 0.35rem;
  color: var(--asser-secondary);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Ogni argomento e' un vero chip (bordo + sfondo propri), non solo un
   link nudo dentro il contenitore: coerente con il linguaggio a "pillola"
   gia' usato dai bottoni del sito (stessa forma, stesso hover a gradiente
   di .portal-button), invece di un elenco di testo poco riconoscibile. */
.faq-topic-nav a {
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--asser-border);
  border-radius: 999px;
  background: var(--asser-sand);
  color: var(--asser-secondary);
  font-size: 0.76rem;
  font-weight: 800;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.faq-topic-nav a:hover,
.faq-topic-nav a:focus-visible {
  border-color: transparent;
  background: linear-gradient(135deg, var(--asser-primary), var(--asser-secondary));
  color: #fff;
  box-shadow: 0 10px 24px rgba(75, 35, 56, 0.22);
  transform: translateY(-1px);
}

.faq-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem 1rem;
  width: min(980px, calc(100% - 2rem));
  margin: 2.4rem auto 1.2rem;
  padding: 1.1rem;
  border: 1px solid rgba(75, 35, 56, 0.12);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(75, 35, 56, 0.07);
}

.faq-search label {
  grid-column: 1 / -1;
  color: var(--asser-secondary);
  font-size: 0.78rem;
  font-weight: 850;
}

.faq-search__field {
  position: relative;
}

.faq-search input {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 3rem 0.75rem 0.95rem;
  border: 1px solid rgba(75, 35, 56, 0.18);
  border-radius: 8px;
  background: var(--asser-page-bg);
  color: var(--asser-text);
  font: inherit;
}

.faq-search input:focus {
  border-color: var(--asser-primary);
  outline: 3px solid rgba(125, 68, 94, 0.14);
  outline-offset: 1px;
}

.faq-search [data-faq-clear] {
  position: absolute;
  top: 50%;
  right: 0.55rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--asser-alt-bg);
  color: var(--asser-primary);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.faq-search > p {
  align-self: center;
  margin: 0;
  color: var(--asser-muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.faq-search > .faq-search__empty {
  grid-column: 1 / -1;
  color: #8f2f3a;
  white-space: normal;
}

.faq-category[hidden],
.faq-disclosure[hidden],
.faq-topic-nav a[hidden],
.faq-search [hidden] {
  display: none !important;
}

.faq-content {
  width: min(980px, calc(100% - 2rem));
}

.faq-notice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  margin-bottom: 3rem;
  padding: 1.15rem;
  border: 1px solid rgba(40, 77, 71, 0.16);
  border-radius: 22px;
  background: rgba(237, 244, 242, 0.82);
}

.faq-notice > span {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 50%;
  background: var(--asser-forest);
  color: #fff;
  font-weight: 900;
}

.faq-notice strong,
.faq-category__header h2 {
  color: var(--asser-secondary);
}

.faq-notice p,
.faq-category__header p {
  margin: 0.35rem 0 0;
  color: var(--asser-muted);
  line-height: 1.65;
}

.faq-category + .faq-category {
  margin-top: 4rem;
}

.faq-category__header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.faq-category__header > span {
  display: grid;
  width: 3.2rem;
  height: 3.2rem;
  place-items: center;
  border-radius: 50%;
  background: var(--asser-alt-bg);
  color: var(--asser-primary);
  font-weight: 850;
}

.faq-category__header h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.faq-category__header small {
  display: block;
  margin-top: 0.55rem;
  color: var(--asser-forest);
  font-size: 0.72rem;
  font-weight: 800;
}

.faq-accordion {
  display: grid;
  gap: 0.8rem;
}

.faq-disclosure {
  border: 1px solid rgba(75, 35, 56, 0.1);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.84);
  overflow: hidden;
}

.faq-disclosure summary {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr) 2rem;
  align-items: center;
  gap: 0.9rem;
  min-height: 82px;
  padding: 1rem 1.1rem;
  color: var(--asser-secondary);
  font-size: 0.95rem;
  font-weight: 850;
  list-style: none;
  cursor: pointer;
}

.faq-disclosure summary::-webkit-details-marker {
  display: none;
}

.faq-disclosure summary::after {
  content: "+";
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 50%;
  background: var(--asser-alt-bg);
  color: var(--asser-primary);
}

.faq-disclosure[open] summary::after {
  content: "-";
}

.faq-disclosure__number {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  border-radius: 50%;
  background: var(--asser-ice);
  color: var(--asser-forest);
  font-size: 0.72rem;
}

.faq-disclosure > p {
  margin: 0;
  padding: 0 1.3rem 1.35rem 4.6rem;
  color: var(--asser-muted);
  font-size: 0.9rem;
  line-height: 1.72;
}

.guide-page {
  width: min(1080px, calc(100% - 2rem));
}

.guide-index {
  position: sticky;
  top: 90px;
  z-index: 5;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  margin: 2.5rem 0 3rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(75, 35, 56, 0.1);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.guide-index span {
  color: var(--asser-primary);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.guide-index div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.guide-index a {
  color: var(--asser-secondary);
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
}

.guide-documents {
  display: grid;
  gap: 1.4rem;
}

.guide-document {
  padding: clamp(1.2rem, 4vw, 2rem);
  border: 1px solid rgba(75, 35, 56, 0.1);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
}

.guide-document__intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
}

.guide-document__intro h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
}

.guide-document__intro p {
  color: var(--asser-muted);
  line-height: 1.72;
}

.guide-document__meta {
  display: grid;
  justify-items: end;
  align-content: start;
  gap: 0.5rem;
}

.guide-document__meta span {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border-radius: 50%;
  background: var(--asser-alt-bg);
  color: var(--asser-primary);
  font-weight: 850;
}

.guide-document__meta small {
  color: var(--asser-muted);
  font-size: 0.7rem;
}

.guide-download {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--asser-primary);
  border-radius: 999px;
  background: var(--asser-primary);
  box-shadow: 0 12px 28px rgba(75, 35, 56, 0.18);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.guide-download b {
  font-size: 1rem;
  line-height: 1;
}

.guide-download:hover,
.guide-download:focus-visible {
  background: var(--asser-secondary);
  box-shadow: 0 16px 34px rgba(75, 35, 56, 0.25);
  color: #fff;
  transform: translateY(-2px);
}

.guide-download:focus-visible {
  outline: 3px solid rgba(126, 63, 93, 0.28);
  outline-offset: 3px;
}

.guide-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.25rem;
}

.guide-badges span {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(244, 233, 237, 0.9);
  color: var(--asser-primary);
  font-size: 0.72rem;
  font-weight: 850;
}

.guide-block {
  padding-top: 1rem;
  border-top: 1px solid rgba(75, 35, 56, 0.08);
}

.guide-block h3 {
  margin: 0 0 0.5rem;
  color: var(--asser-secondary);
}

.guide-block p {
  margin: 0;
  color: var(--asser-muted);
  line-height: 1.7;
}

.asser-ai-upload-hero {
  width: min(980px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 6.5rem) 0 1rem;
}

.asser-ai-upload-hero h1 {
  max-width: 760px;
  font-size: clamp(2.5rem, 5vw, 4.8rem);
}

.asser-ai-upload-hero p:last-child {
  max-width: 720px;
  color: var(--asser-muted);
  font-size: 1.05rem;
  line-height: 1.72;
}

.asser-ai-portal {
  width: min(980px, calc(100% - 2rem));
  margin: 1.5rem auto clamp(4rem, 7vw, 6rem);
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid rgba(75, 35, 56, 0.1);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
}

.asser-ai-public-upload {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1rem;
}

.asser-ai-upload-guide,
.asser-ai-upload-form {
  min-width: 0;
  padding: clamp(1rem, 3vw, 1.35rem);
  border: 1px solid rgba(75, 35, 56, 0.09);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
}

.asser-ai-upload-guide h2 {
  margin: 0;
  color: var(--asser-secondary);
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  line-height: 1.08;
}

.asser-ai-upload-guide p {
  color: var(--asser-muted);
  line-height: 1.65;
}

.asser-ai-upload-guide__grid {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.asser-ai-upload-guide__grid div {
  padding: 0.9rem;
  border-radius: 16px;
  background: var(--asser-sand);
}

.asser-ai-upload-guide__grid strong,
.asser-ai-upload-guide__grid span {
  display: block;
}

.asser-ai-upload-guide__grid strong {
  color: var(--asser-secondary);
  font-size: 0.86rem;
}

.asser-ai-upload-guide__grid span {
  margin-top: 0.25rem;
  color: var(--asser-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.asser-ai-upload-form {
  display: grid;
  gap: 1rem;
}

.asser-ai-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.asser-ai-profile-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.asser-ai-profile-row label,
.asser-ai-consent-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem;
  border: 1px solid var(--asser-border);
  border-radius: 16px;
  background: rgba(251, 248, 245, 0.78);
  color: var(--asser-secondary);
  font-size: 0.85rem;
  font-weight: 800;
}

.asser-ai-upload-field,
.asser-ai-context-field {
  display: grid;
  gap: 0.5rem;
  padding: 1rem;
  border: 1px dashed rgba(75, 35, 56, 0.22);
  border-radius: 20px;
  background: rgba(246, 241, 236, 0.72);
}

.asser-ai-upload-field span,
.asser-ai-context-field span {
  color: var(--asser-secondary);
  font-size: 0.9rem;
  font-weight: 900;
}

.asser-ai-upload-field small {
  color: var(--asser-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.asser-ai-upload-field input[type="file"],
.asser-ai-context-field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--asser-border);
  border-radius: 14px;
  background: #fff;
  color: var(--asser-text);
}

.asser-ai-upload-field input[type="file"] {
  padding: 0.75rem;
}

.asser-ai-context-field textarea {
  resize: vertical;
  padding: 0.85rem;
  line-height: 1.55;
}

.asser-ai-file-status {
  color: var(--asser-muted) !important;
  font-size: 0.74rem !important;
  font-weight: 700 !important;
  overflow-wrap: anywhere;
}

.asser-ai-consent-row {
  align-items: flex-start;
  color: var(--asser-muted);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.5;
}

.asser-ai-portal__error,
.asser-ai-portal__success,
.asser-ai-portal__loading {
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.5;
}

.asser-ai-portal__error {
  color: #9b233f;
}

.asser-ai-portal__success {
  border: 1px solid rgba(40, 77, 71, 0.18);
  background: rgba(237, 244, 242, 0.88);
  color: var(--asser-forest);
}

.asser-ai-staff {
  width: min(1040px, calc(100% - 2rem));
  margin: 42px auto;
  padding: 34px;
  border: 1px solid rgba(75, 35, 56, 0.1);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.asser-ai-staff__table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(75, 35, 56, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
}

.asser-ai-app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 36px max(1rem, calc((100vw - 1180px) / 2));
  background: var(--asser-deep);
  color: rgba(255, 255, 255, 0.72);
}

.asser-ai-app-footer strong {
  color: #fff;
}

.asser-ai-app-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.asser-ai-app-footer a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
}

@keyframes pulse-dot {
  50% { box-shadow: 0 0 0 10px rgba(40, 77, 71, 0.02); }
}

@keyframes scan-line {
  0%, 100% { transform: translateX(-11rem); opacity: 0; }
  15%, 85% { opacity: 1; }
  50% { transform: translateX(10rem); }
}

@keyframes asserGemTilt {
  0%, 100% { transform: perspective(260px) rotateX(14deg) rotateY(-18deg); }
  50% { transform: perspective(260px) rotateX(14deg) rotateY(18deg); }
}

@media (max-width: 1080px) {
  .asser-ai-app-header {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .asser-ai-app-nav {
    justify-content: flex-start;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.25rem;
  }

  .portal-hero,
  .faq-hero,
  .recommended-layout,
  .asser-ai-public-upload {
    grid-template-columns: 1fr;
  }

  .analysis-visual {
    width: min(760px, 100%);
  }

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

@media (max-width: 760px) {
  .asser-ai-app-header {
    position: relative;
    gap: 1rem;
    min-height: auto;
  }

  .asser-ai-app-nav {
    gap: 0.75rem;
    font-size: 0.72rem;
  }

  .asser-ai-app-nav a {
    white-space: nowrap;
  }

  .portal-hero {
    width: min(1180px, calc(100% - 1.25rem));
    min-height: auto;
    padding: 3.4rem 0;
  }

  .portal-hero__copy h1,
  .faq-hero__copy h1,
  .asser-ai-upload-hero h1 {
    font-size: clamp(2.2rem, 10vw, 3.35rem);
    line-height: 1.03;
  }

  .portal-hero__actions,
  .portal-hero__reassurance {
    display: grid;
  }

  .portal-hero__actions .portal-button,
  .portal-cta .portal-button,
  .asser-ai-button {
    width: 100%;
  }

  .analysis-document,
  .analysis-area-grid,
  .document-comparison,
  .portal-process,
  .portal-cta,
  .portal-info-grid--two,
  .portal-info-grid--three,
  .asser-ai-profile-row,
  .guide-document__intro,
  .faq-category__header,
  .faq-notice {
    grid-template-columns: 1fr;
  }

  .analysis-visual {
    min-height: 390px;
    border-radius: 28px;
  }

  .analysis-document {
    padding: 1.3rem;
  }

  .analysis-document__page {
    min-height: 260px;
    transform: none;
  }

  .analysis-result {
    display: none;
  }

  .portal-trust-strip {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
  }

  .portal-trust-strip span,
  .portal-process::before {
    display: none;
  }

  .portal-section,
  .portal-info-page,
  .guide-page,
  .faq-content,
  .asser-ai-upload-hero,
  .asser-ai-portal {
    width: min(100% - 1.25rem, 1180px);
  }

  .portal-section {
    padding: 4rem 0;
  }

  .portal-section__heading h2,
  .recommended-layout h2,
  .portal-cta h2 {
    font-size: clamp(1.9rem, 10vw, 2.8rem);
    line-height: 1.08;
  }

  .portal-cta {
    padding: 1.35rem;
    border-radius: 24px;
  }

  .faq-topic-nav {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(100% - 1.25rem, 1120px);
    margin-top: -1rem;
    border-radius: 20px;
  }

  .faq-topic-nav span {
    grid-column: 1 / -1;
    padding-right: 0;
  }

  .faq-topic-nav a {
    display: flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: normal;
  }

  .faq-search {
    grid-template-columns: 1fr;
    width: min(100% - 1.25rem, 980px);
    margin-top: 1.25rem;
    padding: 0.9rem;
  }

  .faq-search > p {
    white-space: normal;
  }

  .faq-disclosure summary {
    grid-template-columns: 2.15rem minmax(0, 1fr) 1.75rem;
    gap: 0.6rem;
    min-height: 74px;
    padding: 0.9rem;
    font-size: 0.8rem;
  }

  .faq-disclosure__number {
    width: 2.15rem;
    height: 2.15rem;
  }

  .faq-disclosure > p {
    padding: 0 1rem 1.2rem;
    font-size: 0.8rem;
  }

  .guide-index {
    position: static;
    grid-template-columns: 1fr;
  }

  .guide-document__meta {
    justify-items: start;
  }

  .guide-document__meta small {
    overflow-wrap: anywhere;
  }

  .asser-ai-portal {
    padding: 0.85rem;
    border-radius: 24px;
  }

  .asser-ai-app-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Brand polish, patent status and compact mobile navigation */
.portal-nav__drawer {
  display: contents;
}

.portal-nav__toggle {
  display: none;
}

.patent-badge {
  position: relative;
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 0.55rem;
  overflow: hidden;
  border: 1px solid rgba(125, 68, 94, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--asser-secondary);
  isolation: isolate;
}

.patent-badge::after {
  position: absolute;
  z-index: -1;
  top: -45%;
  left: -35%;
  width: 30%;
  height: 190%;
  background: rgba(255, 255, 255, 0.72);
  content: "";
  transform: rotate(18deg);
  animation: patent-shine 4.8s ease-in-out infinite;
}

.patent-badge__mark {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  background: var(--asser-primary);
  box-shadow: 0 0 0 4px rgba(125, 68, 94, 0.08);
  color: #fff;
  font: 850 0.58rem/1 "Sora", sans-serif;
  letter-spacing: 0.04em;
  animation: patent-pulse 3.2s ease-in-out infinite;
}

.patent-badge__copy {
  display: grid;
  min-width: 0;
  line-height: 1.05;
}

.patent-badge__copy small,
.patent-badge__copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.patent-badge__copy small {
  color: #8a777f;
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.patent-badge__copy strong {
  margin-top: 0.18rem;
  font: 800 0.62rem/1.1 "Sora", sans-serif;
  letter-spacing: 0;
}

.patent-badge--nav {
  padding: 0.28rem 0.65rem 0.28rem 0.3rem;
  box-shadow: 0 8px 24px rgba(75, 35, 56, 0.08);
}

.portal-footer__brandmark {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #fff;
  text-decoration: none;
}

.asser-logo-3d--footer .asser-logo-3d__stage {
  width: 46px;
  height: 46px;
}

.asser-logo-3d--footer .asser-logo-3d__wordmark {
  width: 138px;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.portal-footer__ai {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font: 850 0.64rem/1 "Sora", sans-serif;
}

.patent-badge--footer {
  width: fit-content;
  margin-top: 1rem;
  padding: 0.36rem 0.8rem 0.36rem 0.36rem;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.portal-footer__brand .patent-badge--footer strong {
  color: #fff;
  font-size: 0.66rem;
  letter-spacing: 0;
}

.portal-footer__brand .patent-badge--footer small {
  color: rgba(255, 255, 255, 0.58);
}

.portal-info-grid--documents .portal-info-card {
  position: relative;
  overflow: hidden;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.portal-info-grid--documents .portal-info-card::after {
  position: absolute;
  top: 50%;
  right: 1rem;
  color: rgba(125, 68, 94, 0.55);
  content: "→";
  font-size: 1rem;
  opacity: 0;
  transform: translate(-6px, -50%);
  transition: opacity 180ms ease, transform 180ms ease;
}

.portal-info-grid--documents .portal-info-card:hover {
  border-color: rgba(125, 68, 94, 0.24);
  box-shadow: 0 14px 32px rgba(75, 35, 56, 0.08);
  transform: translateY(-2px);
}

.portal-info-grid--documents .portal-info-card:hover::after {
  opacity: 1;
  transform: translate(0, -50%);
}

.portal-chat__avatar,
.portal-chat__launcher-logo {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.portal-chat__avatar {
  width: 40px;
  height: 40px;
}

.portal-chat__launcher .portal-chat__launcher-logo {
  width: 42px;
  height: 42px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.portal-chat__gem,
.portal-chat__gem canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.portal-chat__launcher .portal-chat__launcher-copy {
  display: flex;
  width: auto;
  height: auto;
  align-items: center;
  gap: 0.48rem;
  border-radius: 0;
  background: transparent;
  color: #fff;
}

.portal-chat__launcher-copy b {
  color: #f2dce5;
  font: 850 0.66rem/1 "Sora", sans-serif;
  letter-spacing: 0.04em;
}

.portal-chat__launcher-copy strong {
  display: block;
}

.portal-chat__launcher:hover,
.portal-chat__launcher:focus-visible {
  box-shadow: 0 22px 48px rgba(44, 31, 41, 0.32);
  transform: translateY(-2px);
}

@keyframes patent-shine {
  0%,
  58% {
    left: -35%;
  }
  78%,
  100% {
    left: 125%;
  }
}

@keyframes patent-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(125, 68, 94, 0.08);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(125, 68, 94, 0.14);
  }
}

@media (max-width: 1280px) and (min-width: 921px) {
  .portal-nav__inner {
    width: min(1240px, calc(100% - 1.25rem));
    gap: 0.8rem;
  }

  .portal-nav__links,
  .portal-nav__actions {
    gap: 0.75rem;
    font-size: 0.72rem;
  }

  .patent-badge--nav .patent-badge__copy {
    display: none;
  }

  .patent-badge--nav {
    padding-right: 0.3rem;
  }
}

@media (max-width: 920px) {
  .portal-nav {
    position: sticky;
    box-shadow: 0 10px 30px rgba(44, 31, 41, 0.05);
  }

  .portal-nav__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.7rem;
    min-height: 70px;
    padding: 0.65rem 0;
  }

  .portal-nav__toggle {
    display: grid;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(75, 35, 56, 0.14);
    border-radius: 8px;
    background: #fff;
    color: var(--asser-secondary);
    cursor: pointer;
  }

  .portal-nav__toggle-lines {
    display: grid;
    width: 19px;
    gap: 4px;
  }

  .portal-nav__toggle-lines i {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 180ms ease, opacity 180ms ease;
  }

  .portal-nav--open .portal-nav__toggle-lines i:first-child {
    transform: translateY(6px) rotate(45deg);
  }

  .portal-nav--open .portal-nav__toggle-lines i:nth-child(2) {
    opacity: 0;
  }

  .portal-nav--open .portal-nav__toggle-lines i:last-child {
    transform: translateY(-6px) rotate(-45deg);
  }

  .portal-nav__drawer {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
    padding: 0.5rem 0 0.4rem;
    border-top: 1px solid rgba(75, 35, 56, 0.09);
  }

  .portal-nav--open .portal-nav__drawer {
    display: grid;
    gap: 0.9rem;
    animation: nav-drawer-in 180ms ease-out both;
  }

  .portal-nav__links {
    display: grid;
    grid-column: auto;
    grid-row: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
    width: 100%;
    padding: 0;
    overflow: visible;
  }

  .portal-nav__links > a,
  .portal-nav__dropdown > a {
    display: flex;
    min-height: 44px;
    align-items: center;
    padding: 0.7rem 0.8rem;
    border: 1px solid rgba(75, 35, 56, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.74);
    white-space: normal;
  }

  .portal-nav__dropdown {
    padding: 0;
  }

  .portal-nav__dropdown-menu {
    display: none !important;
  }

  .portal-nav__actions {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0.55rem;
    width: 100%;
  }

  .portal-nav__actions > a:not(.portal-button) {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.7rem;
    border: 1px solid rgba(75, 35, 56, 0.11);
    border-radius: 8px;
    background: #fff;
  }

  .patent-badge--nav {
    grid-column: 1 / -1;
    width: 100%;
  }

  .portal-footer__inner {
    gap: 2.4rem;
  }
}

@keyframes nav-drawer-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 560px) {
  .portal-brand__logo .asser-logo-3d__stage {
    width: 34px;
    height: 34px;
  }

  .portal-brand__logo .asser-logo-3d__wordmark {
    width: 102px;
  }

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

  .portal-nav__actions .portal-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .portal-info-grid--documents {
    gap: 0.65rem;
  }

  .portal-info-grid--documents .portal-info-card {
    min-height: 62px;
    padding: 0.85rem 1rem;
    border-radius: 8px;
  }

  .portal-chat__launcher {
    width: auto;
    min-width: 92px;
    min-height: 52px;
    padding: 5px 10px 5px 5px;
  }

  .portal-chat__launcher .portal-chat__launcher-logo {
    width: 40px;
    height: 40px;
  }

  .portal-chat__launcher-copy strong {
    display: none;
  }

  .portal-chat__launcher-copy b {
    display: block;
    font-size: 0.7rem;
  }

  .asser-logo-3d--footer .asser-logo-3d__wordmark {
    width: 125px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .patent-badge::after,
  .patent-badge__mark {
    animation: none;
  }

  .portal-info-grid--documents .portal-info-card,
  .portal-chat__launcher,
  .portal-nav__toggle-lines i {
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Shared portal chrome */
.portal-nav {
  position: sticky;
  z-index: 40;
  top: 0;
  min-height: 78px;
  border-bottom: 1px solid rgba(75, 35, 56, 0.09);
  background: rgba(251, 248, 245, 0.95);
  backdrop-filter: blur(18px) saturate(135%);
}

.portal-nav__inner {
  display: grid;
  grid-template-columns: minmax(210px, auto) 1fr auto;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  width: min(1180px, calc(100% - 2rem));
  min-height: 78px;
  margin: 0 auto;
}

.portal-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: inherit;
  line-height: 0;
  text-decoration: none;
}

.portal-brand__logo,
.asser-logo-3d {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.22rem;
  line-height: 0;
}

.asser-logo-3d__stage {
  display: block;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
}

.asser-logo-3d__stage canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.asser-logo-3d__wordmark {
  display: block;
  width: 112px;
  height: auto;
  object-fit: contain;
}

.portal-brand__ai {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: var(--asser-forest);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 900;
}

.portal-nav__links,
.portal-nav__actions {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 1.6vw, 1.45rem);
  min-width: 0;
  font-size: 0.78rem;
  font-weight: 750;
}

.portal-nav__links {
  justify-content: center;
}

.portal-nav__actions {
  justify-content: flex-end;
  white-space: nowrap;
}

.portal-nav__links a,
.portal-nav__actions > a:not(.portal-button) {
  color: #60575b;
  text-decoration: none;
}

.portal-nav__links a:hover,
.portal-nav__actions > a:not(.portal-button):hover {
  color: var(--asser-primary);
}

.portal-nav__dropdown {
  position: relative;
  padding-block: 1.6rem;
}

.portal-nav__dropdown-menu {
  position: absolute;
  top: calc(100% - 0.7rem);
  left: 50%;
  display: none;
  width: 230px;
  padding: 0.55rem;
  border: 1px solid rgba(75, 35, 56, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-soft);
  transform: translateX(-50%);
}

.portal-nav__dropdown:hover .portal-nav__dropdown-menu,
.portal-nav__dropdown:focus-within .portal-nav__dropdown-menu {
  display: grid;
}

.portal-nav__dropdown-menu a {
  padding: 0.62rem 0.7rem;
  border-radius: 10px;
}

.portal-nav__dropdown-menu a:hover {
  background: var(--asser-alt-bg);
}

.portal-button--nav {
  min-height: 42px;
  padding: 0.7rem 1.2rem;
  font-size: 0.78rem;
}

.portal-main {
  min-height: calc(100vh - 78px);
}

.portal-footer {
  padding: 4.2rem max(1rem, calc((100vw - 1180px) / 2)) 1.5rem;
  background: var(--asser-deep);
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.78rem;
}

.portal-footer__inner {
  display: grid;
  grid-template-columns: minmax(280px, 1.8fr) minmax(150px, 0.65fr) minmax(150px, 0.65fr);
  gap: clamp(2rem, 7vw, 7rem);
}

.portal-footer__brand strong {
  color: #fff;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
}

.portal-footer__brand strong span {
  color: #a4959e;
  font-size: 0.72rem;
}

.portal-footer__brand p {
  max-width: 410px;
  line-height: 1.7;
}

.portal-footer__links {
  display: grid;
  align-content: start;
  gap: 0.7rem;
}

.portal-footer__links strong {
  color: #fff;
}

.portal-footer__links a {
  color: rgba(255, 255, 255, 0.68);
  text-decoration: none;
}

.portal-footer__links a:hover {
  color: #fff;
}

.portal-footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 3.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.66rem;
}

.portal-chat {
  position: fixed;
  z-index: 50;
  right: 1.35rem;
  bottom: 1.15rem;
  display: grid;
  justify-items: end;
  gap: 0.75rem;
}

.portal-chat__launcher {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 56px;
  padding: 0.55rem 1rem 0.55rem 0.55rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(110deg, #3d2333, #1f4743);
  color: #fff;
  box-shadow: 0 18px 42px rgba(44, 31, 41, 0.25);
  cursor: pointer;
}

.portal-chat__launcher span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  font-size: 0.72rem;
  font-weight: 900;
}

.portal-chat__launcher strong {
  font-size: 0.7rem;
}

.portal-chat__panel {
  width: min(360px, calc(100vw - 1.5rem));
  overflow: hidden;
  border: 1px solid rgba(75, 35, 56, 0.16);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(44, 31, 41, 0.24);
}

.portal-chat__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem;
  background: linear-gradient(110deg, #3d2333, #1f4743);
  color: #fff;
}

.portal-chat__header > div {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.portal-chat__header strong,
.portal-chat__header small {
  display: block;
  line-height: 1.25;
}

.portal-chat__header strong {
  font-family: "Sora", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.78rem;
}

.portal-chat__header small {
  margin-top: 0.12rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.66rem;
}

.portal-chat__avatar {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  font-size: 0.7rem;
  font-weight: 900;
}

.portal-chat__close {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.portal-chat__close:hover,
.portal-chat__close:focus-visible {
  background: rgba(255, 255, 255, 0.12);
}

.portal-chat__messages {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  height: 230px;
  padding: 0.9rem;
  overflow-y: auto;
  background: #fbf8f5;
}

.portal-chat__message {
  width: fit-content;
  max-width: 88%;
  margin: 0;
  padding: 0.68rem 0.76rem;
  border-radius: 8px;
  font-size: 0.74rem;
  line-height: 1.5;
}

.portal-chat__message--assistant {
  align-self: flex-start;
  border: 1px solid rgba(75, 35, 56, 0.11);
  background: #fff;
  color: var(--asser-text);
}

.portal-chat__message--user {
  align-self: flex-end;
  background: var(--asser-primary);
  color: #fff;
}

.portal-chat__message a {
  display: inline-block;
  margin-top: 0.25rem;
  color: var(--asser-primary);
  font-weight: 800;
}

.portal-chat__quick-actions {
  display: flex;
  gap: 0.38rem;
  padding: 0.75rem 0.75rem 0;
  overflow-x: auto;
  background: #fff;
}

.portal-chat__quick-actions button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0.38rem 0.58rem;
  border: 1px solid rgba(75, 35, 56, 0.18);
  border-radius: 999px;
  background: #fff;
  color: var(--asser-secondary);
  font: 700 0.64rem/1.2 "Manrope", sans-serif;
  cursor: pointer;
}

.portal-chat__quick-actions button:hover,
.portal-chat__quick-actions button:focus-visible {
  border-color: var(--asser-primary);
  background: var(--asser-alt-bg);
}

.portal-chat__form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
  padding: 0.75rem;
  background: #fff;
}

.portal-chat__form input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 0.7rem;
  border: 1px solid rgba(75, 35, 56, 0.2);
  border-radius: 6px;
  color: var(--asser-text);
  font: 500 0.74rem/1.2 "Manrope", sans-serif;
  outline: none;
}

.portal-chat__form input:focus {
  border-color: var(--asser-primary);
  box-shadow: 0 0 0 3px rgba(125, 68, 94, 0.1);
}

.portal-chat__form button {
  min-width: 60px;
  height: 42px;
  padding: 0 0.7rem;
  border: 0;
  border-radius: 6px;
  background: var(--asser-secondary);
  color: #fff;
  font: 800 0.7rem/1 "Manrope", sans-serif;
  cursor: pointer;
}

.portal-chat--open .portal-chat__launcher {
  box-shadow: 0 10px 28px rgba(44, 31, 41, 0.18);
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
  border: 0;
}

.upload-classifier--single {
  grid-template-columns: minmax(0, 1fr);
}

.upload-classifier--single .portal-field {
  max-width: 100%;
}

/* Authentication and customer dashboard */
.auth-shell {
  width: min(720px, calc(100% - 2rem));
  min-height: 720px;
  margin: 0 auto;
  padding: clamp(4.5rem, 10vw, 7rem) 0 5rem;
}

.auth-shell--register {
  min-height: 850px;
  padding-top: 3rem;
}

.auth-card {
  display: grid;
  gap: 1rem;
  margin-top: 1.8rem;
  padding: clamp(1.3rem, 3vw, 2rem);
  border: 1px solid rgba(75, 35, 56, 0.11);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
}

.dashboard-page--phone-gate {
  padding-top: 3rem;
}

.phone-gate {
  width: min(480px, 100%);
  margin: 0 auto;
  padding: 2.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
}

.phone-gate__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 0.5rem;
  border-radius: 50%;
  background: rgba(125, 68, 94, 0.1);
  font-size: 28px;
}

.phone-gate .portal-lead {
  margin-bottom: 1.2rem;
}

.phone-gate .phone-required-form {
  width: 100%;
  text-align: left;
}

.phone-gate__logout {
  margin-top: 1.2rem;
  color: var(--asser-muted);
  font-size: 0.8rem;
  text-decoration: underline;
}

.auth-card label,
.upload-notes {
  display: grid;
  gap: 0.55rem;
  color: var(--asser-secondary);
  font-size: 0.78rem;
  font-weight: 850;
}

.auth-card input,
.upload-notes textarea,
.upload-classifier select {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--asser-border);
  border-radius: 14px;
  background: #fff;
  color: var(--asser-text);
  font: inherit;
  outline: none;
}

.auth-card input:focus,
.upload-notes textarea:focus,
.upload-classifier select:focus {
  border-color: var(--asser-primary);
  box-shadow: 0 0 0 3px rgba(125, 68, 94, 0.08);
}

.auth-card .portal-button {
  width: 100%;
}

.auth-card .auth-account-kind {
  display: grid;
  gap: 0.7rem;
  margin: 0.2rem 0 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.auth-card .auth-account-kind legend {
  padding: 0;
  margin-bottom: 0.55rem;
  color: var(--asser-secondary);
  font-size: 0.78rem;
  font-weight: 850;
}

.auth-card label.auth-account-kind__option {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--asser-border);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  font-weight: 400;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.auth-card label.auth-account-kind__option:hover {
  border-color: var(--asser-blush);
}

.auth-card label.auth-account-kind__option:has(input:checked) {
  border-color: var(--asser-primary);
  background: rgba(125, 68, 94, 0.06);
  box-shadow: 0 0 0 3px rgba(125, 68, 94, 0.08);
}

.auth-card .auth-account-kind__option input[type="radio"] {
  flex: 0 0 auto;
  width: 20px;
  min-height: 0;
  height: 20px;
  margin: 0.1rem 0 0;
  padding: 0;
  accent-color: var(--asser-primary);
  box-shadow: none;
}

.auth-card .auth-account-kind__option span {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.auth-card .auth-account-kind__option strong {
  color: var(--asser-secondary);
  font-size: 0.92rem;
  font-weight: 850;
}

.auth-card .auth-account-kind__option small {
  color: var(--asser-muted);
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.45;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  color: var(--asser-primary);
  font-size: 0.82rem;
}

.auth-links a,
.auth-bottom a {
  color: var(--asser-primary);
  text-decoration: none;
}

.auth-bottom {
  text-align: center;
  color: var(--asser-muted);
}

.dashboard-page {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 4rem 0 5rem;
}

.dashboard-view-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 0.5rem;
}

.dashboard-view-nav a {
  padding: 0.6rem 1.15rem;
  border: 1px solid rgba(75, 35, 56, 0.15);
  border-radius: 999px;
  color: var(--asser-secondary);
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.6);
}

.dashboard-view-nav a.is-active {
  border-color: var(--asser-primary);
  background: var(--asser-primary);
  color: #fff;
}

.dashboard-view-nav__spacer {
  flex: 1 1 auto;
}

@media (max-width: 760px) {
  .dashboard-view-nav__spacer {
    flex-basis: 100%;
    height: 0;
  }
}

.dashboard-archive {
  margin-top: 1rem;
}

/* Calcolatore indicativo della rata (30/09/2026): stesso componente della
   pagina pubblica /calcolo-rata/ (plugin "Asser AI Sito Pubblico"),
   duplicato qui perche' i due plugin non condividono il CSS — solo
   assets/js/asser-ai-shell.js (initRateCalculator) e' tenuto identico. */
.rate-calculator {
  margin: 1.75rem 0;
}

.rate-calculator__field {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: flex-end;
}

.rate-calculator__field label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--asser-secondary);
  font-weight: 700;
  font-size: 0.85rem;
}

.rate-calculator__input-group {
  position: relative;
  flex: 1 1 220px;
}

.rate-calculator__input-group span {
  position: absolute;
  top: 50%;
  left: 0.9rem;
  color: var(--asser-muted);
  font-weight: 700;
  transform: translateY(-50%);
}

.rate-calculator__input-group input {
  width: 100%;
  min-height: 52px;
  padding: 0.7rem 0.9rem 0.7rem 2rem;
  border: 2px solid rgba(75, 35, 56, 0.2);
  border-radius: 8px;
  background: #fff;
  color: var(--asser-text);
  font: inherit;
}

.rate-calculator__input-group input:focus {
  border-color: var(--asser-primary);
  outline: 3px solid rgba(125, 68, 94, 0.14);
  outline-offset: 1px;
}

.rate-calculator__error {
  margin: 0.75rem 0 0;
  color: #8f2f3a;
  font-size: 0.85rem;
  font-weight: 600;
}

.rate-calculator__result {
  margin-top: 1.5rem;
}

.rate-calculator__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.rate-calculator__table th,
.rate-calculator__table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--asser-border);
  text-align: left;
}

.rate-calculator__table th {
  color: var(--asser-secondary);
  font-weight: 700;
}

.rate-calculator__empty {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--asser-forest);
  background: var(--asser-ice);
  color: #36534e;
  line-height: 1.5;
}

.rate-calculator__disclaimer {
  margin-top: 1.5rem;
  color: var(--asser-muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.rate-calculator [hidden] {
  display: none !important;
}

/* Card del calcolo rapido (01/10/2026): niente stile inventato, riusa
   .installment-plan-new* (già collaudato in "Crea piano", vedi
   render_managed_client_detail()) — stessa identità visiva del resto del
   gestionale invece di una palette nuova. Solo lo spacing esterno e il
   link all'archivio clienti sono specifici di questa card. */
.rate-calculator-standalone {
  margin-bottom: 2rem;
}

.rate-calculator-standalone__client-link {
  margin-top: 1.25rem;
  color: var(--asser-muted);
  font-size: 0.85rem;
}

.rate-calculator-standalone__client-link a {
  color: var(--asser-primary);
  font-weight: 700;
}

/* Calcolatore avanzato (01/10/2026): "numero di rate desiderato" libero +
   verifica ISEE/indici di bilancio, stesse formule ufficiali del "Crea
   piano" vero (Asser_AI_Complete_Installment_Plan_Registry). I campi ISEE
   e di bilancio riusano .installment-plan-new__isee-fields (già collaudata
   per il grid), qui solo la tipografia di label/input va dichiarata di
   nuovo perché nel "Crea piano" originale è legata a
   .installment-plan-new__isee-form--upload, un contesto diverso da
   questo calcolatore libero. */
.rate-calculator--advanced .rate-calculator__field {
  margin-bottom: 0.9rem;
}

.rate-calculator__field > input[type="number"] {
  width: 100%;
  max-width: 220px;
  min-height: 52px;
  padding: 0.7rem 0.9rem;
  border: 2px solid rgba(75, 35, 56, 0.2);
  border-radius: 8px;
  background: #fff;
  color: var(--asser-text);
  font: inherit;
}

.rate-calculator__field > input[type="number"]:focus {
  border-color: var(--asser-primary);
  outline: 3px solid rgba(125, 68, 94, 0.14);
  outline-offset: 1px;
}

.rate-calculator__subject-type {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0 0 1rem;
  padding: 0;
  border: none;
}

.rate-calculator__subject-type legend {
  width: 100%;
  margin-bottom: 0.4rem;
  color: var(--asser-secondary);
  font-weight: 700;
  font-size: 0.85rem;
}

.rate-calculator__subject-type label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.88rem;
}

.rate-calculator--advanced .installment-plan-new__isee-fields {
  margin-bottom: 1.1rem;
}

.rate-calculator--advanced .installment-plan-new__isee-fields label {
  display: grid;
  gap: 0.3rem;
  margin: 0;
  color: var(--asser-secondary);
  font-size: 0.76rem;
  font-weight: 700;
}

.rate-calculator--advanced .installment-plan-new__isee-fields input {
  min-height: 40px;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--asser-border);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 400;
  font-family: inherit;
}

.rate-calculator--advanced [data-rate-result-summary] p {
  margin: 0 0 0.5rem;
  line-height: 1.5;
}

.rate-calculator--advanced [data-rate-result-summary] p:last-child {
  margin-bottom: 0;
}

.managed-client-type-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0;
  border: none;
  margin: 0;
}

.managed-client-type-picker legend {
  width: 100%;
  margin-bottom: 0.2rem;
  color: var(--asser-secondary);
  font-size: 0.78rem;
  font-weight: 700;
}

/* Non solo dentro .managed-client-form: le stesse "option" a pillola
   sono riusate anche per i promemoria dei piani di rateizzazione
   (.installment-reminders-form/.installment-plan-new-form), che non
   hanno quella classe — restavano quindi caselle native del browser,
   mai in linea con lo stile del sito. */
.managed-client-type-picker__option {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--asser-border);
  border-radius: 999px;
  background: var(--asser-sand);
  color: var(--asser-secondary);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.managed-client-type-picker__option input[type="checkbox"],
.managed-client-type-picker__option input[type="radio"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--asser-primary);
}

/* Sfondo a pillola piena quando selezionata: solo nei browser che
   supportano :has() (tutti quelli correnti). Nei browser piu' vecchi
   resta comunque una casella/radio nativa perfettamente funzionante,
   solo senza questo tocco in piu' — nessuna funzionalita' persa. */
.managed-client-type-picker__option:has(input:checked) {
  border-color: transparent;
  background: linear-gradient(135deg, var(--asser-primary), var(--asser-secondary));
  color: #fff;
}

.managed-client-type-picker__option:has(input:checked) input {
  accent-color: #fff;
}

.managed-client-type-folder {
  margin: 1.2rem 0;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(75, 35, 56, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.6);
}

.managed-client-type-folder summary {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  color: var(--asser-secondary);
  font-weight: 800;
  font-size: 1rem;
}

.managed-client-type-folder__icon {
  font-size: 1.1rem;
}

.managed-client-type-folder__count {
  display: inline-grid;
  min-width: 26px;
  padding: 0.15rem 0.5rem;
  place-items: center;
  border-radius: 999px;
  background: var(--asser-alt-bg, rgba(201, 143, 170, 0.28));
  color: var(--asser-secondary);
  font-size: 0.74rem;
}

.managed-client-type-folder .managed-client-list {
  margin-top: 0.9rem;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 2rem;
  padding: clamp(1.6rem, 4vw, 2.5rem);
  border: 1px solid rgba(75, 35, 56, 0.08);
  border-radius: 28px;
  background:
    radial-gradient(circle at 88% 16%, rgba(201, 143, 170, 0.28), transparent 18rem),
    rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
}

.dashboard-hero__actions {
  display: flex;
  gap: 0.7rem;
}

.dashboard-hero__identity {
  display: flex;
  align-items: flex-start;
  gap: 1.15rem;
  min-width: 0;
}

.dashboard-hero__identity > div {
  min-width: 0;
}

.dashboard-hero__avatar {
  flex: 0 0 auto;
}

.dashboard-hero__avatar-photo,
.dashboard-hero__avatar-initials {
  display: inline-grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border-radius: 50%;
}

.dashboard-hero__avatar-photo {
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: var(--shadow-soft);
}

.dashboard-hero__avatar-initials {
  background: linear-gradient(135deg, var(--asser-primary), var(--asser-secondary));
  color: #fff;
  font-family: "Sora", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
}

.dashboard-hero__profile-edit {
  margin-top: 0.6rem;
}

.dashboard-hero__profile-edit summary {
  cursor: pointer;
  color: var(--asser-primary);
  font-size: 0.82rem;
  font-weight: 800;
}

.dashboard-hero__profile-forms {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.dashboard-hero__name-form,
.dashboard-hero__photo-form,
.dashboard-hero__photo-remove-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.dashboard-hero__name-form input[type="text"] {
  min-height: 42px;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--asser-border);
  border-radius: 999px;
  font-size: 0.8rem;
}

.dashboard-hero__photo-form input[type="file"] {
  max-width: 190px;
  font-size: 0.76rem;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.dashboard-stats > div {
  display: grid;
  gap: 0.55rem;
  min-height: 84px;
  padding: 1rem;
  border: 1px solid rgba(75, 35, 56, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
}

.dashboard-stats strong {
  color: var(--asser-secondary);
  font-size: 1.35rem;
}

.dashboard-stats span {
  color: var(--asser-muted);
  font-size: 0.72rem;
}

.professional-dashboard {
  display: grid;
  gap: 1rem;
  margin-top: 1.4rem;
}

.professional-dashboard__grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 1.4fr);
  gap: 1rem;
  align-items: stretch;
}

@media (max-width: 800px) {
  .professional-dashboard__grid {
    grid-template-columns: 1fr;
  }
}

.professional-dashboard__chart-card {
  padding: 1.2rem;
  border: 1px solid rgba(75, 35, 56, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
}

.professional-dashboard__chart-card h2 {
  margin: 0.2rem 0 1rem;
  font-size: 1.05rem;
  color: var(--asser-secondary);
}

.professional-dashboard__chart {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.4rem;
}

.professional-dashboard__donut-total {
  fill: var(--asser-secondary);
  font-size: 1.7rem;
  font-weight: 800;
  font-family: inherit;
}

.professional-dashboard__donut-label {
  fill: var(--asser-muted);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: inherit;
}

.professional-dashboard__legend {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.82rem;
  color: var(--asser-text);
}

.professional-dashboard__legend strong {
  margin-left: 0.35rem;
  color: var(--asser-secondary);
}

.professional-dashboard__dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 0.5rem;
  border-radius: 50%;
  vertical-align: middle;
}

.professional-dashboard__dot--completed {
  background: #1f5148;
}

.professional-dashboard__dot--working {
  background: var(--asser-primary);
}

.professional-dashboard__dot--review {
  background: #8d5915;
}

.professional-dashboard__dot--failed {
  background: var(--asser-secondary);
}

.professional-dashboard__dot--draft {
  background: #b9b4b7;
}

.professional-dashboard__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .professional-dashboard__stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 380px) {
  .professional-dashboard__stats {
    grid-template-columns: 1fr;
  }
}

.professional-dashboard__stat {
  display: grid;
  gap: 0.5rem;
  padding: 1rem;
  border: 1px solid rgba(75, 35, 56, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
}

.professional-dashboard__stat strong {
  color: var(--asser-secondary);
  font-size: 1.35rem;
}

.professional-dashboard__stat span {
  color: var(--asser-muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

.professional-dashboard__stat--warn {
  border-color: rgba(141, 89, 21, 0.25);
  background: #fff7e8;
}

.professional-dashboard__stat--warn strong {
  color: #74470f;
}

.professional-dashboard__note {
  margin: 0;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(141, 89, 21, 0.2);
  border-radius: 10px;
  background: #fdf6ea;
  color: #8d5915;
  font-size: 0.78rem;
  line-height: 1.5;
}

.dashboard-plan {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
  margin-top: 1.4rem;
  padding: clamp(1.2rem, 3vw, 1.75rem);
  border: 1px solid rgba(75, 35, 56, 0.1);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
}

.dashboard-modules {
  margin-top: 1.4rem;
}

.dashboard-modules__intro {
  color: var(--asser-muted);
  max-width: 46rem;
  margin: 0.3rem 0 1.2rem;
}

.dashboard-modules__settings {
  margin-bottom: 1.2rem;
  padding: 0.15rem 1.1rem;
  border: 1px solid rgba(75, 35, 56, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
}

.dashboard-modules__settings summary {
  padding: 0.85rem 0;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: var(--asser-secondary);
}

.dashboard-modules__settings summary::-webkit-details-marker {
  display: none;
}

.dashboard-modules__settings h4 {
  margin: 1rem 0 0.5rem;
  color: var(--asser-secondary);
  font-size: 0.85rem;
}

.dashboard-modules__settings-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0;
  font-size: 0.85rem;
  color: var(--asser-text);
}

.dashboard-modules__badge {
  margin-left: auto;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.dashboard-modules__badge--ready {
  background: var(--asser-ice);
  color: #1f5148;
}

.dashboard-modules__badge--pending {
  background: var(--asser-alt-bg);
  color: var(--asser-primary);
}

.dashboard-modules__settings form {
  padding-bottom: 1rem;
}

.dashboard-modules__settings .portal-button--secondary {
  margin-top: 0.75rem;
}

.dashboard-modules__note {
  padding: 0 0 1rem;
  color: var(--asser-muted);
  font-size: 0.78rem;
  font-style: italic;
}

.dashboard-modules__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}

.dashboard-modules__card {
  display: grid;
  gap: 0.4rem;
  padding: 1.1rem;
  border: 1px solid rgba(75, 35, 56, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dashboard-modules__card:hover,
.dashboard-modules__card:focus-visible {
  border-color: var(--asser-primary);
  background: var(--asser-alt-bg);
}

.dashboard-modules__card strong {
  color: var(--asser-secondary);
}

.dashboard-modules__card span {
  color: var(--asser-muted);
  font-size: 0.82rem;
}

.dashboard-module-form {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.dashboard-module-form h4 {
  margin: 0.6rem 0 0;
  color: var(--asser-secondary);
  font-size: 0.95rem;
}

.dashboard-module-form__field {
  display: grid;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--asser-secondary);
}

.dashboard-module-form__field input[type="text"],
.dashboard-module-form__field input[type="date"],
.dashboard-module-form__field select,
.dashboard-module-form__field textarea {
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(75, 35, 56, 0.16);
  border-radius: 10px;
  font: inherit;
  font-weight: 400;
  color: var(--asser-text);
}

.dashboard-module-form__option {
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(75, 35, 56, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  display: grid;
  gap: 0.5rem;
}

.dashboard-module-form__checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--asser-text);
}

.dashboard-module-form__checkbox input {
  margin-top: 0.2rem;
}

.dashboard-module-form__note {
  color: var(--asser-muted);
  font-size: 0.78rem;
  font-style: italic;
}

@media (max-width: 720px) {
  .dashboard-modules__grid {
    grid-template-columns: 1fr;
  }
}

.dashboard-plan__info h2 {
  margin: 0.2rem 0 0.6rem;
  color: var(--asser-secondary);
  font-size: 1.15rem;
}

.dashboard-plan__facts {
  display: grid;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--asser-text);
  font-size: 0.85rem;
  font-weight: 700;
}

.dashboard-plan__offers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(75, 35, 56, 0.1);
}

.dashboard-plan__offers-note {
  flex-basis: 100%;
  margin: 0;
  color: var(--asser-muted);
  font-size: 0.8rem;
}

.dashboard-plan__offer {
  display: grid;
  gap: 0.4rem;
  min-width: 160px;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(75, 35, 56, 0.12);
  border-radius: 14px;
  background: #fff;
}

.dashboard-plan__offer-name {
  color: var(--asser-secondary);
  font-size: 0.78rem;
  font-weight: 800;
}

.dashboard-plan__offer-price {
  color: var(--asser-text);
  font-size: 1rem;
  font-weight: 800;
}

.dashboard-plan__offers-alt {
  flex-basis: 100%;
  margin: 0.4rem 0 0;
  color: var(--asser-muted);
  font-size: 0.8rem;
}

.dashboard-plan__offers-note--form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.dashboard-plan__offers-link {
  padding: 0;
  border: none;
  background: none;
  color: var(--asser-primary);
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}

.dashboard-history {
  margin-top: 2.5rem;
}

/* Archivio clienti (professionisti abilitati) */
.managed-client-new {
  margin: 1.2rem 0;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(75, 35, 56, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
}

.installment-plan-new {
  margin-top: 1.4rem;
  padding: clamp(1.1rem, 3vw, 1.5rem);
  border: 1px solid rgba(75, 35, 56, 0.12);
  border-radius: 18px;
  background:
    radial-gradient(circle at 94% 10%, rgba(201, 143, 170, 0.22), transparent 14rem),
    rgba(255, 255, 255, 0.85);
}

.installment-plan-new h3 {
  margin: 0.2rem 0 0.4rem;
  color: var(--asser-secondary);
  font-size: 1.05rem;
}

.installment-plan-new > .description {
  max-width: 46rem;
  margin: 0 0 0.9rem;
  color: var(--asser-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.managed-client-form.installment-plan-new-form {
  max-width: 640px;
}

.installment-plan-new__calc {
  padding: 0.9rem 1rem;
  border: 1px dashed rgba(75, 35, 56, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
}

.installment-plan-new__calc-label {
  margin: 0 0 0.6rem;
  color: var(--asser-secondary);
  font-size: 0.78rem;
  font-weight: 700;
}

.installment-plan-new__suggestion {
  margin: 0 0 0.75rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid rgba(40, 77, 71, 0.18);
  border-radius: 8px;
  background: rgba(237, 244, 242, 0.88);
  color: var(--asser-forest);
  font-size: 0.78rem;
  line-height: 1.5;
}

.installment-plan-new__suggestion strong {
  color: inherit;
}

.installment-plan-new__calc-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.installment-plan-new__calc .description {
  margin: 0.7rem 0 0;
  font-size: 0.76rem;
}

@media (max-width: 640px) {
  .installment-plan-new__calc-fields {
    grid-template-columns: 1fr;
  }
}

.installment-plan-new__calc-hint {
  margin: 0.5rem 0 0;
  color: var(--asser-primary);
  font-size: 0.76rem;
  font-weight: 700;
  min-height: 1.1em;
}

.installment-plan-new__isee {
  border: 1px solid rgba(75, 35, 56, 0.14);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(246, 241, 236, 0.55));
  overflow: hidden;
}

.installment-plan-new__isee > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.85rem 1.05rem;
  cursor: pointer;
  list-style: none;
  color: var(--asser-secondary);
  font-size: 0.82rem;
  font-weight: 800;
}

.installment-plan-new__isee > summary::-webkit-details-marker {
  display: none;
}

.installment-plan-new__isee > summary::after {
  content: '';
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-left: 0.4rem;
  border-right: 2px solid var(--asser-primary);
  border-bottom: 2px solid var(--asser-primary);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.installment-plan-new__isee[open] > summary::after {
  transform: rotate(-135deg);
}

.installment-plan-new__isee-badge {
  flex: 0 0 auto;
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.installment-plan-new__isee-badge--ok {
  background: var(--asser-ice);
  color: var(--asser-forest);
}

.installment-plan-new__isee-badge--missing {
  background: #fdf1e0;
  color: #8d5915;
}

.installment-plan-new__isee-body {
  display: grid;
  gap: 0.85rem;
  padding: 0 1.05rem 1.05rem;
  border-top: 1px solid rgba(75, 35, 56, 0.1);
  padding-top: 0.9rem;
}

.installment-plan-new__isee-body .description {
  margin: 0;
  color: var(--asser-muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.installment-plan-new__isee-status {
  margin: 0;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  font-size: 0.78rem;
  line-height: 1.5;
}

.installment-plan-new__isee-status--ok {
  border: 1px solid rgba(40, 77, 71, 0.18);
  background: rgba(237, 244, 242, 0.88);
  color: var(--asser-forest);
}

.installment-plan-new__isee-status--missing {
  border: 1px solid rgba(141, 89, 21, 0.2);
  background: #fdf6ea;
  color: #8d5915;
}

.installment-plan-new__isee-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.installment-plan-new__isee-form--upload {
  display: grid;
  gap: 0.7rem;
  padding-top: 0.75rem;
  border-top: 1px dashed rgba(75, 35, 56, 0.15);
}

.installment-plan-new__isee-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.6rem;
}

.installment-plan-new__isee-form--upload label {
  display: grid;
  gap: 0.3rem;
  margin: 0;
  color: var(--asser-secondary);
  font-size: 0.76rem;
  font-weight: 700;
}

.installment-plan-new__isee-form--upload input[type="text"] {
  min-height: 40px;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--asser-border);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 400;
}

.installment-plan-new__isee-file-field {
  padding: 0.75rem;
  border: 1px dashed rgba(75, 35, 56, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
}

.installment-plan-new__isee-form--upload button {
  justify-self: start;
}

.managed-client-new summary {
  cursor: pointer;
  color: var(--asser-primary);
  font-weight: 800;
}

.managed-client-form {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.9rem;
  max-width: 480px;
}

.managed-client-form label {
  display: grid;
  gap: 0.35rem;
  color: var(--asser-secondary);
  font-size: 0.78rem;
  font-weight: 700;
}

.managed-client-form input,
.managed-client-form textarea {
  padding: 0.6rem 0.75rem;
  border: 1px solid rgba(75, 35, 56, 0.15);
  border-radius: 8px;
  font: inherit;
  color: var(--asser-text);
  resize: vertical;
}

.managed-client-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.managed-client-card {
  display: grid;
  gap: 0.4rem;
  padding: 1.1rem;
  border: 1px solid rgba(75, 35, 56, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  color: inherit;
  text-decoration: none;
}

.managed-client-card__name {
  color: var(--asser-secondary);
  font-weight: 800;
}

.managed-client-card__count {
  color: var(--asser-muted);
  font-size: 0.76rem;
}

.managed-client-card__auto-badge {
  display: inline-block;
  justify-self: start;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--asser-alt-bg);
  color: var(--asser-primary);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.managed-client-auto-notice {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(75, 35, 56, 0.15);
  border-radius: 14px;
  background: var(--asser-alt-bg);
  color: var(--asser-secondary);
  font-size: 0.85rem;
}

.managed-client-unassigned {
  margin-top: 1.75rem;
}

.managed-client-unassigned h2 {
  margin-bottom: 0.3rem;
  color: var(--asser-secondary);
  font-size: 1.05rem;
}

.managed-client-unassigned__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(75, 35, 56, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  margin-bottom: 0.5rem;
  list-style: none;
}

.managed-client-unassigned__row form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.managed-client-detail {
  margin-top: 1rem;
}

.managed-client-detail header h2 {
  margin: 0.2rem 0 0.3rem;
  color: var(--asser-secondary);
}

.client-debt-summary {
  margin: 0.9rem 0 1.4rem;
}

.client-debt-summary__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.client-debt-summary__item {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid rgba(75, 35, 56, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  white-space: nowrap;
}

.client-debt-summary__item--amount {
  background: var(--asser-alt-bg);
}

.client-debt-summary__item--alert {
  border-color: rgba(180, 60, 60, 0.35);
  background: rgba(180, 60, 60, 0.08);
}

.client-debt-summary__item--alert .client-debt-summary__value {
  color: #a3313a;
}

.client-debt-summary__value {
  color: var(--asser-secondary);
  font-size: 0.88rem;
  font-weight: 800;
}

.client-debt-summary__label {
  color: var(--asser-muted);
  font-size: 0.72rem;
}

.client-debt-summary__pending {
  color: var(--asser-muted);
  font-size: 0.9rem;
  margin: 0;
}

.client-debt-summary__note {
  color: var(--asser-muted);
  font-size: 0.78rem;
  margin: 0.6rem 0 0;
}

.client-debt-summary__note--caution {
  font-style: italic;
}

.installment-plans {
  margin-top: 2rem;
}

.installment-plan {
  margin-top: 0.75rem;
  border: 1px solid rgba(75, 35, 56, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  padding: 0.15rem 1.1rem;
}

.installment-plan > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.85rem 0;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
}

.installment-plan > summary::-webkit-details-marker {
  display: none;
}

.installment-plan__badge {
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--asser-secondary);
  opacity: 0.85;
}

.installment-plan__body {
  padding: 0 0 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.installment-plan__next {
  margin: 0;
}

.installment-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.installment-table th,
.installment-table td {
  text-align: left;
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid rgba(75, 35, 56, 0.08);
}

.installment-row--past {
  opacity: 0.55;
}

.installment-remove-btn {
  border: none;
  background: transparent;
  color: var(--asser-secondary);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.1rem 0.4rem;
}

.installment-reminders-form,
.installment-form,
.installment-pagopa-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
}

.installment-pagopa-form {
  border-bottom: 1px dashed rgba(75, 35, 56, 0.15);
  padding-bottom: 0.9rem;
  margin-bottom: 0.4rem;
}

.installment-pagopa-form .description {
  flex-basis: 100%;
  margin: 0;
}

.installment-plan-add {
  border-top: 1px dashed rgba(75, 35, 56, 0.15);
  padding-top: 0.75rem;
}

.installment-plan__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.case-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(75, 35, 56, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
}

.case-card__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dashboard-history__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.dashboard-history__heading h2 {
  margin: 0;
  color: var(--asser-secondary);
}

.dashboard-history__heading > span {
  color: var(--asser-muted);
  font-size: 0.72rem;
}

.case-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.2rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(75, 35, 56, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
}

.case-filter-bar__search {
  flex: 1 1 14rem;
  min-width: 10rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--asser-border);
  border-radius: 12px;
  font: inherit;
  color: var(--asser-text);
}

.case-filter-bar__select {
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--asser-border);
  border-radius: 12px;
  font: inherit;
  color: var(--asser-text);
  background: #fff;
}

.case-filter-bar__submit {
  padding: 0.55rem 1.1rem;
}

.case-filter-bar__reset {
  color: var(--asser-muted);
  font-size: 0.8rem;
  text-decoration: underline;
}

.case-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.case-list-empty {
  display: grid;
  gap: 0.35rem;
  padding: 1.25rem 1.3rem;
  border: 1px solid rgba(75, 35, 56, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--asser-secondary);
}

.case-list-empty span {
  color: var(--asser-muted);
}

.case-list-link {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 0.8rem;
  min-height: 84px;
  padding: 1rem 1.3rem;
  border: 1px solid rgba(75, 35, 56, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--asser-secondary) !important;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(75, 35, 56, 0.05);
}

.case-list-link span {
  display: grid;
  gap: 0.25rem;
}

.case-list-link small {
  color: var(--asser-muted);
}

.case-list-link__client {
  color: var(--asser-primary) !important;
  font-weight: 800;
}

.case-list-link em {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--asser-alt-bg);
  color: var(--asser-primary);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 850;
}

/* Guided upload */
.asser-ai-wizard-root {
  width: min(980px, calc(100% - 2rem));
  margin: clamp(3rem, 8vw, 5.5rem) auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.wizard-panel {
  padding: clamp(2rem, 5vw, 3.2rem);
  border: 1px solid rgba(75, 35, 56, 0.11);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.wizard-panel--compact {
  width: min(720px, 100%);
  margin: 0 auto;
}

.wizard-panel--wide {
  width: 100%;
}

.wizard-primary {
  width: 100%;
  margin-top: 1.2rem;
}

.wizard-primary:disabled {
  background: #d2cbce;
  box-shadow: none;
}

.consent-list,
.choice-list,
.document-guide-groups {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.8rem;
}

.consent-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  padding: 1.15rem;
  border: 1px solid rgba(75, 35, 56, 0.11);
  border-radius: 20px;
  background: #fff;
  cursor: pointer;
}

.consent-card input {
  width: 20px;
  height: 20px;
  margin-top: 0.1rem;
  accent-color: var(--asser-primary);
}

.consent-card span,
.choice-card__copy {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  text-align: left;
}

.consent-card strong,
.choice-card strong {
  color: var(--asser-secondary);
}

.consent-card small,
.choice-card small {
  color: var(--asser-muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

.wizard-privacy-link {
  color: var(--asser-muted);
  font-size: 0.75rem;
}

.wizard-privacy-link a {
  color: var(--asser-primary);
}

.choice-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  width: 100%;
  min-height: 96px;
  align-items: start;
  padding: 1.05rem;
  border: 1px solid rgba(75, 35, 56, 0.12);
  border-radius: 20px;
  background: #fff;
  cursor: pointer;
}

.choice-card--selected {
  border-color: var(--asser-primary);
  background: rgba(244, 233, 237, 0.35);
  box-shadow: 0 0 0 3px rgba(125, 68, 94, 0.06);
}

.choice-card__marker {
  width: 20px;
  height: 20px;
  border: 2px solid var(--asser-border);
  border-radius: 50%;
}

.choice-card--selected .choice-card__marker {
  border: 6px solid var(--asser-primary);
}

.upload-recommendation,
.recommended-document {
  margin-top: 1.3rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid rgba(40, 77, 71, 0.2);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(237, 244, 242, 0.96), rgba(255, 255, 255, 0.9));
}

.upload-recommendation--urgent {
  border-color: rgba(180, 52, 82, 0.25);
  background: linear-gradient(135deg, rgba(255, 241, 244, 0.95), rgba(255, 255, 255, 0.9));
}

.upload-recommendation strong,
.recommended-document h2 {
  color: var(--asser-secondary);
}

.upload-recommendation--urgent strong {
  color: #af2949;
}

.upload-recommendation p,
.recommended-document p {
  margin: 0.55rem 0 0;
  color: var(--asser-muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

.recommended-document .portal-kicker {
  margin-bottom: 0.7rem;
  color: var(--asser-forest);
}

.recommended-document h2 {
  margin: 0;
  font-size: 1.25rem;
}

.wizard-phase {
  margin-top: 1.5rem;
}

.wizard-section-title {
  max-width: 760px;
  margin: 0.5rem 0 0;
  color: var(--asser-secondary);
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  font-weight: 450;
  line-height: 0.98;
}

.guide-card--document-group {
  padding: 1.2rem;
  border: 1px solid rgba(75, 35, 56, 0.1);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
}

.guide-card--document-group h3 {
  margin: 0;
  color: var(--asser-secondary);
  font-size: 1.05rem;
  font-weight: 500;
}

.guide-card--document-group ul {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.guide-card--document-group li {
  position: relative;
  display: grid;
  gap: 0.25rem;
  padding-left: 1.2rem;
}

.guide-card--document-group li::before {
  content: "";
  position: absolute;
  top: 0.5rem;
  left: 0;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: var(--asser-primary);
}

.guide-card--document-group li strong {
  color: var(--asser-secondary);
  font-size: 0.82rem;
}

.guide-card--document-group li small {
  color: var(--asser-muted);
  line-height: 1.45;
}

.portal-notice {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-left: 4px solid var(--asser-forest);
  border-radius: 0 16px 16px 0;
  background: var(--asser-ice);
  color: #526561;
  line-height: 1.6;
}

.wizard-upload-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.4rem;
}

.upload-classifier {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.upload-classifier label {
  display: grid;
  gap: 0.5rem;
  color: var(--asser-secondary);
  font-size: 0.72rem;
  font-weight: 850;
}

.classifier-help {
  margin: -0.5rem 0 0;
  color: var(--asser-muted);
  font-size: 0.72rem;
}

.upload-dropzone {
  display: grid;
  min-height: 290px;
  place-items: center;
  align-content: center;
  gap: 0.7rem;
  padding: 1.5rem;
  border: 2px dashed rgba(125, 68, 94, 0.3);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 0, rgba(201, 143, 170, 0.12), transparent 18rem),
    rgba(255, 255, 255, 0.72);
  text-align: center;
  cursor: pointer;
}

.upload-dropzone--active {
  border-color: var(--asser-primary);
  background-color: var(--asser-alt-bg);
}

.upload-dropzone__icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
  background: var(--asser-alt-bg);
  color: var(--asser-primary);
  font-size: 1.6rem;
}

.upload-dropzone h2,
.wizard-success h2 {
  margin: 0;
  color: var(--asser-secondary);
  font-size: 1.2rem;
}

.upload-dropzone p {
  margin: 0;
  color: var(--asser-muted);
  font-size: 0.75rem;
}

.upload-dropzone__actions {
  display: flex;
  gap: 0.7rem;
  margin-top: 0.5rem;
}

.file-count {
  color: var(--asser-muted);
  font-size: 0.72rem;
}

.visually-hidden-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.uploaded-files {
  display: grid;
  gap: 0.55rem;
}

.uploaded-file {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(75, 35, 56, 0.1);
  border-radius: 14px;
  background: #fff;
}

.uploaded-file span {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.uploaded-file strong {
  overflow: hidden;
  color: var(--asser-secondary);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.uploaded-file small {
  color: var(--asser-muted);
}

.uploaded-file__remove {
  border: 0;
  background: transparent;
  color: var(--asser-primary);
  font-size: 0.72rem;
  font-weight: 850;
  cursor: pointer;
}

.upload-notes textarea {
  min-height: 100px;
  resize: vertical;
}

.form-error {
  margin: 0;
  color: #a12948;
  font-size: 0.82rem;
  font-weight: 800;
}

.wizard-success {
  display: grid;
  min-height: 320px;
  place-items: center;
  align-content: center;
  gap: 0.8rem;
  text-align: center;
}

.wizard-success p {
  max-width: 500px;
  margin: 0;
  color: var(--asser-muted);
  line-height: 1.6;
}

.success-mark {
  display: grid;
  width: 60px;
  height: 60px;
  place-items: center;
  border-radius: 50%;
  background: var(--asser-ice);
  color: var(--asser-forest);
  font-size: 1.7rem;
  font-weight: 900;
}

/* Privacy and long guide content */
.privacy-sections {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.8rem;
}

.privacy-sections .portal-card h2 {
  margin: 0 0 0.45rem;
  color: var(--asser-secondary);
  font-size: 1.05rem;
}

.privacy-sections .portal-card p {
  margin: 0;
  color: var(--asser-muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

.privacy-footnote {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--asser-border);
  color: var(--asser-muted);
  font-size: 0.72rem;
  line-height: 1.55;
}

.guide-block + .guide-block {
  margin-top: 1rem;
}

.guide-detail-list,
.guide-list--cards,
.guide-qa-list {
  display: grid;
  gap: 0.55rem;
  margin: 0.8rem 0 0;
}

.guide-detail-row,
.guide-list--cards li,
.guide-qa-item {
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(75, 35, 56, 0.09);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
}

.guide-list--cards {
  padding: 0;
  list-style: none;
}

.guide-list--cards li {
  position: relative;
  padding-left: 2rem;
  color: var(--asser-muted);
  font-size: 0.82rem;
}

.guide-list--cards li::before {
  content: "";
  position: absolute;
  top: 1.1rem;
  left: 0.9rem;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: var(--asser-forest);
}

.guide-warning {
  margin-top: 0.8rem;
  padding: 0.9rem 1rem;
  border-left: 4px solid var(--asser-forest);
  background: var(--asser-ice);
  color: #526561;
  font-size: 0.82rem;
  line-height: 1.55;
}

.faq-cta {
  margin-top: 4rem;
  padding: clamp(2rem, 5vw, 3.5rem);
  border-radius: 28px;
  background: linear-gradient(135deg, var(--asser-secondary), var(--asser-forest));
  color: #fff;
}

.faq-cta h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 450;
  line-height: 1.05;
}

.faq-cta p {
  color: rgba(255, 255, 255, 0.7);
}

.portal-faq-preview__heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 2rem;
}

.portal-faq-preview__heading h2 {
  max-width: 760px;
  margin: 0;
  color: var(--asser-secondary);
  font-size: clamp(2.7rem, 6vw, 5.6rem);
  font-weight: 450;
  line-height: 1;
}

.portal-faq-preview__heading p:last-child {
  max-width: 720px;
  color: var(--asser-muted);
  line-height: 1.7;
}

.faq-all-link {
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--asser-border);
  color: var(--asser-secondary) !important;
  font-size: 0.78rem;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.faq-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 2.7rem;
}

.faq-preview-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "number topic action"
    "number question action";
  align-items: center;
  gap: 0.25rem 0.9rem;
  min-height: 94px;
  padding: 1rem;
  border: 1px solid rgba(75, 35, 56, 0.11);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--asser-secondary) !important;
  text-decoration: none;
}

.faq-preview-card > span {
  grid-area: number;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--asser-sand);
  color: var(--asser-primary);
  font-size: 0.68rem;
  font-weight: 850;
}

.faq-preview-card small {
  grid-area: topic;
  color: var(--asser-muted);
  font-size: 0.58rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.faq-preview-card strong {
  grid-area: question;
  font-size: 0.82rem;
  line-height: 1.35;
}

.faq-preview-card b {
  grid-area: action;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: var(--asser-alt-bg);
  color: var(--asser-primary);
}

@media (max-width: 1040px) {
  .portal-nav__inner {
    grid-template-columns: 1fr auto;
  }

  .portal-nav__links {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    width: 100%;
    padding-bottom: 0.8rem;
    overflow-x: auto;
  }

  .portal-nav {
    position: relative;
  }

  .portal-nav__dropdown {
    padding-block: 0;
  }

  .portal-nav__dropdown-menu {
    left: 0;
    transform: none;
  }
}

@media (max-width: 760px) {
  .portal-nav__inner {
    grid-template-columns: 1fr;
    gap: 0.7rem;
    padding: 0.8rem 0;
  }

  .portal-nav__actions {
    position: absolute;
    top: 0.8rem;
    right: 0.65rem;
  }

  .portal-nav__actions > a:not(.portal-button) {
    display: none;
  }

  .portal-nav__links {
    gap: 1rem;
    padding-bottom: 0.2rem;
  }

  .portal-nav__links a {
    white-space: nowrap;
  }

  .portal-nav__dropdown-menu {
    display: none !important;
  }

  .portal-button--nav {
    min-height: 38px;
    padding: 0.62rem 0.9rem;
  }

  .portal-footer__inner,
  .dashboard-hero,
  .upload-classifier,
  .portal-faq-preview__heading {
    grid-template-columns: 1fr;
  }

  .dashboard-hero__avatar-photo,
  .dashboard-hero__avatar-initials {
    width: 56px;
    height: 56px;
    font-size: 1.2rem;
  }

  .portal-footer__bottom,
  .dashboard-history__heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-plan__offer {
    flex: 1 1 100%;
  }

  .dashboard-plan__offer .portal-button {
    width: 100%;
  }

  .portal-chat {
    right: 0.75rem;
    bottom: 0.75rem;
  }

  .portal-chat__launcher strong {
    display: none;
  }

  .portal-chat__launcher {
    width: 48px;
    min-height: 48px;
    padding: 5px;
  }

  .portal-chat__launcher span {
    width: 38px;
    height: 38px;
  }

  .portal-chat__panel {
    width: min(360px, calc(100vw - 1.5rem));
  }

  .auth-shell,
  .dashboard-page,
  .asser-ai-wizard-root {
    width: min(100% - 1.25rem, 1120px);
  }

  .dashboard-hero__actions,
  .auth-links,
  .upload-dropzone__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-stats {
    grid-template-columns: 1fr;
  }

  .faq-preview-grid {
    grid-template-columns: 1fr;
  }

  .case-list-link {
    grid-template-columns: 1fr auto;
  }

  .case-list-link b {
    display: none;
  }

  .wizard-panel {
    padding: 1.25rem;
    border-radius: 22px;
  }

  .wizard-panel .portal-title {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .wizard-section-title {
    font-size: clamp(2.2rem, 12vw, 3.5rem);
  }

  .upload-dropzone {
    min-height: 260px;
  }

  .upload-dropzone__actions .portal-button {
    width: 100%;
  }
}

/* Customer case workspace */
.customer-dashboard {
  display: grid;
  gap: 2rem;
}

.customer-dashboard .dashboard-hero {
  background:
    radial-gradient(circle at 6% 0%, rgba(201, 143, 170, 0.3), transparent 22rem),
    radial-gradient(circle at 96% 100%, rgba(40, 77, 71, 0.18), transparent 24rem),
    rgba(255, 255, 255, 0.92);
}

.case-list-link--active {
  border-color: var(--asser-primary);
  box-shadow: 0 0 0 2px rgba(125, 68, 94, 0.08);
}

.case-detail {
  scroll-margin-top: 7rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid rgba(75, 35, 56, 0.11);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.case-detail__header,
.staff-case-detail__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--asser-border);
}

.case-detail__header h2,
.staff-case-detail__header h2 {
  margin: 0.3rem 0 0;
  color: var(--asser-secondary);
  font-family: "Sora", "Manrope", sans-serif;
  font-size: clamp(1.3rem, 3vw, 2rem);
  letter-spacing: 0;
}

.case-draft-delete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  border: 1px dashed var(--asser-border);
  background: #fff8eb;
  color: #61400f;
  font-size: 0.84rem;
}

.case-draft-delete p {
  margin: 0;
}

.case-detail__client {
  margin: 0.5rem 0 0;
  color: var(--asser-primary);
  font-size: 0.85rem;
}

.case-status {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(125, 68, 94, 0.18);
  border-radius: 999px;
  background: var(--asser-alt-bg);
  color: var(--asser-secondary);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.case-status--completed {
  border-color: rgba(40, 77, 71, 0.24);
  background: var(--asser-ice);
  color: #1f5148;
}

.case-status--partial,
.case-status--manual_review,
.case-status--failed {
  border-color: rgba(141, 89, 21, 0.25);
  background: #fff7e8;
  color: #74470f;
}

.case-alert {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border-left: 4px solid var(--asser-forest);
  background: var(--asser-ice);
  color: #23443f;
}

.case-alert--warning {
  border-left-color: #9a6419;
  background: #fff8eb;
  color: #61400f;
}

.case-alert--error {
  border-left-color: #a12d45;
  background: #fff1f4;
  color: #742033;
}

.case-alert strong,
.case-alert p {
  display: block;
  margin: 0;
}

.case-alert p {
  margin-top: 0.3rem;
  font-size: 0.86rem;
  line-height: 1.55;
}

.case-detail__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.case-panel {
  min-width: 0;
  padding: 1.15rem;
  border: 1px solid var(--asser-border);
  border-radius: 8px;
  background: #fff;
}

.case-panel h3 {
  margin: 0 0 0.9rem;
  color: var(--asser-secondary);
  font-size: 1rem;
  letter-spacing: 0;
}

.case-panel--report {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-color: rgba(40, 77, 71, 0.22);
  background: var(--asser-ice);
}

.case-panel--report > div {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.case-panel--report h3,
.case-panel--report p {
  margin: 0;
}

.case-panel--report p {
  margin-top: 0.25rem;
  color: #53635f;
  font-size: 0.82rem;
  line-height: 1.45;
}

.case-panel--rottamazione {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.case-panel--rottamazione > div {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  min-width: 0;
}

.case-panel--rottamazione h3 {
  margin: 0;
}

.case-panel--rottamazione p {
  margin: 0.25rem 0 0;
  color: #53635f;
  font-size: 0.82rem;
  line-height: 1.45;
}

.case-panel--rottamazione form {
  flex: 0 0 auto;
}

.staff-global-setting {
  margin-top: 1.25rem;
}

.case-panel--rottamazione p.staff-rottamazione-disabled-note {
  margin-top: 0.5rem;
  color: #8d5915;
  font-size: 0.78rem;
  font-weight: 800;
}

.case-panel--reanalysis-has-diff {
  grid-column: 1 / -1;
}

.case-panel__hint {
  margin: 0 0 0.9rem;
  color: #53635f;
  font-size: 0.82rem;
  line-height: 1.45;
}

.case-panel__hint--muted {
  margin: 0.7rem 0 0;
  color: var(--asser-muted);
  font-size: 0.74rem;
}

.reanalysis-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.reanalysis-diff-title {
  margin: 1.1rem 0 0.6rem;
  color: var(--asser-secondary);
  font-size: 0.88rem;
}

.reanalysis-diff-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.reanalysis-diff-table th,
.reanalysis-diff-table td {
  text-align: left;
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid rgba(75, 35, 56, 0.08);
}

.reanalysis-diff-table__esito {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
}

.reanalysis-diff-table__esito--nuovo,
.reanalysis-diff-table__esito--importo-aggiornato {
  background: #fff8eb;
  color: #61400f;
}

.reanalysis-diff-table__esito--rimosso {
  background: var(--asser-ice);
  color: #1f5148;
}

.case-panel__icon,
.case-document-list__type {
  display: inline-grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 6px;
  background: var(--asser-secondary);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
}

.case-panel__pending,
.case-empty-text {
  color: var(--asser-muted);
  font-size: 0.82rem;
}

.case-document-list,
.case-missing-list {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.case-document-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  min-height: 64px;
  padding: 0.55rem;
  border: 1px solid rgba(75, 35, 56, 0.1);
  border-radius: 6px;
}

.case-document-list li > span:nth-child(2) {
  display: grid;
  min-width: 0;
}

.case-document-list strong,
.case-document-list small {
  overflow-wrap: anywhere;
}

.case-document-list strong {
  color: var(--asser-text);
  font-size: 0.82rem;
}

.case-document-list small {
  color: var(--asser-muted);
  font-size: 0.7rem;
}

.case-document-list a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 0.45rem 0.25rem;
  color: var(--asser-primary);
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}

.case-document-list__actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.case-document-delete {
  margin: 0;
}

.case-document-delete button {
  min-height: 40px;
  padding: 0.45rem 0.55rem;
  border: 0;
  background: transparent;
  color: #9b2840;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 0.2rem;
  cursor: pointer;
}

.case-document-delete button:hover,
.case-document-delete button:focus-visible {
  color: #721729;
  outline: 3px solid rgba(161, 45, 69, 0.18);
  outline-offset: 2px;
}

.case-panel--processing {
  background: #fbfcfc;
}

.case-panel--diagnostics {
  border-color: rgba(40, 77, 71, 0.24);
  background: #f7faf9;
}

.case-diagnostics__connected {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: #e3f1ed;
  color: #24564d !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
}

.case-diagnostics__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0;
}

.case-diagnostics__grid > div {
  min-width: 0;
  padding: 0.7rem;
  border: 1px solid rgba(75, 35, 56, 0.1);
  border-radius: 6px;
  background: #fff;
}

.case-diagnostics__grid dt,
.case-diagnostics__grid dd {
  margin: 0;
}

.case-diagnostics__grid dt {
  color: var(--asser-muted);
  font-size: 0.66rem;
  font-weight: 700;
}

.case-diagnostics__grid dd {
  margin-top: 0.2rem;
  color: var(--asser-secondary);
  font-size: 0.8rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.case-diagnostics__grid dd.is-warning {
  color: #8d2c3a;
}

.case-diagnostics__message {
  margin-top: 0.8rem;
  padding: 0.8rem 0.9rem;
  border-left: 3px solid #7d8986;
  background: #eef1f0;
  color: #46524f;
}

.case-diagnostics__message--ok {
  border-color: #2b665b;
  background: #e9f4f1;
  color: #24564d;
}

.case-diagnostics__message--warning {
  border-color: #9a6419;
  background: #fff8ec;
  color: #6f4a14;
}

.case-diagnostics__message--error {
  border-color: #a33545;
  background: #fff1f3;
  color: #7e2735;
}

.case-diagnostics__message strong,
.case-diagnostics__message p {
  margin: 0;
}

.case-diagnostics__message p {
  margin-top: 0.25rem;
  font-size: 0.76rem;
  line-height: 1.5;
}

.case-diagnostics__message dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0.65rem 0 0;
}

.case-diagnostics__message dl > div {
  min-width: 0;
}

.case-diagnostics__message dt,
.case-diagnostics__message dd {
  margin: 0;
  font-size: 0.69rem;
}

.case-diagnostics__message dt {
  font-weight: 800;
}

.case-diagnostics__message dd {
  margin-top: 0.12rem;
  overflow-wrap: anywhere;
}

.case-diagnostics__history {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(75, 35, 56, 0.12);
}

.case-diagnostics__history > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.case-diagnostics__history h4,
.case-diagnostics__history > div span {
  margin: 0;
}

.case-diagnostics__history h4 {
  color: var(--asser-secondary);
  font-size: 0.82rem;
}

.case-diagnostics__history > div span {
  color: var(--asser-muted);
  font-size: 0.68rem;
}

.case-diagnostics__history ol {
  display: grid;
  gap: 0.35rem;
  margin: 0.6rem 0 0;
  padding: 0;
  list-style: none;
}

.case-diagnostics__history li {
  display: grid;
  grid-template-columns: minmax(110px, 0.35fr) minmax(0, 1fr);
  gap: 0.55rem;
  color: var(--asser-text);
  font-size: 0.72rem;
}

.case-diagnostics__history time {
  color: var(--asser-muted);
}

.case-diagnostics__console {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  margin-top: 0.8rem;
  color: var(--asser-primary);
  font-size: 0.74rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}

.case-panel__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.case-panel__heading h3,
.case-panel__heading p {
  margin: 0;
}

.case-panel__heading > span {
  flex: 0 0 auto;
  color: var(--asser-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.case-processing-warning {
  margin: 0 0 0.75rem;
  padding: 0.75rem 0.85rem;
  border-left: 3px solid #9a6419;
  background: #fff8ec;
  color: #6f4a14;
  font-size: 0.78rem;
  line-height: 1.45;
}

.case-overall-progress {
  display: grid;
  gap: 0.4rem;
  margin: 0 0 0.85rem;
}

.case-overall-progress > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--asser-text);
  font-size: 0.74rem;
}

.case-overall-progress > span {
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ebe9;
}

.case-overall-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--asser-accent);
  transition: width 300ms ease;
}

.case-processing-list {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.case-processing-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  min-height: 58px;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(75, 35, 56, 0.1);
  border-radius: 6px;
  background: #fff;
}

.case-processing-list li:has(.case-document-delete) {
  grid-template-columns: auto minmax(0, 1fr) auto auto;
}

.case-processing-list li > span:nth-child(2) {
  display: grid;
  min-width: 0;
}

.case-processing-list strong,
.case-processing-list small {
  overflow-wrap: anywhere;
}

.case-processing-list strong {
  color: var(--asser-text);
  font-size: 0.82rem;
}

.case-processing-list small {
  margin-top: 0.15rem;
  color: var(--asser-muted);
  font-size: 0.7rem;
  line-height: 1.35;
}

.case-processing-list__indicator {
  width: 11px;
  height: 11px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #a2aaa8;
  box-shadow: 0 0 0 1px #a2aaa8;
}

.case-processing-list__indicator--processing {
  background: #9a6419;
  box-shadow: 0 0 0 1px #9a6419;
}

.case-processing-list__indicator--read {
  background: var(--asser-accent);
  box-shadow: 0 0 0 1px var(--asser-accent);
}

.case-processing-list__indicator--unreadable {
  background: #a33545;
  box-shadow: 0 0 0 1px #a33545;
}

.case-processing-list__state {
  padding: 0.3rem 0.5rem;
  border-radius: 999px;
  background: #eef1f0;
  color: #4d5956;
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.case-processing-list__state--read {
  background: #e6f2ef;
  color: #24564d;
}

.case-processing-list__state--unreadable {
  background: #fae8eb;
  color: #8d2c3a;
}

.case-missing-list li {
  position: relative;
  padding-left: 1rem;
  color: var(--asser-text);
  font-size: 0.82rem;
  line-height: 1.45;
}

.case-missing-list li::before {
  position: absolute;
  top: 0.55em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9a6419;
  content: "";
}

/* Staff workspace */
.asser-ai-staff.staff-dashboard {
  width: min(1240px, calc(100% - 2rem));
  padding: clamp(1rem, 3vw, 2rem);
  border-radius: 24px;
}

.asser-ai-staff__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.asser-ai-staff__header h1 {
  margin: 0.25rem 0 0.45rem;
  color: var(--asser-secondary);
  font-family: "Sora", "Manrope", sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  letter-spacing: 0;
}

.asser-ai-staff__header p:last-child {
  max-width: 720px;
  margin: 0;
  color: var(--asser-muted);
}

.staff-header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
}

.staff-access-badge {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(40, 77, 71, 0.24);
  border-radius: 999px;
  background: #e9f4f1;
  color: #24564d;
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.staff-console-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  color: var(--asser-primary);
  font-size: 0.74rem;
  font-weight: 800;
}

.asser-ai-kicker {
  margin: 0;
  color: var(--asser-primary);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.asser-ai-staff__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.asser-ai-staff__stats article {
  display: grid;
  gap: 0.3rem;
  min-height: 82px;
  padding: 1rem;
  border: 1px solid rgba(75, 35, 56, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
}

.asser-ai-staff__stats strong {
  color: var(--asser-secondary);
  font-size: 1.45rem;
}

.asser-ai-staff__stats span {
  color: var(--asser-muted);
  font-size: 0.75rem;
}

.staff-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(170px, 0.4fr) minmax(170px, 0.4fr) auto auto;
  align-items: end;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid rgba(75, 35, 56, 0.1);
  border-radius: 18px;
  background: var(--asser-sand);
}

.staff-filters label,
.staff-upload-panel label {
  display: grid;
  gap: 0.4rem;
  color: var(--asser-secondary);
  font-size: 0.76rem;
  font-weight: 800;
}

.staff-filters input,
.staff-filters select,
.staff-upload-panel input,
.staff-upload-panel select {
  width: 100%;
  min-height: 46px;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(75, 35, 56, 0.16);
  border-radius: 12px;
  background: #fff;
  color: var(--asser-text);
  font: inherit;
  outline: none;
}

.staff-upload-panel input[type="file"] {
  padding: 0.6rem;
}

.staff-filters input:focus,
.staff-filters select:focus,
.staff-upload-panel input:focus,
.staff-upload-panel select:focus,
.case-document-list a:focus-visible,
.staff-back-link:focus-visible {
  border-color: var(--asser-primary);
  outline: 3px solid rgba(125, 68, 94, 0.18);
  outline-offset: 2px;
}

.staff-filters__reset {
  align-self: center;
  color: var(--asser-primary);
  font-size: 0.8rem;
  font-weight: 800;
}

.staff-bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(75, 35, 56, 0.1);
  border-radius: 18px;
  background: var(--asser-sand);
}

.staff-bulk-bar__all,
.staff-bulk-bar__confirm {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--asser-secondary);
  font-size: 0.8rem;
  font-weight: 800;
}

.staff-bulk-bar__count {
  color: var(--asser-muted);
  font-size: 0.8rem;
}

.staff-bulk-bar .asser-ai-button {
  margin-left: auto;
}

.staff-folder {
  margin-bottom: 0.85rem;
  border: 1px solid rgba(75, 35, 56, 0.1);
  border-radius: 18px;
  background: var(--asser-sand);
  overflow: hidden;
}

.staff-folder summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  cursor: pointer;
  list-style: none;
}

.staff-folder summary::-webkit-details-marker {
  display: none;
}

.staff-folder summary::after {
  margin-left: auto;
  color: var(--asser-primary);
  font-size: 0.7rem;
  font-weight: 800;
  content: "NASCONDI";
}

.staff-folder:not([open]) summary::after {
  content: "MOSTRA";
}

.staff-folder__name {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  color: var(--asser-text);
  font-weight: 800;
}

.staff-folder__name small {
  color: var(--asser-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.staff-folder__count {
  color: var(--asser-muted);
  font-size: 0.76rem;
  white-space: nowrap;
}

.staff-chat-folders {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.staff-folder__cases {
  display: grid;
  gap: 0.6rem;
  padding: 0 0.75rem 0.75rem;
}

.staff-case-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.staff-case-card {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) minmax(250px, 0.9fr) auto auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid rgba(75, 35, 56, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
}

.staff-case-card__select {
  display: flex;
  align-items: center;
}

.staff-case-card__select input[type="checkbox"] {
  width: 20px;
  height: 20px;
}

.staff-case-card__client,
.staff-client-profile__heading {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.staff-case-card__client h2 {
  margin: 0;
  color: var(--asser-text);
  font-size: 0.95rem;
  letter-spacing: 0;
}

.staff-case-card__client a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  color: var(--asser-primary);
  font-size: 0.72rem;
  overflow-wrap: anywhere;
}

.staff-avatar {
  display: inline-grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--asser-secondary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
}

.staff-case-card__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.staff-case-card__meta span {
  display: grid;
  min-width: 0;
  color: var(--asser-text);
  font-size: 0.76rem;
}

.staff-case-card__meta small {
  color: var(--asser-muted);
}

.staff-case-card__meta code {
  overflow: hidden;
  color: var(--asser-secondary);
  font-family: inherit;
  font-weight: 800;
  text-overflow: ellipsis;
}

.staff-empty {
  padding: 1.5rem;
  border: 1px dashed rgba(75, 35, 56, 0.2);
  border-radius: 18px;
  text-align: center;
}

.staff-empty p {
  margin-bottom: 0;
  color: var(--asser-muted);
}

.staff-notice {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-left: 4px solid var(--asser-forest);
  background: var(--asser-ice);
  color: #23443f;
}

.staff-notice--error {
  border-left-color: #a12d45;
  background: #fff0f3;
  color: #842138;
}

.customer-notice {
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border-left: 4px solid var(--asser-forest);
  background: var(--asser-ice);
  color: #23443f;
  font-size: 0.84rem;
  line-height: 1.5;
}

.customer-notice--warning {
  border-left-color: #9a6419;
  background: #fff8eb;
  color: #61400f;
}

.customer-notice--error {
  border-left-color: #a12d45;
  background: #fff0f3;
  color: #842138;
}

.case-unreadable-alert {
  display: grid;
  gap: 0.9rem;
}

.case-unreadable-list {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.case-unreadable-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, auto);
  align-items: center;
  gap: 1rem;
  padding: 0.8rem;
  border: 1px solid rgba(161, 45, 69, 0.2);
  border-radius: 6px;
  background: #fff;
}

.case-unreadable-list li > div {
  display: grid;
  min-width: 0;
  gap: 0.2rem;
}

.case-unreadable-list small {
  color: #76515a;
  font-size: 0.72rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.case-unreadable-list form {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
}

.case-unreadable-list input[type="file"] {
  width: min(260px, 100%);
  min-height: 44px;
  padding: 0.45rem;
  border: 1px solid rgba(75, 35, 56, 0.16);
  border-radius: 10px;
  background: #fff;
  color: var(--asser-text);
  font: inherit;
  font-size: 0.72rem;
}

.staff-case-detail {
  margin-top: 1.5rem;
}

.staff-back-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 0.4rem 0.2rem;
  margin-bottom: 1rem;
  color: var(--asser-primary);
  font-size: 0.82rem;
  font-weight: 800;
}

.staff-case-detail__header code {
  display: inline-block;
  max-width: 100%;
  margin-top: 0.4rem;
  color: var(--asser-muted);
  font-size: 0.72rem;
  overflow-wrap: anywhere;
}

.staff-client-profile {
  margin-top: 1rem;
  padding: 1.15rem;
  border: 1px solid rgba(75, 35, 56, 0.1);
  border-radius: 18px;
  background: var(--asser-sand);
}

.staff-client-profile h3 {
  margin: 0.2rem 0 0;
  color: var(--asser-text);
  font-size: 1.05rem;
  letter-spacing: 0;
}

.staff-client-profile dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 0;
}

.staff-client-profile dl > div {
  min-width: 0;
}

.staff-client-profile dt {
  color: var(--asser-muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.staff-client-profile dd {
  margin: 0.2rem 0 0;
  color: var(--asser-text);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.staff-client-profile dd a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  color: var(--asser-primary);
}

.staff-client-plan-status {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 0.9rem;
}

.staff-client-plan-status span {
  display: grid;
  color: var(--asser-text);
  font-size: 0.82rem;
  font-weight: 800;
}

.staff-client-plan-status small {
  color: var(--asser-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.staff-client-plan-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--asser-border);
}

.staff-client-plan-form .description {
  flex-basis: 100%;
  margin: 0.3rem 0 0;
  color: var(--asser-muted);
  font-size: 0.76rem;
}

.staff-view-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.staff-view-nav a {
  padding: 0.55rem 1rem;
  border: 1px solid var(--asser-border);
  border-radius: 999px;
  color: var(--asser-secondary);
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
}

.staff-view-nav a.is-active {
  border-color: var(--asser-primary);
  background: var(--asser-primary);
  color: #fff;
}

.staff-spend-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.staff-spend-table th,
.staff-spend-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(75, 35, 56, 0.08);
  text-align: left;
  vertical-align: top;
}

.staff-spend-table tr:last-child td {
  border-bottom: none;
}

.staff-spend-table thead th {
  background: var(--asser-alt-bg);
  color: var(--asser-secondary);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.staff-spend-table tbody tr:hover {
  background: rgba(125, 68, 94, 0.04);
}

.staff-spend-table__select {
  width: 2.2rem;
  padding-right: 0.4rem;
}

.staff-spend-table code {
  font-size: 0.72rem;
  color: var(--asser-muted);
}

.staff-client-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.staff-client-card {
  border: 1px solid rgba(75, 35, 56, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  overflow: hidden;
}

.staff-client-card__summary {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 0.9fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  cursor: pointer;
  list-style: none;
}

.staff-client-card__summary::-webkit-details-marker {
  display: none;
}

.staff-client-card__summary::after {
  color: var(--asser-primary);
  font-size: 0.7rem;
  font-weight: 800;
  content: "MOSTRA";
}

.staff-client-card[open] .staff-client-card__summary::after {
  content: "NASCONDI";
}

.staff-client-card__body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.6rem;
  padding: 0.85rem 1rem 1rem;
  border-top: 1px solid var(--asser-border);
  background: var(--asser-alt-bg);
}

.staff-client-card__identity {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.staff-client-card__identity h2 {
  margin: 0;
  color: var(--asser-text);
  font-size: 0.95rem;
  letter-spacing: 0;
}

.staff-client-card__identity a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  color: var(--asser-primary);
  font-size: 0.72rem;
  overflow-wrap: anywhere;
}

.staff-client-card__contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin: 0.2rem 0 0;
  font-size: 0.72rem;
  color: var(--asser-muted);
}

.staff-client-card__contact a {
  display: inline-flex;
  min-height: auto;
  align-items: center;
  gap: 0.3rem;
  color: var(--asser-muted);
}

.staff-client-card__contact a:hover {
  color: var(--asser-primary);
}

.staff-client-card__contact-missing {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: #a15b1f;
}

.staff-client-card__usage {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.staff-client-card__usage span {
  display: grid;
  color: var(--asser-text);
  font-size: 0.8rem;
  font-weight: 800;
}

.staff-client-card__usage small {
  color: var(--asser-muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.staff-client-card__pending-badge {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(214, 158, 46, 0.14);
  color: #8a6210;
  font-size: 0.64rem;
  font-weight: 800;
  vertical-align: middle;
  white-space: nowrap;
}

.staff-client-card .staff-client-plan-form {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  flex-wrap: nowrap;
  justify-content: space-between;
}

.staff-client-card__profile-link {
  align-self: flex-start;
}

@media (max-width: 920px) {
  .staff-client-card__summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .staff-client-card .staff-client-plan-form {
    flex-wrap: wrap;
  }
}

.staff-client-plan-form label {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1 1 auto;
  min-width: 0;
}

.staff-client-plan-form label span {
  color: var(--asser-muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.staff-client-plan-form select,
.staff-client-plan-form input[type="text"] {
  width: 100%;
  padding: 0.4rem 0.6rem;
  border: 1px solid rgba(75, 35, 56, 0.16);
  border-radius: 10px;
  font-size: 0.85rem;
}

.staff-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  align-items: start;
  gap: 1rem;
  margin-top: 1rem;
}

.staff-workspace__main {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.staff-upload-panel {
  position: sticky;
  top: 7rem;
  padding: 1.15rem;
  border: 1px solid rgba(40, 77, 71, 0.28);
  border-radius: 18px;
  background: var(--asser-ice);
}

.staff-upload-panel h3 {
  margin: 0.3rem 0 0.5rem;
  color: var(--asser-secondary);
}

.staff-upload-panel > p:not(.asser-ai-kicker) {
  color: #53635f;
  font-size: 0.8rem;
  line-height: 1.5;
}

.staff-upload-panel form {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.staff-upload-panel label small {
  color: var(--asser-muted);
  font-weight: 500;
}

.staff-danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: 1.25rem;
  padding: 1.15rem;
  border: 1px solid rgba(161, 45, 69, 0.28);
  border-radius: 18px;
  background: rgba(161, 45, 69, 0.05);
}

.staff-danger-zone h3,
.staff-danger-zone p {
  margin: 0;
}

.staff-danger-zone h3 {
  margin-top: 0.25rem;
  color: #731d30;
  font-size: 1rem;
}

.staff-danger-zone p:last-child {
  max-width: 720px;
  margin-top: 0.35rem;
  color: #76515a;
  font-size: 0.78rem;
  line-height: 1.5;
}

.staff-danger-zone form {
  display: grid;
  flex: 0 0 auto;
  gap: 0.65rem;
}

.staff-danger-zone label {
  color: #731d30;
  font-size: 0.72rem;
  font-weight: 700;
}

.staff-danger-zone--edit {
  flex-direction: column;
  align-items: stretch;
  border-color: rgba(75, 35, 56, 0.1);
  background: var(--asser-alt-bg);
}

.staff-danger-zone--edit form {
  width: 100%;
  margin-top: 0.5rem;
}

.staff-danger-zone--edit h3 {
  color: var(--asser-secondary);
}

.staff-danger-zone--edit p:last-child {
  color: #53635f;
}

.staff-danger-zone--edit label {
  color: var(--asser-secondary);
}

.staff-client-edit-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 0.85rem 1rem;
  align-items: end;
}

.staff-client-edit-form label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.staff-client-edit-form input[type="text"] {
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(75, 35, 56, 0.16);
  border-radius: 10px;
  font-size: 0.9rem;
}

.staff-client-edit-form button {
  grid-column: 1 / -1;
  justify-self: start;
}

@media (max-width: 720px) {
  .staff-client-edit-form {
    grid-template-columns: 1fr;
  }
}

.asser-ai-button--danger {
  border-color: #a12d45;
  background: #a12d45;
  color: #fff;
}

.asser-ai-button--danger:hover,
.asser-ai-button--danger:focus-visible {
  border-color: #721729;
  background: #721729;
  color: #fff;
}

@media (max-width: 980px) {
  .asser-ai-staff__stats,
  .staff-client-profile dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .staff-filters {
    grid-template-columns: 1fr 1fr;
  }

  .staff-case-card {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .staff-case-card__meta {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .staff-workspace {
    grid-template-columns: 1fr;
  }

  .staff-upload-panel {
    position: static;
  }

  .staff-danger-zone {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 680px) {
  .case-detail__header,
  .staff-case-detail__header,
  .asser-ai-staff__header,
  .case-panel--report {
    align-items: flex-start;
    flex-direction: column;
  }

  .case-detail__grid,
  .asser-ai-staff__stats,
  .staff-filters,
  .staff-client-profile dl,
  .case-diagnostics__grid,
  .case-diagnostics__message dl {
    grid-template-columns: 1fr;
  }

  .staff-header-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .staff-header-actions > * {
    justify-content: center;
    width: 100%;
  }

  .case-diagnostics__history li {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }

  .case-document-list li {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .case-document-list__actions {
    grid-column: 2;
    justify-self: start;
  }

  .case-processing-list li {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .case-processing-list__state {
    grid-column: 2;
    justify-self: start;
  }

  .case-processing-list li:has(.case-document-delete) {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .case-processing-list .case-document-delete {
    grid-column: 2;
  }

  .case-unreadable-list li {
    grid-template-columns: 1fr;
  }

  .case-unreadable-list form {
    align-items: stretch;
    flex-direction: column;
  }

  .case-unreadable-list input[type="file"],
  .case-unreadable-list .portal-button,
  .staff-danger-zone form,
  .staff-danger-zone .asser-ai-button,
  .staff-bulk-bar .asser-ai-button {
    width: 100%;
  }

  .staff-bulk-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .staff-bulk-bar .asser-ai-button {
    margin-left: 0;
  }

  .staff-case-card {
    grid-template-columns: 1fr;
  }

  .staff-case-card__meta,
  .staff-case-card .case-status {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }

  .staff-case-card .asser-ai-button {
    width: 100%;
  }
}

/* Keep the redesigned navigation after the legacy responsive rules. */
@media (max-width: 1280px) and (min-width: 921px) {
  .portal-nav__inner {
    width: min(1240px, calc(100% - 1.25rem));
    gap: 0.8rem;
  }

  .portal-nav__links,
  .portal-nav__actions {
    gap: 0.75rem;
    font-size: 0.72rem;
  }

  .patent-badge--nav .patent-badge__copy {
    display: none;
  }

  .patent-badge--nav {
    padding-right: 0.3rem;
  }
}

@media (max-width: 920px) {
  .portal-nav {
    position: sticky;
    box-shadow: 0 10px 30px rgba(44, 31, 41, 0.05);
  }

  .portal-nav__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.7rem;
    min-height: 70px;
    padding: 0.65rem 0;
  }

  .portal-nav__toggle {
    display: grid;
  }

  .portal-nav__drawer {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
    padding: 0.5rem 0 0.4rem;
    border-top: 1px solid rgba(75, 35, 56, 0.09);
  }

  .portal-nav--open .portal-nav__drawer {
    display: grid;
    gap: 0.9rem;
    animation: nav-drawer-in 180ms ease-out both;
  }

  .portal-nav__links {
    display: grid;
    grid-column: auto;
    grid-row: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    gap: 0.4rem;
    width: 100%;
    padding: 0;
    overflow: visible;
  }

  .portal-nav__links > a,
  .portal-nav__dropdown > a {
    display: flex;
    min-height: 44px;
    align-items: center;
    padding: 0.7rem 0.8rem;
    border: 1px solid rgba(75, 35, 56, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.74);
    white-space: normal;
  }

  .portal-nav__dropdown {
    padding: 0;
  }

  .portal-nav__dropdown-menu {
    display: none !important;
  }

  .portal-nav__actions {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    justify-content: stretch;
    gap: 0.55rem;
    width: 100%;
  }

  .portal-nav__actions > a:not(.portal-button) {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.7rem;
    border: 1px solid rgba(75, 35, 56, 0.11);
    border-radius: 8px;
    background: #fff;
  }

  .patent-badge--nav {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 560px) {
  .portal-nav__actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-nav__actions .portal-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .portal-chat__launcher {
    width: auto;
    min-width: 92px;
    min-height: 52px;
    padding: 5px 10px 5px 5px;
  }

  .portal-chat__launcher .portal-chat__launcher-logo {
    width: 40px;
    height: 40px;
  }

  .portal-chat__launcher .portal-chat__launcher-copy {
    display: flex;
  }

  .portal-chat__launcher-copy strong {
    display: none;
  }
}

/* Authenticated chat and employee conversation history */
.portal-chat__messages--locked {
  height: auto;
  min-height: 230px;
  justify-content: center;
  background: #fbf8f5;
}

.portal-chat__auth {
  display: grid;
  gap: 0.7rem;
  padding: 1rem;
  border: 1px solid rgba(75, 35, 56, 0.12);
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.portal-chat__auth strong {
  color: var(--asser-secondary);
  font-size: 0.86rem;
}

.portal-chat__auth p {
  margin: 0;
  color: var(--asser-muted);
  font-size: 0.72rem;
  line-height: 1.55;
}

.portal-chat__auth > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.portal-chat__auth a {
  display: grid;
  min-height: 40px;
  place-items: center;
  border: 1px solid var(--asser-primary);
  border-radius: 6px;
  color: var(--asser-primary);
  font-size: 0.72rem;
  font-weight: 800;
  text-decoration: none;
}

.portal-chat__auth a:first-child {
  background: var(--asser-primary);
  color: #fff;
}

.asser-ai-staff__stats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.staff-chat-history {
  margin-top: 1rem;
  padding: 1.15rem;
  border: 1px solid rgba(75, 35, 56, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
}

.staff-chat-history__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.staff-chat-history__heading h2 {
  margin: 0.2rem 0 0;
  color: var(--asser-text);
  font-size: 1.05rem;
  letter-spacing: 0;
}

.staff-chat-history__heading > span {
  color: var(--asser-muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.staff-chat-history__empty {
  margin: 0;
  padding: 1rem;
  border: 1px dashed rgba(75, 35, 56, 0.2);
  border-radius: 18px;
  color: var(--asser-muted);
  font-size: 0.8rem;
  text-align: center;
}

.staff-chat-history__list {
  display: grid;
  gap: 0.55rem;
}

.staff-chat-row {
  overflow: hidden;
  border: 1px solid rgba(75, 35, 56, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
}

.staff-chat-row summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  min-height: 68px;
  padding: 0.8rem 0.9rem;
  list-style: none;
  cursor: pointer;
}

.staff-chat-row summary::-webkit-details-marker {
  display: none;
}

.staff-chat-row__main,
.staff-chat-row__meta {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.staff-chat-row__main b {
  overflow: hidden;
  color: var(--asser-text);
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-chat-row__main strong {
  color: var(--asser-secondary);
  font-size: 0.76rem;
}

.staff-chat-row__main small,
.staff-chat-row__meta small {
  color: var(--asser-muted);
  font-size: 0.68rem;
}

.staff-chat-row__meta {
  justify-items: end;
}

.staff-chat-status {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--asser-alt-bg);
  color: var(--asser-primary);
  font-size: 0.65rem;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.staff-chat-status--success {
  background: #e4f1ed;
  color: #245a50;
}

.staff-chat-status--failed {
  background: #fae9ec;
  color: #963747;
}

.staff-chat-row__content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 0 0.9rem 0.9rem;
}

.staff-chat-row__content > div {
  padding: 0.8rem;
  border-left: 3px solid rgba(125, 68, 94, 0.35);
  background: var(--asser-sand);
}

.staff-chat-row__content strong {
  color: var(--asser-secondary);
  font-size: 0.7rem;
}

.staff-chat-row__content p {
  margin: 0.35rem 0 0;
  color: var(--asser-text);
  font-size: 0.76rem;
  line-height: 1.58;
  overflow-wrap: anywhere;
}

.staff-chat-row__content footer {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 0.75rem;
  color: var(--asser-muted);
  font-size: 0.68rem;
}

@media (max-width: 1100px) {
  .asser-ai-staff__stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .asser-ai-staff__stats,
  .staff-chat-row__content {
    grid-template-columns: 1fr;
  }

  .staff-chat-row summary {
    grid-template-columns: 1fr;
  }

  .staff-chat-row__meta {
    justify-items: start;
  }
}

/* Passaggio 4 di 5 — registrazione audio libera e guidata a domande. */

.audio-recorder {
  margin-top: 1.5rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid rgba(75, 35, 56, 0.11);
  border-radius: 20px;
  background: #fff;
}

.audio-recorder__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.audio-recorder__status {
  margin-top: 0.6rem;
  color: var(--asser-muted);
  font-size: 0.82rem;
  min-height: 1.2em;
}

.audio-talking-points-intro {
  margin-top: 1.1rem;
  font-weight: 600;
  color: var(--asser-secondary);
}

.audio-talking-points {
  margin: 0.5rem 0 0;
  padding-left: 1.3rem;
  color: var(--asser-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.audio-talking-points li {
  margin-bottom: 0.3rem;
}

.audio-splash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.audio-step-body {
  margin-top: 1rem;
}

.audio-confirmation {
  margin-top: 1.5rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid rgba(40, 77, 71, 0.2);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(237, 244, 242, 0.96), rgba(255, 255, 255, 0.9));
}

.summary-confirmation-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 1rem 0;
}

.summary-confirmation-row {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid rgba(75, 35, 56, 0.11);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
}

.summary-confirmation-row input[type="checkbox"] {
  margin-top: 0.25rem;
  flex-shrink: 0;
}

.summary-confirmation-row strong {
  display: block;
  color: var(--asser-secondary);
  font-size: 0.92rem;
}

.summary-confirmation-row small {
  display: block;
  color: var(--asser-muted);
  font-size: 0.82rem;
  margin-top: 0.2rem;
}

.generated-questions-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin: 1rem 0;
}

.generated-question-row {
  padding: 0.8rem 1rem;
  border: 1px solid rgba(75, 35, 56, 0.11);
  border-radius: 14px;
  background: #fff;
}

.generated-question-text {
  margin: 0 0 0.6rem;
  color: var(--asser-secondary);
  font-size: 0.92rem;
  font-weight: 600;
}

.generated-question-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.generated-question-selected {
  display: block;
  margin-top: 0.5rem;
  color: var(--asser-muted);
  font-size: 0.8rem;
}

.audio-step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.8rem;
}

/* Dialogo adattivo a più turni (INTERACTIVE_DIALOGUE_V1). */

.dialogue-messages {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 1.2rem 0;
  max-height: 26rem;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.dialogue-message {
  display: flex;
  max-width: 85%;
}

.dialogue-message p {
  margin: 0;
  padding: 0.65rem 0.9rem;
  border-radius: 16px;
  font-size: 0.92rem;
  line-height: 1.5;
}

.dialogue-message--system {
  align-self: flex-start;
}

.dialogue-message--system p {
  background: var(--asser-ice);
  color: var(--asser-secondary);
  border-bottom-left-radius: 4px;
}

.dialogue-message--user {
  align-self: flex-end;
}

.dialogue-message--user p {
  background: var(--asser-primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.dialogue-answer-area {
  margin-top: 0.4rem;
}

.dialogue-mode-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.dialogue-input-slot {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.dialogue-text-input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--asser-border);
  border-radius: 14px;
  font: inherit;
  color: var(--asser-text);
  resize: vertical;
  box-sizing: border-box;
}

.dialogue-text-input:focus {
  outline: 2px solid var(--asser-accent);
  outline-offset: 1px;
}

.wizard-resumed-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
  padding: 0.85rem 1.1rem;
  border-left: 4px solid var(--asser-accent);
  border-radius: 4px;
  background: var(--asser-alt-bg);
  color: var(--asser-secondary);
  font-size: 0.84rem;
  line-height: 1.5;
}

.wizard-resumed-banner span {
  flex: 1 1 16rem;
}

/* Integrazioni consigliate: voci dettagliate (nome, motivo, dove trovarlo) */
.case-missing-list--detailed li {
  display: grid;
  gap: 0.3rem;
  padding-left: 1rem;
}

.case-missing-list--detailed li strong {
  font-size: 0.9rem;
  line-height: 1.35;
}

.case-missing-list--detailed li small {
  color: var(--asser-muted, #5b5560);
  font-size: 0.78rem;
  line-height: 1.45;
}

.case-missing-badge {
  justify-self: start;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: #f6ecd6;
  color: #7a4f10;
  font-size: 0.7rem;
  font-weight: 700;
}

.case-missing-badge--recommended {
  background: #e8f1ec;
  color: #2f6247;
}

.case-missing-badge--replacement_required,
.case-missing-badge--unreadable {
  background: #f8e4e6;
  color: #8d2c3a;
}

.case-missing-link {
  justify-self: start;
  color: var(--asser-primary, #6a1f45);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: underline;
}

.case-missing-note {
  margin: 0.9rem 0 0;
  color: var(--asser-muted, #5b5560);
  font-size: 0.78rem;
  line-height: 1.5;
}

/* ---------- Crediti: portafoglio, negozio, pannello staff ---------- */
.wallet-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1.05rem;
  border: 1px solid rgba(75, 35, 56, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 1px 2px rgba(75, 35, 56, 0.06);
  color: var(--asser-secondary);
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  backdrop-filter: blur(10px);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.wallet-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(75, 35, 56, 0.12);
}

.wallet-chip .wallet-icon {
  color: var(--asser-primary);
}

.wallet-chip:hover,
.wallet-chip:focus-visible {
  border-color: var(--asser-accent);
  color: var(--asser-primary);
}

.wallet-chip__balance {
  font-size: 1rem;
}

.wallet-chip__label {
  color: var(--asser-muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.staff-credit-ledger {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.staff-credit-ledger th,
.staff-credit-ledger td {
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--asser-border);
  text-align: left;
}

.staff-credit-panel {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--asser-border);
}

.staff-credit-panel h4 {
  margin: 0;
}

.staff-credit-lots {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.88rem;
}

.staff-credit-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.6rem;
  align-items: end;
}

.staff-credit-settings {
  margin-top: 0.8rem;
}


/* ---------- Crediti: conferma del costo prima dell'analisi ---------- */
.credit-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(30, 20, 26, 0.38);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
}

.credit-modal__dialog {
  width: min(100%, 400px);
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding: 2rem 1.75rem 1.5rem;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(20, 10, 16, 0.28);
  text-align: center;
}

.credit-modal__dialog h2 {
  margin: 0 0 0.35rem;
  color: var(--asser-deep);
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.credit-modal__lead {
  margin: 0 auto 1.4rem;
  max-width: 30ch;
  color: var(--asser-muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.credit-modal__price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.4rem;
  margin: 0;
  color: var(--asser-deep);
}

.credit-modal__amount {
  font-size: 3.4rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
}

.credit-modal__unit {
  color: var(--asser-muted);
  font-size: 1rem;
  font-weight: 500;
}

.credit-modal__price-note {
  margin: 0.5rem 0 0;
  color: var(--asser-forest);
  font-size: 0.82rem;
  font-weight: 500;
}

.credit-modal__section {
  margin: 1.6rem 0 0.2rem;
  color: var(--asser-muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
}

.credit-modal__rows {
  display: grid;
  grid-template-columns: 1fr auto;
  margin: 0;
  padding: 0;
  text-align: left;
}

.credit-modal__rows--details {
  margin-top: 0.9rem;
}

.credit-modal__rows dt,
.credit-modal__rows dd {
  margin: 0;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  font-size: 0.92rem;
}

.credit-modal__rows dt {
  color: var(--asser-muted);
}

.credit-modal__rows dd {
  color: var(--asser-deep);
  font-weight: 600;
  text-align: right;
}

.credit-modal__actions {
  display: grid;
  gap: 0.5rem;
  margin-top: 1.6rem;
}

.credit-modal__actions .portal-button {
  justify-content: center;
  width: 100%;
  text-align: center;
  box-shadow: none;
}

.credit-modal__actions .portal-button--secondary {
  border-color: transparent;
  background: transparent;
  color: var(--asser-primary) !important;
}

.credit-estimate-note {
  margin: 0.6rem 0 0;
  color: var(--asser-secondary);
  font-size: 0.9rem;
  font-weight: 700;
}

.credit-estimate-note:empty {
  display: none;
}


/* ---------- Il tuo piano e crediti (stile Apple) ---------- */
.pw {
  display: grid;
  gap: 2.2rem;
  color: var(--asser-text);
}

.pw-note {
  margin: 0;
  color: var(--asser-muted);
  font-size: 0.9rem;
}

.pw-note a,
.pw-footer a {
  color: var(--asser-primary);
}

.pw-top {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 1.2rem;
}

.pw-card {
  padding: 1.9rem;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(40, 18, 30, 0.04), 0 18px 48px rgba(40, 18, 30, 0.07);
}

.pw-kicker {
  margin: 0 0 0.5rem;
  color: var(--asser-accent);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pw-kicker--light {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}

.pw-plan-name {
  margin: 0;
  color: var(--asser-secondary);
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.pw-plan-desc {
  margin: 0.5rem 0 0;
  color: var(--asser-muted);
  font-size: 1rem;
}

.pw-facts {
  display: grid;
  gap: 0.5rem;
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
}

.pw-facts li {
  position: relative;
  padding: 0.7rem 1rem 0.7rem 2.6rem;
  border-radius: 14px;
  background: rgba(125, 68, 94, 0.06);
  font-size: 0.93rem;
  font-weight: 600;
}

.pw-facts li::before {
  content: '';
  position: absolute;
  left: 1rem;
  top: 50%;
  width: 0.9rem;
  height: 0.9rem;
  margin-top: -0.45rem;
  border-radius: 50%;
  background: var(--asser-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.4l2.6 2.6L12 5.6' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}

.pw-wallet-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: linear-gradient(150deg, #7d445e 0%, #4b2338 100%);
  box-shadow: 0 24px 56px rgba(75, 35, 56, 0.32);
  color: #fff;
  scroll-margin-top: 1rem;
}

.pw-wallet-card__head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: rgba(255, 255, 255, 0.85);
}

.pw-wallet-card__balance {
  margin: 0.3rem 0 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.78);
}

.pw-wallet-card__balance span {
  color: #fff;
  font-size: clamp(3rem, 7vw, 4.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.pw-wallet-card__warning {
  align-self: flex-start;
  margin: 0;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 214, 153, 0.2);
  color: #ffd699;
  font-size: 0.8rem;
  font-weight: 700;
}

.pw-wallet-card__empty,
.pw-wallet-card__hint {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.84rem;
  line-height: 1.5;
}

.pw-wallet-card__hint {
  margin-top: auto;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.pw-lots {
  display: grid;
  gap: 0.8rem;
  margin: 0.6rem 0 0.4rem;
  padding: 0;
  list-style: none;
}

.pw-lots__row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 700;
}

.pw-lots__bar {
  height: 6px;
  margin: 0.35rem 0 0.25rem;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.pw-lots__bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: #fff;
}

.pw-lots small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.76rem;
}

.pw-section {
  display: grid;
  gap: 0.4rem;
}

.pw-section__title {
  margin: 0;
  color: var(--asser-secondary);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  letter-spacing: -0.02em;
}

.pw-section__lead {
  margin: 0 0 0.8rem;
  color: var(--asser-muted);
  font-size: 0.98rem;
}

.pw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
}

.pw-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.6rem;
  border: 1px solid rgba(75, 35, 56, 0.08);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(40, 18, 30, 0.04);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.pw-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(40, 18, 30, 0.1);
}

.pw-tile--featured {
  border-color: rgba(180, 95, 134, 0.45);
  box-shadow: 0 12px 34px rgba(125, 68, 94, 0.14);
}

.pw-tile--current {
  border-color: var(--asser-primary);
  box-shadow: 0 0 0 1px var(--asser-primary), 0 12px 34px rgba(125, 68, 94, 0.14);
}

.pw-badge {
  align-self: flex-start;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  background: rgba(125, 68, 94, 0.1);
  color: var(--asser-primary);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pw-badge--accent {
  background: var(--asser-primary);
  color: #fff;
}

.pw-tile__name {
  margin: 0.2rem 0 0;
  color: var(--asser-secondary);
  font-size: 1.35rem;
  letter-spacing: -0.015em;
}

.pw-tile__desc {
  flex: 1;
  margin: 0;
  color: var(--asser-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.pw-tile__price {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin: 0.6rem 0 0;
}

.pw-tile__price strong {
  color: var(--asser-text);
  font-size: 1.9rem;
  letter-spacing: -0.02em;
}

.pw-tile__price span {
  color: var(--asser-muted);
  font-size: 0.85rem;
}

.pw-tile__gift {
  margin: 0;
  color: var(--asser-primary);
  font-size: 0.82rem;
  font-weight: 700;
}

.pw-button {
  margin-top: 0.6rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--asser-primary);
  border-radius: 999px;
  background: var(--asser-primary);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.pw-button:hover:not(:disabled) {
  background: var(--asser-secondary);
  border-color: var(--asser-secondary);
}

.pw-button--ghost {
  background: transparent;
  color: var(--asser-primary);
}

.pw-button--ghost:hover:not(:disabled) {
  background: var(--asser-primary);
  border-color: var(--asser-primary);
  color: #fff;
}

.pw-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pw-history {
  margin: 0;
  padding: 0.4rem 1.4rem;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(40, 18, 30, 0.04), 0 12px 32px rgba(40, 18, 30, 0.05);
  list-style: none;
}

.pw-history li {
  display: grid;
  grid-template-columns: 1fr auto 4.5rem 4.5rem;
  gap: 0.8rem;
  align-items: baseline;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(75, 35, 56, 0.08);
  font-size: 0.9rem;
}

.pw-history li:last-child {
  border-bottom: 0;
}

.pw-history__what {
  font-weight: 700;
}

.pw-history__date,
.pw-history__balance {
  color: var(--asser-muted);
}

.pw-history__delta,
.pw-history__balance {
  text-align: right;
}

.pw-history__delta {
  font-weight: 800;
}

.pw-history .is-plus {
  color: #1e7a3c;
}

.pw-history .is-minus {
  color: #a3312f;
}

.pw-footer {
  display: grid;
  gap: 0.5rem;
  color: var(--asser-muted);
  font-size: 0.88rem;
}

.pw-footer p,
.pw-footer__row {
  margin: 0;
}

.pw-footer__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.pw-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--asser-primary);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

@media (max-width: 860px) {
  .pw-top {
    grid-template-columns: 1fr;
  }

  .pw-card {
    padding: 1.4rem;
    border-radius: 24px;
  }

  .pw-history li {
    grid-template-columns: 1fr auto 3.5rem;
  }

  .pw-history__balance {
    display: none;
  }
}

/* ---------- Shop (stile Apple) ---------- */
.shop {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5rem) 0 5rem;
}

.shop-hero {
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
}

.shop-hero .portal-title {
  font-size: clamp(2.2rem, 5.4vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.shop-hero .portal-lead {
  margin-left: auto;
  margin-right: auto;
}

.shop-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem 1.6rem;
  margin-top: 1.8rem;
}

.shop-hero__link {
  color: var(--asser-primary);
  font-weight: 700;
  text-decoration: none;
}

.shop-hero__link:hover {
  text-decoration: underline;
}

a.pw-button {
  display: inline-block;
  text-align: center;
  text-decoration: none;
}

.shop-hero__cta {
  margin-top: 0;
  padding: 0.9rem 1.8rem;
}

.pw-grid--duo {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.pw-grid--single {
  grid-template-columns: minmax(0, 420px);
}

.pw-tile__credits {
  margin: 0.2rem 0 0;
  color: var(--asser-primary);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.pw-tile__per {
  margin: -0.1rem 0 0.2rem;
  color: var(--asser-muted);
  font-size: 0.82rem;
}

.pw-tile__features {
  display: grid;
  gap: 0.45rem;
  margin: 0.6rem 0 0.4rem;
  padding: 0.9rem 0 0;
  border-top: 1px solid rgba(75, 35, 56, 0.08);
  list-style: none;
}

.pw-tile__features li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--asser-text);
  font-size: 0.88rem;
  line-height: 1.4;
}

.pw-tile__features li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.32rem;
  width: 0.5rem;
  height: 0.28rem;
  border-left: 2px solid var(--asser-accent);
  border-bottom: 2px solid var(--asser-accent);
  transform: rotate(-45deg);
}

.shop-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
}

.shop-steps li {
  padding: 1.5rem;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(75, 35, 56, 0.08);
}

.shop-steps__n {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.8rem;
  border-radius: 50%;
  background: var(--asser-primary);
  color: #fff;
  font-weight: 800;
}

.shop-steps strong {
  display: block;
  color: var(--asser-secondary);
  font-size: 1.05rem;
}

.shop-steps p {
  margin: 0.4rem 0 0;
  color: var(--asser-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.shop-faq {
  margin-top: 0.8rem;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(75, 35, 56, 0.08);
}

.shop-faq details {
  padding: 0 1.4rem;
  border-bottom: 1px solid rgba(75, 35, 56, 0.08);
}

.shop-faq details:last-child {
  border-bottom: 0;
}

.shop-faq summary {
  padding: 1.1rem 0;
  color: var(--asser-secondary);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.shop-faq summary::-webkit-details-marker {
  display: none;
}

.shop-faq summary::after {
  content: "+";
  float: right;
  color: var(--asser-primary);
  font-size: 1.3rem;
  line-height: 1;
}

.shop-faq details[open] summary::after {
  content: "\2212";
}

.shop-faq details p {
  margin: 0 0 1.1rem;
  color: var(--asser-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.shop .pw {
  gap: 3rem;
}

@media (max-width: 860px) {
  .pw-grid--single {
    grid-template-columns: 1fr;
  }
}

/* ---------- Barra di navigazione in stile Apple ---------- */
.portal-nav {
  min-height: 56px;
  border-bottom: 1px solid rgba(29, 29, 31, 0.08);
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  backdrop-filter: saturate(180%) blur(22px);
}

.portal-nav__inner {
  min-height: 56px;
}

.portal-nav__links a,
.portal-nav__actions > a:not(.portal-button) {
  white-space: nowrap;
}

.portal-nav__chevron {
  display: inline-block;
  width: 0.38em;
  height: 0.38em;
  margin: 0 0 0.18em 0.45em;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  opacity: 0.55;
  transform: rotate(45deg);
}

@media (min-width: 921px) {
  .portal-nav__inner,
  .portal-home-v3 .portal-nav__inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: clamp(0.75rem, 2vw, 2rem);
    width: min(1240px, calc(100% - 2.5rem));
    min-height: 56px;
  }

  .portal-nav .portal-nav__links,
  .portal-nav .portal-nav__actions,
  .portal-home-v3 .portal-nav__links,
  .portal-home-v3 .portal-nav__actions {
    gap: clamp(0.9rem, 1.7vw, 1.7rem);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: -0.01em;
  }

  .portal-nav .portal-nav__links a,
  .portal-nav .portal-nav__actions > a:not(.portal-button) {
    color: rgba(29, 29, 31, 0.8);
    transition: color 0.2s ease;
  }

  .portal-nav .portal-nav__links a:hover,
  .portal-nav .portal-nav__actions > a:not(.portal-button):hover {
    color: #1d1d1f;
  }

  .portal-nav__dropdown {
    padding-block: 1rem;
  }

  .portal-nav__dropdown-menu {
    top: calc(100% - 0.4rem);
    width: 250px;
    padding: 0.5rem;
    border: 1px solid rgba(29, 29, 31, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.86);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    backdrop-filter: saturate(180%) blur(24px);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.12);
  }

  .portal-nav__dropdown-menu a {
    padding: 0.6rem 0.8rem;
    border-radius: 10px;
    font-size: 13px;
  }

  .portal-nav__dropdown-menu a:hover {
    background: rgba(125, 68, 94, 0.08);
    color: var(--asser-primary);
  }

  .portal-nav .portal-button--nav {
    min-height: 30px;
    padding: 0.35rem 0.95rem;
    border-radius: 980px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0;
  }
}

@media (min-width: 921px) and (max-width: 1280px) {
  .portal-nav__secondary {
    display: none;
  }

  .portal-nav .portal-nav__links,
  .portal-nav .portal-nav__actions,
  .portal-home-v3 .portal-nav__links,
  .portal-home-v3 .portal-nav__actions {
    gap: clamp(0.7rem, 1.3vw, 1.1rem);
    font-size: 12.5px;
  }
}

@media (min-width: 921px) and (max-width: 1060px) {
  .portal-nav__actions > a:not(.portal-button):not(.portal-nav__login) {
    display: none;
  }
}

/* ---------- Area clienti in stile Apple (stessa struttura, solo grafica) ---------- */
.dashboard-page {
  width: min(1120px, calc(100% - 2.5rem));
  padding: clamp(2rem, 5vw, 3.5rem) 0 5rem;
}

.customer-dashboard {
  gap: 1.6rem;
}

.dashboard-page .dashboard-hero,
.customer-dashboard .dashboard-hero {
  align-items: center;
  gap: 1.5rem 2rem;
  padding: clamp(1.5rem, 3.5vw, 2.4rem);
  border: 1px solid rgba(29, 29, 31, 0.06);
  border-radius: 28px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(201, 143, 170, 0.16), transparent 55%),
    linear-gradient(180deg, #ffffff, #fcfaf9);
  box-shadow: 0 1px 2px rgba(29, 29, 31, 0.04), 0 18px 48px rgba(29, 29, 31, 0.06);
}

.dashboard-hero__identity {
  align-items: center;
  gap: 1.3rem;
}

.dashboard-hero__avatar-photo,
.dashboard-hero__avatar-initials {
  width: 72px;
  height: 72px;
  border: 0;
  box-shadow: 0 0 0 1px rgba(29, 29, 31, 0.06), 0 8px 22px rgba(29, 29, 31, 0.14);
}

.dashboard-hero .portal-kicker {
  margin-bottom: 0.35rem;
  color: var(--asser-muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.dashboard-hero .portal-title {
  margin: 0;
  color: #1d1d1f;
  font-size: clamp(1.8rem, 3.6vw, 2.7rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.06;
}

.dashboard-hero .portal-lead {
  max-width: 34rem;
  margin: 0.6rem 0 0;
  color: #6e6e73;
  font-size: 1rem;
  line-height: 1.5;
}

.dashboard-hero__profile-edit summary {
  color: var(--asser-primary);
  font-size: 0.8rem;
  font-weight: 500;
}

.dashboard-hero__actions {
  align-items: center;
  gap: 0.6rem;
}

.dashboard-page .portal-button {
  min-height: 40px;
  padding: 0.6rem 1.25rem;
  background: var(--asser-primary);
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: none;
}

.dashboard-page .portal-button:hover {
  background: var(--asser-secondary);
  transform: none;
  box-shadow: 0 6px 18px rgba(75, 35, 56, 0.22);
}

.dashboard-page .portal-button--secondary {
  border-color: rgba(29, 29, 31, 0.1);
  background: rgba(29, 29, 31, 0.05);
  color: #1d1d1f !important;
}

.dashboard-page .portal-button--secondary:hover {
  background: rgba(29, 29, 31, 0.09);
  box-shadow: none;
}

.dashboard-page .wallet-chip {
  padding: 0.62rem 1rem;
  border: 1px solid rgba(29, 29, 31, 0.08);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: none;
  font-weight: 600;
}

/* Navigazione a schede: controllo segmentato */
.dashboard-view-nav {
  align-items: center;
  gap: 0.15rem;
  margin: 0;
  padding: 0.28rem;
  border-radius: 999px;
  background: rgba(29, 29, 31, 0.06);
}

.dashboard-view-nav a {
  padding: 0.5rem 1.05rem;
  border: 0;
  background: transparent;
  color: #424245;
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-view-nav a:hover {
  color: #1d1d1f;
  background: rgba(255, 255, 255, 0.55);
}

.dashboard-view-nav a.is-active {
  background: #fff;
  color: #1d1d1f;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(29, 29, 31, 0.1), 0 3px 10px rgba(29, 29, 31, 0.08);
}

.dashboard-view-nav__spacer {
  min-width: 0.4rem;
}

@media (max-width: 760px) {
  .dashboard-view-nav {
    flex-wrap: nowrap;
    margin-right: -1.25rem;
    padding-right: 1.25rem;
    border-radius: 18px 0 0 18px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .dashboard-view-nav::-webkit-scrollbar {
    display: none;
  }

  .dashboard-view-nav__spacer {
    flex: 0 0 0.4rem;
    height: auto;
  }
}

/* Schede numeriche e grafico */
.dashboard-stats > div,
.professional-dashboard__stat,
.professional-dashboard__chart-card,
.case-filter-bar,
.case-list-empty {
  border: 1px solid rgba(29, 29, 31, 0.06);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(29, 29, 31, 0.04), 0 10px 30px rgba(29, 29, 31, 0.04);
}

.dashboard-stats {
  gap: 0.9rem;
  margin-top: 0;
}

.dashboard-stats > div,
.professional-dashboard__stat {
  align-content: space-between;
  gap: 0.6rem;
  min-height: 104px;
  padding: 1.1rem 1.25rem;
}

.dashboard-stats strong,
.professional-dashboard__stat strong {
  order: -1;
  color: #1d1d1f;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}

.dashboard-stats span,
.professional-dashboard__stat span {
  color: #6e6e73;
  font-size: 0.78rem;
  line-height: 1.35;
}

.professional-dashboard {
  gap: 0.9rem;
  margin-top: 0;
}

.professional-dashboard__grid,
.professional-dashboard__stats {
  gap: 0.9rem;
}

.professional-dashboard__chart-card {
  padding: 1.4rem 1.5rem;
}

.professional-dashboard__chart-card .portal-kicker {
  color: #6e6e73;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.professional-dashboard__chart-card h2 {
  color: #1d1d1f;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.professional-dashboard__legend {
  gap: 0.6rem;
  color: #424245;
}

.professional-dashboard__stat--warn {
  border-color: rgba(141, 89, 21, 0.18);
  background: linear-gradient(180deg, #fffaf0, #fff6e6);
}

.professional-dashboard__note {
  border: 0;
  border-radius: 16px;
  background: rgba(29, 29, 31, 0.04);
  color: #6e6e73;
}

/* Elenco pratiche e dettaglio */
.case-filter-bar {
  margin-top: 1rem;
  padding: 0.8rem 1rem;
}

.case-list {
  gap: 0.7rem;
}

.case-list-link {
  min-height: 78px;
  padding: 1rem 1.35rem;
  border: 1px solid rgba(29, 29, 31, 0.06);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(29, 29, 31, 0.04), 0 10px 30px rgba(29, 29, 31, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.case-list-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 1px 2px rgba(29, 29, 31, 0.05), 0 18px 40px rgba(29, 29, 31, 0.09);
}

.case-list-link--active {
  border-color: rgba(125, 68, 94, 0.45);
  box-shadow: 0 0 0 3px rgba(125, 68, 94, 0.1), 0 10px 30px rgba(29, 29, 31, 0.05);
}

.case-detail {
  border: 1px solid rgba(29, 29, 31, 0.06);
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(29, 29, 31, 0.04), 0 18px 48px rgba(29, 29, 31, 0.06);
}

@media (max-width: 760px) {
  .dashboard-page .dashboard-hero {
    grid-template-columns: 1fr;
  }

  .dashboard-hero__actions {
    flex-wrap: wrap;
  }
}

/* ---------- Area clienti "live": animazioni, stati vivi, scheletri ---------- */
.live-region {
  display: contents;
}

@keyframes liveRise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@keyframes liveShimmer {
  0% { background-position: -240px 0; }
  100% { background-position: calc(240px + 100%) 0; }
}

@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 currentColor; opacity: 1; }
  70% { box-shadow: 0 0 0 6px transparent; opacity: 0.55; }
  100% { box-shadow: 0 0 0 0 transparent; opacity: 1; }
}

.live-enter > * {
  animation: liveRise 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}

.live-enter > *:nth-child(2) { animation-delay: 0.04s; }
.live-enter > *:nth-child(3) { animation-delay: 0.08s; }
.live-enter > *:nth-child(4) { animation-delay: 0.12s; }
.live-enter > *:nth-child(5) { animation-delay: 0.16s; }
.live-enter > *:nth-child(n+6) { animation-delay: 0.2s; }

.live-enter .case-list-link {
  animation: liveRise 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}

.live-enter .case-list-link:nth-child(1) { animation-delay: 0.10s; }
.live-enter .case-list-link:nth-child(2) { animation-delay: 0.14s; }
.live-enter .case-list-link:nth-child(3) { animation-delay: 0.18s; }
.live-enter .case-list-link:nth-child(4) { animation-delay: 0.22s; }
.live-enter .case-list-link:nth-child(5) { animation-delay: 0.26s; }
.live-enter .case-list-link:nth-child(n+6) { animation-delay: 0.3s; }

.live-enter.live-region > * {
  animation: liveRise 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}

[data-live-root].is-swapping {
  opacity: 0.55;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.case-list-link[hidden] {
  display: none;
}

.case-list-link {
  position: relative;
  overflow: hidden;
}

.case-list-link b {
  transition: transform 0.2s ease;
}

.case-list-link:hover b {
  transform: translateX(4px);
}

.case-list-link:active {
  transform: scale(0.992);
}

.case-list-link em.case-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.8rem;
  font-size: 0.72rem;
  white-space: nowrap;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.case-chip__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.case-chip--working { background: rgba(125, 68, 94, 0.1); color: var(--asser-primary); }
.case-chip--working .case-chip__dot { animation: livePulse 1.6s ease-out infinite; }
.case-chip--done { background: rgba(31, 138, 76, 0.12); color: #1a7a43; }
.case-chip--review { background: rgba(214, 124, 15, 0.14); color: #a05a00; }
.case-chip--cancelled,
.case-chip--draft { background: rgba(29, 29, 31, 0.06); color: #6e6e73; }

.case-list-link .case-list-link__progress {
  display: block;
  grid-column: 1 / -1;
  height: 4px;
  margin-top: 0.15rem;
  border-radius: 999px;
  background: rgba(29, 29, 31, 0.07);
  overflow: hidden;
}

.case-list-link__progress u {
  display: block;
  height: 100%;
  min-width: 6%;
  border-radius: inherit;
  text-decoration: none;
  background: linear-gradient(90deg, var(--asser-primary), #c28aa4, var(--asser-primary));
  background-size: 240px 100%;
  animation: liveShimmer 1.6s linear infinite;
  transition: width 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.case-detail--loading .skeleton-lines {
  display: grid;
  gap: 0.8rem;
  padding: 1.2rem 0 0.4rem;
}

.case-detail--loading .skeleton-lines i {
  display: block;
  height: 16px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(29, 29, 31, 0.06) 25%, rgba(29, 29, 31, 0.12) 37%, rgba(29, 29, 31, 0.06) 63%);
  background-size: 240px 100%;
  animation: liveShimmer 1.4s linear infinite;
}

.case-detail--loading .skeleton-lines i:nth-child(1) { width: 82%; }
.case-detail--loading .skeleton-lines i:nth-child(2) { width: 64%; }
.case-detail--loading .skeleton-lines i:nth-child(3) { width: 90%; height: 44px; border-radius: 14px; }
.case-detail--loading .skeleton-lines i:nth-child(4) { width: 48%; }

.live-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 9999;
  max-width: min(92vw, 420px);
  padding: 0.85rem 1.3rem;
  border-radius: 999px;
  background: rgba(29, 29, 31, 0.92);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.25);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transform: translate(-50%, 24px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.35s ease;
}

.live-toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .live-enter > *,
  .live-enter .case-list-link,
  .case-chip--working .case-chip__dot,
  .case-list-link__progress u,
  .case-detail--loading .skeleton-lines i {
    animation: none;
  }
  .live-toast,
  [data-live-root].is-swapping {
    transition: none;
  }
}

/* ---------- Dettaglio pratica: box a comparsa ---------- */
@keyframes liveModalFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes liveModalFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes liveModalPop {
  from { opacity: 0; transform: translateY(28px) scale(0.94); }
  to { opacity: 1; transform: none; }
}

@keyframes liveModalPopOut {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateY(16px) scale(0.96); }
}

@keyframes liveSheetIn {
  from { transform: translateY(100%); }
  to { transform: none; }
}

@keyframes liveSheetOut {
  from { transform: none; }
  to { transform: translateY(100%); }
}

html:has(.live-modal),
body:has(.live-modal) {
  overflow: hidden;
}

html:has(.live-modal) {
  scrollbar-gutter: stable;
}

.live-modal {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.live-enter > .live-modal {
  animation: none;
  animation-delay: 0s;
}

.live-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(29, 29, 31, 0.42);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  cursor: default;
  animation: liveModalFade 0.3s ease backwards;
}

.live-modal__panel {
  position: relative;
  width: min(1040px, 100%);
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(29, 29, 31, 0.08), 0 40px 120px rgba(29, 29, 31, 0.32);
  animation: liveModalPop 0.45s cubic-bezier(0.32, 0.72, 0, 1) backwards;
}

.live-modal__close {
  position: sticky;
  top: 14px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin: 14px 14px -52px auto;
  border-radius: 50%;
  background: rgba(29, 29, 31, 0.07);
  color: #1d1d1f;
  font-size: 24px;
  line-height: 1;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.25s cubic-bezier(0.32, 0.72, 0, 1);
}

.live-modal__close:hover {
  background: rgba(29, 29, 31, 0.14);
  transform: rotate(90deg);
}

.live-modal__panel .case-detail {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.live-modal__panel .case-detail__header {
  padding-right: 3.2rem;
}

.live-modal.is-closing .live-modal__backdrop {
  animation: liveModalFadeOut 0.22s ease forwards;
}

.live-modal.is-closing .live-modal__panel {
  animation: liveModalPopOut 0.22s ease forwards;
}

.live-modal.is-static .live-modal__backdrop,
.live-modal.is-static .live-modal__panel {
  animation: none;
}

@media (max-width: 640px) {
  .live-modal {
    align-items: flex-end;
    padding: 0;
  }

  .live-modal__panel {
    width: 100%;
    max-height: 92vh;
    max-height: 92dvh;
    border-radius: 26px 26px 0 0;
    animation-name: liveSheetIn;
  }

  .live-modal.is-closing .live-modal__panel {
    animation-name: liveSheetOut;
  }
}

@media (prefers-reduced-motion: reduce) {
  .live-modal__backdrop,
  .live-modal__panel,
  .live-modal.is-closing .live-modal__backdrop,
  .live-modal.is-closing .live-modal__panel {
    animation: none;
  }
  .live-modal__close {
    transition: none;
  }
}

/* Crea piano di rateizzazione: campi e scelta rate in linea con il resto del sito */
.installment-plan-new .installment-plan-new__calc-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  align-items: end;
}

.installment-plan-new .installment-plan-new__calc-fields label {
  display: grid;
  gap: 0.4rem;
  color: var(--asser-secondary);
  font-size: 0.78rem;
  font-weight: 700;
}

.installment-plan-new .installment-plan-new__calc-fields input {
  width: 100%;
  min-height: 46px;
  padding: 0.65rem 0.95rem;
  border: 1px solid rgba(75, 35, 56, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--asser-text);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  box-sizing: border-box;
  box-shadow: 0 1px 2px rgba(75, 35, 56, 0.05);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.installment-plan-new .installment-plan-new__calc-fields input::placeholder {
  color: rgba(114, 107, 103, 0.7);
  font-weight: 400;
}

.installment-plan-new .installment-plan-new__calc-fields input:hover {
  border-color: rgba(125, 68, 94, 0.4);
}

.installment-plan-new .installment-plan-new__calc-fields input:focus {
  outline: none;
  border-color: var(--asser-primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(125, 68, 94, 0.14);
}

.installment-plan-new .rate-tiers {
  min-width: 0;
  margin: 0.9rem 0 0;
  padding: 0;
  border: 0;
}

.installment-plan-new .rate-tiers legend {
  padding: 0;
  margin-bottom: 0.45rem;
  color: var(--asser-secondary);
  font-size: 0.78rem;
  font-weight: 700;
}

.rate-tiers__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.installment-plan-new .rate-tiers__option {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

.rate-tiers__option input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.rate-tiers__option span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 3.4rem;
  min-height: 42px;
  padding: 0.5rem 1rem;
  border: 1px solid var(--asser-border);
  border-radius: 999px;
  background: var(--asser-sand);
  color: var(--asser-secondary);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1;
  box-sizing: border-box;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.rate-tiers__option span small {
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  background: rgba(75, 35, 56, 0.08);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.rate-tiers__option:hover input:not(:disabled) + span {
  border-color: rgba(125, 68, 94, 0.45);
  transform: translateY(-1px);
}

.rate-tiers__option input:focus-visible + span {
  box-shadow: 0 0 0 4px rgba(125, 68, 94, 0.18);
}

.rate-tiers__option input:checked + span {
  border-color: transparent;
  background: linear-gradient(135deg, var(--asser-primary), var(--asser-secondary));
  color: #fff;
  box-shadow: 0 8px 20px rgba(75, 35, 56, 0.22);
}

.rate-tiers__option input:checked + span small {
  background: rgba(255, 255, 255, 0.22);
}

.rate-tiers__option input:disabled {
  cursor: not-allowed;
}

.rate-tiers__option input:disabled + span {
  opacity: 0.4;
}

.installment-plan-new .managed-client-type-picker__option {
  min-height: 42px;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .installment-plan-new .installment-plan-new__calc-fields {
    grid-template-columns: 1fr;
  }
}

/* Flag "Inserisci l'ISEE" nel modulo Crea piano (facoltativo) */
.installment-plan-new .isee-flag {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px dashed rgba(75, 35, 56, 0.16);
}

.isee-flag__check {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.installment-plan-new .isee-flag__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 42px;
  padding: 0.5rem 1rem 0.5rem 0.8rem;
  border: 1px solid var(--asser-border);
  border-radius: 999px;
  background: var(--asser-sand);
  color: var(--asser-secondary);
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  box-sizing: border-box;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.isee-flag__toggle::before {
  content: "";
  width: 18px;
  height: 18px;
  flex: none;
  border: 2px solid var(--asser-primary);
  border-radius: 6px;
  background: #fff;
  box-sizing: border-box;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.isee-flag__toggle small {
  color: var(--asser-muted);
  font-size: 0.7rem;
  font-weight: 600;
}

.isee-flag__check:focus-visible + .isee-flag__toggle {
  box-shadow: 0 0 0 4px rgba(125, 68, 94, 0.18);
}

.isee-flag__check:checked + .isee-flag__toggle {
  border-color: transparent;
  background: linear-gradient(135deg, var(--asser-primary), var(--asser-secondary));
  color: #fff;
}

.isee-flag__check:checked + .isee-flag__toggle::before {
  border-color: #fff;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-6.5' fill='none' stroke='%237d445e' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.isee-flag__check:checked + .isee-flag__toggle small {
  color: rgba(255, 255, 255, 0.78);
}

.installment-plan-new .isee-flag__help {
  margin: 0.55rem 0 0;
  color: var(--asser-muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.isee-flag__panel {
  display: none;
  margin-top: 0.8rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(75, 35, 56, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
}

.isee-flag__check:checked ~ .isee-flag__panel {
  display: grid;
  gap: 0.7rem;
}

.isee-flag__panel label {
  display: grid;
  gap: 0.4rem;
  color: var(--asser-secondary);
  font-size: 0.78rem;
  font-weight: 700;
}

.isee-flag__panel input[type="text"] {
  width: 100%;
  min-height: 46px;
  padding: 0.65rem 0.95rem;
  border: 1px solid rgba(75, 35, 56, 0.16);
  border-radius: 14px;
  background: #fff;
  color: var(--asser-text);
  font: inherit;
  font-size: 0.92rem;
  box-sizing: border-box;
}

.isee-flag__panel input[type="text"]:focus {
  outline: none;
  border-color: var(--asser-primary);
  box-shadow: 0 0 0 4px rgba(125, 68, 94, 0.14);
}

/* Ricerca assistita di luoghi nei moduli (asser-ai-places.js) */
.place-search {
  position: relative;
  display: block;
}

.place-search > input {
  width: 100%;
  box-sizing: border-box;
}

.place-search__list {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: #fff;
  border: 1px solid var(--asser-border);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  max-height: 18rem;
  overflow-y: auto;
}

.place-search__item {
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--asser-text);
  cursor: pointer;
}

.place-search__item:hover,
.place-search__item.is-active {
  background: var(--asser-alt-bg);
  color: var(--asser-secondary);
}

.place-search__credit {
  padding: 0.35rem 0.7rem 0.15rem;
  font-size: 0.72rem;
  color: var(--asser-muted);
  text-align: right;
}

.dashboard-module-form__field input.place-search__filled {
  border-color: var(--asser-forest);
  box-shadow: 0 0 0 3px rgba(40, 77, 71, 0.14);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Dashboard: riquadri e legenda cliccabili, stile Apple */
.professional-dashboard a.professional-dashboard__stat,
.professional-dashboard a.professional-dashboard__legend-row,
.professional-dashboard a.professional-dashboard__donut-link {
  text-decoration: none;
  color: inherit;
}

.professional-dashboard a.professional-dashboard__stat {
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.professional-dashboard a.professional-dashboard__stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(29, 29, 31, 0.05), 0 16px 38px rgba(29, 29, 31, 0.09);
}

.professional-dashboard a.professional-dashboard__stat:active {
  transform: scale(0.985);
  box-shadow: 0 1px 2px rgba(29, 29, 31, 0.04);
}

.professional-dashboard a.professional-dashboard__stat:focus-visible,
.professional-dashboard a.professional-dashboard__legend-row:focus-visible,
.professional-dashboard a.professional-dashboard__donut-link:focus-visible {
  outline: 2px solid rgba(125, 68, 94, 0.55);
  outline-offset: 3px;
}

.professional-dashboard__stat strong {
  font-variant-numeric: tabular-nums;
}

.professional-dashboard__chev {
  display: inline-block;
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-right: 1.8px solid #86868b;
  border-top: 1.8px solid #86868b;
  transform: rotate(45deg);
  opacity: 0.45;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.professional-dashboard__stat > .professional-dashboard__chev {
  position: absolute;
  top: 1.25rem;
  right: 1.2rem;
}

a.professional-dashboard__stat:hover > .professional-dashboard__chev,
a.professional-dashboard__legend-row:hover > .professional-dashboard__chev {
  opacity: 1;
  transform: translateX(2px) rotate(45deg);
}

.professional-dashboard__donut-link {
  display: block;
  flex: 0 0 auto;
  border-radius: 50%;
  line-height: 0;
  transition: transform 0.25s ease;
}

.professional-dashboard a.professional-dashboard__donut-link:hover {
  transform: scale(1.03);
}

.professional-dashboard__donut-total {
  fill: #1d1d1f;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.professional-dashboard__donut-label {
  fill: #86868b;
  font-weight: 600;
}

.professional-dashboard__chart {
  gap: 1.6rem;
}

.professional-dashboard__legend {
  flex: 1 1 190px;
  gap: 0.15rem;
  font-size: 0.9rem;
}

.professional-dashboard__legend li {
  margin: 0;
}

.professional-dashboard__legend-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  color: #1d1d1f;
  transition: background 0.18s ease;
}

.professional-dashboard a.professional-dashboard__legend-row:hover {
  background: rgba(29, 29, 31, 0.05);
}

.professional-dashboard a.professional-dashboard__legend-row:active {
  background: rgba(29, 29, 31, 0.09);
}

.professional-dashboard__legend-row.is-empty {
  color: #86868b;
}

.professional-dashboard__legend-row.is-empty .professional-dashboard__dot {
  opacity: 0.35;
}

.professional-dashboard__legend-row .professional-dashboard__dot {
  margin: 0;
}

.professional-dashboard__legend-name {
  flex: 1 1 auto;
}

.professional-dashboard__legend-row strong {
  margin: 0;
  color: inherit;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  .professional-dashboard a.professional-dashboard__stat,
  .professional-dashboard__donut-link,
  .professional-dashboard__chev {
    transition: none;
  }

  .professional-dashboard a.professional-dashboard__stat:hover,
  .professional-dashboard a.professional-dashboard__donut-link:hover {
    transform: none;
  }
}


/* ---------- Indicatore di complessita' (finestra costo + pagina piano) ---------- */
:root {
  --cx-1: #34c759;
  --cx-2: #ffcc00;
  --cx-3: #ff9500;
  --cx-4: #ff3b30;
}

.cx-meter {
  display: inline-grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  width: 72px;
  flex: none;
}

.cx-meter i {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.09);
}

.cx-meter--1 i:nth-child(-n + 1) { background: var(--cx-1); }
.cx-meter--2 i:nth-child(-n + 2) { background: var(--cx-2); }
.cx-meter--3 i:nth-child(-n + 3) { background: var(--cx-3); }
.cx-meter--4 i:nth-child(-n + 4) { background: var(--cx-4); }

.cx-level--1 { color: #1f8a3b; }
.cx-level--2 { color: #9a7700; }
.cx-level--3 { color: #c26a00; }
.cx-level--4 { color: #d70015; }

.cx-block {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  text-align: left;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
}

.cx-block__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.92rem;
}

.cx-block__title {
  color: var(--asser-muted);
}

.cx-block__value {
  font-weight: 650;
}

.cx-block .cx-meter {
  width: 100%;
}

.cx-how {
  margin-top: 0.8rem;
  font-size: 0.82rem;
}

.cx-how summary {
  cursor: pointer;
  color: var(--asser-primary);
  font-weight: 600;
  list-style: none;
}

.cx-how summary::-webkit-details-marker {
  display: none;
}

.cx-how summary::after {
  content: ' ›';
}

.cx-how[open] summary::after {
  content: ' ˅';
}

.cx-how p {
  margin: 0.5rem 0 0.7rem;
  color: var(--asser-muted);
  line-height: 1.45;
}

.cx-legend {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cx-legend__row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cx-legend__row .cx-meter {
  width: 48px;
}

.cx-legend__text {
  display: grid;
  gap: 0.05rem;
  color: var(--asser-muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.cx-legend__text strong {
  color: var(--asser-deep);
  font-weight: 600;
}

.cx-legend--compact .cx-legend__row:not(.is-current) {
  opacity: 0.6;
}

.cx-explainer {
  display: grid;
  gap: 1.4rem;
}

.cx-explainer__factors {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cx-explainer__factors li {
  display: grid;
  gap: 0.1rem;
}

.cx-explainer__factors strong {
  color: var(--asser-deep);
  font-weight: 600;
}

.cx-explainer__factors span {
  color: var(--asser-muted);
  font-size: 0.9rem;
}

.cx-explainer__foot {
  margin: 0;
  color: var(--asser-muted);
  font-size: 0.82rem;
}


/* ---------- Bozze: barra "elimina tutte" ---------- */
.case-drafts-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem 1.2rem;
  margin: 0 0 1rem;
  padding: 0.9rem 1.1rem;
  border-radius: 16px;
  background: rgba(29, 29, 31, 0.04);
}

.case-drafts-bar p {
  flex: 1 1 260px;
  margin: 0;
  color: var(--asser-muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.case-drafts-bar p strong {
  color: var(--asser-deep);
}


/* =====================================================================
   Livello "Apple" - claim compatti e tipografia fluida (ottobre 2026).
   Solo grafica e tutto aggiuntivo: per tornare indietro basta togliere
   questo blocco fino al marcatore "fine livello Apple (condiviso)".
   ===================================================================== */
.asser-ai-app {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.asser-ai-app a,
.asser-ai-app button,
.asser-ai-app summary {
  -webkit-tap-highlight-color: transparent;
}

.asser-ai-app button,
.asser-ai-app .portal-button,
.asser-ai-app summary {
  touch-action: manipulation;
}

.portal-title,
.portal-hero__copy h1,
.portal-section__heading h2,
.recommended-layout h2,
.portal-cta h2,
.faq-hero__copy h1,
.guide-document__intro h2 {
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.08;
  text-wrap: balance;
}

.portal-title {
  font-size: clamp(1.75rem, 1.15rem + 1.9vw, 2.6rem);
}

.portal-hero__copy h1 {
  font-size: clamp(2.1rem, 1.2rem + 2.9vw, 3.5rem);
  line-height: 1.04;
}

.portal-section__heading h2,
.recommended-layout h2,
.portal-cta h2,
.faq-hero__copy h1,
.guide-document__intro h2 {
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.15rem);
}

.portal-lead,
.portal-hero__copy > p {
  font-size: clamp(0.97rem, 0.92rem + 0.25vw, 1.08rem);
  line-height: 1.6;
}

.portal-lead {
  max-width: 40rem;
}

.portal-kicker {
  font-weight: 700;
  letter-spacing: 0.12em;
}

/* Home pubblica (v3): claim piu' piccoli e ritmo verticale compatto */
.portal-home-v3__hero {
  gap: clamp(2.25rem, 4vw, 3.5rem);
  min-height: 0;
  padding: clamp(2.5rem, 6vw, 4.25rem) 0 clamp(3rem, 6vw, 4.5rem);
}

.portal-home-v3__hero-copy h1 {
  font-size: clamp(2.05rem, 1.15rem + 2.55vw, 3.05rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.06;
}

.portal-home-v3__hero-copy > p {
  max-width: 36rem;
  margin-top: 1.1rem;
  font-size: clamp(1rem, 0.94rem + 0.3vw, 1.12rem);
  line-height: 1.6;
}

.portal-home-v3__hero .portal-hero__actions {
  margin-top: 1.6rem;
}

.portal-home-v3__section-heading h2,
.portal-home-v3__flow-heading h2,
.portal-home-v3__resources-heading h2,
.portal-home-v3__questions-intro h2,
.portal-home-v3__ready h2 {
  font-size: clamp(1.55rem, 1.05rem + 1.65vw, 2.3rem);
  font-weight: 600;
  letter-spacing: -0.026em;
  line-height: 1.1;
  text-wrap: balance;
}

.portal-home-v3__start-primary h3 {
  font-size: clamp(1.3rem, 1.05rem + 0.9vw, 1.7rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.portal-home-v3__steps h3 {
  font-size: clamp(1.05rem, 1rem + 0.25vw, 1.2rem);
  font-weight: 600;
  letter-spacing: -0.012em;
}

.portal-home-v3__resources-heading > p,
.portal-home-v3__questions-intro > p:not(.portal-kicker),
.portal-home-v3__ready > div:first-child > p:not(.portal-kicker) {
  font-size: clamp(0.92rem, 0.9rem + 0.12vw, 0.98rem);
  line-height: 1.6;
}

.portal-home-v3__flow,
.portal-home-v3__questions,
.portal-home-v3__resources {
  padding-block: clamp(3rem, 7vw, 5rem);
}

.portal-home-v3__ready {
  padding-block: clamp(3rem, 6.5vw, 4.5rem);
}

.portal-home-v3__flow-inner,
.portal-home-v3__questions {
  gap: clamp(2.25rem, 5vw, 4.5rem);
}

.portal-home-v3__ready {
  gap: clamp(2rem, 4vw, 3.5rem);
}

@media (max-width: 960px) {
  .portal-home-v3__hero {
    padding: 2rem 0 2.75rem;
    gap: 2rem;
  }
}

@media (max-width: 760px) {
  /* i campi a 16px evitano lo zoom automatico di iPhone */
  .asser-ai-app input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]),
  .asser-ai-app select,
  .asser-ai-app textarea {
    font-size: 16px;
  }

  .asser-ai-app .portal-button {
    min-height: 46px;
  }
}
/* fine livello Apple (condiviso) */


/* =====================================================================
   Livello "Apple" - area clienti: barra laterale da desktop per i
   professionisti, mobile rifinito (ottobre 2026). Solo grafica e tutto
   aggiuntivo: per tornare indietro basta togliere questo blocco.
   ===================================================================== */

/* Icone e titoli di gruppo: servono solo alla barra laterale */
.dnav-ico,
.dashboard-view-nav__group {
  display: none;
}

.dnav-label {
  min-width: 0;
}

/* Testata piu' compatta e sobria */
.dashboard-page .dashboard-hero {
  padding: clamp(1.15rem, 2.6vw, 1.75rem) clamp(1.2rem, 3vw, 2rem);
  border-radius: 24px;
}

.dashboard-page .dashboard-hero .portal-title {
  font-size: clamp(1.55rem, 1.1rem + 1.5vw, 2.2rem);
  font-weight: 600;
  letter-spacing: -0.028em;
}

.dashboard-page .dashboard-hero .portal-lead {
  max-width: 32rem;
  font-size: 0.95rem;
}

.dashboard-hero__avatar-photo,
.dashboard-hero__avatar-initials {
  width: 60px;
  height: 60px;
}

/* ---------- Desktop: barra laterale (solo professionisti) ---------- */
@media (min-width: 1100px) {
  .customer-dashboard.dashboard-shell--pro {
    grid-template-columns: 236px minmax(0, 1fr);
    align-items: start;
    column-gap: 1.75rem;
    row-gap: 0;
    width: min(1320px, calc(100% - 3rem));
    padding-top: 1.75rem;
  }

  .dashboard-shell--pro > * {
    grid-column: 2;
    min-width: 0;
    margin: 0 0 1.4rem;
  }

  .dashboard-shell--pro > .dashboard-view-nav {
    grid-column: 1;
    grid-row: 1 / span 60;
    position: sticky;
    top: 4.75rem;
    z-index: 5;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 2px;
    margin: 0;
    padding: 0.7rem 0.6rem;
    overflow: visible;
    border: 1px solid rgba(29, 29, 31, 0.06);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.78);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    box-shadow: 0 1px 2px rgba(29, 29, 31, 0.04), 0 14px 36px rgba(29, 29, 31, 0.06);
  }

  .dashboard-shell--pro .dashboard-view-nav a {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.56rem 0.75rem;
    border-radius: 12px;
    background: transparent;
    color: #3a3a3d;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.25;
    white-space: normal;
  }

  .dashboard-shell--pro .dashboard-view-nav a:hover {
    background: rgba(29, 29, 31, 0.05);
    color: #1d1d1f;
  }

  .dashboard-shell--pro .dashboard-view-nav a.is-active {
    background: rgba(125, 68, 94, 0.11);
    color: var(--asser-secondary);
    font-weight: 600;
    box-shadow: none;
  }

  .dashboard-shell--pro .dnav-ico {
    display: block;
    width: 20px;
    height: 20px;
    flex: none;
    opacity: 0.75;
  }

  .dashboard-shell--pro .dashboard-view-nav a.is-active .dnav-ico {
    color: var(--asser-primary);
    opacity: 1;
  }

  .dashboard-shell--pro .dashboard-view-nav__group {
    display: block;
    margin: 0.85rem 0.75rem 0.25rem;
    color: #8e8e93;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .dashboard-shell--pro .dashboard-view-nav__group:first-child {
    margin-top: 0.2rem;
  }

  .dashboard-shell--pro .dashboard-view-nav__spacer {
    display: block;
    flex: none;
    min-width: 0;
    height: 1px;
    margin: 0.55rem 0.75rem 0.1rem;
    background: rgba(29, 29, 31, 0.07);
  }

  /* testata ancora piu' raccolta accanto alla barra laterale */
  .dashboard-shell--pro .dashboard-hero {
    padding: 1.15rem 1.5rem;
  }

  .dashboard-shell--pro .dashboard-hero__avatar-photo,
  .dashboard-shell--pro .dashboard-hero__avatar-initials {
    width: 52px;
    height: 52px;
  }

  .dashboard-shell--pro .dashboard-hero .portal-lead {
    display: none;
  }
}

/* ---------- Tablet e telefono: navigazione che resta sotto la barra in alto ---------- */
@media (max-width: 1099px) {
  .dashboard-view-nav {
    position: sticky;
    top: 3.9rem;
    z-index: 30;
    background: rgba(233, 231, 234, 0.9);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    backdrop-filter: saturate(180%) blur(18px);
    box-shadow: 0 6px 20px rgba(29, 29, 31, 0.07);
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .dashboard-view-nav a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    scroll-snap-align: center;
  }
}

/* ---------- Telefono ---------- */
@media (max-width: 760px) {
  .dashboard-page {
    width: calc(100% - 2rem);
    width: calc(100% - 2rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
    padding: 0.9rem 0 3.5rem;
  }

  .dashboard-view-nav {
    margin-right: -1rem;
    padding-right: 1rem;
  }

  .customer-dashboard {
    gap: 1rem;
  }

  .dashboard-page .dashboard-hero {
    gap: 1rem;
    padding: 1.1rem 1.1rem 1.2rem;
    border-radius: 22px;
  }

  .dashboard-hero__identity {
    gap: 0.9rem;
  }

  .dashboard-hero__avatar-photo,
  .dashboard-hero__avatar-initials {
    width: 52px;
    height: 52px;
  }

  .dashboard-page .dashboard-hero .portal-title {
    font-size: 1.5rem;
  }

  .dashboard-page .dashboard-hero .portal-lead {
    margin-top: 0.4rem;
    font-size: 0.88rem;
  }

  .dashboard-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
  }

  .dashboard-hero__actions > * {
    flex: 1 1 0;
    justify-content: center;
    text-align: center;
  }

  .dashboard-hero__actions .wallet-chip {
    flex: 1 1 100%;
  }

  .dashboard-page .portal-button {
    min-height: 46px;
    font-size: 0.95rem;
  }

  .dashboard-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }

  .dashboard-stats > div {
    min-height: 0;
    padding: 0.9rem 1rem;
    border-radius: 18px;
  }

  .professional-dashboard__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }

  .professional-dashboard__stat,
  .professional-dashboard__chart-card,
  .pw-card,
  .case-detail,
  .case-filter-bar {
    border-radius: 20px;
  }

  .pw-top {
    grid-template-columns: minmax(0, 1fr);
  }

  .case-list-link {
    padding: 0.85rem 1rem;
    border-radius: 16px;
  }

  .case-filter-bar__search,
  .case-filter-bar__select {
    min-height: 44px;
    font-size: 16px;
  }

  .case-drafts-bar .portal-button {
    width: 100%;
  }

  .wizard-panel {
    padding: 1.4rem 1.2rem;
    border-radius: 24px;
  }

  .wizard-panel .portal-title {
    font-size: 1.55rem;
  }
}

/* ---------- Finestra del costo: da telefono diventa un foglio dal basso ---------- */
@media (max-width: 640px) {
  .credit-modal {
    align-items: flex-end;
    padding: 0;
  }

  .credit-modal__dialog {
    width: 100%;
    max-width: none;
    max-height: 90vh;
    padding: 0.9rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
    border-radius: 24px 24px 0 0;
    animation: creditSheetUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  .credit-modal__dialog::before {
    content: "";
    display: block;
    width: 38px;
    height: 5px;
    margin: 0 auto 1rem;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.16);
  }

  .credit-modal__amount {
    font-size: 3rem;
  }
}

@keyframes creditSheetUp {
  from {
    opacity: 0.6;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .credit-modal__dialog {
    animation: none;
  }
}
/* fine livello Apple (area clienti) */


/* =====================================================================
   Archivio clienti: schede a tendina animate (ottobre 2026).
   Solo grafica e tutto aggiuntivo: l'animazione e' gestita da initArchive()
   in asser-ai-shell.js; senza JavaScript le schede restano dei <details>.
   ===================================================================== */
.arch {
  display: grid;
  gap: 1rem;
}

.arch > .managed-client-new {
  margin: 0;
  padding: 0.35rem 0.5rem;
  border-radius: 18px;
  border: 1px solid rgba(29, 29, 31, 0.06);
  background: #fff;
  box-shadow: 0 1px 2px rgba(29, 29, 31, 0.04), 0 8px 24px rgba(29, 29, 31, 0.04);
}

.arch > .managed-client-new > summary {
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  color: var(--asser-primary);
  font-size: 0.92rem;
  font-weight: 600;
}

.arch > .managed-client-new[open] > .managed-client-form {
  padding: 0.4rem 0.7rem 0.9rem;
}

.arch-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem 1rem;
}

.arch-search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 260px;
  min-width: 0;
}

.arch-search svg {
  position: absolute;
  left: 0.95rem;
  color: #8e8e93;
  pointer-events: none;
}

.arch-search input {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 1rem 0.65rem 2.7rem;
  border: 1px solid rgba(29, 29, 31, 0.1);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(29, 29, 31, 0.04);
  color: var(--asser-text);
  font: inherit;
  font-size: 0.95rem;
  -webkit-appearance: none;
  appearance: none;
}

.arch-search input:focus-visible {
  border-color: var(--asser-primary);
  outline: 3px solid rgba(125, 68, 94, 0.22);
  outline-offset: 0;
}

.arch-filters {
  display: flex;
  gap: 0.2rem;
  max-width: 100%;
  padding: 0.25rem;
  overflow-x: auto;
  border-radius: 999px;
  background: rgba(29, 29, 31, 0.06);
  scrollbar-width: none;
}

.arch-filters::-webkit-scrollbar {
  display: none;
}

.arch-filters button {
  min-height: 36px;
  padding: 0.4rem 0.95rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #424245;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.arch-filters button span {
  margin-left: 0.3rem;
  color: #8e8e93;
  font-variant-numeric: tabular-nums;
}

.arch-filters button.is-on {
  background: #fff;
  color: #1d1d1f;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(29, 29, 31, 0.1), 0 3px 10px rgba(29, 29, 31, 0.08);
}

.arch-filters button:focus-visible {
  outline: 3px solid rgba(125, 68, 94, 0.3);
  outline-offset: 1px;
}

.arch-group {
  display: grid;
  gap: 0.6rem;
}

.arch-group[hidden],
.arch-client[hidden],
.arch-empty[hidden] {
  display: none;
}

.arch-group__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0.3rem 0;
  color: #6e6e73;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.arch-group__title span {
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: rgba(29, 29, 31, 0.06);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.arch-list {
  display: grid;
  gap: 0.55rem;
}

.arch-client {
  border: 1px solid rgba(29, 29, 31, 0.06);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(29, 29, 31, 0.04), 0 8px 24px rgba(29, 29, 31, 0.04);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.arch-client[open] {
  border-color: rgba(125, 68, 94, 0.22);
  box-shadow: 0 2px 4px rgba(29, 29, 31, 0.04), 0 18px 44px rgba(75, 35, 56, 0.1);
}

.arch-client > summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 1.1rem;
  border-radius: 20px;
  list-style: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.arch-client > summary::-webkit-details-marker {
  display: none;
}

.arch-client > summary:hover {
  background: rgba(29, 29, 31, 0.025);
}

.arch-client > summary:focus-visible {
  outline: 3px solid rgba(125, 68, 94, 0.3);
  outline-offset: -3px;
}

.arch-client__id {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.arch-client__id strong {
  overflow: hidden;
  color: #1d1d1f;
  font-size: 1rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arch-client__id small {
  color: #8e8e93;
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.arch-client__badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.arch-client__count {
  min-width: 4.5rem;
  color: #6e6e73;
  font-size: 0.82rem;
  text-align: right;
  white-space: nowrap;
}

.arch-pill {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(29, 29, 31, 0.06);
  color: #6e6e73;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.arch-pill--completed { background: rgba(31, 138, 76, 0.12); color: #1a7a43; }
.arch-pill--working { background: rgba(125, 68, 94, 0.1); color: var(--asser-primary); }
.arch-pill--review { background: rgba(214, 124, 15, 0.14); color: #a05a00; }
.arch-pill--failed { background: rgba(215, 0, 21, 0.1); color: #c4001a; }
.arch-pill--auto { background: var(--asser-sand); color: #8d5915; }

.arch-chev {
  width: 0.55rem;
  height: 0.55rem;
  margin: 0 0.35rem 0.25rem 0.1rem;
  border-right: 2px solid #8e8e93;
  border-bottom: 2px solid #8e8e93;
  transform: rotate(45deg);
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.2s ease;
}

.arch-client[open] > summary .arch-chev {
  margin-bottom: 0;
  margin-top: 0.3rem;
  border-color: var(--asser-primary);
  transform: rotate(225deg);
}

.arch-client[open].is-closing > summary .arch-chev {
  margin-bottom: 0.25rem;
  margin-top: 0;
  border-color: #8e8e93;
  transform: rotate(45deg);
}

.arch-panel {
  overflow: hidden;
}

.arch-panel__inner {
  display: grid;
  gap: 1rem;
  margin: 0 1.1rem;
  padding: 1rem 0 1.15rem;
  border-top: 1px solid rgba(29, 29, 31, 0.07);
}

.arch-panel__heading {
  margin: 0;
  color: #6e6e73;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.arch-panel__heading small {
  margin-left: 0.5rem;
  color: #8e8e93;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.arch-panel__more {
  margin: -0.4rem 0 0;
  font-size: 0.84rem;
}

.arch-panel__more a {
  color: var(--asser-primary);
  font-weight: 600;
}

.arch-summary__note {
  margin: 0;
  color: #6e6e73;
  font-size: 0.86rem;
}

.arch-retry {
  padding: 0;
  border: 0;
  background: none;
  color: var(--asser-primary);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.arch-summary.is-loading .arch-summary__note {
  min-height: 4.2rem;
  border-radius: 14px;
  background: linear-gradient(100deg, rgba(29, 29, 31, 0.04) 30%, rgba(29, 29, 31, 0.09) 50%, rgba(29, 29, 31, 0.04) 70%);
  background-size: 220% 100%;
  color: transparent;
  animation: archShimmer 1.3s ease-in-out infinite;
}

@keyframes archShimmer {
  from { background-position: 120% 0; }
  to { background-position: -120% 0; }
}

.arch-panel .client-debt-summary {
  margin: 0;
}

.arch-panel .client-debt-summary__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 0.55rem;
}

.arch-panel .client-debt-summary__item {
  display: grid;
  align-content: start;
  gap: 0.15rem;
  padding: 0.7rem 0.85rem;
  border: 0;
  border-radius: 14px;
  background: rgba(29, 29, 31, 0.04);
  white-space: normal;
}

.arch-panel .client-debt-summary__item--amount {
  background: rgba(125, 68, 94, 0.08);
}

.arch-panel .client-debt-summary__item--alert {
  background: rgba(215, 0, 21, 0.08);
}

.arch-panel .client-debt-summary__value {
  color: #1d1d1f;
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.arch-panel .client-debt-summary__label {
  font-size: 0.74rem;
}

.arch-panel .client-debt-summary__note {
  font-size: 0.74rem;
}

.arch-cases {
  display: grid;
  margin: 0;
  padding: 0;
  overflow: hidden;
  list-style: none;
  border: 1px solid rgba(29, 29, 31, 0.07);
  border-radius: 16px;
  background: #fff;
}

.arch-cases li + li {
  border-top: 1px solid rgba(29, 29, 31, 0.07);
}

.arch-cases a {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 1rem;
  color: inherit;
  text-decoration: none;
  transition: background 0.2s ease;
}

.arch-cases a:hover {
  background: rgba(125, 68, 94, 0.05);
}

.arch-cases a:focus-visible {
  outline: 3px solid rgba(125, 68, 94, 0.3);
  outline-offset: -3px;
}

.arch-cases__main {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.arch-cases__main strong {
  color: #1d1d1f;
  font-size: 0.92rem;
  font-weight: 600;
}

.arch-cases__main small {
  color: #8e8e93;
  font-size: 0.76rem;
}

.arch-cases a > b {
  color: #b0adb2;
  font-weight: 400;
}

.arch-cases__progress {
  position: absolute;
  right: 1rem;
  bottom: 0.3rem;
  left: 1rem;
  height: 3px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(29, 29, 31, 0.07);
}

.arch-cases__progress u {
  display: block;
  height: 100%;
  background: var(--asser-primary);
  text-decoration: none;
}

.arch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.arch-empty {
  margin: 0.4rem 0.3rem;
}

.arch .managed-client-unassigned {
  margin-top: 0.4rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid rgba(29, 29, 31, 0.06);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(29, 29, 31, 0.04), 0 8px 24px rgba(29, 29, 31, 0.04);
}

.arch .managed-client-unassigned h2 {
  color: #1d1d1f;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.arch .managed-client-unassigned > p {
  margin: 0 0 0.8rem;
  color: #6e6e73;
  font-size: 0.88rem;
}

.arch .managed-client-unassigned .case-list {
  margin: 0;
  padding: 0;
}

.arch .managed-client-unassigned__row {
  margin-bottom: 0.45rem;
  border-color: rgba(29, 29, 31, 0.07);
  border-radius: 14px;
  background: rgba(29, 29, 31, 0.02);
}

@media (max-width: 720px) {
  .arch-client > summary {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.4rem 0.8rem;
    padding: 0.8rem 0.95rem;
  }

  .arch-client__badges {
    grid-column: 2 / 3;
    grid-row: 2;
    justify-content: flex-start;
  }

  .arch-client__count {
    grid-column: 2 / 3;
    grid-row: 3;
    min-width: 0;
    text-align: left;
  }

  .arch-chev {
    grid-column: 3;
    grid-row: 1;
  }

  .arch-panel__inner {
    margin: 0 0.95rem;
  }

  .arch-actions .portal-button {
    flex: 1 1 100%;
    justify-content: center;
  }

  .arch .managed-client-unassigned__row form {
    flex: 1 1 100%;
    margin-left: 0;
  }

  .arch .managed-client-unassigned__row select {
    flex: 1 1 auto;
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .arch-chev,
  .arch-client,
  .arch-filters button {
    transition: none;
  }

  .arch-summary.is-loading .arch-summary__note {
    animation: none;
  }
}
/* fine archivio clienti */


/* =====================================================================
   Documenti e PEC: elenco per argomento e form di compilazione in stile
   Apple (ottobre 2026). Solo grafica e tutto aggiuntivo.
   ===================================================================== */
.docs-hub__head h2 {
  margin: 0;
  color: #1d1d1f;
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.025em;
}

.docs-hub .dashboard-modules__intro {
  max-width: 44rem;
  color: #6e6e73;
  font-size: 0.95rem;
  line-height: 1.55;
}

.docs-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem 1rem;
  margin: 0 0 1.2rem;
}

.docs-topic {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.docs-topic[hidden],
.docs-item[hidden],
.docs-empty[hidden] {
  display: none;
}

.docs-list {
  display: grid;
  margin: 0;
  padding: 0;
  overflow: hidden;
  list-style: none;
  border: 1px solid rgba(29, 29, 31, 0.06);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(29, 29, 31, 0.04), 0 8px 24px rgba(29, 29, 31, 0.04);
}

.docs-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
}

.docs-item + .docs-item {
  border-top: 1px solid rgba(29, 29, 31, 0.07);
}

.docs-item__link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
  padding: 0.85rem 1.1rem;
  color: inherit;
  text-decoration: none;
  transition: background 0.2s ease;
}

a.docs-item__link:hover {
  background: rgba(125, 68, 94, 0.05);
}

a.docs-item__link:focus-visible {
  outline: 3px solid rgba(125, 68, 94, 0.3);
  outline-offset: -3px;
}

.docs-ico {
  display: inline-grid;
  flex: none;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 11px;
  background: #8e8e93;
  color: #fff;
}

.docs-ico--rateizzazione { background: #2fa65a; }
.docs-ico--sospensione { background: #f09a1a; }
.docs-ico--autotutela { background: var(--asser-primary); }
.docs-ico--fermo { background: #e5484d; }
.docs-ico--richieste { background: #0a84ff; }
.docs-ico--pagamenti { background: #30a8c0; }
.docs-ico--pec { background: #5e5ce6; }

.docs-item__text {
  display: grid;
  min-width: 0;
}

.docs-item__text strong {
  color: #1d1d1f;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.3;
}

.docs-item__text small {
  display: -webkit-box;
  margin-top: 0.15rem;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: #6e6e73;
  font-size: 0.82rem;
  line-height: 1.4;
}

.docs-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.4rem;
}

.docs-tag {
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(29, 29, 31, 0.06);
  color: #6e6e73;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.docs-tag--ader { background: rgba(10, 132, 255, 0.1); color: #0a62c9; }
.docs-tag--asser { background: rgba(125, 68, 94, 0.1); color: var(--asser-primary); }
.docs-tag--pec { background: rgba(94, 92, 230, 0.12); color: #4a48c9; }

.docs-item__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--asser-primary);
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
}

.docs-item__cta .arch-chev {
  margin: 0;
  border-color: currentColor;
  transform: rotate(-45deg);
}

.docs-item__pdf {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-right: 1rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(29, 29, 31, 0.06);
  color: #1d1d1f;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease;
}

.docs-item__pdf:hover {
  background: rgba(29, 29, 31, 0.11);
}

.docs-item__pdf:focus-visible {
  outline: 3px solid rgba(125, 68, 94, 0.3);
  outline-offset: 2px;
}

.docs-item__pdf--primary {
  background: var(--asser-primary);
  color: #fff;
}

.docs-item__pdf--primary:hover {
  background: var(--asser-secondary);
}

.docs-empty {
  margin: 0.4rem 0.3rem;
}

.docs-settings {
  margin-top: 1.4rem;
  padding: 0.2rem 1.1rem;
  border: 1px solid rgba(29, 29, 31, 0.06);
  border-radius: 18px;
  background: #fff;
}

.docs-settings summary {
  padding: 0.65rem 0;
  color: var(--asser-primary);
  font-size: 0.9rem;
  font-style: normal;
  font-weight: 600;
  cursor: pointer;
}

.docs-settings form {
  display: grid;
  gap: 0;
  padding-bottom: 0.9rem;
}

.docs-switch {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-top: 1px solid rgba(29, 29, 31, 0.07);
  color: #1d1d1f;
  font-size: 0.92rem;
  cursor: pointer;
}

.docs-switch small {
  margin-left: 0.3rem;
  color: #8e8e93;
  font-size: 0.74rem;
}

.docs-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.docs-switch i {
  position: relative;
  flex: none;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: rgba(29, 29, 31, 0.16);
  transition: background 0.25s ease;
}

.docs-switch i::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.docs-switch input:checked + i {
  background: #34c759;
}

.docs-switch input:checked + i::after {
  transform: translateX(18px);
}

.docs-switch input:focus-visible + i {
  outline: 3px solid rgba(125, 68, 94, 0.35);
  outline-offset: 2px;
}

.docs-settings .portal-button {
  justify-self: start;
  margin-top: 0.8rem;
}

/* ---------- Form di compilazione ---------- */
.docs-back {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0 0 1rem;
  color: var(--asser-primary);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
}

.docs-back:hover {
  text-decoration: underline;
}

.docs-form-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.docs-form-head .docs-ico {
  width: 52px;
  height: 52px;
  border-radius: 14px;
}

.docs-form-head .docs-tags {
  margin-top: 0;
}

.docs-form-head h3 {
  margin: 0.45rem 0 0.25rem;
  color: #1d1d1f;
  font-size: clamp(1.3rem, 1.05rem + 1vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.15;
}

.docs-form-head .dashboard-modules__intro {
  margin: 0;
  font-size: 0.92rem;
}

.docs-form-head .docs-item__pdf {
  margin: 0.8rem 0 0;
}

.docs-hub .dashboard-module-form {
  gap: 1rem;
  margin-top: 0;
}

.dmf-group {
  padding: 1.15rem 1.25rem 1.3rem;
  border: 1px solid rgba(29, 29, 31, 0.06);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(29, 29, 31, 0.04), 0 8px 24px rgba(29, 29, 31, 0.04);
}

.dmf-group > h4 {
  margin: 0 0 0.85rem;
  color: #1d1d1f;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.dmf-group__body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 1rem;
}

.dmf-group__body > .dashboard-module-form__option,
.dmf-group__body > .dashboard-module-form__field--wide {
  grid-column: 1 / -1;
}

.docs-hub .dashboard-module-form__field {
  gap: 0.35rem;
  color: #3a3a3d;
  font-size: 0.8rem;
  font-weight: 600;
}

.docs-hub .dashboard-module-form__field input[type="text"],
.docs-hub .dashboard-module-form__field input[type="date"],
.docs-hub .dashboard-module-form__field select,
.docs-hub .dashboard-module-form__field textarea {
  min-height: 46px;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(29, 29, 31, 0.14);
  border-radius: 12px;
  background: #fff;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.docs-hub .dashboard-module-form__field input:focus-visible,
.docs-hub .dashboard-module-form__field select:focus-visible,
.docs-hub .dashboard-module-form__field textarea:focus-visible {
  border-color: var(--asser-primary);
  outline: 0;
  box-shadow: 0 0 0 4px rgba(125, 68, 94, 0.16);
}

.docs-hub .dashboard-module-form__option {
  padding: 0.85rem 1rem;
  border: 1px solid rgba(29, 29, 31, 0.08);
  border-radius: 14px;
  background: rgba(29, 29, 31, 0.02);
}

.docs-hub .dashboard-module-form__checkbox {
  align-items: center;
  gap: 0.7rem;
  color: #1d1d1f;
  font-size: 0.9rem;
  line-height: 1.4;
}

.docs-hub .dashboard-module-form__checkbox input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--asser-primary);
}

.dmf-actions {
  position: sticky;
  bottom: 0.75rem;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem 1.2rem;
  padding: 0.85rem 1.1rem;
  border: 1px solid rgba(29, 29, 31, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  box-shadow: 0 10px 30px rgba(29, 29, 31, 0.1);
}

.dmf-actions .dashboard-module-form__note {
  flex: 1 1 260px;
  margin: 0;
  color: #6e6e73;
  font-size: 0.78rem;
  font-style: normal;
  line-height: 1.4;
}

@media (max-width: 720px) {
  .docs-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .docs-item__pdf {
    justify-self: start;
    margin: -0.2rem 1.1rem 0.9rem 4.5rem;
  }

  .docs-item__link {
    padding: 0.8rem 0.95rem;
  }

  .docs-item__cta {
    font-size: 0;
  }

  .docs-item__cta .arch-chev {
    margin-right: 0.2rem;
  }

  .docs-form-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.7rem;
  }

  .dmf-group {
    padding: 1rem 1rem 1.15rem;
    border-radius: 18px;
  }

  .dmf-group__body {
    grid-template-columns: minmax(0, 1fr);
  }

  .dmf-actions {
    bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
    padding: 0.75rem 0.9rem;
  }

  .dmf-actions .portal-button {
    flex: 1 1 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .docs-switch i,
  .docs-switch i::after {
    transition: none;
  }
}
/* fine Documenti e PEC */


/* =====================================================================
   Correzioni di leggibilita' (ottobre 2026): il colore dei link veniva
   azzerato da ".asser-ai-app a { color: inherit }", e i menu a tendina
   nativi potevano comparire scuri. Qui i colori giusti e i campi sempre
   chiari.
   ===================================================================== */
.asser-ai-app,
.asser-ai-app input,
.asser-ai-app select,
.asser-ai-app textarea,
.asser-ai-app button {
  color-scheme: light;
}

.asser-ai-app .docs-item__pdf--primary,
.asser-ai-app .docs-item__pdf--primary span {
  color: #fff;
}

.asser-ai-app .docs-item__pdf:not(.docs-item__pdf--primary) {
  color: #1d1d1f;
}

.asser-ai-app .docs-back,
.asser-ai-app .arch-panel__more a,
.asser-ai-app .managed-client-unassigned__drafts a {
  color: var(--asser-primary);
}

.asser-ai-app .arch-actions .portal-button:not(.portal-button--secondary) {
  color: #fff;
}

.asser-ai-app select.arch-select,
.managed-client-unassigned__row select,
.docs-hub select {
  min-height: 44px;
  padding: 0.55rem 2.3rem 0.55rem 0.9rem;
  border: 1px solid rgba(29, 29, 31, 0.14);
  border-radius: 12px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%238e8e93' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m1.5 1.5 4.5 4.5 4.5-4.5'/%3E%3C/svg%3E");
  background-position: right 0.85rem center;
  background-repeat: no-repeat;
  color: var(--asser-text);
  font: inherit;
  font-size: 0.92rem;
  -webkit-appearance: none;
  appearance: none;
}

.managed-client-unassigned__row select:focus-visible,
.docs-hub select:focus-visible {
  border-color: var(--asser-primary);
  outline: 0;
  box-shadow: 0 0 0 4px rgba(125, 68, 94, 0.16);
}

.managed-client-unassigned__id {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.managed-client-unassigned__id small {
  color: #8e8e93;
  font-size: 0.76rem;
}

.managed-client-unassigned__hint,
.managed-client-unassigned__drafts {
  margin: 0;
  color: #6e6e73;
  font-size: 0.84rem;
}

.managed-client-unassigned__drafts {
  margin-top: 0.7rem;
}

@media (max-width: 720px) {
  .managed-client-unassigned__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem 0.7rem;
  }

  .managed-client-unassigned__row form {
    grid-column: 1 / -1;
    margin-left: 0;
  }

  .managed-client-unassigned__row select {
    flex: 1 1 auto;
    min-width: 0;
  }
}
/* fine correzioni di leggibilita' */


/* ---------- Contatore dei crediti nel caricamento documenti (stile Apple) ---------- */
.cost-counter {
  display: grid;
  gap: 0.2rem;
  padding: 1.2rem 1.35rem 1.15rem;
  border: 1px solid rgba(75, 35, 56, 0.1);
  border-radius: 22px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.98), rgba(246, 241, 236, 0.92));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 14px 34px -22px rgba(44, 31, 41, 0.35);
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

.cost-counter--ready,
.cost-counter--updating {
  border-color: rgba(125, 68, 94, 0.24);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 18px 40px -24px rgba(125, 68, 94, 0.5);
}

.cost-counter__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  min-height: 1.5rem;
}

.cost-counter__label {
  color: var(--asser-muted);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cost-counter__plan {
  padding: 0.18rem 0.65rem;
  border-radius: 999px;
  background: rgba(40, 77, 71, 0.1);
  color: var(--asser-forest);
  font-size: 0.74rem;
  font-weight: 650;
}

.cost-counter__plan:empty {
  display: none;
}

.cost-counter__price {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  margin-top: 0.15rem;
  color: var(--asser-deep);
}

.cost-counter__amount {
  min-width: 1ch;
  font-size: 3.1rem;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.cost-counter__unit {
  color: var(--asser-muted);
  font-size: 1rem;
  font-weight: 500;
}

.cost-counter__summary {
  margin: 0.1rem 0 0;
  color: var(--asser-muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.cost-counter__detail:empty,
.cost-counter__rows:empty {
  display: none;
}

/* contatore: file non letti e motivo (19/10/2026) */
.cost-counter__fail {
  margin: 0.45rem 0 0;
  padding: 0.5rem 0.7rem;
  border-radius: 10px;
  background: rgba(176, 58, 46, 0.08);
  color: #8a2f24;
  font-size: 0.82rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.cost-counter__rows {
  display: grid;
  grid-template-columns: 1fr auto;
  margin: 0.55rem 0 0;
  padding: 0;
}

.cost-counter__rows dt,
.cost-counter__rows dd {
  margin: 0;
  padding: 0.5rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  font-size: 0.88rem;
}

.cost-counter__rows dt {
  color: var(--asser-muted);
}

.cost-counter__rows dd {
  color: var(--asser-deep);
  font-weight: 600;
  text-align: right;
}

.cost-counter__rows dd.is-warn {
  color: #d70015;
}

.cost-counter__topup {
  justify-self: start;
  margin-top: 0.3rem;
  color: var(--asser-primary);
  font-size: 0.84rem;
  font-weight: 650;
  text-decoration: none;
}

.cost-counter__topup[hidden] {
  display: none;
}

.cost-counter__note {
  margin: 0.7rem 0 0;
  color: var(--asser-muted);
  font-size: 0.74rem;
  line-height: 1.45;
}

.cost-counter__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.cost-counter--idle .cost-counter__amount,
.cost-counter--unavailable .cost-counter__amount {
  color: rgba(44, 31, 41, 0.28);
}

.cost-counter--loading .cost-counter__amount,
.cost-counter--updating .cost-counter__amount {
  animation: cost-counter-pulse 1.2s ease-in-out infinite;
}

.cost-counter__amount.is-new {
  animation: cost-counter-in 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes cost-counter-in {
  from { opacity: 0.2; transform: translateY(6px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

@keyframes cost-counter-pulse {
  0%,
  100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* Tipo e pagine letti dal motore, accanto a ogni file caricato */
.uploaded-file .uploaded-file__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.55rem;
}

.uploaded-file .uploaded-file__meta span {
  display: inline-flex;
  min-width: 0;
}

.uploaded-file .uploaded-file__meta .uf-chip {
  align-items: center;
  gap: 0.4rem;
  padding: 0.14rem 0.6rem;
  border-radius: 999px;
  background: var(--asser-alt-bg);
  color: var(--asser-secondary);
  font-size: 0.72rem;
  font-weight: 650;
}

.uploaded-file .uploaded-file__meta .uf-chip--busy {
  background: rgba(0, 0, 0, 0.05);
  color: var(--asser-muted);
}

.uploaded-file .uploaded-file__meta .uf-chip--warn {
  background: rgba(215, 0, 21, 0.08);
  color: #b4132a;
}

.uf-spin {
  width: 0.7rem;
  height: 0.7rem;
  border: 2px solid rgba(125, 68, 94, 0.25);
  border-top-color: var(--asser-primary);
  border-radius: 50%;
  animation: uf-spin 0.8s linear infinite;
}

@keyframes uf-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
  .cost-counter {
    padding: 1.05rem 1.1rem 1rem;
    border-radius: 20px;
  }

  .cost-counter__amount {
    font-size: 2.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cost-counter,
  .cost-counter__amount,
  .uf-spin {
    animation: none;
    transition: none;
  }
}


/* ---------- Bozze e pratiche in attesa di risposte: comandi direttamente sulla riga dell'elenco ----------
   Bozza = "Elimina"; in attesa delle risposte = "Riprendi" + "Elimina". Il nome .case-draft-quick e' quello
   storico delle bozze: vale per entrambe le righe. */
.case-list-item {
  position: relative;
}

.case-list-item[hidden] {
  display: none;
}

/* spazio a destra per i comandi, che stanno sopra la riga ma sono elementi a parte (la riga resta cliccabile) */
.case-list-item--draft .case-list-link {
  padding-right: 8.6rem;
}

.case-list-item--answers .case-list-link {
  padding-right: 16.4rem;
}

.case-list-item--draft .case-list-link b,
.case-list-item--answers .case-list-link b {
  visibility: hidden;
}

.case-draft-quick {
  position: absolute;
  inset: 0;
  margin: 0;
  pointer-events: none;
}

/* contenitore dei comandi: a destra, centrato in verticale (sul telefono sta in basso, vedi sotto) */
.case-quick__bar {
  position: absolute;
  top: 50%;
  right: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transform: translateY(-50%);
  pointer-events: none;
}

.case-quick__bar > * {
  pointer-events: auto;
}

.case-draft-quick__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 40px;
  padding: 0 0.9rem;
  border: 0;
  border-radius: 999px;
  background: rgba(215, 0, 21, 0.07);
  color: #b4132a;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

/* "Riprendi": il pulsante principale del sito (stesso colore dei pulsanti "Nuova analisi"), in formato compatto */
.case-quick__resume {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 40px;
  padding: 0 1.1rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--asser-primary), var(--asser-secondary));
  color: #fff !important;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(75, 35, 56, 0.22);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.case-quick__resume svg {
  flex: none;
}

.case-quick__resume:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(75, 35, 56, 0.28);
}

.case-quick__resume:active {
  transform: scale(0.96);
  box-shadow: 0 3px 10px rgba(75, 35, 56, 0.2);
}

.case-quick__resume:focus-visible {
  outline: 3px solid rgba(125, 68, 94, 0.35);
  outline-offset: 2px;
}

.case-draft-quick__trigger:hover,
.case-draft-quick__trigger:focus-visible {
  background: rgba(215, 0, 21, 0.14);
}

.case-draft-quick__trigger:active {
  transform: scale(0.96);
}

.case-draft-quick__trigger:focus-visible,
.case-draft-quick__cancel:focus-visible,
.case-draft-quick__danger:focus-visible {
  outline: 3px solid rgba(215, 0, 21, 0.3);
  outline-offset: 2px;
}

.case-draft-quick__confirm {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 0 1rem 0 1.35rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: inset 0 0 0 1px rgba(215, 0, 21, 0.22);
  pointer-events: auto;
  animation: draftConfirmIn 0.18s ease both;
}

.case-draft-quick__confirm[hidden] {
  display: none;
}

/* mentre si conferma, i comandi sotto non devono restare raggiungibili con la tastiera */
.case-draft-quick.is-confirming .case-quick__bar {
  visibility: hidden;
}

.case-draft-quick__confirm > span {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--asser-deep);
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.3;
}

.case-draft-quick__confirm small {
  display: block;
  margin-top: 0.15rem;
  color: var(--asser-muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.case-draft-quick__cancel,
.case-draft-quick__danger {
  flex: none;
  min-height: 40px;
  padding: 0 1rem;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.case-draft-quick__cancel {
  background: rgba(29, 29, 31, 0.07);
  color: var(--asser-deep);
}

.case-draft-quick__cancel:hover {
  background: rgba(29, 29, 31, 0.12);
}

.case-draft-quick__danger {
  background: #d70015;
  color: #fff;
}

.case-draft-quick__danger:hover {
  background: #b4001a;
}

.case-draft-quick.is-busy .case-draft-quick__confirm {
  opacity: 0.6;
}

.case-draft-quick button:disabled {
  cursor: progress;
}

.case-list-item.is-removing {
  overflow: hidden;
  margin-bottom: -0.7rem;
  opacity: 0;
  transform: scale(0.985);
  transition: height 0.3s ease, margin 0.3s ease, opacity 0.22s ease, transform 0.3s ease;
}

.case-list-item.is-removing .case-draft-quick {
  display: none;
}

/* pratica in attesa di risposte: sotto i 900px i comandi scendono in fondo alla scheda, a destra */
@media (max-width: 900px) {
  .case-list-item--answers .case-list-link {
    padding-right: 1.35rem;
    padding-bottom: 4.6rem;
  }

  .case-list-item--answers .case-quick__bar {
    top: auto;
    right: 1.1rem;
    bottom: 0.9rem;
    left: 1.1rem;
    justify-content: flex-end;
    transform: none;
  }
}

@keyframes draftConfirmIn {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: none; }
}

/* l'animazione di ingresso scorre riga per riga anche ora che ogni riga e' dentro un contenitore */
.live-enter .case-list-item:nth-child(1) .case-list-link { animation-delay: 0.10s; }
.live-enter .case-list-item:nth-child(2) .case-list-link { animation-delay: 0.14s; }
.live-enter .case-list-item:nth-child(3) .case-list-link { animation-delay: 0.18s; }
.live-enter .case-list-item:nth-child(4) .case-list-link { animation-delay: 0.22s; }
.live-enter .case-list-item:nth-child(5) .case-list-link { animation-delay: 0.26s; }
.live-enter .case-list-item:nth-child(n+6) .case-list-link { animation-delay: 0.3s; }

@media (max-width: 560px) {
  /* telefono: solo l'icona, e la conferma occupa tutta la riga con il testo che va a capo */
  .case-list-item--draft .case-list-link {
    padding-right: 4.4rem;
  }

  .case-list-item--draft .case-quick__bar {
    right: 0.6rem;
  }

  .case-list-item--draft .case-draft-quick__trigger {
    width: 44px;
    height: 44px;
    padding: 0;
  }

  .case-list-item--draft .case-draft-quick__trigger span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .case-draft-quick__confirm {
    padding: 0 0.7rem 0 1rem;
    border-radius: 16px;
  }

  .case-draft-quick__confirm > span {
    font-size: 0.82rem;
  }

  .case-draft-quick__cancel,
  .case-draft-quick__danger {
    padding: 0 0.8rem;
  }

  /* lo stato "In attesa delle Sue risposte" e' lungo: sul telefono va a capo invece di uscire dalla scheda */
  .case-list-item--answers .case-list-link em.case-chip {
    white-space: normal;
    line-height: 1.25;
  }

  /* pratica in attesa di risposte: i due comandi dividono la larghezza della scheda, con il testo ben leggibile */
  .case-list-item--answers .case-quick__bar {
    right: 0.9rem;
    bottom: 0.8rem;
    left: 0.9rem;
  }

  .case-list-item--answers .case-quick__resume,
  .case-list-item--answers .case-draft-quick__trigger {
    flex: 1 1 0;
    min-height: 44px;
    font-size: 0.85rem;
  }

  /* la conferma va su due righe: domanda sopra, poi "Annulla" ed "Elimina" a tutta larghezza */
  .case-draft-quick--answers .case-draft-quick__confirm {
    flex-wrap: wrap;
    align-content: center;
    gap: 0.55rem;
    padding: 0.8rem 0.9rem;
  }

  .case-draft-quick--answers .case-draft-quick__confirm > span {
    flex: 1 1 100%;
  }

  .case-draft-quick--answers .case-draft-quick__cancel,
  .case-draft-quick--answers .case-draft-quick__danger {
    flex: 1 1 0;
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .case-draft-quick__confirm,
  .case-list-item.is-removing,
  .case-draft-quick__trigger,
  .case-quick__resume {
    animation: none;
    transition: none;
  }
}


/* ---------- Dettaglio pratica in attesa delle risposte: "Riprendi" + "Elimina" ---------- */
.case-resume-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem 1.4rem;
  margin: 1rem 0 0;
  padding: 1rem 1.15rem;
  border-radius: 18px;
  background: rgba(214, 124, 15, 0.08);
  color: var(--asser-deep);
  font-size: 0.88rem;
  line-height: 1.45;
}

.case-resume-bar p {
  flex: 1 1 260px;
  margin: 0;
}

.case-resume-bar p strong {
  display: block;
  color: var(--asser-deep);
  font-weight: 700;
}

.case-resume-bar p span {
  color: var(--asser-muted);
}

.case-resume-bar__actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.5rem;
}

.case-resume-bar__delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 1rem;
  border: 0;
  border-radius: 999px;
  background: rgba(215, 0, 21, 0.07);
  color: #b4132a;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.case-resume-bar__delete:hover,
.case-resume-bar__delete:focus-visible {
  background: rgba(215, 0, 21, 0.14);
}

.case-resume-bar__delete:active {
  transform: scale(0.96);
}

.case-resume-bar__delete:focus-visible {
  outline: 3px solid rgba(215, 0, 21, 0.3);
  outline-offset: 2px;
}

@media (max-width: 560px) {
  .case-resume-bar__actions {
    width: 100%;
  }

  .case-resume-bar__actions .case-quick__resume,
  .case-resume-bar__actions .case-resume-bar__delete {
    flex: 1 1 0;
    min-height: 44px;
    font-size: 0.85rem;
  }
}

/* avviso del percorso guidato quando si riprende una pratica scelta dall'elenco */
.wizard-resumed-banner--list {
  border-left-width: 0;
  border-radius: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .case-resume-bar__delete {
    transition: none;
  }
}


/* ===== Grafiche di caricamento in stile Apple (kit .ld-*) - inizio =====
   Blocco unico e aggiuntivo: per tornare indietro basta togliere tutto fino a "fine kit caricamento".
   Colori dal tema del sito; con "riduci movimento" attivo le animazioni diventano pulsazioni leggere.
   Pezzi: .ld-spinner (12 lineette), .ld-dots (puntini), .ld-ring (anello), .ld-bar (barra), .ld-skel (scheletro),
   .ld-doc (documento che si legge), .ld-stage (attesa lunga), .ld-hud (invio file), .ld-steps (fasi), .ld-check. */
:root {
  --ld-ink: #1d1d1f;
  --ld-sub: #6e6e73;
  --ld-accent: var(--asser-primary, #7d445e);
  --ld-accent-2: var(--asser-secondary, #4b2338);
  --ld-glow: var(--asser-blush, #c98faa);
  --ld-track: rgba(120, 120, 128, 0.18);
  --ld-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ld-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Rotellina a 12 lineette (come iOS) ---------- */
.ld-spinner {
  position: relative;
  display: inline-block;
  flex: none;
  width: var(--ld-size, 20px);
  height: var(--ld-size, 20px);
  color: currentColor;
  vertical-align: middle;
}

.ld-spinner i {
  position: absolute;
  top: 0;
  left: 46%;
  width: 8%;
  height: 26%;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.16;
  transform-origin: 50% 192%;
  animation: ld-tick 1s linear infinite;
}

.ld-spinner i:nth-child(1) { transform: rotate(0deg); animation-delay: -1s; }
.ld-spinner i:nth-child(2) { transform: rotate(30deg); animation-delay: -0.9167s; }
.ld-spinner i:nth-child(3) { transform: rotate(60deg); animation-delay: -0.8333s; }
.ld-spinner i:nth-child(4) { transform: rotate(90deg); animation-delay: -0.75s; }
.ld-spinner i:nth-child(5) { transform: rotate(120deg); animation-delay: -0.6667s; }
.ld-spinner i:nth-child(6) { transform: rotate(150deg); animation-delay: -0.5833s; }
.ld-spinner i:nth-child(7) { transform: rotate(180deg); animation-delay: -0.5s; }
.ld-spinner i:nth-child(8) { transform: rotate(210deg); animation-delay: -0.4167s; }
.ld-spinner i:nth-child(9) { transform: rotate(240deg); animation-delay: -0.3333s; }
.ld-spinner i:nth-child(10) { transform: rotate(270deg); animation-delay: -0.25s; }
.ld-spinner i:nth-child(11) { transform: rotate(300deg); animation-delay: -0.1667s; }
.ld-spinner i:nth-child(12) { transform: rotate(330deg); animation-delay: -0.0833s; }

@keyframes ld-tick {
  from { opacity: 1; }
  to { opacity: 0.16; }
}

/* ---------- Puntini "sta scrivendo" (come Messaggi) ---------- */
.ld-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 1em;
  color: #8e8e93;
}

.ld-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.35;
  animation: ld-dot 1.3s ease-in-out infinite;
}

.ld-dots i:nth-child(2) { animation-delay: 0.16s; }
.ld-dots i:nth-child(3) { animation-delay: 0.32s; }

@keyframes ld-dot {
  0%, 60%, 100% { opacity: 0.35; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-4px); }
}

/* ---------- Anello di avanzamento (come gli anelli di Apple) ---------- */
.ld-ring {
  position: relative;
  display: inline-grid;
  flex: none;
  place-items: center;
  width: var(--ld-size, 120px);
  height: var(--ld-size, 120px);
}

.ld-ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: rotate(-90deg);
}

.ld-ring__track {
  fill: none;
  stroke: var(--ld-track);
  stroke-width: 9;
}

.ld-ring__arc {
  fill: none;
  stroke: var(--ld-accent);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 0.9s var(--ld-ease);
}

.ld-ring__center {
  position: relative;
  display: grid;
  justify-items: center;
  line-height: 1;
  text-align: center;
}

.ld-ring__value {
  color: var(--ld-ink);
  font-family: "Sora", "Manrope", ui-sans-serif, system-ui, sans-serif;
  font-size: calc(var(--ld-size, 120px) * 0.27);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.ld-ring__unit {
  margin-top: 0.2em;
  color: var(--ld-sub);
  font-size: calc(var(--ld-size, 120px) * 0.1);
  font-weight: 650;
}

.ld-ring--indeterminate svg {
  animation: ld-spin 1.4s linear infinite;
}

.ld-ring--indeterminate .ld-ring__arc {
  stroke-dasharray: 26 74;
  stroke-dashoffset: 0;
  transition: none;
}

@keyframes ld-spin {
  from { transform: rotate(-90deg); }
  to { transform: rotate(270deg); }
}

@keyframes ld-rot {
  to { transform: rotate(360deg); }
}

/* ---------- Barra (come lo scaricamento dell'App Store) ---------- */
.ld-bar {
  position: relative;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--ld-track);
}

.ld-bar > i {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--p, 0%);
  overflow: hidden;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ld-accent), var(--ld-glow));
  transition: width 0.8s var(--ld-ease);
}

.ld-bar > i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: translateX(-100%);
  animation: ld-sheen 1.8s ease-in-out infinite;
}

.ld-bar--indeterminate > i {
  width: 38%;
  transition: none;
  animation: ld-slide 1.5s ease-in-out infinite;
}

@keyframes ld-sheen {
  to { transform: translateX(100%); }
}

@keyframes ld-slide {
  from { transform: translateX(-110%); }
  to { transform: translateX(270%); }
}

/* ---------- Scheletro che brilla (mentre arrivano i contenuti) ---------- */
.ld-skel-wrap {
  display: grid;
  gap: 0.75rem;
}

.ld-skel {
  display: block;
  height: 0.95rem;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(120, 120, 128, 0.12) 25%, rgba(120, 120, 128, 0.22) 37%, rgba(120, 120, 128, 0.12) 63%);
  background-size: 400% 100%;
  animation: ld-shimmer 1.4s ease infinite;
}

.ld-skel--card {
  height: 4.2rem;
  border-radius: 16px;
}

.ld-skel--short { width: 56%; }
.ld-skel--mid { width: 78%; }

@keyframes ld-shimmer {
  from { background-position: 100% 50%; }
  to { background-position: 0 50%; }
}

/* ---------- Documento che si legge ---------- */
.ld-doc {
  position: relative;
  display: block;
  width: 40px;
  height: 52px;
  overflow: hidden;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 0 0 1.5px rgba(75, 35, 56, 0.16), 0 8px 18px rgba(75, 35, 56, 0.16);
}

.ld-doc::before {
  content: "";
  position: absolute;
  top: 22%;
  right: 20%;
  left: 20%;
  height: 48%;
  border-radius: 2px;
  background: repeating-linear-gradient(to bottom, rgba(75, 35, 56, 0.22) 0 3px, transparent 3px 9px);
}

.ld-doc::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 18px;
  background: linear-gradient(to bottom, transparent, rgba(125, 68, 94, 0.36), transparent);
  animation: ld-scan 2.4s ease-in-out infinite;
}

@keyframes ld-scan {
  0% { opacity: 0; transform: translateY(-18px); }
  15%, 85% { opacity: 1; }
  100% { opacity: 0; transform: translateY(52px); }
}

/* ---------- Attesa lunga: anello, alone e messaggi ---------- */
.ld-stage {
  display: grid;
  justify-items: center;
  gap: 0.85rem;
  padding: clamp(1.2rem, 4vw, 2rem) 0.5rem;
  text-align: center;
}

.ld-stage__art {
  position: relative;
  display: grid;
  place-items: center;
  width: 176px;
  height: 176px;
  isolation: isolate;
}

.ld-stage__art::before {
  content: "";
  position: absolute;
  inset: 8%;
  z-index: -1;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--ld-glow), var(--ld-accent), #ecc9d9, var(--ld-accent-2), var(--ld-glow));
  filter: blur(26px);
  opacity: 0.5;
  animation: ld-orbit 10s linear infinite;
  will-change: transform; /* l'alone sfocato viene ruotato come un livello gia' pronto: niente ricalcolo a ogni fotogramma */
}

.ld-stage__art::after {
  content: "";
  position: absolute;
  inset: 24%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 58%, rgba(255, 255, 255, 0) 74%);
}

.ld-stage__art .ld-ring {
  --ld-size: 132px;
}

@keyframes ld-orbit {
  to { transform: rotate(360deg); }
}

.ld-stage__title {
  margin: 0;
  color: var(--ld-ink);
  font-family: "Sora", "Manrope", ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.ld-stage__text {
  min-height: 3em;
  max-width: 36ch;
  margin: 0;
  color: var(--ld-sub);
  font-size: 1rem;
  line-height: 1.5;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.ld-stage__text.is-swapping {
  opacity: 0;
  transform: translateY(5px);
}

.ld-stage__note {
  max-width: 44ch;
  margin: 0;
  color: var(--ld-sub);
  font-size: 0.82rem;
  line-height: 1.5;
}

.ld-stage.is-stopped .ld-stage__art,
.ld-stage.is-stopped .ld-stage__text {
  display: none;
}

.ld-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ld-chips li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 100%;
  padding: 0.3rem 0.7rem 0.3rem 0.5rem;
  border-radius: 999px;
  background: rgba(120, 120, 128, 0.12);
  color: var(--ld-ink);
  font-size: 0.78rem;
  font-weight: 600;
}

.ld-chips li span {
  overflow: hidden;
  max-width: 14rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ld-chips svg {
  flex: none;
  color: var(--ld-accent);
}

/* ---------- Invio dei file: finestra al centro (come iOS) ---------- */
.ld-hud {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(29, 29, 31, 0.28);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: ld-fade 0.2s ease both;
}

.ld-hud[hidden] {
  display: none;
}

.ld-hud__card {
  display: grid;
  justify-items: center;
  gap: 0.7rem;
  width: min(300px, 100%);
  padding: 1.5rem 1.25rem 1.3rem;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: saturate(180%) blur(26px);
  backdrop-filter: saturate(180%) blur(26px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
  text-align: center;
  animation: ld-pop 0.32s var(--ld-ease) both;
}

.ld-hud__title {
  margin: 0;
  color: var(--ld-ink);
  font-family: "Sora", "Manrope", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.ld-hud__text {
  margin: 0;
  color: var(--ld-sub);
  font-size: 0.86rem;
  line-height: 1.45;
}

.ld-hud__cancel {
  margin-top: 0.2rem;
  padding: 0.55rem 1rem;
  border: 0;
  border-radius: 999px;
  background: rgba(120, 120, 128, 0.14);
  color: var(--ld-ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.ld-hud__cancel[hidden] {
  display: none;
}

.ld-hud__cancel:hover {
  background: rgba(120, 120, 128, 0.24);
}

.ld-hud__cancel:disabled {
  opacity: 0.5;
  cursor: progress;
}

@keyframes ld-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes ld-pop {
  from { opacity: 0; transform: scale(0.94) translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Fasi dell'analisi ---------- */
.ld-steps {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ld-steps li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
  color: var(--ld-sub);
  font-size: 0.86rem;
  line-height: 1.35;
}

.ld-steps li::before {
  content: "";
  width: 18px;
  height: 18px;
  box-sizing: border-box;
  border: 2px solid var(--ld-track);
  border-radius: 50%;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.ld-steps li.is-done {
  color: var(--ld-ink);
}

.ld-steps li.is-done::before {
  border-color: transparent;
  background: var(--ld-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5.5 12.5 4.3 4.3L18.5 8'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.ld-steps li.is-now {
  color: var(--ld-ink);
  font-weight: 650;
}

.ld-steps li.is-now::before {
  border-color: var(--ld-accent);
  border-top-color: transparent;
  animation: ld-rot 0.9s linear infinite;
}

/* ---------- Spunta che si disegna ---------- */
.ld-check {
  width: 64px;
  height: 64px;
}

.ld-check circle {
  fill: none;
  stroke: var(--ld-accent);
  stroke-width: 4;
  stroke-dasharray: 176;
  stroke-dashoffset: 176;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  animation: ld-draw 0.7s var(--ld-ease) 0.05s forwards;
}

.ld-check path {
  fill: none;
  stroke: var(--ld-accent);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 44;
  stroke-dashoffset: 44;
  animation: ld-draw 0.45s var(--ld-ease) 0.6s forwards;
}

@keyframes ld-draw {
  to { stroke-dashoffset: 0; }
}

/* ---------- Pulsante in attesa ---------- */
.portal-button.ld-busy,
.ld-busy {
  pointer-events: none;
}

.ld-busy .ld-spinner {
  --ld-size: 16px;
  margin-right: 0.5rem;
}

/* ---------- Rispetto di "riduci movimento" ---------- */
@media (prefers-reduced-motion: reduce) {
  .ld-spinner i {
    opacity: 0.55;
    animation: ld-pulse 1.8s ease-in-out infinite;
  }

  .ld-dots i {
    animation: ld-pulse 1.8s ease-in-out infinite;
  }

  .ld-ring--indeterminate svg,
  .ld-stage__art::before,
  .ld-steps li.is-now::before,
  .ld-bar > i::after,
  .ld-doc::after {
    animation: none;
  }

  .ld-ring--indeterminate .ld-ring__arc {
    animation: ld-pulse 1.8s ease-in-out infinite;
  }

  .ld-doc::after {
    opacity: 1;
    transform: translateY(18px);
  }

  .ld-bar--indeterminate > i {
    width: 100%;
    animation: ld-pulse 1.8s ease-in-out infinite;
  }

  .ld-skel {
    animation: none;
  }

  .ld-hud,
  .ld-hud__card {
    animation: none;
  }

  .ld-ring__arc,
  .ld-bar > i,
  .ld-stage__text {
    transition: none;
  }

  .ld-check circle,
  .ld-check path {
    animation: none;
    stroke-dashoffset: 0;
  }
}

@keyframes ld-pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.9; }
}

@media print {
  .ld-hud {
    display: none;
  }
}
/* spunta di "invio completato": verde come gli altri esiti positivi del portale */
.success-mark--draw {
  width: 64px;
  height: 64px;
  background: none;
  --ld-accent: #1f8a4c;
}
/* ===== fine kit caricamento ===== */

/* ---------- Scheda dell'analisi in corso (dettaglio pratica) - inizio ---------- */
.case-analysis {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem 1.7rem;
  margin: 0 0 1rem;
  padding: 1.25rem 1.45rem;
  border: 1px solid rgba(29, 29, 31, 0.07);
  border-radius: 24px;
  background: linear-gradient(160deg, #fff 0%, rgba(246, 241, 236, 0.92) 100%);
  box-shadow: 0 1px 2px rgba(29, 29, 31, 0.04), 0 16px 38px rgba(29, 29, 31, 0.06);
}

.case-analysis__ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  isolation: isolate;
}

.case-analysis__ring::before {
  content: "";
  position: absolute;
  inset: 12%;
  z-index: -1;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--ld-glow), var(--ld-accent), #ecc9d9, var(--ld-accent-2), var(--ld-glow));
  filter: blur(22px);
  opacity: 0.38;
  animation: ld-orbit 12s linear infinite;
  will-change: transform;
}

.case-analysis__ring::after {
  content: "";
  position: absolute;
  inset: 22%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 60%, rgba(255, 255, 255, 0) 76%);
}

.case-analysis__body {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
}

.case-analysis__kicker {
  margin: 0;
  color: var(--asser-primary);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

/* quanto manca (19/10/2026): sotto la fase, discreto, numeri tabellari */
.case-analysis__eta,
.case-progress__eta {
  margin: 0.35rem 0 0;
  color: var(--asser-muted, #6e6e73);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.case-analysis__eta[hidden],
.case-progress__eta[hidden] {
  display: none;
}

.case-analysis__label {
  color: var(--ld-ink);
  font-family: "Sora", "Manrope", ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.case-analysis .ld-steps {
  margin-top: 0.55rem;
}

.case-analysis .description {
  margin: 0.65rem 0 0;
  color: var(--ld-sub);
  font-size: 0.8rem;
  line-height: 1.5;
}

/* senza percentuale: al centro il documento che si legge; con la percentuale: il numero */
.case-analysis .ld-ring--indeterminate .ld-ring__value,
.case-analysis .ld-ring--indeterminate .ld-ring__unit {
  display: none;
}

.case-analysis .ld-ring:not(.ld-ring--indeterminate) .ld-doc {
  display: none;
}

@media (max-width: 560px) {
  .case-analysis {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    padding: 1.1rem 1rem 1.2rem;
    text-align: center;
  }

  .case-analysis .ld-steps {
    justify-items: start;
    width: min(100%, 320px);
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .case-analysis__ring::before {
    animation: none;
  }
}
/* ---------- fine scheda analisi ---------- */

/* ---------- Chat: puntini "sta scrivendo" - inizio ---------- */
.portal-chat__message--loading {
  display: inline-flex;
  align-items: center;
  min-height: 2.5em;
  padding-block: 0.8rem;
}

.portal-chat__message--loading .ld-dots {
  color: #8e8e93;
}
/* ---------- fine chat ---------- */

/* ---------- Rottamazione: voce nel menu laterale, scheda dei professionisti e pagina del gestionale - inizio ---------- */
/* il piccolo "New" (stile in asser-ai-rottamazione.css, plugin Sito pubblico) accanto alla voce del menu laterale */
.dashboard-view-nav .rot-new {
  margin-left: 0.45rem;
  top: -0.35em;
}

/* scheda "Rottamazione": la sezione del sito dentro l'area clienti */
.dashboard-rottamazione {
  min-width: 0;
}

.dashboard-rottamazione .enti-check {
  margin-top: 0;
}

/* gestionale: pagina "Avviso rottamazione" */
.staff-rot__status {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--asser-border);
  border-radius: 18px;
  background: #fff;
}

.staff-rot__dot {
  flex: none;
  width: 12px;
  height: 12px;
  margin-top: 0.3rem;
  border-radius: 50%;
}

.staff-rot__dot--on {
  background: #34c759;
  box-shadow: 0 0 0 4px rgba(52, 199, 89, 0.2);
}

.staff-rot__dot--off {
  background: #a8a8ad;
  box-shadow: 0 0 0 4px rgba(168, 168, 173, 0.22);
}

.staff-rot__status strong {
  display: block;
  color: var(--asser-secondary);
  font-size: 1rem;
}

.staff-rot__status p {
  margin: 0.2rem 0 0;
  color: var(--asser-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.staff-rot__status b {
  color: var(--asser-secondary);
  font-weight: 700;
}

.staff-rot__form {
  margin-top: 1rem;
}

.staff-rot__switches {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--asser-border);
  border-radius: 20px;
  background: #fff;
}

.staff-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1rem 1.15rem;
  cursor: pointer;
}

.staff-switch + .staff-switch {
  border-top: 1px solid rgba(29, 29, 31, 0.08);
}

.staff-switch--sub {
  padding-left: 1.6rem;
  transition: opacity 0.2s ease;
}

.staff-switch__text {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.staff-switch__text strong {
  color: #1d1d1f;
  font-size: 0.95rem;
  font-weight: 650;
}

.staff-switch__text small {
  color: var(--asser-muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.staff-switch__control {
  position: relative;
  flex: none;
}

.staff-switch__control input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.staff-switch__track {
  position: relative;
  display: block;
  width: 51px;
  height: 31px;
  border-radius: 999px;
  background: #e5e5ea;
  transition: background-color 0.25s ease;
}

.staff-switch__track i {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
  transition: transform 0.28s cubic-bezier(0.3, 0.9, 0.3, 1.1);
}

.staff-switch__control input:checked + .staff-switch__track {
  background: #34c759;
}

.staff-switch__control input:checked + .staff-switch__track i {
  transform: translateX(20px);
}

.staff-switch__control input:focus-visible + .staff-switch__track {
  outline: 3px solid rgba(125, 68, 94, 0.4);
  outline-offset: 2px;
}

.staff-rot__form.is-master-off .staff-switch--sub {
  opacity: 0.45;
}

.staff-rot__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem 1.1rem;
  margin-top: 1rem;
}

.staff-rot__link {
  color: var(--asser-primary);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
}

.staff-rot__link:hover {
  text-decoration: underline;
}

.staff-rot__reset {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1rem 1.15rem;
  border: 1px dashed rgba(75, 35, 56, 0.22);
  border-radius: 18px;
}

.staff-rot__reset strong {
  display: block;
  color: var(--asser-secondary);
  font-size: 0.95rem;
}

.staff-rot__reset small {
  display: block;
  margin-top: 0.15rem;
  color: var(--asser-muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.staff-rot__reset .asser-ai-button {
  flex: none;
}

.staff-rot__meta {
  margin: 1.1rem 0 0;
  color: var(--asser-muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .staff-switch {
    padding: 0.9rem;
  }

  .staff-switch--sub {
    padding-left: 1.1rem;
  }

  .staff-rot__reset {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .staff-switch__track,
  .staff-switch__track i,
  .staff-switch--sub {
    transition: none;
  }
}
/* ---------- fine rottamazione (menu laterale, scheda, gestionale) ---------- */

/* ---------- Shop: schede con offerte, etichette multiple e prezzo barrato; gestionale "Shop e prezzi" ---------- */
.pw-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-self: flex-start;
}

.pw-tile__price--offer {
  flex-wrap: wrap;
}

.pw-tile__was {
  color: var(--asser-muted);
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

.pw-tile__off {
  padding: 0.16rem 0.55rem;
  border-radius: 999px;
  background: var(--asser-primary);
  color: #fff;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.staff-shop__status {
  margin-top: 1.25rem;
}

.staff-shop__group {
  margin-top: 2rem;
}

.staff-shop__group h2 {
  margin: 0;
  color: var(--asser-secondary);
  font-size: 1.3rem;
  letter-spacing: -0.015em;
}

.staff-shop__group-lead {
  margin: 0.3rem 0 0;
  color: var(--asser-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.staff-shop__list {
  display: grid;
  gap: 0.8rem;
  margin-top: 0.9rem;
}

.staff-shop__item {
  min-width: 0;
  border: 1px solid var(--asser-border);
  border-radius: 20px;
  background: #fff;
  transition: box-shadow 0.22s ease, border-color 0.22s ease;
}

.staff-shop__item:hover {
  box-shadow: 0 10px 30px rgba(40, 18, 30, 0.07);
}

.staff-shop__item:target,
.staff-shop__card[open] {
  border-radius: 20px;
}

.staff-shop__item:target {
  border-color: var(--asser-primary);
}

.staff-shop__summary {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 12.5rem minmax(0, 1.5fr) auto;
  align-items: center;
  gap: 0.6rem 1.3rem;
  padding: 1.05rem 1.25rem;
  border-radius: 20px;
  cursor: pointer;
  list-style: none;
}

.staff-shop__summary::-webkit-details-marker {
  display: none;
}

.staff-shop__summary:focus-visible {
  outline: 3px solid rgba(125, 68, 94, 0.4);
  outline-offset: -3px;
}

.staff-shop__sum-name {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.staff-shop__sum-name strong {
  color: #1d1d1f;
  font-size: 1.08rem;
  font-weight: 700;
}

.staff-shop__sum-name small {
  color: var(--asser-muted);
  font-size: 0.8rem;
}

.staff-shop__sum-price {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  white-space: nowrap;
}

.staff-shop__sum-price b {
  color: var(--asser-text);
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.staff-shop__sum-price del {
  color: var(--asser-muted);
  font-size: 0.88rem;
}

.staff-shop__sum-price small {
  color: var(--asser-muted);
  font-size: 0.8rem;
}

.staff-shop__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-width: 0;
}

.staff-shop__pill {
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: rgba(125, 68, 94, 0.1);
  color: var(--asser-primary);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.staff-shop__pill--on {
  background: rgba(52, 199, 89, 0.16);
  color: #1c6f34;
}

.staff-shop__pill--paused {
  background: rgba(255, 159, 10, 0.2);
  color: #7d4b00;
}

.staff-shop__pill--hidden {
  background: rgba(142, 142, 147, 0.22);
  color: #4d4d52;
}

.staff-shop__pill--offer {
  background: var(--asser-primary);
  color: #fff;
}

.staff-shop__pill--mod {
  border: 1px dashed rgba(75, 35, 56, 0.35);
  background: #fff;
  color: var(--asser-muted);
}

.staff-shop__chev {
  width: 10px;
  height: 10px;
  margin: 0 0.3rem 0.25rem 0;
  border-right: 2px solid var(--asser-muted);
  border-bottom: 2px solid var(--asser-muted);
  transform: rotate(45deg);
  transition: transform 0.25s ease;
}

.staff-shop__card[open] .staff-shop__chev {
  margin-bottom: -0.25rem;
  transform: rotate(-135deg);
}

.staff-shop__body {
  padding: 0.2rem 1.25rem 1.3rem;
  border-top: 1px solid rgba(29, 29, 31, 0.08);
}

.staff-shop__card[open] .staff-shop__body {
  animation: staffShopIn 0.3s ease;
}

@keyframes staffShopIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.staff-shop__alert {
  margin: 1rem 0 0;
  padding: 0.7rem 0.9rem;
  border-left: 4px solid #a12d45;
  border-radius: 0 10px 10px 0;
  background: #fff0f3;
  color: #842138;
  font-size: 0.88rem;
  font-weight: 700;
}

.staff-shop__cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 390px);
  gap: 1.6rem;
  align-items: start;
  margin-top: 1rem;
}

.staff-shop__fields {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.staff-shop__set {
  min-width: 0;
  margin: 0;
  padding: 0.9rem 1.1rem 1.1rem;
  border: 1px solid var(--asser-border);
  border-radius: 16px;
}

.staff-shop__set legend {
  padding: 0 0.4rem;
  color: var(--asser-secondary);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.staff-shop__radios {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.3rem;
}

.staff-shop__radio {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid rgba(75, 35, 56, 0.14);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.staff-shop__radio:hover {
  border-color: rgba(125, 68, 94, 0.45);
}

.staff-shop__radio:has(input:checked) {
  border-color: var(--asser-primary);
  background: rgba(125, 68, 94, 0.06);
}

.staff-shop__radio input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0.15rem 0 0;
  accent-color: var(--asser-primary);
}

.staff-shop__radio input:focus-visible {
  outline: 3px solid rgba(125, 68, 94, 0.4);
  outline-offset: 2px;
}

.staff-shop__radio span {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.staff-shop__radio strong {
  color: #1d1d1f;
  font-size: 0.92rem;
}

.staff-shop__radio small {
  color: var(--asser-muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.staff-shop__field {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  margin-top: 0.7rem;
  color: var(--asser-secondary);
  font-size: 0.76rem;
  font-weight: 800;
}

.staff-shop__field em {
  color: var(--asser-muted);
  font-style: normal;
  font-weight: 600;
}

.staff-shop__field small {
  color: var(--asser-muted);
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.45;
}

.staff-shop__field input[type="text"],
.staff-shop__field input[type="date"],
.staff-shop__field select,
.staff-shop__field textarea {
  width: 100%;
  min-height: 46px;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(75, 35, 56, 0.16);
  border-radius: 12px;
  background: #fff;
  color: var(--asser-text);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  outline: none;
}

.staff-shop__field textarea {
  min-height: 118px;
  line-height: 1.5;
  resize: vertical;
}

.staff-shop__field textarea[rows="2"] {
  min-height: 76px;
}

.staff-shop__field select {
  padding-right: 2.4rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1.5 1.5 7 7l5.5-5.5' fill='none' stroke='%23726b67' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 0.95rem center;
  background-repeat: no-repeat;
  -webkit-appearance: none;
  appearance: none;
}

.staff-shop__field input:focus,
.staff-shop__field select:focus,
.staff-shop__field textarea:focus {
  border-color: var(--asser-primary);
  outline: 3px solid rgba(125, 68, 94, 0.18);
  outline-offset: 2px;
}

.staff-shop__field [aria-invalid="true"],
.staff-shop__field [aria-invalid="true"]:focus {
  border-color: #a12d45;
  background: #fff7f8;
}

.staff-shop__field [aria-invalid="true"]:focus {
  outline-color: rgba(161, 45, 69, 0.22);
}

.staff-shop__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0 0.8rem;
}

.staff-shop__hint {
  margin: 0.7rem 0 0;
  color: var(--asser-muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.staff-shop__hint--warn {
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  background: rgba(255, 159, 10, 0.13);
  color: #7d4b00;
}

.staff-shop__error {
  display: block;
  margin-top: 0.45rem;
  color: #a12d45;
  font-size: 0.8rem;
  font-weight: 700;
}

.staff-shop__switches {
  overflow: hidden;
  margin-top: 0.3rem;
  border: 1px solid var(--asser-border);
  border-radius: 14px;
}

.staff-shop__switch {
  margin: 0.2rem -0.4rem 0;
}

.staff-shop__offer [data-shop-offer-fields],
.staff-shop__offer .staff-shop__hint {
  transition: opacity 0.2s ease;
}

.staff-shop__offer.is-off [data-shop-offer-fields],
.staff-shop__offer.is-off .staff-shop__hint {
  opacity: 0.45;
}

.staff-shop__preview {
  position: sticky;
  top: 1rem;
  display: grid;
  gap: 0.7rem;
  min-width: 0;
  padding: 1.1rem;
  border: 1px solid var(--asser-border);
  border-radius: 20px;
  background: var(--asser-sand);
}

.staff-shop__preview-title {
  margin: 0;
  color: var(--asser-secondary);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.staff-shop__tile {
  grid-template-columns: minmax(0, 1fr);
}

.staff-shop__tile-wrap {
  min-width: 0;
}

.staff-shop__tile-wrap.is-hidden {
  opacity: 0.5;
  outline: 2px dashed rgba(75, 35, 56, 0.3);
  outline-offset: 4px;
  border-radius: 24px;
}

.staff-shop__preview .pw-tile:hover {
  transform: none;
  box-shadow: 0 1px 2px rgba(40, 18, 30, 0.04);
}

.staff-shop__preview .pw-button {
  pointer-events: none;
}

.staff-shop__preview .pw-button.is-paused {
  opacity: 0.45;
}

.staff-shop__preview-note {
  min-height: 1.2em;
  margin: 0;
  color: var(--asser-muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.staff-shop__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem 1.1rem;
  margin-top: 1.3rem;
}

.staff-shop__reset-form {
  display: none;
}

.staff-shop__log {
  margin-top: 2.2rem;
}

.staff-shop__log h2 {
  margin: 0;
  color: var(--asser-secondary);
  font-size: 1.3rem;
  letter-spacing: -0.015em;
}

.staff-shop__log-list {
  margin: 0.9rem 0 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--asser-border);
  border-radius: 18px;
  background: #fff;
  list-style: none;
}

.staff-shop__log-list li {
  display: grid;
  grid-template-columns: 12.5rem 8rem minmax(0, 1fr);
  gap: 0.3rem 1rem;
  padding: 0.75rem 1rem;
  font-size: 0.86rem;
  line-height: 1.45;
}

.staff-shop__log-list li + li {
  border-top: 1px solid rgba(29, 29, 31, 0.08);
}

.staff-shop__log-when {
  color: var(--asser-muted);
}

.staff-shop__log-what {
  color: var(--asser-text);
  overflow-wrap: anywhere;
}

@media (max-width: 960px) {
  .staff-shop__cols {
    grid-template-columns: minmax(0, 1fr);
  }

  .staff-shop__preview {
    position: static;
  }

  .staff-shop__summary {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .staff-shop__sum-price {
    grid-column: 1;
    grid-row: 2;
  }

  .staff-shop__pills {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .staff-shop__chev {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (max-width: 920px) {
  .staff-shop__field input[type="text"],
  .staff-shop__field input[type="date"],
  .staff-shop__field select,
  .staff-shop__field textarea {
    font-size: 16px;
  }
}

@media (max-width: 380px) {
  .staff-shop__body {
    padding: 0.2rem 0.75rem 1rem;
  }

  .staff-shop__set {
    padding: 0.75rem 0.7rem 0.9rem;
  }
}

@media (max-width: 640px) {
  .staff-shop__summary {
    padding: 0.95rem 1rem;
  }

  .staff-shop__body {
    padding: 0.2rem 1rem 1.1rem;
  }

  .staff-shop__set {
    padding: 0.8rem 0.85rem 1rem;
  }

  .staff-shop__log-list li {
    grid-template-columns: minmax(0, 1fr);
  }

  .staff-shop__actions .asser-ai-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .staff-shop__item,
  .staff-shop__chev,
  .staff-shop__radio,
  .staff-shop__offer [data-shop-offer-fields],
  .staff-shop__offer .staff-shop__hint {
    transition: none;
  }

  .staff-shop__card[open] .staff-shop__body {
    animation: none;
  }
}
/* ---------- fine Shop e prezzi ---------- */

/* ---------- conferma dell'e-mail alla registrazione: campo trappola, schermate di accesso, riquadri del gestionale ---------- */
.auth-hp {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.auth-shell .asser-ai-portal__success,
.auth-shell .asser-ai-portal__error {
  margin-top: 1.2rem;
}

.auth-card--note {
  gap: 0.7rem;
  font-size: 0.92rem;
  line-height: 1.6;
}

.auth-card--note p {
  margin: 0;
}

.auth-card--note a,
.auth-card--resend + .auth-links a {
  color: var(--asser-primary);
  font-weight: 700;
}

.auth-card--resend {
  margin-top: 1.2rem;
}

.auth-card__title {
  margin: 0;
  color: var(--asser-secondary);
  font-size: 0.95rem;
  font-weight: 800;
}

.staff-client-card__pending-badge--mail {
  background: rgba(161, 45, 69, 0.12);
  color: #842138;
}

.staff-verif {
  margin: 1.25rem 0 1rem;
  padding: 1.1rem 1.25rem 1.2rem;
  border: 1px solid var(--asser-border);
  border-radius: 20px;
  background: #fff;
}

.staff-verif__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.8rem;
}

.staff-verif__head h2 {
  margin: 0;
  color: var(--asser-secondary);
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.staff-verif__pill {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: rgba(125, 68, 94, 0.1);
  color: var(--asser-primary);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.staff-verif__pill--ok {
  background: rgba(52, 199, 89, 0.16);
  color: #1c6f34;
}

.staff-verif__pill--off {
  background: rgba(142, 142, 147, 0.22);
  color: #4d4d52;
}

.staff-verif__pill--pending {
  background: rgba(255, 159, 10, 0.2);
  color: #7d4b00;
}

.staff-verif__lead {
  margin: 0.5rem 0 0;
  color: var(--asser-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.staff-verif__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.7rem;
  margin: 0.9rem 0 0;
}

.staff-verif__stats div {
  padding: 0.7rem 0.85rem;
  border-radius: 14px;
  background: var(--asser-sand);
}

.staff-verif__stats dt {
  color: var(--asser-muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.staff-verif__stats dd {
  margin: 0.2rem 0 0;
  color: var(--asser-secondary);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.staff-verif__filter {
  margin: 0.8rem 0 0;
  color: var(--asser-muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.staff-verif__filter a {
  color: var(--asser-primary);
  font-weight: 700;
}

.staff-verif__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 0.8rem;
  margin-top: 0.9rem;
}

.staff-verif__form {
  margin: 0;
}

.staff-verif__client {
  margin-top: 0.9rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--asser-border);
  border-radius: 16px;
  background: #fff;
}

.staff-verif__client.is-pending {
  border-color: rgba(255, 159, 10, 0.5);
  background: rgba(255, 159, 10, 0.06);
}

.staff-verif__status {
  margin: 0;
  color: var(--asser-text);
  font-size: 0.86rem;
  line-height: 1.6;
}

.staff-verif__warn {
  display: block;
  margin-top: 0.3rem;
  color: #842138;
  font-weight: 700;
}

.staff-verif__client .staff-verif__actions {
  margin-top: 0.7rem;
}

@media (max-width: 640px) {
  .staff-verif {
    padding: 1rem;
  }

  .staff-verif__form {
    flex: 1 1 100%;
  }

  .staff-verif__actions .asser-ai-button {
    width: 100%;
  }
}
/* ---------- fine conferma dell'e-mail ---------- */


/* ASSER chat v2 — scoped to the assistant; shared visual baseline in both plugins. */
body .asser-ai-app .portal-chat.portal-chat--v2 {
  --chat-line: rgba(75, 35, 56, .12);
  --chat-muted: #726b67;
  font-family: "Manrope", ui-sans-serif, system-ui, sans-serif;
  color: var(--asser-text, #252129);
}
body .asser-ai-app .portal-chat--v2 .portal-chat__panel {
  display: flex; flex-direction: column; width: min(410px, calc(100vw - 32px));
  height: min(640px, calc(100vh - 116px)); height: min(640px, calc(100dvh - 116px));
  max-height: calc(100dvh - 116px); overflow: hidden;
  border: 1px solid rgba(255,255,255,.82); border-radius: 28px;
  background: rgba(251,248,245,.98);
  box-shadow: 0 28px 80px rgba(44,31,41,.2), 0 0 0 1px var(--chat-line);
  opacity: 0; transform: translateY(14px) scale(.99); transform-origin: bottom right;
  pointer-events: none; animation: none;
  transition: opacity 300ms cubic-bezier(.4,0,.2,1), transform 300ms cubic-bezier(.4,0,.2,1);
}
body .asser-ai-app .portal-chat--v2.portal-chat--shown .portal-chat__panel {
  opacity: 1; transform: none; pointer-events: auto;
  transition-duration: 400ms; transition-timing-function: cubic-bezier(.22,1,.36,1);
}
body .asser-ai-app .portal-chat--v2 .portal-chat__panel[hidden] { display: none; }
body .asser-ai-app .portal-chat--v2 .portal-chat__header {
  flex: 0 0 auto; padding: 18px 18px 16px 22px; border-bottom: 1px solid var(--chat-line);
  background: rgba(255,255,255,.8); color: var(--asser-secondary, #4b2338);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
}
body .asser-ai-app .portal-chat--v2 .portal-chat__header strong { font-size: 15px; letter-spacing: -.025em; }
body .asser-ai-app .portal-chat--v2 .portal-chat__header small { margin-top: 4px; color: var(--chat-muted); font-size: 12px; }
body .asser-ai-app .portal-chat--v2 .portal-chat__avatar {
  width: 44px; height: 44px; border-radius: 15px;
  background: linear-gradient(145deg, #f4e9ed, #ead9e2); box-shadow: inset 0 0 0 1px rgba(75,35,56,.06);
}
body .asser-ai-app .portal-chat--v2 .portal-chat__close {
  width: 36px; height: 36px; min-width: 36px; margin: 0; border-radius: 50%;
  color: var(--chat-muted); background: rgba(75,35,56,.06);
}
body .asser-ai-app .portal-chat--v2 .portal-chat__close:hover { background: rgba(75,35,56,.12); }
body .asser-ai-app .portal-chat--v2 .portal-chat__messages {
  flex: 1 1 auto; min-height: 0; height: auto; gap: 16px; padding: 24px 20px;
  overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  background: radial-gradient(ellipse at 100% 0, rgba(201,143,170,.09), transparent 70%), #fbf8f5;
  scrollbar-width: thin; scrollbar-color: #ded2d7 transparent;
}
body .asser-ai-app .portal-chat--v2 .portal-chat__welcome { padding: 8px 4px 12px; }
body .asser-ai-app .portal-chat--v2 .portal-chat__eyebrow {
  display: block; margin-bottom: 14px; color: var(--asser-primary, #7d445e); font-size: 10px; font-weight: 800; letter-spacing: .09em;
}
body .asser-ai-app .portal-chat--v2 .portal-chat__welcome h2 {
  margin: 0 0 12px; color: var(--asser-secondary, #4b2338);
  font: 600 25px/1.22 "Sora", ui-sans-serif, system-ui, sans-serif; letter-spacing: -.045em;
}
body .asser-ai-app .portal-chat--v2 .portal-chat__welcome p { margin: 0; font-size: 14px; line-height: 1.65; color: var(--chat-muted); }
body .asser-ai-app .portal-chat--v2 .portal-chat__access { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--chat-line); }
body .asser-ai-app .portal-chat--v2 .portal-chat__access a { text-decoration: none; }
body .asser-ai-app .portal-chat--v2 .portal-chat__access-primary {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 50px;
  margin-top: 20px; padding: 12px 20px; border-radius: 999px;
  background: var(--asser-secondary, #4b2338); color: #fff; font-size: 14px; font-weight: 700;
  box-shadow: 0 8px 18px rgba(75,35,56,.15);
}
body .asser-ai-app .portal-chat--v2 .portal-chat__access-secondary { display: block; padding: 16px 0 0; font-size: 12px; text-align: center; color: var(--asser-primary, #7d445e); }
body .asser-ai-app .portal-chat--v2 .portal-chat__message {
  flex: 0 0 auto; max-width: 92%; padding: 13px 16px; border-radius: 20px; font-size: 14px; line-height: 1.65;
  overflow-wrap: anywhere; word-break: normal; box-shadow: 0 2px 4px rgba(44,31,41,.025);
}
body .asser-ai-app .portal-chat--v2 .portal-chat__message p { margin: 0; color: inherit; font: inherit; white-space: pre-wrap; }
body .asser-ai-app .portal-chat--v2 .portal-chat__message--assistant { border-color: var(--chat-line); border-bottom-left-radius: 6px; }
body .asser-ai-app .portal-chat--v2 .portal-chat__message--user { border: 0; border-bottom-right-radius: 6px; background: var(--asser-secondary, #4b2338); color: #fff; }
body .asser-ai-app .portal-chat--v2 .portal-chat__origin { display: block; margin: 0 0 7px; font-size: 10px; font-weight: 800; color: var(--asser-primary, #7d445e); letter-spacing: .035em; }
body .asser-ai-app .portal-chat--v2 .portal-chat__sources { display: grid; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--chat-line); }
body .asser-ai-app .portal-chat--v2 .portal-chat__sources a { display: block; margin: 0; padding: 7px 0; color: var(--asser-secondary, #4b2338); font-size: 12px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
body .asser-ai-app .portal-chat--v2 .portal-chat__quick-actions {
  flex: 0 0 auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; padding: 12px 18px 4px; overflow: visible; background: #fff;
}
body .asser-ai-app .portal-chat--v2 .portal-chat__quick-actions button,
body .asser-ai-app .portal-chat--v2 .portal-chat__retry {
  min-height: 36px; padding: 8px 13px; border: 1px solid var(--chat-line); border-radius: 999px;
  background: #fbf8f5; color: var(--asser-secondary, #4b2338); font: 700 12px/1.25 "Manrope", sans-serif; cursor: pointer;
}
body .asser-ai-app .portal-chat--v2 .portal-chat__retry { margin-top: 10px; }
body .asser-ai-app .portal-chat--v2 .portal-chat__quick-actions button:hover { background: var(--asser-alt-bg, #f4e9ed); }
body .asser-ai-app .portal-chat--v2 .portal-chat__form { flex: 0 0 auto; padding: 12px 18px 8px; gap: 8px; background: #fff; }
body .asser-ai-app .portal-chat--v2 .portal-chat__form input {
  height: 48px; padding: 0 16px; border: 1px solid var(--chat-line); border-radius: 999px;
  background: #f7f4f2; color: var(--asser-text, #252129); font: 500 16px/1.4 "Manrope", sans-serif;
}
body .asser-ai-app .portal-chat--v2 .portal-chat__form input::placeholder { color: var(--chat-muted); opacity: 1; }
body .asser-ai-app .portal-chat--v2 .portal-chat__form button {
  display: grid; place-items: center; width: 48px; min-width: 48px; height: 48px; padding: 0;
  border: 0; border-radius: 50%; background: var(--asser-secondary, #4b2338); color: #fff;
}
body .asser-ai-app .portal-chat--v2 button:disabled { opacity: .45; cursor: wait; }
body .asser-ai-app .portal-chat--v2 .portal-chat__resources {
  flex: 0 0 auto; display: flex; justify-content: center; flex-wrap: wrap; gap: 0 18px; padding: 2px 16px; background: #fff;
}
body .asser-ai-app .portal-chat--v2 .portal-chat__resources a { display: inline-flex; align-items: center; min-height: 34px; font-size: 11px; font-weight: 700; color: var(--asser-primary, #7d445e); text-decoration: none; }
body .asser-ai-app .portal-chat--v2 .portal-chat__resources a:hover { text-decoration: underline; }
body .asser-ai-app .portal-chat--v2 .portal-chat__note { flex: 0 0 auto; margin: 0; padding: 2px 18px 14px; font: 400 10px/1.5 "Manrope", sans-serif; text-align: center; color: var(--chat-muted); background: #fff; }
body .asser-ai-app .portal-chat--v2 :is(a,button,input):focus-visible { outline: 2px solid var(--asser-primary, #7d445e); outline-offset: 3px; }
body .asser-ai-app .portal-chat--v2 .portal-chat__launcher { min-height: 56px; padding: 6px 20px 6px 6px; border: 1px solid rgba(255,255,255,.32); background: linear-gradient(135deg, #7d445e, #4b2338); box-shadow: 0 12px 32px rgba(75,35,56,.22); }
body .asser-ai-app .portal-chat--v2 .portal-chat__launcher .portal-chat__launcher-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; width: auto; height: auto; background: none; border-radius: 0; }
body .asser-ai-app .portal-chat--v2 .portal-chat__launcher-copy b { font-size: 9px; font-weight: 700; letter-spacing: .09em; opacity: .8; }
body .asser-ai-app .portal-chat--v2 .portal-chat__launcher-copy strong { font-size: 12px; font-weight: 700; }
@media (max-width: 920px) {
  body .asser-ai-app .portal-chat--v2 .portal-chat__launcher { width: 52px; height: 52px; min-height: 52px; padding: 5px; }
  body .asser-ai-app .portal-chat--v2 .portal-chat__launcher .portal-chat__launcher-copy { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
}
@media (max-width: 640px) {
  body .asser-ai-app .portal-chat--v2 .portal-chat__panel {
    position: fixed; left: 0; right: 0; bottom: var(--m-kb, 0px); width: 100%;
    height: min(86vh, 680px); height: min(86dvh, 680px); max-height: min(86dvh, 680px);
    padding-bottom: env(safe-area-inset-bottom, 0px); border: 0; border-radius: 28px 28px 0 0;
    transform: translateY(22px); transform-origin: bottom center;
  }
  body .asser-ai-app .portal-chat.portal-chat--v2.portal-chat--open::before {
    opacity: 0; animation: none; transition: opacity 300ms cubic-bezier(.4,0,.2,1);
  }
  body .asser-ai-app .portal-chat.portal-chat--v2.portal-chat--open.portal-chat--shown::before {
    opacity: 1; transition-duration: 400ms; transition-timing-function: cubic-bezier(.22,1,.36,1);
  }
  body .asser-ai-app .portal-chat--v2 .portal-chat__header { padding: 24px 16px 14px 20px; border-radius: 28px 28px 0 0; }
  body .asser-ai-app .portal-chat--v2 .portal-chat__header::before { background: #d8cdd2; }
  body .asser-ai-app .portal-chat--v2 .portal-chat__close { width: 44px; height: 44px; }
  body .asser-ai-app .portal-chat--v2 .portal-chat__messages { padding: 20px 16px; }
  body .asser-ai-app .portal-chat--v2 .portal-chat__eyebrow { font-size: 11px; }
  body .asser-ai-app .portal-chat--v2 .portal-chat__message { font-size: 15px; }
  body .asser-ai-app .portal-chat--v2 .portal-chat__quick-actions { padding: 8px 16px 0; }
  body .asser-ai-app .portal-chat--v2 .portal-chat__quick-actions button { min-height: 44px; }
  body .asser-ai-app .portal-chat--v2 .portal-chat__resources a { min-height: 44px; font-size: 12px; }
  body .asser-ai-app .portal-chat--v2 .portal-chat__note { font-size: 11px; padding-bottom: 10px; }
}
@media (max-width: 640px) {
  body .asser-ai-app .portal-chat--v2.portal-chat--keyboard .portal-chat__quick-actions,
  body .asser-ai-app .portal-chat--v2.portal-chat--keyboard .portal-chat__resources,
  body .asser-ai-app .portal-chat--v2.portal-chat--keyboard .portal-chat__note { display: none; }
}
@media (max-height: 540px) {
  body .asser-ai-app .portal-chat--v2 .portal-chat__quick-actions,
  body .asser-ai-app .portal-chat--v2 .portal-chat__note { display: none; }
  body .asser-ai-app .portal-chat--v2 .portal-chat__header { padding-top: 18px; padding-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  body .asser-ai-app .portal-chat--v2, body .asser-ai-app .portal-chat--v2 *, body .asser-ai-app .portal-chat--v2::before { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Topic recommendations use only catalogued destinations from the public plugin. */
body .asser-ai-app .portal-chat--v2 .portal-chat__recommendations { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--chat-line); }
body .asser-ai-app .portal-chat--v2 .portal-chat__message .portal-chat__recommendations-title { margin: 0 0 2px; font-size: 11px; font-weight: 700; color: var(--asser-secondary, #4b2338); }
body .asser-ai-app .portal-chat--v2 .portal-chat__recommendation { display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; padding: 12px; border: 1px solid var(--chat-line); border-radius: 14px; background: #fbf8f5; text-decoration: none; color: #4b2338; overflow-wrap: anywhere; }
body .asser-ai-app .portal-chat--v2 .portal-chat__recommendation:hover { background: #f5eef1; }
body .asser-ai-app .portal-chat--v2 .portal-chat__recommendation strong { font-size: 12px; line-height: 1.5; }
body .asser-ai-app .portal-chat--v2 .portal-chat__recommendation span { font-size: 11px; line-height: 1.6; font-weight: 400; color: #62585e; }
/* ===== Chatbot: pulsante fluttuante "AI attiva" e domande per tutti (aggiunta del 15 ottobre 2026) - inizio =====
   Il pulsante resta in basso a destra (mai nell'intestazione): una capsula prugna con la gemma, "AI attiva" con il puntino verde e
   "Chiedi all'AI" (le scritte le mette lo script, asser-ai-shell.js; senza lo script resta il pulsante di prima). Sul telefono e' la
   stessa capsula, piu' compatta. Se in basso c'e' il riquadro dei cookie (computer) il pulsante sale sopra di lui.
   Chi non ha fatto l'accesso trova nel pannello le proposte e il campo per scrivere: stesso aspetto del chatbot dell'area clienti. */

/* ---- il pulsante ---- */
body .asser-ai-app .portal-chat--v2 .portal-chat__launcher.portal-chat__launcher--live {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: auto;
  min-width: 0;
  height: auto;
  min-height: 60px;
  padding: 6px 22px 6px 6px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: linear-gradient(135deg, #8a4c69 0%, #4b2338 100%);
  box-shadow: 0 16px 36px rgba(75, 35, 56, 0.3), 0 2px 6px rgba(44, 31, 41, 0.14);
  color: #fff;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease;
}

body .asser-ai-app .portal-chat--v2 .portal-chat__launcher.portal-chat__launcher--live:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(75, 35, 56, 0.34), 0 2px 6px rgba(44, 31, 41, 0.14);
}

body .asser-ai-app .portal-chat--v2 .portal-chat__launcher.portal-chat__launcher--live:active {
  transform: scale(0.97);
}

body .asser-ai-app .portal-chat--v2 .portal-chat__launcher.portal-chat__launcher--live:focus-visible {
  outline: 3px solid rgba(125, 68, 94, 0.55);
  outline-offset: 3px;
}

body .asser-ai-app .portal-chat--v2 .portal-chat__launcher--live .portal-chat__launcher-logo {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

body .asser-ai-app .portal-chat--v2 .portal-chat__launcher.portal-chat__launcher--live .portal-chat__launcher-copy {
  position: static;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  width: auto;
  height: auto;
  padding: 0;
  overflow: visible;
  clip: auto;
  border-radius: 0;
  background: none;
  white-space: nowrap;
}

body .asser-ai-app .portal-chat--v2 .portal-chat__launcher--live .portal-chat__live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.86);
  font: 800 10.5px/1 "Manrope", ui-sans-serif, system-ui, -apple-system, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 1;
}

/* (le regole vecchie del telefono nascondevano questa riga sotto i 760 px: qui torna sempre visibile) */
body .asser-ai-app .portal-chat--v2 .portal-chat__launcher--live .portal-chat__launcher-copy strong {
  display: block;
  color: #fff;
  font: 700 15.5px/1.15 "Manrope", ui-sans-serif, system-ui, -apple-system, sans-serif;
  letter-spacing: -0.01em;
}

/* il puntino verde "attiva": pulsa piano (fermo con "riduci animazioni") */
body .asser-ai-app .portal-chat .portal-chat__live-dot {
  position: relative;
  display: inline-block;
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34c759;
  box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.55);
  animation: pc-live 2.4s ease-out infinite;
}

@keyframes pc-live {
  0% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(52, 199, 89, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0); }
}

/* intestazione del pannello: "Intelligenza artificiale attiva" con il puntino */
body .asser-ai-app .portal-chat--v2 .portal-chat__header small.portal-chat__header-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

/* il riquadro dei cookie in basso (computer): il pulsante e il pannello salgono sopra di lui */
@media (min-width: 921px) {
  body .asser-ai-app .portal-chat.portal-chat--lifted {
    bottom: calc(1.15rem + var(--pc-lift, 0px));
  }

  body .asser-ai-app .portal-chat--v2.portal-chat--lifted .portal-chat__panel {
    max-height: calc(100vh - 116px - var(--pc-lift, 0px));
    max-height: calc(100dvh - 116px - var(--pc-lift, 0px));
  }
}

/* telefono e tablet: la stessa capsula, piu' compatta (prima era un tondo senza scritte) */
@media (max-width: 920px) {
  body .asser-ai-app .portal-chat--v2 .portal-chat__launcher.portal-chat__launcher--live {
    justify-content: flex-start;
    gap: 9px;
    width: auto;
    height: auto;
    min-height: 52px;
    padding: 5px 17px 5px 5px;
  }

  body .asser-ai-app .portal-chat--v2 .portal-chat__launcher--live .portal-chat__launcher-logo {
    width: 42px;
    height: 42px;
  }

  body .asser-ai-app .portal-chat--v2 .portal-chat__launcher--live .portal-chat__live {
    font-size: 9.5px;
  }

  body .asser-ai-app .portal-chat--v2 .portal-chat__launcher--live .portal-chat__launcher-copy strong {
    font-size: 14.5px;
  }
}

/* ---- il pannello ---- */

/* le proposte rapide: pillole larghe quanto il testo, su una riga; nessuna resta da sola sotto le altre.
   Solo sugli schermi non bassi: sotto i 540 px di altezza (telefono in orizzontale) il chatbot le nasconde, e cosi' resta. */
@media not all and (max-height: 540px) {
  body .asser-ai-app .portal-chat--v2 .portal-chat__quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
  }
}

body .asser-ai-app .portal-chat--v2 .portal-chat__quick-actions button {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* il campo dove si scrive: mentre si scrive il bordo diventa prugna con un alone leggero (non un secondo bordo staccato) */
body .asser-ai-app .portal-chat--v2 .portal-chat__form input:focus,
body .asser-ai-app .portal-chat--v2 .portal-chat__form input:focus-visible {
  outline: none;
  border-color: rgba(125, 68, 94, 0.55);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(125, 68, 94, 0.12);
}

/* chi non ha fatto l'accesso, se il chatbot per tutti non c'e': solo il benvenuto e "Accedi alla chat", pannello alto quanto serve */
body .asser-ai-app .portal-chat--v2[data-authenticated="0"]:not(.portal-chat--guest-ai) .portal-chat__panel {
  height: auto;
}

/* chatbot per tutti: dopo la prima domanda le proposte si tolgono (piu' spazio alla conversazione) */
body .asser-ai-app .portal-chat--v2.portal-chat--guest-started .portal-chat__quick-actions--guest {
  display: none;
}

/* chatbot per tutti: la riga "Hai un account? Accedi" sotto il benvenuto (selettore piu' forte di quello dei paragrafi del benvenuto,
   che toglie i margini: senza, la linea sottile toccava il testo sopra) */
body .asser-ai-app .portal-chat--v2 .portal-chat__welcome p.portal-chat__guest-login,
body .asser-ai-app .portal-chat--v2 .portal-chat__guest-login {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--chat-line, rgba(75, 35, 56, 0.12));
  color: var(--chat-muted, #726b67);
  font-size: 13px;
  line-height: 1.55;
}

body .asser-ai-app .portal-chat--v2 .portal-chat__guest-login a {
  color: var(--asser-primary, #7d445e);
  font-weight: 700;
  text-decoration: none;
}

body .asser-ai-app .portal-chat--v2 .portal-chat__guest-login a:hover {
  text-decoration: underline;
}

/* campo esca per i robot: fuori dallo schermo, mai raggiungibile */
body .asser-ai-app .portal-chat .portal-chat__trap {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

body .asser-ai-app .portal-chat .screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
  border: 0;
}

/* "sta scrivendo": tre puntini */
body .asser-ai-app .portal-chat--v2 .portal-chat__typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 18px;
}

body .asser-ai-app .portal-chat--v2 .portal-chat__typing i {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--asser-primary, #7d445e);
  opacity: 0.35;
  animation: pc-typing 1.2s ease-in-out infinite;
}

body .asser-ai-app .portal-chat--v2 .portal-chat__typing i:nth-child(2) {
  animation-delay: 0.15s;
}

body .asser-ai-app .portal-chat--v2 .portal-chat__typing i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes pc-typing {
  0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

/* telefono: le proposte scorrono di lato con il dito (come i suggerimenti delle app), testo piu' grande */
@media (max-width: 640px) {
  body .asser-ai-app .portal-chat--v2 .portal-chat__quick-actions {
    flex-wrap: nowrap;
    gap: 8px;
    padding: 10px 16px 2px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-padding-inline: 16px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  body .asser-ai-app .portal-chat--v2 .portal-chat__quick-actions::-webkit-scrollbar {
    display: none;
  }

  body .asser-ai-app .portal-chat--v2 .portal-chat__quick-actions button {
    min-height: 44px;
    padding: 0 17px;
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    scroll-snap-align: start;
  }

  body .asser-ai-app .portal-chat--v2 .portal-chat__quick-actions button:active {
    background: var(--asser-alt-bg, #f4e9ed);
  }
}

@media (prefers-reduced-motion: reduce) {
  body .asser-ai-app .portal-chat .portal-chat__live-dot,
  body .asser-ai-app .portal-chat--v2 .portal-chat__typing i {
    animation: none;
  }

  body .asser-ai-app .portal-chat--v2 .portal-chat__launcher.portal-chat__launcher--live,
  body .asser-ai-app .portal-chat--v2 .portal-chat__launcher.portal-chat__launcher--live:hover {
    transform: none;
    transition: none;
  }
}
/* ===== Chatbot: pulsante fluttuante "AI attiva" e domande per tutti - fine ===== */

/* ===== ASSER COIN: la moneta disegnata (aggiunta del 14 ottobre 2026) - inizio ===== */
/* ASSER COIN: la moneta di ASSER AI, disegnata come una moneta vera (oro rosa, bordo zigrinato, gioiello in rilievo, scritta lungo il bordo)
   e la versione in 3D con lo spessore, il riflesso che scorre e il conteggio del saldo che "rotola". Solo CSS e un piccolo SVG senza id:
   nessun conflitto con il resto della pagina. Con "riduci animazioni" la moneta e' ferma e i numeri compaiono subito. */

/* ---- la moneta piatta (accanto ai numeri, nelle schede, nel portafoglio) ---- */
.ac-coin {
  --ac: 1.15em;
  position: relative;
  display: inline-block;
  flex: none;
  width: var(--ac);
  height: var(--ac);
  border-radius: 50%;
  vertical-align: -0.24em;
  isolation: isolate;
  -webkit-user-select: none;
  user-select: none;
}

.ac-coin--md {
  --ac: 44px;
}

.ac-coin--lg {
  --ac: 120px;
}

/* il bordo: metallo oro rosa (riflessi tutto intorno) con la zigrinatura delle monete vere */
.ac-coin__rim {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.3) 0deg 1.25deg, rgba(104, 44, 74, 0.26) 1.25deg 2.5deg),
    conic-gradient(from 215deg, #fbe6ee, #e0a9bf, #a3607f, #cf93ad, #f6d6e2, #b97a99, #e9bacb, #fbe6ee);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45), inset 0 -1px 2px rgba(80, 28, 54, 0.35), 0 1px 2px rgba(60, 20, 40, 0.28);
}

/* piccola: senza zigrinatura (sotto i 24 px sarebbe solo rumore) */
.ac-coin--sm .ac-coin__rim {
  background: conic-gradient(from 215deg, #fbe6ee, #dca2b9, #a3607f, #cf93ad, #f6d6e2, #b97a99, #fbe6ee);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.5), 0 0.5px 1.5px rgba(60, 20, 40, 0.35);
}

/* il campo: leggermente incavato, con la luce in alto a sinistra */
.ac-coin__face {
  position: absolute;
  inset: 10%;
  overflow: hidden;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 27%, #fff7fa 0, #f6d3e0 26%, #e2a9c0 58%, #b8728f 100%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.85),
    inset 0 -2px 4px rgba(92, 34, 62, 0.32),
    0 0 0 1px rgba(122, 62, 92, 0.22);
}

.ac-coin--sm .ac-coin__face {
  inset: 13%;
  box-shadow: inset 0 0.5px 0.5px rgba(255, 255, 255, 0.85), inset 0 -1px 1.5px rgba(92, 34, 62, 0.3);
}

.ac-coin__mark {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* la scritta lungo il bordo: incisa (scura con un filo di luce sotto) */
.ac-coin__txt {
  fill: rgba(112, 50, 80, 0.78);
  font-family: "Sora", "Manrope", ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 7.4px;
  font-weight: 800;
  letter-spacing: 0;
  text-anchor: middle;
}

.ac-coin__txt--light {
  fill: rgba(255, 255, 255, 0.6);
}

/* il grande "AI" sul retro */
.ac-coin__txt--big {
  font-size: 27px;
}

/* il riflesso: una lama di luce che attraversa la moneta (solo dove serve: animazione sotto) */
.ac-coin__shine {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 50%;
  pointer-events: none;
}

.ac-coin__shine::before {
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: -60%;
  width: 45%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.75) 45%, rgba(255, 255, 255, 0.95) 50%, rgba(255, 255, 255, 0.75) 55%, rgba(255, 255, 255, 0));
  content: "";
  opacity: 0;
  transform: skewX(-14deg);
}

/* ---- la moneta "in 3D" (portafoglio, Shop, "Come funziona") ----
   Il giro e' fatto come nelle monete animate classiche, senza 3D vero (cosi' si vede uguale su ogni browser e telefono): la moneta si
   stringe fino a mostrarsi di taglio (compare il bordo zigrinato), a meta' giro si vede il retro, poi torna il fronte. */
.ac3 {
  --ac: 128px;
  --ac-t: calc(var(--ac) * 0.085);
  position: relative;
  display: inline-block;
  flex: none;
  width: var(--ac);
  height: calc(var(--ac) * 1.18);
  -webkit-user-select: none;
  user-select: none;
}

.ac3--sm {
  --ac: 88px;
}

.ac3__tilt {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--ac);
  height: var(--ac);
  transform: perspective(calc(var(--ac) * 6)) rotateX(var(--ac-rx, 0deg)) rotateY(var(--ac-ry, 0deg));
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ac3__spin {
  position: absolute;
  inset: 0;
}

.ac3__face {
  position: absolute;
  inset: 0;
}

.ac3__face .ac-coin {
  --ac: 100%;
  display: block;
  width: 100%;
  height: 100%;
}

.ac3__face--back {
  visibility: hidden;
}

/* il bordo della moneta vista di taglio: una striscia di metallo zigrinato, larga quanto lo spessore */
.ac3__edge {
  position: absolute;
  top: 1%;
  bottom: 1%;
  left: 50%;
  width: var(--ac-t);
  margin-left: calc(var(--ac-t) / -2);
  border-radius: calc(var(--ac-t) / 2);
  background:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0 1px, rgba(104, 44, 74, 0.28) 1px 2.5px),
    linear-gradient(90deg, #8f5070, #e7b4c8 45%, #fbe6ee 55%, #b97a99);
  opacity: 0;
  transform: scaleX(0);
}

/* l'ombra sul "pavimento": si stringe quando la moneta sale */
.ac3__floor {
  position: absolute;
  bottom: 0;
  left: 18%;
  width: 64%;
  height: calc(var(--ac) * 0.1);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(60, 20, 40, 0.32), rgba(60, 20, 40, 0));
  filter: blur(2px);
}

/* ---- conteggio che rotola (il saldo): ogni cifra e' una colonna 0-9 che scorre fino al valore ---- */
.ac-odo {
  display: inline-flex;
  align-items: baseline;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ac-odo__d {
  position: relative;
  display: inline-block;
  height: 1.15em;
  overflow: hidden;
  line-height: 1.15;
}

.ac-odo__d > span {
  display: flex;
  flex-direction: column;
  transform: translateY(calc(var(--ac-v, 0) * -1.15em));
  transition: transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--ac-i, 0) * 70ms);
}

.ac-odo__d > span > b {
  display: block;
  height: 1.15em;
  font-weight: inherit;
  line-height: 1.15;
}

.ac-odo__sep {
  display: inline-block;
}

/* chi legge con lo screen reader sente il numero vero, non le colonne */
.ac-sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---- pila di monete (pacchetti nello Shop): da 1 a 4, a ventaglio ---- */
.ac-stack {
  --ac: 40px;
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  height: calc(var(--ac) * 1.25);
}

.ac-stack .ac-coin {
  --ac: inherit;
  width: var(--ac);
  height: var(--ac);
  margin-left: calc(var(--ac) * -0.52);
  box-shadow: -3px 2px 6px rgba(60, 20, 40, 0.22);
  transform: translateY(calc(var(--ac-k, 0) * var(--ac) * -0.09));
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ac-stack .ac-coin:first-child {
  margin-left: 0;
}

.ac-stack .ac-coin:nth-child(1) { --ac-k: 0; z-index: 1; }
.ac-stack .ac-coin:nth-child(2) { --ac-k: 1; z-index: 2; }
.ac-stack .ac-coin:nth-child(3) { --ac-k: 2; z-index: 3; }
.ac-stack .ac-coin:nth-child(4) { --ac-k: 3; z-index: 4; }

/* ---- movimento (solo se consentito) ---- */
@media (prefers-reduced-motion: no-preference) {
  /* un giro della moneta: si stringe (fronte), di taglio (bordo), si allarga (retro), di taglio, di nuovo il fronte */
  @keyframes ac3-turn {
    0%,
    50%,
    100% {
      transform: scaleX(1);
      filter: brightness(1);
      animation-timing-function: cubic-bezier(0.45, 0, 0.75, 0.6);
    }

    25%,
    75% {
      transform: scaleX(0.04);
      filter: brightness(0.82);
      animation-timing-function: cubic-bezier(0.25, 0.4, 0.55, 1);
    }
  }

  @keyframes ac3-front {
    0%,
    24.9%,
    75.1%,
    100% {
      visibility: visible;
    }

    25%,
    75% {
      visibility: hidden;
    }
  }

  @keyframes ac3-back {
    0%,
    24.9%,
    75.1%,
    100% {
      visibility: hidden;
    }

    25%,
    75% {
      visibility: visible;
    }
  }

  @keyframes ac3-side {
    0%,
    12%,
    38%,
    62%,
    88%,
    100% {
      opacity: 0;
      transform: scaleX(0);
    }

    25%,
    75% {
      opacity: 1;
      transform: scaleX(1);
    }
  }

  /* ingresso: cade dall'alto, rimbalza appena e si posa */
  @keyframes ac3-drop {
    0% {
      opacity: 0;
      transform: perspective(calc(var(--ac) * 6)) translateY(-38%) scale(0.74);
    }

    30% {
      opacity: 1;
    }

    72% {
      transform: perspective(calc(var(--ac) * 6)) translateY(3%) scale(1.02);
    }

    86% {
      transform: perspective(calc(var(--ac) * 6)) translateY(-1.5%) scale(1);
    }

    100% {
      opacity: 1;
      transform: perspective(calc(var(--ac) * 6)) rotateX(var(--ac-rx, 0deg)) rotateY(var(--ac-ry, 0deg));
    }
  }

  /* a riposo: sospesa, sale e scende piano */
  @keyframes ac3-float {
    0%,
    100% {
      translate: 0 0;
    }

    50% {
      translate: 0 -4%;
    }
  }

  @keyframes ac3-floor {
    0%,
    100% {
      transform: scale(1);
      opacity: 1;
    }

    50% {
      transform: scale(0.84);
      opacity: 0.7;
    }
  }

  @keyframes ac-shine {
    0% {
      left: -60%;
      opacity: 0;
    }

    12% {
      opacity: 1;
    }

    55%,
    100% {
      left: 120%;
      opacity: 0;
    }
  }

  @keyframes ac-spin-once {
    0%,
    100% {
      transform: scaleX(1);
    }

    25%,
    75% {
      transform: scaleX(0.08);
    }

    50% {
      transform: scaleX(-1);
    }
  }

  /* prima di arrivare sullo schermo la moneta non si vede (lo script la fa entrare); senza script e' ferma e visibile */
  .ac-js .ac3[data-ac3]:not(.is-in):not(.is-idle):not(.is-flip) .ac3__tilt {
    opacity: 0;
  }

  /* ingresso: cade e intanto fa tre giri, sempre piu' lenti */
  .ac-js .ac3.is-in .ac3__tilt {
    animation: ac3-drop 1.5s cubic-bezier(0.2, 0.9, 0.25, 1) both;
  }

  .ac-js .ac3.is-in .ac3__spin {
    animation: ac3-turn 0.5s 3;
  }

  .ac-js .ac3.is-in .ac3__face--front {
    animation: ac3-front 0.5s step-end 3;
  }

  .ac-js .ac3.is-in .ac3__face--back {
    animation: ac3-back 0.5s step-end 3;
  }

  .ac-js .ac3.is-in .ac3__edge {
    animation: ac3-side 0.5s linear 3;
  }

  /* toccata: un giro intero */
  .ac-js .ac3.is-flip .ac3__spin {
    animation: ac3-turn 0.9s 1;
  }

  .ac-js .ac3.is-flip .ac3__face--front {
    animation: ac3-front 0.9s step-end 1;
  }

  .ac-js .ac3.is-flip .ac3__face--back {
    animation: ac3-back 0.9s step-end 1;
  }

  .ac-js .ac3.is-flip .ac3__edge {
    animation: ac3-side 0.9s linear 1;
  }

  /* a riposo: sospesa; ogni tanto passa la luce */
  .ac-js .ac3.is-idle .ac3__tilt,
  .ac-js .ac3.is-flip .ac3__tilt {
    animation: ac3-float 6s ease-in-out infinite;
  }

  .ac-js .ac3.is-idle .ac3__floor {
    animation: ac3-floor 6s ease-in-out infinite;
  }

  .ac-js .ac3.is-idle .ac3__face--front .ac-coin__shine::before {
    animation: ac-shine 7s ease-in-out 0.4s infinite;
  }

  .ac-js .ac3[data-ac3] {
    cursor: pointer;
  }

  /* la moneta piccola fa un giro al passaggio del mouse (portafoglio in alto, schede) */
  .ac-spin-hover:hover .ac-coin,
  .ac-spin-hover:focus-visible .ac-coin {
    animation: ac-spin-once 0.8s cubic-bezier(0.3, 0.7, 0.2, 1);
  }

  .ac-coin--md .ac-coin__shine::before,
  .ac-coin--lg .ac-coin__shine::before {
    animation: ac-shine 6.5s ease-in-out 1s infinite;
  }

  /* pila: al passaggio del mouse la moneta in cima si solleva */
  .ac-stack-host:hover .ac-stack .ac-coin:last-child {
    transform: translateY(calc(var(--ac-k, 0) * var(--ac) * -0.09 - var(--ac) * 0.22)) rotate(-8deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ac-odo__d > span {
    transition: none;
  }
}

@media print {
  .ac3__floor,
  .ac-coin__shine {
    display: none;
  }
}
/* ===== ASSER COIN: la moneta disegnata - fine ===== */

/* ===== ASSER COIN nell'area clienti, nello Shop e nel costo della relazione - inizio ===== */
.wallet-chip .ac-coin {
  --ac: 22px;
  margin-left: -0.15rem;
}

/* il portafoglio: la moneta in 3D a destra, il saldo che rotola */
.pw-wallet-card.pw-wallet-card--coin {
  position: relative;
}

.pw-wallet-card--coin .ac3 {
  --ac: 96px;
  position: absolute;
  top: 1.1rem;
  right: 1.2rem;
}

.pw-wallet-card--coin .pw-wallet-card__head,
.pw-wallet-card--coin .pw-wallet-card__balance {
  padding-right: 110px;
}

/* il saldo e la scritta "ASSER COIN" sulla stessa riga se c'e' posto; se no la scritta va a capo INTERA sotto il numero (prima si spezzava: "ASSER" / "COIN") */
.pw-wallet-card--coin .pw-wallet-card__balance {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.3em;
  row-gap: 0.15em;
}

/* i pacchetti: una pila di monete, piu' alta per i pacchetti piu' grandi */
.pw-tile__coins {
  display: flex;
  align-items: flex-end;
  min-height: 54px;
  margin: 0 0 0.15rem;
}

.pw-tile__coins .ac-stack {
  --ac: 42px;
}

.pw-tile__credits .ac-coin {
  --ac: 1.05em;
  margin-right: 0.38em;
}

/* il costo della relazione (mentre carichi e nella conferma): la moneta accanto al numero, fa un giro quando il numero cambia */
.cost-counter__coin,
.credit-modal__coin {
  display: inline-flex;
  flex: none;
  align-self: center;
}

.cost-counter__coin .ac-coin {
  --ac: 30px;
}

.credit-modal__coin .ac-coin {
  --ac: 40px;
}

@media (prefers-reduced-motion: no-preference) {
  .cost-counter__coin.is-turn .ac-coin,
  .credit-modal__coin.is-turn .ac-coin {
    animation: ac-spin-once 0.8s cubic-bezier(0.3, 0.7, 0.2, 1);
  }
}

@media (max-width: 640px) {
  .pw-wallet-card--coin .ac3 {
    --ac: 72px;
    top: 0.9rem;
    right: 0.9rem;
  }

  .pw-wallet-card--coin .pw-wallet-card__head,
  .pw-wallet-card--coin .pw-wallet-card__balance {
    padding-right: 84px;
  }
}
/* ===== ASSER COIN nell'area clienti - fine ===== */

/* ------------------------------------------------------------------------------------------------------------
   Dettaglio pratica schematico, stile Apple (19/10/2026). Solo sotto .case-detail--v2: la vecchia resa resta intatta.
   ------------------------------------------------------------------------------------------------------------ */
.case-detail--v2 {
  padding: clamp(1.4rem, 3vw, 2.2rem);
  border: 0;
  border-radius: 28px;
  background: linear-gradient(180deg, #ffffff 0%, #fbf7f8 100%);
  box-shadow: 0 1px 2px rgba(75, 35, 56, 0.05), 0 18px 48px rgba(75, 35, 56, 0.09);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Manrope", system-ui, sans-serif;
}
.case-detail--v2 .case-detail__header {
  align-items: flex-start;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid rgba(75, 35, 56, 0.08);
}
.case-detail--v2 .case-detail__header h2 {
  font-family: inherit;
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.case-detail--v2 .case-detail__client { margin-top: 0.45rem; color: var(--asser-muted); font-size: 0.84rem; }
.case-detail--v2 .case-detail__client strong { color: var(--asser-secondary); font-weight: 600; }
.case-detail--v2 .case-status { border: 0; background: var(--asser-sand, #f7f1f3); font-weight: 600; letter-spacing: -0.005em; }
.case-detail--v2 .case-status--completed { background: rgba(31, 81, 72, 0.1); }
.case-detail--v2 .case-alert { border-left: 0; border-radius: 16px; margin-top: 1rem; padding: 0.95rem 1.1rem; }
.case-detail--v2 .case-detail__grid { gap: 0.85rem; margin-top: 1.1rem; }
.case-detail--v2 .case-panel {
  padding: 1.15rem 1.2rem 1.2rem;
  border: 0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(75, 35, 56, 0.05), 0 8px 24px rgba(75, 35, 56, 0.06);
}
.case-detail--v2 .case-panel h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.case-detail--v2 .case-panel__num {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--asser-muted);
  background: var(--asser-sand, #f7f1f3);
  border-radius: 999px;
  padding: 0.12rem 0.55rem;
  font-variant-numeric: tabular-nums;
}
.case-detail--v2 .case-panel__subtitle { margin: 0.9rem 0 0.5rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--asser-muted); }
.case-detail--v2 .case-panel--report {
  grid-column: 1 / -1;
  border: 0;
  background: linear-gradient(135deg, rgba(40, 77, 71, 0.1), rgba(40, 77, 71, 0.04));
  border-radius: 20px;
}
.case-detail--v2 .case-panel--report h3 { margin-bottom: 0; font-size: 1.05rem; }
.case-detail--v2 .case-panel--report p { color: #3f5450; }
.case-detail--v2 .case-panel__icon,
.case-detail--v2 .case-document-list__type {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--asser-secondary);
  font-size: 0.64rem;
  letter-spacing: 0.04em;
}
.case-detail--v2 .case-document-list { gap: 0.45rem; }
.case-detail--v2 .case-document-list li {
  padding: 0.55rem 0.65rem;
  border: 0;
  border-radius: 14px;
  background: var(--asser-sand, #f7f1f3);
}
.case-detail--v2 .case-document-list strong { font-size: 0.86rem; font-weight: 600; letter-spacing: -0.005em; }
.case-detail--v2 .case-document-list small { font-size: 0.74rem; }
.case-detail--v2 .case-document-list a {
  padding: 0.4rem 0.8rem;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--asser-primary);
  font-weight: 600;
  font-size: 0.8rem;
  box-shadow: inset 0 0 0 1px rgba(75, 35, 56, 0.12);
}
.case-detail--v2 .case-document-list a:hover { box-shadow: inset 0 0 0 1px var(--asser-primary); }
.case-detail--v2 .case-panel__hint { margin-bottom: 0.75rem; font-size: 0.86rem; color: #5b4650; }
.case-detail--v2 .case-panel__hint--muted { font-size: 0.74rem; }
.case-detail--v2 .reanalysis-form { gap: 0.55rem; }
.case-detail--v2 .reanalysis-form input[type="file"] { font-size: 0.8rem; color: var(--asser-muted); max-width: 100%; }
.case-detail--v2 .reanalysis-form input[type="file"]::file-selector-button {
  margin-right: 0.6rem;
  padding: 0.5rem 0.95rem;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--asser-secondary);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(75, 35, 56, 0.16);
  cursor: pointer;
}
.case-detail--v2 .case-empty-text { font-size: 0.86rem; }
.case-detail--v2 .case-missing-list li { border-radius: 14px; }
@media (max-width: 920px) {
  .case-detail--v2 { padding: 1.1rem 1rem 1.2rem; border-radius: 22px; }
  .case-detail--v2 .case-document-list li { grid-template-columns: auto minmax(0, 1fr); row-gap: 0.4rem; }
  .case-detail--v2 .case-document-list li > a { grid-column: 2; justify-self: start; }
  .case-detail--v2 .case-document-list strong { overflow-wrap: anywhere; }
  .case-detail--v2 .case-detail__header { flex-wrap: wrap; }
  .case-detail--v2 .case-detail__grid { grid-template-columns: 1fr; }
  .case-detail--v2 .case-panel--report { flex-wrap: wrap; }
}

/* Fonti e prassi (gestionale, 19/10/2026) */
.staff-prassi__list { margin: 0.6rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.45rem; }
.staff-prassi__list li { display: grid; gap: 0.15rem; padding: 0.6rem 0.75rem; border-radius: 12px; background: var(--asser-sand, #f7f1f3); font-size: 0.86rem; line-height: 1.45; }
.staff-prassi__list li strong { font-size: 0.84rem; }
.staff-prassi__list li a { justify-self: start; font-weight: 600; color: var(--asser-primary, #b0424f); }

/* ===== Piano di rateizzazione: lettera di accoglimento + prima rata + numero di rate libero (20/10/2026) - inizio ===== */
.installment-plan-accept { margin: 0 0 1rem; padding: 1rem 1.1rem; border-radius: 16px; background: linear-gradient(135deg, rgba(125, 68, 94, 0.09), rgba(176, 66, 79, 0.05)); box-shadow: inset 0 0 0 1px rgba(75, 35, 56, 0.1); }
.installment-plan-accept__head { display: flex; gap: .8rem; align-items: flex-start; }
.installment-plan-accept__step, .installment-plan-new__or span { display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--asser-secondary); color: #fff; font-size: .8rem; font-weight: 700; }
.installment-plan-accept__title { margin: 0 0 .25rem; color: var(--asser-secondary); font-size: .95rem; font-weight: 700; letter-spacing: -0.01em; }
.installment-plan-accept__text { margin: 0; color: var(--asser-muted); font-size: .8rem; line-height: 1.5; }
.installment-plan-accept__form { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: .9rem 0 0; }
.installment-plan-accept__file { position: relative; flex: 1 1 240px; display: flex; align-items: center; gap: .55rem; min-height: 44px; padding: .55rem .9rem; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1.5px rgba(176, 66, 79, 0.35); color: var(--asser-secondary); font-size: .86rem; font-weight: 600; cursor: pointer; }
.installment-plan-accept__file:hover { box-shadow: inset 0 0 0 1.5px rgba(176, 66, 79, 0.7); }
.installment-plan-accept__file:focus-within { box-shadow: inset 0 0 0 2px var(--asser-primary), 0 0 0 4px rgba(176, 66, 79, 0.14); }
.installment-plan-accept__file input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.installment-plan-accept__file::before { content: ""; flex: none; width: 9px; height: 9px; border-left: 2px solid var(--asser-primary); border-top: 2px solid var(--asser-primary); transform: translateY(2px) rotate(45deg); }
.installment-plan-accept__file-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.installment-plan-accept__hint { margin: .5rem 0 0; color: var(--asser-muted); font-size: .74rem; }
.installment-plan-new__or { display: flex; align-items: center; gap: .6rem; margin: .4rem 0 .8rem; color: var(--asser-secondary); font-size: .9rem; font-weight: 700; }
.installment-plan-new__calc-fields label small { margin-left: .3rem; color: var(--asser-muted); font-weight: 500; }
.rate-tiers__custom { display: inline-flex; align-items: center; gap: .5rem; margin-top: .65rem; padding: .3rem .55rem .3rem .85rem; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px rgba(75, 35, 56, 0.14); color: var(--asser-muted); font-size: .8rem; transition: box-shadow .18s ease, color .18s ease; }
.rate-tiers__custom input { width: 4.6rem; padding: .32rem .5rem; border: 0; border-radius: 999px; background: rgba(75, 35, 56, 0.06); color: var(--asser-secondary); font: inherit; font-size: .95rem; font-weight: 700; text-align: center; -moz-appearance: textfield; }
.rate-tiers__custom input::-webkit-outer-spin-button, .rate-tiers__custom input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rate-tiers__custom input:focus { outline: none; }
.rate-tiers__custom:focus-within, .rate-tiers__custom.is-set { box-shadow: inset 0 0 0 2px var(--asser-primary); color: var(--asser-secondary); }
.rate-tiers__custom.is-set input { background: linear-gradient(135deg, var(--asser-primary), var(--asser-secondary)); color: #fff; }
.rate-tiers__custom.is-over { box-shadow: inset 0 0 0 2px #c0392b; }
.rate-tiers__custom small { font-weight: 600; }
.installment-plan__source { display: block; margin-top: .15rem; color: var(--asser-muted); font-size: .74rem; font-weight: 500; }
.installment-plan__source-note { margin: .3rem 0 .6rem; padding: .5rem .7rem; border-radius: 8px; background: rgba(176, 66, 79, 0.07); font-size: .78rem; line-height: 1.45; }
@media (max-width: 640px) { .installment-plan-accept__form .portal-button { width: 100%; } }
/* ===== Piano di rateizzazione: lettera di accoglimento + prima rata + numero di rate libero - fine ===== */
.installment-plan-new__calc-note { margin: .45rem 0 0; color: var(--asser-muted); font-size: .74rem; line-height: 1.45; }

/* ===== Nuovo piano di rateizzazione in stile Apple (20/10/2026 sera) - inizio =====
   Due schede numerate, righe a gruppi (etichetta a sinistra, campo a destra), pillole per le rate, interruttore per
   l'ISEE, chip per i promemoria, un solo bottone. Il banner "Rateizzazione straordinaria" dello script dei moduli e il
   riquadro ISEE gia' caricato vengono resi sobri con la stessa grammatica. */
.plan-new { display: grid; gap: 1rem; }
.plan-new__head h3 { margin: .15rem 0 .3rem; font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; color: var(--asser-secondary); }
.plan-new__lead { margin: 0; color: var(--asser-muted); font-size: .88rem; line-height: 1.5; max-width: 42rem; }
.plan-card { display: grid; gap: .9rem; padding: 1.15rem 1.2rem 1.2rem; border-radius: 20px; background: #fff; box-shadow: 0 1px 2px rgba(29, 29, 31, 0.05), 0 10px 30px rgba(75, 35, 56, 0.07); }
.plan-card--accept { background: linear-gradient(135deg, #fff 0%, #fbf4f6 100%); }
.plan-card__head { display: flex; gap: .85rem; align-items: flex-start; }
.plan-card__num { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--asser-primary), var(--asser-secondary)); color: #fff; font-size: .8rem; font-weight: 700; }
.plan-card__title { margin: .1rem 0 .2rem; font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; color: var(--asser-secondary); }
.plan-card__text { margin: 0; color: var(--asser-muted); font-size: .84rem; line-height: 1.5; }
.plan-card__upload { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.plan-file { position: relative; flex: 1 1 260px; display: flex; align-items: center; gap: .6rem; min-height: 46px; padding: .6rem .95rem; border-radius: 13px; background: #fff; box-shadow: inset 0 0 0 1.5px rgba(176, 66, 79, 0.35); color: var(--asser-secondary); font-size: .88rem; font-weight: 600; cursor: pointer; transition: box-shadow .18s ease; }
.plan-file:hover { box-shadow: inset 0 0 0 1.5px rgba(176, 66, 79, 0.7); }
.plan-file:focus-within { box-shadow: inset 0 0 0 2px var(--asser-primary), 0 0 0 4px rgba(176, 66, 79, 0.14); }
.plan-file input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.plan-file__icon { flex: none; width: 10px; height: 10px; border-left: 2px solid var(--asser-primary); border-top: 2px solid var(--asser-primary); transform: translateY(2px) rotate(45deg); }
.plan-file__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-card__button { flex: none; }
.plan-card__button--wide { width: 100%; }
.plan-card__hint, .plan-note, .plan-hint { margin: 0; color: var(--asser-muted); font-size: .76rem; line-height: 1.5; }
.plan-hint:empty { display: none; }
.plan-chip-note { margin: 0; padding: .55rem .8rem; border-radius: 10px; background: rgba(40, 77, 71, 0.07); color: var(--asser-forest, #284d47); font-size: .78rem; line-height: 1.5; }
.plan-form { display: grid; gap: .9rem; }
.plan-calc { display: grid; gap: .8rem; }
/* gruppo di righe, come le impostazioni di iOS */
.plan-group { display: grid; margin: 0; padding: 0; border: 0; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px rgba(75, 35, 56, 0.1); overflow: hidden; }
.plan-group__title { display: block; padding: .75rem 1rem 0; font-size: .88rem; font-weight: 600; color: var(--asser-secondary); }
.plan-group__title small { margin-left: .35rem; color: var(--asser-muted); font-size: .72rem; font-weight: 500; }
.plan-new fieldset.plan-group { min-width: 0; }
/* il vecchio riquadro tratteggiato del calcolo non serve piu': i gruppi hanno gia' il loro contorno */
.plan-new .installment-plan-new__calc { padding: 0; border: 0; border-radius: 0; background: transparent; }
.plan-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: center; gap: .5rem 1rem; padding: .55rem 1rem; border-top: 1px solid rgba(75, 35, 56, 0.08); font-size: .88rem; font-weight: 600; color: var(--asser-secondary); }
.plan-group > .plan-row:first-child { border-top: 0; }
.plan-row__label { font-size: .88rem; font-weight: 600; color: var(--asser-secondary); }
.plan-row__label small { display: block; margin-top: .1rem; color: var(--asser-muted); font-size: .72rem; font-weight: 500; }
legend.plan-row__label small { display: inline; margin-left: .35rem; }
.plan-row__field { position: relative; display: block; min-width: 0; }
.plan-new .plan-row__field input { box-sizing: border-box; width: 100%; min-height: 40px; margin: 0; padding: .45rem .7rem; border: 0; border-radius: 10px; background: rgba(75, 35, 56, 0.05); font: inherit; font-size: .95rem; font-weight: 600; color: var(--asser-secondary); text-align: right; box-shadow: none; }
.plan-new .plan-row__field input::placeholder { color: rgba(75, 35, 56, 0.35); font-weight: 500; }
.plan-new .plan-row__field input:focus { outline: none; background: #fff; box-shadow: 0 0 0 2px var(--asser-primary); }
.plan-new .plan-row__field input[type="date"] { text-align: left; }
.plan-row__field--euro::after { content: "€"; position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: var(--asser-muted); font-size: .85rem; font-weight: 600; pointer-events: none; }
.plan-new .plan-row__field--euro input { padding-left: 1.7rem; }
.plan-group--rates { padding: 0 1rem .9rem; }
.plan-group--rates .rate-tiers__grid { margin-top: .55rem; }
.plan-new .rate-tiers__option span { min-width: 48px; padding: .5rem .75rem; border: 0; border-radius: 999px; background: rgba(75, 35, 56, 0.06); color: var(--asser-secondary); font-size: .9rem; font-weight: 600; transition: background .18s ease, color .18s ease, transform .18s ease; }
.plan-new .rate-tiers__option input:disabled + span { opacity: .35; }
.plan-new .rate-tiers__option input:checked + span { background: linear-gradient(135deg, var(--asser-primary), var(--asser-secondary)); color: #fff; box-shadow: 0 6px 16px rgba(75, 35, 56, 0.2); }
.plan-new .rate-tiers__custom { margin-top: .7rem; }
.plan-new .plan-hint { margin: .55rem 0 0; }
.plan-group--rates .rate-tiers__custom { margin-bottom: 0; }
/* interruttore per l'ISEE: una riga con il testo e la levetta a destra */
.plan-new .isee-flag.plan-group--isee { position: relative; margin: 0; padding: 0; border: 0; background: #fff; }
.plan-new .isee-flag__toggle.plan-switch { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0; padding: .75rem 1rem; border: 0; border-radius: 0; background: #fff; color: var(--asser-secondary); font-size: .88rem; font-weight: 600; cursor: pointer; }
.plan-new .isee-flag__toggle.plan-switch::before { display: none; }
.plan-switch__text small { display: block; margin-top: .15rem; color: var(--asser-muted); font-size: .72rem; font-weight: 500; line-height: 1.4; }
.plan-switch__knob { position: relative; flex: none; width: 46px; height: 28px; border-radius: 999px; background: rgba(75, 35, 56, 0.18); transition: background .2s ease; }
.plan-switch__knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); transition: transform .2s cubic-bezier(.2, .8, .2, 1); }
.plan-new .isee-flag__check:checked + .plan-switch { background: #fff; color: var(--asser-secondary); border: 0; }
.plan-new .isee-flag__check:checked + .plan-switch .plan-switch__knob { background: var(--asser-primary); }
.plan-new .isee-flag__check:checked + .plan-switch .plan-switch__knob::after { transform: translateX(18px); }
.plan-new .isee-flag__check:checked + .plan-switch small { color: var(--asser-muted); }
.plan-new .isee-flag__check:focus-visible + .plan-switch .plan-switch__knob { box-shadow: 0 0 0 3px rgba(176, 66, 79, 0.25); }
.plan-new .isee-flag__panel { margin: 0; padding: .8rem 1rem 1rem; border: 0; border-top: 1px solid rgba(75, 35, 56, 0.08); border-radius: 0; }
/* chip dei promemoria */
.plan-group--reminders { padding: 0 1rem .9rem; }
.plan-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .55rem; }
.plan-new .plan-chip { position: relative; display: inline-flex; margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
.plan-new .plan-chip input { position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; }
.plan-new .plan-chip span { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .85rem; border-radius: 999px; background: rgba(75, 35, 56, 0.06); color: var(--asser-secondary); font-size: .84rem; font-weight: 600; cursor: pointer; transition: background .18s ease, color .18s ease; }
.plan-new .plan-chip span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: rgba(75, 35, 56, 0.25); }
.plan-new .plan-chip input:checked + span { background: linear-gradient(135deg, var(--asser-primary), var(--asser-secondary)); color: #fff; }
.plan-new .plan-chip input:checked + span::before { background: #fff; }
.plan-new .plan-chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(176, 66, 79, 0.25); }
/* il banner "Rateizzazione straordinaria" (script dei moduli) e il riquadro ISEE caricato, resi sobri */
.plan-new .asser-modulo-rate { margin: 0; border: 0; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px rgba(75, 35, 56, 0.1); }
.plan-new .asser-modulo-rate__summary { padding: .75rem 1rem; background: #fff; color: var(--asser-secondary); }
.plan-new .asser-modulo-rate__summary:hover { filter: none; background: rgba(75, 35, 56, 0.03); }
.plan-new .asser-modulo-rate__summary::after { border-color: var(--asser-primary); }
.plan-new .asser-modulo-rate__summary .asser-modulo-rate__badge { padding: .15rem .55rem; background: rgba(176, 66, 79, 0.1); color: var(--asser-primary); font-size: .62rem; letter-spacing: .08em; }
.plan-new .asser-modulo-rate__title { font-size: .9rem; font-weight: 600; }
.plan-new .asser-modulo-rate__chip { border: 0; background: rgba(75, 35, 56, 0.06); color: var(--asser-secondary); font-weight: 600; }
.plan-new .asser-modulo-rate__body { padding: .2rem 1rem 1rem; font-size: .84rem; }
.plan-new .installment-plan-new__isee { margin: 0; border: 0; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px rgba(75, 35, 56, 0.1); }
.plan-new .installment-plan-new__isee > summary { padding: .75rem 1rem; font-size: .88rem; font-weight: 600; color: var(--asser-secondary); }
@media (max-width: 640px) {
  .plan-card { padding: 1rem .95rem 1.05rem; border-radius: 18px; }
  .plan-row { grid-template-columns: 1fr; gap: .3rem; padding: .6rem .9rem; }
  .plan-new .plan-row__field input { text-align: left; }
  .plan-card__upload .plan-card__button { width: 100%; }
}
/* ===== Nuovo piano di rateizzazione in stile Apple - fine ===== */
.plan-card__wait { display: flex; align-items: center; gap: .6rem; margin: 0; color: var(--asser-secondary); font-size: .84rem; font-weight: 600; }
.plan-card__wait[hidden] { display: none; }
/* 20/10/2026 ore 11: precedenza sulle regole vecchie del modulo clienti (label a griglia, fieldset senza spazio,
   riga ISEE tratteggiata) che sul sito vero rompevano il campo "Oppure scrivi il numero"; contenuto delle schede
   allineato al titolo accanto al numero */
.plan-new .plan-form.managed-client-form { max-width: none; gap: .9rem; margin-top: 0; }
.plan-new .managed-client-form .plan-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: .5rem 1rem; font-size: .88rem; font-weight: 600; }
.plan-new .rate-tiers.plan-group--rates { min-width: 0; margin: 0; padding: .15rem 1rem .9rem; border: 0; }
.plan-new .managed-client-form .rate-tiers__custom { display: inline-flex; align-items: center; gap: .5rem; width: auto; max-width: 100%; margin: .7rem 0 0; padding: .3rem .55rem .3rem .85rem; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px rgba(75, 35, 56, 0.14); color: var(--asser-muted); font-size: .8rem; font-weight: 500; }
.plan-new .managed-client-form .rate-tiers__custom:focus-within, .plan-new .managed-client-form .rate-tiers__custom.is-set { box-shadow: inset 0 0 0 2px var(--asser-primary); color: var(--asser-secondary); }
.plan-new .managed-client-form .rate-tiers__custom.is-over { box-shadow: inset 0 0 0 2px #c0392b; }
.plan-new .managed-client-form .rate-tiers__custom input { width: 4.6rem; min-height: 0; margin: 0; padding: .32rem .5rem; border: 0; border-radius: 999px; background: rgba(75, 35, 56, 0.06); color: var(--asser-secondary); font-size: .95rem; font-weight: 700; text-align: center; }
.plan-new .managed-client-form .rate-tiers__custom.is-set input { background: linear-gradient(135deg, var(--asser-primary), var(--asser-secondary)); color: #fff; }
.plan-new .managed-client-form .rate-tiers__custom small { margin: 0; font-weight: 600; }
.plan-new .isee-flag.plan-group--isee { box-shadow: inset 0 0 0 1px rgba(75, 35, 56, 0.1); border-radius: 14px; }
.plan-new .managed-client-form .plan-group--reminders { min-width: 0; margin: 0; padding: .15rem 1rem .9rem; border: 0; }
@media (min-width: 760px) {
  .plan-card > :not(.plan-card__head) { margin-left: calc(28px + .85rem); }
}
/* ===== Piano salvato: riepilogo compatto e tabella che scorre (20/10/2026 ore 11.40) ===== */
.installment-plan__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .5rem; margin: .4rem 0 .8rem; padding: 0; }
.installment-plan__facts div { padding: .55rem .8rem; border-radius: 12px; background: rgba(75, 35, 56, 0.05); }
.installment-plan__facts dt { margin: 0; font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--asser-muted); }
.installment-plan__facts dd { margin: .15rem 0 0; font-size: .98rem; font-weight: 700; color: var(--asser-secondary); font-variant-numeric: tabular-nums; }
.installment-plan__facts dd span { font-size: .78rem; font-weight: 500; color: var(--asser-muted); }
.installment-table__scroll { max-height: 21rem; overflow: auto; border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(75, 35, 56, 0.1); background: #fff; scrollbar-width: thin; }
.installment-table__scroll .installment-table { margin: 0; width: 100%; border-collapse: separate; border-spacing: 0; font-size: .84rem; }
.installment-table__scroll .installment-table thead th { position: sticky; top: 0; z-index: 1; padding: .45rem .7rem; background: var(--asser-sand, #f7f1f3); font-size: .64rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--asser-muted); }
.installment-table__scroll .installment-table td { padding: .35rem .7rem; border-bottom: 1px solid rgba(75, 35, 56, 0.07); font-variant-numeric: tabular-nums; }
.installment-table__scroll .installment-table td:nth-child(2) { font-weight: 600; color: var(--asser-secondary); }
.installment-table__scroll .installment-row--past td { color: var(--asser-muted); }
.installment-table__scroll .installment-row--next td { background: rgba(176, 66, 79, 0.07); font-weight: 700; }
.installment-table__scroll .installment-remove-btn { opacity: .45; }
.installment-table__scroll tr:hover .installment-remove-btn { opacity: 1; }
.installment-plan__source-note { margin: .2rem 0 .6rem; }

/* ===== Scheda cliente: righe delle pratiche compatte e pagina piu' corta (20/10/2026 ore 12) - inizio =====
   Nessuna pratica aperta da sola: la riga e' un bottone sottile (numero, data, stato con il puntino, chevron);
   la riga aperta si evidenzia e mostra la X; "Chiudi dettaglio" accanto al titolo. */
.managed-client-detail { display: grid; gap: .9rem; }
.managed-client-detail > header { margin: 0; }
.managed-client-detail > h3, .client-cases__head h3 { margin: 0; font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; color: var(--asser-secondary); }
.client-cases__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: .4rem 0 0; }
.client-cases__close { padding: .35rem .8rem; border-radius: 999px; background: rgba(75, 35, 56, 0.07); color: var(--asser-secondary); font-size: .78rem; font-weight: 600; text-decoration: none; }
.client-cases__close:hover { background: rgba(176, 66, 79, 0.12); color: var(--asser-primary); }
.case-list.client-cases { display: grid; gap: .45rem; margin: 0; }
.client-cases .case-list-link { grid-template-columns: minmax(0, 1fr) auto auto; gap: .7rem; min-height: 54px; margin: 0; padding: .6rem .95rem; border: 0; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px rgba(75, 35, 56, 0.1); transition: box-shadow .18s ease, background .18s ease; }
.client-cases .case-list-link:hover { box-shadow: inset 0 0 0 1px rgba(176, 66, 79, 0.45); }
.client-cases .case-list-link--active { background: rgba(176, 66, 79, 0.06); box-shadow: inset 0 0 0 1.5px var(--asser-primary); }
.client-cases .case-list-link span { display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem .6rem; }
.client-cases .case-list-link strong { font-size: .95rem; font-weight: 700; letter-spacing: -0.01em; }
.client-cases .case-list-link small { font-size: .74rem; color: var(--asser-muted); }
.client-cases .case-list-link em { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .7rem; border-radius: 999px; font-size: .72rem; font-style: normal; font-weight: 600; white-space: nowrap; background: rgba(29, 29, 31, 0.06); color: #6e6e73; }
.client-cases .case-list-link em::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.client-cases .client-cases__status--ok { background: rgba(31, 138, 76, 0.12); color: #1a7a43; }
.client-cases .client-cases__status--warn { background: rgba(214, 124, 15, 0.14); color: #a05a00; }
.client-cases .client-cases__status--err { background: rgba(176, 66, 79, 0.12); color: var(--asser-primary); }
.client-cases .client-cases__status--run { background: rgba(125, 68, 94, 0.1); color: var(--asser-primary); }
.client-cases .client-cases__status--run::before { animation: livePulse 1.6s ease-out infinite; }
.client-cases .case-list-link b { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(75, 35, 56, 0.06); color: var(--asser-secondary); font-size: 1rem; font-weight: 600; }
.client-cases .case-list-link:hover b { transform: none; background: rgba(176, 66, 79, 0.12); }
.client-cases .case-list-link--active b { background: var(--asser-primary); color: #fff; }
/* blocchi della scheda piu' raccolti */
.managed-client-detail .managed-client-auto-notice { margin: 0; }
.managed-client-detail .managed-client-new { margin: 0; }
.managed-client-detail .managed-client-new summary { padding: .65rem .95rem; font-size: .88rem; font-weight: 600; }
.managed-client-detail .client-debt-summary { margin: 0; }
.managed-client-detail .case-list-empty { margin: 0; }
.managed-client-detail .installment-plans { margin-top: .4rem; }
@media (max-width: 640px) {
  .client-cases .case-list-link { grid-template-columns: minmax(0, 1fr) auto; }
  .client-cases .case-list-link em { grid-column: 1; justify-self: start; }
  .client-cases .case-list-link b { grid-row: 1 / span 2; grid-column: 2; }
}
/* ===== Scheda cliente: righe compatte - fine ===== */

/* ===== Scheda cliente: intestazione con "Modifica dati" e situazione a tessere (20/10/2026 ore 13) - inizio ===== */
.client-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin: 0; }
.client-head__identity { min-width: 0; }
.client-head__identity h2 { margin: .1rem 0 .35rem; font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; color: var(--asser-secondary); }
.client-head__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; margin: 0; }
.client-head__code { display: inline-flex; align-items: center; padding: .28rem .65rem; border-radius: 999px; background: rgba(75, 35, 56, 0.07); color: var(--asser-secondary); font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .8rem; font-weight: 600; letter-spacing: .04em; }
.client-head__notes { color: var(--asser-muted); font-size: .84rem; }
.client-head__edit { display: inline-flex; align-items: center; gap: .45rem; flex: none; margin-top: .35rem; padding: .55rem .95rem; border: 0; border-radius: 999px; background: rgba(75, 35, 56, 0.07); color: var(--asser-secondary); font: inherit; font-size: .86rem; font-weight: 600; cursor: pointer; transition: background .18s ease, color .18s ease, transform .15s ease; }
.client-head__edit:hover { background: rgba(176, 66, 79, 0.12); color: var(--asser-primary); }
.client-head__edit:active { transform: scale(.97); }
.client-head__edit.is-open { background: var(--asser-secondary); color: #fff; }
.client-edit.has-js > summary { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.managed-client-detail .client-edit { position: relative; margin: 0; padding: 0; border: 0; border-radius: 16px; background: transparent; }
.managed-client-detail .client-edit[open] { padding: 1rem 1.1rem 1.1rem; background: #fff; box-shadow: inset 0 0 0 1px rgba(75, 35, 56, 0.1); animation: clientEditIn .28s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes clientEditIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.client-edit__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
/* situazione: due tessere grandi (importi) e quattro piccole */
.client-stats { display: grid; gap: .6rem; margin: 0; padding: 0; border: 0; background: transparent; }
.client-stats__title { margin: 0; font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--asser-muted); }
.client-stats__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; }
.client-stats__tile { display: grid; gap: .25rem; min-width: 0; padding: .85rem 1rem; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1px rgba(75, 35, 56, 0.1); }
.client-stats__tile--wide { grid-column: span 2; }
.client-stats__tile--amount { background: linear-gradient(135deg, rgba(176, 66, 79, 0.1), rgba(125, 68, 94, 0.06)); box-shadow: none; }
.client-stats__tile--alert { background: rgba(176, 66, 79, 0.1); box-shadow: none; }
.client-stats__tile--alert .client-stats__value { color: var(--asser-primary); }
.client-stats__tile--ok .client-stats__value { color: #1a7a43; }
.client-stats__value { font-size: 1.45rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; color: var(--asser-secondary); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.client-stats__tile--wide .client-stats__value { font-size: 1.75rem; }
.client-stats__label { font-size: .72rem; font-weight: 600; letter-spacing: .02em; color: var(--asser-muted); }
.client-stats .client-debt-summary__note { margin: 0; font-size: .74rem; color: var(--asser-muted); }
@media (max-width: 760px) {
  .client-head { flex-direction: column; align-items: stretch; }
  .client-head__edit { justify-content: center; margin-top: 0; }
  .client-stats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .client-stats__tile--wide .client-stats__value { font-size: 1.45rem; }
}
/* ===== Scheda cliente: intestazione e tessere - fine ===== */

/* ===== "Crea un piano" a tendina (20/10/2026 ore 14.40) ===== */
.plan-new-toggle { margin: .2rem 0 0; border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 1px rgba(75, 35, 56, 0.1); transition: box-shadow .2s ease; }
.plan-new-toggle:hover:not([open]) { box-shadow: inset 0 0 0 1px rgba(176, 66, 79, 0.45); }
.plan-new-toggle[open] { background: linear-gradient(180deg, #fff 0%, #fbf8f9 100%); box-shadow: 0 1px 2px rgba(29, 29, 31, 0.05), 0 12px 32px rgba(75, 35, 56, 0.08); }
.plan-new-toggle__summary { display: flex; align-items: center; gap: .85rem; padding: .85rem 1.05rem; list-style: none; cursor: pointer; border-radius: 18px; }
.plan-new-toggle__summary::-webkit-details-marker { display: none; }
.plan-new-toggle__summary:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(176, 66, 79, 0.22); }
.plan-new-toggle__plus { position: relative; flex: none; width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--asser-primary), var(--asser-secondary)); box-shadow: 0 6px 14px rgba(176, 66, 79, 0.25); transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.plan-new-toggle__plus::before, .plan-new-toggle__plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 2.4px; border-radius: 2px; background: #fff; transform: translate(-50%, -50%); }
.plan-new-toggle__plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.plan-new-toggle[open] .plan-new-toggle__plus { transform: rotate(45deg); }
.plan-new-toggle__text { display: grid; gap: .1rem; flex: 1 1 auto; min-width: 0; }
.plan-new-toggle__text strong { font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; color: var(--asser-secondary); }
.plan-new-toggle__text small { font-size: .8rem; color: var(--asser-muted); }
.plan-new-toggle__chevron { flex: none; width: 9px; height: 9px; margin-right: .3rem; border-right: 2px solid var(--asser-muted); border-bottom: 2px solid var(--asser-muted); transform: rotate(45deg); transition: transform .25s ease; }
.plan-new-toggle[open] .plan-new-toggle__chevron { transform: rotate(-135deg); }
.plan-new-toggle > .plan-new { padding: 0 1rem 1rem; }
.plan-new-toggle[open] > .plan-new { animation: planNewIn .34s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes planNewIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.plan-new-toggle .plan-card { box-shadow: inset 0 0 0 1px rgba(75, 35, 56, 0.08); }
@media (max-width: 640px) { .plan-new-toggle > .plan-new { padding: 0 .6rem .8rem; } .plan-new-toggle__summary { padding: .8rem .85rem; } }
@media (prefers-reduced-motion: reduce) { .plan-new-toggle[open] > .plan-new, .plan-new-toggle__plus, .plan-new-toggle__chevron { animation: none; transition: none; } }
/* dentro la tendina il riquadro vecchio della sezione non serve: niente doppio contorno */
.plan-new-toggle > .installment-plan-new.plan-new { margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }

/* ===== Archivio clienti: "Apri scheda" sulla riga del cliente (20/10/2026 ore 15) ===== */
.arch-client > summary { grid-template-columns: auto minmax(0, 1fr) auto auto auto auto; }
.arch-client__open { display: inline-flex; align-items: center; gap: .35rem; padding: .42rem .8rem .42rem .9rem; border-radius: 999px; background: linear-gradient(135deg, var(--asser-primary), var(--asser-secondary)); color: #fff !important; font-size: .8rem; font-weight: 600; text-decoration: none; white-space: nowrap; box-shadow: 0 4px 12px rgba(176, 66, 79, 0.22); transition: transform .15s ease, box-shadow .2s ease; }
.arch-client__open span { font-size: 1.05rem; line-height: 1; transition: transform .2s ease; }
.arch-client__open:hover { box-shadow: 0 6px 16px rgba(176, 66, 79, 0.32); }
.arch-client__open:hover span { transform: translateX(2px); }
.arch-client__open:active { transform: scale(.96); }
.arch-client__open:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(176, 66, 79, 0.3); }
@media (max-width: 720px) {
  .arch-client > summary { grid-template-columns: auto minmax(0, 1fr) auto auto; }
  .arch-client__open { grid-column: 3; grid-row: 1; padding: .38rem .7rem; font-size: .76rem; }
  .arch-client > summary .arch-chev { grid-column: 4; }
}

/* ===== Calendario delle scadenze delle rate (dashboard, 20/10/2026) - inizio ===== */
.pay-cal { display: grid; gap: .9rem; margin-top: 1rem; padding: 1.2rem 1.3rem 1.1rem; border-radius: 24px; background: #fff; box-shadow: 0 1px 2px rgba(29, 29, 31, 0.05), 0 14px 36px rgba(75, 35, 56, 0.07); }
.pay-cal__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.pay-cal__head h2 { margin: .15rem 0 0; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; color: var(--asser-secondary); }
.pay-cal__nav { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem; border-radius: 999px; background: rgba(29, 29, 31, 0.05); }
.pay-cal__btn, .pay-cal__today { border: 0; background: transparent; color: var(--asser-secondary); font: inherit; cursor: pointer; transition: background .18s ease, opacity .18s ease; }
.pay-cal__btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font-size: 1.3rem; line-height: 1; }
.pay-cal__today { padding: .4rem .85rem; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.pay-cal__btn:hover:not(:disabled), .pay-cal__today:hover:not(:disabled) { background: #fff; box-shadow: 0 1px 3px rgba(29, 29, 31, 0.12); }
.pay-cal__btn:disabled, .pay-cal__today:disabled { opacity: .35; cursor: default; }
.pay-cal__body { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(240px, 1fr); gap: 1.2rem; align-items: start; }
.pay-cal__month-title { margin: 0 0 .55rem; font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; color: var(--asser-secondary); }
.pay-cal__weekdays, .pay-cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .3rem; }
.pay-cal__weekdays span { padding: 0 0 .3rem; font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--asser-muted); text-align: center; }
.pay-cal__grid.is-slide-left { animation: payCalLeft .32s cubic-bezier(.2, .8, .2, 1) both; }
.pay-cal__grid.is-slide-right { animation: payCalRight .32s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes payCalLeft { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes payCalRight { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
.pay-cal__cell { position: relative; display: grid; align-content: space-between; justify-items: center; min-height: 58px; padding: .45rem .2rem .4rem; border: 0; border-radius: 14px; background: rgba(29, 29, 31, 0.025); color: var(--asser-secondary); font: inherit; transition: transform .2s cubic-bezier(.2, .8, .2, 1), box-shadow .2s ease, background .2s ease, opacity .2s ease; }
.pay-cal__cell.is-out { background: transparent; }
.pay-cal__cell.is-past .pay-cal__num { color: rgba(75, 35, 56, 0.4); }
.pay-cal__num { font-size: .86rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.pay-cal__cell.is-today .pay-cal__num { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-top: -3px; border-radius: 50%; background: var(--asser-primary); color: #fff; }
.pay-cal__cell.has-events { cursor: pointer; background: #fff; box-shadow: inset 0 0 0 1px rgba(75, 35, 56, 0.1); }
.pay-cal__cell.has-events:hover, .pay-cal__cell.has-events:focus-visible { z-index: 1; outline: none; transform: translateY(-3px) scale(1.06); box-shadow: 0 10px 24px rgba(75, 35, 56, 0.18), inset 0 0 0 1.5px var(--asser-primary); }
.pay-cal__cell.is-selected { box-shadow: inset 0 0 0 2px var(--asser-primary); background: rgba(176, 66, 79, 0.06); }
.pay-cal__dots { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 3px; min-height: 8px; }
.pay-cal__dots em { font-size: .6rem; font-style: normal; font-weight: 700; color: var(--asser-muted); }
.pay-cal__dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 0 1.5px #fff; }
.pay-cal__dot--big { width: 12px; height: 12px; box-shadow: none; }
.pay-cal__cell.is-past .pay-cal__dot { opacity: .45; }
.pay-cal__grid.is-filtering .pay-cal__cell.has-events:not(.is-match) { opacity: .28; transform: scale(.96); }
.pay-cal__grid.is-filtering .pay-cal__cell.is-match { transform: translateY(-2px) scale(1.05); box-shadow: 0 8px 20px rgba(75, 35, 56, 0.16), inset 0 0 0 1.5px var(--asser-primary); }
/* colonna a destra: dettaglio del giorno + legenda */
.pay-cal__side { display: grid; gap: .8rem; }
.pay-cal__side-title { margin: 0 0 .35rem; font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--asser-muted); }
.pay-cal__day { min-height: 6.5rem; padding: .85rem .95rem; border-radius: 16px; background: linear-gradient(135deg, rgba(176, 66, 79, 0.08), rgba(125, 68, 94, 0.04)); }
.pay-cal__day.is-in { animation: payCalDay .26s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes payCalDay { from { opacity: .3; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.pay-cal__day-date { margin: 0 0 .5rem; font-size: .98rem; font-weight: 700; color: var(--asser-secondary); }
.pay-cal__day-list, .pay-cal__legend ul { display: grid; gap: .3rem; margin: 0; padding: 0; list-style: none; }
.pay-cal__day-list a, .pay-cal__legend a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .6rem; padding: .45rem .6rem; border-radius: 12px; color: var(--asser-secondary); text-decoration: none; transition: background .18s ease, transform .18s ease; }
.pay-cal__day-list a { background: rgba(255, 255, 255, 0.75); }
.pay-cal__day-list a:hover, .pay-cal__legend a:hover, .pay-cal__legend a:focus-visible { background: rgba(176, 66, 79, 0.08); transform: translateX(2px); outline: none; }
.pay-cal__day-text, .pay-cal__legend-text { display: grid; min-width: 0; }
.pay-cal__day-text strong, .pay-cal__legend-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .86rem; font-weight: 600; }
.pay-cal__day-text small, .pay-cal__legend-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .72rem; color: var(--asser-muted); }
.pay-cal__day-list b, .pay-cal__legend b { font-size: .86rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pay-cal__legend { padding: .85rem .6rem .7rem; border-radius: 16px; box-shadow: inset 0 0 0 1px rgba(75, 35, 56, 0.08); }
.pay-cal__legend .pay-cal__side-title { padding: 0 .35rem; }
.pay-cal__total { margin: .5rem .6rem 0; padding-top: .5rem; border-top: 1px solid rgba(75, 35, 56, 0.08); font-size: .82rem; font-weight: 700; color: var(--asser-secondary); text-align: right; font-variant-numeric: tabular-nums; }
.pay-cal__total:empty { display: none; }
.pay-cal__empty { margin: 0; padding: .2rem .35rem; font-size: .8rem; color: var(--asser-muted); }
.pay-cal__note { margin: 0; font-size: .74rem; color: var(--asser-muted); }
@media (max-width: 900px) {
  .pay-cal { padding: 1rem .9rem; border-radius: 20px; }
  .pay-cal__body { grid-template-columns: 1fr; }
  .pay-cal__head { flex-wrap: wrap; align-items: center; }
  .pay-cal__cell { min-height: 46px; border-radius: 11px; }
  .pay-cal__grid, .pay-cal__weekdays { gap: .2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .pay-cal__grid.is-slide-left, .pay-cal__grid.is-slide-right, .pay-cal__day.is-in { animation: none; }
  .pay-cal__cell, .pay-cal__day-list a, .pay-cal__legend a { transition: none; }
  .pay-cal__cell.has-events:hover, .pay-cal__grid.is-filtering .pay-cal__cell { transform: none; }
}
/* ===== Calendario delle scadenze delle rate - fine ===== */

/* ===== Calendario e promemoria (tab, 20/10/2026 ore 16.30) - inizio ===== */
.reminders { display: grid; gap: 1rem; }
.reminders__head h2 { margin: .15rem 0 .3rem; font-size: 1.55rem; font-weight: 700; letter-spacing: -0.02em; color: var(--asser-secondary); }
.reminders__lead { margin: 0; max-width: 46rem; color: var(--asser-muted); font-size: .9rem; line-height: 1.5; }
/* calendario grande: rate scritte nel giorno */
.pay-cal--large { margin-top: 0; }
.pay-cal--large .pay-cal__body { grid-template-columns: minmax(0, 2.2fr) minmax(260px, 1fr); }
.pay-cal--large .pay-cal__cell { align-content: start; justify-items: stretch; gap: .3rem; min-height: 104px; padding: .45rem .4rem; text-align: left; }
.pay-cal--large .pay-cal__num { justify-self: end; margin-right: .1rem; }
.pay-cal--large .pay-cal__cell.is-today .pay-cal__num { margin-top: 0; }
.pay-cal--large .pay-cal__cell.has-events:hover, .pay-cal--large .pay-cal__cell.has-events:focus-visible { transform: translateY(-3px) scale(1.03); }
.pay-cal__pills { display: grid; gap: 3px; min-width: 0; }
.pay-cal__pill { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .3rem; align-items: center; min-width: 0; padding: .16rem .35rem .16rem .45rem; border-radius: 6px; background: color-mix(in srgb, var(--pill) 14%, #fff); box-shadow: inset 3px 0 0 var(--pill); font-size: .66rem; line-height: 1.25; color: var(--asser-secondary); }
.pay-cal__pill-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.pay-cal__pill-amount { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pay-cal__cell.is-past .pay-cal__pill { opacity: .55; }
.pay-cal__more { font-size: .62rem; font-style: normal; font-weight: 600; color: var(--asser-muted); }
.pay-cal__dots--hidden { display: none; }
.pay-cal__grid.is-filtering .pay-cal__pill:not([data-client]) { opacity: 1; }
/* tasto WhatsApp */
.wa-button { display: inline-flex; align-items: center; gap: .35rem; padding: .32rem .7rem; border-radius: 999px; background: #25d366; color: #fff !important; font-size: .76rem; font-weight: 700; text-decoration: none; white-space: nowrap; box-shadow: 0 4px 12px rgba(37, 211, 102, 0.28); transition: transform .15s ease, box-shadow .2s ease, background .2s ease; }
.wa-button:hover { background: #1fbe5b; box-shadow: 0 6px 16px rgba(37, 211, 102, 0.36); }
.wa-button:active { transform: scale(.96); }
.wa-button--small { padding: .26rem .6rem; font-size: .72rem; }
.wa-button--missing { background: rgba(75, 35, 56, 0.07); color: var(--asser-secondary) !important; box-shadow: none; font-weight: 600; }
.wa-button--missing:hover { background: rgba(176, 66, 79, 0.12); box-shadow: none; }
.pay-cal__day-list li.has-actions { display: grid; gap: .25rem; padding-bottom: .35rem; }
.pay-cal__day-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding: 0 .6rem; }
.pay-cal__sent, .reminders-row__sent { font-size: .7rem; color: #1a7a43; }
/* elenco delle prossime scadenze */
.reminders-list { display: grid; gap: .7rem; padding: 1.1rem 1.2rem 1rem; border-radius: 24px; background: #fff; box-shadow: 0 1px 2px rgba(29, 29, 31, 0.05), 0 14px 36px rgba(75, 35, 56, 0.07); }
.reminders-list__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; }
.reminders-list__head h3 { margin: 0; font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; color: var(--asser-secondary); }
.reminders-list__filters { display: inline-flex; gap: .2rem; padding: .22rem; border-radius: 999px; background: rgba(29, 29, 31, 0.05); }
.reminders-chip { padding: .38rem .8rem; border: 0; border-radius: 999px; background: transparent; color: var(--asser-secondary); font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer; transition: background .18s ease, box-shadow .18s ease; }
.reminders-chip.is-on { background: #fff; box-shadow: 0 1px 3px rgba(29, 29, 31, 0.12); }
.reminders-list__rows { display: grid; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.reminders-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .9rem; padding: .65rem .85rem; border-radius: 16px; box-shadow: inset 0 0 0 1px rgba(75, 35, 56, 0.08); transition: box-shadow .2s ease, transform .2s ease; }
.reminders-row:hover { box-shadow: inset 0 0 0 1px rgba(176, 66, 79, 0.35), 0 6px 18px rgba(75, 35, 56, 0.08); transform: translateY(-1px); }
.reminders-row.is-soon { background: rgba(176, 66, 79, 0.05); }
.reminders-row.is-in { animation: payCalDay .26s cubic-bezier(.2, .8, .2, 1) both; }
.reminders-row__date { display: grid; place-items: center; width: 48px; height: 52px; border-radius: 12px; background: rgba(75, 35, 56, 0.06); color: var(--asser-secondary); }
.reminders-row.is-soon .reminders-row__date { background: var(--asser-primary); color: #fff; }
.reminders-row__date strong { font-size: 1.15rem; line-height: 1; }
.reminders-row__date small { font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.reminders-row__main { display: grid; gap: .15rem; min-width: 0; }
.reminders-row__name { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; }
.reminders-row__name > a:first-child { color: var(--asser-secondary); font-size: .95rem; font-weight: 700; text-decoration: none; }
.reminders-row__name > a:first-child:hover { color: var(--asser-primary); }
.reminders-row__main small { color: var(--asser-muted); font-size: .76rem; }
.reminders-row__amount { font-size: 1rem; font-weight: 700; color: var(--asser-secondary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.reminders-list__empty { margin: 0; color: var(--asser-muted); font-size: .86rem; }
.reminders-template { border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1px rgba(75, 35, 56, 0.1); }
.reminders-template summary { padding: .8rem 1rem; font-size: .9rem; font-weight: 600; color: var(--asser-secondary); cursor: pointer; }
.reminders-template form { display: grid; gap: .6rem; padding: 0 1rem 1rem; }
.reminders-template label { font-size: .8rem; color: var(--asser-muted); }
.reminders-template code { padding: .05rem .3rem; border-radius: 5px; background: rgba(75, 35, 56, 0.07); font-size: .76rem; }
.reminders-template textarea { width: 100%; box-sizing: border-box; padding: .7rem .8rem; border: 0; border-radius: 12px; background: rgba(75, 35, 56, 0.05); font: inherit; font-size: .9rem; line-height: 1.5; color: var(--asser-secondary); resize: vertical; }
.reminders-template textarea:focus { outline: none; background: #fff; box-shadow: 0 0 0 2px var(--asser-primary); }
.reminders-template__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.client-head__phone { display: inline-flex; align-items: center; padding: .28rem .65rem; border-radius: 999px; background: rgba(37, 211, 102, 0.12); color: #137a3b; font-size: .8rem; font-weight: 600; }
@media (max-width: 900px) {
  .pay-cal--large .pay-cal__body { grid-template-columns: 1fr; }
  .pay-cal--large .pay-cal__cell { min-height: 58px; }
  .pay-cal--large .pay-cal__pills { display: none; }
  .pay-cal--large .pay-cal__dots--hidden { display: flex; }
  .reminders-row { grid-template-columns: auto minmax(0, 1fr); }
  .reminders-row__amount { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) { .reminders-row, .wa-button { transition: none; } .reminders-row.is-in { animation: none; } }
/* ===== Calendario e promemoria - fine ===== */
/* ritocchi: il tasto WhatsApp nel dettaglio del giorno non prende lo stile dei collegamenti dell'elenco; pillole su due righe */
.pay-cal__day-list .wa-button { display: inline-flex; grid-template-columns: none; padding: .26rem .65rem; background: #25d366; color: #fff !important; transform: none; }
.pay-cal__day-list .wa-button:hover { background: #1fbe5b; transform: none; }
.pay-cal__day-list .wa-button--missing { background: rgba(75, 35, 56, 0.07); color: var(--asser-secondary) !important; }
.pay-cal__pill { grid-template-columns: minmax(0, 1fr); gap: 0; padding: .2rem .35rem .22rem .5rem; }
.pay-cal__pill-amount { font-size: .64rem; }
.client-stats .client-stats__dedup { padding: .5rem .75rem; border-radius: 10px; background: rgba(214, 124, 15, 0.08); color: #8a5a10; font-style: normal; }

/* ===== 20/10/2026 ore 17.30: "Apri scheda" accanto al nome; lettera di accoglimento nella pagina Piano di rateizzazione ===== */
.arch-client > summary { grid-template-columns: auto auto auto minmax(0, 1fr) auto auto; }
.arch-client > summary .arch-client__badges { justify-content: flex-end; }
.arch-client > summary .arch-client__id { min-width: 0; max-width: 22rem; }
.plan-card--standalone { margin: 0 0 1rem; }
.plan-card--standalone .plan-card__num svg { display: block; }
.plan-card--standalone .plan-card__title { font-size: 1.1rem; }
@media (max-width: 720px) {
  .arch-client > summary { grid-template-columns: auto minmax(0, 1fr) auto auto; }
  .arch-client > summary .arch-client__id { max-width: none; }
  .arch-client__open { grid-column: 3; grid-row: 1; }
  .arch-client > summary .arch-chev { grid-column: 4; grid-row: 1; }
  .arch-client > summary .arch-client__badges { justify-content: flex-start; }
}
.arch-client__open { justify-self: start; }

/* ===== Calendario: stato del promemoria sul giorno (20/10/2026 ore 18) ===== */
.pay-cal__flag { position: absolute; top: 5px; left: 6px; display: none; place-items: center; width: 15px; height: 15px; border-radius: 50%; font-size: .58rem; font-weight: 800; line-height: 1; }
.pay-cal__cell.is-reminded .pay-cal__flag { display: inline-grid; background: #25d366; color: #fff; }
.pay-cal__cell.needs-reminder .pay-cal__flag { display: inline-grid; background: #fff; box-shadow: inset 0 0 0 2.5px #e08a1e; animation: payCalDue 2s ease-in-out infinite; }
@keyframes payCalDue { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
.pay-cal__cell.needs-reminder { box-shadow: inset 0 0 0 1.5px rgba(224, 138, 30, 0.55); }
.pay-cal__cell.is-reminded { box-shadow: inset 0 0 0 1.5px rgba(37, 211, 102, 0.45); }
.pay-cal__keys { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; margin: 0; font-size: .76rem; color: var(--asser-muted); }
.pay-cal__key { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; font-size: .58rem; font-weight: 800; }
.pay-cal__key--ok { background: #25d366; color: #fff; }
.pay-cal__key--due { margin-left: .6rem; background: #fff; box-shadow: inset 0 0 0 2.5px #e08a1e; }
@media (prefers-reduced-motion: reduce) { .pay-cal__cell.needs-reminder .pay-cal__flag { animation: none; } }

/* ===== Dashboard: effetto vetro ("liquid glass") e schede 3D (20/10/2026 ore 18.30) - inizio =====
   Dietro le schede tre aloni nei toni ASSER che si muovono piano; le schede sono vetro sfocato con riflesso sul bordo
   e un bagliore che segue il puntatore; sotto il puntatore si inclinano in 3D (script: [data-tilt]). */
.professional-dashboard.dash-liquid { position: relative; isolation: isolate; }
.dash-liquid__bg { position: absolute; inset: -30px -20px auto; height: 360px; z-index: -1; overflow: hidden; pointer-events: none; border-radius: 40px; }
.dash-liquid__bg i { position: absolute; width: 46%; height: 120%; border-radius: 50%; filter: blur(60px); opacity: .55; animation: dashBlob 18s ease-in-out infinite alternate; }
.dash-liquid__bg i:nth-child(1) { left: -6%; top: -30%; background: radial-gradient(circle, rgba(176, 66, 79, 0.45), transparent 65%); }
.dash-liquid__bg i:nth-child(2) { left: 34%; top: -10%; background: radial-gradient(circle, rgba(227, 154, 163, 0.55), transparent 65%); animation-delay: -6s; }
.dash-liquid__bg i:nth-child(3) { right: -8%; top: -25%; background: radial-gradient(circle, rgba(125, 68, 94, 0.4), transparent 65%); animation-delay: -12s; }
@keyframes dashBlob { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(6%, 8%, 0) scale(1.12); } }
.professional-dashboard .professional-dashboard__grid, .professional-dashboard .professional-dashboard__stats { border: 0; outline: 0; background: transparent; box-shadow: none; }
.professional-dashboard__stats { perspective: 900px; }
.professional-dashboard__grid { perspective: 1200px; }
.dash-glass { position: relative; overflow: hidden; isolation: isolate; border: 1px solid rgba(255, 255, 255, 0.75) !important; background: linear-gradient(135deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.5) 100%) !important; -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 0 rgba(255, 255, 255, 0.35), 0 1px 2px rgba(29, 29, 31, 0.04), 0 12px 32px rgba(75, 35, 56, 0.1) !important; transform-style: preserve-3d; transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0); transition: transform .45s cubic-bezier(.2, .8, .2, 1), box-shadow .3s ease; will-change: transform; }
.dash-glass::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: linear-gradient(160deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 38%); pointer-events: none; }
.dash-glass__shine { position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none; opacity: 0; background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.55), transparent 60%); transition: opacity .3s ease; mix-blend-mode: soft-light; }
.dash-glass.is-tilting { transition: transform .08s linear, box-shadow .3s ease; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 2px 6px rgba(29, 29, 31, 0.06), 0 22px 48px rgba(75, 35, 56, 0.18) !important; }
.dash-glass.is-tilting .dash-glass__shine { opacity: 1; }
/* schede numeriche */
.professional-dashboard a.dash-tile { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto 1fr auto; align-items: start; gap: .4rem .6rem; min-height: 118px; padding: 1rem 1.05rem; border-radius: 22px; }
.professional-dashboard a.dash-tile:hover { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-3px); }
.dash-tile__ico { grid-column: 1; grid-row: 1; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: linear-gradient(135deg, var(--asser-primary, #b0424f), var(--asser-secondary, #4b2338)); color: #fff; box-shadow: 0 6px 14px rgba(176, 66, 79, 0.28); transform: translateZ(28px); }
.professional-dashboard a.dash-tile strong { grid-column: 2; grid-row: 1; align-self: center; order: 0; font-size: 1.9rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1; color: var(--asser-secondary, #4b2338); transform: translateZ(22px); }
.professional-dashboard a.dash-tile .professional-dashboard__chev { grid-column: 3; grid-row: 1; align-self: center; transform: translateZ(10px) rotate(45deg); }
.dash-tile__label { grid-column: 1 / -1; grid-row: 3; display: grid; gap: .15rem; color: #5a4a52; font-size: .78rem; font-weight: 600; line-height: 1.3; transform: translateZ(14px); }
.dash-tile__label em { font-style: normal; font-size: .82rem; font-weight: 700; color: var(--asser-primary, #b0424f); font-variant-numeric: tabular-nums; }
.professional-dashboard a.dash-tile.professional-dashboard__stat--warn .dash-tile__ico { background: linear-gradient(135deg, #e0a03a, #b8711a); box-shadow: 0 6px 14px rgba(184, 113, 26, 0.3); }
.professional-dashboard a.dash-tile.dash-tile--alert .dash-tile__ico { background: linear-gradient(135deg, #e0603a, #b0424f); }
.professional-dashboard a.dash-tile.dash-tile--alert strong { color: var(--asser-primary, #b0424f); }
/* scheda del grafico */
.professional-dashboard__chart-card.dash-glass { border-radius: 26px; }
.professional-dashboard__chart-card.dash-glass > * { position: relative; }
.professional-dashboard__chart-card.dash-glass .professional-dashboard__chart { transform: translateZ(18px); }
@media (hover: none), (pointer: coarse) { .dash-glass { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .dash-liquid__bg i { animation: none; }
  .dash-glass, .dash-glass.is-tilting, .professional-dashboard a.dash-tile:hover { transform: none; transition: none; }
}
/* ===== Dashboard: effetto vetro e schede 3D - fine ===== */
/* gli aloni dietro le schede sfumano ai bordi: nessun riquadro visibile */
.dash-liquid__bg { inset: -60px -40px auto; height: 440px; border-radius: 0; -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 45%, #000 40%, transparent 100%); mask-image: radial-gradient(ellipse 60% 55% at 50% 45%, #000 40%, transparent 100%); }
.dash-liquid__bg i { opacity: .7; }
/* icone delle schede bianche a contrasto (20/10/2026): la regola vecchia ".professional-dashboard__stat span { color: grigio }" vinceva sul bianco */
.professional-dashboard a.dash-tile .dash-tile__ico { color: #fff; }
.professional-dashboard a.dash-tile .dash-tile__ico svg { stroke: #fff; stroke-width: 2.1; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.18)); }

/* ===== Niente bordi bianchi visibili (20/10/2026 ore 19) =====
   1) asser-ai-profilo.css da' "border: 1px solid rgba(255,255,255,.8) + ombra" a OGNI figlio di
      .professional-dashboard__grid: anche al contenitore delle sei schede, che diventava un riquadro. Qui lo si azzera.
   2) schede in vetro, scheda del grafico e testata: niente bordo bianco; il contorno e' un velo quasi invisibile nel
      colore del testo e la profondita' la danno ombra e riflesso interno. */
body .customer-dashboard .professional-dashboard__grid > .professional-dashboard__stats { border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 0; border-radius: 0; }
body .customer-dashboard .professional-dashboard .dash-glass,
body .professional-dashboard .dash-glass { border: 0 !important; box-shadow: 0 0 0 1px rgba(75, 35, 56, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 1px 2px rgba(29, 29, 31, 0.04), 0 14px 34px rgba(75, 35, 56, 0.09) !important; }
body .professional-dashboard .dash-glass.is-tilting { box-shadow: 0 0 0 1px rgba(75, 35, 56, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.75), 0 2px 6px rgba(29, 29, 31, 0.06), 0 24px 50px rgba(75, 35, 56, 0.18) !important; }
body .professional-dashboard .dash-glass::before { background: linear-gradient(160deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 34%); }
body .customer-dashboard .dashboard-hero,
body .customer-dashboard .dashboard-stats > div { border-color: transparent !important; box-shadow: 0 0 0 1px rgba(75, 35, 56, 0.05), 0 1px 2px rgba(44, 31, 41, 0.04), 0 18px 40px rgba(75, 35, 56, 0.07) !important; }
/* calendario senza piani (20/10/2026): invito a creare il primo piano */
.pay-cal__empty-lead { margin: 0 0 .7rem; font-size: .86rem; line-height: 1.5; color: var(--asser-secondary); }
.pay-cal__cta { display: inline-flex; align-items: center; gap: .4rem; margin: 0 0 .5rem; padding: .55rem 1rem; border-radius: 999px; background: linear-gradient(135deg, var(--asser-primary), var(--asser-secondary)); color: #fff !important; font-size: .84rem; font-weight: 600; text-decoration: none; box-shadow: 0 6px 16px rgba(176, 66, 79, 0.25); transition: transform .15s ease, box-shadow .2s ease; }
.pay-cal__cta::after { content: "›"; font-size: 1.1rem; line-height: 1; }
.pay-cal__cta:hover { box-shadow: 0 8px 20px rgba(176, 66, 79, 0.35); transform: translateY(-1px); }

/* 20/10/2026: «Crea un account» dello Shop aveva il testo scuro sul prugna: la regola generica dei link
   (.asser-ai-app a { color: inherit }) vinceva sul bianco di .pw-button. Il tasto pieno torna bianco, quello vuoto prugna. */
.asser-ai-app a.pw-button:not(.pw-button--ghost) { color: #fff; }
.asser-ai-app a.pw-button--ghost { color: var(--asser-primary); }
.asser-ai-app a.pw-button--ghost:hover { color: #fff; }

/* ===== Icona sulle righe delle pratiche (20/10/2026, titolare: «farle risaltare alla vista») =====
   Quadrato nei toni ASSER con foglio bianco e segno dello stato. Sovrapposto a sinistra: la griglia della riga
   (computer e telefono) non cambia, aumenta solo il margine sinistro. */
body .asser-ai-app .case-list-link.case-list-link--ico { position: relative; padding-left: 68px; }
body .asser-ai-app .client-cases .case-list-link.case-list-link--ico { padding-left: 58px; }
.case-ico { position: absolute; left: 18px; top: 50%; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: #fff;
  background: linear-gradient(145deg, #a2566f 0%, #6d3550 100%); box-shadow: 0 6px 14px -6px rgba(109, 53, 80, .6), inset 0 1px 0 rgba(255, 255, 255, .25);
  transform: translateY(-50%); transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s ease; pointer-events: none; }
.client-cases .case-ico { left: 13px; width: 32px; height: 32px; border-radius: 10px; }
/* le regole delle righe trattano ogni <span> come testo (flex in scheda cliente, "display: contents" al telefono): qui no */
body .asser-ai-app .case-list-link > span.case-ico { display: grid; place-items: center; gap: 0; flex-wrap: nowrap; }
.case-ico svg { display: block; width: 18px; height: 18px; }
.client-cases .case-ico svg { width: 17px; height: 17px; }
.case-list-link:hover .case-ico { transform: translateY(-50%) scale(1.07); box-shadow: 0 10px 20px -8px rgba(109, 53, 80, .7), inset 0 1px 0 rgba(255, 255, 255, .25); }
.case-ico--run { background: linear-gradient(145deg, #c07090 0%, #8a4766 100%); }
.case-ico--run::after { content: ""; position: absolute; inset: -3px; border-radius: 13px; border: 2px solid rgba(176, 66, 79, .35); animation: caseIcoPulse 2.2s ease-in-out infinite; }
.case-ico--warn { background: linear-gradient(145deg, #e0a64a 0%, #b5761a 100%); box-shadow: 0 6px 14px -6px rgba(181, 118, 26, .6), inset 0 1px 0 rgba(255, 255, 255, .3); }
.case-ico--err { background: linear-gradient(145deg, #9a9396 0%, #6f686b 100%); box-shadow: 0 6px 14px -6px rgba(60, 50, 55, .5), inset 0 1px 0 rgba(255, 255, 255, .2); }
.case-ico--draft { background: rgba(125, 68, 94, .12); color: var(--asser-primary, #7d445e); box-shadow: inset 0 0 0 1px rgba(125, 68, 94, .18); }
@keyframes caseIcoPulse { 0%, 100% { opacity: .15; transform: scale(.96); } 50% { opacity: .9; transform: scale(1.04); } }
@media (max-width: 920px) {
  body .asser-ai-app .case-list-link.case-list-link--ico { padding-left: 62px; }
  body .asser-ai-app .client-cases .case-list-link.case-list-link--ico { padding-left: 56px; }
  .case-ico { left: 14px; }
}
@media (prefers-reduced-motion: reduce) { .case-ico--run::after { animation: none; opacity: .5; } .case-ico { transition: none; } }

/* ===== Costo della relazione sulle righe della scheda cliente (20/10/2026, titolare) =====
   Pillola con la moneta ASSER COIN vera subito dopo la data; in testa all'elenco il totale delle relazioni del cliente. */
.client-cases .case-list-link .case-cost { display: inline-flex; align-items: center; align-self: center; gap: .32rem; padding: .18rem .58rem .18rem .26rem; border-radius: 999px;
  background: rgba(176, 66, 79, .07); color: var(--asser-secondary, #4b2338); font-size: .74rem; font-weight: 600; line-height: 1; white-space: nowrap; }
/* niente <b> qui: nella riga il <b> e' la freccia tonda */
.client-cases .case-list-link .case-cost .case-cost__n { display: inline; font-weight: 700; font-variant-numeric: tabular-nums; }
.client-cases .case-list-link .case-cost .ac-coin { --ac: 16px; display: inline-block; flex: none; }
.client-cases .case-list-link .case-cost--refund { background: rgba(29, 29, 31, .05); color: var(--asser-muted, #726b67); font-weight: 500; }
.client-cases .case-list-link .case-cost--refund .ac-coin { opacity: .45; filter: grayscale(.6); }
.client-cases__cost { display: inline-flex; align-items: center; gap: .38rem; font-size: .8rem; color: var(--asser-muted, #726b67); white-space: nowrap; }
.client-cases__cost b { color: var(--asser-secondary, #4b2338); font-weight: 700; font-variant-numeric: tabular-nums; }
.client-cases__cost .ac-coin { --ac: 18px; flex: none; }
@media (max-width: 920px) {
  /* al telefono le righe sono a griglia con aree: la pillola va nel posto libero sotto il numero */
  body .asser-ai-app .client-cases .case-list-link .case-cost { grid-area: client; justify-self: start; margin: 3px 0 1px; }
  .client-cases__head { flex-wrap: wrap; gap: .3rem 1rem; }
}

/* ===== Date utili nel calendario (20/10/2026, titolare: «date utili tipo quelle della rottamazione o altre di interesse
   del professionista»). Rombo ASSER = data ufficiale; stella = data aggiunta dal professionista. ===== */
.pay-cal__cell.has-notes { cursor: pointer; background: #fff; box-shadow: inset 0 0 0 1px rgba(75, 35, 56, 0.1); }
.pay-cal__cell.has-notes:hover, .pay-cal__cell.has-notes:focus-visible { z-index: 1; outline: none; transform: translateY(-3px) scale(1.04); box-shadow: 0 10px 24px rgba(75, 35, 56, 0.16), inset 0 0 0 1.5px var(--asser-primary); }
.pay-cal__evt-ico { display: inline-grid; place-items: center; flex: none; width: 11px; height: 11px; font-size: .62rem; line-height: 1; }
.pay-cal__evt-ico--rot::before { content: ""; width: 7px; height: 7px; border-radius: 1.5px; background: linear-gradient(135deg, #c45f78, #7d445e); transform: rotate(45deg); }
.pay-cal__evt-ico--mia { color: #c98a2b; }
.pay-cal__evts { display: grid; gap: 3px; min-width: 0; }
.pay-cal__evt { display: flex; align-items: flex-start; gap: .28rem; min-width: 0; padding: .16rem .35rem; border-radius: 6px; font-size: .64rem; font-weight: 600; line-height: 1.25; color: var(--asser-secondary); }
.pay-cal__evt .pay-cal__evt-ico { margin-top: .1rem; }
.pay-cal__evt--rot { background: rgba(176, 66, 79, .09); }
.pay-cal__evt--mia { background: rgba(201, 138, 43, .12); }
.pay-cal__evt-text { display: -webkit-box; overflow: hidden; min-width: 0; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; overflow-wrap: break-word; word-break: normal; hyphens: none; }
.pay-cal__cell.is-past .pay-cal__evt { opacity: .55; }
.pay-cal__evt-mark { position: absolute; top: 5px; right: 6px; display: inline-flex; gap: 2px; }
.pay-cal__key--rot { margin-left: .6rem; width: 15px; height: 15px; border-radius: 0; background: none; }
.pay-cal__key--rot::before { content: ""; width: 8px; height: 8px; border-radius: 1.5px; background: linear-gradient(135deg, #c45f78, #7d445e); transform: rotate(45deg); }
.pay-cal__key--mia { background: none; color: #c98a2b; font-size: .78rem; }
.pay-cal__keys a { color: var(--asser-primary); font-weight: 600; }

/* dettaglio del giorno */
.pay-cal__utili { display: grid; gap: .35rem; margin-top: .7rem; }
.pay-cal__utili-title { margin: 0; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--asser-muted); }
.pay-cal__utili-list { display: grid; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.pay-cal__utili-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .55rem; padding: .55rem .65rem; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px rgba(75, 35, 56, .08); }
.pay-cal__utili-item--rot { box-shadow: inset 3px 0 0 #b0424f, inset 0 0 0 1px rgba(75, 35, 56, .08); }
.pay-cal__utili-item--mia { box-shadow: inset 3px 0 0 #c98a2b, inset 0 0 0 1px rgba(75, 35, 56, .08); }
.pay-cal__utili-text { display: grid; gap: .1rem; min-width: 0; }
.pay-cal__utili-text strong { font-size: .84rem; font-weight: 650; line-height: 1.3; color: #1d1d1f; }
.pay-cal__utili-text small { font-size: .72rem; line-height: 1.35; color: var(--asser-muted); }
.pay-cal__utili-link { padding: .3rem .6rem; border-radius: 999px; background: rgba(176, 66, 79, .09); color: var(--asser-primary) !important; font-size: .72rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.pay-cal__utili-link:hover { background: rgba(176, 66, 79, .16); }
.pay-cal__utili-del { margin: 0; }
.pay-cal__utili-x { height: 28px; padding: 0 .6rem; border: 0; border-radius: 999px; cursor: pointer; background: rgba(29, 29, 31, .05); color: #6e6e73; font: inherit; font-size: .72rem; font-weight: 600; }
.pay-cal__utili-x:hover, .pay-cal__utili-x[data-sure] { background: rgba(176, 66, 79, .12); color: #a03343; }

/* colonna a destra: date utili del mese */
.pay-cal__utili-side { display: grid; gap: .45rem; padding: .85rem; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1px rgba(75, 35, 56, .08); }
.pay-cal__utili-month { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.pay-cal__utili-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .55rem; width: 100%; padding: .4rem .45rem; border: 0; border-radius: 10px; cursor: pointer; background: transparent; font: inherit; text-align: left; transition: background-color .18s ease; }
.pay-cal__utili-row:hover, .pay-cal__utili-row:focus-visible { outline: none; background: rgba(125, 68, 94, .07); }
.pay-cal__utili-row.is-past { opacity: .6; }
.pay-cal__utili-row .pay-cal__utili-text strong { font-size: .8rem; }
.pay-cal__utili-add { justify-self: start; margin-top: .15rem; color: var(--asser-primary) !important; font-size: .78rem; font-weight: 700; text-decoration: none; }
.pay-cal__utili-add:hover { text-decoration: underline; }
@media (max-width: 900px) { .pay-cal--large .pay-cal__evts { display: none; } .pay-cal--large .pay-cal__cell.has-notes .pay-cal__evt-mark { display: inline-flex; } }

/* riquadro "Date utili nel calendario" (tab Calendario e promemoria), stessa tendina di "Crea un piano" */
.cal-dates { margin: .9rem 0 0; border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 1px rgba(75, 35, 56, .1); scroll-margin-top: 90px; }
.cal-dates:hover:not([open]) { box-shadow: inset 0 0 0 1px rgba(176, 66, 79, .45); }
.cal-dates[open] { background: linear-gradient(180deg, #fff 0%, #fbf8f9 100%); box-shadow: 0 1px 2px rgba(29, 29, 31, .05), 0 12px 32px rgba(75, 35, 56, .08); }
.cal-dates__summary { display: flex; align-items: center; gap: .85rem; padding: .85rem 1.05rem; list-style: none; cursor: pointer; border-radius: 18px; }
.cal-dates__summary::-webkit-details-marker { display: none; }
.cal-dates__ico { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: #fff; background: linear-gradient(145deg, #a2566f, #6d3550); box-shadow: 0 6px 14px -6px rgba(109, 53, 80, .6); }
.cal-dates__text { display: grid; gap: .1rem; flex: 1 1 auto; min-width: 0; }
.cal-dates__text strong { font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; color: var(--asser-secondary); }
.cal-dates__text small { font-size: .78rem; color: var(--asser-muted); }
.cal-dates__chev { flex: none; width: 9px; height: 9px; margin-right: .3rem; border-right: 2px solid var(--asser-muted); border-bottom: 2px solid var(--asser-muted); transform: rotate(45deg); transition: transform .25s ease; }
.cal-dates[open] .cal-dates__chev { transform: rotate(-135deg); }
.cal-dates__body { display: grid; gap: .9rem; padding: 0 1.05rem 1.05rem; }
.cal-dates[open] .cal-dates__body { animation: planNewIn .34s cubic-bezier(.2, .8, .2, 1) both; }
.cal-dates__lead { margin: 0 0 .5rem; font-size: .84rem; line-height: 1.45; color: var(--asser-muted); }
.cal-dates__form { display: grid; gap: .7rem; }
.cal-dates__fields { display: grid; grid-template-columns: 160px minmax(0, 1.6fr) minmax(0, 1fr); gap: .7rem; }
.cal-field { display: grid !important; gap: .3rem; margin: 0; }
.cal-field--note { grid-column: 1 / -1; }
.cal-field > span { font-size: .76rem; font-weight: 650; color: #3a3236; }
.cal-field em { font-style: normal; font-weight: 500; color: var(--asser-muted); }
.cal-field input, .cal-field select { width: 100%; height: 42px; box-sizing: border-box; margin: 0; padding: 0 .85rem; border: 0; border-radius: 12px; background-color: rgba(29, 29, 31, .05); color: #1d1d1f; font: inherit; font-size: .9rem; box-shadow: none; }
.cal-field select { -webkit-appearance: none; appearance: none; padding-right: 2.3rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e8a8c' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .8rem center; background-size: 16px 16px; }
.cal-field input:focus, .cal-field select:focus { outline: none; background-color: #fff; box-shadow: 0 0 0 3px rgba(176, 66, 79, .22), inset 0 0 0 1px rgba(176, 66, 79, .5); }
.cal-dates__go { justify-self: start; height: 42px; padding: 0 1.3rem; border: 0; border-radius: 999px; cursor: pointer; color: #fff; font: inherit; font-size: .9rem; font-weight: 700;
  background: linear-gradient(135deg, var(--asser-primary), var(--asser-secondary)); box-shadow: 0 8px 18px -8px rgba(109, 53, 80, .7); }
.cal-dates__go:active { transform: scale(.96); }
.cal-dates__list { display: grid; gap: 2px; margin: 0; padding: .25rem; list-style: none; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px rgba(75, 35, 56, .08); }
.cal-dates__list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .7rem; padding: .5rem .55rem; border-radius: 10px; }
.cal-dates__list li + li { box-shadow: 0 -1px 0 rgba(75, 35, 56, .06); }
.cal-dates__day { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: rgba(201, 138, 43, .12); color: #8a5a12; line-height: 1; }
.cal-dates__day b { font-size: 1rem; font-weight: 800; }
.cal-dates__day small { font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.cal-dates__what { display: grid; gap: .1rem; min-width: 0; }
.cal-dates__what strong { font-size: .88rem; font-weight: 650; color: #1d1d1f; }
.cal-dates__what small { font-size: .74rem; color: var(--asser-muted); }
.cal-dates__del { margin: 0; }
.cal-dates__del button { width: 30px; height: 30px; border: 0; border-radius: 50%; cursor: pointer; background: rgba(29, 29, 31, .05); color: #6e6e73; font-size: 1.05rem; line-height: 1; }
.cal-dates__del button:hover { background: rgba(176, 66, 79, .12); color: #a03343; }
.cal-dates__official { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin: 0; padding: .7rem .85rem; border-radius: 14px; background: rgba(176, 66, 79, .05); font-size: .82rem; color: #3a3236; }
.cal-dates__toggle { height: 32px; padding: 0 .9rem; border: 0; border-radius: 999px; cursor: pointer; background: #fff; color: var(--asser-primary); font: inherit; font-size: .78rem; font-weight: 700; box-shadow: inset 0 0 0 1px rgba(176, 66, 79, .3); }
@media (max-width: 720px) { .cal-dates__fields { grid-template-columns: 1fr; } .cal-dates__summary { padding: .8rem .85rem; } .cal-dates__body { padding: 0 .85rem .9rem; } }
@media (prefers-reduced-motion: reduce) { .cal-dates[open] .cal-dates__body { animation: none; } .pay-cal__cell.has-notes:hover { transform: none; } }
/* pillole delle date utili: piu' spazio al testo nelle celle strette */
.pay-cal__evt { gap: .18rem; padding: .16rem .26rem; font-size: .62rem; letter-spacing: -0.012em; }
.pay-cal__evt .pay-cal__evt-ico { width: 9px; }

/* ===== Costo in ASSER COIN su ogni pratica, ovunque (20/10/2026, titolare) =====
   Pillola con la moneta: addebito vero ("300"), stima per le relazioni mai addebitate ("≈ 300 stima", tratteggiata),
   "rimborsata". Le righe delle pratiche trattano ogni <span> come griglia/flex: qui si rimette tutto in riga. */
body .asser-ai-app .case-cost { display: inline-flex; align-items: center; align-self: center; justify-self: start; gap: .3rem; width: auto; padding: .18rem .58rem .18rem .26rem; border-radius: 999px;
  background: rgba(176, 66, 79, .07); color: var(--asser-secondary, #4b2338); font-size: .74rem; font-weight: 600; line-height: 1; white-space: nowrap; vertical-align: middle; }
body .asser-ai-app .case-cost .case-cost__n { display: inline; font-weight: 700; font-variant-numeric: tabular-nums; }
body .asser-ai-app .case-cost .case-cost__tag { display: inline; margin-left: .05rem; font-size: .62rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; opacity: .7; }
body .asser-ai-app .case-cost .ac-coin { --ac: 16px; display: inline-block; flex: none; }
body .asser-ai-app .case-cost--stima { background: transparent; box-shadow: inset 0 0 0 1px rgba(176, 66, 79, .32); color: #7d445e; }
body .asser-ai-app .case-cost--stima .ac-coin { opacity: .75; }
body .asser-ai-app .case-cost--rimborsata { background: rgba(29, 29, 31, .05); color: var(--asser-muted, #726b67); font-weight: 500; }
body .asser-ai-app .case-cost--rimborsata .ac-coin { opacity: .45; filter: grayscale(.6); }
/* nella riga "Creata il …" della lista Pratiche */
body .asser-ai-app .case-cost--inline { margin-left: .5rem; padding-top: .12rem; padding-bottom: .12rem; font-size: .7rem; }
/* archivio clienti: sotto la data; dettaglio pratica: riga dedicata */
body .asser-ai-app .arch-cases__main .case-cost { margin-top: .25rem; }
.case-detail__cost { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .45rem 0 0; font-size: .82rem; color: var(--asser-muted, #726b67); }
/* totale ("◉ 600 ASSER COIN in relazioni · ≈ 900 stimati") */
.case-cost-total { display: inline-flex; align-items: center; gap: .38rem; font-size: .8rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--asser-muted, #726b67); white-space: nowrap; }
.case-cost-total b { color: var(--asser-secondary, #4b2338); font-weight: 700; font-variant-numeric: tabular-nums; }
.case-cost-total .ac-coin { --ac: 18px; flex: none; }
.arch-panel__heading .case-cost-total { float: right; font-size: .76rem; }
@media (max-width: 920px) {
  .arch-panel__heading .case-cost-total { float: none; display: flex; margin-top: .35rem; white-space: normal; }
  .case-cost-total { white-space: normal; }
}
/* il vecchio selettore della scheda cliente resta valido; l'icona della moneta allineata come sopra */
.client-cases .case-list-link .case-cost--stima { background: transparent; }

/* costo accanto al numero della pratica nel dettaglio (20/10/2026, titolare) */
.case-detail__title-row { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .75rem; }
.case-detail__title-row h2 { margin: 0; }
body .asser-ai-app .case-cost--head { padding: .3rem .8rem .3rem .34rem; font-size: .86rem; gap: .38rem; }
body .asser-ai-app .case-cost--head .ac-coin { --ac: 22px; }
body .asser-ai-app .case-cost--head .case-cost__tag { font-size: .66rem; }
