/* TAMI Laboratorio 1.7.18 — foglio di stile unico.
   Sostituisce style.css, tami-dark.css e tami-light.css (caricati in sequenza fino alla 1.7.17).
   Le dichiarazioni sovrascritte sono state rimosse; l'aspetto delle pagine è invariato.
   Colori principali: modificare i token in :root. Le aggiunte 1.7.18 sono in fondo al file. */
:root {
  color-scheme: light;
  --ink: #10203a;
  --muted: #62738e;
  --teal: #009cdf;
  --teal-dark: #007eb5;
  --bg: #f1f6fa;
  --line: #dce5ed;
  --white: #fff;
  --radius: 6px;
  --surface: #fff;
  --nav-bg: #172733;
  --nav-fg: #dce8f3;
  --nav-active: #214b60;
  --nav-hover: #284454;
  --nav-line: #4b6576;
  --nav-accent: #29b7e7;
}
@font-face {
  font-family: Manrope;
  src: url(manrope-400.woff2) format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Manrope;
  src: url(manrope-600.woff2) format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: Manrope;
  src: url(manrope-800.woff2) format("woff2");
  font-weight: 800;
  font-display: swap;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 25px;
}
body {
  font:
    16px/1.55 system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.5;
  font-family: TamiRoboto, Arial, sans-serif;
}
a {
  color: inherit;
  text-decoration: none;
  outline-offset: 4px;
}
button,
input,
select,
textarea {
  font: inherit;
  outline-offset: 4px;
}
button,
details summary {
  cursor: pointer;
}
h2 {
  margin: 0 0 20px;
  font-size: 21px;
  letter-spacing: -0.6px;
}
h3 {
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: -0.3px;
}
p {
  margin: 0 0 15px;
}
small {
  font-size: 0.82rem;
  display: block;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  z-index: 5;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.45rem;
  font-weight: 750;
  letter-spacing: 0.02em;
}
.brand small {
  color: #a5becb;
  font-size: 0.84rem;
  font-weight: 400;
  letter-spacing: 0.015em;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #00a0a3;
  color: #fff;
  font-size: 1.6rem;
  font-weight: 800;
}
.sidebar nav a,
.sidebar-bottom {
  display: flex;
  align-items: center;
  font-size: 1.1rem;
}
.sidebar-bottom {
  font-size: 0.82rem;
}
.sidebar-bottom small {
  overflow-wrap: anywhere;
}
.user-avatar {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
}
.logout {
  background: 0 0;
  border: 0;
  text-align: left;
}
.logout,
.topbar {
  font-size: 0.88rem;
}
.page-heading,
.topbar {
  display: flex;
  justify-content: space-between;
}
.check-row label,
.page-heading p,
body {
  margin: 0;
}
.eyebrow,
.sidebar nav a.active,
.sidebar nav a.active span {
  font-weight: 700;
}
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  line-height: 1.45;
  white-space: normal;
}
.full,
table {
  width: 100%;
}
.metrics {
  display: grid;
}
.metric {
  transition: border-color 0.2s;
}
.metric strong {
  line-height: 1.35;
}
.panel {
  overflow: hidden;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.text-link {
  font-weight: 650;
  overflow-wrap: anywhere;
}
.text-link:hover {
  text-decoration: underline;
}
.filters {
  display: flex;
}
.search-label {
  flex: 1;
}
table {
  text-align: left;
  border-collapse: collapse;
}
label,
th {
  font-weight: 600;
  font-size: 13px;
}
.badge,
table,
th {
  white-space: nowrap;
}
th {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  color: #485b76;
  border-color: var(--line);
  padding: 13px 18px;
  text-transform: none;
  letter-spacing: 0;
  border-left: 0;
  border-right: 0 !important;
}
.badge {
  display: inline-flex;
}
.empty {
  text-align: center;
  padding: 70px 20px;
}
.empty p {
  max-width: 470px;
  margin: 10px auto 25px;
}
.empty-icon {
  margin: 0 auto 20px;
  width: 55px;
  height: 55px;
  border-radius: 14px;
  font-size: 2rem;
}
.grid {
  display: grid;
}
.grid.two {
  grid-template-columns: 1fr 1fr;
}
.grid.three {
  grid-template-columns: repeat(3, 1fr);
}
label {
  display: block;
  color: #344968;
  margin-bottom: 14px;
}
input,
select,
textarea {
  display: block;
  width: 100%;
  font-weight: 400;
}
textarea {
  resize: vertical;
}
input[type="file"] {
  font-size: 0.88rem;
  padding: 9px;
}
.hint,
.muted {
  font-weight: 400;
}
.form-actions {
  text-align: right;
}
.error,
.facts dd,
.info-block p,
.notice {
  overflow-wrap: anywhere;
}
.notice {
  border: 1px solid #c9e6db;
}
.error {
  border: 1px solid #f6cdd2;
}
.detail-layout {
  display: grid;
}
.section-nav {
  display: flex;
  font-weight: 650;
}
.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0 0 24px;
}
.facts dt {
  font-size: 0.8rem;
  margin-bottom: 4px;
  color: #6d7f97;
}
.facts dd {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink);
}
.info-block {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
  margin-bottom: 24px;
}
.info-block strong {
  font-size: 0.85rem;
}
.info-block p {
  margin: 6px 0 18px;
  white-space: normal;
}
.info-block p:last-child {
  margin-bottom: 0;
}
.check-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  align-items: end;
}
.check-label select {
  font-size: 0.9rem;
}
.check-note textarea {
  margin: 0;
  min-height: 84px;
  font-size: 0.9rem;
}
.inline-form {
  display: flex;
  gap: 15px;
  align-items: end;
}
.inline-form label {
  flex: 1;
  margin-bottom: 0;
}
.inline-form .btn {
  margin-bottom: 0;
}
.file-row,
hr {
  border-top: 1px solid var(--line);
}
.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding-top: 17px;
  margin-top: 20px;
  overflow-wrap: anywhere;
}
.file-row a {
  color: var(--teal);
  font-weight: 600;
}
.file-row small {
  margin-top: 5px;
}
.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 24px;
  font-weight: 400;
}
.checkbox input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  margin: 3px 0 0;
  flex-shrink: 0;
}
.qr {
  margin: 22px auto;
  max-width: 180px;
  border: 1px solid var(--line);
}
.qr canvas,
.qr img {
  max-width: 100%;
  height: auto;
}
.pin {
  padding: 12px;
  border-radius: 8px;
  font-size: 0.84rem;
  margin-bottom: 20px;
}
.pin strong {
  display: block;
  font-size: 1.5rem;
  letter-spacing: 0.13em;
  color: var(--ink);
}
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}
.timeline li {
  border-left: 2px solid #d2e7e8;
  padding: 0 0 22px 18px;
  position: relative;
}
.timeline li:before {
  content: "";
  position: absolute;
  left: -5px;
  top: 7px;
  width: 8px;
  height: 8px;
  background: var(--teal);
  border-radius: 50%;
}
.timeline li strong {
  display: block;
  font-size: 0.88rem;
  margin: 5px 0;
}
.timeline li p {
  font-size: 0.85rem;
  color: #536b77;
  margin: 0;
  overflow-wrap: anywhere;
}
hr {
  border: 0;
  margin: 25px 0;
}
.public-shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 45px 24px;
}
.public-brand {
  justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 45px;
}
.login-card {
  max-width: 480px;
  margin: 0 auto;
  border: 1px solid var(--line);
  padding: 36px;
}
.login-card h1 {
  font-size: 2rem;
  margin: 15px 0;
}
.login-card p,
.public-foot {
  color: var(--muted);
}
.public-foot {
  text-align: center;
  font-size: 0.85rem;
  margin-top: 30px;
}
.tracking-content h1 {
  font-size: 1.85rem;
}
.tracking-content .badge {
  font-size: 1rem;
  padding: 10px 15px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 1150px) {
  .grid.three {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 850px) {
  .sidebar .brand small {
    display: none;
  }
  .sidebar .brand {
    font-size: 1.1rem;
  }
  .brand-mark {
    width: 35px;
    height: 35px;
    border-radius: 9px;
    font-size: 1.3rem;
  }
  .detail-side {
    align-items: start;
  }
  .search-label {
    flex-basis: 100%;
  }
}
@media (max-width: 560px) {
  .file-row {
    flex-direction: column;
  }
}
@media print {
  .section-nav {
    display: none;
  }
}
.corrections {
  border: 1px solid var(--line);
  margin-bottom: 22px;
}
.corrections summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 0.9rem;
}
.corrections[open] summary {
  margin-bottom: 20px;
}
.customer-picker {
  border-bottom: 1px solid #e5e9ed;
}
.customer-result {
  display: block;
  margin: 6px 0;
  text-align: left;
  white-space: normal;
  width: 100%;
}
.brand-logo {
  display: block;
  width: 150px;
  max-width: 100%;
  height: auto;
  border-radius: 9px;
}
.sidebar .brand {
  justify-content: center;
}
.section-nav {
  flex-wrap: wrap;
}
.document-send {
  padding: 20px;
  margin: 18px 0;
}
.document-send form {
  margin: 12px 0;
}
.whatsapp {
  background: #177d54;
  margin: 8px 0 16px;
}
.danger-panel {
  border-color: #efd1d5;
}
.danger-panel summary {
  cursor: pointer;
  font-weight: 650;
  color: #b42318;
}
.danger-panel details[open] summary {
  margin-bottom: 18px;
}
.history-item {
  border-bottom: 1px solid var(--line);
}
.history-item p {
  margin: 10px 0;
}
.history-item:last-child {
  border-bottom: 0;
}
@media (max-width: 850px) {
  .sidebar nav {
    flex-wrap: wrap;
  }
}
.btn.danger {
  border: 1px solid #b42318;
}
.btn.danger:hover {
  background: #912018;
}
.ui-icon {
  flex-shrink: 0;
}
.skip-link {
  position: fixed;
  top: 8px;
  left: 250px;
  z-index: 30;
  background: #fff;
  color: var(--teal);
  padding: 10px 16px;
  border: 2px solid var(--teal);
  transform: translateY(-160%);
}
.skip-link:focus {
  transform: none;
}
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.sidebar .brand {
  width: 100%;
}
.nav-label {
  letter-spacing: 0.1em;
}
.sidebar .nav-label {
  color: #77859a;
  font-size: 0.68rem;
  margin: 24px 12px 12px;
  letter-spacing: 0.1em;
}
.logout,
.sidebar-bottom {
  color: var(--ink);
}
.sidebar-bottom small {
  font-size: 0.72rem;
}
.logout {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding: 14px 8px;
}
.logout:hover {
  color: var(--teal);
}
.nav-toggle {
  display: none;
}
.workspace {
  min-width: 0;
}
.topbar {
  border: 0;
}
.topbar strong {
  font-size: 1.25rem;
  font-weight: 650;
}
.eyebrow {
  letter-spacing: 0.08em;
}
.btn:disabled {
  opacity: 0.65;
  cursor: wait;
}
.metric {
  box-shadow: 0 1px 3px #122e5105;
}
.metric small {
  font-size: 0.75rem;
}
.panel-heading {
  min-height: 48px;
}
.panel-heading .text-link {
  border-radius: 5px;
  padding: 6px 12px;
}
.filters select {
  width: 220px;
}
.table-wrap {
  max-width: 100%;
  overscroll-behavior-inline: contain;
}
td {
  border-bottom: 1px solid #dfe7f1;
  color: #11213c;
  border-color: var(--line);
  padding: 15px 18px;
  vertical-align: middle;
  border-left: 0;
  border-right: 0 !important;
}
td:last-child,
th:last-child {
  border-right: 0;
}
td .text-link {
  display: inline-block;
  border-radius: 5px;
  min-height: 36px;
  background: 0 0;
  border: 0;
  padding: 0;
  color: #008fda;
}
.admin-shell .form-panel > h2 {
  min-height: 46px;
}
.ds-comparison > div,
.grid,
.grid > *,
input,
select,
textarea {
  min-width: 0;
}
.ds-banner span,
.hint,
.muted {
  font-size: 0.8rem;
}
.customer-picker {
  padding-bottom: 12px;
  margin-bottom: 14px;
}
.customer-result {
  font-size: 0.84rem;
}
.form-actions {
  padding-top: 4px;
}
.form-actions > .btn {
  min-width: 260px;
}
.document-send {
  border-radius: 6px;
}
.section-nav {
  margin-bottom: 18px;
}
.check-row {
  gap: 14px;
  padding: 12px 0;
}
.corrections {
  padding: 12px 14px;
}
.corrections,
.error,
.lab-photos img,
.notice {
  border-radius: 5px;
}
.history-item {
  padding: 14px 0;
}
.whatsapp {
  color: #fff;
}
.public-shell {
  padding-top: 32px;
}
.login-card {
  border-radius: 9px;
  box-shadow: 0 8px 28px #12315409;
}
@media (max-width: 850px) {
  .sidebar {
    border-bottom: 1px solid var(--line);
  }
  .sidebar .brand {
    width: auto;
  }
  .nav-toggle {
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 5px;
  }
  .sidebar .nav-label {
    display: none;
  }
  .sidebar nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 12px;
  }
  .sidebar .logout,
  .sidebar nav a {
    font-size: 0.85rem;
  }
  .sidebar > form {
    display: block;
  }
  .nav-ready:not(.nav-open) .sidebar nav,
  .nav-ready:not(.nav-open) .sidebar > form {
    display: none;
  }
  .topbar strong {
    font-size: 1.05rem;
  }
  .detail-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .grid.three {
    grid-template-columns: minmax(0, 1fr);
  }
  .table-wrap table {
    min-width: 700px;
  }
  .filters {
    flex-wrap: wrap;
  }
  .filters .search-label {
    flex-basis: 100%;
  }
  .filters select {
    width: 100%;
  }
  .filters label:not(.search-label) {
    flex: 1;
  }
  .skip-link {
    left: 12px;
  }
}
@media (max-width: 560px) {
  .sidebar nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .page-heading > .badge,
  .page-heading > .btn {
    margin-top: 14px;
  }
  .panel-heading {
    flex-wrap: wrap;
  }
  .check-row,
  .detail-side,
  .facts,
  .grid.two {
    grid-template-columns: minmax(0, 1fr);
  }
  .form-actions > .btn {
    width: 100%;
    min-width: 0;
  }
  .file-row {
    align-items: stretch;
  }
  .inline-form {
    display: block;
  }
  .inline-form .btn {
    margin-top: 12px;
  }
  .btn,
  .file-row form,
  input[type="file"] {
    max-width: 100%;
  }
  .login-card {
    padding: 24px;
  }
  .public-shell {
    padding: 24px 16px;
  }
  .public-brand {
    margin-bottom: 28px;
  }
  .history-item strong {
    overflow-wrap: anywhere;
  }
}
@media print {
  .admin-shell .sidebar,
  .admin-shell .topbar,
  .skip-link {
    display: none;
  }
  .admin-shell .workspace {
    margin: 0;
  }
  .admin-shell .content {
    padding: 0;
  }
  .form-panel > h2,
  .panel,
  .panel-heading {
    background: #fff !important;
    color: #000 !important;
  }
  .form-panel > h2,
  .panel-heading {
    box-shadow: none;
  }
}
#laboratorio details {
  border: 1px solid var(--line);
  margin: 7px 0;
  padding: 9px 11px;
  border-radius: 7px;
  background: #f8fafc;
  border-color: var(--line);
}
#laboratorio summary {
  color: #244363;
}
.lab-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.lab-photos img {
  width: 100px;
  height: 90px;
  object-fit: cover;
}
.lab-json {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 320px;
  overflow: auto;
  font-size: 0.8rem;
  padding: 12px;
}
.lab-photos a,
.qr canvas,
.qr img {
  display: block;
}
.ds-summary {
  margin: 14px 0;
  min-width: 0;
}
.ds-banner {
  padding: 15px 16px;
  border: 1px solid #d6e0eb;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.ds-banner strong,
.ds-comparison h3 {
  font-size: 1rem;
}
.ds-banner.ds-ok {
  border-color: #bfded0;
}
.ds-banner.ds-warning {
  border-color: #ecd59e;
}
.ds-banner.ds-problem {
  border-color: #edc4bf;
}
.ds-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.ds-card {
  padding: 14px;
  border: 1px solid #d9e2ed;
  border-radius: 9px;
  border-left: 4px solid #8b9aad;
}
.ds-card h4,
.ds-disk h4 {
  margin: 0 0 8px;
  font-size: 0.9rem;
}
.ds-status {
  font-size: 0.78rem;
  font-weight: 700;
}
.ds-card p {
  font-size: 0.78rem;
  line-height: 1.5;
  margin: 8px 0;
}
.ds-card small,
.ds-disk small {
  font-size: 0.72rem;
}
.ds-disk {
  padding: 16px;
  border: 1px solid #d5dfeb;
  border-radius: 10px;
  margin: 12px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}
.ds-disk p,
.ds-disk > small {
  grid-column: 1/-1;
  font-size: 0.8rem;
  margin: 0;
}
.ds-rating {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ds-rating strong {
  font-size: 1.2rem;
}
.ds-stars {
  font-size: 1.3rem;
  letter-spacing: 2px;
  white-space: nowrap;
}
.ds-unrated {
  font-size: 0.75rem;
}
.ds-temperature {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8rem;
  padding: 12px;
  border-radius: 8px;
}
.ds-temperature strong {
  flex-basis: 100%;
}
.ds-temperature span {
  margin-right: 10px;
}
.ds-footnote,
.ds-meta {
  font-size: 0.74rem;
  line-height: 1.5;
}
.ds-phase {
  font-weight: 700;
  font-size: 0.9rem;
}
.ds-previous,
.ds-technical {
  margin-top: 16px;
}
#laboratorio summary,
.ds-previous summary,
.ds-technical > summary,
.lab-compact > summary {
  cursor: pointer;
  font-weight: 650;
}
.ds-comparison {
  align-items: start;
}
.ds-comparison .ds-cards {
  grid-template-columns: minmax(0, 1fr);
}
@media (max-width: 600px) {
  .ds-cards,
  .ds-disk {
    grid-template-columns: minmax(0, 1fr);
  }
  .ds-rating {
    text-align: left;
  }
  .ds-comparison {
    gap: 20px;
  }
  .ds-card,
  .ds-summary .ds-banner {
    padding: 13px;
  }
  .ds-footnote {
    font-size: 0.76rem;
  }
}
.wh-nav {
  margin: 0 0 24px;
}
.wh-job {
  padding: 16px 0;
  border-bottom: 1px solid #dce6ee;
}
.wh-job h3 {
  margin: 0 0 8px;
}
.wh-job form {
  margin: 8px 0;
}
.wh-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 350px;
  overflow: auto;
  font-size: 12px;
  padding: 14px;
}
.wh-price-preview {
  padding: 12px;
  border-radius: 8px;
}
.wh-pricing {
  margin: 16px 0;
}
.wh-nav .btn {
  min-height: 42px;
}
.wh-job .attachment-row {
  flex-wrap: wrap;
}
@media (max-width: 600px) {
  .wh-nav .btn {
    flex: 1 1 45%;
    text-align: center;
  }
  .wh-job .btn {
    width: 100%;
  }
  .wh-pricing .grid {
    grid-template-columns: 1fr;
  }
}
.wh-invoice-row {
  border: 1px solid #dce6ee;
  border-radius: 12px;
  padding: 18px;
  margin: 18px 0;
}
.wh-invoice-row h3 {
  margin-top: 0;
}
.wh-invoice-row input {
  max-width: 100%;
}
.sh-kind-working {
  border-top: 4px solid #0891b2;
}
.sh-kind-waiting {
  border-top: 4px solid #d97706;
}
.sh-kind-completed {
  border-top: 4px solid #16a34a;
}
.lab-compact,
.lab-compact[open] > summary {
  margin-bottom: 12px;
}
#laboratorio details[open] > summary,
.lab-compact h2,
.lab-compact label,
.lab-overview {
  margin-bottom: 10px;
}
.lab-compact > summary {
  min-height: 30px;
  padding: 3px 0;
}
.lab-overview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}
.lab-compact p {
  margin-bottom: 9px;
  font-size: 0.85rem;
}
.lab-compact .grid {
  gap: 10px 14px;
}
.lab-compact input,
.lab-compact select,
.lab-compact textarea {
  margin-top: 4px;
  padding: 7px 9px;
  min-height: 38px;
  font-size: 0.92rem;
}
.lab-compact textarea {
  min-height: 54px;
}
.lab-compact input[type="checkbox"] {
  min-height: auto;
}
.lab-compact .btn {
  padding: 7px 11px;
  min-height: 36px;
  font-size: 0.85rem;
}
.lab-compact .check-row {
  gap: 12px;
  padding: 8px 0;
}
.lab-compact .history-item {
  padding: 9px 0;
}
.lab-compact .history-item p {
  margin: 5px 0;
}
.lab-compact .ds-summary {
  margin: 9px 0;
}
.lab-compact .lab-photos {
  gap: 6px;
  margin-top: 8px;
}
.lab-compact .lab-photos img {
  width: 76px;
  height: 68px;
}
.lab-board td,
.lab-board th {
  padding: 10px 14px;
}
.lab-board .panel-heading {
  padding: 16px 16px 10px;
}
@media (max-width: 700px) {
  .lab-compact input,
  .lab-compact select,
  .lab-compact textarea {
    font-size: 1rem;
    min-height: 44px;
  }
  .lab-compact .btn {
    min-height: 44px;
  }
  .lab-compact summary {
    min-height: 44px;
    align-content: center;
  }
  .lab-compact .check-row,
  .lab-compact .grid.three,
  .lab-compact .grid.two {
    grid-template-columns: 1fr;
  }
  .lab-compact .check-row {
    gap: 4px;
  }
}
.tami-approval {
  display: inline-block;
}
.tami-approval.accepted {
  background: #d8f5e4;
  color: #12643b;
}
.tami-approval.pending {
  background: #fff0cb;
  color: #704a06;
}
.tami-approval.rejected {
  background: #ffe1df;
  color: #922a25;
}
.tami-diag-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 19px;
  border: 1px solid #bee2e9;
  border-radius: 12px;
  margin: 15px 0;
}
.tami-diag-hero h4 {
  font-size: 1.05rem;
  margin: 6px 0;
  color: #173b54;
}
.tami-diag-hero p {
  margin: 5px 0;
  font-size: 0.82rem;
}
.tami-diag-kicker {
  font-weight: 800;
  letter-spacing: 0.1em;
  font-size: 0.65rem;
}
.tami-diag-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid #d7e4ea;
  border-radius: 9px;
  margin: 8px 0;
}
.tami-diag-row strong {
  display: block;
  font-size: 0.88rem;
}
.tami-diag-row p {
  font-size: 0.78rem;
  margin: 4px 0;
}
.tami-diag-row details {
  margin-top: 7px;
}
.tami-diag-row summary {
  font-weight: 650;
  font-size: 0.78rem;
  cursor: pointer;
}
.tami-diag-dot {
  height: 10px;
  width: 10px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
  background: #aab8c2;
}
.tami-diag-warning {
  background: #d99a32;
}
.tami-diag-problem {
  background: #d95858;
}
.tami-diag-ok {
  background: #36a178;
}
@media (max-width: 700px) {
  .tami-diag-hero {
    align-items: stretch;
    flex-direction: column;
  }
}
.sidebar .brand-logo {
  border: 0;
}
.nav-label {
  margin: 30px 12px 10px;
  color: #788f9d;
  font-size: 0.65rem;
}
.topbar {
  border-color: var(--line);
  color: #9bb0bd;
}
.topbar strong {
  color: #d7e6ee;
}
.eyebrow {
  font-size: 0.65rem;
}
.metric small {
  color: #8ca5b5;
}
.metric:hover {
  border-color: var(--teal);
}
.panel {
  border-color: #33424c;
}
.form-panel .panel-heading {
  padding: 0 0 14px;
}
.full {
  margin-top: 10px;
}
input::placeholder,
textarea::placeholder {
  opacity: 1;
}
input:focus,
select:focus,
textarea:focus {
  outline-color: #26778b;
}
input:disabled,
select:disabled {
  opacity: 0.65;
}
input[type="checkbox"] {
  accent-color: #24d1ee;
}
textarea {
  line-height: 1.55;
}
.grid {
  gap: 14px;
}
.error,
.notice {
  font-size: 0.83rem;
  margin-bottom: 16px;
  padding: 12px 15px;
}
.section-nav {
  border-color: var(--line);
  font-size: 0.82rem;
}
.facts {
  gap: 14px;
}
.history-item p {
  font-size: 0.82rem;
}
details > summary:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 4px;
}
.public-shell {
  min-height: 100vh;
}
.public-brand .brand-logo {
  max-height: 90px;
  object-fit: contain;
  background: 0 0;
}
.full-width {
  width: 100%;
}
.qr {
  background: #fff;
  display: table;
  padding: 8px;
  border-radius: 5px;
}
.wh-nav {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.lab-compact {
  padding: 13px 15px;
}
.sh-kind-working {
  border-top-color: #24d1ee;
}
.sh-kind-waiting {
  border-top-color: #e5b85b;
}
.sh-kind-completed {
  border-top-color: #65d4ad;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid #24d1ee;
  outline-offset: 4px;
}
@media (max-width: 800px) {
  .sidebar .brand-logo {
    max-width: 180px;
  }
  .sidebar nav {
    background: #101c24;
  }
  .lab-compact .btn {
    min-height: 44px;
  }
}
@media print {
  .panel {
    color: #111;
  }
  .btn {
    display: none;
  }
}
.admin-shell .form-panel > h2 {
  border-bottom: 1px solid #344b5a;
}
.panel-heading .muted {
  color: #aac1cf;
}
.section-nav {
  color: #d4e8f4;
}
.nav-toggle {
  background: #182d39;
  color: #c7e4f4;
}
.lab-compact > h2 {
  margin: -13px -15px 12px !important;
  padding: 10px 15px !important;
}
.ds-disk.ds-problem,
.ds-disk.ds-warning {
  background: #14242f;
  color: #d5e7f2;
  border-color: #3c5668;
}
.ds-status {
  color: #bccedb;
}
.ds-card.ds-ok {
  border-left-color: #64cfa6 !important;
}
.ds-card.ds-warning {
  border-left-color: #e6b55d !important;
}
.ds-card.ds-problem {
  border-left-color: #ee7c91 !important;
}
.ds-empty-stars {
  color: #5e7384;
}
.sidebar .settings-submenu {
  border: 0;
  padding: 0;
  background: 0 0;
}
.sidebar .settings-submenu > summary {
  display: flex;
  align-items: center;
  cursor: pointer;
  list-style: none;
  color: var(--nav-fg);
  gap: 22px;
  padding: 16px 10px;
  border-radius: 0;
}
.sidebar .settings-submenu > summary::-webkit-details-marker {
  display: none;
}
.sidebar .settings-submenu > summary::after {
  content: "⌄";
  margin-left: auto;
}
.sidebar .settings-submenu[open] > summary::after {
  content: "⌃";
}
.sidebar .settings-submenu > summary:focus-visible {
  outline: 2px solid #39b9d5;
  outline-offset: 2px;
}
.sidebar .settings-links {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.customer-bulk-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.customer-select {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: #11a3be;
}
.customer-list-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
[hidden] {
  display: none !important;
}
@media (max-width: 850px) {
  .customer-bulk-bar .btn,
  .sidebar .settings-submenu {
    width: 100%;
  }
}
.dashboard-status {
  display: flex;
  align-items: center;
}
.dashboard-status select,
.filters label,
.margin-charts-note h3 {
  margin: 0;
}
.dashboard-status .btn {
  flex-shrink: 0;
}
.dashboard-status:focus-within {
  border-radius: 4px;
}
.margin-charts-note {
  grid-column: 1/-1;
}
.margin-charts-note p {
  margin: 5px 0;
  color: #adc3d1;
}
.margin-chart-scroll {
  overflow-x: auto;
}
h1 {
  font-size: 40px;
  line-height: 1.2;
  letter-spacing: -1.3px;
  font-weight: 800;
  margin: 0 0 8px;
}
.hint,
.muted,
small {
  color: var(--muted);
}
.brand-logo {
  filter: none;
}
.ui-icon {
  height: 22px;
  width: 22px;
  object-fit: contain;
}
.sidebar {
  width: 270px;
  padding: 19px 0 24px;
  background: var(--nav-bg);
  color: var(--nav-fg);
  border: 0;
  overflow-y: auto;
}
.sidebar-header {
  padding: 0 19px 22px;
}
.sidebar .brand-logo {
  width: 232px;
  max-height: none;
  border-radius: 6px;
  background: #fff;
  filter: none;
}
.nav-label {
  display: none;
}
.sidebar nav {
  gap: 0;
  display: flex;
  flex-direction: column;
}
.sidebar nav a {
  padding: 17px 26px;
  border: 0;
  border-left: 4px solid transparent;
  border-radius: 0;
  gap: 23px;
  min-height: 56px;
  color: var(--nav-fg);
}
.sidebar nav a span {
  font-size: 15px;
  font-weight: 400;
}
.sidebar nav a.active {
  background: var(--nav-active);
  border-left-color: var(--nav-accent);
  box-shadow: none;
  color: #fff;
}
.sidebar nav a:hover {
  background: var(--nav-hover);
  color: #fff;
}
.sidebar .ui-icon {
  filter: invert(94%) sepia(12%) saturate(383%) hue-rotate(174deg);
  width: 23px;
  height: 23px;
}
.sidebar .settings-submenu {
  margin: 26px 20px 0;
  border-top: 1px solid var(--nav-line);
  padding-top: 15px;
}
.sidebar .settings-submenu > summary:after,
td {
  font-size: 14px;
}
.sidebar .settings-links {
  padding-left: 24px;
}
.sidebar .settings-links a {
  min-height: 36px;
  padding: 9px 8px;
  font-size: 13px;
}
.sidebar-bottom {
  padding: 40px 25px 0;
  margin-top: auto;
  gap: 14px;
}
.sidebar-bottom strong {
  color: #fff;
  font-size: 14px;
}
.sidebar-bottom small {
  color: #b6c9d8;
}
.user-avatar {
  background: #23b1dd;
  color: #fff;
  width: 44px;
  height: 44px;
  font-size: 18px;
}
.sidebar-bottom form {
  margin-left: auto;
}
.sidebar .logout {
  border: 0;
  padding: 4px;
  margin: 0;
  min-height: 44px;
  width: 30px;
}
.workspace {
  margin-left: 270px;
}
.topbar {
  height: 75px;
  min-height: 75px;
  background: #f5f8fb;
  border-bottom: 1px solid var(--line);
  padding: 12px 28px;
  gap: 24px;
  align-items: center;
}
.global-search {
  display: flex;
  align-items: center;
  border: 1px solid #ccd8e3;
  border-radius: 6px;
  background: #fff;
  max-width: 600px;
  flex: 1;
  padding: 0 14px;
  gap: 12px;
}
.global-search input {
  border: 0;
  background: 0 0;
  margin: 0;
  padding: 10px 0;
  min-width: 100px;
  width: 100%;
  font-size: 14px;
  min-height: 42px;
}
.global-search input:focus {
  outline: 0;
}
.global-search:focus-within {
  outline: 2px solid var(--teal);
}
.topbar-date {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-left: auto;
  white-space: nowrap;
  color: #485a72;
  font-size: 13px;
}
.account-menu {
  position: relative;
  border-left: 1px solid #cbd8e3;
  padding-left: 24px;
  flex-shrink: 0;
}
.account-menu summary {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  list-style: none;
  cursor: pointer;
}
.account-menu .user-avatar {
  width: 38px;
  height: 38px;
  font-size: 16px;
}
.account-menu > div {
  position: absolute;
  right: 0;
  top: 52px;
  z-index: 10;
  padding: 18px;
  width: 230px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 8px 30px #10203a18;
}
.account-menu a {
  display: block;
  margin-bottom: 12px;
}
.content {
  max-width: 1800px;
  padding: 26px 24px 40px;
  margin: auto;
}
.page-heading {
  margin-bottom: 28px;
  gap: 20px;
  align-items: center;
}
.page-heading p {
  font-size: 19px;
  color: #596d88;
}
.page-heading > .btn {
  min-height: 46px;
}
.eyebrow {
  color: #74859a;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: none;
  margin-bottom: 20px;
}
.panel-heading {
  background: #fff;
  color: var(--ink);
  border: 0;
  padding: 16px 20px 8px;
  gap: 12px;
}
.panel-heading h2 {
  font-size: 22px;
  margin: 0;
}
.panel-heading .text-link {
  color: var(--teal);
  background: 0 0;
  border: 0;
}
.form-panel {
  padding: 20px;
}
.admin-shell .form-panel > .panel-heading,
.admin-shell .form-panel > h2 {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
  margin: -20px -20px 18px;
  padding: 16px 20px;
  font-size: 21px;
}
.metrics {
  gap: 0;
  margin: 12px 0 28px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.metric,
.metric.highlight {
  background: 0 0;
  border: 0;
  border-radius: 0;
  padding: 0 40px;
  border-right: 1px solid #d0dde8;
}
.metric:first-child,
.profit-metrics .metric:first-child {
  padding-left: 5px;
}
.customer-strip > div:last-child,
.expense-metrics > div:last-child,
.metric:last-child {
  border: 0;
}
.metric span {
  color: #536681;
  font-weight: 400;
  font-size: 16px;
}
.metric strong,
.metric.highlight strong {
  font-size: 40px;
  color: var(--ink);
  margin: 2px 0 0;
  font-weight: 800;
  letter-spacing: -1px;
}
.estimate-card #estimate-admin-actions h3,
.estimate-card #estimate-admin-actions > p,
.metric small {
  display: none;
}
.metric:hover {
  background: #e8f1f7;
}
.btn,
input,
select,
textarea {
  border-radius: 5px;
  min-height: 42px;
  font-size: 14px;
}
.btn {
  padding: 10px 17px;
  font-weight: 600;
  box-shadow: none;
}
.primary {
  background: #14abe1;
  border: 1px solid #14abe1;
  color: #fff;
}
.primary:hover {
  background: #008bc6;
  border-color: #008bc6;
  color: #fff;
}
.secondary {
  background: #fff;
  color: #008fd2;
  border: 1px solid #91bcd4;
}
.secondary:hover {
  background: #edf8ff;
  color: #0073ad;
  border-color: #009bde;
}
.small {
  font-size: 13px;
  min-height: 34px;
  padding: 5px 9px;
}
.btn.danger,
.danger {
  background: #fff0f0;
  color: #c72b40;
  border-color: #e9bfc5;
}
.text-link {
  color: #008fda;
  font-size: 14px;
}
input,
select,
textarea {
  background: #fff;
  color: var(--ink);
  border: 1px solid #cad7e3;
  margin-top: 5px;
  padding: 9px 11px;
}
input::placeholder,
textarea::placeholder {
  color: #8191a7;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #009dde;
  outline: 2px solid #9dddf4;
  outline-offset: 1px;
}
input[readonly] {
  background: #f0f5f9;
  color: #536b80;
}
.filters {
  padding: 8px 20px 18px;
  gap: 14px;
  align-items: center;
}
#ticket-header-actions label,
.expense-row-actions form,
.filters input,
.filters select,
.profit-filter label {
  margin: 0;
}
.table-wrap {
  overflow: auto;
}
td strong {
  font-weight: 600;
  font-size: 14px;
}
td small {
  font-size: 12px;
  color: #7b8eab;
  margin-top: 2px;
}
tbody tr:nth-child(even) {
  background: #fff;
}
tbody tr:hover {
  background: #f7fbfd;
}
.ticket-number {
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}
.device-cell {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 160px;
}
.device-cell .ui-icon {
  width: 24px;
  height: 24px;
}
.customer-strip > div,
.estimate-card h2,
.table-foot {
  display: flex;
  align-items: center;
  gap: 12px;
}
.table-foot {
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 18px;
  justify-content: space-between;
  color: #65768e;
  font-size: 13px;
}
.table-foot nav {
  display: flex;
  gap: 8px;
}
.page-number {
  padding: 7px 12px;
  color: #163250;
  border-radius: 3px;
}
.page-number.active {
  background: #c3eaf9;
}
.dashboard-status {
  gap: 10px;
}
.dashboard-status select {
  min-width: 165px;
  font-size: 12px;
  min-height: 37px;
  padding: 6px;
}
.dashboard-status .btn {
  background: 0 0;
  border: 0;
  color: #0099d8;
  padding: 5px 0;
  font-size: 12px;
}
.badge,
.tami-approval {
  font-size: 11px;
  font-weight: 400;
  border-radius: 3px;
  padding: 3px 8px;
}
.badge {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  background: #eaf0f5;
  color: #405675;
}
.status-diagnosi {
  color: #946300;
  background: #fff2cb;
}
.status-lavorazione {
  color: #0879be;
  background: #e4f4ff;
}
.status-ricambi {
  color: #c44532;
  background: #ffebe4;
}
.status-approvazione {
  color: #713fbd;
  background: #f1e7ff;
}
.status-consegnato,
.status-pronto {
  color: #117c50;
  background: #dff6e9;
}
.status-non_riparabile {
  color: #b02e44;
  background: #ffe7ec;
}
.notice {
  color: #176647;
  background: #e7f7ef;
  border-color: #bbe4ce;
}
.error {
  color: #a52a3c;
  background: #fff0f2;
  border-color: #f2c0c8;
}
.check-row,
.history-item,
.info-block {
  border-color: var(--line);
}
details summary {
  color: #344d69;
}
.corrections summary {
  color: #008dca;
}
.section-nav {
  background: 0 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0;
  gap: 20px;
  border-radius: 0;
}
.breadcrumb {
  display: flex;
  gap: 15px;
  font-size: 13px;
  color: #5d7190;
  margin: -7px 0 12px;
}
.ticket-heading {
  margin-bottom: 20px;
}
.ticket-heading h1 {
  font-size: 40px;
}
.ticket-heading p {
  font-size: 17px;
}
.customer-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 17px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  gap: 25px;
}
.customer-strip > div {
  gap: 22px;
  border-right: 1px solid #d4e0ea;
  padding-right: 14px;
  min-width: 0;
}
.customer-strip strong {
  font-size: 15px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.customer-strip small {
  font-size: 13px;
  margin-top: 2px;
}
.customer-strip .ui-icon {
  width: 30px;
  height: 30px;
}
.ticket-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
  margin-bottom: 20px;
  overflow: auto;
}
.ticket-tabs a {
  padding: 12px 14px 14px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  color: #354a69;
}
.ticket-tabs a.active {
  border-color: #00a2df;
  color: #0099dc;
  font-weight: 500;
}
.detail-layout {
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 20px;
  align-items: start;
}
.detail-main,
.detail-side,
.ticket-tab-panel {
  min-width: 0;
}
.detail-side .form-panel {
  padding: 20px;
}
.detail-side .form-panel > h2 {
  font-size: 20px;
}
.estimate-card h2 {
  border: 0 !important;
  margin-bottom: 4px !important;
}
.estimate-amount {
  display: block;
  font-size: 30px;
  letter-spacing: -1px;
}
.estimate-amount,
.estimate-card > p,
.estimate-card > small {
  text-align: center;
}
.estimate-card > p {
  margin: 10px 0 20px;
}
.estimate-card .btn {
  width: 100%;
  margin: 5px 0;
}
.estimate-card #estimate-admin-actions {
  border: 0;
  padding: 0;
  margin: 0;
}
.detail-side .eyebrow {
  display: none;
}
.detail-side .timeline {
  max-height: 340px;
  overflow: auto;
}
.detail-side .hint {
  font-size: 12px;
}
#spese-pratica .expense-title,
#ticket-header-actions {
  display: flex;
  gap: 14px;
  align-items: center;
}
#ticket-header-actions select {
  min-width: 180px;
  margin: 0;
}
#spese-pratica .expense-title {
  gap: 18px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
