/*
  Magazzino — Tema Professionale
  -------------------------------------------------
  - Palette moderna con variabili CSS
  - Tipografia pulita
  - Componenti coerenti (bottoni, card, tabelle, modali)
  - Accessibilità: focus visibile, contrasto adeguato
  - Responsive: mobile-first
*/

/* =====================
   ROOT & THEME TOKENS
===================== */
@import url("https://fonts.googleapis.com/css?family=Roboto+Condensed");

:root {
  --logo-top: 14px;
  --logo-left: 52px;
  --logo-left-mobile: 44px;
  /* Colori principali */
  --brand-50: #eef2ff;
  --brand-100: #e0e7ff;
  --brand-200: #c7d2fe;
  --brand-300: #a5b4fc;
  --brand-400: #818cf8;
  --brand-500: #6366f1;
  /* primary */
  --brand-600: #4f46e5;
  --brand-700: #4338ca;

  --accent-500: #22d3ee;
  /* ciano */
  --accent-600: #06b6d4;

  /* Neutri */
  --bg: #f6f7fb;
  --bg-card: #ffffff;
  --text: #1f2937;
  /* slate-800 */
  --text-dim: #4b5563;
  /* slate-600 */
  --border: #e5e7eb;
  --muted: #f3f4f6;
  --shadow: 0 8px 24px rgba(0, 0, 0, .06);

  /* Stati */
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;

  /* Raggi & spaziature */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --pad: 16px;
}

/* =====================
   BASE
===================== */
* {
  box-sizing: border-box;
}

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

@supports (overflow: clip) {

  html,
  body {
    overflow-x: clip;
  }
}

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Arial, sans-serif;
  background: linear-gradient(120deg, var(--brand-50), var(--bg) 40%, #fefefe);
  color: var(--text);
  margin: 0;
  padding: 24px;
  overflow-x: hidden !important;
  overscroll-behavior-x: none;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  animation: gradientBackground 16s ease-in-out infinite;
  background-size: 200% 200%;
}

@keyframes gradientBackground {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

h1,
h2,
h3 {
  margin: 0 0 12px;
  line-height: 1.2;
}

h1 {
  text-align: center;
  font-weight: 800;
  font-size: clamp(24px, 3vw, 32px);
  color: #111827;
  /* slate-900 */
  letter-spacing: -0.02em;
}

p {
  color: var(--text-dim);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* =====================
   LAYOUT CONTAINERS
===================== */
#main-container,
#search-container,
#load-container,
#update-container,
#add-container,
#order-requests-container,
#print-container,
#inventory-container,
#changes-container,
#daily-changes-container,
#order-container,
#order-pdf-container,
#product-details,
#modify-product-container {
  margin: 20px 0;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

#modify-product-container,
#update-container,
#add-container,
#order-requests-container,
#inventory-container {
  scroll-margin-top: 88px;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.section-reveal {
  border-color: var(--brand-400) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .22), var(--shadow);
}

.order-requests-back-btn {
  display: none;
}

body.order-requests-fullscreen {
  padding: 108px 24px 24px;
  --order-requests-content-max: 1100px;
  --order-requests-content-gutter: 96vw;
  --order-requests-action-right: max(16px, calc((100vw - min(var(--order-requests-content-max), var(--order-requests-content-gutter))) / 2 + 12px));
}

body.order-requests-fullscreen header.content-narrow {
  position: fixed;
  inset: 0 0 auto;
  z-index: 900;
  max-width: none;
  --order-requests-header-height: 84px;
  min-height: var(--order-requests-header-height);
  padding: 16px 160px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(120deg, var(--brand-50), #fff);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 10px 26px rgba(15, 23, 42, .06);
}

body.order-requests-fullscreen .header-top-actions {
  display: none;
}

body.order-requests-fullscreen #content {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
}

body.order-requests-fullscreen #content> :not(#order-requests-container):not(.modal) {
  display: none !important;
}

body.order-requests-fullscreen #order-requests-container {
  width: min(1100px, 96%);
  max-width: 100%;
  min-height: calc(100vh - 132px);
  margin: 0 auto;
  padding: 0 16px 28px;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transition: none;
}

body.order-requests-fullscreen #order-requests-container.section-reveal {
  border-color: transparent !important;
  box-shadow: none !important;
}

body.order-requests-fullscreen #requests-title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.order-requests-fullscreen .order-requests-fullscreen-header {
  align-items: center;
  margin: 0 0 12px;
  gap: 10px;
}

body.order-requests-fullscreen .order-requests-fullscreen-header h3 {
  margin: 0;
}

body.order-requests-fullscreen .order-requests-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.order-requests-fullscreen #order-requests-container .order-requests-save-row {
  height: 0;
  margin: 0;
  padding: 0;
  overflow: visible;
  position: relative;
}

body.order-requests-fullscreen #order-requests-container .order-requests-save-row .save-suppliers-btn {
  position: fixed;
  top: calc(var(--order-requests-header-height, 84px) / 2);
  right: var(--order-requests-action-right);
  z-index: 1200;
  width: auto;
  min-width: max-content;
  white-space: nowrap;
  padding: 8px 14px;
  transform: translateY(-50%);
}

body.order-requests-fullscreen #order-requests-container>.button-container:not(.order-requests-save-row) {
  margin: 10px 0 0;
}

body.order-requests-fullscreen #order-requests-container .order-requests-scan-row {
  margin-top: 10px;
}

body.order-requests-fullscreen .order-requests-table-wrapper {
  margin: 14px 0 0;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-height: none;
  overflow-y: visible;
  overflow-x: hidden;
}

body.order-requests-fullscreen #order-requests-table thead th {
  top: 0;
}

/* Spazio sotto il titolo principale */
#search-container {
  margin-top: 24px;
}

.search-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.search-header label {
  margin: 0;
  flex: 1;
  min-width: 200px;
  transform: translateY(-6px);
  /* alza leggermente il titolo della ricerca */
}

.search-header .reset-cta {
  margin-left: auto;
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  height: 44px;
}

#search-container .search-controls-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  justify-content: initial;
}

#search-container .search-controls-row .inputGroup--full {
  width: 100%;
  min-width: 0;
  margin: 0;
}

#search-container .search-controls-row .search-submit-slot {
  margin-left: 0;
  justify-self: end;
}

#search-container .search-controls-row .search-submit-slot .search-cta {
  width: auto;
}

#search-container .inputGroup {
  overflow: visible;
  /* evita che la label flottante venga tagliata ai bordi */
}

#search-container .inputGroup label {
  padding-left: 1.15em;
  padding-right: 0.25em;
  width: auto;
}

#search-container .inputGroup input {
  /* Aggiunge respiro tra testo e bordo sinistro della barra, senza toccare la label flottante */
  padding-left: 1.15em;
  padding-right: 0.85em;
}

.search-smart-hint {
  margin: 8px 2px 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.35;
}

.search-smart-hint code {
  font-size: 12px;
}

@keyframes square-animation {
  0% {
    left: 0;
    top: 0;
  }

  10.5% {
    left: 0;
    top: 0;
  }

  12.5% {
    left: 32px;
    top: 0;
  }

  23% {
    left: 32px;
    top: 0;
  }

  25% {
    left: 64px;
    top: 0;
  }

  35.5% {
    left: 64px;
    top: 0;
  }

  37.5% {
    left: 64px;
    top: 32px;
  }

  48% {
    left: 64px;
    top: 32px;
  }

  50% {
    left: 32px;
    top: 32px;
  }

  60.5% {
    left: 32px;
    top: 32px;
  }

  62.5% {
    left: 32px;
    top: 64px;
  }

  73% {
    left: 32px;
    top: 64px;
  }

  75% {
    left: 0;
    top: 64px;
  }

  85.5% {
    left: 0;
    top: 64px;
  }

  87.5% {
    left: 0;
    top: 32px;
  }

  98% {
    left: 0;
    top: 32px;
  }

  100% {
    left: 0;
    top: 0;
  }
}

.search-submit-loader {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 44px;
  width: 100%;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  position: absolute;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}

.search-submit-loader[hidden] {
  display: none !important;
}

#search-container .search-submit-slot {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: var(--search-submit-slot-width, 140px);
  min-width: 140px;
  height: var(--search-submit-slot-height, 44px);
  min-height: var(--search-submit-slot-height, 44px);
}

#search-container #search-submit-loader {
  display: inline-flex;
}

.search-submit-loader__spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 96px;
  height: 96px;
  transform: translate(-50%, -50%) rotate(45deg) scale(var(--search-submit-loader-scale, 0.34));
  transform-origin: center;
}

.search-submit-loader .loader-square {
  position: absolute;
  top: 0;
  left: 0;
  width: 28px;
  height: 28px;
  margin: 2px;
  border-radius: 0;
  background: var(--brand-500);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  animation: square-animation 10s ease-in-out infinite both;
}

.search-submit-loader .loader-square:nth-of-type(1) {
  background: var(--brand-200);
}

.search-submit-loader .loader-square:nth-of-type(2) {
  background: var(--brand-300);
}

.search-submit-loader .loader-square:nth-of-type(3) {
  background: var(--brand-400);
}

.search-submit-loader .loader-square:nth-of-type(4) {
  background: var(--brand-500);
}

.search-submit-loader .loader-square:nth-of-type(5) {
  background: var(--brand-600);
}

.search-submit-loader .loader-square:nth-of-type(6) {
  background: var(--brand-700);
}

.search-submit-loader .loader-square:nth-of-type(7) {
  background: var(--brand-400);
}

.search-submit-loader .loader-square:nth-of-type(1) {
  animation-delay: -1.4285714286s;
}

.search-submit-loader .loader-square:nth-of-type(2) {
  animation-delay: -2.8571428571s;
}

.search-submit-loader .loader-square:nth-of-type(3) {
  animation-delay: -4.2857142857s;
}

.search-submit-loader .loader-square:nth-of-type(4) {
  animation-delay: -5.7142857143s;
}

.search-submit-loader .loader-square:nth-of-type(5) {
  animation-delay: -7.1428571429s;
}

.search-submit-loader .loader-square:nth-of-type(6) {
  animation-delay: -8.5714285714s;
}

.search-submit-loader .loader-square:nth-of-type(7) {
  animation-delay: -10s;
}

.search-assistant-feedback {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(59, 130, 246, 0.25);
  background: rgba(239, 246, 255, 0.9);
  color: #1e3a8a;
  font-size: 14px;
  line-height: 1.45;
}

.search-assistant-feedback.is-success {
  border-color: rgba(22, 163, 74, 0.35);
  background: rgba(240, 253, 244, 0.95);
  color: #166534;
}

.search-assistant-feedback.is-error {
  border-color: rgba(220, 38, 38, 0.35);
  background: rgba(254, 242, 242, 0.95);
  color: #991b1b;
}

.search-assistant-table-wrap {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  overflow: auto;
  max-width: 100%;
}

.search-assistant-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

.search-assistant-table th,
.search-assistant-table td {
  border: 1px solid #e5e7eb;
  padding: 8px;
  text-align: left;
  font-size: 13px;
  vertical-align: top;
}

.search-assistant-table th {
  background: #f8fafc;
  color: #0f172a;
  font-weight: 700;
}

.search-assistant-actions {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.search-assistant-actions__header {
  margin: 0;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.search-assistant-actions__grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.search-assistant-action-card {
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(238, 242, 255, 0.42), rgba(255, 255, 255, 0.98));
  padding: 10px;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
}

.search-assistant-action-card h4 {
  margin: 0;
  font-size: 14px;
  color: #1e1b4b;
}

.search-assistant-action-card p {
  margin: 4px 0 0;
  color: #334155;
  font-size: 12px;
}

.search-assistant-action-card__meta {
  margin-top: 4px;
  color: #475569;
  font-size: 12px;
}

.search-assistant-action-card__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
  margin-top: 12px;
  align-items: stretch;
}

.search-assistant-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid rgba(99, 102, 241, 0.35);
  background: #fff;
  color: #3730a3;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  box-shadow: none;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.search-assistant-action-btn:hover {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 1px 2px rgba(79, 70, 229, 0.12);
}

.search-assistant-action-btn:active {
  box-shadow: none;
}

.search-assistant-action-btn:focus-visible {
  outline: 2px solid var(--accent-500);
  outline-offset: 2px;
}

.search-assistant-action-btn.is-primary {
  background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
  border-color: transparent;
  color: #fff;
}

.search-assistant-action-btn.is-primary:hover {
  background: linear-gradient(135deg, var(--brand-700), var(--brand-600));
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.28);
}

.ghost-button {
  background: transparent;
  color: var(--brand-600);
  border: 1px solid rgba(99, 102, 241, .35);
  box-shadow: none;
  padding-inline: 18px;
}

.mini-ghost {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: linear-gradient(180deg, rgba(99, 102, 241, .14), rgba(99, 102, 241, .04));
  color: var(--brand-700);
  border: 1px solid rgba(99, 102, 241, .45);
  border-radius: 999px;
  padding: 6px 14px 7px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, .08);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}

.mini-ghost__stars {
  display: block;
  font-size: 11px;
  letter-spacing: 1.5px;
  line-height: 1;
  color: var(--brand-500);
}

.mini-ghost__label {
  display: block;
  font-size: 11px;
  letter-spacing: 1.2px;
  line-height: 1;
}

.mini-ghost:hover {
  background: linear-gradient(180deg, rgba(99, 102, 241, .22), rgba(99, 102, 241, .08));
  box-shadow: 0 6px 14px rgba(99, 102, 241, .18);
  transform: translateY(-1px);
}

.mini-ghost:active {
  transform: translateY(0);
  box-shadow: none;
}

.mini-ghost:focus-visible {
  outline: 2px solid var(--accent-500);
  outline-offset: 2px;
}

.ghost-button:hover {
  background: rgba(99, 102, 241, .08);
  color: var(--brand-600);
  box-shadow: 0 8px 18px rgba(99, 102, 241, .18);
}

.ghost-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

/* Logo fissato in alto a sinistra (all views) */
.top-left,
#logo-logout,
#issue-logo {
  position: absolute !important;
  top: 50% !important;
  left: var(--logo-left) !important;
  right: auto !important;
  width: auto !important;
  height: clamp(72px, 10vh, 102px) !important;
  max-width: 118px !important;
  max-height: 102px !important;
  z-index: 1300 !important;
  pointer-events: auto;
  transform: translate3d(0, -50%, 0) !important;
  margin: 0 !important;
  transition: opacity .2s ease, transform .2s ease;
}

#logo-logout img,
#issue-logo img {
  display: block;
  width: auto !important;
  height: 100% !important;
  max-width: 100% !important;
  object-fit: contain !important;
}

@media (max-width: 640px) {

  .top-left,
  #logo-logout,
  #issue-logo {
    top: 50% !important;
    left: var(--logo-left-mobile) !important;
    width: auto !important;
    height: 96px !important;
    max-width: 112px !important;
    max-height: 96px !important;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {

  .top-left,
  #logo-logout,
  #issue-logo {
    top: 50% !important;
    left: var(--logo-left) !important;
    width: auto !important;
    height: 92px !important;
    max-width: 106px !important;
    max-height: 92px !important;
  }
}

#logo-logout.logo-hidden,
.top-left.logo-hidden,
#issue-logo.logo-hidden {
  display: none !important;
}

/* iPad / tablet safeguard: force fixed positioning */
@media (pointer: coarse) and (min-width: 641px) and (max-width: 1024px) {

  .top-left,
  #logo-logout,
  #issue-logo {
    position: absolute !important;
    top: 50% !important;
    left: var(--logo-left) !important;
    right: auto !important;
    transform: translate3d(0, -50%, 0) !important;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {

  .top-left,
  #logo-logout,
  #issue-logo {
    top: 50% !important;
    left: var(--logo-left) !important;
    right: auto !important;
    width: auto !important;
    height: 92px !important;
    max-width: 106px !important;
    max-height: 92px !important;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  body {
    padding: 18px;
  }

  header.content-narrow {
    padding: 18px 18px 0 18px;
  }
}

/* Pulsante info flottante (home) con nuovo stile animato */
.floating-info {
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 1300;
  border: none;
  color: #e8e8e8;
  background: #2b2f4a;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  min-width: 118px;
  height: 42px;
  padding: 8px 9px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(79, 70, 229, 0.25);
  transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
  overflow: hidden;
}

.floating-info .span {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 4px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
  transition-delay: 0.6s;
}

.floating-info:hover .span:nth-child(1) {
  transform: translateY(-100%);
  transition-delay: 0s;
}

.floating-info:hover .span:nth-child(2) {
  transform: translateY(-100%);
  transition-delay: 0s;
}

.floating-info::before {
  position: absolute;
  content: "";
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: linear-gradient(-45deg, var(--brand-600) 0%, var(--brand-400) 100%);
  transform: scaleX(0);
  transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
  transition-delay: 0;
  transform-origin: left;
}

.floating-info:hover::before {
  transform: scaleX(1);
  transition-delay: 0.6s;
}

.floating-info:active {
  box-shadow: none;
  transform: translateY(1px);
}

.floating-info:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

@media (max-width: 640px) {
  .floating-info {
    right: 12px;
    bottom: 16px;
    padding: 7px 8px;
    min-width: 110px;
    font-size: 12px;
    height: 40px;
  }
}

/* Popup info: layout più compatto e leggibile */
#infoModal .modal-content {
  width: min(520px, 92vw);
  padding: 26px 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

#infoModal .issue-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--danger);
  width: 38px;
  height: 30px;
  cursor: pointer;
  padding: 0;
  margin-top: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease, border-color .2s ease, transform .2s ease;
}

#infoModal .issue-close svg {
  width: 16px;
  height: 16px;
}

#infoModal .issue-close:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #b91c1c;
  box-shadow: 0 8px 18px rgba(239, 68, 68, 0.18);
  transform: translateY(-1px);
}

#infoModal .issue-close:active {
  transform: translateY(0);
}

#infoModal .issue-close:focus-visible {
  outline: 2px solid var(--danger);
  outline-offset: 2px;
}

#infoModal h2 {
  margin: 2px 0 6px;
  font-size: 24px;
  line-height: 1.25;
}

#infoModal .inputGroup {
  max-width: none;
  width: 100%;
  margin: 10px 0;
}

#infoModal .inputGroup input,
#infoModal .inputGroup textarea {
  font-size: 15px;
  padding: 12px 14px;
  border-radius: 12px;
}

#infoModal .inputGroup textarea {
  min-height: 112px;
}

#infoModal .inputGroup label {
  padding: 0 14px;
}

#infoModal .issue-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 8px;
}

#infoModal .issue-send-btn {
  width: auto;
  min-width: 140px;
  justify-content: center;
  font-size: 15px;
  padding: 10px 14px;
  gap: 8px;
  align-self: center;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.18);
}

header.content-narrow {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px 24px 0 24px;
  --stockly-header-cta-y: 36px;
}

@media (min-width: 641px) and (max-width: 1024px) {
  header.content-narrow {
    --stockly-header-cta-y: 48px;
  }
}

.header-top-actions {
  position: absolute;
  left: 24px;
  right: 24px;
  top: 12px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none;
  z-index: 1100;
}

.header-top-actions>* {
  pointer-events: auto;
}

.header-top-actions .header-cta {
  position: static;
  left: auto;
  right: auto;
  top: auto;
}

.header-top-actions .setting-btn {
  position: relative;
  left: auto;
  right: auto;
  top: auto;
}

.header-top-actions .btn-cont {
  display: flex;
  justify-content: center;
  align-items: center;
  height: auto;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
  margin: 0;
  border: 2px solid var(--brand-200);
  border-radius: 10px;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.22);
}

.header-top-actions .btn-cont .button {
  background: none !important;
  border: none;
  box-shadow: none !important;
  cursor: pointer;
  padding: 10px;
  border-radius: 5px;
  position: relative;
  transition: background-color 0.2s ease;
  min-width: 0;
  line-height: 0;
}

.header-top-actions .btn-cont .button:hover {
  filter: none;
  transform: none;
}

.header-top-actions .btn-cont .button:active {
  transform: none;
}

.header-top-actions .btn-cont .settings-btn {
  display: block;
  fill: #fff;
  transition: transform 0.4s ease-in;
}

.header-top-actions .btn-cont .settings-btn:hover {
  transform: rotate(60deg);
}

.header-top-actions .btn-cont .settings-btn:active {
  animation: header-settings-gear-rot 1s linear infinite;
}

@keyframes header-settings-gear-rot {
  from {
    transform: rotate(-100deg);
  }

  to {
    transform: rotate(180deg);
  }
}

.page-title {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.page-title__logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}

.header-cta {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: none;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
  box-shadow: 0 10px 18px rgba(79, 70, 229, .22);
  cursor: pointer;
  font-weight: 700;
}

.header-cta:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.header-cta:active {
  transform: translateY(0);
}

.setting-btn {
  width: 45px;
  height: 45px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background-color: rgb(129, 110, 216);
  border-radius: 10px;
  cursor: pointer;
  border: none;
  box-shadow: 0px 0px 0px 2px rgb(212, 209, 255);
  padding: 0;
  overflow: visible;
}

/* Notifiche: nessun alone/bordo rosso sul pulsante Dashboard (il badge resta l’indicatore). */
#dashboard-button.setting-btn.has-notifications {
  box-shadow: 0px 0px 0px 2px rgb(212, 209, 255);
}

/* Badge notifiche stile “organic blob” (alikinvv/notification-badge) */
.notification-badge {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 6;
  width: 26px;
  height: 34px;
  overflow: visible;
  animation: stocklyBadgeBreathe 2.6s ease-in-out infinite;
}

.notification-badge--header {
  top: -22px;
  right: -10px;
}

.notification-badge--section {
  top: -22px;
  right: -10px;
  width: 28px;
  height: 36px;
}

@keyframes stocklyBadgeBreathe {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.06);
  }
}

.notification-badge__count {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 8px;
  color: var(--brand-500, #6366f1);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  text-shadow: none;
}

.notification-badge--section .notification-badge__count {
  font-size: 11px;
  padding-bottom: 9px;
}

.notification-badge__blob-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}

.notification-badge__organic {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}

.notification-badge__bubbles {
  pointer-events: none;
}

.setting-btn .bar {
  width: 50%;
  height: 2px;
  background-color: rgb(229, 229, 229);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-radius: 2px;
}

.setting-btn .bar::before {
  content: "";
  width: 2px;
  height: 2px;
  background-color: rgb(126, 117, 255);
  position: absolute;
  border-radius: 50%;
  border: 2px solid white;
  transition: all 0.3s;
  box-shadow: 0px 0px 5px white;
}

.setting-btn .bar1::before {
  transform: translateX(-4px);
}

.setting-btn .bar2::before {
  transform: translateX(4px);
}

.setting-btn:hover .bar1::before {
  transform: translateX(4px);
}

.setting-btn:hover .bar2::before {
  transform: translateX(-4px);
}

.setting-tooltip {
  position: absolute;
  right: 110%;
  top: 50%;
  transform: translateY(-50%) scale(.95);
  background: #111827;
  color: #f9fafb;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: normal;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .18);
}

.header-top-actions .btn-cont .setting-tooltip {
  right: auto;
  left: 100%;
  margin-left: 8px;
  transform: translateY(-50%) scale(.95);
  border-radius: var(--radius-sm);
}

.setting-btn:hover .setting-tooltip {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.header-top-actions .btn-cont .button:hover .setting-tooltip {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

header.content-narrow h1 {
  margin: 0;
  text-align: center;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  header.content-narrow {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 18px 0 18px;
    --stockly-header-cta-y: 44px;
    width: 100%;
    max-width: 100%;
    gap: 12px;
  }

  .header-top-actions {
    position: static;
    left: auto;
    right: auto;
    top: auto;
    width: 100%;
    margin-top: 4px;
    margin-bottom: 4px;
    pointer-events: auto;
  }

  .page-title {
    width: 100%;
    justify-content: center;
    min-width: 0;
  }

  header.content-narrow h1 {
    max-width: 100%;
    font-size: clamp(22px, 7vw, 28px);
    line-height: 1.08;
    letter-spacing: 0;
    text-align: center;
    overflow-wrap: anywhere;
  }
}

/* =====================
   BUTTONS
===================== */
button,
input[type="submit"] {
  -webkit-appearance: none;
  appearance: none;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(79, 70, 229, .25);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease, background .3s ease;
}

button:hover,
input[type="submit"]:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(79, 70, 229, .28);
}

button.is-selected {
  background: linear-gradient(135deg, #7dd3fc, #38bdf8);
  border-color: rgba(56, 189, 248, .45);
  color: #0f172a;
  box-shadow: 0 10px 24px rgba(56, 189, 248, .25);
}

button.is-selected:hover {
  filter: brightness(1.02);
  box-shadow: 0 12px 28px rgba(56, 189, 248, .28);
}

.btn-secondary {
  background: var(--muted) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  box-shadow: none !important;
}

.btn-secondary:hover {
  background: var(--border) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05) !important;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex: 0 0 auto;
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 10px;
  position: relative;
}

.icon-button .print-icon {
  width: 16px;
  height: 16px;
  background: center/18px 18px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9V2h12v7'/%3E%3Cpath d='M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2'/%3E%3Crect x='6' y='14' width='12' height='8' rx='1' ry='1'/%3E%3Cpath d='M9 17h6'/%3E%3C/svg%3E");
}

.icon-button .plus-icon {
  width: 16px;
  height: 16px;
  background: center/18px 18px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
}

.icon-button .gear-icon {
  width: 16px;
  height: 16px;
  background: center/18px 18px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09a1.65 1.65 0 0 0-1-1.51 1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06A1.65 1.65 0 0 0 4.6 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06A1.65 1.65 0 0 0 8.92 4a1.65 1.65 0 0 0 1-1.51V2a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1Z'/%3E%3C/svg%3E");
}

/* Tooltip generico per pulsanti con icone */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(17, 24, 39, 0.92);
  color: #fff;
  font-size: 13px;
  white-space: nowrap;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  opacity: 0;
  pointer-events: none;
  z-index: 5;
  transition: opacity .16s ease, transform .16s ease;
}

[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

button:active,
input[type="submit"]:active {
  transform: translateY(0);
}

button:focus-visible,
input[type="submit"]:focus-visible {
  outline: 3px solid var(--accent-500);
  outline-offset: 1px;
}

/* Pulsante elimina con coperchio animato */
.delete-button {
  --sz: 1rem;
  position: relative;
  padding: 0.4rem 0.5rem;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: calc(var(--sz) * 2.5);
  width: calc(var(--sz) * 2.5);
}

.trash-svg {
  width: calc(var(--sz) * 2.5);
  height: calc(var(--sz) * 2.5);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  overflow: visible;
}

#lid-group {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: 12px 18px;
}

.delete-button:hover #lid-group {
  transform: rotate(-28deg) translateY(2px);
}

.delete-button:active #lid-group {
  transform: rotate(-12deg) scale(0.98);
}

.delete-button:hover .trash-svg {
  transform: scale(1.08) rotate(3deg);
}

.delete-button:active .trash-svg {
  transform: scale(0.96) rotate(-1deg);
}

