@font-face {
  font-family: "Ethos Nova";
  src: url("../fonts/EthosNova-Thin.ttf") format("truetype");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Ethos Nova";
  src: url("../fonts/EthosNova-ThinItalic.ttf") format("truetype");
  font-weight: 100;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Ethos Nova";
  src: url("../fonts/EthosNova-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Ethos Nova";
  src: url("../fonts/EthosNova-LightItalic.ttf") format("truetype");
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Ethos Nova";
  src: url("../fonts/EthosNova-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Ethos Nova";
  src: url("../fonts/EthosNova-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Ethos Nova";
  src: url("../fonts/EthosNova-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Ethos Nova";
  src: url("../fonts/EthosNova-MediumItalic.ttf") format("truetype");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Ethos Nova";
  src: url("../fonts/EthosNova-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Ethos Nova";
  src: url("../fonts/EthosNova-BoldItalic.ttf") format("truetype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Ethos Nova";
  src: url("../fonts/EthosNova-Heavy.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Ethos Nova";
  src: url("../fonts/EthosNova-HeavyItalic.ttf") format("truetype");
  font-weight: 800;
  font-style: italic;
  font-display: swap;
}

:root {
  --pix-blue: #0054A6;
  --pix-red: #E10600;
  --header-red: #BA1214;
  --header-red-dark: #950e10;
  --header-blue: #25408F;
  --header-blue-dark: #1A2D66;
  --topbar-height: 48px;
  --accent-height: 2px;
  --sidebar-width: 260px;
  --bs-font-sans-serif: "Ethos Nova", "Segoe UI", Helvetica, Arial, sans-serif;
  --bs-body-font-family: var(--bs-font-sans-serif);
}

html, body {
  min-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: #e7ebf2;
  color: #1d2433;
  font-family: var(--bs-body-font-family);
}

/* Ragioni sociali e nomi dei contatti, solo in lettura a schermo.
   Il valore inviato dal modulo resta quello archiviato. */
.maiuscolo {
  text-transform: uppercase;
}

.maiuscolo::placeholder {
  text-transform: none;
}

.scheda-agente:has(#VedeTuttiIClienti:checked) .codice-gestionale {
  display: none;
}

body:not(.login-page) {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

a {
  color: var(--header-red);
}

.btn:not(.btn-link) {
  border-radius: 0.75rem;
}

.btn-primary {
  --bs-btn-bg: var(--header-red);
  --bs-btn-border-color: var(--header-red);
  --bs-btn-hover-bg: var(--header-red-dark);
  --bs-btn-hover-border-color: #700b0c;
  --bs-btn-active-bg: #700b0c;
  --bs-btn-active-border-color: #4a0708;
  --bs-btn-disabled-bg: var(--header-red);
  --bs-btn-disabled-border-color: var(--header-red);
}

.btn-outline-primary {
  --bs-btn-color: var(--header-red);
  --bs-btn-border-color: var(--header-red);
  --bs-btn-hover-bg: var(--header-red);
  --bs-btn-hover-border-color: var(--header-red);
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--header-red-dark);
  --bs-btn-active-border-color: var(--header-red-dark);
  --bs-btn-active-color: #fff;
}

.btn:focus, .btn:active:focus, .form-control:focus, .form-select:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem #fff, 0 0 0 0.25rem rgba(186, 18, 20, 0.35);
}

.form-label {
  margin-bottom: 0.15rem;
  color: var(--header-red);
  font-weight: 600;
}

.form-control,
.form-select {
  border-color: #e7c8c8;
  background: #fffdfd;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--header-red);
  box-shadow: 0 0 0 0.2rem rgba(186, 18, 20, 0.15);
}

.form-check-input:checked {
  background-color: var(--header-red);
  border-color: var(--header-red);
}

.list-group-item.active {
  background-color: var(--header-red);
  border-color: var(--header-red);
}

.desk {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 0.85rem;
  height: calc(100vh - 1.7rem);
  height: calc(100dvh - 1.7rem);
  min-height: 0;
  background: #f6f7fb;
  border-radius: 1.7rem;
  box-shadow: 0 12px 40px rgba(28, 39, 68, 0.06);
  overflow: hidden;
}

html.sidebar-open .desk {
  grid-template-columns: 280px minmax(0, 1fr);
}

html.sidebar-open.sidebar-icons .desk {
  grid-template-columns: 76px minmax(0, 1fr);
}

.app-sidebar {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #fff;
  padding: 1.1rem 0.85rem 0.9rem;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex: 0 0 auto;
  padding: 0.15rem 0.35rem 1rem 0.55rem;
}

.sidebar-collapse,
.side-right-close,
.side-right-open {
  border: 0;
  background: #f4f6fa;
  color: #5c6b82;
  width: 2rem;
  height: 2rem;
  border-radius: 0.7rem;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.sidebar-collapse:hover,
.side-right-close:hover,
.side-right-open:hover {
  background: #e7ebf2;
  color: #1d2433;
}

.sidebar-logo {
  display: block;
  height: 42px;
  width: auto;
  max-width: 100%;
}

.sidebar-mark {
  display: none;
  width: 32px;
  height: 32px;
}

.sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sidebar-actions-icons {
  display: none;
}

html.sidebar-icons .sidebar-actions-full {
  display: none;
}

html.sidebar-icons .sidebar-actions-icons {
  display: flex;
}

html.sidebar-icons .app-sidebar {
  padding-left: 0.4rem;
  padding-right: 0.4rem;
}

html.sidebar-icons .sidebar-brand {
  flex-direction: column;
  align-items: center;
  padding: 0.15rem 0 0.75rem;
}

html.sidebar-icons .sidebar-logo {
  display: none;
}

html.sidebar-icons .sidebar-mark {
  display: block;
}

html.sidebar-icons .menu-label {
  display: none;
}

html.sidebar-icons .menu-link {
  justify-content: center;
  gap: 0;
  padding-left: 0;
  padding-right: 0;
}

.sidebar-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.sidebar-overlay {
  display: none;
}

.desk-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.desk-tools {
  position: absolute;
  z-index: 3;
  top: 0.9rem;
  right: 1.15rem;
  left: 1.15rem;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 0.75rem;
  pointer-events: none;
}

.desk-tools > * {
  pointer-events: auto;
}

.sidebar-toggle-btn {
  display: none;
  margin-right: auto;
  border: 0;
  background: #fff;
  color: #1d2433;
  font-size: 1.35rem;
  line-height: 1;
  padding: 0.35rem 0.55rem;
  border-radius: 0.8rem;
  box-shadow: 0 6px 18px rgba(28, 39, 68, 0.06);
}

.sidebar-user {
  flex: 0 0 auto;
  margin-top: 0.35rem;
  padding-top: 0.65rem;
  border-top: 1px solid #eef0f4;
  position: relative;
  z-index: 2;
  background: #fff;
}

.sidebar-user .user-chip {
  width: 100%;
  max-width: none;
  box-shadow: none;
  background: transparent;
  border-radius: 0.8rem;
  padding: 0.35rem 0.45rem;
}

.sidebar-user .user-chip:hover,
.sidebar-user .user-chip:focus,
.sidebar-user .user-chip.show {
  background: #f4f6fa;
}

.sidebar-user .user-chip-name {
  max-width: 11rem;
}

.sidebar-user .dropdown-menu {
  width: 100%;
  border: 0;
  border-radius: 1rem;
  padding: 0.4rem;
  box-shadow: 0 10px 28px rgba(28, 39, 68, 0.1);
}

.sidebar-user .dropdown-item {
  border: 0;
  border-radius: 0.65rem;
  background: transparent;
  color: #1d2433;
  font-weight: 600;
  text-align: left;
  width: 100%;
}

.sidebar-user .dropdown-item:hover,
.sidebar-user .dropdown-item:focus {
  background: #f4f6fa;
  color: #3f59a6;
}

.sidebar-user .dropdown-divider {
  margin: 0.35rem 0.4rem;
  border-color: #eef0f4;
}

.sidebar-user form {
  margin: 0;
}

html.sidebar-icons .sidebar-user .user-chip-text {
  display: none;
}

html.sidebar-icons .sidebar-user .user-chip {
  justify-content: center;
  padding: 0.35rem;
}

html.sidebar-icons .sidebar-user .dropdown-menu {
  position: fixed;
  left: 84px;
  bottom: 1.2rem;
  top: auto;
  min-width: 12rem;
  width: auto;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border: 0;
  background: transparent;
  color: #1d2433;
}

.user-chip::after {
  display: none;
}

.user-avatar {
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  background: #eef2f8;
  color: #5c6b82;
  font-size: 1.15rem;
}

.user-chip-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  line-height: 1.15;
}

.user-chip-name {
  font-weight: 700;
  font-size: 0.92rem;
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chip-role {
  color: #8b95a7;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.app-content {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 1.35rem 1.15rem 1.25rem;
}

.login-page .app-footer {
  margin-left: 0;
  background: var(--header-blue);
  color: #fff;
  border-top: var(--accent-height) solid var(--header-red);
  padding: 0.35rem 1.5rem;
  font-size: 0.875rem;
}

.main-menu {
  padding: 0.2rem 0 0.6rem;
}

.menu-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  color: #6d7788;
  text-decoration: none;
  background: transparent;
  border: 0;
  border-radius: 0.8rem;
  box-shadow: none;
  font: inherit;
  font-weight: 600;
  text-align: left;
  padding: 0.62rem 0.75rem;
  margin: 0.1rem 0;
}

.menu-link .bi {
  font-size: 1.05rem;
  width: 1.2rem;
}

.menu-link:hover,
.menu-link:focus {
  background: #f4f6fa;
  color: #e11d2e;
}

.menu-link.active {
  background: transparent;
  color: #e11d2e;
  font-weight: 700;
}

.menu-group {
  margin: 0.1rem 0;
}

.menu-group-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  color: #3f59a6;
  background: transparent;
  border-radius: 0.8rem;
  font-weight: 700;
  text-align: left;
  padding: 0.62rem 0.75rem;
  margin: 0.1rem 0;
  list-style: none;
  cursor: pointer;
}

.menu-group-toggle .menu-label {
  white-space: nowrap;
}

.menu-group-toggle::-webkit-details-marker {
  display: none;
}

.menu-group-toggle .bi {
  font-size: 1.05rem;
  width: 1.2rem;
}

.menu-group-toggle:hover {
  background: #f4f6fa;
  color: #314887;
}

.menu-chevron {
  margin-left: auto;
  width: auto;
  font-size: 0.8rem;
  transition: transform 0.2s ease;
}

.menu-group[open] > .menu-group-toggle {
  color: #3f59a6;
}

.menu-group[open] .menu-chevron {
  transform: rotate(180deg);
}

.menu-sub {
  padding-left: 2.35rem;
}

html.sidebar-icons .menu-chevron {
  display: none;
}

html.sidebar-icons .menu-group-toggle,
html.sidebar-icons .menu-sub {
  justify-content: center;
  gap: 0;
  padding-left: 0;
  padding-right: 0;
}

html.sidebar-icons .menu-group-toggle,
html.sidebar-icons .menu-group[open] > .menu-group-toggle,
html.sidebar-icons .menu-group-toggle:hover {
  width: 2.1rem;
  height: 2.1rem;
  margin: 0.2rem auto;
  padding: 0;
  border-radius: 50%;
  background: #3f59a6;
  color: #fff;
}

html.sidebar-icons .menu-group-toggle:hover {
  background: #314887;
}

.login-page {
  background: transparent;
}

.login-topbar,
.login-page .app-footer {
  background: var(--header-blue);
  border-color: var(--header-red);
}

.login-topbar {
  position: relative;
  z-index: 1;
  color: #fff;
  padding: 0.35rem 1rem;
  font-size: 0.875rem;
  border-bottom: var(--accent-height) solid var(--header-red);
}

.login-main {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.scheda-ingresso {
  width: min(440px, 92vw);
  background: #fff;
  border: 1px solid #d9e3f0;
  border-radius: 0.5rem;
  box-shadow: 0 0.2rem 0.7rem rgba(0, 84, 166, 0.08);
  overflow: hidden;
}

.scheda-ingresso::before {
  content: "";
  display: block;
  height: 4px;
  margin: -1.5rem -1.5rem 1.15rem;
  background: linear-gradient(90deg, var(--header-red), var(--pix-blue));
}

.login-kicker {
  background: linear-gradient(90deg, var(--header-red), var(--pix-blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.btn-entra {
  color: #fff;
  background: linear-gradient(90deg, var(--header-red), var(--pix-blue));
  border: 0;
}

.btn-entra:hover,
.btn-entra:focus {
  color: #fff;
  background: linear-gradient(90deg, var(--header-red-dark), #003f7d);
}

.sfondo-login::before,
.sfondo-login::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}

.sfondo-login::before {
  inset: -30%;
  background:
    radial-gradient(circle at 16% 20%, rgba(186, 18, 20, 0.38), transparent 34%),
    radial-gradient(circle at 84% 16%, rgba(0, 84, 166, 0.36), transparent 32%),
    radial-gradient(circle at 76% 80%, rgba(0, 84, 166, 0.26), transparent 36%),
    radial-gradient(circle at 12% 84%, rgba(186, 18, 20, 0.22), transparent 30%),
    #f4f4f3;
  animation: login-deriva 18s ease-in-out infinite alternate;
}

.sfondo-login::after {
  width: 28rem;
  height: 28rem;
  right: -6rem;
  bottom: -8rem;
  background: radial-gradient(circle, rgba(0, 84, 166, 0.32), rgba(186, 18, 20, 0.2) 55%, transparent 72%);
  filter: blur(8px);
  animation: login-alone 14s ease-in-out infinite;
}

@keyframes login-deriva {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-4%, 3%, 0) scale(1.08); }
}

@keyframes login-alone {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(-12rem, -8rem, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .sfondo-login::before,
  .sfondo-login::after {
    animation: none;
  }
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  background: transparent;
  border: 0;
  padding: 0;
}

.page-header-compatta {
  margin-bottom: 0.5rem;
}

.scheda-visita {
  padding: 0.75rem 1rem 0.65rem;
}

.scheda-visita .mb-3 {
  margin-bottom: 0.45rem !important;
}

.scheda-visita .form-label {
  margin-bottom: 0.12rem;
}

.scheda-visita .form-control,
.scheda-visita .form-select {
  padding-top: 0.28rem;
  padding-bottom: 0.28rem;
  min-height: 0;
}

.clienti-testata,
.articoli-testata,
.elenco-testata {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.clienti-testata h1,
.articoli-testata h1,
.elenco-testata h1 {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0;
  color: #1d2433;
  font-size: 1.65rem;
  font-weight: 750;
  line-height: 1.1;
}

.titolo-clienti,
.titolo-articolo,
.titolo-lead,
.titolo-opportunita,
.titolo-attivita,
.titolo-visita,
.titolo-fiera,
.titolo-utenti,
.titolo-agenti,
.titolo-claim {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.titolo-clienti > span,
.titolo-articolo > span,
.titolo-lead > span,
.titolo-opportunita > span,
.titolo-attivita > span,
.titolo-visita > span,
.titolo-fiera > span,
.titolo-utenti > span,
.titolo-agenti > span,
.titolo-claim > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.fiera-commerciali {
  font-size: 0.9rem;
  font-weight: 500;
  color: #5c6b82;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.icona-clienti,
.icona-articolo,
.icona-lead,
.icona-opportunita,
.icona-attivita,
.icona-visita,
.icona-fiera,
.icona-utenti,
.icona-agenti,
.icona-claim {
  width: 3.4rem;
  height: 3.4rem;
  object-fit: contain;
  flex: 0 0 auto;
}

.elenco-testata h1,
.elenco-testata h2 {
  margin: 0;
}

.elenco-testata .icona-fiera {
  width: 4.4rem;
  height: 4.4rem;
}

.tag-fiera {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.6rem 0.15rem 0.35rem;
  border-radius: 999px;
  background: #eef2fb;
  color: #3f59a6;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
  max-width: 100%;
}

.tag-fiera img {
  width: 1.15rem;
  height: 1.15rem;
  object-fit: contain;
  flex: 0 0 auto;
}

.scheda > .elenco-testata {
  padding: 0.9rem 0.9rem 0.35rem;
  margin-bottom: 0;
}

.page-header .titolo-clienti ~ .password-hint,
.page-header .titolo-articolo ~ .password-hint,
.page-header .titolo-lead ~ .password-hint,
.page-header .titolo-opportunita ~ .password-hint,
.page-header .titolo-attivita ~ .password-hint,
.page-header .titolo-visita ~ .password-hint,
.page-header .titolo-fiera ~ .password-hint,
.page-header .titolo-utenti ~ .password-hint,
.page-header .titolo-agenti ~ .password-hint,
.page-header .titolo-claim ~ .password-hint {
  margin-left: calc(3.4rem + 0.7rem);
}

.azioni-fiera {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding-right: 0.6rem;
  margin-right: 0.2rem;
  border-right: 1px solid #ececec;
}

.btn-icona-fiera {
  width: 4.6rem;
  height: 4.6rem;
  padding: 0.3rem;
  border: none;
  border-radius: 1rem;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  color: #3f59a6;
  font-size: 2.1rem;
  transition: transform .1s ease, box-shadow .1s ease, border-color .1s ease;
}

.btn-icona-fiera img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.btn-icona-fiera:hover {
  transform: translateY(-2px) scale(1.05);
}

.btn-icona-stop {
  color: #BA1214;
  border-color: #BA1214;
}

.btn-icona-stop:hover {
  border-color: #BA1214;
}

/* Campo nota e microfono sulla stessa riga */
.nota-fiera {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nota-fiera textarea {
  flex: 1 1 auto;
  min-width: 0;
}

.nota-fiera-mic {
  position: relative;
  width: 4.6rem;
  height: 4.6rem;
  flex: 0 0 auto;
}

.nota-fiera-mic .btn-icona-fiera {
  position: absolute;
  inset: 0;
}

.clienti-cerca,
.articoli-cerca,
.elenco-cerca {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  flex: 0 1 auto;
  margin-left: auto;
  max-width: 100%;
}

.clienti-cerca .form-control,
.elenco-cerca .form-control {
  width: 28.8rem;
  max-width: 100%;
  min-width: 0;
  flex: 0 1 28.8rem;
}

.clienti-cerca .btn,
.articoli-cerca .btn,
.elenco-cerca .btn,
.elenco-testata > .btn {
  flex: 0 0 auto;
}

.articoli-cerca .posizione-suggerimenti {
  width: 28.8rem;
  max-width: 100%;
  min-width: 0;
  flex: 0 1 28.8rem;
}

.articoli-cerca .form-control {
  width: 100%;
}

.app-content .clienti-cerca .form-control,
.app-content .articoli-cerca .form-control,
.app-content .elenco-cerca .form-control,
.app-content .elenco-cerca .form-select {
  background: #fff;
}

.app-content .clienti-cerca .form-control::placeholder,
.app-content .articoli-cerca .form-control::placeholder,
.app-content .elenco-cerca .form-control::placeholder {
  color: #a3acba;
  opacity: 1;
}

.elenco-cerca .form-select {
  width: 11rem;
  max-width: 100%;
  min-width: 0;
  flex: 0 1 11rem;
}

.elenco-cerca:has(.form-select) .form-control {
  width: 16rem;
  flex-basis: 16rem;
}

.clienti-dismessi {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  flex: 0 0 auto;
  cursor: pointer;
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 400;
  color: #1d2433;
}

.clienti-dismessi .form-check-input {
  margin: 0;
  cursor: pointer;
}

.clienti-barra,
.articoli-barra,
.elenco-barra {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid #E2E2E1;
}

.clienti-barra .password-hint,
.articoli-barra .password-hint,
.elenco-barra .password-hint {
  margin: 0;
  flex: 0 0 auto;
  white-space: nowrap;
}

.clienti-barra > nav,
.articoli-barra > nav,
.elenco-barra > nav {
  margin-left: auto;
  min-width: 0;
}

.clienti-barra .pagination,
.articoli-barra .pagination,
.elenco-barra .pagination {
  flex-wrap: nowrap !important;
  justify-content: flex-end;
  margin-bottom: 0;
}

.elenco-clienti,
.elenco-articoli {
  width: 100%;
  table-layout: fixed;
}

.elenco-clienti .col-ragione,
.elenco-clienti td:nth-child(2),
.elenco-articoli .col-descrizione,
.elenco-articoli td:nth-child(2) {
  width: 40%;
  overflow-wrap: anywhere;
}

.page-header h1 {
  margin: 0;
  color: #1d2433;
  font-size: 1.65rem;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.scheda {
  background: #fff;
  border: 0;
  border-radius: 1.2rem;
  box-shadow: 0 10px 28px rgba(28, 39, 68, 0.05);
  overflow: hidden;
}

/* Spazio extra sotto l'ultimo riquadro: su telefono la barra del browser copre
   il fondo della pagina. 110px la superano; la striscia di sicurezza del telefono si somma. */
.scheda-fondo-mobile {
  margin-bottom: 2rem;
}

@media (max-width: 767.98px) {
  .scheda-fondo-mobile {
    /* !important: sulle schede c'è anche mb-3 di Bootstrap, che altrimenti tiene il margine a 16px. */
    margin-bottom: calc(110px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Se subito sotto c'è un altro riquadro visibile, il vuoto grande resta solo in fondo. */
  .scheda-fondo-mobile:has(+ .scheda-fondo-mobile:not(.d-none)) {
    margin-bottom: 1rem !important;
  }
}

.scheda h2 {
  color: #1d2433;
  font-size: 1.05rem;
  font-weight: 750;
}

.app-content a {
  color: #3f59a6;
  text-decoration: none;
}

.app-content a:hover {
  color: #314887;
}

/* Data dell'incontro in elenco fiera: rossa, così si distingue dal nome del cliente o del lead. */
.incontro-quando,
.app-content a.incontro-quando {
  color: #BA1214;
  font-weight: 650;
}

.app-content a.incontro-quando:hover {
  color: #8e0e10;
}

.app-content .btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: #3f59a6;
  --bs-btn-border-color: #3f59a6;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #314887;
  --bs-btn-hover-border-color: #314887;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #2a3d75;
  --bs-btn-active-border-color: #2a3d75;
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: #3f59a6;
  --bs-btn-disabled-border-color: #3f59a6;
  border-radius: 0.85rem;
  font-weight: 700;
  color: #fff;
}

.app-content a.btn-primary:hover,
.app-content a.btn-primary:focus,
.app-content a.btn-primary:active {
  color: #fff;
}

.app-content .btn-outline-primary {
  --bs-btn-color: #3f59a6;
  --bs-btn-border-color: #d5dced;
  --bs-btn-hover-bg: #f4f6fa;
  --bs-btn-hover-border-color: #d5dced;
  --bs-btn-hover-color: #3f59a6;
  --bs-btn-active-bg: #e7ebf2;
  --bs-btn-active-border-color: #d5dced;
  --bs-btn-active-color: #3f59a6;
  background: #fff;
  border-radius: 0.85rem;
  font-weight: 700;
}

.app-content .btn-link {
  color: #3f59a6;
  font-weight: 700;
  text-decoration: none;
}

.app-content .form-label {
  color: #5c6b82;
  font-size: 0.82rem;
  font-weight: 700;
}

.app-content .form-control,
.app-content .form-select {
  border: 1px solid #e6eaf1;
  border-radius: 0.85rem;
  background: #f6f7fb;
  color: #1d2433;
}

.app-content form.row .form-control {
  border: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(28, 39, 68, 0.05);
}

.app-content .form-control:focus,
.app-content .form-select:focus {
  border-color: #3f59a6;
  background: #fff;
  box-shadow: 0 0 0 0.2rem rgba(63, 89, 166, 0.15);
}

.app-content .form-check-input:checked {
  background-color: #3f59a6;
  border-color: #3f59a6;
}

.app-content .alert {
  border: 0;
  border-radius: 1rem;
}

.app-content .page-link {
  color: #3f59a6;
  border: 0;
  border-radius: 0.7rem;
  margin: 0 0.15rem;
  background: #fff;
  box-shadow: 0 6px 16px rgba(28, 39, 68, 0.05);
}

.app-content .page-item.active .page-link {
  background: #3f59a6;
  color: #fff;
}

.app-content .page-item.disabled .page-link {
  color: #98a2b3;
  background: #fff;
}

.scheda .table {
  margin-bottom: 0;
}

.scheda .table thead th {
  background: #e3e8f2;
  color: #4d5b70;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 0;
}

.scheda .table tbody tr:hover {
  background: #f8f9fc;
}

.table > :not(caption) > * > * {
  border-bottom-color: #E2E2E1;
}

.password-hint {
  color: #8b95a7;
  font-size: 0.875rem;
}

.permission-group {
  background: #f6f7fb;
  font-weight: 600;
}

.permission-child td:first-child {
  padding-left: 2.2rem;
}

@media (max-width: 991.98px) {
  .desk {
    margin: 0;
    border-radius: 0;
    height: 100vh;
    height: 100dvh;
  }

  .app-content {
    padding-top: 3.5rem;
  }

  .app-sidebar {
    position: fixed;
    z-index: 1050;
    top: 0;
    left: 0;
    width: min(280px, 86vw);
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.12);
  }

  html.sidebar-open .app-sidebar {
    transform: none;
  }

  html.sidebar-open .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    z-index: 1045;
  }

  .sidebar-toggle-btn {
    display: inline-flex;
  }

  html.sidebar-icons .menu-label,
  html.sidebar-icons .sidebar-logo {
    display: initial;
  }

  html.sidebar-icons .sidebar-mark,
  html.sidebar-icons .sidebar-actions-icons {
    display: none;
  }

  html.sidebar-icons .sidebar-actions-full {
    display: flex;
  }

  html.sidebar-icons .menu-link {
    justify-content: flex-start;
    gap: 0.75rem;
    padding: 0.62rem 0.75rem;
  }

  html.sidebar-icons .menu-group-toggle,
  html.sidebar-icons .menu-group[open] > .menu-group-toggle,
  html.sidebar-icons .menu-group-toggle:hover {
    width: 100%;
    height: auto;
    margin: 0.1rem 0;
    padding: 0.62rem 0.75rem;
    border-radius: 0.8rem;
    background: transparent;
    color: #3f59a6;
    justify-content: flex-start;
  }

  html.sidebar-icons .sidebar-user .user-chip-text {
    display: flex;
  }

  html.sidebar-icons .sidebar-user .dropdown-menu {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    min-width: 0;
    width: 100%;
  }
}

@media (min-width: 992px) {
  html:not(.sidebar-open) .app-sidebar {
    display: none;
  }

  html.sidebar-open .sidebar-toggle-btn {
    display: none;
  }

  html:not(.sidebar-open) .sidebar-toggle-btn {
    display: inline-flex;
  }
}

@media (min-width: 1200px) {
  html:not(.sidebar-open) .dash-head {
    padding-left: 3.25rem;
  }
}

.dash-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin: 0 0 0.85rem;
}

.dash-saluto {
  margin: 0;
  flex: 0 1 auto;
  min-width: 0;
  color: #1d2433;
  font-size: 1.85rem;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.dash-saluto strong {
  font-weight: 750;
}

.dash-head .claim-banner {
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  margin: 0;
  padding: 0.55rem 0.95rem;
}

.dash-head .claim-banner p {
  font-size: 1.45rem;
}

.claim-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin: 0 0 1rem;
  padding: 0.95rem 1.15rem;
  background: #fff;
  border-radius: 1.2rem;
  box-shadow: 0 10px 28px rgba(28, 39, 68, 0.05);
}

.claim-banner > i {
  color: #3f59a6;
  font-size: 1.35rem;
  line-height: 1.3;
}

.claim-banner p,
.claim-editor-box {
  margin: 0;
  color: #1d2433;
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.claim-editor-anteprima {
  margin: 0;
  border: 1px solid #e4e8f0;
}

.claim-editor-box {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 4.5rem;
  outline: none;
}

.claim-editor-anteprima:focus-within {
  border-color: #3f59a6;
  box-shadow: 0 0 0 0.2rem rgba(63, 89, 166, 0.15);
}

.claim-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}

.claim-toolbar label {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  margin: 0;
  color: #5c6b82;
  font-size: 0.78rem;
  font-weight: 700;
}

.claim-toolbar .form-select {
  min-width: 9.5rem;
  color: #1d2433;
  font-size: 0.92rem;
  font-weight: 600;
}

.claim-toolbar [data-claim-size] {
  min-width: 7.2rem;
}

.claim-colore {
  width: 3rem;
  height: 2.15rem;
  padding: 0.15rem;
  border: 1px solid #d5dced;
  border-radius: 0.55rem;
  background: #fff;
  cursor: pointer;
}

.claim-editor-stato {
  min-height: 1.2rem;
  margin: 0.4rem 0 0;
  color: #5c6b82;
  font-size: 0.85rem;
}

.claim-banner small {
  display: block;
  margin-top: 0.25rem;
  color: #8b95a7;
  font-size: 0.82rem;
}

.claim-testo {
  white-space: normal;
  overflow-wrap: anywhere;
  max-width: 28rem;
}

.claim-testo a {
  color: #1d2433;
}

.claim-testo a:hover {
  color: #3f59a6;
}

.claim-sfondo-punto {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  margin-right: 0.45rem;
  border-radius: 0.28rem;
  border: 1px solid rgba(28, 39, 68, 0.12);
  vertical-align: -0.1rem;
}

.claim-stato-home {
  color: #3f59a6;
  font-weight: 700;
}

.claim-stato-spento {
  color: #8b95a7;
}

.dash-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1rem;
  align-items: start;
}

.dash-layout-solo {
  grid-template-columns: minmax(0, 1fr);
}

.desk-edit {
  color: #3f59a6;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  white-space: nowrap;
}

.widget-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.widget-board > .panel {
  margin-bottom: 0;
}

.widget-wide {
  grid-column: 1 / -1;
}

.widget-placeholder p {
  margin: 0;
  color: #5c6b82;
}

.widget-wait {
  margin: 0.35rem 0 0;
  color: #8b95a7;
  font-size: 0.85rem;
}

.widget-saved {
  margin: 0 0 1rem;
  color: #3f59a6;
  font-weight: 700;
}

.widget-zone {
  margin: 1.25rem 0 0.2rem;
}

.widget-picker {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.widget-picker li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #eef0f4;
}

.widget-picker label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 0;
}

.widget-picker small {
  display: block;
  color: #8b95a7;
  font-size: 0.82rem;
}

.widget-move {
  display: flex;
  gap: 0.35rem;
  flex: 0 0 auto;
}

.scheda:has(.mini-desk) {
  overflow: visible;
}

.mini-desk {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 0.85rem;
  background: #f6f7fb;
  border-radius: 1.1rem;
  padding: 0.9rem;
}

.mini-main {
  min-width: 0;
}

.scheda .mini-zone h2,
.scheda .mini-drawer h2 {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8b95a7;
}

.mini-zone + .mini-zone {
  margin-top: 0.85rem;
}

.mini-strip,
.mini-board,
.mini-add-grid {
  display: grid;
  gap: 0.55rem;
}

.mini-strip {
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
}

.mini-board,
.mini-side {
  grid-template-columns: 1fr 1fr;
}

.mini-side-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.mini-wide {
  grid-column: 1 / -1;
}

.mini-strip,
.mini-board,
.mini-side-list {
  min-height: 3.2rem;
}

.mini-stat,
.mini-panel,
.mini-add {
  cursor: grab;
}

.mini-stat:active,
.mini-panel:active,
.mini-add:active {
  cursor: grabbing;
}

.mini-grip {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
  line-height: 1;
  flex: 0 0 auto;
}

.mini-panel .mini-grip {
  color: #8b95a7;
  margin-top: 0.15rem;
}

.mini-stat,
.mini-panel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 4.4rem;
  border-radius: 0.9rem;
  padding: 0.6rem 0.7rem;
}

.mini-dragging {
  opacity: 0.45;
}

.mini-drop-on {
  outline: 2px dashed #3f59a6;
  outline-offset: 3px;
  border-radius: 0.9rem;
  background: rgba(63, 89, 166, 0.06);
}

.mini-insert-before {
  box-shadow: inset 3px 0 0 #fff;
}

.mini-panel.mini-insert-before {
  box-shadow: inset 3px 0 0 #3f59a6;
}

.mini-stat {
  color: #fff;
  padding-right: 5.2rem;
}

.mini-stat-blue {
  background: #3f59a6;
}

.mini-stat-red {
  background: #b71118;
}

.mini-stat img {
  width: 2.3rem;
  height: 2.3rem;
  object-fit: contain;
  flex: 0 0 auto;
}

.mini-stat strong {
  font-size: 0.82rem;
  line-height: 1.15;
}

.mini-panel {
  align-items: flex-start;
  background: #fff;
  box-shadow: 0 8px 18px rgba(28, 39, 68, 0.05);
}

.mini-panel > .bi {
  color: #3f59a6;
  font-size: 1.2rem;
  margin-top: 0.1rem;
}

.mini-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-right: 4.6rem;
}

.mini-copy strong {
  color: #1d2433;
  font-size: 0.92rem;
}

.mini-copy small,
.mini-add small {
  color: #8b95a7;
  font-size: 0.75rem;
}

.mini-badge {
  margin-top: 0.2rem;
  color: #3f59a6;
  font-size: 0.72rem;
  font-weight: 700;
}

.mini-tools {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  display: flex;
  gap: 0.2rem;
}

.mini-tools button {
  width: 1.55rem;
  height: 1.55rem;
  border: 0;
  border-radius: 0.4rem;
  display: grid;
  place-items: center;
  padding: 0;
  line-height: 1;
}

.mini-stat .mini-tools button {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.mini-panel .mini-tools button {
  background: #f4f6fa;
  color: #3f59a6;
}

.mini-tools button:disabled {
  opacity: 0.35;
}

.mini-empty {
  margin: 0;
  border: 1px dashed #d5dced;
  border-radius: 0.9rem;
  color: #8b95a7;
  text-align: center;
  padding: 0.9rem 0.6rem;
  font-size: 0.85rem;
}

.mini-drawer {
  margin-top: 1.3rem;
  border-radius: 0.9rem;
  padding: 0.15rem;
}

.mini-drawer.mini-drop-on {
  padding: 0.7rem;
}

.scheda .mini-drawer h3 {
  margin: 0.85rem 0 0.4rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #5c6b82;
}

.mini-add-grid {
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
}

.mini-add {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  width: 100%;
  text-align: left;
  border: 1px dashed #d5dced;
  background: #fff;
  color: #3f59a6;
  border-radius: 0.9rem;
  padding: 0.7rem 0.75rem;
  font-weight: 700;
}

.mini-add span {
  display: flex;
  flex-direction: column;
}

.mini-add:hover {
  background: #f4f6fa;
}

.mini-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.1rem;
}

.mini-reset {
  margin-left: auto;
}

.side-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.35rem;
}

.side-right-rail {
  display: none;
}

html.side-right-closed .dash-layout {
  grid-template-columns: minmax(0, 1fr) 3rem;
}

html.side-right-closed .dash-side {
  display: none;
}

html.side-right-closed .side-right-rail {
  display: flex;
  justify-content: center;
  padding-top: 0.15rem;
}

.stat-row,
.kpi-grid,
.lower-grid {
  display: grid;
  gap: 0.85rem;
}

.stat-row {
  grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr));
  margin-bottom: 0.85rem;
}

.stat-card {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.85rem;
  min-height: 5.6rem;
  border-radius: 1.15rem;
  padding: 0.75rem 1rem;
  color: #fff;
  box-shadow: 0 10px 24px rgba(28, 39, 68, 0.08);
}

.stat-icon {
  position: relative;
  width: 4.1rem;
  height: 4.1rem;
  flex: 0 0 auto;
}

.stat-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.stat-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  min-width: 0;
}

.stat-copy strong {
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stat-copy span {
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.92;
}

.stat-count {
  position: absolute;
  top: -0.05rem;
  right: -0.15rem;
  z-index: 1;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.28rem;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #d2232a;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.stat-count:hover,
.stat-count:focus-visible {
  filter: brightness(1.12);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
  outline: none;
}

.stat-count-date {
  top: 54%;
  left: 50%;
  right: auto;
  transform: translate(-50%, -40%);
  min-width: 0;
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #3a3a3a;
  font-size: 1.15rem;
  line-height: 1;
}

.stat-count-date:hover,
.stat-count-date:focus-visible {
  filter: none;
  box-shadow: none;
  color: #111;
}

.stat-blue { background: #3f59a6; }
.stat-red { background: #b71118; }

.stat-badge {
  position: absolute;
  top: 0.7rem;
  right: 0.75rem;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #fff;
  color: #2454d6;
  font-size: 0.75rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  opacity: 1;
  letter-spacing: 0;
  text-transform: none;
}

.panel {
  background: #fff;
  border-radius: 1.2rem;
  padding: 1rem 1rem 0.9rem;
  box-shadow: 0 10px 28px rgba(28, 39, 68, 0.05);
  margin-bottom: 0.85rem;
}

.panel-head,
.cal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.panel-head h2,
.cal-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 750;
}

.panel-sub {
  margin: 0.15rem 0 0;
  color: #8b95a7;
  font-size: 0.82rem;
}

.month-pill,
.panel-go,
.panel-more {
  border: 0;
  background: #f4f6fa;
  color: #5c6b82;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.35rem 0.7rem;
}

.panel-go,
.panel-more {
  width: 2rem;
  height: 2rem;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 0.7rem;
}

.kpi-grid {
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
}

.kpi-card {
  border: 1px solid #eef1f6;
  border-radius: 1rem;
  padding: 0.85rem;
  min-height: 16rem;
}

.kpi-card-top {
  display: flex;
  justify-content: flex-end;
}

.target-pill {
  background: #f4f6fa;
  color: #5c6b82;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.25rem 0.55rem;
}

.line-chart {
  width: 100%;
  height: 6.5rem;
  display: block;
}

.delta {
  margin: 0.2rem 0 0.35rem;
  color: #e11d2e;
  font-weight: 700;
  font-size: 0.85rem;
}

.delta span,
.kpi-target,
.kpi-label,
.donut-note,
.sla {
  color: #8b95a7;
  font-weight: 600;
}

.kpi-number {
  margin: 0;
  font-size: 2.4rem;
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.04em;
}

.kpi-label {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.kpi-target,
.donut-note,
.sla {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
}

.kpi-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
}

.donut {
  width: 8.4rem;
  height: 8.4rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 0.35rem;
}

.donut span {
  width: 5.3rem;
  height: 5.3rem;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 750;
  color: #1d2433;
}

.donut-blue {
  background: conic-gradient(#e6eaf3 0 12%, #2454d6 12% 84%, #e6eaf3 84% 100%);
}

.donut-split {
  background: conic-gradient(#f4f6fa 0 8%, #2454d6 8% 58%, #e11d2e 58% 90%, #f4f6fa 90% 100%);
}

.sla {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.sla-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 0.15rem;
  background: #e11d2e;
}

.lower-grid {
  grid-template-columns: 1fr 1fr;
}

.progress-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem;
  align-items: center;
  color: #8b95a7;
  font-size: 0.8rem;
  margin-bottom: 0.7rem;
}

.progress-track {
  height: 0.4rem;
  background: #f0d5d8;
  border-radius: 999px;
  overflow: hidden;
}

.progress-track span {
  display: block;
  height: 100%;
  background: #e11d2e;
}

.filter-pills {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.7rem;
}

.pill {
  border: 1px solid #e6eaf2;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8b95a7;
}

.pill-on {
  color: #e11d2e;
  border-color: #f3c3c8;
  background: #fff5f6;
}

.task-list,
.note-list,
.appt-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.task,
.note,
.appt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-radius: 0.9rem;
  padding: 0.7rem 0.8rem;
  background: #f7f8fb;
}

.task strong,
.appt strong {
  display: block;
  font-size: 0.92rem;
}

.task span,
.note span,
.appt p,
.appt time,
.appt-meta {
  color: #8b95a7;
  font-size: 0.78rem;
}

.task .bi {
  color: #c5ceda;
  font-size: 1.15rem;
}

.task-hot {
  background: #fff1f3;
}

.task-hot .bi {
  color: #e11d2e;
}

.task-late {
  opacity: 0.65;
}

.note {
  align-items: flex-start;
}

.note p {
  margin: 0 0 0.25rem;
  font-size: 0.86rem;
}

.note-icon {
  color: #2454d6;
  font-size: 1.15rem;
  margin-top: 0.1rem;
}

.note-actions {
  display: flex;
  gap: 0.45rem;
  color: #98a2b3;
}

.cal-nav {
  display: flex;
  gap: 0.25rem;
}

.cal-nav a {
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  border-radius: 0.5rem;
  color: #5c6b82;
  text-decoration: none;
}

.cal-nav a:hover {
  background: #f4f6fa;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem 0;
  text-align: center;
}

.cal-dow {
  color: #98a2b3;
  font-size: 0.72rem;
  font-weight: 700;
}

.cal-day {
  position: relative;
  height: 1.9rem;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  color: #1d2433;
  border-radius: 50%;
}

.cal-day.is-out {
  color: #c5ceda;
}

.cal-day.is-today {
  background: #e11d2e;
  color: #fff;
  font-weight: 700;
}

.cal-day.has-dot::after {
  content: "";
  position: absolute;
  bottom: 0.05rem;
  width: 0.28rem;
  height: 0.28rem;
  border-radius: 50%;
  background: #2454d6;
}

.cal-day.is-today.has-dot::after {
  background: #fff;
}

.appt {
  display: block;
}

.appt-top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.appt-tag {
  background: #fff;
  color: #e11d2e;
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 800;
}

.tag-blue {
  color: #2454d6;
}

.appt-hot {
  background: #fff1f3;
  border: 1px solid #f6d0d4;
}

.appt p {
  margin: 0.15rem 0;
}

@media (max-width: 1199.98px) {
  .dash-layout,
  .widget-board,
  .mini-desk,
  .mini-board,
  .lower-grid,
  .kpi-grid,
  .stat-row {
    grid-template-columns: 1fr;
  }

  .widget-wide {
    grid-column: auto;
  }
}

@media (max-width: 767.98px) {
  .dash-head {
    flex-wrap: wrap;
    margin-top: 0;
  }
}

/* Scheda cliente: riquadri che si aprono, etichette di stato, finestre */
.scheda-apri {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 1rem 1.5rem;
  border: 0;
  background: transparent;
  color: #1d2433;
  font-size: 1.05rem;
  font-weight: 750;
  text-align: left;
}

.scheda-apri i {
  color: #3f59a6;
  margin-right: 0.35rem;
}

.scheda-apri::after {
  content: "\F282";
  font-family: "bootstrap-icons";
  margin-left: auto;
  color: #8b95a7;
  transition: transform 0.2s ease;
}

.scheda-apri[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

.scheda-contatore {
  min-width: 1.6rem;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  background: #eef1f8;
  color: #3f59a6;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
}

.azioni-cliente .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

@media (max-width: 767.98px) {
  .azioni-cliente .btn-outline-primary span {
    display: none;
  }
}

.stato {
  display: inline-block;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.stato-aperta,
.stato-trattativa,
.stato-offerta,
.stato-da-fare {
  background: #fbe3e3;
  color: #BA1214;
}

.stato-in-corso {
  background: #e7ebf7;
  color: #3f59a6;
}

.stato-vinta,
.stato-fatto {
  background: #e3f3e8;
  color: #1f7a3d;
}

.stato-persa,
.stato-sospesa {
  background: #f1f2f5;
  color: #747d8c;
}

.kanban {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.kanban-colonna {
  flex: 1 0 13rem;
  min-height: 14rem;
  background: #eef1f6;
  border-radius: 1rem;
}

.kanban-colonna.sopra {
  outline: 2px dashed #3f59a6;
}

.kanban-testa {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0.85rem 0.25rem;
}

.kanban-conto {
  color: #747d8c;
  font-size: 0.85rem;
  font-weight: 700;
}

.kanban-carta {
  margin: 0.5rem;
  padding: 0.65rem 0.8rem;
  background: #fff;
  border: 1px solid #e2e6ee;
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px rgba(29, 36, 51, 0.05);
}

.kanban-carta.spostabile {
  cursor: grab;
}

.kanban-carta.trascinata {
  opacity: 0.45;
}

.kanban-tipo {
  color: #3f59a6;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.app-content .kanban-titolo {
  display: block;
  margin: 0.2rem 0;
  color: #1d2433;
  font-weight: 700;
  text-decoration: none;
}

.app-content a.kanban-titolo:hover {
  color: #3f59a6;
}

.kanban-meta {
  color: #747d8c;
  font-size: 0.82rem;
}

/* Bacheca attività: ogni colonna col colore del suo stato */
.kanban-colonna {
  border-top: 4px solid #c7cfdd;
}

.kanban-colonna[data-stato="Da fare"] {
  background: #fdecec;
  border-top-color: #BA1214;
}

.kanban-colonna[data-stato="In corso"] {
  background: #e9edf8;
  border-top-color: #3f59a6;
}

.kanban-colonna[data-stato="Sospesa"] {
  background: #eef0f3;
  border-top-color: #8b95a7;
}

.kanban-colonna[data-stato="Fatto"] {
  background: #e9f6ed;
  border-top-color: #1f7a3d;
}

/* Accento colorato a sinistra delle carte, in tinta con la colonna */
.kanban-colonna[data-stato="Da fare"] .kanban-carta {
  border-left: 4px solid #BA1214;
}

.kanban-colonna[data-stato="In corso"] .kanban-carta {
  border-left: 4px solid #3f59a6;
}

.kanban-colonna[data-stato="Sospesa"] .kanban-carta {
  border-left: 4px solid #8b95a7;
}

.kanban-colonna[data-stato="Fatto"] .kanban-carta {
  border-left: 4px solid #1f7a3d;
}

/* Etichetta del tipo in tinta con la colonna */
.kanban-colonna[data-stato="Da fare"] .kanban-tipo {
  color: #BA1214;
}

.kanban-colonna[data-stato="Sospesa"] .kanban-tipo {
  color: #8b95a7;
}

.kanban-colonna[data-stato="Fatto"] .kanban-tipo {
  color: #1f7a3d;
}

.timeline-cliente {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline-cliente li {
  display: flex;
  gap: 0.85rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid #eef0f4;
}

.timeline-cliente li:last-child {
  border-bottom: 0;
}

.timeline-icona {
  flex: 0 0 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #eef1f8;
  color: #3f59a6;
}

.min-w-0 {
  min-width: 0;
}

.griglia-foto {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.6rem;
}

.griglia-foto img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 0.75rem;
}

/* Fiere: archivio della fiera */
.griglia-documenti {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.85rem;
}

.documento-fiera {
  padding: 0.85rem;
  border: 1px solid #e2e6ee;
  border-radius: 0.9rem;
  background: #fff;
}

.documento-fiera img {
  width: 100%;
  aspect-ratio: 4 / 3;
  margin-bottom: 0.6rem;
  object-fit: cover;
  border-radius: 0.7rem;
}

/* Fiere: riepilogo dei numeri */
.riepilogo-fiera {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.riepilogo-fiera > div {
  display: flex;
  flex-direction: column;
  padding: 0.85rem 1rem;
  border-radius: 0.9rem;
  background: #f6f7fb;
}

.riepilogo-numero {
  color: #3f59a6;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.1;
}

.riepilogo-fiera span:not(.riepilogo-numero) {
  color: #1d2433;
  font-weight: 700;
}

.riepilogo-fiera small {
  color: #747d8c;
}

/* Fiere: icone nella testata dello stesso blu del testo dei tab (solo blocco informazioni, non i pulsanti) */
.testata-fiera .min-w-0 .bi {
  color: #0d6efd;
}

/* Fiere: card con grafici del riepilogo */
.grafico-card {
  height: 100%;
  padding: 0.85rem 1rem 1rem;
  border: 1px solid #e9ecf1;
  border-radius: 0.9rem;
  background: #fff;
}

.grafico-card h2 {
  margin-bottom: 0.5rem;
  text-align: center;
  color: #3f3f46;
}

.grafico-box {
  position: relative;
  height: 220px;
}

/* Fiere: modulo dello stand */
.esito-azienda {
  padding: 0.75rem 1rem;
  border-left: 4px solid #8b95a7;
  border-radius: 0.75rem;
  background: #f6f7fb;
}

.esito-azienda-cliente {
  border-left-color: #1f7a3d;
  background: #e3f3e8;
}

.esito-azienda-lead {
  border-left-color: #3f59a6;
  background: #e7ebf7;
}

.esito-azienda-nuova {
  border-left-color: #BA1214;
  background: #fbe3e3;
}

.esito-azienda-scegli {
  border-left-color: #c28a00;
  background: #fdf4dd;
}

#esito-azienda-elenco:not(:empty) {
  margin-top: 0.5rem;
}

.potenziale-controllo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.4rem;
}

.potenziale-voto {
  flex: 0 0 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #3f59a6;
  color: #fff;
  font-weight: 700;
}

.potenziale-scala {
  display: flex;
  justify-content: space-between;
  margin-right: 2.75rem;
  color: #8b95a7;
  font-size: 0.78rem;
}

.dati-azienda {
  padding: 0.6rem 1rem;
  border: 1px solid #e2e6ee;
  border-radius: 0.9rem;
}

.dati-azienda summary {
  color: #3f59a6;
  font-weight: 700;
  cursor: pointer;
}

.dati-azienda[open] {
  padding-bottom: 1rem;
}

.aiuti-stand p:empty {
  display: none;
}

.aiuti-stand > p {
  margin-bottom: 0.75rem !important;
}

.biglietto-anteprime {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.biglietto-anteprima {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: #5c6b82;
  font-size: 0.8rem;
  font-weight: 700;
}

.biglietto-anteprima img {
  width: 9rem;
  height: 5.6rem;
  object-fit: cover;
  border: 1px solid #e2e6ee;
  border-radius: 0.6rem;
  background: #f6f7fb;
}

.biglietto-in-attesa {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  border: 1px solid #e2e6ee;
  border-radius: 0.9rem;
}

.obbligatorio {
  color: #BA1214;
  font-weight: 700;
  margin-left: 0.15rem;
}

.visita-nota {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.75rem;
}

.visita-nota textarea {
  flex: 1 1 16rem;
  min-width: 12rem;
}

.visita-nota-azioni {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.visita-nota-azioni .btn {
  white-space: nowrap;
}

.qr-video {
  display: block;
  width: 100%;
  max-width: 22rem;
  border-radius: 0.9rem;
  background: #1d2433;
}

.modal-content {
  border: 0;
  border-radius: 1.2rem;
}

.modal-header {
  align-items: center;
  gap: 0.75rem;
  background: #3f59a6;
  color: #fff;
  border-bottom: 0;
  border-top-left-radius: 1.2rem;
  border-top-right-radius: 1.2rem;
}

.azioni-popup {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
  flex: 0 0 auto;
}

.modal-header .btn {
  --bs-btn-padding-y: 0.25rem;
  --bs-btn-padding-x: 0.7rem;
  --bs-btn-font-size: 0.875rem;
  white-space: nowrap;
}

.modal-header .azioni-popup .btn-link {
  color: #fff;
  font-weight: 650;
  text-decoration: none;
}

.modal-header .azioni-popup .btn-link:hover,
.modal-header .azioni-popup .btn-link:focus {
  color: #fff;
  text-decoration: underline;
}

.modal-header .azioni-popup .btn-primary {
  background-color: #fff;
  border-color: #fff;
  color: #3f59a6;
}

.modal-header .azioni-popup .btn-primary:hover,
.modal-header .azioni-popup .btn-primary:focus {
  background-color: #e7ebf6;
  border-color: #e7ebf6;
  color: #3f59a6;
}

.modal-header .azioni-popup .btn-outline-primary {
  background-color: transparent;
  border-color: #fff;
  color: #fff;
}

.modal-header .azioni-popup .btn-outline-primary:hover,
.modal-header .azioni-popup .btn-outline-primary:focus {
  background-color: #fff;
  border-color: #fff;
  color: #3f59a6;
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 1 1 auto;
  min-width: 0;
  color: #fff;
  font-weight: 750;
}

.modal-title .bi {
  color: #fff;
  font-size: 1.15rem;
}

.modal-header .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
  opacity: 1;
}

.icona-popup {
  width: 1.85rem;
  height: 1.85rem;
  object-fit: contain;
  flex: 0 0 auto;
}

.scheda-compatta {
  padding: 0.65rem 1rem 0.45rem;
}

.scheda-compatta > h3 {
  margin-top: 0.55rem;
  margin-bottom: 0.2rem;
  font-size: 0.78rem;
}

.scheda-compatta > h3:first-of-type {
  margin-top: 0;
}

.scheda-compatta .form-label {
  margin-bottom: 0.12rem;
}

.scheda-compatta .form-control,
.scheda-compatta .form-select {
  padding-top: 0.28rem;
  padding-bottom: 0.28rem;
  min-height: 0;
}

#finestra-contatto .modal-footer {
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}

.popup-riferimento {
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 0.92;
}

.popup-riferimento::before {
  content: "·";
  margin: 0 0.45rem;
  font-weight: 500;
}

#biglietto-azioni-alto {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

#biglietto-azioni-alto.d-none {
  display: none;
}

.modal .form-label {
  color: #5c6b82;
  font-size: 0.82rem;
  font-weight: 700;
}

.modal .form-control,
.modal .form-select {
  border: 1px solid #e6eaf1;
  border-radius: 0.85rem;
  background: #f6f7fb;
}

.modal .form-control:focus,
.modal .form-select:focus {
  border-color: #3f59a6;
  background: #fff;
  box-shadow: 0 0 0 0.2rem rgba(63, 89, 166, 0.15);
}

.modal .btn-primary {
  --bs-btn-bg: #3f59a6;
  --bs-btn-border-color: #3f59a6;
  --bs-btn-hover-bg: #314887;
  --bs-btn-hover-border-color: #314887;
  --bs-btn-active-bg: #2a3d75;
  --bs-btn-active-border-color: #2a3d75;
  border-radius: 0.85rem;
  font-weight: 700;
}

.modal .btn-link {
  color: #3f59a6;
  font-weight: 700;
  text-decoration: none;
}

.password-hint .badge {
  font-weight: 600;
}

/* Articoli: suggerimenti sotto il campo di ricerca */
.posizione-suggerimenti {
  position: relative;
}

.suggerimenti-articoli {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  z-index: 20;
  max-height: 22rem;
  overflow-y: auto;
  padding: 0.35rem;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 14px 34px rgba(28, 39, 68, 0.14);
}

.app-content .suggerimento-voce {
  display: flex;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.7rem;
  color: #1d2433;
}

.app-content button.suggerimento-voce {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
}

.app-content .suggerimento-voce:hover,
.app-content .suggerimento-voce.attivo {
  background: #eef1f8;
  color: #1d2433;
}

.suggerimento-codice {
  flex: 0 0 auto;
  color: #3f59a6;
  font-weight: 700;
}

.suggerimento-descrizione {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Scheda contatto: ogni gruppo ha una fascia blu, così Persona, Recapiti e gli altri si distinguono. */
.scheda-contatto {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.85rem;
}

.scheda-contatto .blocco-contatto {
  border: 1px solid #e4e9f2;
  border-radius: 0.85rem;
  background: #f7f8fb;
  overflow: hidden;
}

.scheda-contatto .blocco-contatto > h2 {
  margin: 0;
  padding: 0.38rem 0.8rem;
  background: #e8eef9;
  color: #3f59a6;
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.scheda-contatto .blocco-corpo {
  padding: 0.65rem 0.75rem 0.75rem;
}

.scheda-contatto .griglia-lettura {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem 0.85rem;
  margin: 0;
  padding: 0.5rem 0.8rem 0.6rem;
}

.scheda-contatto .griglia-lettura > div {
  min-width: 0;
}

.scheda-contatto .griglia-lettura dt {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  color: #5c6b82;
  line-height: 1.2;
}

.scheda-contatto .griglia-lettura dd {
  margin: 0.05rem 0 0;
  font-size: 0.92rem;
  color: #1d2433;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.scheda-contatto .largo-2 {
  grid-column: span 2;
}

.scheda-contatto .largo-4 {
  grid-column: 1 / -1;
}

@media (max-width: 991.98px) {
  .scheda-contatto .griglia-lettura {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .scheda-contatto .griglia-lettura,
  .scheda-contatto .largo-2,
  .scheda-contatto .largo-4 {
    grid-template-columns: 1fr;
    grid-column: auto;
  }
}

.persone-stand .persone-scelta {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin: 0 0 0.35rem;
}

.persone-stand .form-check-label {
  color: #1d2433;
  font-weight: 600;
}

.suggerimento-vuoto {
  padding: 0.5rem 0.75rem;
  color: #8b95a7;
}

.registra-subito {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.5rem), 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.tessera-home {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  min-width: 0;
  min-height: 5.1rem;
  padding: 0.7rem 0.85rem;
  border: 0;
  border-radius: 1.05rem;
  background: #3f59a6;
  color: #fff;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(28, 39, 68, 0.08);
  container-type: inline-size;
}

.tessera-home:hover,
.tessera-home:focus {
  background: #34498c;
  color: #fff;
  box-shadow: 0 14px 28px rgba(63, 89, 166, 0.28);
}

/* Opportunità, Visita e Attività sono link. La regola dei link della pagina
   è più specifica del colore del riquadro e li lasciava blu su blu. */
.app-content a.tessera-home,
.app-content a.tessera-home:hover,
.app-content a.tessera-home:focus,
.app-content a.tessera-home strong,
.app-content a.tessera-home em {
  color: #fff;
}

.tessera-home-icona {
  display: grid;
  place-items: center;
  width: 4.4rem;
  height: 4.4rem;
  flex: 0 0 auto;
}

.tessera-home-icona img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Il testo può restringersi e andare a capo, invece di uscire dal riquadro. */
.tessera-home > span:last-child {
  min-width: 0;
  flex: 1 1 auto;
}

.tessera-home strong {
  display: block;
  font-size: 0.95rem;
  line-height: 1.15;
  overflow-wrap: break-word;
  text-transform: uppercase;
}

.tessera-home em {
  display: block;
  margin-top: 0.12rem;
  color: #fff;
  font-style: normal;
  font-size: 0.8rem;
  opacity: 0.85;
  overflow-wrap: break-word;
}

@container (max-width: 14rem) {
  .tessera-home-icona {
    width: 3.2rem;
    height: 3.2rem;
  }
}

.home-grafici,
.home-scorciatoie {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.home-grafico,
.pannello-home {
  min-width: 0;
  background: #fff;
  border-radius: 1.15rem;
  box-shadow: 0 10px 28px rgba(28, 39, 68, 0.05);
}

.home-grafico {
  padding: 1rem 1.05rem 1rem;
}

.home-grafico h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 750;
}

.home-grafico > p,
.home-gauge-nota {
  margin: 0.2rem 0 0.75rem;
  color: #8b95a7;
  font-size: 0.86rem;
}

.home-gauge-figura {
  display: block;
  width: min(15rem, 100%);
  height: auto;
  margin: 0 auto;
}

.home-gauge-nota {
  margin: 0;
  text-align: center;
  color: #1d2433;
}

.home-barra-riga {
  display: grid;
  grid-template-columns: 6.4rem minmax(0, 1fr) 1.6rem;
  gap: 0.45rem;
  align-items: center;
  margin-top: 0.55rem;
  font-size: 0.82rem;
}

.home-barra-traccia {
  display: block;
  height: 0.55rem;
  border-radius: 999px;
  background: #eef1f6;
  overflow: hidden;
}

.home-barra-traccia span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.home-visite-barre {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  align-items: end;
  min-height: 8.5rem;
}

.home-visite-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
}

.home-visite-col strong {
  font-size: 0.85rem;
}

.home-visite-asta {
  display: flex;
  align-items: flex-end;
  width: 1.15rem;
  height: 5.5rem;
  border-radius: 999px;
  background: #eef1f6;
  overflow: hidden;
}

.home-visite-asta span {
  display: block;
  width: 100%;
  background: #3f59a6;
  border-radius: inherit;
}

.home-visite-col.corrente .home-visite-asta span {
  background: #e11d2e;
}

.home-visite-col em {
  color: #8b95a7;
  font-size: 0.72rem;
  font-style: normal;
  text-align: center;
}

.pannello-home {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 8.2rem;
  padding: 1rem 1.1rem;
  color: inherit;
  text-decoration: none;
}

.pannello-home:hover,
.pannello-home:focus {
  color: inherit;
  box-shadow: 0 14px 32px rgba(63, 89, 166, 0.14);
}

.scorciatoia-kicker,
.scorciatoia-testo {
  color: #8b95a7;
  font-size: 0.82rem;
}

.scorciatoia-titolo {
  margin-top: 0.15rem;
  font-weight: 750;
}

.scorciatoia-numero {
  margin-top: 0.35rem;
  color: #3f59a6;
  font-size: 2rem;
  font-weight: 750;
  line-height: 1;
}

.da-fare-pannello {
  margin-top: 0.85rem;
}

.cal-vuoto {
  margin: 0;
  color: #8b95a7;
}

.lista-da-fare {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.scheda-da-fare {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.55rem 0.65rem;
  border-radius: 0.75rem;
  background: #f6f8fc;
  color: inherit;
  text-decoration: none;
}

.scheda-da-fare:hover,
.scheda-da-fare:focus {
  color: inherit;
  background: #eef2fb;
}

.scheda-da-fare-scaduta {
  background: #fff1f2;
}

.da-fare-riga {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  color: #8b95a7;
  font-size: 0.75rem;
}

.da-fare-etichetta {
  color: #3f59a6;
  font-weight: 700;
}

.scheda-da-fare-scaduta .da-fare-etichetta {
  color: #e11d2e;
}

.scheda-da-fare strong {
  font-size: 0.9rem;
}

.da-fare-dettaglio {
  color: #5c6b82;
  font-size: 0.78rem;
}

.da-fare-altre {
  margin: 0.55rem 0 0;
  text-align: center;
}

.da-fare-altre a {
  color: #3f59a6;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-decoration: none;
}

@media (max-width: 991.98px) {
  .home-grafici,
  .home-scorciatoie {
    grid-template-columns: 1fr;
  }
}

/* ===== Scheda cliente: testata ricca, Scheda/Panoramica, binario ===== */
.testata-scheda {
  background: #fff;
  border-radius: 1.15rem;
  box-shadow: 0 10px 28px rgba(28, 39, 68, 0.05);
  margin-bottom: 1rem;
  padding: 0.35rem 1.35rem;
}

.testata-scheda-alto {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.testata-marchio {
  flex: 0 0 auto;
  width: 3.35rem;
  height: 3.35rem;
  border-radius: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.testata-marchio.testata-marchio-libero {
  background: transparent;
}

.testata-marchio .testata-marchio-immagine {
  width: 3.35rem;
  height: 3.35rem;
  object-fit: contain;
}

.testata-identita {
  flex: 1 1 auto;
  min-width: 0;
}

.testata-identita h1 {
  margin: 0;
  color: #1d2433;
  font-size: 1.35rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.testata-sottotitolo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.7rem;
  margin-top: 0.35rem;
  margin-bottom: 0.85rem;
  color: #8b919a;
  font-size: 0.92rem;
}

.testata-sottotitolo:last-child {
  margin-bottom: 0;
}

.testata-sep {
  width: 1px;
  height: 0.95rem;
  background: #e4e6ea;
}

.testata-agente {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  color: #1d2433;
  font-weight: 600;
}

.testata-agente svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: none;
  stroke: #3f59a6;
  stroke-width: 1.8;
}

.testata-agente a {
  color: inherit;
  text-decoration: none;
}

.testata-agente a:hover {
  text-decoration: underline;
}

.testata-voce {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  color: #1d2433;
  font-weight: 600;
}

.testata-voce-etichetta {
  color: #8b919a;
  font-weight: 500;
}

.testata-dismesso {
  color: #BA1214;
  font-weight: 600;
}

.testata-scheda .azioni-rapide {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 0.35rem;
  padding-left: 1rem;
  border-left: 1px solid #ececec;
}

.testata-sottotitolo .testata-diventa {
  margin-left: auto;
}

.testata-diventa {
  flex: 0 0 auto;
  margin: 0;
}

.testata-diventa .btn {
  white-space: nowrap;
}

.azioni-rapide {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.btn-rapido {
  width: 3.2rem;
  height: 3.2rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.btn-rapido img {
  width: 3.2rem;
  height: 3.2rem;
  object-fit: contain;
}

a.btn-rapido {
  text-decoration: none;
}

/* Azione rapida con cerchio evidenziato (microfono «Detta») */
.btn-rapido-cerchio {
  border: 2px solid #3f59a6;
  background: #eef1fb;
  padding: 0.4rem;
  transition: background .1s ease, box-shadow .1s ease;
}

.btn-rapido.btn-rapido-cerchio img {
  width: 100%;
  height: 100%;
}

.btn-rapido-cerchio:hover {
  background: #e0e6f8;
  box-shadow: 0 2px 6px rgba(63, 89, 166, 0.25);
}

.testata-scheda-dati {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-top: 1px solid #eee;
  padding-top: 0.85rem;
}

.testata-scheda-dati-voci {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.4rem;
  min-width: 0;
}

.testata-dato {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  min-width: 0;
}

.testata-dato > svg {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.12rem;
  flex: 0 0 auto;
  fill: none;
  stroke: #3f59a6;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.testata-dato-etichetta {
  display: block;
  color: #9aa3af;
  font-size: 0.75rem;
  line-height: 1.15;
}

.testata-dato-valore {
  display: block;
  color: #3a3a38;
  font-size: 0.92rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.testata-dato a {
  color: inherit;
  text-decoration: none;
}

.testata-dato a:hover {
  text-decoration: underline;
}

.vista-switch-testata {
  flex: 0 0 auto;
  margin-left: auto;
  align-self: flex-end;
}

/* interruttore Scheda / Panoramica */
.vista-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.2rem;
  background: #eef0f3;
  border-radius: 0.75rem;
}

.vista-opzione {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border-radius: 0.6rem;
  color: #747373;
  font-weight: 600;
  text-decoration: none;
}

.vista-opzione svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.vista-opzione.attiva {
  background: #fff;
  color: #1d2433;
  box-shadow: 0 1px 2px rgba(29, 29, 27, 0.14);
}

.vista-opzione.attiva svg {
  stroke: #3f59a6;
}

.vista-opzione:hover {
  color: #1d2433;
}

@media (max-width: 767.98px) {
  .testata-scheda-alto,
  .testata-sottotitolo {
    flex-wrap: wrap;
  }

  .testata-scheda .azioni-rapide {
    width: 100%;
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
    padding-top: 0.35rem;
  }

  .testata-sottotitolo .testata-diventa,
  .testata-diventa {
    flex: 1 0 100%;
    margin-left: 0;
    width: 100%;
  }

  .testata-diventa .btn {
    width: 100%;
  }

  .testata-scheda-dati {
    flex-wrap: wrap;
  }

  .vista-switch-testata {
    margin-left: 0;
  }
}

/* linguette della Panoramica */
.cliente-linguette {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  margin: 0 0 1rem;
  border-bottom: 1px solid #e7eaf0;
}

.cliente-linguette a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.1rem 0.7rem;
  color: #747373;
  font-weight: 650;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.linguetta-icona {
  display: inline-flex;
}

.linguetta-icona svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: #3f59a6;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cliente-linguette a.attiva,
.cliente-linguette a[aria-current="page"] {
  color: #3f59a6;
  border-bottom-color: #3f59a6;
}

/* card riassuntive della Panoramica */
.cliente-riquadri {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.cliente-riquadro {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.85rem 1rem;
  background: #fff;
  border: 1px solid #e7eaf0;
  border-radius: 0.9rem;
}

.cliente-riquadro-etichetta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #747373;
  font-size: 0.82rem;
  font-weight: 650;
}

.cliente-riquadro-icona {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.45rem;
  background: rgba(63, 89, 166, 0.1);
}

.cliente-riquadro-icona svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: none;
  stroke: #3f59a6;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cliente-riquadro strong {
  font-size: 1.25rem;
  line-height: 1.2;
}

.cliente-variazione {
  font-size: 0.78rem;
  font-weight: 650;
}

.cliente-variazione.su,
.cliente-variazione.giu {
  align-self: flex-start;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
}

.cliente-variazione.su {
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
}

.cliente-variazione.giu {
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
}

.cliente-variazione.muto {
  color: #747373;
  font-weight: 500;
}

/* pannelli della Panoramica */
.cliente-pannelli {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  align-items: stretch;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.cliente-pannello {
  display: flex;
  flex-direction: column;
  padding: 0.9rem 1rem 1rem;
}

.cliente-pannello-icona {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  margin-right: 0.5rem;
  border-radius: 0.5rem;
  background: rgba(63, 89, 166, 0.1);
  vertical-align: -0.45rem;
}

.cliente-pannello-icona svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: #3f59a6;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cliente-pannello-testa {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.cliente-pannello-testa h2 {
  margin: 0;
  font-size: 1rem;
}

.cliente-pannello-testa a {
  color: #3f59a6;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.cliente-vuoto {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  min-height: 6rem;
  color: #9aa3af;
  font-size: 0.9rem;
  text-align: center;
}

/* timeline recente (card) */
.cliente-timeline-card {
  padding: 0.45rem 0.7rem 0.35rem;
}

.cliente-timeline-card .cliente-pannello-testa {
  margin-bottom: 0.15rem;
}

.cliente-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cliente-timeline .timeline-voce {
  position: relative;
  display: grid;
  grid-template-columns: 0.8rem 5.8rem 1.9rem minmax(0, 1fr) 0.9rem;
  align-items: center;
  column-gap: 0.6rem;
  padding: 0.45rem 0;
}

.cliente-timeline .timeline-voce::before {
  content: "";
  position: absolute;
  left: calc(0.4rem - 1px);
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e7eaf0;
}

.cliente-timeline .timeline-voce:first-child::before { top: 50%; }
.cliente-timeline .timeline-voce:last-child::before { bottom: 50%; }

.cliente-timeline .timeline-punto {
  position: relative;
  justify-self: center;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: #9aa3af;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #e7eaf0;
  z-index: 1;
}

.cliente-timeline .timeline-quando {
  display: flex;
  flex-direction: column;
  text-align: right;
  line-height: 1.15;
}

.cliente-timeline .timeline-data {
  font-size: 0.76rem;
  font-weight: 650;
  color: #3a3a38;
  white-space: nowrap;
}

.cliente-timeline .timeline-ora {
  font-size: 0.72rem;
  color: #9aa3af;
}

.cliente-timeline .timeline-icona {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: #9aa3af;
}

.cliente-timeline .timeline-icona svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: #fff;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cliente-timeline .timeline-corpo {
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-decoration: none;
  line-height: 1.2;
}

.cliente-timeline .timeline-titolo {
  font-size: 0.82rem;
  font-weight: 650;
  color: #1d2433;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cliente-timeline .timeline-dettaglio {
  font-size: 0.76rem;
  color: #747373;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cliente-timeline a.timeline-corpo:hover .timeline-titolo {
  text-decoration: underline;
}

.cliente-timeline .timeline-freccia {
  color: #c4c8d0;
  font-size: 1.1rem;
  text-align: center;
}

/* badge del tipo nelle card */
.tipo-badge {
  display: inline-block;
  padding: 0.12rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.5;
  white-space: nowrap;
}

.tipo-badge-visita { background: rgba(37, 99, 235, 0.12); color: #2563eb; }
.tipo-badge-attivita { background: rgba(124, 58, 237, 0.12); color: #7c3aed; }
.tipo-badge-interazione { background: rgba(22, 163, 74, 0.14); color: #16a34a; }
.tipo-badge-opportunita { background: rgba(8, 145, 178, 0.14); color: #0891b2; }
.tipo-badge-neutro { background: #eef0f3; color: #64748b; }
.stato-badge-prospect { background: rgba(217, 119, 6, 0.16); color: #b45309; }

/* colori per tipo: pallino e icona tonda */
.cliente-timeline .timeline-genere-interazione .timeline-punto,
.cliente-timeline .timeline-genere-interazione .timeline-icona { background: #0891b2; }
.cliente-timeline .timeline-genere-visita .timeline-punto,
.cliente-timeline .timeline-genere-visita .timeline-icona { background: #2563eb; }
.cliente-timeline .timeline-genere-attivita .timeline-punto,
.cliente-timeline .timeline-genere-attivita .timeline-icona { background: #d97706; }
.cliente-timeline .timeline-genere-opportunita .timeline-punto,
.cliente-timeline .timeline-genere-opportunita .timeline-icona { background: #7c3aed; }
.cliente-timeline .timeline-genere-documento .timeline-punto,
.cliente-timeline .timeline-genere-documento .timeline-icona { background: #64748b; }
.cliente-timeline .timeline-genere-fiera .timeline-punto,
.cliente-timeline .timeline-genere-fiera .timeline-icona { background: #4f46e5; }

@media (max-width: 1100px) {
  .cliente-pannelli {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }
}

/* binario orizzontale della timeline (vista Scheda) */
.binario {
  padding: 0.55rem 1.2rem 0.4rem 0.85rem;
  overflow-x: auto;
}

.binario-riga {
  position: relative;
  height: 5.6rem;
  min-width: 46rem;
  margin: 0 0.4rem 1.1rem;
}

.binario-velo {
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  bottom: 0;
  left: var(--oggi);
  background: rgba(63, 89, 166, 0.07);
}

.binario-asse {
  position: absolute;
  left: 0;
  right: 0.2rem;
  bottom: 0;
  height: 2px;
  background: #1d2433;
}

.binario-asse.ha-oggi {
  background: linear-gradient(90deg, #1d2433 var(--oggi), #c5c5c4 var(--oggi));
}

.binario-freccia {
  position: absolute;
  right: -0.42rem;
  bottom: -5px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 8px solid #1d2433;
}

.binario-oggi {
  position: absolute;
  bottom: 0;
  left: var(--pos);
  width: 0;
  height: 1.35rem;
  border-left: 1.5px dashed #BA1214;
}

.binario-oggi-nome {
  position: absolute;
  bottom: 0.55rem;
  left: 0.4rem;
  color: #BA1214;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.binario-oggi-segno {
  position: absolute;
  z-index: 3;
  bottom: -0.22rem;
  left: -0.28rem;
  width: 0.52rem;
  height: 0.52rem;
  background: #BA1214;
  transform: rotate(45deg);
}

.binario-voce {
  position: absolute;
  z-index: 2;
  bottom: 0;
  left: var(--pos, 50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  width: 4.6rem;
  transform: translateX(-50%);
}

.binario-nome {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  margin-bottom: 0.15rem;
  color: #1d2433;
  text-decoration: none;
}

.binario-nome.timeline-genere-interazione { color: #0891b2; }
.binario-nome.timeline-genere-visita { color: #2563eb; }
.binario-nome.timeline-genere-attivita { color: #d97706; }
.binario-nome.timeline-genere-opportunita { color: #7c3aed; }
.binario-nome.timeline-genere-documento { color: #64748b; }
.binario-nome.timeline-genere-fiera { color: #4f46e5; }

.binario-icona {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
}

.binario-punto {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  background: #3f59a6;
  box-shadow: 0 0 0 2px #fff;
}

.binario-punto.timeline-genere-interazione { background: #0891b2; }
.binario-punto.timeline-genere-visita { background: #2563eb; }
.binario-punto.timeline-genere-attivita { background: #d97706; }
.binario-punto.timeline-genere-opportunita { background: #7c3aed; }
.binario-punto.timeline-genere-documento { background: #64748b; }
.binario-punto.timeline-genere-fiera { background: #4f46e5; }

.binario-voce.e-futuro .binario-punto {
  background: #fff;
  box-shadow: none;
  border: 2px solid #5c4d8a;
}

.binario-stelo {
  width: 2px;
  height: var(--stelo, 2rem);
  background: #1d2433;
}

.binario-data {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 50%;
  color: #747373;
  font-size: 0.68rem;
  line-height: 1;
  white-space: nowrap;
  transform: translateX(-50%);
}

/* Grafici a barre (SVG) nel tab Ordini e Fatturato */
.grafico-barre {
  width: 100%;
}
.grafico-barre-svg {
  width: 100%;
  max-width: 280px;
  height: auto;
  display: block;
}
.grafico-barre-valore {
  font-size: 13px;
  font-weight: 600;
  fill: #1d2433;
}
.grafico-barre-etichetta {
  font-size: 13px;
  fill: #747373;
}

/* Riquadro di scelta dei sottogruppi di interesse in fiera */
.sottogruppi-cerca {
  margin-bottom: 0.5rem;
}

.sottogruppi-elenco {
  max-height: 16rem;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.25rem 1rem;
}

.sottogruppi-gruppo {
  margin-bottom: 0.5rem;
  break-inside: avoid;
}

.sottogruppi-gruppo-nome {
  font-weight: 600;
  font-size: 0.85rem;
  color: #3f59a6;
  margin-bottom: 0.25rem;
}

.sottogruppo-voce {
  font-size: 0.9rem;
}

.sottogruppi-conteggio {
  color: #3f59a6;
  font-weight: 600;
}

.laboratorio-blocco {
  white-space: pre-wrap;
  max-height: 24rem;
  overflow: auto;
  background: #f6f7fb;
  border: 1px solid #e4e7f0;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
}