#spese-pratica .expense-title h2 {
  margin: 0;
  white-space: nowrap;
}
#spese-pratica .expense-title small {
  font-size: 11px;
}
.expense-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.expense-metrics > div {
  border-right: 1px solid var(--line);
  color: #5c7191;
  font-size: 13px;
}
.expense-metrics strong {
  color: var(--ink);
  letter-spacing: -0.7px;
}
.expense-metrics .positive {
  color: #088947;
}
.expense-time {
  background: var(--bg);
  border-radius: 5px;
  padding: 11px 15px;
  font-size: 13px;
  color: #536987;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.expense-time strong {
  color: #132440;
}
.expense-cost-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 22px 0 16px;
}
.expense-cost-head h3,
.margin-chart h3,
.profit-table h2 {
  font-size: 21px;
  margin: 0;
}
.expense-row-actions {
  display: flex;
  gap: 15px;
  align-items: center;
}
.expense-row-actions button {
  color: #d83a44;
  background: 0 0;
  border: 0;
}
.expense-editor {
  background: var(--bg);
  padding: 16px;
  border-radius: 6px;
  margin: 16px 0;
}
.expense-editor summary {
  font-weight: 600;
  color: #0095d5;
  margin-bottom: 10px;
}
.expense-editor .grid {
  gap: 12px;
}
.expense-foot {
  font-size: 12px;
  color: #6f83a2;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin: 16px 0 0;
}
.profit-metrics .metric {
  padding: 0 30px;
}
.profit-filter {
  display: flex;
  align-items: center;
  gap: 10px;
}
.profit-filter input,
.profit-filter select {
  margin: 0;
  max-width: 180px;
}
.profit-note {
  background: #e5f4ff;
  border: 1px solid #cde9fa;
  border-radius: 6px;
  padding: 13px 18px;
  color: #42698f;
  margin-bottom: 20px;
  font-size: 14px;
}
.margin-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 0 0 20px;
}
.margin-chart {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0;
  min-width: 0;
}
.margin-chart h3 {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.margin-chart-scroll {
  padding: 12px 18px;
}
.margin-chart-svg {
  display: block;
  width: 100%;
  min-width: 430px;
  height: auto;
}
.margin-charts-note {
  display: none;
}
.profit-table h2 {
  padding: 13px 18px;
}
.positive {
  color: #07874d;
}
.negative {
  color: #d92c45;
}
.profit-legacy {
  margin-top: 28px;
}
.profit-legacy summary {
  font-weight: 600;
  padding: 10px;
}
.empty-icon {
  background: #e9f4fb;
  color: #0099d9;
}
.empty p {
  color: #6b8096;
}
.customer-result,
.document-send,
.pin {
  background: #f0f6fb;
  color: #193b5b;
}
.customer-result:hover {
  background: #e0f3ff;
}
.lab-json,
.wh-invoice-row,
.wh-text {
  background: #f4f8fc;
  color: #183951;
  border-color: var(--line);
}
.lab-overview {
  color: #567088;
}
.wh-job,
.wh-pricing {
  background: #fff;
  border-color: var(--line);
}
.wh-price-preview {
  background: #edf8f5;
  color: #1d6b56;
}
.wh-alert {
  color: #a5650c;
}
.tami-diag-hero {
  background: #eaf6fc;
  border-color: #c9e2ee;
}
.tami-diag-hero p,
.tami-diag-row p {
  color: #617b8e;
}
.tami-diag-kicker {
  color: #007fbd;
}
.tami-diag-row {
  background: #fff;
  border-color: var(--line);
}
.ds-comparison,
.ds-rating strong,
.ds-summary {
  color: #193b54;
}
.ds-card,
.ds-item,
.ds-stat {
  background: #fff;
  color: #193b54 !important;
  border-color: #d2e1eb !important;
}
.ds-card p,
.ds-card small,
.ds-disk small,
.ds-footnote,
.ds-meta,
.ds-unrated {
  color: #647c91;
}
.ds-banner {
  background: #eaf5fc !important;
  color: #254963 !important;
  border-color: #c4dfed !important;
}
.ds-disk,
.ds-temperature {
  background: var(--bg);
  color: #254963;
  border-color: #d2e1eb;
}
.ds-banner.ds-ok {
  background: #e9f8ee !important;
  color: #196240 !important;
}
.ds-banner.ds-warning {
  background: #fff6df !important;
  color: #795318 !important;
}
.ds-banner.ds-problem {
  background: #fff0f0 !important;
  color: #9e3446 !important;
}
.ds-ok .ds-status {
  color: #127143;
}
.ds-warning .ds-status {
  color: #976708;
}
.ds-problem .ds-status {
  color: #ac3042;
}
.ds-stars {
  color: #b17b06;
}
.public-shell {
  background: var(--bg);
  color: var(--ink);
}
.login-card,
.public-shell .login-card,
.public-shell .panel {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}
.public-brand .brand-logo {
  filter: none;
  width: 240px;
}
.dialog,
.modal {
  background: #fff;
  color: var(--ink);
}
@media (min-width: 851px) and (max-width: 1250px) {
  .sidebar {
    width: 225px;
  }
  .workspace {
    margin-left: 225px;
  }
  .sidebar .brand-logo {
    width: 187px;
  }
  .sidebar nav a {
    padding: 14px 20px;
    gap: 16px;
  }
  .topbar-date {
    display: none;
  }
  .content {
    padding: 24px 20px;
  }
  .metric {
    padding: 0 22px;
  }
  .detail-layout {
    grid-template-columns: minmax(0, 1fr) 250px;
  }
  .expense-title,
  .profit-filter {
    flex-wrap: wrap;
  }
  .profit-metrics .metric {
    padding: 0 15px;
  }
  .page-heading p {
    font-size: 16px;
  }
}
@media (max-width: 850px) {
  .sidebar {
    position: static;
    width: 100%;
    padding: 10px 16px;
    overflow: visible;
    display: block;
  }
  .sidebar-header {
    padding: 0;
  }
  .sidebar .brand {
    justify-content: flex-start;
  }
  .sidebar .brand-logo {
    width: 170px;
    max-height: 65px;
  }
  .nav-toggle {
    display: flex;
    color: #fff;
    background: var(--nav-hover);
    border-color: #567080;
  }
  .sidebar nav {
    display: flex;
    background: var(--nav-bg);
  }
  .sidebar nav a {
    min-height: 46px;
    padding: 12px 16px;
  }
  .sidebar .settings-submenu {
    margin-top: 12px;
  }
  .sidebar-bottom {
    display: none;
  }
  .workspace {
    margin: 0;
  }
  .topbar {
    height: auto;
    min-height: 65px;
    padding: 12px 16px;
    display: flex;
    gap: 12px;
  }
  .topbar-date {
    display: none;
  }
  .account-menu {
    padding-left: 12px;
  }
  .account-menu summary {
    font-size: 0;
  }
  #ticket-header-actions,
  .global-search {
    width: 100%;
  }
  .global-search input {
    font-size: 14px;
  }
  .content {
    padding: 22px 16px 32px;
  }
  .ticket-heading h1,
  h1 {
    font-size: 30px;
  }
  .page-heading p {
    font-size: 15px;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
    gap: 18px 0;
  }
  .metric {
    padding: 0 20px;
  }
  .metric strong {
    font-size: 32px;
  }
  .metric:nth-child(2) {
    border: 0;
  }
  .metric:nth-child(3) {
    padding-left: 5px;
  }
  .detail-layout {
    grid-template-columns: 1fr;
  }
  .detail-side {
    display: block;
  }
  .customer-strip {
    gap: 14px;
    padding: 15px;
  }
  .customer-strip > div {
    gap: 10px;
  }
  .customer-strip strong {
    font-size: 12px;
  }
  .customer-strip small {
    font-size: 11px;
  }
  .customer-strip .ui-icon {
    width: 22px;
    height: 22px;
  }
  .ticket-tabs {
    gap: 5px;
  }
  .ticket-tabs a {
    padding: 12px 10px;
  }
  .ticket-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .ticket-heading p {
    font-size: 14px;
  }
  #ticket-header-actions select {
    min-width: 0;
    width: 100%;
  }
  #ticket-header-actions label {
    flex: 1;
  }
  .margin-charts {
    grid-template-columns: 1fr;
  }
  .profit-filter {
    flex-wrap: wrap;
    gap: 8px;
  }
  .page-heading {
    flex-wrap: wrap;
  }
  .profit-metrics .metric {
    padding: 0 15px;
  }
  .admin-shell .form-panel > .panel-heading,
  .admin-shell .form-panel > h2 {
    margin: -20px -20px 16px;
    padding: 15px 20px;
  }
  .btn,
  .dashboard-status select {
    min-height: 44px;
  }
  .section-nav {
    flex-wrap: nowrap;
  }
  .grid.two {
    gap: 14px;
  }
  input,
  select,
  textarea {
    font-size: 16px;
  }
  .settings-links a {
    min-height: 44px !important;
  }
}
@media (max-width: 560px) {
  .account-menu {
    display: none;
  }
  .page-heading {
    display: flex;
  }
  .page-heading > .btn {
    margin: 0;
  }
  .customer-strip {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .customer-strip > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding-bottom: 10px;
  }
  .customer-strip > div:last-child {
    padding: 0;
  }
  .customer-strip strong,
  .page-heading p {
    font-size: 14px;
  }
  .customer-strip small {
    font-size: 12px;
  }
  .expense-title {
    flex-wrap: wrap;
    gap: 8px !important;
  }
  .expense-metrics {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .expense-metrics > div {
    border: 0;
    border-bottom: 1px solid var(--line);
    padding-bottom: 10px;
  }
  .expense-cost-head {
    gap: 10px;
  }
  .expense-cost-head h3 {
    font-size: 18px;
  }
  .table-foot {
    flex-wrap: wrap;
  }
  .form-panel {
    padding: 20px;
  }
  .profit-filter input,
  .profit-filter select {
    max-width: 100%;
    width: 100%;
  }
  .profit-filter label {
    flex: 1;
    min-width: 120px;
  }
  .ticket-tabs {
    margin-left: -5px;
    margin-right: -5px;
  }
  .btn,
  .global-search input {
    font-size: 13px;
  }
  .global-search .ui-icon {
    width: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  :after,
  :before {
    animation: none !important;
    transition: none !important;
  }
}
@media print {
  .sidebar,
  .ticket-tabs,
  .topbar {
    display: none !important;
  }
  .workspace {
    margin: 0;
  }
  .ticket-tab-panel[hidden] {
    display: block !important;
  }
  .panel {
    break-inside: avoid;
  }
  .content {
    padding: 0;
  }
}
@font-face {
  font-family: TamiRoboto;
  src: url(roboto-variable.ttf) format("truetype");
  font-weight: 100 900;
  font-display: swap;
}
.margin-chart-svg {
  font-family: TamiRoboto, Arial, sans-serif;
}
.metric strong {
  display: flex;
  align-items: center;
  gap: 28px;
}
.metric strong .ui-icon {
  width: 27px;
  height: 27px;
  opacity: 0.65;
}
.metric:nth-child(2) .ui-icon {
  filter: invert(71%) sepia(85%) saturate(1700%) hue-rotate(354deg);
}
.metric:nth-child(3) .ui-icon {
  filter: invert(44%) sepia(81%) saturate(1600%) hue-rotate(330deg);
}
.metric:nth-child(4) .ui-icon {
  filter: invert(62%) sepia(75%) saturate(800%) hue-rotate(100deg);
}
.metric:nth-child(3) strong {
  color: var(--ink) !important;
}
.ticket-tabs a {
  font-weight: 400;
  font-size: 16px;
}
.btn .ui-icon {
  width: 17px;
  height: 17px;
}
.primary .ui-icon {
  filter: invert(1);
}
.secondary .ui-icon {
  filter: invert(50%) sepia(83%) saturate(1600%) hue-rotate(161deg);
}
.device-cell .ui-icon {
  opacity: 0.65;
}
td .tami-approval {
  display: table;
  margin-top: 4px;
  white-space: nowrap;
}
td:has(.tami-approval) {
  min-width: 125px;
}
.dashboard-status {
  min-width: 210px;
}
.dashboard-status select {
  width: 180px;
  max-width: 180px;
}
.expense-editor .grid {
  grid-template-columns: 1.3fr 2fr 1fr 1.2fr;
}
.expense-editor .hint {
  font-size: 11px;
  margin: 10px 0;
}
.expense-editor label {
  font-size: 12px;
  margin-bottom: 0;
}
.expense-extra {
  margin: 8px 0 12px;
  font-size: 12px;
}
.expense-extra summary {
  font-size: 12px;
}
.expense-extra[open] {
  display: block;
}
.expense-editor input,
.expense-editor select {
  font-size: 13px;
}
.expense-row-actions .ui-icon {
  width: 17px;
  height: 17px;
  filter: invert(34%) sepia(80%) saturate(800%) hue-rotate(320deg);
}
.side-documents {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 22px;
}
.side-documents h2 {
  margin-bottom: 18px;
  font-size: 20px;
}
.side-documents .full {
  background: 0 0;
  color: #0095da;
  border: 0;
  text-align: left;
  justify-content: flex-start;
  padding: 8px 0;
  font-weight: 400;
  margin-top: 0;
}
.side-documents > p {
  padding: 8px 0;
  margin: 0;
}
.access-details {
  margin-top: 16px;
  font-size: 12px;
}
.access-details summary {
  font-size: 12px;
  color: #617c94;
}
.access-details .btn {
  font-size: 12px;
}
.estimate-card .side-documents .btn {
  width: auto;
}
.estimate-card .side-documents > h2 {
  padding: 0 !important;
  margin: 0 0 18px !important;
}
.expense-time strong {
  padding-left: 6px;
}
.profit-table .table-wrap td:last-child,
.profit-table .table-wrap th:last-child {
  display: none;
}
.profit-table td {
  padding-top: 17px;
  padding-bottom: 17px;
}
.detail-side .estimate-card {
  margin-bottom: 20px;
}
.status-control-diagnosi select {
  border-left-color: #ffbf2e;
}
.status-control-ricambi select {
  border-left-color: #f46b59;
}
.status-control-lavorazione select {
  border-left-color: #189bf3;
}
.status-control-pronto select {
  border-left-color: #2cbe79;
}
.status-control-approvazione select {
  border-left-color: #9864ec;
}
@media (max-width: 850px) {
  .expense-editor .grid {
    grid-template-columns: 1fr 1fr;
  }
  .metric strong {
    gap: 16px;
  }
}
@media (max-width: 560px) {
  .expense-editor .grid {
    grid-template-columns: 1fr;
  }
  .metric strong .ui-icon {
    width: 22px;
    height: 22px;
  }
}
.sidebar .brand-logo {
  height: 90px;
  object-fit: contain;
}
.customer-strip {
  margin-bottom: 10px;
}
#spese-pratica td {
  padding: 9px 12px;
}
#spese-pratica th {
  padding: 12px;
}
.expense-row-actions .btn {
  min-height: 34px;
  padding: 5px;
}
.expense-metrics > div {
  position: relative;
  min-height: 62px;
}
.expense-metrics strong {
  line-height: 1.2;
  margin-top: 4px;
  display: inline-block;
  vertical-align: middle;
  font-size: 34px;
}
.expense-metrics .margin-percent {
  display: inline-block;
  border-radius: 4px;
  background: #d9f6e8;
  color: #07874d;
  font-size: 13px;
  padding: 4px 7px;
}
.expense-metrics:has(.margin-percent) {
  align-items: start;
}
.expense-time {
  margin-top: 8px;
}
.topbar .ui-icon {
  opacity: 0.7;
}
.dashboard-status select {
  font-family: inherit;
  border-left: 1px solid #cad7e3;
  padding-left: 27px;
}
.profit-metrics .metric span {
  font-size: 15px;
}
@media (min-width: 851px) and (max-width: 1450px) {
  [data-page="dashboard"] td,
  [data-page="dashboard"] th {
    padding-left: 10px;
    padding-right: 10px;
  }
  [data-page="dashboard"] .dashboard-status {
    min-width: 190px;
  }
  [data-page="dashboard"] .device-cell {
    min-width: 140px;
    gap: 8px;
  }
  [data-page="dashboard"] .tami-approval,
  [data-page="dashboard"] td {
    white-space: normal;
  }
  [data-page="dashboard"] td:nth-child(6) {
    min-width: 115px;
  }
  [data-page="dashboard"] td:nth-child(2) {
    min-width: 85px;
  }
}
.sidebar .brand-logo {
  padding: 6px 10px;
}
.dashboard-status {
  position: relative;
}
.dashboard-status > .ui-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  pointer-events: none;
  filter: invert(68%) sepia(10%) saturate(500%) hue-rotate(170deg);
}
.status-control-diagnosi > .ui-icon {
  filter: invert(78%) sepia(95%) saturate(1523%) hue-rotate(345deg);
}
.status-control-ricambi > .ui-icon {
  filter: invert(45%) sepia(89%) saturate(1000%) hue-rotate(330deg);
}
.status-control-lavorazione > .ui-icon {
  filter: invert(48%) sepia(88%) saturate(2400%) hue-rotate(177deg);
}
.status-control-pronto > .ui-icon {
  filter: invert(59%) sepia(59%) saturate(594%) hue-rotate(102deg);
}
.status-control-approvazione > .ui-icon {
  filter: invert(45%) sepia(73%) saturate(1900%) hue-rotate(232deg);
}
.table-wrap td .text-link .ui-icon {
  height: 14px;
  width: 14px;
  vertical-align: middle;
  margin-left: 8px;
  filter: invert(44%) sepia(94%) saturate(1500%) hue-rotate(163deg);
}
.ticket-number {
  font-size: 14px;
}
@media (min-width: 851px) and (max-width: 1450px) {
  [data-page="dashboard"] .ticket-number,
  [data-page="dashboard"] td,
  [data-page="dashboard"] td strong {
    font-size: 13px;
  }
  [data-page="dashboard"] .dashboard-status select {
    width: 165px;
    min-width: 165px;
  }
  [data-page="dashboard"] td .text-link .ui-icon {
    display: none;
  }
}
.expense-metrics .expense-label {
  display: block;
  margin-bottom: 5px;
}
.expense-metrics .margin-percent {
  margin: 0 0 0 12px;
  vertical-align: middle;
}
.expense-metrics {
  margin-bottom: 16px;
}
.expense-cost-head {
  margin-top: 20px;
}
.expense-title h2 {
  font-size: 24px;
}
.expense-title small {
  display: flex;
  align-items: center;
  gap: 8px;
}
.expense-title .ui-icon {
  width: 18px;
  height: 18px;
  opacity: 0.6;
}
.profit-metrics .metric strong {
  font-size: 38px;
  white-space: nowrap;
}
.expense-editor > summary {
  display: none;
}
.expense-editor form {
  display: grid;
  grid-template-columns: 2fr 1.1fr 1fr 1.1fr auto;
  align-items: end;
  gap: 10px;
}
.expense-editor .grid {
  display: contents;
}
.expense-editor label:has([name="expense_description"]) {
  order: 1;
}
.expense-editor label:has([name="expense_kind"]) {
  order: 2;
}
.expense-editor label:has([name="expense_amount"]) {
  order: 3;
}
.expense-editor label:has([name="expense_basis"]) {
  order: 4;
}
.expense-editor form > .btn {
  order: 5;
  padding: 9px 12px;
  white-space: nowrap;
}
.expense-editor form > .expense-extra {
  order: 6;
  grid-column: 1/-1;
  margin-bottom: 0;
}
.expense-editor form > .text-link {
  order: 7;
}
.expense-extra[open] label {
  display: block;
  margin-top: 12px;
}
.dashboard-ui-ready .dashboard-panel .filters > .btn {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.dashboard-ui-ready .dashboard-panel .filters > .btn:focus {
  position: static;
  width: auto;
  height: auto;
  clip: auto;
  min-height: 42px;
  padding: 9px 14px;
}
.dashboard-panel .filters .completed-link {
  margin-left: auto;
  white-space: nowrap;
}
.dashboard-panel .filters .search-label {
  flex: 1;
}
.dashboard-panel .filters select {
  min-width: 250px;
}
.dashboard-panel .table-foot .csv-link {
  margin-left: auto;
  font-size: 12px;
}
.dashboard-panel .table-foot nav {
  order: 3;
}
.dashboard-panel .panel-heading {
  padding-bottom: 8px;
}
.dashboard-panel td {
  padding-top: 13px;
  padding-bottom: 13px;
}
.dashboard-panel .filters {
  padding-top: 8px;
}
.side-documents h2 {
  display: flex;
  align-items: center;
  gap: 12px;
}
@media (max-width: 1250px) {
  .profit-metrics .metric strong {
    font-size: 27px;
  }
  .expense-editor form {
    grid-template-columns: 1fr 1fr;
  }
  .expense-editor form > .btn {
    grid-column: 1/-1;
  }
  .dashboard-panel .filters select {
    min-width: 190px;
  }
}
@media (max-width: 850px) {
  .expense-metrics strong {
    font-size: 30px;
  }
  .expense-title h2 {
    font-size: 21px;
  }
  .dashboard-panel .filters .completed-link {
    margin: 5px 0;
  }
  .dashboard-panel .filters select {
    min-width: 0;
  }
  .dashboard-panel .filters > .btn {
    position: static !important;
    width: auto !important;
    height: auto !important;
    min-height: 44px !important;
    clip: auto !important;
    padding: 9px 14px !important;
  }
}
@media (max-width: 560px) {
  .expense-editor form {
    grid-template-columns: 1fr;
  }
  .profit-metrics .metric strong {
    font-size: 22px;
  }
}
.profit-range .profit-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: end;
  gap: 12px;
}
.profit-range .profit-filter label {
  min-width: 150px;
  flex: 1;
}
.profit-range .profit-filter input,
.profit-range .profit-filter select {
  width: 100%;
  max-width: 100%;
}
.profit-range .hint {
  margin-bottom: 0;
}
.admin-shell .intake-fast {
  max-width: 1120px;
}
.admin-shell .intake-fast .form-panel {
  padding: 20px 24px;
  margin-bottom: 14px;
}
.admin-shell .intake-fast h2 {
  margin: 0 0 14px;
}
.admin-shell .intake-fast .grid {
  gap: 12px;
}
.admin-shell .intake-fast label {
  margin-bottom: 10px;
}
.admin-shell .intake-fast textarea {
  min-height: 66px;
}
.admin-shell .intake-device-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
  margin-bottom: 12px;
}
.admin-shell .intake-device-picker > [data-device-results],
.admin-shell .intake-device-picker > [data-device-selected] {
  grid-column: 1/-1;
}
.admin-shell .intake-device-picker > [data-device-clear] {
  justify-self: start;
}
.admin-shell .intake-fast .intake-details {
  border-top: 1px solid #e4eaf0;
  margin-top: 8px;
  padding-top: 10px;
}
.admin-shell .intake-details summary {
  cursor: pointer;
  font-weight: 600;
  min-height: 32px;
  padding: 4px 0;
}
.admin-shell .intake-details[open] summary {
  margin-bottom: 12px;
}
.admin-shell .intake-suggestions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: -2px 0 16px;
}
.admin-shell .intake-suggestions .btn {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 13px;
}
.admin-shell .intake-submit {
  position: sticky;
  bottom: 8px;
  z-index: 8;
  background: #fff;
  border: 1px solid #dbe5ee;
  border-radius: 12px;
  padding: 12px 18px;
  box-shadow: 0 4px 18px #132a4412;
}
.admin-shell .intake-submit .hint {
  margin: 0 0 8px;
}
.admin-shell .intake-submit .form-actions {
  margin: 0;
}
.admin-shell .intake-fast :is(button, input, textarea, select, summary):focus-visible {
  outline: 3px solid #1396b8;
  outline-offset: 3px;
}
@media (max-width: 760px) {
  .admin-shell .intake-fast .form-panel {
    padding: 16px;
  }
  .admin-shell .intake-device-picker {
    grid-template-columns: 1fr;
  }
  .admin-shell .intake-submit {
    position: static;
  }
  .admin-shell .intake-submit .btn {
    width: 100%;
  }
}
.quote-row {
  border: 1px solid #dce5ee;
  border-radius: 10px;
  padding: 16px;
  margin: 0 0 16px;
}
.quote-row legend {
  font-weight: 700;
  padding: 0 8px;
}