/* Pulsante salva animato */
.action_has {
  --color: 0 0% 60%;
  --color-has: 211deg 100% 48%;
  --sz: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: calc(var(--sz) * 2.5);
  width: calc(var(--sz) * 2.5);
  padding: 0.4rem 0.5rem;
  border-radius: 0.375rem;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #0f172a;
}

.has_saved:hover svg {
  color: hsl(var(--color-has));
}

.has_saved svg {
  overflow: visible;
  height: calc(var(--sz) * 1.75);
  width: calc(var(--sz) * 1.75);
  --ease: cubic-bezier(0.5, 0, 0.25, 1);
  --zoom-from: 1.75;
  --zoom-via: 0.75;
  --zoom-to: 1;
  --duration: 1s;
}

.has_saved:hover path[data-path="box"] {
  transition: all 0.3s var(--ease);
  animation: has-saved var(--duration) var(--ease) forwards;
  fill: hsl(var(--color-has) / 0.35);
}

.has_saved:hover path[data-path="line-top"] {
  animation: has-saved-line-top var(--duration) var(--ease) forwards;
}

.has_saved:hover path[data-path="line-bottom"] {
  animation: has-saved-line-bottom var(--duration) var(--ease) forwards,
    has-saved-line-bottom-2 calc(var(--duration) * 1) var(--ease) calc(var(--duration) * 0.75);
}

@keyframes has-saved-line-top {
  33.333% {
    transform: rotate(0deg) translate(1px, 2px) scale(var(--zoom-from));
    d: path("M 3 5 L 3 8 L 3 8");
  }

  66.666% {
    transform: rotate(20deg) translate(2px, -2px) scale(var(--zoom-via));
  }

  99.999% {
    transform: rotate(0deg) translate(0px, 0px) scale(var(--zoom-to));
  }
}

/* CTA per ricerche (modifiche/prelievi) */
.search-cta {
  position: relative;
  border: none;
  background-color: #0ea5e9;
  color: #fff;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  gap: 10px;
  border-radius: 10px;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  overflow: hidden;
  min-width: 140px;
}

.search-cta span {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  gap: 10px;
}

.search-cta::before {
  content: "";
  position: absolute;
  background-color: #38bdf8;
  width: 100%;
  height: 100%;
  left: 0%;
  bottom: 0%;
  transform: translate(-100%, 100%);
  border-radius: inherit;
}

.search-cta svg {
  fill: #fff;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
}

.search-cta svg.search-cta__icon {
  fill: none;
  stroke: currentColor;
  flex-shrink: 0;
  display: block;
}

.search-cta:hover::before {
  animation: search-cta-shake 0.6s forwards;
}

.search-cta:hover svg {
  scale: 1.15;
}

.search-cta:hover svg:not(.search-cta__icon) {
  fill: white;
}

.search-cta:active {
  box-shadow: none;
}

.search-cta.is-loading {
  cursor: wait;
  opacity: 0.9;
}

.search-cta__label {
  white-space: nowrap;
}

.search-cta--text {
  gap: 8px;
  min-width: auto;
  padding: 10px 16px;
}

.search-cta--text span {
  gap: 0;
}

.search-cta svg.search-cta__ai-icon {
  display: none;
  flex-shrink: 0;
  fill: #fff;
  stroke: none;
}

.search-cta.is-ai svg.search-cta__ai-icon {
  display: block;
}

.search-cta.is-ai svg.search-cta__icon {
  display: none;
}

.search-cta--secondary {
  background: #fff;
  color: #1d4ed8;
  border: 1px solid rgba(29, 78, 216, 0.35);
  box-shadow: 0 10px 20px rgba(29, 78, 216, 0.14);
}

.search-cta--secondary::before {
  background-color: rgba(147, 197, 253, 0.55);
}

@media (max-width: 980px) {
  #search-container .search-controls-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  #search-container .search-controls-row .search-cta--text {
    min-width: 130px;
  }
}

.search-cta--icon {
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 10px;
  gap: 0;
}

.search-cta--icon span {
  gap: 0;
}

.reset-cta {
  height: 44px;
  width: 44px;
  min-width: 44px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: #111827;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, color .18s ease;
}

.reset-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, .12);
  border-color: rgba(15, 23, 42, 0.2);
  color: #0f172a;
}

.reset-cta .reset-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.reset-cta .reset-icon .reset-lottie {
  width: 20px;
  height: 20px;
}

@keyframes search-cta-shake {
  0% {
    transform: translate(-100%, 100%);
  }

  50% {
    transform: translate(20%, -20%);
  }

  100% {
    transform: translate(0%, 0%);
  }
}

/* Pulsante stampa: esclude ombra viola da button:hover globale */
button.print-btn {
  width: 44px;
  min-width: 44px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 8px;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
  border: none;
  border-radius: 12px;
  font-size: 0;
  cursor: pointer;
  overflow: visible;
  font-weight: 500;
  color: #fff;
  box-shadow: none;
  transition: transform 0.3s, filter 0.3s;
  position: relative;
  z-index: 1;
}

button.print-btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: none;
}

button.print-btn:focus-visible,
button.print-btn:focus,
button.print-btn:active {
  outline: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent;
}

button.print-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 110%;
  left: auto;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%) translateX(-6px) scale(.95);
  background: #0f172a;
  color: #f9fafb;
  padding: 4px 8px;
  border-radius: 8px;
  border: 2px solid #1f2937;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 10px 18px rgba(0, 0, 0, .24);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease, filter .18s ease;
  z-index: 10;
}

button.print-btn:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0) scale(1);
}

.printer-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 100%;
}

.printer-container {
  height: 50%;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.printer-container svg {
  width: 100%;
  height: auto;
  transform: translateY(4px);
}

button.print-btn svg path {
  stroke: #fff;
  fill: #fff;
}

button.print-btn svg circle {
  fill: #fff;
}

.printer-page-wrapper {
  width: 100%;
  height: 50%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.printer-page {
  width: 70%;
  height: 10px;
  border: 1px solid #fff;
  background-color: white;
  transform: translateY(0px);
  transition: all 0.3s ease;
  transform-origin: top;
}

button.print-btn:hover .printer-page {
  height: 16px;
  background-color: rgb(239, 239, 239);
}

@media (max-width: 540px) {
  button.print-btn {
    gap: 0;
    padding: 8px;
  }
}

@keyframes has-saved-line-bottom {
  33.333% {
    transform: rotate(0deg) translate(1px, 2px) scale(var(--zoom-from));
    d: path("M 17 20 L 17 13 L 7 13 L 7 20");
  }

  66.666% {
    transform: rotate(20deg) translate(2px, -2px) scale(var(--zoom-via));
  }

  99.999% {
    transform: rotate(0deg) translate(0px, 0px) scale(var(--zoom-to));
    d: path("M 17 21 L 17 21 L 7 21 L 7 21");
  }
}

@keyframes has-saved-line-bottom-2 {
  from {
    d: path("M 17 21 L 17 21 L 7 21 L 7 21");
  }

  to {
    transform: rotate(0deg) translate(0px, 0px) scale(var(--zoom-to));
    d: path("M 17 20 L 17 13 L 7 13 L 7 20");
    fill: white;
  }
}

@keyframes has-saved {
  33.333% {
    transform: rotate(0deg) translate(1px, 2px) scale(var(--zoom-from));
  }

  66.666% {
    transform: rotate(20deg) translate(2px, -2px) scale(var(--zoom-via));
  }

  99.999% {
    transform: rotate(0deg) translate(0px, 0px) scale(var(--zoom-to));
  }
}

/* Variazioni */
button.align-left-text {
  text-align: left;
  width: 100%;
}

.button-container,
.button-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 12px 0 4px;
}

.button-container button,
.button-group button {
  flex: 1 1 160px;
}

.button-container .search-cta {
  flex: 0 0 auto;
}

/* Filtri categoria dinamici: distanziamento in base al numero di reparti */
.button-container:has(> .stockly-category-filter-bar) {
  justify-content: stretch;
}

.button-container>.stockly-category-filter-bar {
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
}

.stockly-category-filter-bar.category-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.stockly-category-filter-bar[data-cat-spacing="none"] {
  min-height: 0;
}

.stockly-category-filter-bar[data-cat-spacing="one"] {
  justify-content: center;
  gap: 0;
}

.stockly-category-filter-bar[data-cat-spacing="one"]>button {
  flex: 0 0 auto;
}

.stockly-category-filter-bar[data-cat-spacing="few"] {
  justify-content: space-between;
  gap: clamp(8px, 2.2vw, 28px);
}

.stockly-category-filter-bar[data-cat-spacing="few"]>button {
  flex: 1 1 0;
  min-width: 0;
  max-width: min(100%, 280px);
}

.stockly-category-filter-bar[data-cat-spacing="medium"] {
  justify-content: flex-start;
  gap: 10px 14px;
}

.stockly-category-filter-bar[data-cat-spacing="medium"]>button {
  flex: 0 1 auto;
  min-width: 118px;
}

.stockly-category-filter-bar[data-cat-spacing="many"] {
  justify-content: flex-start;
  gap: 6px 8px;
}

.stockly-category-filter-bar[data-cat-spacing="many"]>button {
  flex: 0 1 auto;
  min-width: 96px;
  padding-left: 10px;
  padding-right: 10px;
}

/* Se la barra è anche .button-container (richiesta / prelievo), sovrascrive flex generico */
.button-container.stockly-category-filter-bar[data-cat-spacing="few"]>button {
  flex: 1 1 0;
  min-width: 0;
  max-width: min(100%, 280px);
}

.button-container.stockly-category-filter-bar[data-cat-spacing="medium"]>button,
.button-container.stockly-category-filter-bar[data-cat-spacing="many"]>button {
  flex: 0 1 auto;
}

.active-button {
  background: linear-gradient(135deg, var(--warning), #f59e0b);
  color: #111827;
}

.management-sections button {
  white-space: normal;
  line-height: 1.25;
  position: relative;
  overflow: visible;
}

.management-sections button.is-selected {
  border-color: rgba(56, 189, 248, .55);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, .22), 0 10px 24px rgba(56, 189, 248, .18);
}

.actions-toolbar {
  position: relative;
  justify-content: flex-end;
  gap: 8px;
  min-height: 52px;
}

.actions-toolbar #load-button {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.actions-toolbar button {
  flex: 0 0 auto;
}

.actions-toolbar .icon-button {
  width: 40px;
  min-width: 40px;
  height: 40px;
  padding: 8px;
}

@media (max-width: 640px) {
  .management-sections {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
  }

  .management-sections button {
    flex: 1 1 calc(50% - 10px);
    min-width: 140px;
    margin: 0;
    min-height: 52px;
    padding: 12px 10px;
    font-size: 14px;
    text-align: center;
    border-radius: 12px;
  }

  .actions-toolbar {
    min-height: 0;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
  }

  .actions-toolbar #load-button {
    order: 2;
    position: static;
    left: auto;
    transform: none;
    flex: 1 1 100%;
    width: 100%;
    margin: 0;
  }

  .actions-toolbar .print-btn,
  .actions-toolbar .icon-button {
    order: 1;
    flex: 0 0 auto;
    margin: 0;
  }
}


@media (max-width: 820px) {

  .client-settings-grid--two,
  .client-settings-grid--three,
  .client-settings-status-grid,
  .client-settings-preview-grid {
    grid-template-columns: 1fr;
  }

  .client-settings-panel.client-settings-section {
    padding: 22px 24px 28px;
  }

  .client-settings-overview {
    padding-right: 64px;
  }

  .client-settings-progress-card {
    align-items: flex-start;
  }
}

@media (max-width: 360px) {
  .management-sections button {
    flex-basis: 100%;
  }
}

.fixed-button {
  position: fixed;
  top: var(--stockly-header-cta-y, 36px);
  right: max(16px, calc((100vw - 1100px) / 2 + 16px));
  z-index: 1100;
  padding: 8px 14px;
  width: auto;
  min-width: max-content;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
  border-radius: 12px;
  background: linear-gradient(135deg, #10b981, #059669);
  border: 1px solid rgba(5, 150, 105, .2);
  box-shadow: 0 12px 32px rgba(16, 185, 129, .25);
  transform: translateY(-50%);
}

#update-container>.fixed-button,
#order-requests-container .button-container>.fixed-button.save-suppliers-btn,
#inventory-container>.fixed-button.save-inventory-btn {
  width: auto;
  min-width: max-content;
}

/* Nuovo ordine + inventario: CTA verde in basso al centro (non in header) */
#update-container>.fixed-button,
#inventory-container>.fixed-button.save-inventory-btn {
  top: auto;
  right: auto;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  transform: translateX(-50%);
  z-index: 2147483000;
  max-width: min(440px, calc(100vw - 32px));
  margin: 0;
  box-shadow: 0 16px 40px rgba(16, 185, 129, .32);
}

body.stockly-has-demo-cta #update-container>.fixed-button,
body.stockly-has-demo-cta #inventory-container>.fixed-button.save-inventory-btn {
  bottom: calc(env(safe-area-inset-bottom, 0px) + 88px);
}

#update-container>.fixed-button:hover,
#inventory-container>.fixed-button.save-inventory-btn:hover {
  transform: translateX(-50%) translateY(-1px);
}

body:has(#update-container:not(.hidden)) #content,
body:has(#inventory-container:not(.hidden)) #content {
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 96px);
}

body.stockly-has-demo-cta:has(#update-container:not(.hidden)) #content,
body.stockly-has-demo-cta:has(#inventory-container:not(.hidden)) #content {
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 168px);
}

/* Pulsante Esci in alto a destra (se presente inline nell'HTML) */
#logout-button {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 1101;
  /* sopra al fixed-button */
}

.fixed-button,
.product-save-btn,
.btn-save {
  overflow: hidden;
  isolation: isolate;
}

.btn-save {
  position: relative;
}

.fixed-button::before,
.product-save-btn::before,
.btn-save::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 160px;
  height: 160px;
  transform: translate(-50%, -50%) scale(0.55);
  border-radius: 999px;
  background: radial-gradient(circle,
      transparent 0 28%,
      rgba(255, 255, 255, 0.14) 29% 31%,
      transparent 32% 48%,
      rgba(255, 255, 255, 0.12) 49% 51%,
      transparent 52% 68%,
      rgba(255, 255, 255, 0.1) 69% 71%,
      transparent 72% 88%,
      rgba(255, 255, 255, 0.08) 89% 91%,
      transparent 92% 100%);
  opacity: 0.8;
  animation: ripple 0.8s linear infinite;
  pointer-events: none;
}

.fixed-button:hover,
.product-save-btn:hover,
.btn-save:hover {
  opacity: 0.95;
}

.fixed-button:hover {
  transform: translateY(calc(-50% - 1px));
}

@keyframes ripple {
  0% {
    transform: translate(-50%, -50%) scale(0.55);
    opacity: 0.8;
  }

  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
  }
}

/* =====================
   FORM ELEMENTS
===================== */
label {
  display: block;
  margin: 8px 0 6px;
  font-weight: 600;
  color: #111827;
}

input[type="text"],
input[type="number"],
input[type="date"],
select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

input::placeholder {
  color: #9ca3af;
}

input:focus,
select:focus {
  border-color: var(--brand-400);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, .15);
}

/* Campi con etichetta flottante */
.inputGroup {
  font-family: 'Segoe UI', sans-serif;
  margin: 1em 0;
  max-width: 190px;
  position: relative;
  --input-group-surface: var(--bg-card);
}

/* Allinea i campi data (calendar-field) all'altezza degli altri input */
.history-pane__grid>div {
  display: flex;
}

.history-pane__grid>div .calendar-field,
.history-pane__grid>div .inputGroup {
  flex: 1 1 auto;
}

.inputGroup--full {
  max-width: none;
  width: 100%;
}

.inputGroup input,
.inputGroup textarea {
  font-size: 92%;
  padding: 0.6em;
  outline: none;
  border: 2px solid rgb(200, 200, 200);
  background-color: var(--input-group-surface);
  border-radius: 14px;
  width: 100%;
  transition: border-color .3s ease, box-shadow .3s ease;
}

.inputGroup textarea {
  line-height: 1.4;
  min-height: 110px;
  resize: vertical;
}

.inputGroup label {
  font-size: 92%;
  position: absolute;
  top: 0;
  left: 0;
  right: auto;
  bottom: auto;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  transform: none;
  padding: 0 0.2em 0 0.7em;
  margin: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  color: rgb(100, 100, 100);
  transform-origin: left center;
  width: auto;
  max-width: calc(100% - 1.4em);
  text-align: left;
}

.inputGroup:focus-within label,
.inputGroup.filled label {
  top: 0;
  right: auto;
  bottom: auto;
  min-height: 0;
  height: auto;
  transform: translateY(-68%) scale(.9);
  margin: 0;
  margin-left: 0.75em;
  padding: 0.25em 0.18em 0.25em 0.75em;
  justify-content: flex-start;
  background-color: var(--input-group-surface);
  box-shadow: 0 0 0 4px var(--input-group-surface);
  line-height: 1.1;
  width: auto;
  max-width: calc(100% - 1.4em);
  text-align: left;
}

.inputGroup:focus-within :is(input, textarea),
.inputGroup.filled :is(input, textarea) {
  border-color: rgb(150, 150, 200);
}

.inputGroup :is(input:focus, textarea:focus) {
  box-shadow: none;
}

/* Nuovo Ordine: campi statici senza etichette flottanti */
#update-container .order-field {
  margin: 0;
  max-width: none;
  display: grid;
  gap: 6px;
}

#update-container .order-field>label {
  position: static;
  inset: auto;
  display: block;
  transform: none;
  padding: 0;
  margin: 0;
  pointer-events: auto;
  width: auto;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  color: rgb(75, 85, 99);
  background: transparent;
  box-shadow: none;
}

#update-container .order-field>input {
  font-size: 92%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
}

#update-container .order-field:focus-within>label,
#update-container .order-field.filled>label {
  top: auto;
  right: auto;
  bottom: auto;
  transform: none;
  margin: 0;
  padding: 0;
  width: auto;
  text-align: left;
  background: transparent;
  box-shadow: none;
}

#update-container .order-field:focus-within>input,
#update-container .order-field.filled>input {
  border-color: var(--brand-400);
}

#update-container .order-field>input:focus {
  box-shadow: 0 0 0 4px rgba(99, 102, 241, .15);
}

#update-container .order-field.has-suggestions .inline-suggestion {
  display: none;
}

#update-container .order-field.has-suggestions input {
  background-color: #fff;
}

/* Nuovo Ordine: titolo e scansione sulla stessa riga */
#update-container .order-section-header {
  margin-bottom: 8px;
}

#update-container .order-section-header h3 {
  margin: 0;
}

#update-container .order-section-header .prelievo-style-btn {
  flex-shrink: 0;
}

/* Nuovo Ordine: allineamento uniforme colonne input/azioni */
#update-table tbody td {
  vertical-align: top;
}

#update-table .number-control {
  width: 100%;
  max-width: none;
  margin: 0;
}

#update-table tbody td:nth-child(4)>button:not(.delete-button) {
  width: 100%;
}

@media (min-width: 641px) {

  /* Compensa la riga etichetta presente in ID/Fornitore */
  #update-table tbody td:nth-child(2)::before,
  #update-table tbody td:nth-child(4)::before {
    content: "";
    display: block;
    height: 22px;
  }
}

/* Mobile: disattiva l'effetto label flottante nelle 4 pagine operative */
@media (max-width: 640px) {
  body.mobile-static-labels .inputGroup {
    display: grid;
    gap: 6px;
  }

  body.mobile-static-labels .inputGroup label {
    order: -1;
    position: static;
    inset: auto;
    display: block;
    transform: none !important;
    padding: 0;
    margin: 0;
    pointer-events: auto;
    width: auto;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    color: rgb(75, 85, 99);
    background: transparent !important;
    box-shadow: none !important;
    transition: none;
  }

  body.mobile-static-labels .inputGroup :is(input, textarea, select) {
    order: 0;
  }

  body.mobile-static-labels .inputGroup :is(input, textarea)::placeholder {
    color: transparent !important;
    opacity: 0 !important;
  }

  body.mobile-static-labels .inputGroup:focus-within label,
  body.mobile-static-labels .inputGroup.filled label {
    top: auto;
    right: auto;
    bottom: auto;
    transform: none !important;
    margin: 0;
    padding: 0;
    width: auto;
    text-align: left;
    background: transparent !important;
    box-shadow: none !important;
  }
}

.calendar-input {
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* Controllo numerico con +/- */
.number-control {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 220px;
  border: 1px solid var(--brand-600);
  border-radius: 8px;
  overflow: hidden;
  background: var(--brand-600);
  min-height: 32px;
  margin: 0 auto;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.22);
}

.number-left,
.number-right {
  display: flex;
}

.number-left::before,
.number-right::after {
  content: attr(data-content);
  background: var(--brand-600);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  width: 34px;
  height: 100%;
  color: #fff;
  transition: filter 0.2s ease;
  cursor: pointer;
}

.number-left::before {
  content: "-";
  border-radius: 0;
  border-right: 0;
}

.number-right::after {
  content: "+";
  border-radius: 0;
  border-left: 0;
}

.number-quantity[type="number"] {
  flex: 1 1 auto;
  padding: 8px 10px;
  border: 0;
  width: auto;
  min-width: 0;
  appearance: textfield;
  -moz-appearance: textfield;
  font-weight: 600;
  color: #1e293b;
  background: #fff;
  text-align: center;
  border-radius: 6px;
  margin: 2px;
}

#order-requests-table .number-left::before,
#order-requests-table .number-right::after {
  min-height: 28px;
  width: 26px;
  font-size: 0.8em;
}

.number-quantity::placeholder {
  color: #94a3b8;
}

.number-quantity[type="number"]::-webkit-inner-spin-button,
.number-quantity[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  display: none;
}

/* =====================
   HISTORY CARD (Modifiche + Prelievi)
===================== */
.history-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.history-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.history-card__eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-700);
  font-weight: 800;
}

.history-card__subtitle {
  margin: 4px 0 0;
  color: var(--text-dim);
  max-width: 52ch;
}

.history-filters {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--muted);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
}

.history-filter {
  background: transparent;
  color: var(--text-dim);
  border-color: transparent;
  box-shadow: none;
  padding: 10px 14px;
  min-width: 120px;
  font-weight: 700;
}

.history-filter:hover {
  background: rgba(99, 102, 241, .08);
  color: var(--brand-700);
}

.history-filter.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
  box-shadow: 0 10px 22px rgba(79, 70, 229, .22);
}

.history-pane {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-pane__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

/* Calendario stile Keyframers con bottone chiuso */
.calendar-field {
  position: relative;
  width: 100%;
  isolation: isolate;
  margin: 1em 0;
  --unit: 9px;
  --day: 30px;
  --height-collapsed: var(--day);
  --height-expanded: auto;
  --width: 220px;
  --duration: 0.28s;
  font-family: "Roboto Condensed", "Inter", system-ui, sans-serif;
}

.calendar-field.is-open {
  z-index: 80;
}

/* Allinea i pulsanti calendario (inizio/fine) all'altezza degli altri campi */
#changes-container .calendar-toggle {
  min-height: 40px;
  padding: 8px 10px;
  font-size: 14px;
}

.calendar-field::before {
  content: "";
  display: none;
}

.calendar-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  color: #1f2937;
  border: 1px solid #d8dee9;
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .12);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  line-height: 1.1;
  min-height: 40px;
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}

.calendar-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(108, 123, 255, .35);
  border-color: rgba(108, 123, 255, .45);
}

.calendar-field.is-open .calendar-toggle {
  box-shadow: 0 0 0 3px rgba(108, 123, 255, .35), 0 16px 32px rgba(0, 0, 0, .18);
  border-color: rgba(108, 123, 255, .45);
}

.calendar-toggle__value {
  flex: 1 1 auto;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.1;
  color: #111827;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-toggle__reset {
  color: #6b7280;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
  cursor: pointer;
}

.calendar-toggle__reset[hidden] {
  display: none !important;
}

.calendar-toggle__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #4b5563;
}

.calendar-toggle__icon svg {
  width: 18px;
  height: 18px;
}

.calendar-native {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.ui-calendar {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  width: min(220px, calc(100vw - 24px));
  height: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
  border: 1px solid #d5dbe7;
  padding: 6px 8px 8px;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -4px);
  transform-origin: top center;
  transition: opacity var(--duration) ease, transform var(--duration) ease, visibility var(--duration) ease;
  z-index: 1600;
  pointer-events: none;
}

.calendar-field.is-open .ui-calendar {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

@media (min-width: 641px) {
  .ui-calendar {
    width: 100%;
    max-width: none;
  }

  .calendar-field.is-open .ui-calendar {
    transform: translate(-50%, -1px);
  }
}

.ui-calendar .ui-header {
  position: relative;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #374151;
  padding: 8px 10px 6px;
  overflow: visible;
}

.ui-text {
  position: static;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  letter-spacing: 0.08em;
  transition: opacity calc(var(--duration) * .35) ease;
}

.ui-text.-empty {
  opacity: 0;
}

.ui-text.-month-year {
  opacity: 1;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  gap: 6px;
  white-space: nowrap;
  text-align: center;
  justify-content: center;
}

.ui-nav {
  border: none;
  background: none;
  font-size: 18px;
  line-height: 1;
  color: #6b7280;
  cursor: pointer;
  padding: 0;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  appearance: none;
  border-radius: 0;
  box-shadow: none;
  outline: none;
  transition: none;
}

.ui-nav:hover {
  color: #6b7280;
}

.ui-nav.ui-nav--prev {}

.ui-nav.ui-nav--next {}

.ui-grid {
  display: none;
}

.ui-bg {
  position: absolute;
  inset: 0;
  background-color: #fff;
  border-radius: 14px;
  transform-origin: top center;
  box-shadow: 0 1rem 1rem rgba(0, 0, 0, 0.12);
  transition-duration: calc(var(--duration) * 0.5);
  transition-delay: calc(var(--duration) * 0.4);
  overflow: hidden;
}

.ui-days {
  position: relative;
  margin-top: 2px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(6, 30px);
  gap: 0;
  border: 1px solid #d8dee9;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity calc(var(--duration) * .35) ease, transform calc(var(--duration) * .35) ease;
}

.calendar-field.is-open .ui-days {
  opacity: 1;
  transform: translateY(0);
}

.ui-day {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #1f2937;
  background: #fff;
  border: 1px solid #d8dee9;
  aspect-ratio: 1 / 1;
  min-height: 30px;
  opacity: 0;
  transition: background .2s ease, color .2s ease, border-color .2s ease, opacity .25s ease;
}

.calendar-field.is-open .ui-day {
  opacity: 1;
}

.ui-day:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
}

.ui-day.-current {
  background: #111827;
  color: #fff;
  border-color: #0f172a;
}

.ui-day.-today {
  outline: 2px solid #94a3b8;
  outline-offset: -2px;
  background: #f8fafc;
}

.ui-day.is-empty {
  cursor: default;
  background: transparent;
  color: transparent;
  border-color: transparent;
  pointer-events: none;
}

