/* GENERATO — non si modifica a mano.

   L'impianto grafico del gestionale, estratto dal suo `static/style.css` da
   `guscio/prepara.py` nel repository della console. Una correzione va fatta
   **la'**: qui verrebbe sovrascritta al primo rilancio dello script.

   Le regole sono copiate com'erano, nell'ordine che avevano. Alcune vengono
   sovrascritte piu' avanti nel foglio: restano perche' la copia deve rendere
   come la base, e il modo per garantirlo e' copiare invece di decidere cosa
   conta. `--controlla` le elenca.

   I commenti che nel gestionale spiegano le singole regole non sono qui: il
   perche' sta nel suo `style.css` e nel suo CLAUDE.md. */

:root {
  color-scheme: light;
  /* "Siamo su un telefono?": la soglia sta qui e basta, e la legge
  `core/telefono.js`. Vale 1 dentro la media query dei 700px. */
  --telefono: 0;
  --content-max-width: 2200px;
  --ui-font-scale: 1;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: calc(16px * var(--ui-font-scale));
  color: var(--text);
  min-height: 100vh;
}
a {
  color: inherit; text-decoration: none;
}
input, select, textarea, button {
  font: inherit;
}
.app {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}
.sidebar {
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  gap: 14px;
  /* Segue lo scorrimento: nelle pagine lunghe restava in cima al documento, e
  per cambiare voce di menu bisognava risalire tutta la pagina.
  `align-self: start` non e' decorativo: in una griglia l'elemento viene
  stirato per tutta l'altezza della riga, e uno sticky alto quanto cio' che
  dovrebbe scorrere non si stacca mai. */
  position: sticky;
  top: 0;
  align-self: start;
  /* Alta **quanto lo schermo**, non quanto il suo contenuto: il fondo blu deve
  arrivare in basso, e il piede (stato e versione) ci si appoggia con il
  `margin-top: auto` che ha gia'. Con `max-height` la barra finiva dove
  finivano le voci di menu, lasciando il bianco sotto. */
  height: 100vh;
  overflow-y: auto;
}
.logo {
  display: flex; align-items: center; padding: 2px 4px 6px;
}
.logo__img {
  width: auto;
  height: auto;
  max-height: calc(56.5px * var(--ui-font-scale));
  max-width: 100%;
}
.menu-telefono {
  display: none;
}
.velo-menu {
  display: none;
}
.filtri-apri {
  display: none;
}
.sidebar__select {
  color: var(--sidebar-text);
  padding: 8px 10px;
  font-size: calc(13px * var(--ui-font-scale));
}
.nav {
  display: flex; flex-direction: column; gap: 6px;
}
.nav__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-size: calc(14px * var(--ui-font-scale));
  line-height: 1.2;
  border: 1px solid transparent;
  background: transparent;
}
.nav__item--toggle {
  width: 100%;
  justify-content: flex-start;
  cursor: pointer;
}
.nav__item--toggle .nav__caret {
  margin-left: auto;
  transition: transform 0.15s ease;
}
.nav-sub {
  display: none;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}