/* ==========================================================================
   1.7.18 — Fase 1 dell'aggiornamento interfaccia
   ========================================================================== */

/* 1.2 Menu laterale raggruppato */
.sidebar nav .nav-group {
  padding: 14px 26px 4px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8ba3b5;
}
.sidebar nav .nav-group:first-child {
  padding-top: 4px;
}
.sidebar-header {
  padding-bottom: 12px;
}
.sidebar .brand-logo {
  width: 200px;
}
.sidebar nav a {
  min-height: 40px;
  padding: 8px 22px 8px 26px;
  gap: 18px;
}
.sidebar nav a span {
  font-size: 14.5px;
}
.sidebar .ui-icon {
  width: 20px;
  height: 20px;
}
.nav-count {
  margin-left: auto;
  min-width: 24px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #2c4556;
  color: #d3e5f1;
  font-size: 11.5px;
  font-style: normal;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.sidebar nav a.active .nav-count {
  background: var(--nav-accent);
  color: var(--nav-bg);
}
.nav-count-alert,
.sidebar nav a.active .nav-count-alert {
  background: #e8590c;
  color: #fff;
}
.sidebar .settings-submenu {
  margin: 18px 20px 0;
  padding-top: 8px;
}
.sidebar .settings-submenu > summary {
  padding: 10px 6px;
  gap: 18px;
}
.sidebar-bottom {
  padding-top: 24px;
}
@media (min-width: 851px) and (max-width: 1250px) {
  .sidebar nav a {
    padding: 9px 16px 9px 20px;
    gap: 14px;
  }
  .sidebar nav .nav-group {
    padding-left: 20px;
  }
}
@media (max-width: 850px) {
  .sidebar nav a {
    min-height: 46px;
    padding: 11px 16px;
  }
  .sidebar nav .nav-group {
    padding: 14px 16px 4px;
  }
}

/* 1.5 Laboratorio: righe compatte e avvisi leggibili */
.lab-table td {
  padding-top: 10px;
  padding-bottom: 10px;
  vertical-align: middle;
}
.lab-table .lab-device {
  display: block;
  font-weight: 600;
}
.lab-table td small {
  margin-top: 1px;
}
.lab-table td:last-child {
  white-space: normal;
}
.lab-alert {
  display: inline-block;
  margin: 2px 6px 2px 0;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  white-space: nowrap;
}
.lab-alert-warn {
  background: #fff1c9;
  color: #7a5200;
}
.lab-alert-late {
  background: #fde4e1;
  color: #a1281b;
}
.lab-alert-info {
  background: #eef2f6;
  color: var(--muted);
}

/* Laboratorio: casella di ricerca più larga */
.lab-board .filters label {
  flex: 1 1 320px;
  max-width: 560px;
}

/* 1.3 Elenchi a schede su telefono e tablet stretto */
@media (max-width: 760px) {
  .filters {
    flex-wrap: wrap;
    align-items: stretch;
    padding-left: 16px;
    padding-right: 16px;
  }
  .filters > label,
  .filters .search-label,
  .dashboard-panel .filters > label,
  .dashboard-panel .filters .search-label {
    flex: 1 1 100%;
    max-width: none;
    width: 100%;
  }
  .filters select,
  .filters input {
    width: 100%;
  }
  .filters > .btn {
    flex: 1 1 auto;
  }
  .table-wrap:has(> .cards-sm) {
    overflow: visible;
  }
  table.cards-sm,
  table.cards-sm tbody {
    display: block;
    width: 100%;
    min-width: 0;
  }
  table.cards-sm thead {
    display: none;
  }
  table.cards-sm tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
  }
  table.cards-sm tr:last-child {
    border-bottom: 0;
  }
  table.cards-sm td {
    display: block;
    padding: 0;
    border: 0;
    min-width: 0;
    white-space: normal;
    background: none;
  }
  table.cards-sm td.card-head {
    grid-column: 1;
    grid-row: 1;
    font-size: 13px;
  }
  table.cards-sm td.card-actions,
  table.cards-sm td.card-check {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: start;
  }
  table.cards-sm td.card-title {
    grid-column: 1 / -1;
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
  }
  table.cards-sm td[data-label]:not(.card-head):not(.card-title) {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 10px;
  }
  table.cards-sm td[data-label]:not(.card-head):not(.card-title)::before {
    content: attr(data-label);
    flex: 0 0 84px;
    font-size: 12px;
    color: var(--muted);
  }
  table.cards-sm td small {
    display: inline;
  }
  table.cards-sm td[data-label] > small::before {
    content: " · ";
  }
  table.cards-sm td.card-title > small,
  table.cards-sm td.card-head > small {
    display: block;
    font-weight: 400;
  }
  table.cards-sm td.card-title > small::before,
  table.cards-sm td.card-head > small::before {
    content: none;
  }
  table.cards-sm td[colspan] {
    grid-column: 1 / -1;
  }
  table.customers-table td.card-title {
    grid-column: 1;
    grid-row: 1;
  }
  table.customers-table td.card-actions {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-self: stretch;
  }
  .customers-table .customer-list-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: center;
  }
  .dash-table .device-cell {
    gap: 8px;
  }
  table.dash-table .device-cell small {
    display: block;
  }
  .dash-table .dashboard-status {
    flex: 1 1 200px;
  }
  .dashboard-panel .filters .completed-link {
    margin-left: 0;
  }
  .table-foot {
    flex-wrap: wrap;
    gap: 10px;
  }
}