/* ---------------------------------- */

.history-pane__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-start;
  margin-top: 8px;
}

.history-pane__actions .reset-cta {
  margin-left: auto;
}

.history-pane__actions input[type="submit"] {
  flex: 0 0 auto;
  margin-left: auto;
}

.history-pane__hint {
  margin: 0;
  color: var(--text-dim);
  font-size: 12px;
  flex: 1 1 100%;
  order: -1;
}

.history-results {
  border-top: 1px solid var(--border);
  padding-top: 8px;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.history-results__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.history-results__header h4 {
  margin: 0;
}

.history-card table {
  margin-top: 8px;
}

.history-pane[hidden] {
  display: none !important;
}

@media (max-width: 360px) {
  .history-filters {
    width: 100%;
    justify-content: space-between;
  }

  .history-filter {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .history-pane__grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .history-pane__actions {
    gap: 10px;
  }

  .history-pane__actions .reset-cta,
  .history-pane__actions input[type="submit"] {
    margin-left: 0;
  }

  .calendar-field {
    margin: 0;
    z-index: 1;
  }

  .calendar-field .ui-calendar {
    left: 0;
    right: auto;
    width: min(360px, calc(100vw - 44px));
    max-width: 100%;
    transform: translateY(-4px);
    z-index: 1300;
  }

  .calendar-field.is-open {
    z-index: 40;
    margin-bottom: 236px;
  }

  .calendar-field.is-open .ui-calendar {
    transform: translateY(0);
  }

  /* Su mobile mantieni la griglia completa visibile */
  .ui-day.is-empty {
    background: #f8fafc;
    border-color: #e5e7eb;
  }

  .history-results {
    overflow: visible;
  }

  #changes-result,
  #changes-by-date-name-result {
    width: 100%;
    min-width: 0;
    margin-top: 10px;
  }

  #changes-result thead,
  #changes-by-date-name-result thead {
    display: none;
  }

  #changes-result tbody,
  #changes-by-date-name-result tbody {
    display: grid;
    gap: 10px;
  }

  #changes-result tbody tr,
  #changes-by-date-name-result tbody tr {
    display: block;
    overflow: hidden;
    border: 1px solid rgba(99, 102, 241, 0.22);
    border-radius: 12px;
    background: #fff !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  }

  #changes-result td,
  #changes-by-date-name-result td {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding: 11px 13px;
    border: 0;
    border-top: 1px solid var(--border);
  }

  #changes-result td:first-child,
  #changes-by-date-name-result td:first-child {
    border-top: 0;
  }

  #changes-result td::before,
  #changes-by-date-name-result td::before {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-dim);
  }

  #changes-result td:nth-child(1)::before,
  #changes-by-date-name-result td:nth-child(1)::before {
    content: "ID prodotto";
  }

  #changes-result td:nth-child(2)::before {
    content: "Nome";
  }

  #changes-by-date-name-result td:nth-child(2)::before {
    content: "Nome prodotto";
  }

  #changes-result td:nth-child(3)::before,
  #changes-by-date-name-result td:nth-child(3)::before {
    content: "Data";
  }

  #changes-result td:nth-child(4)::before,
  #changes-by-date-name-result td:nth-child(4)::before {
    content: "Quantita precedente";
  }

  #changes-result td:nth-child(5)::before,
  #changes-by-date-name-result td:nth-child(5)::before {
    content: "Quantita attuale";
  }

  #changes-result td:nth-child(6)::before {
    content: "Quantita modificata";
  }

  #changes-by-date-name-result td:nth-child(6)::before {
    content: "Quantita movimentata";
  }

  #changes-result td:nth-child(7)::before {
    content: "Tipo";
  }

  #changes-by-date-name-result td:nth-child(7)::before,
  #changes-result td:nth-child(8)::before {
    content: "Operatore";
  }

  #changes-result td:nth-child(9)::before {
    content: "Fornitore";
  }
}

.number-left:hover::before,
.number-right:hover::after {
  filter: brightness(1.08);
}

#addForm {
  display: grid;
  grid-template-columns: minmax(140px, 180px) 1fr;
  gap: 12px 16px;
}

#addForm input[type="submit"] {
  grid-column: 1 / -1;
  justify-self: center;
}

.scan-label-short {
  display: none;
}

.quantity-label-short {
  display: none;
}

/* Mobile operational layout: compact app bars, readable search, no cut category labels. */
@media (max-width: 720px) {
  .request-actions #issue-logo.top-left {
    left: 12px !important;
    top: 50% !important;
    right: auto !important;
    width: 64px !important;
    height: 64px !important;
    max-width: 64px !important;
    max-height: 64px !important;
    transform: translateY(-50%) !important;
  }

  .request-actions #issue-logo.top-left img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
  }
}

@media (max-width: 640px) {
  body.mobile-static-labels {
    padding-left: 12px;
    padding-right: 12px;
  }

  body.mobile-static-labels #content.content-narrow {
    width: 100%;
    max-width: none;
    margin-inline: 0;
  }

  body.mobile-static-labels #search-container {
    margin-top: 14px;
    padding: 18px;
    border-radius: 14px;
  }

  body.mobile-static-labels #search-container .search-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 46px;
    align-items: start;
    gap: 12px;
    margin-bottom: 16px;
  }

  body.mobile-static-labels #search-container .search-header label {
    min-width: 0;
    transform: none;
    font-size: clamp(20px, 5.2vw, 23px);
    line-height: 1.2;
    font-weight: 800;
  }

  body.mobile-static-labels #search-container .search-header .reset-cta {
    width: 46px;
    min-width: 46px;
    height: 46px;
    margin: 0;
    justify-self: end;
  }

  button[aria-label] > .sr-only,
  .reset-cta[aria-label] > .sr-only {
    display: none;
  }

  [data-tooltip]::after {
    content: none !important;
    display: none !important;
  }

  .request-actions .fixed-button::before {
    content: none !important;
    display: none !important;
    animation: none !important;
  }

  [data-ai-scan-btn],
  .barcode-add-trigger {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    min-height: 52px !important;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
  }

  [data-ai-scan-btn] img,
  .barcode-add-trigger img {
    width: 22px !important;
    height: 22px !important;
    flex: 0 0 22px !important;
    display: block !important;
    object-fit: contain !important;
    align-self: center !important;
  }

  [data-ai-scan-btn] .scan-label,
  .barcode-add-trigger .scan-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.1;
    min-width: 0;
  }

  .scan-label-short {
    display: none;
  }

  [data-ai-scan-btn] .scan-label-full,
  .barcode-add-trigger .scan-label-full {
    display: none;
  }

  [data-ai-scan-btn] .scan-label-short,
  .barcode-add-trigger .scan-label-short {
    display: inline-flex;
  }

  .quantity-label-full {
    display: none;
  }

  .quantity-label-short {
    display: inline;
  }

  body.mobile-static-labels .toolbar .toolbar-search-row .btn-secondary {
    min-height: 52px !important;
    height: auto !important;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  body.mobile-static-labels #search-container .search-controls-row {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 12px;
  }

  body.mobile-static-labels #search-container .stockly-ai-search-group :is(input[type="text"], input[type="search"]) {
    min-height: 52px;
    padding-left: 16px !important;
    padding-right: 64px !important;
    font-size: 15px;
    line-height: 1.2;
  }

  body.mobile-static-labels #search-container .stockly-ai-search-group > label {
    max-width: calc(100% - 66px) !important;
    padding-right: 0 !important;
    font-size: 15px;
    line-height: 1.2;
  }

  body.mobile-static-labels #search-container .stockly-ai-search-voice-btn {
    right: 10px !important;
    width: 40px !important;
    height: 40px !important;
  }

  body.mobile-static-labels #search-container .search-submit-slot {
    justify-self: stretch;
    width: 100%;
  }

  body.mobile-static-labels #search-container .search-submit-slot .search-cta {
    width: 100%;
    min-height: 52px;
    justify-content: center;
  }

  .stockly-category-filter-bar.category-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .stockly-category-filter-bar[data-cat-spacing] > button,
  .button-container.stockly-category-filter-bar[data-cat-spacing] > button {
    width: 100%;
    min-width: 0;
    max-width: none;
    min-height: 56px;
    padding: 12px 10px;
    justify-content: center;
    text-align: center;
    font-size: clamp(14px, 4vw, 16px);
    line-height: 1.15;
  }

  .stockly-category-filter-bar[data-cat-spacing] > button span {
    min-width: 0;
    max-width: 100%;
  }

  .stockly-category-filter-bar[data-cat-spacing] > button span span {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  .actions-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px 42px;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
  }

  .actions-toolbar #load-button {
    grid-column: 1 / -1;
    grid-row: 2;
    min-width: 0;
  }

  .actions-toolbar .print-btn,
  .actions-toolbar .icon-button {
    grid-row: 1;
    width: 42px;
    min-width: 42px;
    height: 42px;
    justify-self: end;
  }

  .actions-toolbar .print-btn {
    grid-column: 2;
  }

  .actions-toolbar .icon-button {
    grid-column: 3;
  }

  .history-card,
  .history-pane,
  .history-results {
    min-width: 0;
  }

  .history-card__header {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .history-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 6px;
    padding: 4px;
  }

  .history-filter {
    min-width: 0;
    padding: 10px 8px;
    font-size: 13px;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
  }

  .history-results__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    align-items: center;
    gap: 10px;
  }

  .history-results__header h4 {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .history-results__header .print-btn {
    width: 42px;
    min-width: 42px;
    height: 42px;
    justify-self: end;
  }
}

.form-feedback {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  background: var(--muted);
  color: var(--text-dim);
}

.form-feedback.is-success {
  border-color: rgba(16, 185, 129, .35);
  background: rgba(16, 185, 129, .12);
  color: var(--success);
}

.form-feedback.is-error {
  border-color: rgba(239, 68, 68, .35);
  background: rgba(239, 68, 68, .12);
  color: var(--danger);
}

.form-hint {
  grid-column: 1 / -1;
  margin: 12px 0 0;
  font-size: 0.92rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-hint kbd {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--muted);
  border: 1px solid var(--border);
  font-size: 0.86rem;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  color: var(--text);
  box-shadow: inset 0 -1px 0 rgba(15, 23, 42, .1);
}

@media (max-width: 600px) {
  #addForm {
    grid-template-columns: 1fr;
  }

  input[type="text"],
  input[type="number"],
  input[type="date"],
  button,
  select {
    width: 100%;
    margin: 6px 0;
  }

  #search-container .search-controls-row {
    grid-template-columns: minmax(0, 1fr);
  }

  #search-container .search-controls-row .inputGroup--full {
    width: 100%;
    min-width: 0;
  }

  #search-container .search-controls-row .search-submit-slot {
    justify-self: end;
  }

  #search-container .search-controls-row .search-submit-slot .search-cta {
    width: auto;
  }
}

/* =====================
   TABLES
===================== */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

th,
td {
  border: 1px solid var(--border);
  padding: 12px;
  text-align: left;
}

th {
  background: linear-gradient(180deg, var(--muted), #fff);
  color: #111827;
  font-weight: 700;
  position: relative;
}

tbody tr:nth-child(odd) {
  background: #fafafc;
}

tbody tr:nth-child(even) {
  background: #ffffff;
}

tbody tr:hover {
  background: #f8fafc;
}

.qty-delta {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

.qty-delta-sign {
  font-weight: 700;
  margin-right: 2px;
}

.qty-delta--positive {
  color: #15803d;
}

.qty-delta--negative {
  color: #dc2626;
}

.qty-delta--neutral {
  color: var(--text-dim);
}

.table-group-row td {
  background: #f3f4f6;
  font-weight: 700;
  color: #111827;
}

.recently-added {
  background: linear-gradient(90deg, rgba(99, 102, 241, .08), rgba(129, 140, 248, .03));
  transition: background .25s ease;
}

.recently-added:hover {
  background: linear-gradient(90deg, rgba(99, 102, 241, .12), rgba(129, 140, 248, .06));
}

/* Colonna Nome: testo come il resto della tabella, senza stile link */
#result td:nth-child(2) a,
#result td:nth-child(2) a:visited {
  color: var(--text);
  text-decoration: none;
  font-weight: inherit;
  cursor: pointer;
}

#result td:nth-child(2) a:hover,
#result td:nth-child(2) a:focus-visible,
#result td:nth-child(2) a:active {
  color: var(--text);
  text-decoration: none;
}

/* Tabella principale risultati */
#result thead th,
#update-table thead th,
#inventory-table thead th,
#changes-result thead th,
#changes-by-date-name-result thead th,
#order-requests-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  box-shadow: inset 0 -1px 0 var(--border), 0 2px 4px rgba(0, 0, 0, .04);
}

/* Contenitore richieste ordine con scroll tabella */
#order-requests-container {
  overflow-x: hidden;
  overflow-y: visible;
  min-width: 0;
}

.order-requests-table-wrapper {
  width: 100%;
  max-width: 100%;
  max-height: 700px;
  overflow-x: auto;
  /* Cambiato da hidden a auto per permettere lo scorrimento se la tabella è larga */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Richieste ordine: solo scroll verticale (niente scorrimento orizzontale) */
#order-requests-table {
  table-layout: auto;
  width: 100%;
  min-width: 980px;
  font-size: .9rem;
}

/* Larghezze colonne: somma ~1100px come contenitore .content-narrow (evita scroll orizzontale) */
#order-requests-table thead th:nth-child(1) {
  min-width: 80px;
}

/* ID */
#order-requests-table thead th:nth-child(2) {
  min-width: 180px;
}

/* Nome */
#order-requests-table thead th:nth-child(3) {
  min-width: 80px;
}

/* Giacenza */
#order-requests-table thead th:nth-child(4) {
  min-width: 110px;
}

/* Quantità */
#order-requests-table thead th:nth-child(5) {
  min-width: 110px;
}

/* Pezzi x scatola */
#order-requests-table thead th:nth-child(6) {
  min-width: 70px;
}

/* Totale */
#order-requests-table thead th:nth-child(7) {
  min-width: 160px;
}

/* Fornitore */
#order-requests-table thead th:nth-child(8) {
  min-width: 60px;
}

/* Salva */
#order-requests-table thead th:nth-child(9) {
  min-width: 60px;
}

/* Rimuovi */


#order-requests-table thead th,
#order-requests-table tbody td {
  padding: 8px 6px;
  overflow-wrap: normal;
  word-break: normal;
  white-space: normal;
  vertical-align: middle;
  text-align: center;
  font-size: .9rem;
}

#order-requests-table thead th:nth-child(2),
#order-requests-table tbody td:nth-child(2) {
  text-align: left;
  /* Nome prodotto allineato a sinistra per leggibilità */
  padding-left: 12px;
}


#order-requests-table .number-control {
  max-width: 110px;
  min-width: 80px;
  margin: 0 auto;
  min-height: 28px;
}

#order-requests-table .number-quantity[type="number"] {
  font-size: .9rem;
  padding: 3px 5px;
  min-height: 24px;
}

#order-requests-table tbody td input[data-supplier-input="request"] {
  width: 100%;
  max-width: 150px;
  min-width: 0;
  font-size: .8rem;
  padding: 4px;
}

#order-requests-table thead th:nth-child(8),
#order-requests-table thead th:nth-child(9) {
  padding: 8px 4px;
  text-align: center;
  white-space: nowrap;
  letter-spacing: 0.02em;
  line-height: 1.15;
  hyphens: none;
  -webkit-hyphens: none;
  overflow-wrap: normal;
}


#order-requests-table tbody td:nth-child(8),
#order-requests-table tbody td:nth-child(9) {
  width: auto;
  max-width: none;
  min-width: 5rem;
  padding: 8px 4px;
  text-align: center;
  vertical-align: middle;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  -webkit-hyphens: none;
}

#order-requests-table tbody td:nth-child(8) button,
#order-requests-table tbody td:nth-child(9) button {
  hyphens: none;
  -webkit-hyphens: none;
  white-space: nowrap;
}

#order-requests-table tbody td:nth-child(8) .action_has,
#order-requests-table tbody td:nth-child(9) .delete-button {
  margin-inline: auto;
  --sz: 1rem;
  /* Ingrandita leggermente per migliore visibilità */
}

#order-requests-table .delete-button .trash-svg {
  width: calc(var(--sz) * 1.75);
  height: calc(var(--sz) * 1.75);
}



@media (max-width: 640px) {

  #main-container,
  #update-container,
  #order-requests-container,
  #inventory-container {
    padding: 14px;
  }

  #order-requests-container .button-container>.fixed-button:not(.save-suppliers-btn) {
    position: static;
    top: auto;
    right: auto;
    transform: none;
    width: 100%;
    margin: 0 0 10px;
    z-index: auto;
  }

  #update-container>.fixed-button,
  #inventory-container>.fixed-button.save-inventory-btn {
    left: 50%;
    right: auto;
    max-width: min(440px, calc(100vw - 24px));
  }

  body.stockly-has-demo-cta #update-container>.fixed-button,
  body.stockly-has-demo-cta #inventory-container>.fixed-button.save-inventory-btn {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 84px);
  }

  #order-requests-container .button-container {
    justify-content: stretch !important;
  }

  #order-requests-container .order-requests-table-wrapper {
    max-height: none;
    overflow: visible;
  }

  #result,
  #update-table,
  #inventory-table {
    margin: 10px 0 0;
  }

  #result thead,
  #update-table thead,
  #inventory-table thead {
    display: none;
  }

  #result tbody,
  #update-table tbody,
  #inventory-table tbody {
    display: grid;
    gap: 10px;
  }

  #result tbody tr,
  #update-table tbody tr,
  #inventory-table tbody tr {
    display: block;
    border: 1px solid rgba(99, 102, 241, 0.22);
    border-radius: 12px;
    background: #fff !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    overflow: hidden;
  }

  #result td,
  #update-table td,
  #inventory-table td {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 0;
    border-top: 1px solid var(--border);
    padding: 12px 14px;
    min-width: 0;
  }

  #result td:first-child,
  #update-table td:first-child,
  #inventory-table td:first-child {
    border-top: 0;
  }

  #result td::before,
  #update-table td::before,
  #inventory-table td::before {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--text-dim);
  }

  #result td:nth-child(1)::before {
    content: "ID prodotto";
  }

  #result td:nth-child(2)::before {
    content: "Nome prodotto";
  }

  #result td:nth-child(3)::before {
    content: "Giacenza";
  }

  #result td:nth-child(4)::before {
    content: "Dati";
  }

  #update-table td:nth-child(1)::before {
    content: "ID prodotto";
  }

  #update-table td:nth-child(2)::before {
    content: "Quantita da ordinare";
  }

  #update-table td:nth-child(3)::before {
    content: "Fornitore";
  }

  #update-table td:nth-child(4)::before {
    content: "Azione";
  }

  #inventory-table td:nth-child(1)::before {
    content: "ID prodotto";
  }

  #inventory-table td:nth-child(2)::before {
    content: "Nome prodotto";
  }

  #inventory-table td:nth-child(3)::before {
    content: "Numero";
  }

  #result td :is(input, select, button),
  #update-table td :is(input, select, button),
  #inventory-table td :is(input, select, button) {
    margin: 0;
  }

  #result td button,
  #update-table td button,
  #inventory-table td button {
    width: auto;
  }

  #update-table td:nth-child(4) button {
    width: 100%;
  }

  #update-table .number-control,
  #inventory-table .number-control {
    width: 100%;
    max-width: none;
    margin: 0;
  }

  /* Mobile dedicated styles for Order Requests Table */
  #order-requests-table {
    margin: 10px 0 0;
    table-layout: auto;
    width: 100%;
    min-width: 0;
  }

  #order-requests-table thead {
    display: none;
  }

  #order-requests-table tbody {
    display: grid;
    gap: 14px;
    width: 100%;
  }

  #order-requests-table tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-card) !important;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    padding: 8px 0;
    overflow: hidden;
    position: relative;
    width: 100%;
    box-sizing: border-box;
  }

  #order-requests-table td {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border: 0;
    padding: 10px 14px;
    min-width: 0;
    box-sizing: border-box;
    text-align: left;
    width: 100%;
  }

  /* Heading cells */
  #order-requests-table td:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 1;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
    padding: 12px 14px 4px;
  }

  #order-requests-table td:nth-child(2)::before {
    display: none;
  }

  #order-requests-table td:nth-child(1) {
    grid-column: 1 / -1;
    grid-row: 2;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-dim);
    padding: 0 14px 10px;
    margin-top: -4px;
    display: flex;
    flex-direction: row;
    align-items: center;
    border-bottom: 0;
  }

  #order-requests-table td:nth-child(1)::before {
    content: "ID PRODOTTO: ";
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dim);
    margin-right: 4px;
  }

  /* Info row: Giacenza and Totale Pezzi side-by-side */
  #order-requests-table td:nth-child(3) {
    grid-column: 1;
    grid-row: 3;
    border-top: 1px solid var(--border);
  }

  #order-requests-table td:nth-child(3)::before {
    content: "Giacenza attuale";
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-dim);
  }

  #order-requests-table td:nth-child(6) {
    grid-column: 2;
    grid-row: 3;
    border-top: 1px solid var(--border);
    border-left: 1px solid var(--border);
  }

  #order-requests-table td:nth-child(6)::before {
    content: "Totale pezzi";
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-dim);
  }

  /* Control inputs row: Quantità and Pezzi per scatola */
  #order-requests-table td:nth-child(4) {
    grid-column: 1;
    grid-row: 4;
    border-top: 1px solid var(--border);
  }

  #order-requests-table td:nth-child(4)::before {
    content: "Quantità richiesta";
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-dim);
  }

  #order-requests-table td:nth-child(5) {
    grid-column: 2;
    grid-row: 4;
    border-top: 1px solid var(--border);
    border-left: 1px solid var(--border);
  }

  #order-requests-table td:nth-child(5)::before {
    content: "Pezzi x scatola";
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-dim);
  }

  /* Fornitore input */
  #order-requests-table td:nth-child(7) {
    grid-column: 1 / -1;
    grid-row: 5;
    border-top: 1px solid var(--border);
  }

  #order-requests-table td:nth-child(7)::before {
    content: "Fornitore";
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-dim);
  }

  #order-requests-table td:nth-child(7) input[data-supplier-input="request"] {
    width: 100% !important;
    max-width: none !important;
    font-size: 0.95rem;
    padding: 8px 12px;
    min-height: 40px;
    box-sizing: border-box;
  }

  /* Footer action buttons: Rimuovi on left, Salva on right */
  #order-requests-table td:nth-child(9) {
    grid-column: 1;
    grid-row: 6;
    border-top: 1px solid var(--border);
    padding: 12px 14px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
  }

  #order-requests-table td:nth-child(9)::before {
    display: none;
  }

  #order-requests-table td:nth-child(9) button {
    width: 100% !important;
    min-height: 44px;
    background: #fef2f2;
    color: #ef4444;
    border: 1px solid #fee2e2;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
  }

  #order-requests-table td:nth-child(9) button::after {
    content: " Rimuovi";
  }

  #order-requests-table td:nth-child(8) {
    grid-column: 2;
    grid-row: 6;
    border-top: 1px solid var(--border);
    border-left: 1px solid var(--border);
    padding: 12px 14px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
  }

  #order-requests-table td:nth-child(8)::before {
    display: none;
  }

  #order-requests-table td:nth-child(8) button {
    width: 100% !important;
    min-height: 44px;
    background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
  }

  #order-requests-table td:nth-child(8) button::after {
    content: " Salva";
  }

  #order-requests-table .number-control {
    width: 100% !important;
    max-width: none !important;
    margin: 0;
    min-height: 36px;
  }

  #order-requests-table .number-quantity[type="number"] {
    font-size: 0.95rem;
    padding: 6px 8px;
    min-height: 32px;
  }
}

@media (max-width: 640px) {
  body.order-requests-fullscreen {
    padding: 76px 10px 16px;
  }

  body.order-requests-fullscreen header.content-narrow {
    display: grid !important;
    grid-template-columns: 60px minmax(0, 1fr) 60px !important;
    align-items: center !important;
    padding: 0 12px !important;
    min-height: 56px !important;
    height: 56px !important;
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    left: 0 !important;
    right: 0 !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
    border-bottom: 1px solid var(--border) !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05) !important;
  }

  body.order-requests-fullscreen #logo-logout {
    position: static !important;
    grid-column: 1;
    width: 36px !important;
    height: 36px !important;
    max-width: 36px !important;
    max-height: 36px !important;
    transform: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  body.order-requests-fullscreen #logo-logout img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
  }

  body.order-requests-fullscreen .page-title {
    grid-column: 2;
    text-align: center;
  }

  body.order-requests-fullscreen #page-main-title {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--text) !important;
    margin: 0 !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  body.order-requests-fullscreen #order-requests-container {
    min-height: calc(100vh - 92px);
    padding: 0 12px 20px;
  }

  body.order-requests-fullscreen #order-requests-container .order-requests-table-wrapper {
    padding: 14px;
  }

  body.order-requests-fullscreen {
    --order-requests-action-right: 12px;
  }

  body.order-requests-fullscreen #order-requests-container .order-requests-save-row .save-suppliers-btn {
    padding: 8px 12px;
    font-size: 13px;
  }

  body.order-requests-fullscreen .order-requests-fullscreen-header {
    align-items: stretch;
  }

  body.order-requests-fullscreen .order-requests-back-btn,
  body.order-requests-fullscreen .order-requests-fullscreen-header .print-btn {
    width: 100%;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  body.order-requests-fullscreen {
    padding: 114px 18px 22px;
  }

  body.order-requests-fullscreen header.content-narrow {
    --order-requests-header-height: 92px;
    min-height: var(--order-requests-header-height);
    padding: 20px 150px 16px;
  }
}

/* Pulsante scansione: stesso look dei CTA fornitore / filtri */
#order-requests-container .order-requests-scan-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
  max-width: none;
  margin: 12px 0 4px;
  gap: 0;
  min-height: 0;
  flex: 0 0 auto;
}

#order-requests-container .order-requests-scan-cta {
  /* Override di .button-container button { flex: 1 1 160px; } che in colonna gonfia l'altezza */
  flex: 0 0 auto !important;
  width: 100%;
  min-width: 0;
  min-height: 40px;
  height: 40px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, 0.28);
  color: #fff;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.24);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
}

#order-requests-container .order-requests-scan-cta:hover {
  box-shadow: 0 12px 26px rgba(79, 70, 229, 0.3);
  transform: translateY(-1px);
}

#order-requests-container .order-requests-scan-cta:active {
  transform: translateY(0);
}

#order-requests-container .order-requests-scan-cta:focus-visible {
  outline: 2px solid rgba(99, 102, 241, 0.55);
  outline-offset: 2px;
}

.supplier-search-row {
  --supplier-search-control-height: 40px;
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  max-width: none;
}

.supplier-search-row .inputGroup {
  margin: 0;
  flex: 1 1 0%;
  width: auto;
  min-width: 0;
}

.supplier-search-row button {
  flex: 0 0 auto;
  width: auto;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  font-size: 0.85rem;
  line-height: 1;
}