.nav-sub__item {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px 8px 40px;
  border: 1px solid transparent;
  font-size: calc(13px * var(--ui-font-scale));
}
.nav__icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
}
.nav__icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sidebar__footer {
  margin-top: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.sidebar__version {
  font-size: calc(11px * var(--ui-font-scale));
  color: rgba(255, 255, 255, .45);
  letter-spacing: .02em;
  cursor: default;
}
.main {
  padding: 18px 20px 32px;
  /* **La riga che fa stare la pagina nello schermo**, a qualunque larghezza.
  `.main` e' una cella di griglia, e una cella ha `min-width: auto`: si
  rifiuta di scendere sotto la larghezza del suo contenuto. Con una tabella
  larga dentro era la **pagina intera** a scorrere di lato, e
  l'`overflow-x: auto` del `.table-wrapper` non serviva a niente perche' il
  contenitore si allargava insieme alla tabella. Adesso scorre la tabella
  dentro il suo riquadro, che e' quello che deve fare.
  Misurato: dashboard da 1316 a 1024 su uno schermo da 1024, e da 1048 a
  390 su un telefono. E' la stessa regola di `.app-topbar__nav`, delle
  pagine documento e delle celle con un layout dentro. */
  min-width: 0;
}
.main > .topbar, .main > .section {
  width: 100%;
  max-width: var(--content-max-width);
  margin-inline: auto;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}
.topbar h1 {
  margin: 4px 0 0;
  font-size: calc(clamp(1.45rem, 1.05rem + 0.9vw, 2rem) * var(--ui-font-scale));
}
.topbar__meta {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: flex-end;
}
.topbar__firma-account {
  display: contents;
}
.meta {
  background: #fff;
  border: 1px solid var(--border);
  min-width: 98px;
  text-align: center;
}
.alerts-bell {
  position: relative;
  display: inline-flex;
}
.alerts-bell__btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.alerts-bell__btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.alerts-bell__btn:hover {
  border-color: #93c5fd;
  color: var(--accent);
}
.alerts-bell__dot {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--danger);
}
.alerts-bell__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(380px, 80vw);
  border: 1px solid var(--border);
  background: #fff;
  z-index: 40;
}
.alerts-bell__panel-head {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: calc(13px * var(--ui-font-scale));
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.alerts-bell__list {
  display: flex;
  flex-direction: column;
  max-height: 300px;
  overflow: auto;
}
.alerts-bell__item {
  padding: 10px 12px;
  border-bottom: 1px solid #eef2f7;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.alerts-bell__item:last-child {
  border-bottom: none;
}
.alerts-bell__item:hover {
  background: #f8fafc;
}
.alerts-bell__item-title {
  font-size: calc(13px * var(--ui-font-scale));
  font-weight: 700;
  color: var(--text);
}
.alerts-bell__item-text {
  font-size: calc(12px * var(--ui-font-scale));
  color: var(--muted);
}
.alerts-bell__item-date {
  font-size: calc(12px * var(--ui-font-scale));
  color: #1d4ed8;
  font-weight: 700;
}
.alerts-bell__empty {
  margin: 0;
  padding: 14px 12px;
  color: var(--muted);
  font-size: calc(13px * var(--ui-font-scale));
}
.section {
  margin-bottom: 16px;
}
.section__header {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; flex-wrap: wrap;
}
.section h2 {
  margin: 4px 0 0; font-size: calc(1.05rem * var(--ui-font-scale));
}
.grid {
  display: grid; gap: 14px;
}
.grid.columns {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start;
}
.grid.two-columns {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px;
}
@media (max-width: 700px) {
  .grid.two-columns > * {
    min-width: 0;
  }
  .grid.two-columns select, .grid.two-columns input:not([type="checkbox"]):not([type="radio"]) {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .grid.two-columns .btn {
    white-space: normal;
  }
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
}
.card h3 {
  margin: 6px 0; font-size: calc(1rem * var(--ui-font-scale)); letter-spacing: -0.015em;
}
a.card.metric {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease;
}
a.card.metric:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(9, 14, 26, 0.12);
}
a.card.metric:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}
.card h4 {
  margin: 4px 0 12px;
}
.muted {
  color: var(--muted);
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--pill);
  color: #1e3a8a;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #c7d2fe;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: calc(7px * var(--ui-font-scale)) calc(11px * var(--ui-font-scale));
  min-height: calc(34px * var(--ui-font-scale));
  border: 1px solid transparent;
  font-size: calc(12px * var(--ui-font-scale));
  line-height: 1.2;
  cursor: pointer;
  box-shadow: none;
}
.btn.primary {
  color: #fff;
}
.btn.primary:hover {
  transform: translateY(-1px);
}
.btn.success {
  color: #fff;
}
.btn.success:hover {
  transform: translateY(-1px);
}
.btn.danger {
  color: #fff;
}
.btn.danger:hover {
  transform: translateY(-1px);
}
.btn.ghost {
  background: #fff;
  border-color: var(--border);
  color: var(--text);
}
.btn:active {
  box-shadow: none;
}
.form {
  display: flex; flex-direction: column; gap: 10px;
}
.form label {
  font-size: calc(12px * var(--ui-font-scale)); color: var(--text); letter-spacing: -0.01em;
}
.form input, .form select {
  width: 100%;
  margin-top: 6px;
  padding: calc(8px * var(--ui-font-scale)) calc(10px * var(--ui-font-scale));
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: calc(13px * var(--ui-font-scale));
  line-height: 1.35;
  min-height: calc(36px * var(--ui-font-scale));
  box-shadow: none;
}
.form textarea {
  width: 100%;
  margin-top: 6px;
  padding: calc(9px * var(--ui-font-scale)) calc(10px * var(--ui-font-scale));
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: calc(13px * var(--ui-font-scale));
  font-family: inherit;
  resize: vertical;
  line-height: 1.5;
  min-height: calc(88px * var(--ui-font-scale));
  box-shadow: none;
}
.form select {
  appearance: none;
  background-color: #fff;
  background-image:
  linear-gradient(45deg, transparent 50%, #64748b 50%),
  linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position:
  calc(100% - calc(18px * var(--ui-font-scale))) calc(50% - 1px),
  calc(100% - calc(12px * var(--ui-font-scale))) calc(50% - 1px);
  background-size:
  calc(6px * var(--ui-font-scale)) calc(6px * var(--ui-font-scale)),
  calc(6px * var(--ui-font-scale)) calc(6px * var(--ui-font-scale));
  background-repeat: no-repeat;
  padding-right: calc(34px * var(--ui-font-scale));
}
.form__hint {
  font-size: calc(12px * var(--ui-font-scale)); margin: 4px 0 0;
}
.segmented {
  display: inline-flex;
  border: 1px solid var(--border);
  overflow: hidden;
  width: fit-content;
}
.segmented__item {
  padding: 8px 14px;
  border: none;
  background: #fff;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}
.segmented__item.is-active {
  background: var(--accent);
  color: #fff;
}
.form-tab {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 12px;
  background: #fff;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}
.form-tab.is-active {
  background: #0f172a;
  color: #fff;
  border-color: #0f172a;
}
.field-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: #fff;
  font-weight: 600;
  font-size: calc(14px * var(--ui-font-scale));
  color: var(--text);
}
.field-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  accent-color: var(--accent);
}
.field-checkbox span {
  line-height: 1.3;
}
.table-wrapper {
  overflow: auto;
  border: 1px solid var(--border);
  background: #fff;
}
.table-wrapper--row-menu {
  overflow: visible;
}
table {
  width: 100%; border-collapse: collapse; background: #fff;
}
th, td {
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: calc(12px * var(--ui-font-scale));
  vertical-align: middle;
}
th {
  text-transform: uppercase;
}
table.table--compact th, table.table--compact td {
  font-size: calc(11px * var(--ui-font-scale));
  line-height: 1.25;
  vertical-align: top;
}
table.table--compact .table-meta {
  font-size: calc(11px * var(--ui-font-scale));
}
table.table--compact input, table.table--compact select {
  margin-top: 0;
  width: 100%;
  padding: 6px 7px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: calc(12px * var(--ui-font-scale));
}
.table-image {
  width: 72px;
  height: 48px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: #e5e7eb;
}
.table-image--grande {
  width: 87px;
  height: 58px;
}
.table-title {
  display: flex; align-items: center; gap: 8px; margin-bottom: 2px;
}
.table-title strong {
  font-size: calc(14px * var(--ui-font-scale)); letter-spacing: -0.01em;
}
.table-row-menu {
  position: relative;
  display: inline-flex;
  justify-content: flex-end;
}
.table-row-menu__toggle {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-weight: 700;
  font-size: calc(18px * var(--ui-font-scale));
  line-height: 1;
  cursor: pointer;
}
.table-row-menu__toggle:hover {
  border-color: #93c5fd;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}
.table-row-menu__list {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 190px;
  z-index: 1200;
  display: none;
  flex-direction: column;
  gap: 2px;
  border: 1px solid var(--border);
  background: #fff;
}
.table-row-menu.is-open .table-row-menu__list {
  display: flex;
}
.table-row-menu__item {
  border: 1px solid transparent;
  background: #fff;
  color: var(--text);
  font-size: calc(13px * var(--ui-font-scale));
  font-weight: 600;
  text-align: left;
  padding: 8px 10px;
  cursor: pointer;
}
.table-row-menu__item:hover {
  background: #f8fafc;
  border-color: var(--border);
}
.table-row-menu__item:disabled {
  opacity: 0.45;
  cursor: help;
}
.table-row-menu__item:disabled:hover {
  background: none;
}
.table-row-menu__item--danger {
  color: var(--danger-strong);
}
.table-row-menu__item--danger:hover {
  background: var(--danger-soft);
  border-color: #fecaca;
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: calc(12px * var(--ui-font-scale));
  font-weight: 700;
  text-transform: capitalize;
}
.badge--ok {
  background: var(--ok-soft); color: var(--ok-ink);
}
.badge--muted {
  background: #eef2f7; color: #64748b;
}
.badge--info {
  background: #e0f2fe; color: #075985;
}
.view-tab {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 12px;
  background: #fff;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}
.view-tab.is-active {
  background: #0f172a;
  color: #fff;
  border-color: #0f172a;
}
.detail-item {
  border: 1px solid var(--border);
  padding: 10px 11px;
  background: #fff;
}
.detail-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
  padding: 6px 10px;
  font-size: calc(13px * var(--ui-font-scale));
  font-weight: 700;
}
.hidden {
  display: none;
}
.footer {
  padding: 18px 24px 28px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.eyebrow {
  text-transform: uppercase; color: var(--muted); margin: 0;
}
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.chip {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 20px;
  padding: 8px 14px;
  font-weight: 600;
  cursor: pointer;
}
.chip:hover {
  border-color: var(--accent);
}
.chip.active {
  background: var(--accent);
  color: #fff;
}
.chip.has-alert {
  position: relative;
  padding-right: 20px;
}
.chip.has-alert::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--danger);
  box-shadow: 0 0 0 2px #fff;
}
.filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  align-items: end;
}
.filter-bar input[type="search"] {
  min-width: 0;
}
.filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-weight: 600;
  color: var(--text);
  font-size: calc(12px * var(--ui-font-scale));
}
.filter-bar .filter-field input, .filter-bar .filter-field select {
  width: 100%;
  height: calc(42px * var(--ui-font-scale));
  min-height: calc(42px * var(--ui-font-scale));
  padding: 0 calc(12px * var(--ui-font-scale));
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: calc(14px * var(--ui-font-scale));
  line-height: 1.2;
  background: #fff;
  color: var(--text);
}
.filter-bar .filter-field input:focus, .filter-bar .filter-field select:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.period-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 8px 12px;
  font-size: calc(13px * var(--ui-font-scale));
  font-weight: 700;
  cursor: pointer;
}
.period-btn:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}
.period-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.app-dialog {
  width: min(calc(520px + ((var(--ui-font-scale) - 1) * 140px)), 100%);
  background: #fff;
  border: 1px solid var(--border);
}
.app-dialog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.app-dialog__title {
  margin: 0;
  font-size: calc(18px * var(--ui-font-scale));
  flex: 1 1 220px;
  min-width: 0;
}
.app-dialog__badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: calc(12px * var(--ui-font-scale));
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.app-dialog__badge--info {
  background: #dbeafe;
  color: #1d4ed8;
}
.app-dialog__badge--success {
  background: var(--ok-soft);
  color: var(--ok);
}
.app-dialog__badge--error {
  background: var(--danger-soft);
  color: var(--danger-strong);
}
.app-dialog__message {
  margin: 0;
  color: var(--text);
  line-height: 1.5;
  font-size: calc(15px * var(--ui-font-scale));
  white-space: pre-wrap;
}
.app-dialog__details {
  margin: 0 0 4px;
  padding: 10px 12px 10px 26px;
  max-height: 320px;
  overflow-y: auto;
  list-style: disc;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  font-size: calc(13px * var(--ui-font-scale));
  line-height: 1.55;
}
.app-dialog__details li + li {
  margin-top: 4px;
}
.app-dialog__details strong {
  color: var(--text);
}
.app-dialog__details span {
  color: var(--muted);
}
.app-dialog__nota {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: calc(12px * var(--ui-font-scale));
  line-height: 1.5;
}
.app-dialog__details li:has(.app-dialog__nota) + li {
  margin-top: 10px;
}
.app-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}
@media print {
  body, .main, .app {
    margin: 0;
    padding: 0;
    background: #fff;
  }
  .app {
    display: block;
    min-height: auto;
  }
}
@media (max-width: 700px) {
  .app {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(84vw, 300px);
    height: auto;
    /* La barra in alto sta a 900: sotto, il pannello aperto le finirebbe dietro. */
    z-index: 960;
    overflow-y: auto;
    /* Chiusa non si vede **e non si raggiunge da tastiera**: un menu invisibile
    in cui si puo' entrare col tab e' peggio di nessun menu. */
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.22s ease, visibility 0.22s ease;
  }
  .sidebar.is-aperta {
    transform: none; visibility: visible;
  }
  .velo-menu {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 950;
    background: rgba(15, 23, 42, 0.45);
  }
  .velo-menu[hidden] {
    display: none;
  }
  body.menu-mobile-aperto {
    overflow: hidden;
  }
  .main {
    padding-left: 16px; padding-right: 16px; padding-bottom: 30px;
  }
  .topbar {
    flex-direction: column; align-items: flex-start; gap: 6px;
  }
  .topbar h1 {
    font-size: calc(22px * var(--ui-font-scale));
  }
  .topbar__meta {
    width: 100%;
    display: flex;
    /* **Va a capo, non scorre.** Con `overflow-x: auto` la striscia diventava
    un contenitore che **ritaglia i figli assoluti**: la campanella e il
    menu account stanno dentro di lei e i loro pannelli sono `absolute`,
    quindi si aprivano e venivano tagliati via. Da fuori sembrava che il
    clic non facesse niente — e dal telefono non si riusciva piu' nemmeno a
    uscire o a cambiare password.
    Una riga in piu' quando i contatori sono tanti costa una trentina di
    pixel; un comando che non si raggiunge costa molto di piu'. */
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
  }
  .topbar__meta > * {
    flex: 0 0 auto;
  }
  .meta {
    padding: 5px 10px; border-radius: 8px;
  }
  .meta .eyebrow {
    font-size: calc(9.5px * var(--ui-font-scale)); letter-spacing: 0.06em;
  }
  .meta strong {
    font-size: calc(13px * var(--ui-font-scale));
  }
  .meta--da-scrivania {
    display: none;
  }
  .topbar__firma-account {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
  }
  .filtri-apri {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--card);
    color: inherit;
    font-weight: 650;
    font-size: calc(13.5px * var(--ui-font-scale));
    cursor: pointer;
  }
  .filtri-apri svg {
    width: 17px; height: 17px;
  }
  .filtri-apri__conto {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-size: calc(11px * var(--ui-font-scale));
  }
  .filtri-apri__conto[hidden] {
    display: none;
  }
  .filtri-chiusi {
    display: none;
  }
  :root {
    --telefono: 1;
  }
  .alerts-bell__panel {
    left: 0;
    right: auto;
    width: min(340px, calc(100vw - 32px));
  }
  .tabella-impilata thead {
    display: none;
  }
  .tabella-impilata, .tabella-impilata tbody, .tabella-impilata tr, .tabella-impilata td {
    display: block; width: auto;
  }
  .tabella-impilata {
    border: 0;
  }
  .tabella-impilata tr {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card);
    padding: 10px 12px;
    margin-bottom: 10px;
  }
  .tabella-impilata tbody tr:hover {
    background: var(--card);
  }
  .tabella-impilata td {
    border: 0;
    padding: 3px 0;
    display: flex;
    align-items: baseline;
    gap: 10px;
    white-space: normal;
  }
  .tabella-impilata td::before {
    content: attr(data-etichetta);
    flex: 0 0 34%;
    color: var(--muted);
    font-size: calc(10.5px * var(--ui-font-scale));
    font-weight: 650;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }
  .tabella-impilata td > * {
    min-width: 0; max-width: 100%;
  }
  .tabella-impilata td {
    flex-wrap: wrap;
  }
  .tabella-impilata td[data-vuota] {
    display: none;
  }
  .tabella-impilata tr[data-riga-libera] td::before {
    content: none;
  }
  .tabella-impilata tr[data-riga-libera] td {
    display: block;
  }
  .tabella-impilata .vehicle-price-cell {
    font-size: calc(17px * var(--ui-font-scale));
    font-weight: 750;
  }
  .tabella-impilata .table-title {
    white-space: normal; display: block;
  }
  .tabella-impilata .table-title strong {
    display: block;
  }
  .tabella-impilata .table-meta {
    white-space: normal;
    font-size: calc(11px * var(--ui-font-scale));
    line-height: 1.35;
  }
  .section__header {
    align-items: flex-start;
  }
}
@font-face {
  font-family: "Inter";
  src: url("/static/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  --bg: #f4f6fa;
  --card: #ffffff;
  --text: #101828;
  --muted: #5f6b7e;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --border: #e3e8f0;
  --pill: #eef3ff;
  --shadow: 0 16px 40px -12px rgba(15, 23, 42, 0.18), 0 4px 12px -4px rgba(15, 23, 42, 0.08);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05), 0 2px 8px -2px rgba(15, 23, 42, 0.07);
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar: #0e1626;
  --sidebar-text: #e7ecf4;
  --sidebar-muted: #8b96ab;
  --surface: #f8fafd;
  --surface-strong: #eef2f8;
  --focus-ring: 0 0 0 3.5px rgba(37, 99, 235, 0.16);
  /* Le famiglie semantiche del guscio: sono i nomi che il tema
  scuro dovra' ridefinire, ed e' l'unico motivo per cui hanno un
  token. I valori sono quelli che c'erano nelle regole, invariati. */
  --danger: #dc2626;  /* il rosso pieno: il pallino degli avvisi, il fondo del bottone */
  --danger-strong: #b91c1c;  /* il rosso scuro: l'inchiostro su fondo tenue */
  --danger-soft: #fee2e2;  /* il fondo tenue, sotto un inchiostro rosso */
  --ok: #15803d;  /* il verde pieno */
  --ok-ink: #166534;  /* l'inchiostro verde sul fondo tenue */
  --ok-soft: #dcfce7;  /* il fondo tenue, sotto un inchiostro verde */
}
body {
  font-family: "Inter", "Segoe UI Variable", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background:
  radial-gradient(900px 320px at 90% -5%, rgba(37, 99, 235, 0.05), transparent 60%),
  var(--bg);
  line-height: 1.45;
}
h1, h2, h3, h4 {
  font-weight: 700;
}
* {
  scrollbar-width: thin; scrollbar-color: #c3ccda transparent;
}
*::-webkit-scrollbar {
  width: 10px; height: 10px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: #c3ccda;
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover {
  background-color: #a6b2c5; background-clip: content-box;
}
.sidebar {
  /* La sfumatura passa da una variabile perche' il marchio dell'istanza puo'
  cambiarla (`core/marchio.js`). Il valore qui e' quello di CarBi, ed e'
  anche il ripiego: senza personalizzazione la barra resta identica. */
  background: var(--sidebar-gradient, linear-gradient(180deg, #0f1a30 0%, #0c1424 55%, #0a111e 100%));
  box-shadow: inset -1px 0 0 rgba(148, 163, 184, 0.08);
  padding: 20px 14px;
}
.sidebar__select {
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.sidebar__select:hover {
  border-color: rgba(148, 163, 184, 0.4);
}
.sidebar__select:focus {
  outline: none; border-color: #3b82f6; box-shadow: var(--focus-ring);
}
.sidebar__select option, .sidebar__select optgroup {
  color: #111827;
  background: #fff;
}
.nav__item {
  border-radius: 9px;
  padding: 9px 11px;
  color: #c3cbdb;
  font-weight: 600;
  transition: background 0.14s ease, color 0.14s ease;
}
.nav__item:hover {
  background: rgba(148, 163, 184, 0.1); color: #fff;
}
.nav__item.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.95) 0%, rgba(37, 99, 235, 0.95) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 14px -6px rgba(37, 99, 235, 0.6);
}
.nav__icon {
  color: inherit; opacity: 0.9;
}
.nav-sub__item {
  border-radius: 8px;
  color: #aeb8ca;
  font-weight: 550;
  transition: background 0.14s ease, color 0.14s ease;
}
.nav-sub__item:hover {
  background: rgba(148, 163, 184, 0.1); color: #fff;
}
.nav-sub__item.active {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(59, 130, 246, 0.28);
  color: #fff;
}
.topbar {
  border-bottom: 1px solid var(--border); padding-bottom: 12px; margin-bottom: 18px;
}
.topbar h1 {
  font-weight: 750; letter-spacing: -0.03em;
}
.eyebrow {
  letter-spacing: 0.1em; font-weight: 650; font-size: calc(11px * var(--ui-font-scale));
}
.meta {
  border-radius: 10px;
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
  padding: 8px 12px;
}
.meta strong {
  font-size: calc(16px * var(--ui-font-scale)); font-variant-numeric: tabular-nums;
}
.alerts-bell__btn {
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.alerts-bell__panel {
  border-radius: 12px; box-shadow: var(--shadow); overflow: hidden;
}
.card {
  border-radius: var(--radius);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
  padding: 14px 16px;
}
.card.metric {
  border-radius: var(--radius);
}
.card.metric > p.muted {
  font-size: calc(12px * var(--ui-font-scale));
  font-weight: 600;
  letter-spacing: 0.01em;
}
.card.metric h3 {
  margin: 6px 0 2px;
  font-size: calc(26px * var(--ui-font-scale));
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.btn {
  border-radius: var(--radius-sm);
  font-weight: 650;
  letter-spacing: 0;
  transition: transform 0.1s ease, box-shadow 0.18s ease, background 0.18s ease,
  border-color 0.18s ease, color 0.18s ease, filter 0.18s ease;
}
.btn:focus-visible {
  outline: none; box-shadow: 0 0 0 3.5px rgba(37, 99, 235, 0.3);
}
.btn.primary {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  border-color: #1e55d6;
  box-shadow: 0 2px 6px -1px rgba(29, 78, 216, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn.primary:hover {
  background: linear-gradient(180deg, #4b8dfa 0%, #2f6bf0 100%);
  box-shadow: 0 6px 14px -4px rgba(29, 78, 216, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn.success {
  background: linear-gradient(180deg, #16a34a 0%, var(--ok) 100%);
  border-color: #136f36;
  box-shadow: 0 2px 6px -1px rgba(21, 128, 61, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.btn.success:hover {
  box-shadow: 0 6px 14px -4px rgba(21, 128, 61, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.btn.danger {
  background: linear-gradient(180deg, #ef4444 0%, var(--danger) 100%);
  border-color: #c22020;
  box-shadow: 0 2px 6px -1px rgba(185, 28, 28, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.btn.danger:hover {
  box-shadow: 0 6px 14px -4px rgba(185, 28, 28, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.btn.ghost {
  box-shadow: var(--shadow-sm);
  transition: transform 0.1s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.btn.ghost:hover {
  border-color: #c4cede; background: #f8fafd; transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0); filter: brightness(0.97);
}
.form label {
  font-weight: 650;
}
.field-checkbox {
  border-radius: var(--radius-sm);
}
.segmented {
  border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
}
.segmented__item {
  transition: background 0.15s ease, color 0.15s ease;
}
.form-tab, .view-tab {
  border-radius: var(--radius-sm);
  font-weight: 650;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-tab:hover, .view-tab:hover {
  border-color: #b9c5d8; background: #f8fafd;
}
.form-tab.is-active, .view-tab.is-active {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  border-color: #1e55d6;
  color: #fff;
  box-shadow: 0 2px 6px -1px rgba(29, 78, 216, 0.4);
}
.chip {
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.chip:hover {
  box-shadow: var(--shadow-sm);
}
.chip.active {
  box-shadow: 0 2px 8px -2px rgba(29, 78, 216, 0.45); border-color: transparent;
}
.period-btn {
  border-radius: 7px; transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.period-btn.active {
  box-shadow: 0 2px 6px -2px rgba(29, 78, 216, 0.45);
}
.table-wrapper {
  border-radius: 10px;
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}
th {
  background: #f7f9fc;
  color: #5b6779;
  font-size: calc(11px * var(--ui-font-scale));
  font-weight: 700;
  letter-spacing: 0.06em;
  border-bottom: 1px solid #dfe6ef;
}
td {
  border-bottom: 1px solid #eef2f7;
}
th, td {
  padding: 9px 11px;
}
table.table--compact th, table.table--compact td {
  padding: 5px 7px;
}
tbody tr {
  transition: background 0.1s ease;
}
tbody tr:hover {
  background: #f0f6ff;
}
.table-wrapper tbody tr:nth-child(even) {
  background: #fbfcfe;
}
.table-wrapper tbody tr:nth-child(even):hover {
  background: #f0f6ff;
}
.table-row-menu__toggle {
  border-radius: 8px; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.table-row-menu__list {
  border-radius: 10px; box-shadow: var(--shadow); padding: 6px;
}
.table-row-menu__item {
  border-radius: 7px; transition: background 0.12s ease;
}
.table-image {
  border-radius: 8px;
}
.pill {
  border-color: #cdddfd; font-weight: 650;
}
.detail-chip {
  border-radius: 7px;
}
.detail-item {
  border-radius: var(--radius-sm);
}
.app-dialog {
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 18px;
}
.section__header {
  margin-bottom: 10px;
}
.section h2 {
  font-weight: 700; letter-spacing: -0.02em;
}
.footer {
  background: transparent;
}
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--sidebar);
  color: var(--sidebar-text);
  padding: 0 18px;
  height: 52px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 10px rgba(15, 23, 42, 0.25);
}
.app-topbar__nav {
  display: flex; align-items: center; gap: 6px;
}
.app-topbar--beside-sidebar {
  position: fixed;
  top: 0;
  left: 260px;
  right: 0;
}
.has-beside-topbar .app .main {
  padding-top: 70px;
}
.app-topbar__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 6px;
  color: var(--sidebar-text);
  font-size: calc(13.5px * var(--ui-font-scale));
  font-weight: 600;
  border: 1px solid transparent;
}
.app-topbar__link:hover {
  background: rgba(255, 255, 255, 0.07);
}
.app-topbar__link.active {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.16);
}
.app-topbar__link-icon {
  font-size: calc(15px * var(--ui-font-scale));
}
.app-topbar__conto {
  min-width: 18px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: calc(11px * var(--ui-font-scale));
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.app-topbar__indietro {
  background: transparent;
  font-family: inherit;
  cursor: pointer;
  flex: 0 0 auto;
}
@media (max-width: 700px) {
  .app-topbar--beside-sidebar {
    left: 0;
  }
  .app-topbar {
    padding: 0 8px; gap: 8px;
  }
  .app-topbar__nav {
    flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none;
  }
  .app-topbar__nav::-webkit-scrollbar {
    display: none;
  }
  .app-topbar__link {
    flex: 0 0 auto;
  }
  .app-topbar__indietro {
    padding: 7px 10px;
  }
  .app-topbar__indietro-testo {
    display: none;
  }
  .menu-telefono {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--sidebar-text);
    cursor: pointer;
  }
  .menu-telefono svg {
    width: 24px; height: 24px;
  }
  .topbar > .menu-telefono {
    color: var(--text);
  }
}
.table-scroll {
  overflow-x: auto;
}
.pill--green {
  background: var(--ok-soft); border-color: #86efac; color: var(--ok-ink);
}
.pill--blue {
  background: #dbeafe; border-color: #93c5fd; color: #1e40af;
}
body.is-embedded .app-topbar, body.is-embedded .sidebar, body.is-embedded .topbar {
  display: none !important;
}
body.is-embedded .main {
  padding-top: 12px;
}
.app-dialog__form {
  display: flex; flex-direction: column; gap: 12px;
}
.app-dialog__form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: calc(13px * var(--ui-font-scale));
  font-weight: 600;
}
.app-dialog__form .app-dialog__actions {
  margin-top: 4px;
}
.app-dialog__error {
  color: var(--danger, #c0392b); font-weight: 600;
}
.account {
  position: relative; display: inline-flex; margin-left: auto;
}
.account__btn {
  display: grid;
  place-items: center;
  width: calc(36px * var(--ui-font-scale));
  height: calc(36px * var(--ui-font-scale));
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--muted, #5b6b7f);
  cursor: pointer;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.account__btn:hover {
  background: var(--accent-soft, #eef4ff); color: var(--accent, #2563eb); border-color: var(--accent, #2563eb);
}
.account__btn[aria-expanded="true"] {
  background: var(--accent, #2563eb); color: #fff; border-color: var(--accent, #2563eb);
}
.account__btn:focus-visible {
  outline: none; box-shadow: 0 0 0 3.5px rgba(37, 99, 235, 0.3);
}
.account__btn svg {
  width: calc(19px * var(--ui-font-scale));
  height: calc(19px * var(--ui-font-scale));
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.account__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  min-width: calc(210px * var(--ui-font-scale));
  padding: 6px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 28px -8px rgba(16, 24, 40, .22), 0 3px 8px -3px rgba(16, 24, 40, .12);
}
@media (max-width: 700px) {
  .account {
    position: static;
  }
  .account__panel {
    right: 12px;
    left: auto;
    min-width: 0;
    width: min(260px, calc(100vw - 24px));
  }
}
.account__who {
  display: grid;
  gap: 2px;
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.account__name {
  font-weight: 650;
  font-size: calc(13.5px * var(--ui-font-scale));
  overflow-wrap: anywhere;
}
.account__role {
  font-size: calc(12px * var(--ui-font-scale));
  color: var(--muted, #667085);
}
.account__action {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: calc(13px * var(--ui-font-scale));
  color: inherit;
  cursor: pointer;
}
.account__action:hover {
  background: var(--surface, #f4f7fb);
}
.account__action--exit {
  color: var(--danger, #b42318);
}
.account__action--exit:hover {
  background: var(--danger-soft, #fef3f2);
}
body.carica-foto {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: var(--bg, #f1f5f9);
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
}
.paginazione {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 2px 2px;
  font-size: calc(13px * var(--ui-font-scale));
  color: var(--muted);
}
.paginazione__comandi {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.paginazione__stato {
  min-width: 62px;
  text-align: center;
  font-weight: 700;
  color: var(--text);
}
.paginazione--unica .paginazione__comandi {
  display: none;
}
.powered {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 6px;
  opacity: 0.92;
  transition: opacity 0.15s ease;
}
.powered:hover {
  opacity: 1;
}
.powered.hidden {
  display: none;
}
.powered__testo {
  font-size: calc(12px * var(--ui-font-scale));
  color: var(--muted);
  white-space: nowrap;
}
.powered__logo {
  height: calc(28px * var(--ui-font-scale)); width: auto; display: block;
}
@media (max-width: 700px) {
  .powered__testo {
    display: none;
  }
}
.campo-da-compilare:placeholder-shown, .campo-da-compilare:invalid, input[type="date"].campo-da-compilare:not(:valid) {
  border-color: #38bdf8;
  background: #f0f9ff;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}
.campo-da-compilare:focus {
  border-color: #0284c7;
}
.app-dialog__choice {
  display: block; margin: 4px 0 12px;
}
.app-dialog__choice select {
  width: 100%;
}
.card > .section__header h3 {
  margin: 0;
  font-size: calc(0.95rem * var(--ui-font-scale));
  letter-spacing: -0.015em;
}
.card > .section__header > div > p.muted {
  margin: 2px 0 0;
}
tr.is-selected > td {
  background: #eef4ff;
}
.badge--consegnata {
  background: #dcfce7; color: #166534;
}
.scelta-filiali {
  display: grid;
  gap: 8px;
  min-width: calc(220px * var(--ui-font-scale));
}
.scelta-filiali__scelte {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.scelta-filiali__scelta {
  display: inline-flex;
  /* **La direzione va dichiarata.** Il foglio ha un `label`/contenitore a
  colonna piu' in su, e senza questa riga il nome finirebbe sopra la x. */
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding: 3px 4px 3px 10px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent-soft, rgba(37, 99, 235, .1));
  color: var(--accent-strong, var(--accent));
  font-size: calc(12px * var(--ui-font-scale));
  font-weight: 650;
  white-space: nowrap;
}
.scelta-filiali__togli {
  display: grid;
  place-items: center;
  width: calc(18px * var(--ui-font-scale));
  height: calc(18px * var(--ui-font-scale));
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: inherit;
  font: inherit;
  font-size: calc(15px * var(--ui-font-scale));
  line-height: 1;
  cursor: pointer;
}
.scelta-filiali__togli:hover {
  background: rgba(0, 0, 0, .08);
}
.scelta-filiali__vuoto {
  font-size: calc(12px * var(--ui-font-scale));
}
.scelta-filiali__cerca {
  position: relative;
}
.scelta-filiali__campo {
  width: 100%; min-height: calc(34px * var(--ui-font-scale));
}
.scelta-filiali__elenco {
  /* **Fissa, non assoluta**, ed e' il punto da non cambiare senza sapere
  perche'. Il controllo vive dentro una tabella, e la tabella sta in un
  `.table-wrapper` con `overflow: auto`: un elemento *assoluto* non esce da
  li' — l'elenco veniva tagliato dal bordo del riquadro e da fuori sembrava
  che la tendina si aprisse "sotto" e sparisse. In `fixed` non lo ritaglia
  nessun antenato.
  Il prezzo e' che le coordinate non le puo' piu' dare il foglio: le scrive
  `colloca()` in `guscio/scelta-filiali.js`, che misura lo spazio vero e —
  se sotto non ce n'e' — apre verso l'alto. Lo `z-index` passa sopra la
  barra in alto (900): e' una tendina che dura un istante, e finire sotto
  di lei sarebbe lo stesso difetto di prima da un'altra parte. */
  position: fixed;
  z-index: 950;
  max-height: calc(240px * var(--ui-font-scale));
  overflow-y: auto;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 28px -8px rgba(16, 24, 40, .22);
}
.scelta-filiali__elenco[hidden] {
  display: none;
}
.scelta-filiali__voce {
  display: block;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.scelta-filiali__voce:hover, .scelta-filiali__voce.is-evidenziata {
  background: var(--pill);
}
.scelta-filiali__altre, .scelta-filiali__niente {
  margin: 4px 0 2px;
  padding: 0 10px;
  font-size: calc(12px * var(--ui-font-scale));
}