/* 1.4 Scheda riparazione su telefono: preventivo e documenti subito dopo l'intestazione */
@media (max-width: 850px) {
  .content[data-page="ticket"] {
    display: flex;
    flex-direction: column;
  }
  .content[data-page="ticket"] > .detail-layout,
  .content[data-page="ticket"] > .detail-layout > .detail-side {
    display: contents;
  }
  .content[data-page="ticket"] .estimate-card {
    order: 1;
  }
  .content[data-page="ticket"] > .ticket-tabs {
    order: 2;
  }
  .content[data-page="ticket"] .detail-main {
    order: 3;
  }
  .content[data-page="ticket"] .detail-side > :not(.estimate-card) {
    order: 4;
  }
  .content[data-page="ticket"] > .danger-panel {
    order: 5;
  }
}

/* Correzione: stili prima scritti inline e bloccati dalla Content-Security-Policy */
.plain-fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.lic-expired {
  color: #c23c45;
}
.lic-soon {
  color: #ab6313;
}
.lic-ok {
  color: #24815d;
}

/* ==========================================================================
   1.7.19 — Aspetto più curato e nuova Dashboard
   ========================================================================== */

:root {
  --line: #e0e7ef;
  --line-soft: #edf1f6;
  --line-strong: #cbd6e2;
  --surface-2: #f8fafc;
  --radius-lg: 12px;
  --radius-md: 8px;
  --shadow-sm: 0 1px 2px rgba(16, 32, 58, 0.05);
  --shadow-md: 0 6px 18px rgba(16, 32, 58, 0.08);
  --ring: 0 0 0 3px rgba(0, 156, 223, 0.18);
  --ok: #12804f;
  --warn: #9a5b00;
  --bad: #c0341f;
}
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* Tipografia */
:where(.admin-shell) h1 {
  font-family: Manrope, TamiRoboto, Arial, sans-serif;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 0 0 6px;
}
:where(.admin-shell) .page-heading {
  margin-bottom: 22px;
  align-items: flex-end;
}
:where(.admin-shell) .page-heading p {
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}
:where(.admin-shell) .eyebrow {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 4px;
}
:where(.admin-shell) h2 {
  letter-spacing: -0.01em;
}
.admin-shell .panel-heading h2,
.admin-shell .form-panel > h2 {
  font-size: 17px;
  font-weight: 700;
}