.supplier-search-row .supplier-search-btn {
  min-width: 168px;
  width: auto;
  margin-left: auto;
  min-height: var(--supplier-search-control-height);
  height: var(--supplier-search-control-height);
  box-sizing: border-box;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.24);
}

.supplier-search-row .supplier-search-btn:hover {
  box-shadow: 0 12px 26px rgba(79, 70, 229, 0.3);
}

.supplier-search-row .supplier-search-btn:active {
  transform: translateY(0);
}

@media (min-width: 641px) and (max-width: 900px) {
  .supplier-search-row {
    flex-wrap: wrap;
  }

  .supplier-search-row .supplier-search-btn {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  .supplier-search-row {
    --supplier-search-control-height: 40px;
    flex-wrap: wrap;
    max-width: none;
  }

  .supplier-search-row .inputGroup {
    flex: 1 1 100%;
    width: 100%;
  }

  .supplier-search-row .supplier-search-btn {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    min-height: var(--supplier-search-control-height);
    height: var(--supplier-search-control-height);
    margin: 0;
  }
}

@media (max-width: 640px) {
  #order-requests-container {
    width: 100%;
    max-width: none;
    padding: 14px 12px;
    overflow: visible;
  }

  body.order-requests-fullscreen #order-requests-container {
    width: 100%;
    min-height: calc(100vh - 108px);
    padding: 0 0 18px;
  }

  #order-requests-container .order-requests-fullscreen-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 46px;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 0 0 12px;
  }

  #order-requests-container .order-requests-fullscreen-header h3 {
    min-width: 0;
    margin: 0;
    font-size: clamp(1.1rem, 5vw, 1.35rem);
    line-height: 1.15;
    text-align: left;
  }

  body.order-requests-fullscreen #order-requests-container .order-requests-fullscreen-header h3 {
    display: none;
  }

  body.order-requests-fullscreen #order-requests-container .order-requests-fullscreen-header {
    grid-template-columns: minmax(0, 1fr) 46px;
    align-items: center;
  }

  #order-requests-container .order-requests-back-btn,
  #order-requests-container .order-requests-fullscreen-header .print-btn {
    min-height: 46px;
    height: 46px;
    margin: 0;
  }

  #order-requests-container .order-requests-back-btn {
    width: 100%;
    min-width: 0;
    padding: 0 14px;
    justify-content: center;
    white-space: normal;
    line-height: 1.1;
  }

  #order-requests-container .order-requests-fullscreen-header .print-btn {
    width: 46px;
    min-width: 46px;
    padding: 8px;
    justify-self: end;
  }

  #order-requests-container .order-requests-save-row,
  body.order-requests-fullscreen #order-requests-container .order-requests-save-row {
    display: block !important;
    height: auto;
    margin: 0 0 12px !important;
    padding: 0;
    overflow: visible;
    position: static;
    width: 100%;
  }

  #order-requests-container .order-requests-save-row .save-suppliers-btn,
  body.order-requests-fullscreen #order-requests-container .order-requests-save-row .save-suppliers-btn {
    position: static !important;
    top: auto !important;
    right: auto !important;
    transform: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    min-width: 0;
    min-height: 52px;
    margin: 0 !important;
    padding: 0 16px;
    white-space: normal;
  }

  #order-requests-container > .button-container:not(.order-requests-save-row):not(.order-requests-scan-row) {
    display: block !important;
    width: 100%;
    margin: 0 0 12px !important;
  }

  #order-requests-container .supplier-search-row {
    --supplier-search-control-height: 52px;
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 10px;
    width: 100%;
  }

  #order-requests-container .supplier-search-row .inputGroup {
    width: 100%;
    min-width: 0;
  }

  #order-requests-container .supplier-search-row .inputGroup input {
    min-height: 52px;
    padding-left: 14px;
    padding-right: 14px;
  }

  #order-requests-container .supplier-search-row .supplier-search-btn {
    width: 100%;
    min-width: 0;
    min-height: 52px;
    height: 52px;
    margin: 0;
  }

  #order-requests-container .order-requests-scan-row {
    display: block !important;
    width: 100% !important;
    margin: 0 0 12px !important;
  }

  #order-requests-container .order-requests-scan-cta {
    width: 100%;
    max-width: none;
    min-height: 52px;
    height: auto;
  }

  body.order-requests-fullscreen #order-requests-container .order-requests-table-wrapper,
  #order-requests-container .order-requests-table-wrapper {
    width: 100%;
    max-width: none;
    margin: 12px 0 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  #order-requests-table,
  #order-requests-table tbody,
  #order-requests-table tbody tr,
  #order-requests-table td {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  #order-requests-table tbody tr {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

.inputGroup.has-suggestions,
.supplier-search-group {
  position: relative;
  overflow: visible;
}

.inputGroup.has-suggestions .inline-suggestion,
.supplier-search-group .inline-suggestion {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 0.6em;
  color: #cbd5e1;
  font-size: 92%;
  font-family: inherit;
  pointer-events: none;
  white-space: pre;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transition: opacity .12s ease;
  z-index: 0;
}

.inputGroup.has-suggestions .inline-suggestion.is-visible,
.supplier-search-group .inline-suggestion.is-visible {
  opacity: 1;
}

.inputGroup.has-suggestions .inline-suggestion__prefix,
.supplier-search-group .inline-suggestion__prefix {
  visibility: hidden;
}

.inputGroup.has-suggestions .inline-suggestion__rest,
.supplier-search-group .inline-suggestion__rest {
  color: #cbd5e1;
  padding-left: 2px;
}

.inputGroup.has-suggestions input,
.supplier-search-group input {
  position: relative;
  z-index: 1;
  background-color: transparent;
  height: var(--supplier-search-control-height);
  min-height: var(--supplier-search-control-height);
  box-sizing: border-box;
}

.inputGroup.has-suggestions label,
.supplier-search-group label {
  z-index: 2;
}

.suggestions-bar {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: none;
  padding: 6px 8px;
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 14px;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(99, 102, 241, 0.04);
  max-height: 220px;
  overflow-y: auto;
  z-index: 20;
  text-align: left;
  backdrop-filter: blur(6px);
}

.suggestions-bar.is-open {
  display: grid;
  gap: 4px;
}

.suggestions-bar__item {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  padding: 9px 12px;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  box-shadow: none;
  transform: none;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.suggestions-bar__item:hover,
.suggestions-bar__item.is-active {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.16), rgba(99, 102, 241, 0.04));
  border-color: rgba(99, 102, 241, 0.28);
  box-shadow: inset 3px 0 0 rgba(99, 102, 241, 0.6);
}

.suggestions-bar__item:focus-visible {
  outline: 2px solid var(--brand-400);
  outline-offset: 1px;
}

.suggestions-bar__name {
  font-weight: 600;
  color: #0f172a;
}

.suggestions-bar__meta {
  margin-left: auto;
  font-size: 0.75rem;
  color: #4338ca;
  white-space: nowrap;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.suggestions-bar__meta:empty {
  display: none;
}

.suggestions-bar__empty {
  padding: 8px 10px;
  color: var(--text-dim);
  font-size: 0.88rem;
}

/* Evidenzia duplicati (usata da JS) */
#order-requests-table tbody tr[style*="background-color: #ffcccc"] {
  background-color: #ffe2e2 !important;
}

/* Quantità negativa o alert visivo */
.badge-warning {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
}

/* =====================
   SUPPLIER MANAGEMENT
===================== */
#supplier-management p {
  margin: 4px 0 0;
  color: var(--text-dim);
}

.supplier-management__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.supplier-management__header-actions button {
  flex: none;
  min-width: 160px;
}

.supplier-management__form {
  margin: 16px 0 12px;
}

.supplier-management__form-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.supplier-management__form-row input {
  flex: 1 1 240px;
}

.supplier-management__form-row button {
  flex: none;
  min-width: 160px;
}

#supplier-feedback {
  margin-top: 0;
}

.supplier-table-wrapper {
  overflow-x: auto;
}

#suppliers-table input[type="text"] {
  margin: 0;
}

#suppliers-table td:first-child {
  width: 100px;
  font-weight: 600;
}

#operators-table td:first-child {
  width: 80px;
  font-weight: 600;
}

#suppliers-table .actions-column {
  width: 200px;
  text-align: center;
}

#operators-table .actions-column {
  width: 260px;
  text-align: center;
}

#operators-table input,
#operators-table select {
  width: 100%;
  margin: 0;
}

.operator-status {
  font-weight: 600;
}

.operator-status--active {
  color: var(--success);
}

.operator-status--inactive {
  color: var(--danger);
}

#operators-table th:nth-child(4),
.operator-status-cell {
  text-align: center;
  vertical-align: middle;
}

.operator-status-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.checkbox-wrapper-44 input[type="checkbox"] {
  display: none;
  visibility: hidden;
}

.checkbox-wrapper-44 *,
.checkbox-wrapper-44 *::before,
.checkbox-wrapper-44 *::after {
  box-sizing: border-box;
}

.checkbox-wrapper-44 .toggleButton {
  cursor: pointer;
  display: block;
  margin: 0;
  transform-origin: 50% 50%;
  transform-style: preserve-3d;
  transition: transform 0.14s ease;
}

.checkbox-wrapper-44 .toggleButton:active {
  transform: rotateX(30deg);
}

.checkbox-wrapper-44 .toggleButton input+div {
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-radius: 50%;
  position: relative;
  width: 32px;
  height: 32px;
}

/* Stato operatori: rosso se disattivo, verde se attivo */
.operator-status-cell .toggleButton input+div {
  border-color: rgba(239, 68, 68, 0.55);
  background: #fee2e2;
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.18);
}

.operator-status-cell .toggleButton input+div svg {
  stroke: #b91c1c;
}

.operator-status-cell .toggleButton input+div:before,
.operator-status-cell .toggleButton input+div:after {
  background: #b91c1c;
}

.operator-status-cell .toggleButton input:checked+div {
  border-color: rgba(16, 185, 129, 0.6);
  background: #dcfce7;
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.2);
}

.operator-status-cell .toggleButton input:checked+div svg {
  stroke: #047857;
}

.operator-status-cell .toggleButton input:checked+div:before,
.operator-status-cell .toggleButton input:checked+div:after {
  background: #047857;
}

.checkbox-wrapper-44 .toggleButton input+div svg {
  fill: none;
  stroke-width: 2.6;
  stroke: #000;
  stroke-linecap: round;
  stroke-linejoin: round;
  width: 32px;
  height: 32px;
  display: block;
  position: absolute;
  left: -2px;
  top: -2px;
  right: -2px;
  bottom: -2px;
  z-index: 1;
  stroke-dashoffset: 124.6;
  stroke-dasharray: 0 162.6 133 29.6;
  transition: all 0.4s ease 0s;
}

.checkbox-wrapper-44 .toggleButton input+div:before,
.checkbox-wrapper-44 .toggleButton input+div:after {
  content: "";
  width: 2px;
  height: 12px;
  background: #000;
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 5px;
}

.checkbox-wrapper-44 .toggleButton input+div:before {
  opacity: 0;
  transform: scale(0.3) translate(-50%, -50%) rotate(45deg);
  -webkit-animation: bounceInBefore-44 0.3s linear forwards 0.3s;
  animation: bounceInBefore-44 0.3s linear forwards 0.3s;
}

.checkbox-wrapper-44 .toggleButton input+div:after {
  opacity: 0;
  transform: scale(0.3) translate(-50%, -50%) rotate(-45deg);
  -webkit-animation: bounceInAfter-44 0.3s linear forwards 0.3s;
  animation: bounceInAfter-44 0.3s linear forwards 0.3s;
}

.checkbox-wrapper-44 .toggleButton input:checked+div svg {
  stroke-dashoffset: 162.6;
  stroke-dasharray: 0 162.6 28 134.6;
  transition: all 0.4s ease 0.2s;
}

.checkbox-wrapper-44 .toggleButton input:checked+div:before {
  opacity: 0;
  transform: scale(0.3) translate(-50%, -50%) rotate(45deg);
  -webkit-animation: bounceInBeforeDont-44 0.3s linear forwards 0s;
  animation: bounceInBeforeDont-44 0.3s linear forwards 0s;
}

.checkbox-wrapper-44 .toggleButton input:checked+div:after {
  opacity: 0;
  transform: scale(0.3) translate(-50%, -50%) rotate(-45deg);
  -webkit-animation: bounceInAfterDont-44 0.3s linear forwards 0s;
  animation: bounceInAfterDont-44 0.3s linear forwards 0s;
}

@-webkit-keyframes bounceInBefore-44 {
  0% {
    opacity: 0;
    transform: scale(0.3) translate(-50%, -50%) rotate(45deg);
  }

  50% {
    opacity: 0.9;
    transform: scale(1.1) translate(-50%, -50%) rotate(45deg);
  }

  80% {
    opacity: 1;
    transform: scale(0.89) translate(-50%, -50%) rotate(45deg);
  }

  100% {
    opacity: 1;
    transform: scale(1) translate(-50%, -50%) rotate(45deg);
  }
}

@keyframes bounceInBefore-44 {
  0% {
    opacity: 0;
    transform: scale(0.3) translate(-50%, -50%) rotate(45deg);
  }

  50% {
    opacity: 0.9;
    transform: scale(1.1) translate(-50%, -50%) rotate(45deg);
  }

  80% {
    opacity: 1;
    transform: scale(0.89) translate(-50%, -50%) rotate(45deg);
  }

  100% {
    opacity: 1;
    transform: scale(1) translate(-50%, -50%) rotate(45deg);
  }
}

@-webkit-keyframes bounceInAfter-44 {
  0% {
    opacity: 0;
    transform: scale(0.3) translate(-50%, -50%) rotate(-45deg);
  }

  50% {
    opacity: 0.9;
    transform: scale(1.1) translate(-50%, -50%) rotate(-45deg);
  }

  80% {
    opacity: 1;
    transform: scale(0.89) translate(-50%, -50%) rotate(-45deg);
  }

  100% {
    opacity: 1;
    transform: scale(1) translate(-50%, -50%) rotate(-45deg);
  }
}

@keyframes bounceInAfter-44 {
  0% {
    opacity: 0;
    transform: scale(0.3) translate(-50%, -50%) rotate(-45deg);
  }

  50% {
    opacity: 0.9;
    transform: scale(1.1) translate(-50%, -50%) rotate(-45deg);
  }

  80% {
    opacity: 1;
    transform: scale(0.89) translate(-50%, -50%) rotate(-45deg);
  }

  100% {
    opacity: 1;
    transform: scale(1) translate(-50%, -50%) rotate(-45deg);
  }
}

@-webkit-keyframes bounceInBeforeDont-44 {
  0% {
    opacity: 1;
    transform: scale(1) translate(-50%, -50%) rotate(45deg);
  }

  100% {
    opacity: 0;
    transform: scale(0.3) translate(-50%, -50%) rotate(45deg);
  }
}

@keyframes bounceInBeforeDont-44 {
  0% {
    opacity: 1;
    transform: scale(1) translate(-50%, -50%) rotate(45deg);
  }

  100% {
    opacity: 0;
    transform: scale(0.3) translate(-50%, -50%) rotate(45deg);
  }
}

@-webkit-keyframes bounceInAfterDont-44 {
  0% {
    opacity: 1;
    transform: scale(1) translate(-50%, -50%) rotate(-45deg);
  }

  100% {
    opacity: 0;
    transform: scale(0.3) translate(-50%, -50%) rotate(-45deg);
  }
}

@keyframes bounceInAfterDont-44 {
  0% {
    opacity: 1;
    transform: scale(1) translate(-50%, -50%) rotate(-45deg);
  }

  100% {
    opacity: 0;
    transform: scale(0.3) translate(-50%, -50%) rotate(-45deg);
  }
}

.supplier-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
}

.supplier-actions button {
  flex: 0 0 auto;
  border-radius: 10px;
  padding: 0;
}

.supplier-actions .mini-ghost {
  padding: 6px 14px 7px;
  min-height: 40px;
}

.supplier-placeholder td {
  text-align: center;
  font-style: italic;
  color: var(--text-dim);
}

@media (max-width: 640px) {

  .supplier-management__header-actions button,
  .supplier-management__form-row button {
    width: 100%;
  }

  #suppliers-table .actions-column {
    width: auto;
  }

  .supplier-actions {
    flex-direction: column;
  }
}

/* =====================
   MODAL
===================== */
.modal {
  display: none;
  position: fixed;
  z-index: 1200;
  inset: 0;
  padding: 24px;
  background-color: rgba(17, 24, 39, 0.55);
  /* slate-900/55 */
  backdrop-filter: blur(2px);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--bg-card);
  margin: 0;
  padding: 20px;
  border: 1px solid var(--border);
  width: min(680px, 92%);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
}

#product-details-modal {
  /* La scheda bianca non deve avere scroll interno: scroll solo sull'overlay se serve. */
  align-items: flex-start;
  justify-content: center;
  padding:
    max(16px, env(safe-area-inset-top, 0px)) 16px max(16px, env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

#product-details-modal .modal-content {
  width: min(720px, 94vw);
  margin: 0;
  max-height: none;
  overflow: visible;
}

/* Inputs nel pop-up Dettagli Prodotto: mantieni bianco, ma riduci il bagliore */
#product-details-modal .inputGroup input,
#product-details-modal .inputGroup textarea {
  background-color: #fcfdff;
  /* quasi bianco, non grigio evidente */
  border-color: #dfe3ef;
}

#product-details-modal .inputGroup:focus-within label,
#product-details-modal .inputGroup.filled label {
  background-color: #fcfdff;
  box-shadow: 0 0 0 1px #fcfdff;
}

#product-details-modal .inputGroup :is(input:focus, textarea:focus) {
  box-shadow: none;
}

/* Allinea le dimensioni dei bottoni azione nel modale */
#product-details-modal .button-container .product-save-btn,
#product-details-modal .button-container .product-delete-btn {
  height: 50px;
  min-width: 150px;
}

@media (max-width: 640px) {
  #product-details-modal {
    padding:
      max(12px, env(safe-area-inset-top, 0px)) 12px max(12px, env(safe-area-inset-bottom, 0px));
  }

  #product-details-modal .modal-content {
    width: 100%;
    max-height: none;
    overflow: visible;
    padding: 16px;
  }
}

#supplier-management-modal {
  align-items: center;
  justify-content: center;
}

#supplier-management-modal .modal-content {
  margin: 0;
}

#operator-management-modal {
  align-items: center;
  justify-content: center;
}

#operator-management-modal .modal-content {
  margin: 0;
}

.confirm-modal {
  align-items: center;
  justify-content: center;
  z-index: 1400;
}

.confirm-modal .modal-content {
  width: min(420px, 92%);
  margin: 0;
}

#confirm-dialog.confirm-modal,
#prompt-dialog.confirm-modal {
  position: fixed;
  inset: 0;
  padding: 24px;
  background-color: rgba(17, 24, 39, 0.55);
  backdrop-filter: blur(2px);
  border: none;
  border-radius: 0;
  box-shadow: none;
  width: auto;
  gap: 0;
}

#confirm-dialog #confirm-title,
#confirm-dialog #confirm-message {
  text-align: center;
}

#confirm-dialog.confirm-modal--rich #confirm-message {
  text-align: left;
  margin-top: 12px;
}

#confirm-dialog.confirm-modal--merge .modal-content {
  width: min(500px, 94vw);
}

.barcode-merge-confirm {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.barcode-merge-confirm__lead {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: #475569;
}

.barcode-merge-confirm__flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
}

.barcode-merge-confirm__card {
  min-width: 0;
  padding: 10px 8px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}

.barcode-merge-confirm__card--out {
  border-color: rgba(245, 158, 11, 0.45);
  background: linear-gradient(180deg, #fffbeb, #fff);
}

.barcode-merge-confirm__card--keep {
  border-color: rgba(99, 102, 241, 0.4);
  background: linear-gradient(180deg, #eef2ff, #fff);
}

.barcode-merge-confirm__tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.barcode-merge-confirm__card--out .barcode-merge-confirm__tag {
  color: #b45309;
}

.barcode-merge-confirm__card--keep .barcode-merge-confirm__tag {
  color: #4338ca;
}

.barcode-merge-confirm__name {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  color: #0f172a;
  word-break: break-word;
}

.barcode-merge-confirm__hint {
  font-size: 11px;
  color: #64748b;
  line-height: 1.25;
}

.barcode-merge-confirm__plus {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: #6366f1;
  padding-top: 18px;
}

.barcode-merge-confirm__code {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid rgba(148, 163, 184, 0.25);
  font-size: 12px;
  color: #64748b;
}

.barcode-merge-confirm__code strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.03em;
}

.barcode-merge-confirm__list {
  margin: 0;
  padding: 0 0 0 18px;
  display: grid;
  gap: 6px;
  font-size: 13px;
  line-height: 1.4;
  color: #334155;
}

.barcode-merge-confirm__warn {
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(254, 226, 226, 0.65);
  border: 1px solid rgba(248, 113, 113, 0.35);
  font-size: 12px;
  font-weight: 700;
  color: #b91c1c;
  text-align: center;
}

@media (max-width: 420px) {
  .barcode-merge-confirm__flow {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .barcode-merge-confirm__plus {
    padding: 0;
    font-size: 18px;
  }
}

#prompt-dialog.confirm-modal {
  background:
    radial-gradient(circle at 50% 18%, rgba(99, 102, 241, 0.22), transparent 34%),
    rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(8px);
}

#prompt-dialog.confirm-modal .confirm-content {
  position: relative;
  width: min(430px, 92vw);
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98)),
    var(--bg-card);
  box-shadow:
    0 26px 70px rgba(15, 23, 42, 0.26),
    0 1px 0 rgba(255, 255, 255, 0.72) inset;
  overflow: hidden;
  animation: stocklyPromptIn .18s ease-out both;
}

#prompt-dialog .prompt-modal-head {
  padding: 22px 22px 8px;
  text-align: center;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.55) 0%, rgba(255, 255, 255, 0) 100%);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

#prompt-dialog .prompt-modal-body {
  padding: 18px 22px 6px;
}

#prompt-dialog .prompt-modal-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 16px;
  color: #4f46e5;
  background: linear-gradient(145deg, #eef2ff 0%, #e0e7ff 100%);
  border: 1px solid rgba(129, 140, 248, 0.45);
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.14);
}

#prompt-dialog .prompt-modal-icon-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

#prompt-dialog .prompt-modal-icon-slot svg {
  width: 26px;
  height: 26px;
}

#prompt-dialog.prompt-modal--prelievo .prompt-modal-icon-wrap {
  color: #0f766e;
  background: linear-gradient(145deg, #ecfdf5 0%, #d1fae5 100%);
  border-color: rgba(16, 185, 129, 0.42);
  box-shadow: 0 10px 22px rgba(13, 148, 136, 0.18);
}

#prompt-dialog.prompt-modal--ordine .prompt-modal-icon-wrap {
  color: #5b21b6;
  background: linear-gradient(145deg, #f5f3ff 0%, #ede9fe 100%);
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 12px 26px rgba(124, 58, 237, 0.14);
}

/* OTP / verifica amministratore — variante sicurezza */
#prompt-dialog.prompt-modal--sicurezza.confirm-modal {
  background:
    radial-gradient(circle at 50% 18%, rgba(192, 38, 211, 0.16), transparent 38%),
    rgba(15, 23, 42, 0.62);
}

#prompt-dialog.prompt-modal--sicurezza .prompt-modal-icon-wrap {
  color: #a21caf;
  background: linear-gradient(145deg, #fdf4ff 0%, #fae8ff 100%);
  border-color: rgba(192, 38, 211, 0.38);
  box-shadow: 0 12px 28px rgba(147, 51, 234, 0.14);
}

#prompt-dialog.prompt-modal--sicurezza .prompt-modal-head {
  background: linear-gradient(180deg, rgba(253, 242, 248, 0.65) 0%, rgba(255, 255, 255, 0) 100%);
  border-bottom-color: rgba(244, 114, 182, 0.14);
}

#prompt-dialog.prompt-modal--sicurezza .prompt-input:focus {
  border-color: rgba(168, 85, 247, 0.45);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.14);
}

#prompt-dialog.prompt-modal--sicurezza .confirm-accept {
  background: linear-gradient(135deg, #059669, #10b981);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #fff;
}

#prompt-dialog.prompt-modal--sicurezza .confirm-accept:hover {
  filter: brightness(1.06);
  box-shadow: 0 8px 22px rgba(16, 185, 129, 0.22);
}

#prompt-dialog #prompt-title {
  margin: 0;
  color: #0f172a;
  text-align: center;
  font-size: 1.2rem;
  line-height: 1.28;
  letter-spacing: -0.02em;
  font-weight: 800;
}

#prompt-dialog #prompt-message {
  max-width: 36ch;
  margin: 8px auto 0;
  color: #64748b;
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
}

#prompt-dialog #prompt-error {
  margin: 0 22px;
}

#prompt-dialog .confirm-actions {
  padding: 8px 22px 22px;
  margin-top: 0;
}

#prompt-dialog .prompt-field {
  margin-top: 0;
}

.confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  align-items: center;
  margin-top: 16px;
}

.confirm-actions button {
  width: auto;
  margin: 0;
}

.confirm-actions .confirm-accept {
  margin-left: auto;
}

.confirm-cancel {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}

.confirm-cancel:hover {
  background: var(--muted);
  box-shadow: none;
}

.supplier-print-modal .modal-content {
  width: min(720px, 94%);
  margin: 0;
}

.supplier-print-actions {
  justify-content: space-between;
  align-items: center;
}

.supplier-print-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.supplier-print-btn {
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}

.supplier-print-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  border-color: var(--brand-200);
}

.supplier-print-btn.is-all {
  background: linear-gradient(135deg, var(--success), #059669);
  color: #fff;
  border-color: rgba(5, 150, 105, .25);
}

.supplier-print-note {
  margin: 10px 0 0;
  font-size: .85rem;
  color: var(--text-dim);
}

.prompt-input {
  width: 100%;
  margin-top: 18px;
  padding: 13px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: #fff;
  color: #0f172a;
  font-size: 16px;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.prompt-input:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.14);
  transform: translateY(-1px);
}

.prompt-error {
  color: var(--danger);
  font-size: 12px;
  margin: 6px 0 0;
  min-height: 16px;
}

#prompt-dialog .confirm-actions button {
  min-height: 42px;
  border-radius: 14px;
  padding: 0 18px;
  font-weight: 700;
}

@keyframes stocklyPromptIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ---------- Popup prompt quantity magazzino Pro (varianti) ---------- */
.prompt-field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-top: 18px;
}

.prompt-input-label:not([hidden]) {
  display: block;
  margin: 0;
  padding: 0 2px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  text-align: left;
}

#prompt-dialog .prompt-field .prompt-input {
  margin-top: 0;
}

/*
 * Quantità nel prompt: campo numerico semplice (senza ± laterali del magazzino).
 */
#prompt-dialog .prompt-field .prompt-qty-field {
  margin-top: 0;
  width: 100%;
  max-width: min(260px, 100%);
}

#prompt-dialog .prompt-qty-field .number-quantity.prompt-qty-input[type="number"],
#prompt-dialog .prompt-qty-field .number-quantity.prompt-qty-input {
  width: 100%;
  margin: 0;
  padding: 13px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: #fff !important;
  color: #0f172a;
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  min-height: 48px;
  box-sizing: border-box;
}

#prompt-dialog .prompt-qty-field .number-quantity.prompt-qty-input:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.14);
}

#prompt-dialog .prompt-qty-field .number-quantity::placeholder {
  color: #94a3b8 !important;
}

#prompt-dialog.prompt-modal--prelievo .prompt-qty-field .number-quantity.prompt-qty-input:focus {
  border-color: #0d9488;
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.22);
}

#prompt-dialog.prompt-modal--ordine .prompt-qty-field .number-quantity.prompt-qty-input:focus {
  border-color: var(--brand-600);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.22);
}

#prompt-dialog.prompt-modal--prelievo.confirm-modal {
  background:
    radial-gradient(circle at 50% 15%, rgba(16, 185, 129, 0.28), transparent 38%),
    radial-gradient(circle at 80% 70%, rgba(6, 182, 212, 0.12), transparent 42%),
    rgba(15, 23, 42, 0.63);
}

#prompt-dialog.prompt-modal--prelievo.confirm-modal .confirm-content {
  border-color: rgba(16, 185, 129, 0.28);
  box-shadow:
    0 28px 72px rgba(6, 78, 59, 0.22),
    0 1px 0 rgba(255, 255, 255, 0.75) inset;
}

#prompt-dialog.prompt-modal--prelievo .prompt-modal-head {
  border-bottom-color: rgba(16, 185, 129, 0.18);
  background: linear-gradient(180deg, rgba(236, 253, 245, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
}

#prompt-dialog.prompt-modal--prelievo .prompt-input-label:not([hidden]) {
  color: #0f766e;
}

#prompt-dialog.prompt-modal--prelievo .confirm-accept {
  background: linear-gradient(135deg, #059669, #0d9488);
  border-color: rgba(13, 148, 136, 0.55);
  box-shadow: 0 8px 22px rgba(5, 150, 105, 0.35);
}

#prompt-dialog.prompt-modal--prelievo .confirm-accept:hover {
  box-shadow: 0 12px 28px rgba(5, 150, 105, 0.42);
}

#prompt-dialog.prompt-modal--ordine.confirm-modal {
  background:
    radial-gradient(circle at 48% 14%, rgba(139, 92, 246, 0.26), transparent 36%),
    radial-gradient(circle at 18% 85%, rgba(99, 102, 241, 0.14), transparent 40%),
    rgba(15, 23, 42, 0.62);
}

#prompt-dialog.prompt-modal--ordine.confirm-modal .confirm-content {
  border-color: rgba(139, 92, 246, 0.22);
}

#prompt-dialog.prompt-modal--ordine .prompt-modal-head {
  border-bottom-color: rgba(139, 92, 246, 0.2);
  background: linear-gradient(180deg, rgba(245, 243, 255, 0.95) 0%, rgba(255, 255, 255, 0) 100%);
}

#prompt-dialog.prompt-modal--ordine .prompt-input-label:not([hidden]) {
  color: #6d28d9;
}

#prompt-dialog.prompt-modal--ordine .confirm-accept {
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  border-color: rgba(139, 92, 246, 0.45);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}

#prompt-dialog.prompt-modal--ordine .confirm-accept:hover {
  box-shadow: 0 12px 30px rgba(124, 58, 237, 0.42);
}

/* OTP a caselle: il wrapper .confirm-content è largo 430px nel prompt standard —
   con display:contents sparisce dal layout e la card si centra davvero nel viewport */
#prompt-dialog.prompt-modal--otp-boxes.confirm-modal {
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#prompt-dialog.prompt-modal--otp-boxes.confirm-modal .confirm-content.modal-content {
  display: contents;
}

#prompt-dialog.prompt-modal--otp-boxes .prompt-modal-body {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

#prompt-dialog.prompt-modal--otp-boxes .otp-Form {
  box-sizing: border-box;
  width: 100%;
  max-width: 300px;
  margin: 0;
  padding: 30px 26px 22px;
  background: #fff;
  border-radius: 16px;
  box-shadow:
    0 8px 32px rgba(15, 23, 42, 0.14),
    0 0 0 1px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  position: relative;
}

#prompt-dialog.prompt-modal--otp-boxes .mainHeading {
  margin: 0;
  padding: 0 8px;
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f0f0f;
  text-align: center;
  line-height: 1.3;
}

#prompt-dialog.prompt-modal--otp-boxes .otpSubheading {
  margin: 0;
  padding: 0 4px;
  font-size: 0.8125rem;
  color: #374151;
  line-height: 1.45;
  text-align: center;
}

#prompt-dialog.prompt-modal--otp-boxes .inputContainer {
  box-sizing: border-box;
  width: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 4px 0 2px;
  position: relative;
}

#prompt-dialog.prompt-modal--otp-boxes .prompt-otp-composer {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  min-height: 34px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  z-index: 2;
  cursor: text;
  box-sizing: border-box;
  font-size: 16px;
  line-height: 34px;
  opacity: 0.02;
  color: transparent;
  -webkit-text-fill-color: transparent;
  caret-color: transparent;
  touch-action: manipulation;
}

#prompt-dialog.prompt-modal--otp-boxes .inputContainer:focus-within {
  outline: 0;
}

#prompt-dialog.prompt-modal--otp-boxes .inputContainer:focus-within .otp-input--display {
  filter: none;
}

#prompt-dialog.prompt-modal--otp-boxes .otp-input--display.otp-input--active {
  background: rgba(127, 129, 255, 0.22);
  box-shadow: 0 0 0 2px rgba(127, 129, 255, 0.35);
}

#prompt-dialog.prompt-modal--otp-boxes .otp-input--display {
  box-sizing: border-box;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: #e5e5e5;
  color: #2c2c2c;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  line-height: 34px;
  outline: none;
  position: relative;
  z-index: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  transition: background 0.12s ease, box-shadow 0.12s ease;
}

#prompt-dialog.prompt-modal--otp-boxes .prompt-otp-inline-error {
  margin: 0;
  min-height: 1rem;
  font-size: 0.75rem;
  color: var(--danger);
  text-align: center;
}

#prompt-dialog.prompt-modal--otp-boxes .verifyButton {
  box-sizing: border-box;
  width: 100%;
  height: 36px;
  margin-top: 2px;
  border: none;
  border-radius: 10px;
  background: rgb(127, 129, 255);
  color: #fff;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
}

#prompt-dialog.prompt-modal--otp-boxes .verifyButton:hover {
  background: rgb(144, 145, 255);
}

#prompt-dialog.prompt-modal--otp-boxes .exitBtn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  color: #111;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

#prompt-dialog.prompt-modal--otp-boxes .resendNote {
  margin: 0;
  padding-top: 2px;
  font-size: 0.75rem;
  color: #111;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

#prompt-dialog.prompt-modal--otp-boxes .resendBtn {
  background: none;
  border: none;
  color: rgb(127, 129, 255);
  font-weight: 700;
  font-size: 0.9375rem;
  cursor: pointer;
}

.modal-wide {
  width: min(820px, 95%);
  max-height: 90vh;
  overflow-y: auto;
}

.close {
  color: var(--danger);
  float: right;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  border-radius: 10px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  background: transparent;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease, box-shadow .2s ease;
}

.close:hover {
  color: #b91c1c;
  background: #fee2e2;
  border-color: rgba(239, 68, 68, 0.35);
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 8px 18px rgba(239, 68, 68, 0.18);
}

.close:active {
  transform: translateY(0);
}

.close:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
  border-color: var(--brand-200);
}

body.has-modal-open {
  overflow: hidden;
}

.client-settings-modal__content {
  position: relative;
  width: min(1180px, calc(100vw - 32px));
  max-width: 1180px;
  height: min(860px, calc(100dvh - 36px));
  max-height: calc(100dvh - 36px);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 28px;
  background:
    radial-gradient(circle at 6% 0%, rgba(99, 102, 241, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
  box-shadow:
    0 36px 90px rgba(15, 23, 42, 0.28),
    0 1px 0 rgba(255, 255, 255, 0.85) inset;
}

#client-settings-modal {
  z-index: 2000;
  padding: 18px;
  background:
    radial-gradient(circle at 20% 12%, rgba(99, 102, 241, 0.28), transparent 32%),
    radial-gradient(circle at 82% 8%, rgba(34, 211, 238, 0.18), transparent 30%),
    rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#client-settings-modal .close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 8;
  float: none;
  color: #64748b;
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(148, 163, 184, 0.28);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#client-settings-modal .close:hover {
  color: #b91c1c;
  background: #fff1f2;
  border-color: rgba(244, 63, 94, 0.28);
}

#client-settings-modal .client-settings-form {
  clear: none;
}

.client-settings-form {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 0;
  height: 100%;
  min-height: 0;
}

.client-settings-shell {
  display: grid;
  grid-template-columns: clamp(210px, 28vw, 274px) minmax(0, 1fr);
  align-items: stretch;
  min-height: 0;
  border: none;
  border-radius: 0;
  background: #f8fafc;
  overflow: hidden;
  box-shadow: none;
}

.client-settings-nav {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin: 0;
  list-style: none;
  background:
    radial-gradient(circle at 18% 0%, rgba(129, 140, 248, 0.28), transparent 28%),
    linear-gradient(205deg, #090f1d 0%, #111827 48%, #1e1b4b 118%);
  border-right: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow:
    inset -1px 0 0 rgba(255, 255, 255, 0.06),
    18px 0 40px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.client-settings-nav::before {
  content: "Menu impostazioni";
  display: block;
  padding: 28px 22px 12px;
  color: #f8fafc;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.client-settings-nav::after {
  content: "Configura profilo, operativita, branding e piano del gestionale.";
  display: block;
  order: 3;
  margin: auto 18px 20px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
  line-height: 1.45;
}

.client-settings-nav__track {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  padding: 10px 14px 18px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.45) transparent;
}

.client-settings-nav__btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 48px;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.34);
  padding: 11px 38px 11px 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.35;
  color: #a8b0bd;
  cursor: pointer;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.client-settings-nav__text {
  display: block;
  position: relative;
  z-index: 1;
}

.client-settings-nav__btn::after {
  content: "";
  position: absolute;
  right: 15px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  opacity: 0;
  transform: translateY(-50%) rotate(45deg) translateX(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.client-settings-nav__btn::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: var(--brand-500);
  opacity: 0;
  transform: scaleY(0.6);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.client-settings-nav__btn:hover {
  color: #e8edf4;
  background: rgba(99, 102, 241, 0.14);
  border-color: rgba(165, 180, 252, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 24px rgba(0, 0, 0, 0.18);
  transform: translateX(2px);
}

.client-settings-nav__btn:focus-visible {
  outline: 2px solid var(--brand-400);
  outline-offset: 1px;
  z-index: 1;
}

.client-settings-nav__btn.is-active {
  color: #f8fafc;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04)),
    linear-gradient(120deg, rgba(99, 102, 241, 0.62) 0%, rgba(79, 70, 229, 0.36) 100%);
  border-color: rgba(165, 180, 252, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 14px 32px rgba(30, 27, 75, 0.32);
}

.client-settings-nav__btn.is-active::after {
  opacity: .86;
  transform: translateY(-50%) rotate(45deg) translateX(0);
}

.client-settings-nav__btn.is-active::before {
  opacity: 1;
  transform: scaleY(1);
}

.client-settings-panels {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  overflow: hidden;
}

.client-settings-panel.client-settings-section {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  border: none;
  border-radius: 0;
  padding: 26px 30px 34px;
  background:
    radial-gradient(circle at 95% 0%, rgba(99, 102, 241, 0.08), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: none;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 102, 241, 0.38) rgba(226, 232, 240, 0.7);
}

.client-settings-panel.client-settings-section::-webkit-scrollbar,
.client-settings-nav__track::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

.client-settings-panel.client-settings-section::-webkit-scrollbar-thumb,
.client-settings-nav__track::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.38);
  background-clip: padding-box;
}

.client-settings-panel.client-settings-section::-webkit-scrollbar-track,
.client-settings-nav__track::-webkit-scrollbar-track {
  background: transparent;
}

.client-settings-panel__meta {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 4px;
}

.client-settings-help--lead {
  margin: 0 0 12px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
  max-width: 52ch;
}

.client-settings-panel.client-settings-section[hidden] {
  display: none !important;
}

.client-settings-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.client-settings-section h4 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(1.08rem, 1.4vw, 1.28rem);
  letter-spacing: -0.02em;
}

.client-settings-section__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.client-settings-overview__intro {
  flex: 1 1 280px;
  min-width: 0;
}

.client-settings-pane-head {
  margin: 0 0 2px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.95);
}

.client-settings-pane-head h4 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(1.08rem, 1.4vw, 1.28rem);
  letter-spacing: -0.02em;
}

.client-settings-pane-head--row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.client-settings-pane-head--row .client-settings-panel__meta {
  margin: 0;
  align-self: center;
}

.client-settings-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 6px;
}

.client-settings-card {
  margin: 0;
  padding: 20px 22px 22px;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  background: #fafbfc;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.88) inset;
}

.stockly-category-icon-picker-wrap {
  max-width: 100%;
}

.stockly-category-icon-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 0;
}

.stockly-category-icon-picker--compact {
  max-height: 88px;
  overflow-y: auto;
  padding: 2px 0;
  gap: 4px;
}

.stockly-category-icon-picker__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.stockly-category-icon-picker__btn:hover {
  border-color: #cbd5e1;
}

.stockly-category-icon-picker__btn.is-selected {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.stockly-category-icon-picker--compact .stockly-category-icon-picker__btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.stockly-category-icon-picker--compact .stockly-category-icon-picker__btn img {
  width: 18px !important;
  height: 18px !important;
}

.stockly-cat-icon-popover-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10040;
  background: rgba(15, 23, 42, 0.2);
}

.stockly-cat-icon-popover-panel {
  position: fixed;
  z-index: 10050;
  box-sizing: border-box;
  max-width: min(380px, calc(100vw - 24px));
  max-height: min(420px, calc(100vh - 24px));
  overflow-y: auto;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
}

.stockly-cat-icon-popover-grid {
  padding: 0;
  margin: 0;
}

.stockly-cat-icon-trigger {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.stockly-cat-icon-trigger:hover {
  border-color: #93c5fd;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.18);
}

.stockly-cat-icon-trigger:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.stockly-cat-icon-trigger img {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: brightness(0) invert(0.35);
}

.client-settings-card--inline {
  padding: 18px 20px;
}

.client-settings-card--inline .client-settings-billing {
  margin: 0;
  border: 0;
  background: transparent;
  padding: 0;
}

.client-settings-card__title {
  margin: 0 0 14px;
  padding: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #64748b;
}

.client-settings-field {
  margin: 0 !important;
}

.client-settings-grid--two .client-settings-field--wide {
  grid-column: 1 / -1;
}

.client-settings-help--footer {
  margin: 14px 0 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.55;
}

.client-settings-code {
  font-size: 0.92em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #475569;
  background: rgba(241, 245, 249, 0.95);
  padding: 1px 6px;
  border-radius: 6px;
}

.client-settings-nav__icon {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  opacity: 0.78;
}

.client-settings-nav__btn.is-active .client-settings-nav__icon {
  opacity: 1;
}

.client-settings-switch--lg {
  width: 56px;
  height: 32px;
}

.client-settings-switch--lg .client-settings-switch__slider::after {
  width: 24px;
  height: 24px;
}

.client-settings-switch--lg input:checked+.client-settings-switch__slider::after {
  transform: translateX(24px);
}

.client-settings-integrity-banner {
  margin-top: 1.75rem;
  margin-bottom: 1.5rem;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.88) 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.client-settings-integrity-banner.is-complete {
  border-color: rgba(167, 243, 208, 0.75);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.97) 0%, rgba(236, 253, 245, 0.6) 100%);
}

.client-settings-integrity-banner__inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 22px;
}

.client-settings-integrity-donut-wrap {
  position: relative;
  flex: 0 0 auto;
  width: 102px;
  height: 102px;
}

.client-settings-integrity-donut {
  display: block;
  width: 102px;
  height: 102px;
}

.client-settings-integrity-donut__track,
.client-settings-integrity-donut__ring {
  fill: none;
  stroke-width: 5.5;
}

.client-settings-integrity-donut__track {
  stroke: #e8edf3;
}

.client-settings-integrity-donut__ring {
  stroke: url(#client-settings-integrity-grad-blue);
  stroke-linecap: round;
  transition: stroke 0.35s ease, stroke-dasharray 0.5s ease;
}

.client-settings-integrity-banner.integrity-tier--high .client-settings-integrity-donut__ring {
  stroke: url(#client-settings-integrity-grad-green);
}

.client-settings-integrity-banner.is-complete .client-settings-integrity-donut__ring {
  stroke: url(#client-settings-integrity-grad-green);
}

.client-settings-integrity-donut__center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
  pointer-events: none;
}

.client-settings-integrity-donut__pct {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: #1d4ed8;
}

.client-settings-integrity-banner.integrity-tier--high .client-settings-integrity-donut__pct {
  color: #047857;
}

.client-settings-integrity-banner.is-complete .client-settings-integrity-donut__pct {
  color: #047857;
}

.client-settings-integrity-donut__count {
  margin-top: 4px;
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.client-settings-integrity-banner.is-complete .client-settings-integrity-donut__count {
  color: #6ee7b7;
}

.client-settings-integrity-banner__main {
  flex: 1 1 auto;
  min-width: 0;
  padding-left: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.client-settings-integrity-banner__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.client-settings-integrity-banner__copy {
  min-width: 0;
  flex: 1 1 auto;
}

.client-settings-integrity-banner__eyebrow {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  margin: 0 0 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  line-height: 1.35;
}

.client-settings-integrity-banner__eyebrow-icon {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  color: #94a3b8;
  opacity: 0.95;
  transform: translateY(0.12em);
}

.client-settings-integrity-banner.is-complete .client-settings-integrity-banner__eyebrow {
  color: #0f766e;
}

.client-settings-integrity-banner.is-complete .client-settings-integrity-banner__eyebrow-icon {
  color: #14b8a6;
}

.client-settings-integrity-banner strong {
  display: block;
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.client-settings-integrity-banner__lede {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.client-settings-integrity-banner__missing {
  margin: 0;
  min-width: 0;
}

.client-settings-integrity-missing__row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.client-settings-integrity-missing__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
}

.client-settings-integrity-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.client-settings-integrity-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  color: #312e81;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.client-settings-integrity-chip--more {
  color: #1e293b;
  background: #e2e8f0;
  border: 1px solid transparent;
  font-weight: 600;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}

.client-settings-integrity-banner__ok {
  display: block;
  font-size: 12px;
  line-height: 1.5;
  color: #64748b;
  font-weight: 500;
}

.client-settings-integrity-banner.is-complete .client-settings-integrity-banner__ok {
  color: #047857;
}

.client-settings-integrity-cta {
  flex: 0 0 auto;
  margin: 0;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background: #0f172a;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  align-self: center;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.14);
  transition: filter 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease, background 0.2s ease;
}

.client-settings-integrity-cta:hover {
  filter: brightness(1.08);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.2);
}

.client-settings-integrity-cta:focus-visible {
  outline: 2px solid #0f172a;
  outline-offset: 2px;
}

.client-settings-integrity-banner.is-complete .client-settings-integrity-cta {
  color: #0f172a;
  background: #fff;
  border: 1px solid #d1d5db;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.client-settings-integrity-banner.is-complete .client-settings-integrity-cta:hover {
  filter: none;
  background: #f9fafb;
  border-color: #9ca3af;
}

.client-settings-overview__missing {
  margin: 0.35rem 0 0;
  min-height: 0;
}

.client-settings-overview__missing .client-settings-integrity-missing__row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.client-settings-overview__missing .client-settings-integrity-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.client-settings-overview__missing .client-settings-integrity-banner__ok {
  font-size: 13px;
}

.client-settings-overview__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: #92400e;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.client-settings-overview {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 72px 22px 30px;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  background:
    radial-gradient(circle at top left, rgba(99, 102, 241, 0.18), transparent 30%),
    linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.75) inset;
}

.client-settings-overview__header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.client-settings-overview h3 {
  margin: 0;
  font-size: clamp(1.35rem, 2.1vw, 1.8rem);
  color: #0f172a;
  letter-spacing: -0.035em;
}

.client-settings-overview__header p,
.client-settings-overview__missing {
  margin: 8px 0 0;
  color: #475569;
  line-height: 1.5;
}

.client-settings-progress-card {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-width: 168px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.client-settings-progress-card span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.client-settings-progress-card strong {
  color: #0f172a;
  font-size: 1.4rem;
  line-height: 1;
}

.client-settings-progress-card small {
  color: #475569;
  font-size: 12px;
}

.client-settings-progress {
  position: relative;
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.client-settings-progress>span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #f59e0b 0%, #f97316 100%);
  transition: width .22s ease, background .22s ease;
}

.client-settings-progress>span.is-complete {
  background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
}

.client-settings-grid {
  display: grid;
  gap: 12px;
}

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

.client-settings-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.client-settings-select-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.client-settings-select-field label {
  margin: 0;
  font-size: 13px;
  color: #475569;
}

.client-settings-select-field select {
  min-height: 48px;
  margin: 0;
}

.client-settings-toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid #dbe4f0;
  background: rgba(255, 255, 255, 0.88);
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.client-settings-toggle-card:hover {
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.client-settings-toggle-card__copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.client-settings-toggle-card__copy strong {
  color: #0f172a;
  font-size: 15px;
}

.client-settings-toggle-card__copy small {
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
}

.client-settings-switch {
  position: relative;
  flex: 0 0 auto;
  width: 52px;
  height: 30px;
}

.client-settings-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.client-settings-switch__slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background .18s ease;
}

.client-settings-switch__slider::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.16);
  transition: transform .18s ease;
}

.client-settings-switch input:checked+.client-settings-switch__slider {
  background: linear-gradient(90deg, #4f46e5 0%, #6366f1 100%);
}

.client-settings-switch input:checked+.client-settings-switch__slider::after {
  transform: translateX(22px);
}

.client-settings-switch input:focus-visible+.client-settings-switch__slider {
  outline: 2px solid var(--brand-400);
  outline-offset: 3px;
}

/* Toggle OTP azioni sensibili — lock / unlock (stile tipo Tailwind rose / emerald) */
.client-settings-otp-lock-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  flex: 0 0 auto;
}

.client-settings-otp-lock-toggle__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.client-settings-otp-lock-toggle__track {
  position: relative;
  width: 96px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 999px;
  background: #fb7185;
  box-shadow:
    0 4px 6px -1px rgba(15, 23, 42, 0.12),
    0 2px 4px -2px rgba(15, 23, 42, 0.08);
  outline: none;
  transition: background-color 0.3s ease;
}

.client-settings-otp-lock-toggle__input:checked+.client-settings-otp-lock-toggle__track {
  background: #10b981;
}

.client-settings-otp-lock-toggle__track::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #f9fafb;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
  transition: transform 0.3s ease;
  z-index: 2;
  pointer-events: none;
}

.client-settings-otp-lock-toggle__input:checked+.client-settings-otp-lock-toggle__track::after {
  transform: translateX(48px);
}

.client-settings-otp-lock-toggle:hover .client-settings-otp-lock-toggle__track::after {
  transform: scale(0.95);
}

.client-settings-otp-lock-toggle:hover .client-settings-otp-lock-toggle__input:checked+.client-settings-otp-lock-toggle__track::after {
  transform: translateX(48px) scale(0.95);
}

.client-settings-otp-lock-toggle__input:focus-visible+.client-settings-otp-lock-toggle__track {
  outline: 2px solid var(--brand-400);
  outline-offset: 3px;
}

.client-settings-otp-lock-toggle__icon {
  position: absolute;
  top: 4px;
  width: 40px;
  height: 40px;
  pointer-events: none;
  z-index: 1;
}

.client-settings-otp-lock-toggle__icon--locked {
  left: 48px;
}

.client-settings-otp-lock-toggle__icon--unlocked {
  left: 4px;
}

.client-settings-otp-lock-toggle__icon path {
  fill: #111827;
}

.client-settings-placeholder {
  padding: 16px;
  border: 1px dashed var(--brand-300);
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand-50), #fff);
  color: #334155;
}

.client-settings-placeholder strong {
  display: block;
  margin-bottom: 6px;
  color: #0f172a;
}

.client-settings-placeholder p {
  margin: 0;
  line-height: 1.5;
  font-size: 14px;
}

.client-settings-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.client-settings-preview-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.client-settings-preview-surface {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 118px;
  padding: 16px;
  border-radius: 16px;
  border: 1px dashed #cbd5e1;
  background:
    radial-gradient(circle at top left, rgba(99, 102, 241, 0.10), transparent 48%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  overflow: hidden;
}

.client-settings-preview-surface--document {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(241, 245, 249, 0.98) 100%);
}

.client-settings-preview-surface img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 72px;
  object-fit: contain;
}

.client-settings-preview-surface span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.client-settings-help {
  margin: -6px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

.client-settings-upload-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 2px 0 4px;
}

.client-settings-upload-btn {
  font-size: 13px;
  padding: 8px 14px;
}

.client-settings-policy {
  display: grid;
  gap: 10px;
}

.client-settings-policy-option {
  display: block;
  position: relative;
  cursor: pointer;
}

.client-settings-policy-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.client-settings-policy-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}

.client-settings-policy-option:hover .client-settings-policy-card {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.client-settings-policy-option input:checked+.client-settings-policy-card {
  border-color: var(--brand-500);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.10), rgba(255, 255, 255, 0.95));
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.12);
}

.client-settings-policy-card strong {
  color: #0f172a;
  font-size: 15px;
}

.client-settings-policy-card small {
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
}

.client-settings-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--brand-200);
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.client-settings-chip--plan {
  letter-spacing: 0.06em;
  font-size: 12px;
}