.ticket-heading h1 {
  font-size: 30px;
}
@media (max-width: 850px) {
  :where(.admin-shell) h1,
  .ticket-heading h1 {
    font-size: 24px;
  }
}

/* Barra in alto */
.admin-shell .topbar {
  height: 64px;
  min-height: 64px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.admin-shell .global-search {
  background: var(--surface-2);
  border-color: var(--line);
  border-radius: var(--radius-md);
  max-width: 560px;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.admin-shell .global-search input {
  min-height: 40px;
}
.admin-shell .global-search:focus-within {
  outline: 0;
  background: var(--surface);
  border-color: var(--teal);
  box-shadow: var(--ring);
}
.admin-shell .account-menu {
  border-left-color: var(--line);
}

/* Menu laterale: voce attiva a pillola */
.admin-shell .sidebar nav a {
  margin: 1px 12px;
  padding-left: 14px;
  padding-right: 10px;
  border-left: 0;
  border-radius: var(--radius-md);
  transition: background 0.12s, color 0.12s;
}
.admin-shell .sidebar nav a:hover {
  background: rgba(255, 255, 255, 0.06);
}
.admin-shell .sidebar nav a.active {
  background: rgba(41, 183, 231, 0.16);
  box-shadow: inset 3px 0 0 var(--nav-accent);
}
.admin-shell .sidebar nav .nav-group {
  padding-left: 26px;
}
.admin-shell .sidebar .brand-logo {
  border-radius: 10px;
}

/* Pannelli */
:where(.admin-shell) .panel {
  border-color: var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.admin-shell .form-panel > h2,
.admin-shell .panel-heading {
  border-color: var(--line-soft);
}

/* Pulsanti */
:where(.admin-shell) .btn {
  border-radius: var(--radius-md);
  min-height: 40px;
  font-weight: 600;
  transition: background 0.12s, border-color 0.12s, box-shadow 0.12s, color 0.12s;
}
:where(.admin-shell) .primary {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
:where(.admin-shell) .primary:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
}
:where(.admin-shell) .secondary {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink);
}
:where(.admin-shell) .secondary:hover {
  background: var(--surface-2);
  border-color: #aebdcc;
  color: var(--ink);
}
:where(.admin-shell) .small {
  min-height: 32px;
  padding: 5px 12px;
  font-size: 13px;
}

/* Campi */
:where(.admin-shell) input:where(:not([type="checkbox"], [type="radio"], [type="hidden"], [type="file"], [type="color"])),
:where(.admin-shell) select,
:where(.admin-shell) textarea {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background-color: var(--surface);
  transition: border-color 0.12s, box-shadow 0.12s;
}
:where(.admin-shell) input:where(:not([type="checkbox"], [type="radio"], [type="hidden"], [type="file"], [type="color"])):focus,
:where(.admin-shell) select:focus,
:where(.admin-shell) textarea:focus {
  outline: 0;
  border-color: var(--teal);
  box-shadow: var(--ring);
}
:where(.admin-shell) input::placeholder,
:where(.admin-shell) textarea::placeholder {
  color: #8a9ab0;
}

/* Tabelle */
:where(.admin-shell) th {
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
:where(.admin-shell) td {
  border-bottom-color: var(--line-soft);
}
:where(.admin-shell) tbody tr {
  transition: background 0.1s;
}
:where(.admin-shell) tbody tr:hover {
  background: #f7fafd;
}
.admin-shell .ticket-number {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

/* Etichette di stato e preventivo */
:where(.admin-shell) .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  white-space: nowrap;
}
:where(.admin-shell) .badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.85;
}
:where(.admin-shell) .tami-approval {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 16px;
  white-space: nowrap;
}

/* Avvisi */
:where(.admin-shell) .notice,
:where(.admin-shell) .error {
  border-radius: var(--radius-md);
  border-width: 1px;
  border-style: solid;
  box-shadow: var(--shadow-sm);
}

/* ---------- Dashboard ---------- */
.dash-heading p strong {
  color: var(--ink);
}
.dash-heading .btn .ui-icon {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}
.dash-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.dash-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 18px 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.dash-tile::before {
  content: "";
  position: absolute;
  right: 18px;
  top: 19px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
}
.dash-tile:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.dash-tile.is-active {
  border-color: var(--teal);
  box-shadow: var(--ring);
}
.dash-tile-label {
  padding-right: 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.dash-tile strong {
  font-family: Manrope, TamiRoboto, Arial, sans-serif;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: #9aabbd;
}
.dash-tile small {
  font-size: 12px;
  color: var(--muted);
}
.dash-tile.has-items strong {
  color: var(--ink);
}
.dash-tile-late.has-items::before {
  background: #e0442f;
}
.dash-tile-late.has-items strong {
  color: var(--bad);
}
.dash-tile-ready.has-items::before {
  background: #1fae64;
}
.dash-tile-ready.has-items strong {
  color: var(--ok);
}
.dash-tile-approval.has-items::before {
  background: #e8a317;
}
.dash-tile-parts.has-items::before {
  background: var(--teal);
}

.dash-list {
  overflow: visible;
}
.dash-toolbar {
  display: flex;
  align-items: center;
  gap: 12px 16px;
  flex-wrap: wrap;
  padding: 16px 20px 12px;
}
.dash-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 320px;
  max-width: 520px;
  margin: 0;
}
.dash-search > .ui-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  opacity: 0.55;
  pointer-events: none;
}
:where(.admin-shell) .dash-search input#dash-q {
  flex: 1;
  margin: 0;
  min-height: 38px;
  padding: 7px 12px 7px 36px;
}
.dash-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 0 auto;
}
.dash-sort label {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}
:where(.admin-shell) .dash-sort select {
  margin: 0;
  min-height: 36px;
  padding: 6px 30px 6px 10px;
  width: auto;
}
.dash-toolbar > .text-link {
  font-size: 13px;
  white-space: nowrap;
}
.js .js-hide {
  display: none;
}
.dash-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 20px 16px;
  border-bottom: 1px solid var(--line);
}
.dash-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color 0.12s, background 0.12s;
}
.dash-chip b {
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.dash-chip:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}
.dash-chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.dash-chip.is-active b {
  color: #b8c8da;
}
.dash-chip-muted {
  color: var(--muted);
  border-style: dashed;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
  background: #8a99ab;
}
.status-dot.status-diagnosi {
  background: #e8b100;
}
.status-dot.status-approvazione {
  background: #9864ec;
}
.status-dot.status-ricambi {
  background: #f05a45;
}
.status-dot.status-lavorazione {
  background: #189bf3;
}
.status-dot.status-pronto {
  background: #22b66d;
}
.status-dot.status-non_riparabile {
  background: #c23c55;
}
.dash-filter-note {
  margin: 0;
  padding: 10px 20px;
  background: #f2f9fd;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink);
}
.dash-filter-note .text-link {
  font-size: 13px;
  margin-left: 4px;
}
.dash-table {
  width: 100%;
}
:where(.admin-shell) .dash-table th {
  padding: 10px 12px;
}
:where(.admin-shell) .dash-table td {
  padding: 10px 12px;
  vertical-align: middle;
  font-size: 13.5px;
}
.dash-table th:first-child,
.dash-table td:first-child {
  padding-left: 20px;
}
.dash-table th.num,
.dash-table td.num {
  text-align: right;
}
.dash-table .ticket-number {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.dash-table .device-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.dash-table .device-cell > .ui-icon {
  width: 20px;
  height: 20px;
  opacity: 0.7;
  flex: none;
}
.dash-table .device-cell > div {
  min-width: 0;
}
.dash-customer {
  display: block;
  font-weight: 600;
  color: var(--ink);
}
.dash-customer:hover {
  color: var(--teal-dark);
}
.dash-table .device-cell small {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 360px;
}
.dash-table .dashboard-status {
  display: flex;
  align-items: center;
  gap: 6px;
}
:where(.admin-shell) .dash-table .dashboard-status select {
  min-width: 0;
  width: 190px;
  min-height: 34px;
  padding: 5px 28px 5px 26px;
  font-size: 13px;
  margin: 0;
}
.save-on-change:not(.is-changed) > .btn {
  display: none;
}
.save-on-change.is-changed > .btn {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
.age {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--muted);
}
.age.age-warn {
  color: var(--warn);
  font-weight: 600;
}
.age.age-bad {
  color: var(--bad);
  font-weight: 700;
}
.due {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.due-late {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: #fde4e1;
  color: #a1281b;
  font-weight: 700;
  font-size: 12.5px;
  white-space: nowrap;
}
.dash-amount {
  display: block;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.dash-table tr.is-late td:first-child {
  box-shadow: inset 3px 0 0 #e0442f;
}
.row-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}
.row-open:hover,
tr:hover .row-open {
  background: #e8f4fb;
  color: var(--teal-dark);
}
.dash-list .table-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.pager {
  display: flex;
  gap: 4px;
}
.pager .page-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  color: var(--ink);
  font-weight: 600;
}
.pager .page-number.active {
  background: var(--ink);
  color: #fff;
}
.pager .page-number:not(.active):hover {
  background: var(--surface-2);
}
.page-gap {
  align-self: center;
  color: var(--muted);
}
.dash-list .empty {
  padding: 48px 20px;
  text-align: center;
}

/* Dashboard su schermi medi: meno colonne, niente scorrimento laterale */
@media (max-width: 1250px) {
  .dash-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dash-table th:nth-child(5),
  .dash-table td:nth-child(5) {
    display: none;
  }
  :where(.admin-shell) .dash-table .dashboard-status select {
    width: 170px;
  }
  .dash-table .device-cell small {
    max-width: 220px;
  }
  .dash-table .device-cell > .ui-icon {
    display: none;
  }
  :where(.admin-shell) .dash-table .dashboard-status select {
    width: 168px;
    font-size: 12.5px;
  }
  :where(.admin-shell) .dash-table th,
  :where(.admin-shell) .dash-table td {
    padding-left: 8px;
    padding-right: 8px;
  }
}
@media (max-width: 760px) {
  .dash-tiles {
    gap: 10px;
  }
  .dash-tile {
    padding: 12px 14px;
  }
  .dash-tile strong {
    font-size: 24px;
  }
  .dash-tile small {
    display: none;
  }
  .dash-toolbar {
    padding: 14px 16px 10px;
  }
  .dash-sort {
    margin-left: 0;
  }
  .dash-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0 16px 14px;
    scrollbar-width: none;
  }
  .dash-table td:nth-child(5) {
    display: flex;
  }
  .dash-table .device-cell small {
    max-width: none;
    white-space: normal;
  }
  .dash-table td:first-child {
    padding-left: 0;
  }
  :where(.admin-shell) .dash-table td {
    padding: 0;
  }
  .dash-table td.card-actions {
    display: none;
  }
  .dash-table td.num {
    text-align: left;
    justify-content: flex-start;
  }
  .dash-table .device-cell small {
    font-weight: 400;
  }
  .dash-table tr.is-late {
    box-shadow: inset 3px 0 0 #e0442f;
  }
  .dash-table tr.is-late td:first-child {
    box-shadow: none;
  }
  .dash-heading .btn {
    width: 100%;
  }
}