.client-settings-chip--plan.is-plan-base {
  border-color: #7dd3fc;
  background: linear-gradient(135deg, #e0f2fe, #f0f9ff);
  color: #0369a1;
}

.client-settings-chip--plan.is-plan-avanzato {
  border-color: #a5b4fc;
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
  color: #4338ca;
}

.client-settings-chip--plan.is-plan-pro {
  border-color: #fcd34d;
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  color: #b45309;
}

.client-settings-panel__meta--plan {
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.client-settings-pane-head--plan .client-settings-pane-head__copy {
  flex: 1 1 220px;
  min-width: 0;
}

.client-settings-pane-head--plan .client-settings-help--lead {
  max-width: 56ch;
}

.client-settings-pane-head--plan.client-settings-pane-head--row {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.client-settings-pane-head--plan.client-settings-pane-head--row .client-settings-panel__meta {
  align-self: flex-start;
  flex: 0 0 auto;
}

.client-settings-stack--plan {
  gap: 0;
  margin-top: 4px;
}

.client-settings-plan-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.client-settings-plan-group+.client-settings-plan-group {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid rgba(226, 232, 240, 0.95);
}

.client-settings-plan-group__eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.client-settings-compare-open {
  font-size: 12px;
  padding: 7px 12px;
  border-radius: 999px;
}

.client-settings-nav__label-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.client-settings-nav__shield {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: linear-gradient(145deg, #34d399, #059669);
  color: #ecfdf5;
  box-shadow: 0 6px 14px rgba(5, 150, 105, 0.35);
}

.client-settings-nav__shield[hidden] {
  display: none !important;
}

.client-settings-nav__shield svg {
  width: 13px;
  height: 13px;
  display: block;
}

.client-settings-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.client-settings-status-card {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid #dbe4f0;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.client-settings-status-card strong {
  display: block;
  margin-top: 6px;
  color: #0f172a;
  font-size: 1rem;
}

.client-settings-status-card p {
  margin: 8px 0 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.5;
}

.client-settings-status-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #64748b;
}

.client-settings-billing-next {
  margin: 0;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid #dbe4f0;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.client-settings-invoices__lead {
  margin: -4px 0 12px;
  font-size: 13px;
  line-height: 1.45;
  color: #64748b;
}

.client-settings-invoices--footer {
  margin-top: 6px;
  padding-top: 18px;
  border-top: 1px solid rgba(226, 232, 240, 0.95);
}

.client-settings-invoice-list {
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.client-settings-invoice-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  border-bottom: 1px solid #e8eef5;
}

.client-settings-invoice-row:last-child {
  border-bottom: none;
}

.client-settings-invoice-row__icon {
  flex: 0 0 auto;
}

.client-settings-invoice-row__icon-circle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
}

.client-settings-invoice-row__icon-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #22c55e;
}

.client-settings-invoice-row__main {
  flex: 1;
  min-width: 0;
}

.client-settings-invoice-row__title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.client-settings-invoice-row__meta {
  margin: 4px 0 0;
  font-size: 13px;
  color: #64748b;
}

.client-settings-invoice-row__download {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 0;
  border: none;
  background: none;
  font-size: 14px;
  font-weight: 700;
  color: #2563eb;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.client-settings-invoice-row__download:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.client-settings-invoice-row__download svg {
  flex-shrink: 0;
  stroke: currentColor;
}

@media (max-width: 720px) {
  .client-settings-invoice-row {
    flex-wrap: wrap;
    gap: 12px 14px;
  }

  .client-settings-invoice-row__download {
    width: 100%;
    margin-left: calc(44px + 18px);
    justify-content: flex-start;
  }
}

.client-settings-help--usage-lead {
  margin: 0 0 6px;
  font-size: 12px;
  line-height: 1.45;
  color: #64748b;
  font-weight: 400;
  max-width: 40rem;
}

.client-settings-help--usage-lead strong {
  font-weight: 600;
  color: #334155;
}

.client-settings-limits {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  width: 100%;
  min-width: 0;
}

#client-settings-panel-utilizzo .client-settings-limits {
  /* Contenuto sotto l’intestazione: un solo “telaio” = bordo del pannello, senza scatole annidate. */
  margin-top: 2px;
}

.client-settings-usage-section {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.client-settings-usage-section--extra {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.client-settings-usage-section__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 14px;
  padding: 0 0 6px;
  margin: 0;
  border: none;
  flex-wrap: wrap;
}

.client-settings-usage-section__head-text {
  flex: 1 1 200px;
  min-width: 0;
}

.client-settings-usage-section__eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #475569;
}

.client-settings-usage-section__hint {
  margin: 2px 0 0;
  font-size: 11px;
  line-height: 1.4;
  color: #64748b;
  max-width: 40ch;
}

.client-settings-usage-section__compare {
  flex: 0 0 auto;
  align-self: center;
  white-space: nowrap;
}

.client-settings-usage-rows {
  display: flex;
  flex-direction: column;
  padding: 0 0 2px;
  margin: 0;
}

.client-settings-usage-rows .client-settings-limit-row--in-stack {
  margin: 0;
  border-radius: 0;
  border: none;
  box-shadow: none;
  border-bottom: 1px solid #eef2f7;
  background: transparent;
}

.client-settings-usage-rows .client-settings-limit-row--in-stack:last-child {
  border-bottom: none;
}

.client-settings-usage-rows .client-settings-limit-row--muted {
  border-left: none;
  background: transparent;
}

.client-settings-usage-rows .client-settings-limit-row--promo {
  border-top: 1px dashed rgba(251, 191, 36, 0.45);
  margin-top: 0;
  background: linear-gradient(145deg, rgba(254, 252, 232, 0.45), rgba(255, 255, 255, 0.65));
}

.client-settings-usage-rows--metrics {
  gap: 7px;
  padding: 0 0 6px;
}

.client-settings-usage-section--extra .client-settings-limit-row .client-settings-limit-text strong {
  font-size: 12px;
}

.client-settings-usage-section--extra .client-settings-limit-text>span {
  font-size: 11px;
}

.client-settings-limits-card {
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.92) inset,
    0 10px 28px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.client-settings-limits-card--upgrade {
  border-color: rgba(99, 102, 241, 0.22);
  background: linear-gradient(180deg, #fafbff 0%, #fff 48%);
}

.client-settings-limits-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px 18px;
  padding: 16px 18px;
  border-bottom: 1px solid #f1f5f9;
  flex-wrap: wrap;
}

.client-settings-limits-card__head--compact {
  padding-bottom: 10px;
  border-bottom: none;
}

.client-settings-limits-card__head-text {
  flex: 1 1 220px;
  min-width: 0;
}

.client-settings-limits-card__eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #64748b;
}

.client-settings-limits-card__hint {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: #64748b;
  max-width: 42ch;
}

.client-settings-limits-card__compare-all {
  flex: 0 0 auto;
  align-self: center;
  white-space: nowrap;
}

.client-settings-limits-card__body--stacked {
  padding: 0;
}

.client-settings-limits-card__body--stacked .client-settings-limit-row--in-stack {
  margin: 0;
  border-radius: 0;
  border: none;
  box-shadow: none;
  border-bottom: 1px solid #eef2f7;
  background: transparent;
}

.client-settings-limits-card__body--stacked .client-settings-limit-row--in-stack:last-child {
  border-bottom: none;
}

.client-settings-limits-card__body--stacked .client-settings-limit-row--muted {
  border-left: none;
  background: transparent;
}

.client-settings-limits-card__body--stacked .client-settings-limit-row--promo {
  border-top: 1px dashed rgba(251, 191, 36, 0.45);
  margin-top: 0;
  background: linear-gradient(145deg, rgba(254, 252, 232, 0.5), rgba(255, 255, 255, 0.75));
}

.client-settings-billing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid #dbe4f0;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(255, 255, 255, 0.96));
}

.client-settings-billing-btn {
  text-decoration: none;
  white-space: nowrap;
}

.client-settings-billing-btn--primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border-radius: 12px;
  border: 1px solid #1d4ed8;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #f8fafc !important;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.client-settings-billing-btn--primary:hover {
  filter: brightness(1.04);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.34);
  transform: translateY(-1px);
}

.client-settings-billing-btn--primary:active {
  transform: translateY(0);
}

.client-settings-billing-plan-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  border: none;
  box-sizing: border-box;
}

/* Gradienti allineati alla selezione piano in attiva.html */
.client-settings-billing-plan-pill--base {
  background: linear-gradient(to right, #6366f1 0%, #22d3ee 100%);
  color: #eaf2ff;
  text-shadow: 0 2px 12px rgba(16, 62, 98, 0.28);
  box-shadow:
    0 4px 20px rgba(54, 209, 220, 0.14),
    0 8px 24px rgba(0, 0, 0, 0.14);
}

.client-settings-billing-plan-pill--avanzato {
  background: linear-gradient(115deg, #b45309 0%, #ca8a04 28%, #eab308 55%, #fbbf24 78%, #fde047 100%);
  color: #fef3c7;
  text-shadow: 0 2px 12px rgba(120, 53, 15, 0.35);
  box-shadow:
    0 4px 24px rgba(234, 179, 8, 0.22),
    0 8px 24px rgba(0, 0, 0, 0.16);
}

.client-settings-billing-plan-pill--pro {
  background: linear-gradient(118deg, #475569 0%, #64748b 12%, #94a3b8 24%, #e2e8f0 40%, #ede9fe 56%, #ddd6fe 68%, #c4b5fd 80%, #f8fafc 100%);
  color: #0f172a;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
  box-shadow:
    0 4px 20px rgba(196, 181, 253, 0.15),
    0 0 28px rgba(129, 140, 248, 0.12),
    0 8px 24px rgba(0, 0, 0, 0.14);
}

@media (max-width: 560px) {
  .client-settings-pane-head--plan .client-settings-billing-plan-pill {
    max-width: 100%;
    text-align: center;
    white-space: normal;
    justify-content: center;
  }
}

.client-settings-totp-modal {
  z-index: 1450;
  background-color: rgba(15, 23, 42, 0.62);
}

.client-settings-totp-modal__content {
  width: min(620px, 94vw);
  padding: 22px;
  border-color: rgba(99, 102, 241, 0.16);
  background:
    radial-gradient(circle at top left, rgba(99, 102, 241, 0.13), transparent 36%),
    #fff;
}

.client-settings-totp-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  clear: both;
}

.client-settings-totp-hero {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding-right: 32px;
}

.client-settings-totp-hero__icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-700), var(--brand-500));
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.28);
}

.client-settings-totp-hero h3 {
  margin: 4px 0 6px;
  color: #0f172a;
  font-size: 1.25rem;
  line-height: 1.2;
}

.client-settings-totp-hero p {
  margin: 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.55;
}

.client-settings-totp-steps {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: totp-step;
}

.client-settings-totp-steps li {
  counter-increment: totp-step;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
}

.client-settings-totp-steps li::before {
  content: counter(totp-step);
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  color: #312e81;
  background: #eef2ff;
  font-size: 12px;
  font-weight: 800;
}

.client-settings-totp-panel {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid #dbe4f0;
  border-radius: 16px;
  background: #f8fafc;
}

.client-settings-totp-panel label,
.client-settings-totp-code label {
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.client-settings-totp-copy-row,
.client-settings-totp-link-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  flex-wrap: wrap;
}

.client-settings-totp-link-row {
  justify-content: flex-end;
}

.client-settings-totp-panel input,
.client-settings-totp-panel textarea,
.client-settings-totp-code input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  box-sizing: border-box;
}

.client-settings-totp-panel input {
  flex: 1 1 260px;
  min-width: 0;
  padding: 10px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: .04em;
}

.client-settings-totp-panel textarea {
  min-height: 78px;
  padding: 10px 12px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
}

.client-settings-totp-code {
  display: grid;
  gap: 8px;
}

.client-settings-totp-code input {
  max-width: 220px;
  padding: 12px 14px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: .22em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.client-settings-totp-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

#client-settings-totp-submit[disabled] {
  opacity: .65;
  cursor: wait;
  box-shadow: none;
}

.client-settings-limit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 8px 22px rgba(15, 23, 42, 0.04);
}

.client-settings-limit-row--promo {
  border-color: rgba(251, 191, 36, 0.5);
  background: linear-gradient(145deg, rgba(254, 252, 232, 0.95), rgba(255, 255, 255, 0.98));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset, 0 10px 26px rgba(180, 83, 9, 0.07);
}

.client-settings-limit-row--muted {
  border-left: 3px solid #cbd5e1;
  background: linear-gradient(90deg, rgba(248, 250, 252, 0.95) 0%, #fff 12%);
}

.client-settings-limit-text {
  flex: 1 1 200px;
  min-width: 0;
}

.client-settings-limit-row strong {
  display: block;
  color: #0f172a;
  font-size: 14px;
}

.client-settings-limit-row .client-settings-limit-text>span {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.client-settings-limit-usage {
  flex: 1 1 220px;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
}

.client-settings-limit-usage__head {
  display: flex;
  justify-content: flex-end;
}

.client-settings-limit-usage__value {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.client-settings-usage-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.client-settings-usage-bar__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #60a5fa, #2563eb);
  transition: width 0.35s ease;
}

.client-settings-usage-bar--warn .client-settings-usage-bar__fill {
  background: linear-gradient(90deg, #fb923c, #ea580c);
}

.client-settings-usage-bar__caption {
  font-size: 12px;
  color: #64748b;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.client-settings-usage-block {
  padding: 0 0 8px;
  margin: 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
}

.client-settings-usage-planhead__kicker {
  margin: 0 0 4px;
  font-size: 13px;
  color: #475569;
  font-weight: 500;
}

.client-settings-usage-planhead__kicker strong {
  font-weight: 600;
  color: #1e293b;
}

.client-settings-usage-planhead__text {
  margin: 0 0 4px;
  font-size: 12px;
  line-height: 1.45;
  color: #64748b;
}

.client-settings-usage-planhead__next {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: #64748b;
  font-weight: 400;
}

.client-settings-usage-planhead__next strong {
  font-weight: 600;
  color: #334155;
}

.client-settings-usage-metric {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 10px 7px;
  background: #fcfdfe;
  box-shadow: none;
}

.client-settings-usage-metric__head {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 6px;
}

.client-settings-usage-metric__head strong {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
}

.client-settings-usage-metric__sub {
  font-size: 11px;
  color: #64748b;
  line-height: 1.35;
}

.client-settings-usage-metric__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 8px;
  margin-bottom: 6px;
}

.client-settings-usage-metric__stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.client-settings-usage-metric__label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  color: #64748b;
}

.client-settings-usage-metric__num {
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
  line-height: 1.2;
}

.client-settings-usage-metric__of {
  font-size: 12px;
  font-weight: 500;
  color: #94a3b8;
}

.client-settings-usage-metric__pct {
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  margin-left: 2px;
}

.client-settings-usage-metric .client-settings-limit-usage {
  margin: 0 0 5px;
}

.client-settings-usage-metric .client-settings-usage-bar {
  height: 3px;
  background: #f1f5f9;
  border-radius: 999px;
}

.client-settings-usage-metric .client-settings-usage-bar__fill {
  background: linear-gradient(90deg, #a5b4fc, #6366f1);
  opacity: 0.85;
}

.client-settings-usage-metric .client-settings-usage-bar--warn .client-settings-usage-bar__fill {
  background: linear-gradient(90deg, #fcd34d, #d97706);
  opacity: 0.9;
}

.client-settings-usage-metric__rinnovo {
  margin: 0 0 5px;
  font-size: 11px;
  line-height: 1.4;
  color: #64748b;
  padding: 4px 6px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(226, 232, 240, 0.95);
}

.client-settings-usage-metric__rinnovo--static {
  background: rgba(248, 250, 252, 0.95);
  border-color: #e2e8f0;
}

.client-settings-usage-metric__rinnovo-label {
  display: block;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: #4338ca;
  margin-bottom: 1px;
}

.client-settings-usage-metric__rinnovo--static .client-settings-usage-metric__rinnovo-label {
  color: #64748b;
}

.client-settings-usage-metric__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 7px;
  border-radius: 6px;
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid #f1f5f9;
}

.client-settings-usage-metric__foot--empty {
  background: rgba(254, 242, 242, 0.5);
  border-color: #fecaca;
}

.client-settings-usage-metric__remaining {
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: #0d9488;
  flex: 0 0 auto;
  opacity: 0.9;
}

.client-settings-usage-metric__foot--empty .client-settings-usage-metric__remaining {
  color: #dc2626;
  opacity: 0.9;
}

.client-settings-usage-metric__remaining-hint {
  margin: 1px 0 0;
  font-size: 10px;
  line-height: 1.35;
  color: #64748b;
  max-width: 100%;
}

.client-settings-limit-excluded,
.client-settings-limit-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.client-settings-limit-pill {
  display: inline-flex;
  padding: 6px 11px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #f59e0b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #92400e;
  box-shadow: 0 1px 2px rgba(180, 83, 9, 0.12);
}

.client-settings-upgrade-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-radius: 10px;
  border: 2px solid #d97706;
  background: #fffef9;
  color: #9a3412 !important;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.14);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.client-settings-upgrade-btn:hover {
  background: #fffbeb;
  border-color: #b45309;
  box-shadow: 0 6px 18px rgba(217, 119, 6, 0.2);
}

.client-settings-text-btn {
  border: 0;
  background: none;
  padding: 2px 0;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-600, #4f46e5);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  border-radius: 0;
  box-shadow: none;
}

.client-settings-text-btn:hover {
  color: var(--brand-700, #4338ca);
}

.client-settings-plan-compare {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: grid;
  place-items: center;
  align-content: safe center;
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(20px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.client-settings-plan-compare[hidden] {
  display: none !important;
}

.client-settings-plan-compare__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
}

.client-settings-plan-compare__sheet {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  max-width: 100%;
  display: flex;
  flex-direction: column;
  padding: 0;
  margin-block: auto;
  border-radius: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.client-settings-plan-compare__scroll {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 20px;
  margin-top: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.client-settings-plan-compare__max {
  padding: 0 16px;
  text-align: center;
  box-sizing: border-box;
  max-width: 36ch;
}

.client-settings-plan-compare__max-title {
  margin: 0 0 10px;
  font-size: clamp(1.05rem, 2.8vw, 1.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.25;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
}

.client-settings-plan-compare__max-lead {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #334155;
  margin-inline: auto;
}

.client-settings-plan-compare .client-settings-vetrina-track {
  justify-content: flex-start;
  padding: 22px max(10px, env(safe-area-inset-right, 0px)) 0 max(10px, env(safe-area-inset-left, 0px));
  width: 100%;
  box-sizing: border-box;
  overflow: visible;
}

.client-settings-plan-compare .client-settings-vetrina-card:not([hidden]) {
  flex: 0 1 min(380px, 100%);
  max-width: 400px;
  overflow: visible;
}

/* Confronto piani — card stile vetrina (#offerta su index) */
.client-settings-vetrina-track {
  display: flex;
  gap: 22px;
  padding: 26px 20px 28px;
  align-items: stretch;
  box-sizing: border-box;
}

.client-settings-vetrina-card {
  --vetrina-brand1: #6c7bff;
  --vetrina-brand2: #36d1dc;
  --vetrina-accent: #22c55e;
  --vetrina-ambient: rgba(54, 209, 220, 0.42);
  --vetrina-ambient2: rgba(108, 123, 255, 0.28);
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  z-index: 1;
  overflow: visible;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.45));
}

.client-settings-vetrina-card__shell {
  --vetrina-bg: linear-gradient(to right, var(--vetrina-brand1) 0%, var(--vetrina-brand2) 100%);
  width: 100%;
  min-height: 288px;
  padding: 6px;
  border-radius: 1.05rem;
  background: var(--vetrina-brand1);
  background: var(--vetrina-bg);
  border: none;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14) inset,
    0 6px 22px rgba(0, 0, 0, 0.42),
    0 0 36px var(--vetrina-ambient),
    0 0 64px var(--vetrina-ambient2);
  position: relative;
  z-index: 1;
  overflow: visible;
  transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

.client-settings-vetrina-card__shell::before,
.client-settings-vetrina-card__shell::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 1rem;
  z-index: -1;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.client-settings-vetrina-card__shell::before {
  background: linear-gradient(to bottom right, var(--vetrina-brand2) 0%, var(--vetrina-accent) 100%);
  transform: rotate(2deg);
}

.client-settings-vetrina-card__shell::after {
  background: linear-gradient(to top right, var(--vetrina-brand1) 0%, var(--vetrina-brand2) 100%);
  transform: rotate(-2deg);
  filter: none;
  opacity: 1;
}

.client-settings-vetrina-card--gold {
  --vetrina-bg: linear-gradient(115deg, #b45309 0%, #ca8a04 28%, #eab308 55%, #fbbf24 78%, #fde047 100%);
  --vetrina-ambient: rgba(250, 204, 21, 0.5);
  --vetrina-ambient2: rgba(251, 146, 60, 0.22);
}

.client-settings-vetrina-card--gold .client-settings-vetrina-card__shell::before {
  background: linear-gradient(to bottom right, #fcd34d 0%, #fbbf24 42%, #d97706 100%);
}

.client-settings-vetrina-card--gold .client-settings-vetrina-card__shell::after {
  background: linear-gradient(to top right, #92400e 0%, #ca8a04 45%, #facc15 100%);
}

.client-settings-vetrina-card--flame {
  z-index: 2;
  --vetrina-ambient: rgba(196, 181, 253, 0.55);
  --vetrina-ambient2: rgba(129, 140, 248, 0.32);
}

.client-settings-vetrina-card--flame .client-settings-vetrina-card__shell {
  --vetrina-bg: linear-gradient(118deg,
      #475569 0%,
      #64748b 12%,
      #94a3b8 24%,
      #e2e8f0 40%,
      #ede9fe 56%,
      #ddd6fe 68%,
      #c4b5fd 80%,
      #f8fafc 100%);
  animation: clientSettingsVetrinaProGlow 2.6s ease-in-out infinite;
}

.client-settings-vetrina-card--flame .client-settings-vetrina-card__shell::before {
  background: linear-gradient(to bottom right, #f8fafc 0%, #e2e8f0 22%, #e9d5ff 48%, #c4b5fd 72%, #a78bfa 100%);
  animation: clientSettingsVetrinaProFlicker 1.55s ease-in-out infinite;
}

.client-settings-vetrina-card--flame .client-settings-vetrina-card__shell::after {
  background: linear-gradient(to top right, #334155 0%, #64748b 28%, #7c3aed 42%, #a78bfa 62%, #e9d5ff 88%, #f1f5f9 100%);
  animation: clientSettingsVetrinaProFlicker 2.05s ease-in-out infinite reverse;
}

.client-settings-vetrina-card--base:hover .client-settings-vetrina-card__shell,
.client-settings-vetrina-card--gold:hover .client-settings-vetrina-card__shell {
  transform: translateY(-5px);
  filter: brightness(1.05) saturate(1.06);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18) inset,
    0 12px 32px rgba(0, 0, 0, 0.48),
    0 0 48px var(--vetrina-ambient),
    0 0 88px var(--vetrina-ambient2);
}

.client-settings-vetrina-card--base:hover .client-settings-vetrina-card__shell::before,
.client-settings-vetrina-card--base:hover .client-settings-vetrina-card__shell::after,
.client-settings-vetrina-card--gold:hover .client-settings-vetrina-card__shell::before,
.client-settings-vetrina-card--gold:hover .client-settings-vetrina-card__shell::after {
  opacity: 0.88;
}

.client-settings-vetrina-card--flame:hover .client-settings-vetrina-card__shell {
  transform: translateY(-5px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.16) inset,
    0 0 32px rgba(237, 233, 254, 0.92),
    0 0 56px rgba(196, 181, 253, 0.72),
    0 0 96px rgba(167, 139, 250, 0.52),
    0 0 132px rgba(124, 58, 237, 0.28);
  filter: brightness(1.06) saturate(1.1);
}

.client-settings-vetrina-card--flame:hover .client-settings-vetrina-card__shell::before,
.client-settings-vetrina-card--flame:hover .client-settings-vetrina-card__shell::after {
  opacity: 0.35;
  animation: none;
}

.client-settings-vetrina-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  padding: 7px 18px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0a1628;
  background: linear-gradient(135deg, #fef08a 0%, #facc15 45%, #fb923c 100%);
  border: 1px solid rgba(255, 237, 160, 0.9);
  box-shadow:
    0 0 26px rgba(250, 204, 21, 0.65),
    0 0 48px rgba(56, 189, 248, 0.2),
    0 4px 0 rgba(255, 255, 255, 0.4) inset;
  white-space: nowrap;
  pointer-events: none;
}

.client-settings-vetrina-badge--next {
  color: #042f2e;
  background: linear-gradient(135deg, #22d3ee 0%, #06b6d4 42%, #2dd4bf 100%);
  border: 1px solid rgba(165, 243, 252, 0.95);
  box-shadow:
    0 0 24px rgba(34, 211, 238, 0.55),
    0 0 40px rgba(45, 212, 191, 0.25),
    0 3px 0 rgba(255, 255, 255, 0.35) inset;
}

.client-settings-vetrina-card__inner {
  background:
    radial-gradient(120% 90% at 50% -30%, rgba(255, 255, 255, 0.07), transparent 52%),
    linear-gradient(168deg, #121f38 0%, #0c1528 45%, #0a0f1c 100%);
  color: #e6ebff;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100%;
  overflow: visible;
  border-radius: 0.72rem;
  position: relative;
  z-index: 2;
  padding: 20px 17px 17px;
  gap: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    inset 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.client-settings-vetrina-card__title {
  margin: 0;
  text-align: center;
  font-size: 18px;
  line-height: 1.12;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #f4f8ff;
  font-weight: 700;
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  text-shadow:
    0 2px 16px rgba(0, 0, 0, 0.35),
    0 8px 24px rgba(16, 62, 98, 0.28);
}

.client-settings-vetrina-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  width: 100%;
  margin: 0;
}

.client-settings-vetrina-metric {
  margin: 0;
  padding: 12px 11px 12px;
  border-radius: 13px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  min-width: 0;
}

.client-settings-vetrina-card--base .client-settings-vetrina-metric {
  border-color: rgba(125, 211, 252, 0.14);
  background: linear-gradient(155deg, rgba(56, 189, 248, 0.1), rgba(255, 255, 255, 0.02));
}

.client-settings-vetrina-card--gold .client-settings-vetrina-metric {
  border-color: rgba(253, 224, 71, 0.16);
  background: linear-gradient(155deg, rgba(250, 204, 21, 0.11), rgba(255, 255, 255, 0.02));
}

.client-settings-vetrina-card--flame .client-settings-vetrina-metric {
  border-color: rgba(196, 181, 253, 0.16);
  background: linear-gradient(155deg, rgba(167, 139, 250, 0.1), rgba(255, 255, 255, 0.02));
}

.client-settings-vetrina-metric--wide {
  grid-column: 1 / -1;
}

.client-settings-vetrina-metric-label {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(203, 213, 225, 0.72);
  font-weight: 700;
}

.client-settings-vetrina-metric-value {
  margin: 7px 0 0;
  display: grid;
  gap: 3px;
  color: #eaf2ff;
  font-size: 13px;
  line-height: 1.32;
  font-weight: 600;
}

.client-settings-vetrina-metric-value strong {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.18;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.client-settings-vetrina-metric-value span {
  color: rgba(226, 232, 240, 0.88);
  font-size: 12px;
}

.client-settings-vetrina-card--base[data-plan-col].is-current-plan .client-settings-vetrina-card__shell {
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.22) inset,
    0 0 0 3px rgba(34, 211, 238, 0.85),
    0 0 40px rgba(34, 211, 238, 0.45),
    0 0 72px rgba(56, 189, 248, 0.22),
    0 16px 40px rgba(0, 0, 0, 0.45);
  transform: translateY(-3px);
}

.client-settings-vetrina-card--base[data-plan-col].is-current-plan .client-settings-vetrina-card__inner {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 0 0 1px rgba(34, 211, 238, 0.28);
}

.client-settings-vetrina-card--gold[data-plan-col].is-current-plan .client-settings-vetrina-card__shell {
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.2) inset,
    0 0 0 3px rgba(251, 191, 36, 0.95),
    0 0 44px rgba(250, 204, 21, 0.55),
    0 0 80px rgba(251, 146, 60, 0.25),
    0 16px 40px rgba(0, 0, 0, 0.45);
  transform: translateY(-3px);
}

.client-settings-vetrina-card--gold[data-plan-col].is-current-plan .client-settings-vetrina-card__inner {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 0 0 1px rgba(253, 224, 71, 0.32);
}

.client-settings-vetrina-card--flame[data-plan-col].is-current-plan .client-settings-vetrina-card__shell {
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.18) inset,
    0 0 0 3px rgba(167, 139, 250, 0.92),
    0 0 48px rgba(196, 181, 253, 0.55),
    0 0 88px rgba(124, 58, 237, 0.32),
    0 16px 40px rgba(0, 0, 0, 0.45);
  transform: translateY(-3px);
  animation: clientSettingsVetrinaProGlow 2.6s ease-in-out infinite;
}

.client-settings-vetrina-card--flame[data-plan-col].is-current-plan .client-settings-vetrina-card__inner {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 0 0 1px rgba(196, 181, 253, 0.35);
}

@keyframes clientSettingsVetrinaProGlow {

  0%,
  100% {
    box-shadow:
      0 0 12px rgba(241, 245, 249, 0.65),
      0 0 26px rgba(196, 181, 253, 0.45),
      0 0 44px rgba(167, 139, 250, 0.32),
      0 0 68px rgba(139, 92, 246, 0.2),
      0 0 92px rgba(100, 116, 139, 0.12);
  }

  38% {
    box-shadow:
      0 0 22px rgba(233, 213, 255, 0.85),
      0 0 48px rgba(196, 181, 253, 0.62),
      0 0 78px rgba(167, 139, 250, 0.48),
      0 0 104px rgba(124, 58, 237, 0.28),
      0 0 128px rgba(71, 85, 105, 0.14);
  }

  68% {
    box-shadow:
      0 0 16px rgba(226, 232, 240, 0.75),
      0 0 36px rgba(199, 210, 254, 0.52),
      0 0 62px rgba(165, 180, 252, 0.4),
      0 0 88px rgba(129, 140, 248, 0.26),
      0 0 108px rgba(51, 65, 85, 0.1);
  }
}

@keyframes clientSettingsVetrinaProFlicker {

  0%,
  100% {
    opacity: 1;
  }

  20% {
    opacity: 0.78;
  }

  45% {
    opacity: 0.94;
  }

  62% {
    opacity: 0.71;
  }

  82% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .client-settings-vetrina-card--flame .client-settings-vetrina-card__shell {
    animation: none;
    box-shadow:
      0 0 18px rgba(233, 213, 255, 0.5),
      0 0 40px rgba(196, 181, 253, 0.38),
      0 0 64px rgba(129, 140, 248, 0.22);
  }

  .client-settings-vetrina-card--flame .client-settings-vetrina-card__shell::before,
  .client-settings-vetrina-card--flame .client-settings-vetrina-card__shell::after {
    animation: none;
    opacity: 1;
  }

  .client-settings-vetrina-card--base:hover .client-settings-vetrina-card__shell,
  .client-settings-vetrina-card--gold:hover .client-settings-vetrina-card__shell,
  .client-settings-vetrina-card--flame:hover .client-settings-vetrina-card__shell {
    transform: none;
  }
}

.client-settings-plan-compare__actions {
  display: flex;
  justify-content: flex-start;
  align-items: stretch;
  width: 100%;
  max-width: 400px;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.client-settings-plan-compare__actions .client-settings-plan-compare__cta {
  width: 100%;
  flex: 1 1 auto;
  min-width: 0;
  justify-content: center;
  white-space: normal;
  text-align: center;
  line-height: 1.3;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.28);
}

@media (max-width: 560px) {
  .client-settings-plan-compare__sheet {
    width: min(100%, 100vw - 32px);
  }

  .client-settings-limits-card__head {
    flex-direction: column;
    align-items: stretch;
  }

  .client-settings-limits-card__compare-all {
    align-self: flex-start;
  }

  .client-settings-usage-section__head {
    flex-direction: column;
    align-items: stretch;
  }

  .client-settings-usage-section__compare {
    align-self: flex-start;
  }

  .client-settings-vetrina-track {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 14px;
    padding: 22px 14px 24px;
    -webkit-overflow-scrolling: touch;
  }

  .client-settings-vetrina-card {
    flex: 0 0 min(86vw, 300px);
    scroll-snap-align: center;
  }
}

.client-settings-upgrade-btn--inline {
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.2);
}

@media (max-width: 640px) {
  .client-settings-limit-row {
    flex-direction: column;
    align-items: stretch;
  }

  .client-settings-limit-row:not(.client-settings-limit-row--promo) {
    align-items: flex-start;
  }

  .client-settings-limit-usage {
    min-width: 0;
  }

  .client-settings-limit-excluded,
  .client-settings-limit-cta {
    align-items: flex-start;
  }

  .client-settings-limit-excluded .client-settings-text-btn,
  .client-settings-limit-cta .client-settings-text-btn {
    align-self: flex-start;
  }

  .client-settings-panel__meta--plan {
    align-items: flex-end;
    width: 100%;
  }

  .client-settings-pane-head--plan.client-settings-pane-head--row {
    flex-direction: column;
    align-items: stretch;
  }

  .client-settings-pane-head--plan .client-settings-panel__meta--plan {
    align-items: flex-end;
    align-self: flex-end;
  }
}

.client-settings-feedback {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-size: 14px;
}

.client-settings-feedback.is-success {
  border-color: #86efac;
  background: #ecfdf5;
  color: #166534;
}

.client-settings-feedback.is-error {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #991b1b;
}

.client-settings-feedback.is-info {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.client-settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px 28px;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 -14px 34px rgba(15, 23, 42, 0.06);
}

.client-settings-form textarea {
  min-height: 96px;
  resize: vertical;
}

/* Textarea con etichetta flottante (solo se non è stacked): evita label centrata in altezza sulle righe */
#client-settings-modal .inputGroup:not(.inputGroup--stacked):has(textarea)>label {
  min-height: 0;
  height: auto;
  align-items: flex-start;
  top: 0.55em;
  padding-top: 0.12em;
  padding-bottom: 0;
}

#client-settings-modal .inputGroup:not(.inputGroup--stacked):has(textarea) textarea {
  line-height: 1.5;
  padding: 1.7em 0.6em 0.65em 0.6em;
  box-sizing: border-box;
}

#client-settings-modal .inputGroup:not(.inputGroup--stacked):has(textarea):focus-within textarea,
#client-settings-modal .inputGroup:not(.inputGroup--stacked):has(textarea).filled textarea {
  padding-top: 1.95em;
}

#client-settings-save-button[disabled] {
  opacity: .65;
  cursor: wait;
  box-shadow: none;
}

@media (max-width: 360px) {

  .client-settings-integrity-banner,
  .client-settings-overview__header,
  .client-settings-billing {
    flex-direction: column;
    align-items: stretch;
  }

  .client-settings-modal__content {
    width: min(100%, calc(100vw - 28px));
    height: calc(100dvh - clamp(48px, 11vh, 88px));
    max-height: calc(100dvh - clamp(48px, 11vh, 88px));
    border-radius: 18px;
  }

  #client-settings-modal {
    padding: clamp(18px, 5vh, 40px) 12px;
  }

  #client-settings-modal .close {
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
  }

  .client-settings-overview {
    padding: 22px 56px 18px 18px;
  }

  .client-settings-integrity-banner__inner {
    flex-direction: column;
    align-items: stretch;
  }

  .client-settings-integrity-donut-wrap {
    align-self: center;
  }

  .client-settings-integrity-banner__main {
    padding-left: 0;
    padding-top: 2px;
  }

  .client-settings-integrity-cta {
    align-self: stretch;
    text-align: center;
  }

  .client-settings-progress-card {
    align-items: flex-start;
    min-width: 0;
  }

  .client-settings-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .client-settings-nav {
    min-height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none;
  }

  .client-settings-nav::before,
  .client-settings-nav::after {
    display: none;
  }

  .client-settings-nav__track {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px;
    gap: 8px;
  }

  .client-settings-nav__btn {
    flex: 0 0 auto;
    width: auto;
    min-height: 40px;
    margin: 0;
    padding: 9px 34px 9px 12px;
    white-space: nowrap;
  }

  .client-settings-nav__btn:hover {
    transform: translateY(-1px);
  }

  .client-settings-nav__btn::before {
    left: 10px;
    top: auto;
    bottom: 0;
    width: calc(100% - 20px);
    height: 3px;
    border-radius: 999px 999px 0 0;
    transform: scaleX(0.55);
  }

  .client-settings-nav__btn.is-active::before {
    transform: scaleX(1);
  }

  .client-settings-panel.client-settings-section {
    max-height: none;
    padding: 20px 18px 24px;
  }

  .client-settings-grid--two,
  .client-settings-grid--three,
  .client-settings-status-grid,
  .client-settings-preview-grid {
    grid-template-columns: 1fr;
  }

  .client-settings-actions {
    padding: 12px 14px;
  }

  .client-settings-actions button {
    flex: 1 1 150px;
  }
}

.product-delete-btn {
  position: relative;
  width: 150px;
  height: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 16px;
  background: #e62222;
  border: none;
  border-radius: 5px;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.product-delete-btn,
.product-delete-btn span {
  transition: all 200ms ease;
}

.product-delete-btn .text {
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.2px;
  transform: translateX(0);
}

.product-delete-btn .icon {
  position: absolute;
  border-left: 1px solid #c41b1b;
  right: 10px;
  transform: translateX(0);
  height: 40px;
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-delete-btn svg {
  width: 15px;
  height: 15px;
  fill: #eee;
}

.product-delete-btn:hover {
  background: #ff3636;
}

.product-delete-btn:hover .text {
  color: transparent;
  transform: translateX(-6px);
}

.product-delete-btn:hover .icon {
  width: 100%;
  height: 100%;
  left: 0;
  right: 0;
  border-left: none;
  transform: translateX(0);
  justify-content: center;
  align-items: center;
}

.product-delete-btn:focus {
  outline: none;
}

.product-delete-btn:active .icon svg {
  transform: scale(0.86);
}

.product-save-btn {
  position: relative;
  width: 150px;
  height: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 16px;
  background: #16a34a;
  border: none;
  border-radius: 5px;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.product-save-btn::before {
  content: none;
}

.product-save-btn,
.product-save-btn span {
  transition: all 200ms ease;
}

.product-save-btn .text {
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.2px;
  transform: translateX(0);
}

.product-save-btn .icon {
  position: absolute;
  border-left: 1px solid #12813b;
  right: 10px;
  transform: translateX(0);
  height: 40px;
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-save-btn svg {
  width: 15px;
  height: 15px;
  fill: #e8ffe6;
}

.product-save-btn:hover {
  background: #22c55e;
}

.product-save-btn:hover .text {
  color: transparent;
  transform: translateX(-6px);
}

.product-save-btn:hover .icon {
  width: 100%;
  height: 100%;
  left: 0;
  right: 0;
  border-left: none;
  transform: translateX(0);
  justify-content: center;
  align-items: center;
}

.product-save-btn:focus {
  outline: none;
}

.product-save-btn:active .icon svg {
  transform: scale(0.86);
}

/* =====================
   UTILITIES
===================== */
.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;
}

.hidden {
  display: none !important;
}

.center {
  display: grid;
  place-items: center;
}

.content-narrow {
  max-width: 1100px;
  margin-inline: auto;
}

#order-requests-container.content-narrow {
  margin-left: auto;
  margin-right: auto;
}

.field-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .2);
}

.inputGroup:focus-within :is(input.field-invalid, textarea.field-invalid),
.inputGroup.filled :is(input.field-invalid, textarea.field-invalid) {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .2);
}

/* Toast notifications */
.toast-stack {
  position: fixed;
  right: clamp(16px, 2vw, 24px);
  bottom: max(18px, env(safe-area-inset-bottom));
  display: grid;
  gap: 8px;
  width: min(312px, calc(100vw - 28px));
  z-index: 2147483650;
  /* sopra il gate admin */
  pointer-events: none;
  isolation: isolate;
}

.toast-stack::before,
.toast-stack::after {
  content: '';
  position: absolute;
  pointer-events: none;
  z-index: -1;
  opacity: .8;
}

.toast-stack::before {
  inset: -34px -26px -42px -42px;
  background:
    radial-gradient(circle at 16% 22%, rgba(34, 197, 94, .18), transparent 34%),
    radial-gradient(circle at 78% 28%, rgba(79, 108, 255, .14), transparent 38%),
    radial-gradient(circle at 38% 84%, rgba(245, 158, 11, .13), transparent 30%);
  filter: blur(30px);
  animation: toastAmbientFloat 9.5s ease-in-out infinite alternate;
}

.toast-stack::after {
  inset: -18px -18px -26px -24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 44%),
    radial-gradient(circle at 82% 76%, rgba(239, 68, 68, .09), transparent 28%);
  filter: blur(18px);
  animation: toastAmbientDrift 12s ease-in-out infinite;
}

.toast {
  --toast-accent: #4f6cff;
  --toast-accent-rgb: 79, 108, 255;
  pointer-events: auto;
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 20px;
  align-items: start;
  gap: 11px;
  min-height: 84px;
  padding: 13px 13px 13px 12px;
  border-radius: 18px;
  border: 1px solid #d9deec;
  border-left: 4px solid rgb(var(--toast-accent-rgb));
  background: #fff;
  box-shadow:
    0 10px 22px rgba(15, 23, 42, .08),
    0 2px 5px rgba(15, 23, 42, .04);
  color: #111827;
  overflow: hidden;
  isolation: isolate;
  transform-origin: bottom right;
  animation: toastIn 320ms cubic-bezier(.22, 1, .36, 1);
}

.toast:focus-visible {
  outline: 2px solid rgba(var(--toast-accent-rgb), .42);
  outline-offset: 3px;
}

.toast::before {
  content: none;
}

.toast::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 90% 56%, rgba(var(--toast-accent-rgb), .28), transparent 32%),
    radial-gradient(circle at 78% 22%, rgba(var(--toast-accent-rgb), .14), transparent 26%),
    radial-gradient(circle at 70% 82%, rgba(var(--toast-accent-rgb), .10), transparent 22%);
  pointer-events: none;
  z-index: 0;
  animation: toastCardTint 7.5s ease-in-out infinite alternate;
}

.toast>* {
  position: relative;
  z-index: 1;
}

.toast__icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  align-self: start;
  margin-top: -2px;
  background: transparent;
  animation: toastIconRise 360ms cubic-bezier(.22, 1, .36, 1);
}

.toast__icon::after {
  content: none;
}

.toast__icon-image,
.toast__icon svg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.toast__icon-image {
  filter: none;
}

.toast[data-toast-icon="success"] .toast__icon-image {
  transform: translateX(-6px);
}

.toast__content {
  min-width: 0;
  display: grid;
  gap: 7px;
  align-content: center;
  padding-top: 1px;
}

.toast__content--compact {
  gap: 0;
}

.toast__title,
.toast__message {
  margin: 0;
}

.toast__title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  color: #111827;
  letter-spacing: -.02em;
}

.toast__message {
  max-width: 19ch;
  font-size: 12px;
  line-height: 1.4;
  color: #111827;
  letter-spacing: -.01em;
}

.toast__close {
  align-self: start;
  justify-self: end;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  color: #111827;
  cursor: pointer;
  transition: transform .18s ease, background-color .18s ease, color .18s ease;
  padding: 0;
  margin-top: 1px;
}

.toast__close svg {
  width: 14px;
  height: 14px;
  display: block;
}

.toast__close:hover,
.toast__close:focus-visible {
  background: rgba(15, 23, 42, .05);
  color: #111827;
  transform: scale(1.03);
  outline: none;
}

.toast__progress {
  display: none;
}

.toast--info {
  --toast-accent: #4f6cff;
  --toast-accent-rgb: 79, 108, 255;
}

.toast--success {
  --toast-accent: #22c55e;
  --toast-accent-rgb: 34, 197, 94;
}

.toast--warning {
  --toast-accent: #f59e0b;
  --toast-accent-rgb: 245, 158, 11;
}

.toast--error {
  --toast-accent: #ef4444;
  --toast-accent-rgb: 239, 68, 68;
}

.toast--closing {
  animation: toastOut 180ms ease-in forwards;
}

.toast--closing .toast__progress::after {
  animation-play-state: paused;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translate3d(0, 22px, 0) scale(.985);
    filter: blur(6px);
  }

  60% {
    opacity: 1;
    transform: translate3d(0, -2px, 0) scale(1.005);
    filter: blur(0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    opacity: 0;
    transform: translate3d(0, 12px, 0) scale(.985);
  }
}

@keyframes toastIconRise {
  from {
    opacity: 0;
    transform: translate3d(0, 12px, 0) scale(.88);
  }

  70% {
    opacity: 1;
    transform: translate3d(0, -1px, 0) scale(1.03);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes toastProgress {
  from {
    transform: scaleX(1);
  }

  to {
    transform: scaleX(0);
  }
}

@keyframes toastCardTint {
  from {
    transform: translate3d(12px, 0, 0) scale(1);
    opacity: .88;
  }

  50% {
    transform: translate3d(-8px, -5px, 0) scale(1.06);
    opacity: 1;
  }

  to {
    transform: translate3d(6px, 8px, 0) scale(1);
    opacity: .92;
  }
}

@keyframes toastAmbientFloat {
  from {
    transform: translate3d(-8px, 6px, 0) scale(.98);
  }

  50% {
    transform: translate3d(10px, -8px, 0) scale(1.02);
  }

  to {
    transform: translate3d(4px, -16px, 0) scale(1.04);
  }
}

@keyframes toastAmbientDrift {
  from {
    transform: translate3d(0, 0, 0);
    opacity: .5;
  }

  50% {
    transform: translate3d(-10px, -6px, 0);
    opacity: .78;
  }

  to {
    transform: translate3d(8px, 10px, 0);
    opacity: .58;
  }
}

@media (max-width: 640px) {
  .toast-stack {
    right: 14px;
    bottom: max(14px, env(safe-area-inset-bottom));
    width: min(296px, calc(100vw - 24px));
  }

  .toast-stack::before {
    inset: -28px -20px -36px -34px;
  }

  .toast-stack::after {
    inset: -14px -14px -22px -20px;
  }

  .toast {
    grid-template-columns: 38px minmax(0, 1fr) 18px;
    gap: 10px;
    min-height: 80px;
    padding: 12px 12px 12px 11px;
    border-radius: 16px;
  }

  .toast__icon {
    width: 34px;
    height: 34px;
  }

  .toast__title {
    font-size: 14px;
  }

  .toast__message {
    max-width: 18ch;
    font-size: 11.5px;
  }

  .toast__close {
    width: 18px;
    height: 18px;
  }

  .toast__close svg {
    width: 13px;
    height: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {

  .toast-stack::before,
  .toast-stack::after,
  .toast::after,
  .toast,
  .toast--closing,
  .toast__progress::after {
    animation: none;
  }
}

/* =====================
   PRINT STYLES
===================== */
@media print {
  @page {
    size: A4;
    margin: 12mm;
  }

  body {
    background: #fff;
    padding: 0;
  }

  .fixed-button,
  #logout-button,
  .top-left {
    display: none !important;
  }

  #order-requests-container {
    max-height: none;
    overflow: visible;
  }

  .order-requests-table-wrapper {
    max-height: none;
    overflow: visible;
  }

  /* Rimuovi ombre e colori intensi per la stampa */
  #main-container,
  #search-container,
  #load-container,
  #update-container,
  #add-container,
  #order-requests-container,
  #print-container,
  #inventory-container,
  #changes-container,
  #daily-changes-container,
  #order-container,
  #order-pdf-container,
  #product-details,
  #modify-product-container {
    box-shadow: none;
    border-color: #bbb;
  }

  #inventory-container,
  #changes-container {
    page-break-inside: avoid;
  }

  #inventory-table,
  #changes-result,
  #changes-by-date-name-result {
    margin: 8px 0 0;
    border: 1px solid #9ca3af;
  }

  #inventory-table th,
  #inventory-table td,
  #changes-result th,
  #changes-result td,
  #changes-by-date-name-result th,
  #changes-by-date-name-result td {
    padding: 6px 8px;
    border-color: #b6bcc6;
  }

  #inventory-table th,
  #changes-result th,
  #changes-by-date-name-result th {
    background: #e5e7eb !important;
    color: #111827;
    box-shadow: none !important;
    position: static;
  }

  #inventory-table thead,
  #changes-result thead,
  #changes-by-date-name-result thead {
    display: table-header-group;
  }

  #inventory-table tbody tr:nth-child(odd),
  #changes-result tbody tr:nth-child(odd),
  #changes-by-date-name-result tbody tr:nth-child(odd) {
    background: #f8fafc !important;
  }

  #inventory-table tbody tr:nth-child(even),
  #changes-result tbody tr:nth-child(even),
  #changes-by-date-name-result tbody tr:nth-child(even) {
    background: #ffffff !important;
  }

  #inventory-table tbody tr:hover,
  #changes-result tbody tr:hover,
  #changes-by-date-name-result tbody tr:hover {
    background: transparent !important;
  }

  #inventory-table tr,
  #changes-result tr,
  #changes-by-date-name-result tr {
    page-break-inside: avoid;
    page-break-after: auto;
  }

  #inventory-table th:nth-child(3),
  #inventory-table td:nth-child(3),
  #changes-result th:nth-child(4),
  #changes-result td:nth-child(4),
  #changes-result th:nth-child(5),
  #changes-result td:nth-child(5),
  #changes-result th:nth-child(6),
  #changes-result td:nth-child(6),
  #changes-by-date-name-result th:nth-child(4),
  #changes-by-date-name-result td:nth-child(4),
  #changes-by-date-name-result th:nth-child(5),
  #changes-by-date-name-result td:nth-child(5),
  #changes-by-date-name-result th:nth-child(6),
  #changes-by-date-name-result td:nth-child(6) {
    text-align: right;
    font-variant-numeric: tabular-nums;
  }
}

/* Pulsante invio segnalazione */
.issue-modal .inputGroup {
  margin: 1em 0;
}

.issue-modal .inputGroup :is(input, textarea) {
  font-size: 100%;
  padding: 0.8em;
  outline: none;
  border: 2px solid rgb(200, 200, 200);
  text-align: left;
  color: var(--text);
  background-color: var(--bg);
  border-radius: 20px;
  width: 100%;
}

.issue-modal .inputGroup label {
  font-size: 100%;
  position: absolute;
  top: 0;
  right: auto;
  bottom: auto;
  left: 0;
  padding: 0.8em 0.2em 0.8em 0.8em;
  margin-left: 0.5em;
  width: auto;
  pointer-events: none;
  transition: all 0.3s ease;
  color: rgb(100, 100, 100);
}

.issue-modal .inputGroup:focus-within label,
.issue-modal .inputGroup.filled label {
  transform: translateY(-50%) scale(.9);
  margin: 0;
  margin-left: 1.3em;
  padding: 0.4em 0.15em 0.4em 0.4em;
  background-color: var(--bg);
  width: auto;
  box-shadow: 0 0 0 4px var(--bg);
}

.issue-modal .inputGroup:focus-within :is(input, textarea),
.issue-modal .inputGroup.filled :is(input, textarea) {
  border-color: rgb(150, 150, 200);
}

.issue-modal .inputGroup textarea {
  min-height: 112px;
  line-height: 1.5;
  resize: vertical;
}

.issue-modal .issue-send-btn {
  font-family: inherit;
  font-size: 20px;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
  color: #fff;
  padding: 0.7em 1em;
  padding-left: 0.9em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(99, 102, 241, .25);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.2s;
  cursor: pointer;
  margin: 12px auto 0;
}

.issue-send-btn__label {
  display: block;
  margin-left: 0.3em;
  transition: all 0.3s ease-in-out;
  white-space: nowrap;
}

.svg-wrapper-1 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.svg-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.issue-send-btn svg {
  display: block;
  transform-origin: center center;
  transition: transform 0.3s ease-in-out;
}

.issue-send-btn:hover .svg-wrapper {
  animation: issue-send-fly 0.6s ease-in-out infinite alternate;
}

.issue-send-btn:hover svg {
  transform: translateX(1.2em) rotate(45deg) scale(1.1);
}

.issue-send-btn:hover .issue-send-btn__label {
  transform: translateX(5em);
}

.issue-send-btn:active {
  transform: scale(0.95);
}

@keyframes issue-send-fly {
  from {
    transform: translateY(0.1em);
  }

  to {
    transform: translateY(-0.1em);
  }
}

@media (max-width: 720px) {
  .issue-modal .issue-send-btn {
    width: 100%;
    justify-content: center;
  }
}

/* =====================
   ACCESSIBILITÀ EXTRA
===================== */
:focus-visible {
  outline: 3px solid var(--accent-500);
  outline-offset: 2px;
}

/* Riduci animazioni se l'utente preferisce meno movimento */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* Client settings modal - refined professional layout */
#client-settings-modal {
  z-index: 2000;
  padding: clamp(28px, 7.5vh, 72px) clamp(18px, 3vw, 32px);
  background: rgba(15, 23, 42, 0.66);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-sizing: border-box;
}

#client-settings-modal .client-settings-modal__content {
  width: min(960px, calc(100vw - 40px));
  height: min(640px, calc(100dvh - clamp(72px, 15vh, 144px)));
  max-height: calc(100dvh - clamp(72px, 15vh, 144px));
  padding: 0;
  overflow: hidden;
  border: 0.5px solid rgba(203, 213, 225, 0.45);
  border-radius: 18px;
  background: #ffffff;
  box-shadow:
    0 26px 72px rgba(15, 23, 42, 0.26),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

#client-settings-modal .close {
  position: absolute;
  top: 16px;
  right: 14px;
  z-index: 10;
  float: none;
  width: 34px;
  height: 34px;
  color: #64748b;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.1);
}

/* Overlay caricamento (barra + skeleton + spinner) */
#client-settings-modal .client-settings-loading {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: flex;
  flex-direction: column;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
}

#client-settings-modal .client-settings-loading[hidden] {
  display: none !important;
}

#client-settings-modal .client-settings-loading__bar {
  flex: 0 0 3px;
  position: relative;
  background: #e8ecf1;
  overflow: hidden;
}

#client-settings-modal .client-settings-loading__bar::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 42%;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.85), rgba(56, 189, 248, 0.75), transparent);
  animation: client-settings-load-bar 1.05s ease-in-out infinite;
}

@keyframes client-settings-load-bar {
  0% {
    transform: translateX(-120%);
  }

  100% {
    transform: translateX(320%);
  }
}

#client-settings-modal .client-settings-loading__veil {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#client-settings-modal .client-settings-loading__layout {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 0;
  opacity: 0.55;
  pointer-events: none;
}