/* ==========================================================================
   1.7.20 — Scheda riparazione: percorso e prossimo passo
   ========================================================================== */
.js-only {
  display: none !important;
}
.js .js-only {
  display: inline-flex !important;
}
.ticket-flow {
  margin-bottom: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.flow-steps {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--line);
}
.flow-step + .flow-step {
  border-left: 1px solid var(--line-soft);
}
.flow-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 10px 12px;
  border: 0;
  background: none;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.js .flow-btn:hover {
  background: var(--surface-2);
}
.flow-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 26px;
  height: 26px;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.flow-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.flow-text strong {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.flow-text small {
  display: block;
  min-height: 16px;
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
}
.flow-step.is-done .flow-dot {
  background: #1fae64;
  border-color: #1fae64;
  color: #fff;
}
.flow-step.is-skipped .flow-dot {
  border-style: dashed;
}
.flow-step.is-skipped .flow-text strong,
.flow-step.is-todo .flow-text strong {
  color: var(--muted);
  font-weight: 500;
}
.flow-step.is-current {
  background: #eaf6fc;
  box-shadow: inset 0 -3px 0 var(--teal);
}
.flow-step.is-current .flow-dot {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(0, 156, 223, 0.18);
}
.flow-step.is-current .flow-text strong {
  font-weight: 700;
  color: var(--teal-dark);
}
.flow-step.is-picked .flow-dot {
  outline: 2px dashed var(--teal);
  outline-offset: 2px;
}
.ticket-flow.is-failed .flow-steps {
  opacity: 0.6;
}
.flow-next {
  display: flex;
  align-items: center;
  gap: 16px 24px;
  padding: 14px 20px;
  background: var(--surface-2);
}
.flow-next-text {
  flex: 1;
  min-width: 0;
}
.flow-next-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-dark);
}
.flow-next-text strong {
  display: block;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink);
}
.flow-next-text p {
  margin: 2px 0 0;
  font-size: 13.5px;
  color: var(--muted);
}
.flow-next-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.ticket-flow.is-failed .flow-next {
  background: #fdf1ef;
}
@media (max-width: 1250px) {
  .flow-btn {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}
@media (max-width: 850px) {
  .flow-steps {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .flow-step {
    flex: 0 0 auto;
  }
  .flow-btn {
    flex-direction: row;
    min-width: 128px;
  }
  .flow-next {
    flex-direction: column;
    align-items: stretch;
  }
  .flow-next-actions .btn {
    flex: 1;
  }
}

/* ==========================================================================
   1.7.21 — Nuova riparazione semplificata (attivo solo con JavaScript)
   ========================================================================== */
.intake-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}
.intake-main {
  min-width: 0;
}
.intake-aside {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.intake-summary {
  padding: 18px 18px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.intake-summary h2 {
  margin: 0 0 12px;
  font-size: 15px;
}
.sum-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0;
  border-top: 1px solid var(--line-soft);
}
.sum-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.sum-value {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.sum-value.is-empty,
.sum-device .is-empty {
  color: #94a3b8;
  font-weight: 500;
}
.sum-device {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line-soft);
}
.sum-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e8f4fb;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 700;
}
.sum-device-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.sum-device-text strong {
  font-size: 13.5px;
}
.sum-device-text small {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.sum-ready {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: #fff6e5;
  color: #8a5300;
  font-size: 12.5px;
  font-weight: 600;
}
.sum-ready.is-ok {
  background: #e6f6ec;
  color: #17663c;
}
:where(.admin-shell) .intake-aside .intake-submit {
  position: static;
  padding: 14px;
  box-shadow: var(--shadow-sm);
  border-color: var(--line);
}
.intake-aside .intake-submit .form-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.intake-aside .intake-submit .btn {
  width: 100%;
  margin: 0;
}
.intake-aside .intake-submit .hint {
  font-size: 12px;
}
.intake-pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: #eef2f6;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
.intake-pill.is-ok {
  background: #dcf3e6;
  color: #17663c;
}
/* Cliente */
.customer-picker.is-enhanced {
  display: none;
}
.intake-customer-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin: 0 0 12px;
  font-size: 13px;
}
.intake-customer-status.is-known {
  padding: 10px 12px;
  border: 1px solid #bfe5cf;
  border-radius: var(--radius-md);
  background: #f1faf5;
}
.intake-customer-status.is-known .btn {
  margin-left: auto;
}
.intake-results {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: -6px 0 10px;
  font-size: 13px;
  color: var(--muted);
}
.intake-results:empty {
  display: none;
}
:where(.admin-shell) .intake-results .customer-result {
  justify-content: flex-start;
  min-height: 38px;
  border-color: var(--line);
  text-align: left;
  font-weight: 500;
}
:where(.admin-shell) .intake-results .customer-result:hover,
:where(.admin-shell) .intake-results .customer-result:focus {
  border-color: var(--teal);
  background: #f2f9fd;
}
/* Dispositivo */
:where(.admin-shell) .intake-device-picker.is-enhanced {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.intake-device-picker.is-enhanced [hidden] {
  display: none !important;
}
.intake-device-picker.is-enhanced > [data-device-selected] {
  margin: 0;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: #f1faf5;
  border: 1px solid #bfe5cf;
  font-weight: 600;
}
.intake-link {
  align-self: flex-start;
  padding: 0;
  border: 0;
  background: none;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.intake-link:hover {
  text-decoration: underline;
}
.intake-device-search {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
}
.intake-device-search[hidden] {
  display: none;
}
.intake-simple .grid.three:has(.intake-type-label) {
  grid-template-columns: 1fr 1fr;
}
.intake-simple .intake-type-label {
  grid-column: 1 / -1;
}
.intake-type-select {
  display: none !important;
}
.intake-types {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.intake-type {
  min-width: 92px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.intake-type:hover:not(:disabled) {
  border-color: var(--teal);
}
.intake-type.is-on {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.intake-type:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
details.intake-flat > summary {
  list-style: none;
  pointer-events: none;
  font-size: 14px;
  font-weight: 700;
}
details.intake-flat > summary::-webkit-details-marker {
  display: none;
}
details.intake-flat > summary::after {
  content: none !important;
}
.intake-condition-grid {
  gap: 4px 16px;
}
.intake-condition-grid > label {
  margin: 0;
}
.intake-condition-grid .intake-chips,
.intake-chips {
  margin: 6px 0 4px;
}
.intake-condition-grid > div {
  min-width: 0;
}
.intake-field-hint {
  display: block;
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
@media (max-width: 1180px) {
  .intake-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .intake-aside {
    position: static;
  }
  :where(.admin-shell) .intake-aside .intake-submit {
    position: sticky;
    bottom: 8px;
  }
}
@media (max-width: 760px) {
  .intake-simple .grid.three:has(.intake-type-label) {
    grid-template-columns: 1fr;
  }
  .intake-type {
    flex: 1 1 30%;
    min-width: 0;
  }
  .intake-summary {
    display: none;
  }
}

/* ==========================================================================
   1.8.0 — Diario, avvisi, firma, promemoria, ricerca, statistiche, tracciamento
   ========================================================================== */

/* Ricerca globale */
.global-search {
  position: relative;
}
.gs-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  max-height: min(70vh, 520px);
  overflow-y: auto;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 14px 40px rgba(16, 32, 58, 0.16);
}
.gs-results[hidden] {
  display: none;
}
.gs-title {
  padding: 8px 10px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.gs-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  color: var(--ink);
}
.gs-item:hover,
.gs-item.is-active {
  background: #eef7fc;
}
.gs-main {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gs-sub {
  grid-column: 1;
  font-size: 12.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gs-item .badge {
  grid-column: 2;
  grid-row: 1 / span 2;
}
.gs-empty,
.gs-hint {
  margin: 0;
  padding: 10px;
  font-size: 12.5px;
  color: var(--muted);
}
.gs-hint {
  border-top: 1px solid var(--line-soft);
  margin-top: 4px;
}

/* Diario */
.diary-composer {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 16px;
}
:where(.admin-shell) .diary-composer textarea {
  border: 0;
  border-radius: 0;
  margin: 0;
  min-height: 64px;
  box-shadow: none;
}
.diary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 10px;
  background: var(--surface-2);
  border-top: 1px solid var(--line-soft);
}
.diary-vis {
  display: inline-flex;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.diary-vis label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.diary-vis label + label {
  border-left: 1px solid var(--line-strong);
}
.diary-vis label:has(input:checked) {
  background: var(--ink);
  color: #fff;
}
.diary-vis input {
  margin: 0;
  min-height: 0;
  accent-color: var(--teal);
}
.diary-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.diary-list li {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 12px;
}
.diary-list time {
  padding-top: 8px;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.diary-entry {
  position: relative;
  padding: 8px 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}
.diary-entry p {
  margin: 4px 0 0;
}
.diary-tag {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}
.is-public .diary-entry {
  background: #eef8fd;
  border-color: #cde8f6;
}
.is-public .diary-tag {
  color: var(--teal-dark);
}
.is-status .diary-entry {
  background: var(--surface);
}
.is-status .diary-entry strong {
  font-weight: 600;
}
.diary-entry form {
  position: absolute;
  top: 6px;
  right: 8px;
  margin: 0;
}
.diary-delete {
  padding: 2px 6px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  opacity: 0;
}
.diary-entry:hover .diary-delete,
.diary-delete:focus-visible {
  opacity: 1;
}
.diary-delete:hover {
  color: var(--bad);
}

/* Avvisa il cliente */
.notify h2 {
  margin-bottom: 4px;
}
.notify-last {
  margin: 0 0 12px;
  font-size: 12.5px;
  color: var(--muted);
}
.notify-last.is-fresh {
  color: var(--ok);
  font-weight: 600;
}
.notify textarea {
  font-size: 13px;
  line-height: 1.45;
}
.notify-actions {
  display: flex;
  gap: 8px;
  margin: 8px 0 6px;
}
.notify-actions .btn {
  flex: 1;
}
.notify-wa {
  background: #1fa855 !important;
  border-color: #1fa855 !important;
}
.notify-wa:hover {
  background: #178a45 !important;
  border-color: #178a45 !important;
}
.notify-manual {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 13px;
}
.notify .hint {
  font-size: 12px;
}

/* Firma */
.sig-pad {
  position: relative;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: #fff;
  overflow: hidden;
  margin-bottom: 12px;
}
.sig-pad canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 1;
  max-width: 100%;
  touch-action: none;
  cursor: crosshair;
}
.sig-line {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 22%;
  border-top: 1px solid #cbd6e2;
  padding-top: 4px;
  font-size: 11px;
  color: #94a3b8;
  pointer-events: none;
}
.sig-pad.has-ink .sig-line {
  color: transparent;
}
.sig-pad.is-empty {
  border-color: var(--bad);
}
.sig-pad:not(.is-ready) {
  display: none;
}
.sig-saved {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 12px;
  margin-bottom: 10px;
  border: 1px solid #bfe5cf;
  border-radius: var(--radius-md);
  background: #f6fcf8;
}
.sig-saved img {
  max-width: 220px;
  max-height: 70px;
  background: #fff;
}
.sig-saved p {
  margin: 0;
}
.sig-saved small {
  display: block;
}
.sig-terms {
  align-self: end;
}

/* Promemoria in Dashboard */
.reminders {
  margin-bottom: 18px;
  padding: 14px 18px 10px;
}
.reminders-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}
.reminders-head h2 {
  margin: 0;
  font-size: 16px;
}
.reminders ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.reminders li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--line-soft);
}
.reminders li:first-child {
  border-top: 0;
}
.rem-dot {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e8a317;
}
.rem-bad .rem-dot {
  background: #e0442f;
}
.rem-text {
  flex: 1;
  min-width: 0;
}
.rem-text a {
  color: var(--ink);
}
.rem-text a:hover {
  color: var(--teal-dark);
}
.rem-text small {
  display: block;
  color: var(--muted);
}
.rem-bad .rem-text small {
  color: #a1281b;
  font-weight: 600;
}
.rem-num {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.reminders-more {
  margin: 6px 0 0;
  font-size: 12.5px;
}

/* Statistiche */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
}
.stat > span {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}
.stat strong {
  font-family: Manrope, TamiRoboto, Arial, sans-serif;
  font-size: 26px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.stat-delta {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.stat-delta.is-good {
  color: var(--ok);
  font-weight: 600;
}
.stat-delta.is-bad {
  color: var(--bad);
  font-weight: 600;
}
.stat-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.stat-cols h3 {
  margin: 0 0 10px;
  font-size: 14px;
}
.stat-bars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stat-bars li {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 92px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.bar-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bar-svg {
  display: block;
  width: 100%;
  height: 8px;
  overflow: visible;
}
.bar-bg {
  fill: var(--line-soft);
}
.bar-fg {
  fill: var(--teal);
}
.bar-value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}
.bar-value small {
  display: inline;
  color: var(--muted);
  font-weight: 400;
}

/* Pagina di tracciamento del cliente */
.track {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.track h1 {
  margin: 2px 0 12px;
  font-family: Manrope, TamiRoboto, Arial, sans-serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.track h2 {
  margin: 0 0 10px;
  font-size: 16px;
}
.track-hero,
.track-card {
  padding: 20px;
  background: #fff;
  border: 1px solid #e0e7ef;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(16, 32, 58, 0.05);
}
.track-hero {
  border-top: 4px solid #009cdf;
}
.track-hero.tone-ok {
  border-top-color: #1fae64;
}
.track-hero.tone-action {
  border-top-color: #e8a317;
}
.track-hero.tone-warn {
  border-top-color: #e0442f;
}
.track-hero.tone-done {
  border-top-color: #10203a;
}
.track-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #62738e;
}
.track-status {
  padding: 12px 14px;
  border-radius: 10px;
  background: #eef7fc;
}
.tone-ok .track-status {
  background: #e7f6ee;
}
.tone-action .track-status {
  background: #fff5e0;
}
.tone-warn .track-status {
  background: #fdecea;
}
.track-status strong {
  display: block;
  font-size: 17px;
  color: #10203a;
}
.track-status p {
  margin: 2px 0 0;
  color: #3d4f69;
}
.track-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  margin: 16px 0 10px;
  padding: 0;
  list-style: none;
}
.track-steps li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  font-size: 12px;
  font-weight: 600;
  color: #8a99ab;
  text-align: center;
}
.track-steps li::before {
  content: "";
  position: absolute;
  top: 13px;
  left: calc(-50% + 16px);
  right: calc(50% + 16px);
  height: 2px;
  background: #dbe4ec;
}
.track-steps li:first-child::before {
  content: none;
}
.track-steps li.is-done::before,
.track-steps li.is-current::before {
  background: #1fae64;
}
.track-steps span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #dbe4ec;
  background: #fff;
  font-size: 12px;
}
.track-steps .is-done {
  color: #10203a;
}
.track-steps .is-done span {
  background: #1fae64;
  border-color: #1fae64;
  color: #fff;
}
.track-steps .is-current {
  color: #007eb5;
}
.track-steps .is-current span {
  background: #009cdf;
  border-color: #009cdf;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(0, 156, 223, 0.18);
}
.track-meta {
  margin: 0;
  font-size: 12.5px;
  color: #62738e;
}
.track-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.track-card-head h2 {
  margin: 0;
}
.track-amount {
  margin: 8px 0 14px;
  font-family: Manrope, TamiRoboto, Arial, sans-serif;
  font-size: 34px;
  font-weight: 800;
  color: #10203a;
}
.track-amount small {
  display: block;
  font-family: TamiRoboto, Arial, sans-serif;
  font-size: 12.5px;
  font-weight: 400;
  color: #62738e;
}
.track-quote.is-pending {
  border: 2px solid #e8a317;
}
.track-confirm {
  margin-bottom: 12px;
}
.track-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.track-actions .btn {
  flex: 1 1 160px;
}
.track-docs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.track-timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 16px;
  border-left: 2px solid #e0e7ef;
}
.track-timeline li {
  position: relative;
  padding: 0 0 14px 12px;
}
.track-timeline li::before {
  content: "";
  position: absolute;
  left: -23px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #009cdf;
  border: 2px solid #fff;
}
.track-timeline li.is-note::before {
  background: #1fae64;
}
.track-timeline time {
  display: block;
  font-size: 12px;
  color: #62738e;
}
.track-timeline p {
  margin: 2px 0 0;
}
.track-contacts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 1100px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stat-cols {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .diary-list li {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .diary-list time {
    padding: 0;
  }
  .stat-bars li {
    grid-template-columns: 110px minmax(0, 1fr) 70px;
  }
  .reminders li {
    flex-wrap: wrap;
  }
  .rem-num {
    display: none;
  }
  .track-steps li {
    font-size: 10.5px;
  }
  .track h1 {
    font-size: 22px;
  }
}
.diary-vis label {
  white-space: nowrap;
  position: relative;
}
.diary-vis input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.diary-vis label:has(input:focus-visible) {
  outline: 2px solid var(--teal);
  outline-offset: -2px;
}

/* ==========================================================================
   1.8.1 — Pagina Margini e stima di tasse e contributi
   ========================================================================== */
.profit-range {
  padding: 14px 18px;
}
.profit-range .profit-filter {
  align-items: flex-end;
  gap: 10px 14px;
}
.profit-range .hint {
  margin: 6px 0 0;
  font-size: 12px;
}
.mx-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 12px;
}
.mx-kpi {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.mx-kpi span {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.mx-kpi strong {
  font-family: Manrope, TamiRoboto, Arial, sans-serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.mx-kpi small {
  font-size: 12px;
  color: var(--muted);
}
.mx-kpi.is-key {
  background: var(--ink);
  border-color: var(--ink);
}
.mx-kpi.is-key span,
.mx-kpi.is-key small {
  color: #b9cbe0;
}
.mx-kpi.is-key strong {
  color: #fff;
}
.mx-note {
  margin: 0 0 14px;
  font-size: 12.5px;
  color: var(--muted);
}
.mx-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}
.mx-card {
  padding: 18px 20px;
  margin: 0;
}
.mx-card h2 {
  margin: 0 0 12px;
  font-size: 16px;
}
.mx-card h3 {
  margin: 18px 0 10px;
  font-size: 13.5px;
}
:where(.admin-shell) .mx-table th,
:where(.admin-shell) .mx-table td {
  padding: 9px 10px;
  font-size: 13.5px;
}
.mx-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.mx-table th small {
  display: block;
  font-size: 10.5px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}
.mx-table td small {
  color: var(--muted);
}
.mx-table tfoot td {
  font-weight: 700;
  border-top: 1.5px solid var(--line-strong);
  background: var(--surface-2);
}
.mx-bars li {
  grid-template-columns: 110px minmax(0, 1fr) 96px;
}
.mx-flow {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mx-flow li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
  font-variant-numeric: tabular-nums;
}
.mx-flow li span small {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
}
.mx-flow li strong {
  white-space: nowrap;
}
.mx-flow .is-minus strong {
  color: #a1281b;
  font-weight: 600;
}
.mx-flow .is-sub {
  font-weight: 600;
}
.mx-flow .is-total {
  border-bottom: 0;
  padding-top: 12px;
  font-size: 17px;
}
.mx-flow .is-total strong {
  font-family: Manrope, TamiRoboto, Arial, sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--ok);
}
.mx-tip {
  margin: 10px 0 8px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: #eef7fc;
  font-size: 13px;
}
.mx-year .panel-heading {
  padding: 0 0 6px;
}
.mx-tax {
  margin-top: 6px;
}
.mx-tax td:first-child {
  color: var(--ink);
}
.mx-tax .is-minus td.num {
  color: #a1281b;
}
.mx-tax .is-sub td {
  font-weight: 700;
  background: var(--surface-2);
}
.mx-tax .is-total td {
  font-size: 15px;
  font-weight: 800;
  border-top: 1.5px solid var(--line-strong);
}
.mx-tax .is-total td.num {
  color: var(--ok);
}
.mx-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 6px;
}
.mx-facts > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}
.mx-facts span {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.mx-facts strong {
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}
.mx-facts small {
  font-size: 11.5px;
  color: var(--muted);
}
.mx-more {
  margin-top: 10px;
}
.mx-more summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--teal-dark);
}
.mx-more ul {
  margin: 10px 0;
  padding-left: 18px;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mx-more p {
  font-size: 13px;
}
.mx-detail .panel-heading {
  padding: 16px 20px 10px;
}
.mx-detail .hint {
  padding: 0 20px 14px;
  margin: 8px 0 0;
}
.mx-detail td a {
  color: var(--ink);
}
.mx-detail td a:hover {
  color: var(--teal-dark);
}
.mx-detail td small {
  display: block;
}
.mx-keep {
  color: var(--ok);
  font-weight: 700;
}
td.negative {
  color: var(--bad);
}
/* Impostazioni fiscali */
.fx-settings {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.fx-settings .fx-rules {
  grid-column: 1 / -1;
}
.fx-check {
  align-self: end;
  margin-bottom: 14px;
}
.fx-fixed {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fx-fixed-head,
.fx-fixed-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px 82px 64px;
  gap: 8px;
  align-items: center;
}
.fx-fixed-head span {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
:where(.admin-shell) .fx-fixed-row input,
:where(.admin-shell) .fx-fixed-row select {
  margin: 0;
  min-height: 36px;
  padding: 6px 10px;
}
.fx-vat {
  display: flex;
  justify-content: center;
  margin: 0;
}
.fx-total {
  margin: 12px 0 0;
  text-align: right;
}
.fx-rules ul {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13.5px;
}
@media (max-width: 1150px) {
  .mx-kpis,
  .mx-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mx-grid,
  .fx-settings {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 760px) {
  .mx-kpi strong {
    font-size: 21px;
  }
  .fx-fixed-head {
    display: none;
  }
  .fx-fixed-row {
    grid-template-columns: minmax(0, 1fr) 96px;
  }
}
:where(.admin-shell) .fx-vat input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--teal);
}

/* ==========================================================================
   1.9.0 — Magazzino semplificato e prezzi consigliati
   ========================================================================== */
.whx-tabs {
  display: flex;
  gap: 4px;
  margin: -6px 0 18px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.whx-tabs a {
  padding: 10px 14px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.whx-tabs a:hover {
  color: var(--ink);
}
.whx-tabs a.is-active {
  color: var(--teal-dark);
  border-bottom-color: var(--teal);
}
.wh-nav {
  display: none;
}
.whx-actions {
  margin-bottom: 18px;
}
.whx-actions h2 {
  margin: 0 0 10px;
  font-size: 16px;
}
.whx-tiles {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.whx-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.whx-tile strong {
  font-size: 15px;
}
.whx-tile strong::before {
  content: "＋ ";
  color: var(--teal);
}
.whx-tile small {
  font-size: 12.5px;
  color: var(--muted);
}
.whx-tile:hover {
  border-color: var(--teal);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.whx-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.whx-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 18px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: var(--ink);
}
.whx-card:hover {
  border-color: var(--line-strong);
}
.whx-card > span {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.whx-card > strong {
  font-family: Manrope, TamiRoboto, Arial, sans-serif;
  font-size: 26px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.whx-card > strong small {
  display: inline;
  font-family: TamiRoboto, Arial, sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.whx-card > small {
  font-size: 12.5px;
  color: var(--muted);
}
.whx-card em {
  margin-top: 4px;
  font-style: normal;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ok);
}
.whx-card em.is-warn {
  color: var(--warn);
}
.whx-list .panel-heading {
  padding: 16px 20px 10px;
}
.whx-empty {
  padding: 0 20px 18px;
}
/* Riquadro prezzo */
.px-widget {
  margin: 8px 0 18px;
  padding: 16px;
  border: 1px solid #cde8f6;
  border-radius: var(--radius-lg);
  background: #f5fbfe;
}
.px-widget h3 {
  margin: 0 0 10px;
  font-size: 15px;
}
.px-widget [hidden] {
  display: none !important;
}
.px-widget input[readonly] {
  background: #eef6fb;
  font-weight: 700;
}
.px-span {
  grid-column: 1 / -1;
}
.px-suggest {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  margin-bottom: 14px;
  border: 1px solid #cde8f6;
  border-radius: var(--radius-lg);
  background: #f5fbfe;
}
.px-suggest .px-result {
  flex: 1 1 420px;
}
.px-figures {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 10px;
}
.px-figures > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.px-figures span {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.px-figures strong {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.px-figures small {
  font-size: 11.5px;
  color: var(--muted);
}
.px-figures .px-main strong {
  font-family: Manrope, TamiRoboto, Arial, sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--ink);
}
.px-figures .px-keep strong {
  color: var(--ok);
}
.px-figures.is-loss .px-keep strong,
.px-figures.is-loss .px-keep small {
  color: var(--bad);
}
.px-result .muted {
  margin: 0;
}
/* Pagina Prezzi */
.px-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.px-page .panel {
  margin: 0;
}
.px-calc .px-result {
  margin-top: 6px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: #f5fbfe;
  border: 1px solid #cde8f6;
}
.px-rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin-bottom: 14px;
}
.px-rule {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  align-items: center;
  gap: 2px 12px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}
.px-rule > span:first-child strong {
  display: block;
  color: var(--ink);
}
.px-rule > span:first-child small {
  font-weight: 400;
  color: var(--muted);
}
.px-rule-input {
  display: flex;
  align-items: center;
  gap: 6px;
}
:where(.admin-shell) .px-rule-input input {
  margin: 0;
  min-height: 36px;
  text-align: right;
  font-weight: 700;
}
.px-rule-input em {
  font-style: normal;
  font-weight: 700;
  color: var(--muted);
}
.px-rule-margin {
  grid-column: 2;
  font-size: 11.5px;
  color: var(--muted);
  text-align: right;
}
.px-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.px-guide-grid > div {
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}
.px-guide-grid h3 {
  margin: 0 0 6px;
  font-size: 14px;
}
.px-guide-grid p {
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 1.5;
}
.px-ex {
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: #eef7fc;
}
@media (max-width: 1150px) {
  .whx-tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .whx-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .px-guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .whx-tiles,
  .px-rules,
  .px-guide-grid {
    grid-template-columns: 1fr;
  }
  .px-figures {
    grid-template-columns: 1fr 1fr;
  }
}
.whx-fold > summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
}
.whx-fold[open] > summary {
  margin-bottom: 12px;
}
.px-newcust {
  margin: 4px 0 14px;
}
.px-newcust > summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--teal-dark);
}
.px-newcust[open] > summary {
  margin-bottom: 10px;
}

/* ==========================================================================
   1.9.1 — Acquisto usato in 4 passi, ricerca cedente senza ricarica
   ========================================================================== */
.ux-purchase > p.muted { margin-top: -4px; }
.ux-step {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px 18px;
  margin: 0 0 16px;
  min-width: 0;
}
.ux-step legend {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 6px;
  font-weight: 700;
  font-size: 1.05rem;
}
.ux-step legend span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1f6feb;
  color: #fff;
  font-size: .9rem;
}
.ux-step label small { color: var(--muted); font-weight: 400; }
.ux-seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 14px;
}
.ux-seg label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 600;
  border-right: 1px solid var(--line);
}
.ux-seg label:last-child { border-right: 0; }
.ux-seg input { margin: 0; width: auto; }
.ux-seg label:has(input:checked) { background: #e8f0fe; color: #1849a9; }
.ux-vendor-search { position: relative; margin-bottom: 8px; }
.ux-vendor-search[hidden] { display: none; }
.ux-vendor-results {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: 100%;
  max-height: 320px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .14);
  padding: 4px;
}
.ux-vendor-results[hidden] { display: none; }
.ux-vendor-results p { margin: 8px 10px; }
.ux-vendor-results button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  color: inherit;
  font: inherit;
}
.ux-vendor-results button:hover,
.ux-vendor-results button:focus-visible,
.ux-vendor-results button.is-first { background: #f1f5f9; }
.ux-vendor-results button span { color: var(--muted); font-size: .88rem; }
.ux-vendor-status { margin: 6px 0 0; font-size: .92rem; color: #166534; min-height: 0; }
.ux-vendor-status:empty { display: none; }
.linklike {
  border: 0;
  background: none;
  padding: 0;
  color: #1f6feb;
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}
.ux-more { margin: 10px 0 4px; }
.ux-more summary { cursor: pointer; font-weight: 600; color: #1f6feb; }
.ux-more[hidden], .ux-step [hidden] { display: none !important; }
.ux-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; }
.ux-step .px-widget h3 { display: none; }
@media (max-width: 640px) {
  .ux-step { padding: 12px 12px 14px; }
  .ux-seg { display: flex; }
  .ux-seg label { flex: 1 1 50%; justify-content: center; }
}

/* ==========================================================================
   1.10.0 — Strumenti del negozio (offerta, registro, cassa, garanzie, vetrina)
   ========================================================================== */
.sp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.sp-grid > .panel { margin: 0; }
@media (max-width: 900px) { .sp-grid { grid-template-columns: 1fr; } }
.sp-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 12px; }
.panel-heading .sp-actions { margin: 0; }
.sp-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.sp-filters label { margin: 0; }
.sp-filters .checkbox { align-self: center; }
.sp-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 0 0 18px; }
.sp-kpis > div { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.sp-kpis > div.is-main { background: #10203a; color: #fff; border-color: #10203a; }
.sp-kpis span { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
.sp-kpis .is-main span, .sp-kpis .is-main small { color: #c6d4e6; }
.sp-kpis strong { font-size: 1.45rem; }
.sp-kpis small { color: var(--muted); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sp-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.sp-table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.sp-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.sp-table small { color: var(--muted); }
.sp-table .num { text-align: right; white-space: nowrap; }
.sp-register tr.is-void td { text-decoration: line-through; color: var(--muted); }
.sp-list { margin: 0; padding-left: 18px; }
.sp-list li { margin: 4px 0; }
.sp-rows { list-style: none; margin: 0; padding: 0; }
.sp-rows li { display: flex; justify-content: space-between; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); padding: 9px 0; }
.sp-rows li:last-child { border-bottom: 0; }
.sp-rows a { display: flex; flex-direction: column; color: inherit; text-decoration: none; min-width: 0; }
.sp-rows a:hover strong { text-decoration: underline; }
.sp-rows small { color: var(--muted); }
.sp-rows .num { font-weight: 700; white-space: nowrap; }
.badge.sp-ok { background: #e7f6ee; color: #146c43; }
.badge.sp-off { background: #fdecec; color: #a12a2a; }
.sp-offer-box { background: #10203a; color: #fff; border-radius: 14px; padding: 16px 18px; margin: 14px 0; display: flex; flex-direction: column; gap: 4px; }
.sp-offer-box span { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: #c6d4e6; font-weight: 700; }
.sp-offer-box strong { font-size: 2rem; }
.sp-offer-box small { color: #c6d4e6; }
.sp-offer-box.is-loss { background: #a12a2a; }
.sp-offer [hidden] { display: none !important; }
.sp-search { display: flex; gap: 10px; }
.sp-search input { flex: 1; min-width: 0; }
.sp-listing { width: 100%; font-family: inherit; font-size: .93rem; line-height: 1.45; background: #f8fafc; }
@media (max-width: 640px) {
  .sp-search { flex-direction: column; }
  .sp-table { font-size: .86rem; }
  .sp-table td, .sp-table th { padding: 8px 6px; }
}
@media print {
  .sp-actions, .sp-search { display: none !important; }
  .sp-kpis > div.is-main { background: #fff; color: #000; }
}
.page-heading > .sp-actions { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; margin: 0; }
.page-heading > .sp-actions > * { margin: 0; }

/* ==========================================================================
   1.12.0 — MAGA-UNIpv
   ========================================================================== */
.up-import { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.up-import label { flex: 1 1 280px; margin: 0; }
.up-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.up-dl dt { color: var(--muted); font-size: .86rem; }
.up-dl dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.up-desc { background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; line-height: 1.5; }
.up-comments { list-style: none; padding: 0; margin: 0; }
.up-comments li { border-left: 3px solid #1f6feb; padding: 6px 12px; margin: 8px 0; background: #f8fafc; border-radius: 0 10px 10px 0; }
.up-comments p { margin: 4px 0 0; }
.up-sub { margin: 0 0 14px; }
.up-sub a { font-weight: 600; }
.up-sub a.is-active { text-decoration: underline; }
.badge.up-st { white-space: nowrap; }
.badge.up-nuovo { background: #eef2ff; color: #3730a3; }
.badge.up-lavorazione { background: #e0f2fe; color: #075985; }
.badge.up-attesa { background: #fff7ed; color: #9a3412; }
.badge.up-risolto, .badge.up-chiuso { background: #e7f6ee; color: #146c43; }
.up-unload { align-self: end; }
.up-add summary, .up-inv summary { cursor: pointer; font-weight: 600; }
.up-table td small { color: var(--muted); }
@media (max-width: 640px) { .up-dl { grid-template-columns: 1fr; } .up-dl dd { margin-bottom: 6px; } }
.up-comments { margin-top: 6px; } .panel h3 + .up-comments { margin-top: 0; } #ricambi + * {} .up-desc + h3 { margin-top: 18px; }

/* 1.13.0 – Collaudo PC (TAMI Collaudo) */
.badge.pt-res { white-space: nowrap; font-weight: 700; }
.badge.pt-superato { background: #e3f5ec; color: #166e45; }
.badge.pt-superato_note { background: #fdf1dc; color: #8a5a00; }
.badge.pt-non_superato { background: #fde4e1; color: #a52a1a; }
.pt-st { display: inline-block; min-width: 92px; text-align: center; padding: 2px 8px; border-radius: 99px; font-size: .78rem; font-weight: 700; white-space: nowrap; background: #edf1f5; color: #62738e; }
.pt-st-ok { background: #e3f5ec; color: #166e45; }
.pt-st-warn { background: #fdf1dc; color: #8a5a00; }
.pt-st-fail { background: #fde4e1; color: #a52a1a; }
.pt-hero { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: var(--radius-md); margin: 12px 0; border-left: 4px solid; }
.pt-hero > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pt-hero strong { font-size: 1.25rem; }
.pt-hero small { color: var(--muted); }
.pt-hero-superato { background: #e9f7ef; border-color: #1f9e5f; }
.pt-hero-superato strong { color: #166e45; }
.pt-hero-superato_note { background: #fdf3e0; border-color: #b07000; }
.pt-hero-superato_note strong { color: #8a5a00; }
.pt-hero-non_superato { background: #fde7e4; border-color: #c0341f; }
.pt-hero-non_superato strong { color: #a52a1a; }
.pt-kicker { font-size: .72rem; letter-spacing: .06em; font-weight: 700; color: var(--muted); }
.pt-note { white-space: normal; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
.pt-h { font-size: 1rem; margin: 18px 0 6px; }
.pt-list { list-style: none; padding: 0; margin: 0; }
.pt-list > li { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--line); }
.pt-list > li:last-child { border-bottom: 0; }
.pt-list > li p { margin: 2px 0 0; color: var(--muted); overflow-wrap: anywhere; }
.pt-list > li ul { margin: 4px 0 0; padding-left: 18px; font-size: .9rem; }
.pt-list > li .pt-st { margin-top: 2px; }
.pt-manual > li p { color: var(--ink); }
.pt-dl { margin-bottom: 8px; }
.pt-warn-text { color: #8a5a00; font-weight: 600; }
.pt-notice { margin: 8px 0; }
.pt-actions { white-space: nowrap; }
@media (max-width: 560px) {
  .pt-list > li { grid-template-columns: 1fr; }
  .pt-st { min-width: 0; }
  .pt-actions { white-space: normal; }
}
.pt-side form + h2, .pt-side p + h2 { margin-top: 26px; }

/* 1.14.0 – TAMI Console */
.console-key code { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); font-size: .9rem; word-break: break-all; user-select: all; }
.console-list { margin: 0 0 12px; padding-left: 18px; }
.console-list li { margin-bottom: 6px; }

/* 1.15.0 — Fattura24 */
.f24-sub { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.f24-sub a { padding: 4px 0; }
.f24-rows td { vertical-align: top; }
.f24-rows input, .f24-rows select, .f24-rows textarea { width: 100%; min-width: 0; }
.f24-rows td:nth-child(1) { min-width: 110px; }
.f24-rows td:nth-child(7) { min-width: 84px; }
.f24-rows td:nth-child(2) { min-width: 240px; }
.f24-rows td:nth-child(3), .f24-rows td:nth-child(4), .f24-rows td:nth-child(6) { width: 64px; }
.f24-rows td:nth-child(5) { width: 96px; }
.f24-rows td:nth-child(8), .f24-rows td:nth-child(9) { min-width: 140px; }
.f24-total { font-weight: 700; margin-left: 12px; }
.f24-checks { display: grid; gap: 6px; }
.f24-inline { display: flex; align-items: center; gap: 8px; margin: 0; }
.f24-inline select { width: auto; }
.f24-results { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 12px; }
.f24-box { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.f24-pre { white-space: pre-wrap; word-break: break-all; max-height: 360px; overflow: auto; font-size: 12px; background: var(--bg); padding: 10px; border-radius: var(--radius); }
.f24-preview { border-left: 4px solid var(--teal); }
.sp-rows li.is-void { opacity: .55; text-decoration: line-through; }

/* 1.16.0 — Fattura24: riconsegna pronta e andamento mensile */
.f24-ready { border-color: var(--teal); background: color-mix(in srgb, var(--teal) 7%, transparent); }
.f24-ready > span { display: flex; flex-direction: column; margin-right: auto; }
.f24-ready small { color: var(--muted); }
.f24-chart { display: block; width: 100%; height: auto; max-height: 280px; }
.f24-axis { stroke: var(--line); stroke-width: 1; }
.f24-bar { fill: var(--teal); }
.f24-hit { fill: transparent; }
.f24-col:hover .f24-bar { fill: #0086c0; }
.f24-col:hover .f24-hit { fill: color-mix(in srgb, var(--teal) 6%, transparent); }
.f24-val, .f24-lab { font-size: 12px; fill: var(--muted); text-anchor: middle; font-family: inherit; }

/* 1.17.0 — Vetrina TV (gestione) */
.tv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tv-list li { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.tv-list li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tv-list li small { color: var(--muted); }
.tv-list li.is-off { opacity: .6; }
.tv-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tv-tools form { margin: 0; }
.tv-thumb { width: 96px; height: 54px; flex: none; object-fit: cover; border-radius: 6px; background: #0b1626; }
.tv-thumb-empty { display: inline-flex; align-items: center; justify-content: center; color: #6fb6dc; font-weight: 800; font-size: 13px; }
.tv-choose { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.tv-choice { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: inherit; }
.tv-choice:hover, .tv-choice:focus-visible { border-color: var(--teal); }
.tv-choice span { color: var(--muted); }
.tv-pick { display: flex; flex-wrap: wrap; gap: 10px; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.tv-pick label { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 150px; cursor: pointer; }
.tv-pick img { width: 150px; height: 100px; object-fit: cover; border-radius: 6px; border: 3px solid transparent; }
.tv-pick input:checked + img { border-color: var(--teal); }
.tv-pick small { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.tv-new { border-left: 4px solid var(--teal); }
.tv-mode { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; margin: 0 0 10px; }
.tv-mode legend { font-weight: 700; padding: 0 4px; }

/* 1.18.0 — dati del privato per la fattura nella riconsegna */
.f24-hc { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px 4px; margin: 12px 0; }
.f24-hc legend { font-weight: 700; padding: 0 6px; }
.f24-hc input[name="hc_fiscal_code"], .f24-hc input[name="hc_province"] { text-transform: uppercase; }
.f24-hc input[readonly] { background: var(--bg); color: var(--muted); }