#client-settings-modal .client-settings-loading__aside {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 12px 18px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-right: 1px solid #e2e8f0;
}

#client-settings-modal .client-settings-skeleton--pill {
  height: 44px;
  width: 100%;
}

#client-settings-modal .client-settings-skeleton--pill.short {
  width: 88%;
}

#client-settings-modal .client-settings-loading__main {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 50px 26px 26px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

#client-settings-modal .client-settings-skeleton--line {
  height: 13px;
  border-radius: 6px;
}

#client-settings-modal .client-settings-skeleton--line.lg {
  width: 36%;
}

#client-settings-modal .client-settings-skeleton--line.md {
  width: 68%;
}

#client-settings-modal .client-settings-skeleton--line.sm {
  width: 48%;
  margin-top: 4px;
}

#client-settings-modal .client-settings-loading__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 4px;
}

#client-settings-modal .client-settings-skeleton--block {
  height: 46px;
  border-radius: 10px;
}

#client-settings-modal .client-settings-skeleton {
  background: linear-gradient(100deg, #e8ecf1 8%, #f8fafc 22%, #e2e8f0 38%, #e8ecf1 52%);
  background-size: 240% 100%;
  animation: client-settings-skeleton-shimmer 1.4s ease-in-out infinite;
}

@keyframes client-settings-skeleton-shimmer {
  0% {
    background-position: 100% 0;
  }

  100% {
    background-position: -100% 0;
  }
}

#client-settings-modal .client-settings-loading__spinner-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

#client-settings-modal .client-settings-loading__spinner {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 3px solid rgba(99, 102, 241, 0.22);
  border-top-color: #6366f1;
  animation: client-settings-load-spin 0.72s linear infinite;
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.12);
}

@keyframes client-settings-load-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {

  #client-settings-modal .client-settings-loading__bar::after,
  #client-settings-modal .client-settings-skeleton,
  #client-settings-modal .client-settings-loading__spinner {
    animation: none !important;
  }

  #client-settings-modal .client-settings-skeleton {
    background: #e8ecf1;
  }

  #client-settings-modal .client-settings-loading__bar::after {
    left: 30%;
    width: 40%;
    transform: none;
    opacity: 0.75;
  }

  #client-settings-modal .client-settings-loading__spinner {
    border-top-color: rgba(99, 102, 241, 0.45);
  }
}

@media (max-width: 760px) {
  #client-settings-modal .client-settings-loading__layout {
    grid-template-columns: 172px minmax(0, 1fr);
  }

  #client-settings-modal .client-settings-loading__main {
    padding: 20px 44px 22px 18px;
  }
}

@media (max-width: 520px) {
  #client-settings-modal .client-settings-loading__layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  #client-settings-modal .client-settings-loading__aside {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 10px;
    overflow: hidden;
    border-right: 0;
    border-bottom: 1px solid #e2e8f0;
  }

  #client-settings-modal .client-settings-loading__aside .client-settings-skeleton--pill {
    flex: 0 0 120px;
    height: 38px;
  }

  #client-settings-modal .client-settings-loading__aside .client-settings-skeleton--pill.short {
    width: 120px;
  }
}

#client-settings-modal .client-settings-form {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  height: 100%;
  min-height: 0;
  gap: 0;
  clear: none;
}

#client-settings-modal .client-settings-footer-integrity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

#client-settings-modal .client-settings-footer-donut-wrap {
  position: relative;
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
}

#client-settings-modal .client-settings-footer-donut {
  display: block;
  width: 58px;
  height: 58px;
}

#client-settings-modal .client-settings-footer-donut__track,
#client-settings-modal .client-settings-footer-donut__ring {
  fill: none;
  stroke-width: 5.5;
}

#client-settings-modal .client-settings-footer-donut__track {
  stroke: #e8edf3;
}

#client-settings-modal .client-settings-footer-donut__ring {
  stroke: url(#client-settings-footer-integrity-grad-blue);
  stroke-linecap: round;
  transition: stroke 0.35s ease, stroke-dasharray 0.5s ease;
}

#client-settings-modal .client-settings-footer-integrity.integrity-tier--high .client-settings-footer-donut__ring {
  stroke: url(#client-settings-footer-integrity-grad-green);
}

#client-settings-modal .client-settings-footer-integrity.is-complete .client-settings-footer-donut__ring {
  stroke: url(#client-settings-footer-integrity-grad-green);
}

#client-settings-modal .client-settings-footer-donut__center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4px;
  pointer-events: none;
}

#client-settings-modal .client-settings-footer-donut__pct {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: #1d4ed8;
}

#client-settings-modal .client-settings-footer-integrity.integrity-tier--high .client-settings-footer-donut__pct {
  color: #047857;
}

#client-settings-modal .client-settings-footer-integrity.is-complete .client-settings-footer-donut__pct {
  color: #047857;
}

#client-settings-modal .client-settings-footer-donut__count {
  margin-top: 2px;
  font-size: 7px;
  font-weight: 600;
  color: #94a3b8;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

#client-settings-modal .client-settings-footer-integrity.is-complete .client-settings-footer-donut__count {
  color: #6ee7b7;
}

#client-settings-modal .client-settings-footer-integrity__hint {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  max-width: min(48ch, 100%);
  font-size: 10px;
  line-height: 1.4;
  color: #94a3b8;
}

#client-settings-modal .client-settings-actions__progress {
  justify-self: start;
  width: min(420px, 58%);
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

#client-settings-modal .client-settings-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  background: #f1f5f9;
}

#client-settings-modal .client-settings-nav {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-right: 1px solid #e2e8f0;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.7);
}

#client-settings-modal .client-settings-nav::before {
  content: "Impostazioni";
  display: block;
  padding: 22px 14px 6px;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

#client-settings-modal .client-settings-nav::after {
  content: "";
  display: none;
}

#client-settings-modal .client-settings-nav__track {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 0;
  padding: 5px 10px 12px;
  overflow-y: auto;
  overflow-x: hidden;
}

#client-settings-modal .client-settings-nav__group-label {
  margin: 12px 2px 2px;
  padding: 0 2px;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.25;
}

#client-settings-modal .client-settings-nav__group-label:first-child {
  margin-top: 0;
}

#client-settings-modal .client-settings-nav__btn {
  position: relative;
  box-sizing: border-box;
  min-height: 42px;
  width: 100%;
  padding: 9px 26px 9px 12px;
  border: 1px solid #eef2f7;
  border-radius: 9px;
  background: #ffffff;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  gap: 9px;
}

#client-settings-modal .client-settings-nav__icon {
  width: 17px;
  height: 17px;
  opacity: 0.55;
  color: #64748b;
}

#client-settings-modal .client-settings-nav__btn.is-active .client-settings-nav__icon {
  opacity: 1;
  color: #4f46e5;
}

#client-settings-modal .client-settings-nav__btn:hover {
  color: #1e293b;
  background: #ffffff;
  border-color: #e2e8f0;
  transform: none;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

#client-settings-modal .client-settings-nav__btn.is-active {
  color: #4338ca;
  background: #f0f4ff;
  border-color: #e0e7ff;
  box-shadow:
    inset 4px 0 0 #4f46e5,
    0 1px 2px rgba(15, 23, 42, 0.04);
}

#client-settings-modal .client-settings-nav__btn::before {
  display: none;
}

#client-settings-modal .client-settings-nav__btn::after {
  right: 12px;
  width: 6px;
  height: 6px;
  border-color: #94a3b8;
  opacity: 0.45;
}

#client-settings-modal .client-settings-nav__btn.is-active::after {
  border-color: #6366f1;
  opacity: 0.55;
}

#client-settings-modal .client-settings-panels {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

#client-settings-modal .client-settings-panel.client-settings-section {
  min-height: 0;
  height: 100%;
  margin: 0;
  /* Più padding a destra: il pulsante chiudi è position:absolute sul bordo modale */
  padding: 28px 56px clamp(44px, 9vh, 88px) 32px;
  overflow-y: auto;
  overflow-x: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  gap: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 102, 241, 0.36) #f1f5f9;
}

#client-settings-modal .client-settings-pane-head {
  border-bottom-color: #e2e8f0;
  padding-bottom: 12px;
  margin-bottom: 0;
}

#client-settings-modal .client-settings-stack {
  gap: 13px;
  margin-top: 16px;
}

#client-settings-modal .client-settings-card {
  padding: 16px 18px 18px;
  background: #ffffff;
  border: 0.5px solid rgba(226, 232, 240, 0.75);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

#client-settings-modal .client-settings-toggle-card {
  border: 0.5px solid rgba(219, 228, 240, 0.7);
}

#client-settings-modal .client-settings-policy-card {
  border: 0.5px solid rgba(203, 213, 225, 0.55);
}

#client-settings-modal .client-settings-status-card {
  border: 0.5px solid rgba(219, 228, 240, 0.7);
}

#client-settings-modal .client-settings-card .client-settings-policy {
  margin: 0;
}

#client-settings-modal .client-settings-status-grid {
  gap: 11px;
}

#client-settings-modal #client-settings-panel-sistema .client-settings-pane-head--row {
  padding-bottom: 22px;
  margin-bottom: 2px;
}

#client-settings-modal #client-settings-panel-sistema .client-settings-stack {
  margin-top: 14px;
}

#client-settings-modal .client-settings-status-card p {
  line-height: 1.65;
  margin-top: 10px;
  max-width: 54ch;
}

#client-settings-modal .client-settings-card--inline .client-settings-billing--otp {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 22px;
  margin: 0;
  padding: 16px 18px;
  border: 0.5px solid rgba(232, 237, 243, 0.65);
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

#client-settings-modal .client-settings-card--inline .client-settings-billing--otp__text {
  min-width: 0;
}

#client-settings-modal .client-settings-card--inline .client-settings-billing--otp .client-settings-help {
  margin: 6px 0 0;
}

#client-settings-modal .client-settings-section__heading {
  align-items: flex-start;
  margin-bottom: 4px;
}

#client-settings-modal .client-settings-section h4,
#client-settings-modal .client-settings-pane-head h4 {
  font-size: clamp(1.02rem, 1.45vw, 1.22rem);
  letter-spacing: -0.03em;
}

#client-settings-modal .client-settings-help--lead {
  max-width: 64ch;
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
}

#client-settings-modal .client-settings-grid {
  gap: 11px;
}

#client-settings-modal .client-settings-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#client-settings-modal .client-settings-grid--two>.inputGroup,
#client-settings-modal .client-settings-grid--two>.client-settings-select-field {
  min-width: 0;
}

#client-settings-modal .client-settings-select-field {
  gap: 6px;
}

#client-settings-modal .client-settings-select-field label {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  line-height: 1.35;
}

#client-settings-modal .client-settings-card .client-settings-help--footer {
  margin-top: 18px;
  clear: both;
}

#client-settings-modal .client-settings-grid--two .client-settings-field--wide {
  grid-column: 1 / -1;
}

#client-settings-modal .client-settings-grid--two .client-settings-field--province {
  grid-column: 1;
}

#client-settings-modal .client-settings-pane-head--tight {
  padding-bottom: 10px;
  margin-bottom: 3px;
}

#client-settings-modal .client-settings-card--form {
  padding: 18px 22px 22px;
  margin-top: 6px;
}

#client-settings-modal .client-settings-card--branding {
  padding-left: 0;
  padding-right: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

#client-settings-modal .client-settings-card--branding .client-settings-form-section:first-child .client-settings-form-section__title {
  margin-bottom: 10px;
}

#client-settings-modal .client-settings-card--branding .client-settings-form-section+.client-settings-form-section.client-settings-form-section--logos {
  margin-top: 32px;
  padding-top: 28px;
}

#client-settings-modal .client-settings-drop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
  align-items: stretch;
}

#client-settings-modal .client-settings-drop-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

#client-settings-modal .client-settings-drop-col__title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #0f172a;
  line-height: 1.3;
}

#client-settings-modal .client-settings-drop-surface {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  min-height: 128px;
  border-radius: 10px;
  border: 1px dashed #d1d9e6;
  background: #fafbfd;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

#client-settings-modal .client-settings-drop-surface:focus-visible {
  outline: none;
  border-color: var(--brand-500, #6366f1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

#client-settings-modal .client-settings-drop-surface.is-dragover {
  border-color: var(--brand-500, #6366f1);
  background: #f5f7ff;
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.12);
}

#client-settings-modal .client-settings-drop-surface.client-settings-field--incomplete {
  border: 1px solid #e2cfcf;
  background-color: #fdf9f9;
  box-shadow: none;
}

#client-settings-modal .client-settings-drop-surface__preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 128px;
  padding: 12px 16px;
  box-sizing: border-box;
}

#client-settings-modal .client-settings-drop-surface__preview img {
  max-width: 100%;
  max-height: 102px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

#client-settings-modal .client-settings-drop-fallback {
  font-size: 12px;
  color: #64748b;
  text-align: center;
  padding: 8px 12px;
  line-height: 1.45;
  max-width: 100%;
  word-break: break-word;
}

#client-settings-modal .client-settings-drop-surface__empty {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 128px;
  margin: 0;
  padding: 16px 14px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: #64748b;
  text-align: center;
  box-sizing: border-box;
}

#client-settings-modal .client-settings-drop-surface__empty:hover {
  color: #475569;
  background: rgba(255, 255, 255, 0.65);
}

#client-settings-modal .client-settings-drop-surface__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: #94a3b8;
}

#client-settings-modal .client-settings-drop-surface__empty:hover .client-settings-drop-surface__icon {
  color: #64748b;
}

#client-settings-modal .client-settings-drop-surface__hint {
  font-size: 12px;
  line-height: 1.45;
  max-width: 26ch;
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  #client-settings-modal .client-settings-drop-surface {
    transition: none;
  }
}

#client-settings-modal .client-settings-form-section__title {
  margin: 0 0 26px;
  padding-bottom: 3px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #0f172a;
}

#client-settings-modal .client-settings-form-section+.client-settings-form-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #eef2f7;
}

#client-settings-modal .inputGroup.inputGroup--stacked {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  margin: 0;
}

#client-settings-modal .inputGroup.inputGroup--stacked label {
  position: static;
  min-height: 0;
  padding: 0;
  margin: 0;
  pointer-events: auto;
  transform: none;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  line-height: 1.35;
  max-width: none;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#client-settings-modal .inputGroup.inputGroup--stacked .client-settings-label-text {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.35;
}

#client-settings-modal .inputGroup.inputGroup--stacked:focus-within label,
#client-settings-modal .inputGroup.inputGroup--stacked.filled label {
  transform: none;
  box-shadow: none;
  background: transparent;
  margin: 0;
  padding: 0;
}

#client-settings-modal .inputGroup.inputGroup--stacked input,
#client-settings-modal .inputGroup.inputGroup--stacked textarea {
  padding: 10px 14px;
  border-radius: 9px;
  border: 1px solid #cbd5e1;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.15s ease;
}

#client-settings-modal .inputGroup.inputGroup--stacked textarea {
  min-height: 96px;
  line-height: 1.5;
  resize: vertical;
  box-sizing: border-box;
}

#client-settings-modal .inputGroup.inputGroup--stacked input:focus,
#client-settings-modal .inputGroup.inputGroup--stacked textarea:focus {
  outline: none;
  border-color: var(--brand-500, #6366f1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

#client-settings-modal .inputGroup.client-settings-field--incomplete input,
#client-settings-modal .inputGroup.client-settings-field--incomplete textarea {
  border: 1px solid #e2cfcf;
  background-color: #fdf9f9;
  box-shadow: none;
}

#client-settings-modal .inputGroup.client-settings-field--incomplete input:focus,
#client-settings-modal .inputGroup.client-settings-field--incomplete textarea:focus {
  background-color: #ffffff;
}

#client-settings-modal .inputGroup.inputGroup--stacked.client-settings-field--incomplete label::after {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d4b0b0;
  box-shadow: 0 0 0 1px rgba(180, 140, 140, 0.22);
  align-self: center;
}

#client-settings-modal .inputGroup input,
#client-settings-modal .inputGroup textarea,
#client-settings-modal .client-settings-select-field select {
  min-width: 0;
  background-color: #ffffff;
}

#client-settings-modal .inputGroup:not(.inputGroup--stacked) input:focus,
#client-settings-modal .inputGroup:not(.inputGroup--stacked) textarea:focus,
#client-settings-modal .client-settings-select-field select:focus {
  outline: none;
  border-color: var(--brand-500, #6366f1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

#client-settings-modal .client-settings-toggle-card,
#client-settings-modal .client-settings-status-card,
#client-settings-modal .client-settings-billing,
#client-settings-modal .client-settings-policy-card,
#client-settings-modal .client-settings-placeholder,
#client-settings-modal .client-settings-preview-surface {
  border-radius: 16px;
  box-shadow: none;
}

#client-settings-modal .client-settings-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  justify-content: stretch;
  align-items: center;
  gap: 12px;
  padding: 8px 22px 10px 18px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.6) inset;
}

#client-settings-modal .client-settings-compare-open--subtle {
  display: inline-block;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none !important;
  box-shadow: none !important;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: inherit;
  color: #4f46e5;
  text-align: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  vertical-align: baseline;
}

#client-settings-modal .client-settings-compare-open--subtle:hover {
  color: #4338ca;
  background: none !important;
  border: none;
  box-shadow: none !important;
  transform: none;
  filter: none;
}

#client-settings-modal .client-settings-compare-open--subtle:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
  border-radius: 0;
}

#client-settings-modal .client-settings-text-btn {
  display: inline-block;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: none !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: inherit;
  color: var(--brand-600, #4f46e5);
  text-align: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  vertical-align: baseline;
}

#client-settings-modal .client-settings-text-btn:hover {
  color: var(--brand-700, #4338ca);
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  transform: none;
  filter: none;
}

#client-settings-modal .client-settings-text-btn:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
  border-radius: 0;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  #client-settings-modal .client-settings-actions {
    background: rgba(252, 252, 253, 0.96);
  }
}

#client-settings-modal .client-settings-actions__submit {
  box-sizing: border-box;
  width: auto;
  min-width: 160px;
  flex: 0 0 auto;
  margin-inline: 0;
  min-height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow:
    0 8px 20px rgba(79, 70, 229, 0.22),
    0 1px 2px rgba(15, 23, 42, 0.08);
}

#client-settings-modal .client-settings-actions__submit:hover:not([disabled]) {
  filter: brightness(1.05);
}

#client-settings-modal .client-settings-actions__submit:focus-visible {
  outline: 2px solid #312e81;
  outline-offset: 2px;
}

@media (max-width: 1100px) {

  #client-settings-modal .client-settings-grid--two,
  #client-settings-modal .client-settings-grid--three,
  #client-settings-modal .client-settings-status-grid,
  #client-settings-modal .client-settings-preview-grid,
  #client-settings-modal .client-settings-drop-grid {
    grid-template-columns: 1fr;
  }

  #client-settings-modal .client-settings-grid--two .client-settings-field--province {
    grid-column: 1;
  }
}

@media (max-width: 760px) {
  #client-settings-modal {
    padding: clamp(22px, 6vh, 48px) clamp(14px, 3vw, 22px);
  }

  #client-settings-modal .client-settings-modal__content {
    width: calc(100vw - 32px);
    height: calc(100dvh - clamp(52px, 12vh, 96px));
    max-height: calc(100dvh - clamp(52px, 12vh, 96px));
    border-radius: 16px;
  }

  #client-settings-modal .client-settings-actions__progress {
    width: min(340px, 52%);
  }

  #client-settings-modal .client-settings-footer-integrity__hint,
  #client-settings-modal .client-settings-footer-donut__count {
    white-space: normal;
  }

  #client-settings-modal .client-settings-shell {
    grid-template-columns: 172px minmax(0, 1fr);
  }

  #client-settings-modal .client-settings-nav::before {
    padding: 18px 10px 6px;
    font-size: 9px;
    letter-spacing: .1em;
  }

  #client-settings-modal .client-settings-nav__track {
    padding: 6px 8px 12px;
  }

  #client-settings-modal .client-settings-nav__btn {
    min-height: 40px;
    padding: 8px 22px 8px 10px;
    font-size: 11px;
  }

  #client-settings-modal .client-settings-panel.client-settings-section {
    padding: 22px 48px clamp(40px, 11vw, 76px) 18px;
  }

  #client-settings-modal .client-settings-actions {
    padding: 7px 16px 10px 12px;
    flex-wrap: nowrap;
    min-width: 0;
  }
}

@media (max-width: 520px) {
  #client-settings-modal .client-settings-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  #client-settings-modal .client-settings-nav {
    border-right: 0;
    border-bottom: 1px solid #e2e8f0;
  }

  #client-settings-modal .client-settings-nav::before {
    display: none;
  }

  #client-settings-modal .client-settings-nav__track {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 14px 10px 10px;
  }

  #client-settings-modal .client-settings-nav__btn {
    flex: 0 0 auto;
    width: auto;
    white-space: nowrap;
  }

  #client-settings-modal .client-settings-panel.client-settings-section {
    padding-top: 26px;
  }

  #client-settings-modal .client-settings-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 11px 16px 16px;
  }

  #client-settings-modal .client-settings-actions__progress {
    width: 100%;
    order: 2;
  }

  #client-settings-modal .client-settings-actions__submit {
    order: 1;
    width: 100%;
    max-width: none;
    min-width: 0;
    flex: 0 0 auto;
    margin-inline: 0;
  }

  #client-settings-modal .client-settings-card--inline .client-settings-billing--otp {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  #client-settings-modal .client-settings-card--inline .client-settings-billing--otp .client-settings-otp-lock-toggle {
    justify-self: end;
  }
}

/* Aggiungi prodotto — selezione tipologia a icone */
.add-form-typology-field {
  display: block !important;
  margin-bottom: 1.5rem !important;
  width: 100% !important;
}

.add-form-typology-label {
  display: block !important;
  margin: 0 0 0.75rem 0 !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  color: #334155 !important;
}

#addForm .add-form-typology-icon-grid {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  gap: 0.75rem !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  width: 100% !important;
}

#addForm .add-form-typology-icon-btn {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 0.5rem !important;
  width: auto !important;
  padding: 0.5rem 0.75rem !important;
  border-radius: 10px !important;
  border: 1.5px solid #e2e8f0 !important;
  background: #f8fafc !important;
  color: #1e293b !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

#addForm .add-form-typology-icon-btn:hover {
  border-color: #94a3b8;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.07);
}

#addForm .add-form-typology-icon-btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #6366f1;
}

#addForm .add-form-typology-icon-btn:focus:not(:focus-visible) {
  box-shadow: none;
}

#addForm .add-form-typology-icon-btn:focus-visible {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #6366f1;
}

#addForm .add-form-typology-icon-btn.is-selected {
  border-color: #4f46e5;
  background: #eef2ff;
  box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.25);
}

#addForm .add-form-typology-icon-btn__img {
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}

#addForm .add-form-typology-icon-label {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  hyphens: auto;
}

@media (max-width: 520px) {
  #addForm .add-form-typology-icon-btn {
    min-width: calc(50% - 0.4rem);
    max-width: none;
  }
}

/* Helper per righe orizzontali nel form */
.add-form-horizontal-row {
  display: none !important;
  /* Rimosso visivamente come richiesto */
}

.add-form-horizontal-row>.inputGroup {
  margin: 0 !important;
}

/* NUCLEAR HORIZONTAL FIX - TYPOLOGY */
#add-manual-view,
#addForm {
  display: block !important;
}

.add-form-typology-field {
  display: block !important;
  width: 100% !important;
  margin-top: 1.5rem !important;
  margin-bottom: 1.5rem !important;
}

#addForm .add-form-typology-icon-grid {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  width: 100% !important;
  justify-content: flex-start !important;
}

#addForm .add-form-typology-icon-btn {
  display: inline-flex !important;
  flex-direction: row !important;
  width: auto !important;
  flex: 0 1 auto !important;
  min-width: 100px !important;
}

/* HORIZONTAL NAME & DESCRIPTION FIX */
.add-form-main-row {
  display: grid !important;
  grid-template-columns: 1fr 2fr !important;
  gap: 1rem !important;
  margin-bottom: 1rem !important;
  width: 100% !important;
}

@media (max-width: 600px) {
  .add-form-main-row {
    grid-template-columns: 1fr !important;
  }
}

/* INLINE LABEL & CARDS FIX */
.add-form-typology-field {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 1.5rem !important;
}

.add-form-typology-label {
  margin: 0 !important;
  white-space: nowrap !important;
}

#addForm .add-form-typology-icon-grid {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  gap: 0.75rem !important;
  flex: 1 !important;
}

/* METRICS ROW (RIGA 3) - REVEALED */
.add-form-metrics-row {
  display: flex !important;
  flex-direction: row !important;
  gap: 1rem !important;
  margin-bottom: 1.5rem !important;
  width: 100% !important;
}

.add-form-metrics-row>.inputGroup {
  flex: 1 !important;
}

/* STEPPER METRICS STYLE */
.metric-stepper-field {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.6rem !important;
}

.metric-stepper-label {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  color: #334155 !important;
}

.metric-stepper-control {
  display: flex !important;
  align-items: center !important;
  background: #6366f1 !important;
  border: 1px solid #6366f1 !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  height: 44px !important;
  padding: 0 4px !important;
}

.stepper-btn {
  background: transparent !important;
  border: none !important;
  color: white !important;
  width: 44px !important;
  height: 100% !important;
  font-size: 1.4rem !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s !important;
}

.stepper-btn:hover {
  background: rgba(255, 255, 255, 0.15) !important;
}

.metric-stepper-control input[type="number"] {
  flex: 1 !important;
  border: none !important;
  background: white !important;
  height: calc(100% - 8px) !important;
  margin: 0 2px !important;
  border-radius: 8px !important;
  text-align: center !important;
  font-weight: 700 !important;
  font-size: 1.1rem !important;
  color: #1e293b !important;
  appearance: textfield !important;
  -moz-appearance: textfield !important;
}

.metric-stepper-control input[type="number"]::-webkit-outer-spin-button,
.metric-stepper-control input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  appearance: none !important;
  margin: 0 !important;
  display: none !important;
}

.metric-stepper-hint {
  font-size: 0.75rem !important;
  color: #94a3b8 !important;
  margin-top: 2px !important;
}

/* CENTER SUBMIT BUTTON FIX */
.add-form-submit-container {
  display: flex !important;
  justify-content: center !important;
  margin: 2.5rem 0 1.5rem !important;
  width: 100% !important;
}

#addForm input[type="submit"] {
  width: auto !important;
  min-width: 240px !important;
  padding: 14px 40px !important;
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

/* SMALLER SUBMIT BUTTON */
#addForm input[type="submit"] {
  min-width: 160px !important;
  padding: 8px 24px !important;
  font-size: 0.9rem !important;
  margin-top: 0.5rem !important;
}

/* MEDIUM SUBMIT BUTTON */
#addForm input[type="submit"] {
  min-width: 200px !important;
  padding: 10px 32px !important;
  font-size: 0.95rem !important;
}

/* REDUCE GAP ABOVE SUBMIT BUTTON */
.add-form-submit-container {
  margin-top: 0.75rem !important;
}
}
